save data modal & change list selectors & handle redirect in modal page doctors

This commit is contained in:
Ehsan
2025-05-16 13:52:47 +03:30
parent 328e11c21c
commit a016d3319a
7 changed files with 79 additions and 28 deletions
+12 -1
View File
@@ -137,4 +137,15 @@ export const searchOnList = (list, value, name) => {
item[name].toLowerCase().includes(value)
)
return newList;
}
}
export const addKeyToList = (list, nameKey, nameValue) => {
const newList = list.map(item => {
return {
...item,
[nameKey]: item[nameValue]
}
});
return newList;
}