diff --git a/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts b/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts index 7859895f..01f7a2b9 100644 --- a/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts +++ b/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts @@ -132,7 +132,7 @@ export class DevicePermissionsService { return new Promise((resolve, reject) => { this.cs.confirmAlertDialogPrimarySecondary(() => { resolve(true); - }, this.ts.trPK('general', 'confirm'), + }, this.ts.trPK('general', 'accept'), () => { resolve(false); }, this.ts.trPK('general', 'not-now'), this.ts.trPK('general', 'confirm'), message diff --git a/Mohem/src/app/notification/home/home.component.scss b/Mohem/src/app/notification/home/home.component.scss index a5eb0061..36116457 100644 --- a/Mohem/src/app/notification/home/home.component.scss +++ b/Mohem/src/app/notification/home/home.component.scss @@ -436,7 +436,7 @@ color: #888; font-size: 15px; } .text-span{ -font-size: 14px; +font-size: 12px; color: #888; background-color: white; width: 93%; @@ -446,7 +446,7 @@ border-radius: 15px; } .text-span-active{ -font-size: 14px; +font-size: 12px; color: #888; background-color:#22c6b3; width: 93%; diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 281e4308..1ce31386 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -548,11 +548,29 @@ export class HomeComponent implements OnInit { names[i] = result.RequestType[i].RequestTypeCode; count++; } + //this.sortArrayOfAll(this.ITGSegment[0].data) console.log(this.ITGSegment); }); } +// return arrayToSort.sort((a: any, b: any) => +// new Date(b.date).getTime() - new Date(a.date).getTime() +// ); + +sortArrayOfAll(arrayOfAll){ + let date1; + let date2; + for(let i=0; i< arrayOfAll.length; i++){ + // for(const filter of arrayOfAll[i]){ + console.log(arrayOfAll); + arrayOfAll.sort((a,b)=>(this.common.getDateTimeISOFromString(a.ModifiedDate), this.common.getDateTimeISOFromString(b.ModifiedDate))?1:-1); + console.log(arrayOfAll); + // console.log(this.common.getDateTimeISOFromString(filter.ModifiedDate)); + // } + } + } + Details() { this.workListService.getITGDetails('', '', this.isPostNoLoad) .subscribe((result: any) => { diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html index 554d5407..9edbbf00 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html @@ -22,10 +22,37 @@
- -
- + + +
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
+ + +
+
+
+
+
+
+
@@ -74,12 +101,13 @@ +
-

{{approvalInfo.Action}}

+

{{approvalInfo.Action}}

{{approvalInfo.Name}}

diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts index eeb5f349..c531062f 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts @@ -34,6 +34,7 @@ export class WorkListMainItgComponent implements OnInit { public segmentsArray: { name: string, number: number }[] = []; public segmentData: { name: string, data: any }[] = []; public requestDetailsData: { name: string, data: any }[] = []; + public dataLabelAndValue =[]; public header: any = []; public rows: any = []; public workList: any; @@ -89,16 +90,22 @@ export class WorkListMainItgComponent implements OnInit { for (let i = 0; i < result.ITGRequest.FieldGoups.length; i++) { this.segmentsArray[i] = { name: result.ITGRequest.FieldGoups[i].Title, number: i }; this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields } - for (let j = 0; j < this.segmentData[i].data.length; j++) { - if (this.segmentData[i].data[j].TableValue){ - this.requestDetailsData[count] ={ name:this.segmentData[i].data[j].TableValue.Header, - data: this.segmentData[i].data[j].TableValue.Rows} - count++; + // console.log(this.segmentData[i].data[j]) + if(this.segmentData[i].data[j].Type ==="table"){ + // console.log(JSON.parse(this.segmentData[i].data[j].Value)); + this.dataLabelAndValue.push(JSON.parse(this.segmentData[i].data[j].Value)) + console.log(this.dataLabelAndValue); } + // if (this.segmentData[i].data[j].TableValue){ + // this.requestDetailsData[count] ={ name:this.segmentData[i].data[j].TableValue.Header, + // data: this.segmentData[i].data[j].TableValue.Rows} + // count++; + // } } } - console.log(this.requestDetailsData) + console.log(this.dataLabelAndValue) + //console.log(this.requestDetailsData) this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length } this.workList = this.request_details.WFHistory; this.options = this.request_details.AllowedActions; @@ -147,6 +154,9 @@ export class WorkListMainItgComponent implements OnInit { if (actionName == "Delegate") { return "../assets/imgs/action-info.png" } + if (actionName == "Answer") { + return "../assets/imgs/action-info.png" + } } public segmentChangedClick(event: any) { diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 94277c80..83a0b64f 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -205,6 +205,10 @@ } }, "general": { + "not-now":{ + "en":"not now", + "ar":"لاحقاً" + }, "birth_date": { "en": "Birth Date", "ar": "تاريخ الميلاد"