feat: add property to product

This commit is contained in:
2026-06-18 13:43:30 +03:30
parent a186db08e2
commit 555e56c50a
6 changed files with 155 additions and 8 deletions
+6
View File
@@ -24,6 +24,9 @@ export const productsApi = {
value.forEach((desc, index) => {
formData.append(`descriptions[${index}]`, desc);
});
} else if (typeof value === 'boolean') {
// Laravel's boolean rule accepts "1"/"0", not "true"/"false"
formData.append(key, value ? '1' : '0');
} else {
formData.append(key, String(value));
}
@@ -58,6 +61,9 @@ export const productsApi = {
value.forEach((desc, index) => {
formData.append(`descriptions[${index}]`, desc);
});
} else if (typeof value === 'boolean') {
// Laravel's boolean rule accepts "1"/"0", not "true"/"false"
formData.append(key, value ? '1' : '0');
} else {
formData.append(key, String(value));
}