Исправила отображение контактов на записи
This commit is contained in:
@@ -64,15 +64,27 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
contacts() {
|
||||
let contactList = this.record?.person?.contacts
|
||||
?.filter(
|
||||
(elem) => elem.category === "PHONE" || elem.category === "EMAIL"
|
||||
)
|
||||
?.map((elem) => ({
|
||||
kind: elem.category,
|
||||
icon: networks.find((item) => item.id === elem.category)?.icon,
|
||||
value: elem.value,
|
||||
}));
|
||||
let contactList = [];
|
||||
this.record?.person?.contacts?.find((elem) => {
|
||||
if (elem.category === "PHONE") {
|
||||
contactList.push({
|
||||
kind: elem?.category,
|
||||
icon: networks?.find((item) => item.id === elem.category)?.icon,
|
||||
value: elem?.value,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
});
|
||||
this.record?.person?.contacts?.find((elem) => {
|
||||
if (elem.category === "EMAIL") {
|
||||
contactList.push({
|
||||
kind: elem?.category,
|
||||
icon: networks?.find((item) => item.id === elem.category)?.icon,
|
||||
value: elem?.value,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (this.collapsedDisplayCondition) {
|
||||
contactList.length = 1;
|
||||
return contactList;
|
||||
|
||||
Reference in New Issue
Block a user