[WIP] Доработал форму состояния зубов
This commit is contained in:
@@ -56,13 +56,19 @@ export function getConfidantObject(data) {
|
||||
}
|
||||
|
||||
export const getFiiledConditions = (condition) => {
|
||||
let filledConditions = [
|
||||
...Object.values(condition.crown)
|
||||
.filter((val) => val.length)
|
||||
.flat(),
|
||||
...Object.values(condition.root)
|
||||
.filter((val) => val.length)
|
||||
.flat(),
|
||||
];
|
||||
return filledConditions;
|
||||
let crown = Object.keys(condition.crown)
|
||||
.map((key) => ({
|
||||
value: condition.crown[key],
|
||||
type: "crown",
|
||||
part: key,
|
||||
}))
|
||||
.filter((el) => el.value.length);
|
||||
let root = Object.keys(condition.root)
|
||||
.map((key) => ({
|
||||
value: condition.root[key],
|
||||
type: "root",
|
||||
part: key,
|
||||
}))
|
||||
.filter((el) => el.value.length);
|
||||
return [...crown, ...root];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user