dix unit
This commit is contained in:
parent
e17629a9ba
commit
bcc86c7841
|
|
@ -28,6 +28,8 @@ const SelectField = ({
|
|||
formik.setFieldValue(name, value);
|
||||
};
|
||||
const options = translateOptions(option, t);
|
||||
console.log(options);
|
||||
|
||||
return (
|
||||
<div className="ValidationField w-100">
|
||||
<ValidationFieldLabel
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
export const translateOptions = (options: any, t: any) => {
|
||||
console.log(options);
|
||||
|
||||
return options?.map((opt: any) => ({
|
||||
...opt,
|
||||
label: t(`${opt?.label}`),
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ const Form = () => {
|
|||
placeholder="term"
|
||||
label="term"
|
||||
option={termsArray}
|
||||
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
export const enumToArray = (enumObj: any) => {
|
||||
return Object.keys(enumObj).map((key) => ({
|
||||
value: enumObj[key],
|
||||
label: `select.enums.${enumObj[key]}`,
|
||||
id: enumObj[key],
|
||||
name: `select.enums.${enumObj[key]}`,
|
||||
}));
|
||||
};
|
||||
|
|
|
|||
|
|
@ -413,6 +413,10 @@
|
|||
"id_image":"صورة الهوية"
|
||||
},
|
||||
"select": {
|
||||
"enums": {
|
||||
"first_term": "الفصل الأول",
|
||||
"second_term": "الفصل الثاني"
|
||||
},
|
||||
"Payments": {
|
||||
"paid": "قبض",
|
||||
"to_be_paid": "مرتجع",
|
||||
|
|
@ -663,10 +667,7 @@
|
|||
"admin": "المسؤول",
|
||||
"branchAdmin": "مسؤول الفروع"
|
||||
},
|
||||
"enums": {
|
||||
"first_term": "الفصل الأول",
|
||||
"second_term": "الفصل الثاني"
|
||||
},
|
||||
|
||||
"array": {
|
||||
"Period": {
|
||||
"Today": "اليوم",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user