This commit is contained in:
hamid zarghami
2025-04-21 14:53:46 +03:30
parent aacbbe672a
commit 32ee23c0d9
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -51,6 +51,7 @@ const CreateDiscount: FC = () => {
}),
onSubmit(values) {
values.targetServices = serviceId
values.type = +values.type
const params: CreateDiscountType = {
...values,
startDate: moment(values.startDate, 'jYYYY-jMM-jDD').format('YYYY-MM-DD'),
+2 -1
View File
@@ -57,7 +57,8 @@ const UpdateDiscount: FC = () => {
...values,
startDate: moment(values.startDate, 'jYYYY-jMM-jDD').format('YYYY-MM-DD'),
endDate: moment(values.endDate, 'jYYYY-jMM-jDD').format('YYYY-MM-DD'),
value: +values.value
value: +values.value,
type: +values.type
}
updateDiscount.mutate({ id: id || '', params }, {
onSuccess: () => {