Compare commits
No commits in common. "482c7341f8817fa67d4fa738b1029329b9da3adb" and "55f854129e91241dd2f97805c1660ec32a321157" have entirely different histories.
482c7341f8
...
55f854129e
|
|
@ -28,8 +28,6 @@ const SelectField = ({
|
||||||
formik.setFieldValue(name, value);
|
formik.setFieldValue(name, value);
|
||||||
};
|
};
|
||||||
const options = translateOptions(option, t);
|
const options = translateOptions(option, t);
|
||||||
console.log(options);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ValidationField w-100">
|
<div className="ValidationField w-100">
|
||||||
<ValidationFieldLabel
|
<ValidationFieldLabel
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
export const translateOptions = (options: any, t: any) => {
|
export const translateOptions = (options: any, t: any) => {
|
||||||
console.log(options);
|
|
||||||
|
|
||||||
return options?.map((opt: any) => ({
|
return options?.map((opt: any) => ({
|
||||||
...opt,
|
...opt,
|
||||||
label: t(`${opt?.label}`),
|
label: t(`${opt?.label}`),
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ const Form = () => {
|
||||||
placeholder="term"
|
placeholder="term"
|
||||||
label="term"
|
label="term"
|
||||||
option={termsArray}
|
option={termsArray}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ const EditPage: React.FC = () => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
if (item?.id) {
|
if (item?.id) {
|
||||||
const itemToSend = structuredClone(item);
|
const itemToSend = structuredClone(item);
|
||||||
const keysToRemove = ["content_image"];
|
const keysToRemove = ["content_image","hint"];
|
||||||
const updatedObject = removeStringKeys(itemToSend, keysToRemove);
|
const updatedObject = removeStringKeys(itemToSend, keysToRemove);
|
||||||
console.log(updatedObject, "updatedObject");
|
console.log(updatedObject, "updatedObject");
|
||||||
|
|
||||||
|
|
@ -143,7 +143,7 @@ const EditPage: React.FC = () => {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const keysToRemove = ["content_image"];
|
const keysToRemove = ["content_image","hint"];
|
||||||
console.log(DataToSend);
|
console.log(DataToSend);
|
||||||
const updatedObject = removeStringKeys(DataToSend, keysToRemove);
|
const updatedObject = removeStringKeys(DataToSend, keysToRemove);
|
||||||
delete updatedObject["parent_id"];
|
delete updatedObject["parent_id"];
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
export const enumToArray = (enumObj: any) => {
|
export const enumToArray = (enumObj: any) => {
|
||||||
return Object.keys(enumObj).map((key) => ({
|
return Object.keys(enumObj).map((key) => ({
|
||||||
id: enumObj[key],
|
value: enumObj[key],
|
||||||
name: `select.enums.${enumObj[key]}`,
|
label: `select.enums.${enumObj[key]}`,
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -413,10 +413,6 @@
|
||||||
"id_image":"صورة الهوية"
|
"id_image":"صورة الهوية"
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
"enums": {
|
|
||||||
"first_term": "الفصل الأول",
|
|
||||||
"second_term": "الفصل الثاني"
|
|
||||||
},
|
|
||||||
"Payments": {
|
"Payments": {
|
||||||
"paid": "قبض",
|
"paid": "قبض",
|
||||||
"to_be_paid": "مرتجع",
|
"to_be_paid": "مرتجع",
|
||||||
|
|
@ -667,7 +663,10 @@
|
||||||
"admin": "المسؤول",
|
"admin": "المسؤول",
|
||||||
"branchAdmin": "مسؤول الفروع"
|
"branchAdmin": "مسؤول الفروع"
|
||||||
},
|
},
|
||||||
|
"enums": {
|
||||||
|
"first_term": "الفصل الأول",
|
||||||
|
"second_term": "الفصل الثاني"
|
||||||
|
},
|
||||||
"array": {
|
"array": {
|
||||||
"Period": {
|
"Period": {
|
||||||
"Today": "اليوم",
|
"Today": "اليوم",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user