/*
importData() {
x += 1;
for (const row of this.infos) {
for (const cell of row.cells) {
// userdata for loop
for (const userData in this.importedData) {
if (userData + ':' === cell.title) {
cell.title += this.importedData[userData];
}
}
for (const boards of this.importedData.boards) {
for (const board in boards) {
if (board + ':' === cell.title) {
cell.title += boards[board];
}
}
}
}
}
for (const row of this.infos) {
// get each cell
console.log(x);
const borderInfo: any = this.importedData.boards[x].boardInfos;
for (const details of borderInfo) {
const tem: any[] = [];
for (const each of Object.keys(details)) {
for (const cell of row.cells) {
if (each === cell.title) {
tem.push({
cellId: (cellId += 1),
title: details[each],
colspan: cell.colspan,
height: 30,
textAlign: 'center',
fontSize: 16,
fontStyle: 'normal',
});
}
}
}
if (tem.length) {
for (const eachRow in this.infos) {
if (!this.infos[eachRow].cells.length) {
this.infos[eachRow].cells = this.infos[eachRow].cells.concat(
tem,
);
break;
}
}
}
}
}
},
*/
////
function fillBody() {
for (const row of this.infos) {
for (const cell of row.cells) {
if (data.boards[0].hasOwnProperty(cell.title)) {
cell.title = data.boards[0][cell.title];
}
}
// get each cell
const borderInfo: any = data.boards[0].boardInfos;
for (const details of borderInfo) {
const tem: any[] = [];
for (const each of Object.keys(details)) {
for (const cell of row.cells) {
if (each === cell.title) {
tem.push({
cellId: (cellId += 1),
title: details[each],
colspan: cell.colspan,
height: 30,
textAlign: 'center',
fontSize: 16,
fontStyle: 'normal',
});
}
}
}
if (tem.length) {
for (const eachRow of this.infos) {
if (!eachRow.cells.length) {
eachRow.cells = eachRow.cells.concat(tem);
break;
}
}
}
}
}
}