@@ -46,7 +75,6 @@ const Form = ({status}:{status?:any}) => {
/>
{t("practical.cancel")}
diff --git a/src/Pages/ReSeller/Sales/Model/formUtil.ts b/src/Pages/ReSeller/Sales/Model/formUtil.ts
index 154cb77..23cec28 100644
--- a/src/Pages/ReSeller/Sales/Model/formUtil.ts
+++ b/src/Pages/ReSeller/Sales/Model/formUtil.ts
@@ -4,7 +4,8 @@ export const getInitialValues = (objectToEdit: any): any => {
return {
id: objectToEdit?.id ?? null,
phone_number: objectToEdit?.phone_number ?? null,
- currentModalIndex: 0
+ currentModalIndex: 0,
+ package_id:objectToEdit?.package_id ?? null
};
};
@@ -16,4 +17,10 @@ export const getValidationSchema = () => {
.matches(/^\d{10}$/, "Phone number must be a valid 10-number number"),
currentModalIndex: Yup.number().max(2)
});
-};
\ No newline at end of file
+};
+
+export const getValidationSchemaForSale = () => {
+ return Yup.object().shape({
+ package_id: Yup.string().required("package_id is required")
+ });
+};
diff --git a/src/Styles/Pages/sales.scss b/src/Styles/Pages/sales.scss
index 7544b3f..513259e 100644
--- a/src/Styles/Pages/sales.scss
+++ b/src/Styles/Pages/sales.scss
@@ -3,4 +3,28 @@
.modal_title{
height: 5vh;
}
+ .sales_info_modal{
+ margin-block: 30px 10px;
+ display: flex; flex-direction: column;
+ gap: 20px;
+ }
+ .info{
+ width: 100%;
+ display: flex;align-items: center;
+ gap: 10px;
+ img{
+ width: 60px;
+ border-radius: 50%;
+ }
+ span{
+ h5{
+ color: var(--value);
+ display: flex;align-items: center;
+ gap: 10px;
+ p{
+ color: var(--primary);
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/api/sales.ts b/src/api/sales.ts
index c99c15d..d1559c5 100644
--- a/src/api/sales.ts
+++ b/src/api/sales.ts
@@ -11,6 +11,7 @@ const API = {
const KEY = "sales";
-export const useGetAllSales = (params?: any, options?: any) =>
- useGetQuery(KEY, API.GET, params, options);
-export const useAddSales = () => useAddMutation(KEY, API.ADD);
\ No newline at end of file
+export const useGetAllSales = (params?: any, options?: any) =>useGetQuery(KEY, API.GET, params, options);
+export const useAddSales = () => useAddMutation(KEY, API.ADD);
+export const useGetStudentByPhone = (params?: any, options?: any) => useGetQuery(KEY, API.GET_BY_PHONE, params, options);
+export const useGetSummery = () => useGetQuery(KEY, API.GET_SUMMERY);
\ No newline at end of file
diff --git a/src/translate/ar.json b/src/translate/ar.json
index ad55c2a..3c52173 100644
--- a/src/translate/ar.json
+++ b/src/translate/ar.json
@@ -309,7 +309,8 @@
"account_activities":"أنشطة الحساب",
"This will close your account. Your account will be interactive when you log in again":"سيؤدي هذا إلى إغلاق حسابك. سيكون حسابك تفاعليا عند تسجيل الدخول مرة أخرى",
"Your account will be permanently deleted":"سيتم حذف حسابك نهائيا",
- "search":"بحث"
+ "search":"بحث",
+ "sale":"بيع"
},
"Table": {
"header": "",
@@ -525,7 +526,8 @@
"contact_number1":"رقم الهاتف",
"contact_number2":"رقم الهاتف الإضافي",
"lat":"الطول",
- "lng":"العرض"
+ "lng":"العرض",
+ "choose":"حدد"
},
"select": {
"enums": {