Skip to content

Commit

Permalink
fixed details tab
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovikov committed Dec 7, 2022
1 parent d5db19a commit 7456e7e
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/app/components/search-grid-call/search-grid-call.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ export class SearchGridCallComponent
});

}
console.log({marData})
console.log({ marData })
marData?.forEach((h: any) => {
const idColumn = h?.id?.split('.').pop();

Expand Down Expand Up @@ -949,7 +949,7 @@ export class SearchGridCallComponent
}
copy(e) {
this.copyService.copy(e, {
message:'notifications.success.cellCopy',
message: 'notifications.success.cellCopy',
isTranslation: true
});
}
Expand Down Expand Up @@ -1362,8 +1362,8 @@ export class SearchGridCallComponent
mData.loaded = true;
return;
} else {
const result: any = await this._scs.getMessage(request).toPromise();

const result: any = await this._scs.getMessage(request).toPromise();
mData.data = result && result.data && result.data[0] ? result.data[0] : {};
mData.data.item = {
raw: mData && mData.data && mData.data.raw ? mData.data.raw : 'raw is empty'
Expand All @@ -1385,6 +1385,21 @@ export class SearchGridCallComponent
mData.loaded = true;
this.cdr.detectChanges();
}
} else {
if (!mData.data.messageDetailTableData) {
mData.data.messageDetailTableData = Object.keys(mData.data).map(i => {
let val;
if (i === 'create_date') {
val = moment(mData.data[i]).format('DD-MM-YYYY hh:mm:ss.SSS');
} else if (i === 'timeSeconds') {
val = mData.data[i];
} else {
val = mData.data[i];
}
return { name: i, value: val };
}).filter(i => typeof i.value !== 'object' && i.name !== 'raw');

}
}
mData.loaded = true;
this.cdr.detectChanges();
Expand Down

0 comments on commit 7456e7e

Please sign in to comment.