getDrawingCategoryTypes() {
const vue = this;
const buldingFiles = [];
this?.request?.details?.buildings?.forEach((building, index) => {
const types = new Set();
building.buildingFiles?.forEach(category => types.add(category?.typeID));
const data = Array.from(types).map(typeId => {
const filterdData = building.buildingFiles?.filter(i => i?.typeID === typeId);
return {
typeId: typeId,
typeName: filterdData[0]?.typeName,
obj:filterdData[0],
};
});
buldingFiles.push({ data: data, index: index });
});
console.log('bFiles',buldingFiles);
return buldingFiles;
},
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter