diff options
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts b/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts index d8d3c32ac..bd2d77d99 100644 --- a/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts +++ b/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts @@ -151,6 +151,7 @@ export class AuditInfoModalComponent { .subscribe((res: AuditStatus[][]) => { this.vidInfoData = res[0]; this.msoInfoData = res[1]; + this.msoInfoData.sort(this.getSortOrder("startTime")); this.isLoading = false; }); } @@ -186,6 +187,17 @@ export class AuditInfoModalComponent { this.dataIsReady = true; } + + //Comparer Function + getSortOrder(timestamp) { + return (obj1, obj2) =>{ + + let firstObj = obj1[timestamp]; + let secondObj = obj2[timestamp]; + return ((secondObj < firstObj) ? -1 : ((secondObj > firstObj) ? 1 : 0)); + + } + } readOnlyRetryUrl = (): string => `../../serviceModels.htm?more#/servicePlanning/RETRY?serviceModelId=${this.serviceModelId}&jobId=${this.jobId}` |