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:
+7
-4
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user