Skip to content

Commit

Permalink
Merge pull request bagisto#8601 from amit-webkul/review-issue
Browse files Browse the repository at this point in the history
Fixed Issue bagisto#8516
  • Loading branch information
jitendra-webkul committed Oct 4, 2023
2 parents 5e53494 + 8514e18 commit 7c258c0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function store()
'default_value' => 'integer',
]);

$requestData = request()->input();
$requestData = request()->all();

if (! $requestData['default_value']) {
$requestData['default_value'] = Null;
Expand Down Expand Up @@ -122,7 +122,7 @@ public function update($id)
]);


$requestData = request()->input();
$requestData = request()->all();

if (! $requestData['default_value']) {
$requestData['default_value'] = Null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ class="hidden peer"
<form
@submit.prevent="handleSubmit($event, storeOptions)"
enctype="multipart/form-data"
ref="createOptionsForm"
>
<x-admin::modal
@toggle="listenModal"
Expand Down Expand Up @@ -876,6 +877,12 @@ class="primary-button"
});
}
let formData = new FormData(this.$refs.createOptionsForm);
const sliderImage = formData.get("swatch_value[]");
params.swatch_value = sliderImage;
this.$refs.addOptionsRow.toggle();
if (params.swatch_value instanceof File) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,11 @@ class="!text-[14px] !font-semibold !text-gray-600 dark:!text-gray-300 cursor-poi
as="div"
ref="modelForm"
>
<form @submit.prevent="handleSubmit($event, storeOptions)" enctype="multipart/form-data">
<form
@submit.prevent="handleSubmit($event, storeOptions)"
enctype="multipart/form-data"
ref="editOptionsForm"
>
<x-admin::modal
@toggle="listenModel"
ref="addOptionsRow"
Expand Down Expand Up @@ -1011,6 +1015,12 @@ class="primary-button"
this.optionsData.push(params);
}
let formData = new FormData(this.$refs.editOptionsForm);
const sliderImage = formData.get("swatch_value[]");
params.swatch_value = sliderImage;
this.$refs.addOptionsRow.toggle();
if (params.swatch_value instanceof File) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ class="inline-block text-blue-500 hover:text-blue-600 hover:underline"
optionName: function (attribute, optionId) {
return attribute.options.find(function (option) {
return option.id == optionId;
}).admin_name;
})?.admin_name;
},
}
});
Expand Down Expand Up @@ -1155,7 +1155,7 @@ class="inline-block text-blue-500 hover:text-blue-600 hover:underline"
optionName: function (attribute, optionId) {
return attribute.options.find(function (option) {
return option.id == optionId;
}).admin_name;
})?.admin_name;
},
update(params) {
Expand Down

0 comments on commit 7c258c0

Please sign in to comment.