save data modal & change list selectors & handle redirect in modal page doctors
This commit is contained in:
+12
-1
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user