diff --git a/.env b/.env index 6a84cba..343e676 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ VITE_TOKEN_NAME = 'admin_token' VITE_REFRESH_TOKEN_NAME = 'admin_refresh_token' VITE_BASE_URL = 'https://api.danakcorp.com' -# VITE_BASE_URL = 'http://192.168.1.117:4000' \ No newline at end of file +# VITE_BASE_URL = 'http://192.168.1.108:4000' \ No newline at end of file diff --git a/src/index.css b/src/index.css index d1d6241..333801a 100644 --- a/src/index.css +++ b/src/index.css @@ -91,8 +91,8 @@ tbody tr { .borderDashed { background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' rx='24' ry='24' stroke='%238C90A3' stroke-width='2' stroke-dasharray='6%2C 14' stroke-dashoffset='25' stroke-linecap='square'/%3E%3C/svg%3E"); - border-radius: 24px; /* تطابق با rx و ry */ - overflow: hidden; /* برای رفع مشکلات برش */ + border-radius: 24px; + overflow: hidden; } .modalGlass { @@ -152,22 +152,21 @@ tbody tr { } * { - scrollbar-width: none; /* برای فایرفاکس */ - -ms-overflow-style: none; /* برای اینترنت اکسپلورر و اج */ + scrollbar-width: none; + -ms-overflow-style: none; } -/* برای Webkit (کروم، سافاری و اپرا) */ *::-webkit-scrollbar { display: none; } .ql-container { - min-height: 200px !important; /* حداقل ارتفاع برای نمایش کامل ادیتور */ - max-height: 500px; /* حداکثر ارتفاع */ - overflow-y: auto; /* فعال کردن اسکرول در صورت نیاز */ + min-height: 200px !important; + max-height: 500px; + overflow-y: auto; } .ql-toolbar { - position: relative !important; /* حل مشکل نمایش نوار ابزار */ + position: relative !important; z-index: 10; } diff --git a/src/langs/fa.json b/src/langs/fa.json index a658374..0038d85 100644 --- a/src/langs/fa.json +++ b/src/langs/fa.json @@ -359,7 +359,8 @@ "user": "کاربر", "0": "درصد", "1": "مبلغ", - "update_discount": "ویرایش تخفیف" + "update_discount": "ویرایش تخفیف", + "customer": "مشتری" }, "blog": { "blog": "بلاگ", @@ -483,7 +484,8 @@ "3": "ماهانه", "4": "چهارماهه", "5": "سالانه", - "maxRecurringCycles": "حداکثر تعداد تکرار دوره" + "maxRecurringCycles": "حداکثر تعداد تکرار دوره", + "WAIT_PAYMENT": "در انتظار پرداخت" }, "edit": "ویرایش", "transaction": { diff --git a/src/pages/discounts/CreateDiscount.tsx b/src/pages/discounts/CreateDiscount.tsx index 1bf4aa8..b4886b0 100644 --- a/src/pages/discounts/CreateDiscount.tsx +++ b/src/pages/discounts/CreateDiscount.tsx @@ -40,7 +40,8 @@ const CreateDiscount: FC = () => { targetServices: [], direct: true, value: 0, - isActive: true + isActive: true, + userPhone: '' }, validationSchema: Yup.object({ value: Yup.number().required(t('errors.required')), @@ -52,6 +53,9 @@ const CreateDiscount: FC = () => { onSubmit(values) { values.targetServices = serviceId values.type = +values.type + if (values.userPhone === '') { + values.userPhone = undefined + } const params: CreateDiscountType = { ...values, startDate: moment(values.startDate, 'jYYYY-jMM-jDD').format('YYYY-MM-DD'), @@ -167,19 +171,27 @@ const CreateDiscount: FC = () => { error_text={formik.touched.endDate && formik.errors.endDate ? formik.errors.endDate : ''} /> + + { + !formik.values.direct && +
- {t('discount.service_status')} + {'وضعیت تخفیف'}
- {t('discount.service_status')} + {'وضعیت تخفیف'}