page add panel/doctor role agent && save data crop img && upload img && just roles agent can access panel && save data doctor && add field phone number && remove two tab

This commit is contained in:
Ehsan
2025-07-16 08:13:29 +03:30
parent 1b2573e460
commit c88a371eda
37 changed files with 196 additions and 1193 deletions
+7 -4
View File
@@ -23,18 +23,21 @@ export const handleTwoLength = (value) =>
export const checkAllValues = (data) => {
for (let key in data) {
if (typeof data[key] === "object" && data[key] !== null) {
if ("value" in data[key]) {
if (!data[key].value) {
const item = data[key];
if (typeof item === "object" && item !== null) {
if ("value" in item) {
if (!item.value) {
return false;
}
} else {
if (!checkAllValues(data[key])) {
if (!checkAllValues(item)) {
return false;
}
}
}
}
return true;
};