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 02c7bb9e..3cdc7f66 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
@@ -119,21 +119,31 @@
- {{approvalInfo.Action}} -->
+ {{approvalInfo.Action}}
-
{{returnDateTime(approvalInfo.Date) }}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss
index 7b9993ff..b8bf1e75 100644
--- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss
+++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss
@@ -23,7 +23,7 @@
}
.footer-btn-img{
max-width: none;
- width: 60px;
+ width: 50px;
}
.timeline-item{
margin: 0;
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 f148197b..06342907 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
@@ -105,8 +105,8 @@ export class WorkListMainItgComponent implements OnInit {
this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length };
this.segmentsArray = [this.segmentsArray[1], this.segmentsArray[2], this.segmentsArray[0]];
this.segmentData = [this.segmentData[1], this.segmentData[0]];
- // this.workList = this.request_details.WFHistory.reverse();
- this.workList = this.request_details.WFHistory;
+ this.workList = this.request_details.WFHistory.reverse();
+ // this.workList = this.request_details.WFHistory;
this.options = this.request_details.AllowedActions;
this.activeSegment = this.segmentsArray[0].name;
for (let i = 0; i < this.options.length; i++) {
@@ -283,21 +283,21 @@ export class WorkListMainItgComponent implements OnInit {
if (!comments) {
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
} else {
- this.workListService.getITGActionRequest(request, url)
- .subscribe((result: any) => {
- if (result.MessageStatus !== 1) {
- this.common.presentAlert(this.ts.trPK('general', 'error-itg'));
+ this.workListService.getITGActionRequest(request, url)
+ .subscribe((result: any) => {
+ if (result.MessageStatus !== 1) {
+ this.common.presentAlert(this.ts.trPK('general', 'error-itg'));
- } else if (result.MessageStatus === 1) {
- setTimeout(() => {
- this.messageSuccess = true;
- this.common.sharedService.setSharedData(true, 'loadWorkList');
- this.confirmMsg(2);
- this.skip();
- this.messageSuccess = false;
- }, 2000);
- }
- });
+ } else if (result.MessageStatus === 1) {
+ setTimeout(() => {
+ this.messageSuccess = true;
+ this.common.sharedService.setSharedData(true, 'loadWorkList');
+ this.confirmMsg(2);
+ this.skip();
+ this.messageSuccess = false;
+ }, 2000);
+ }
+ });
}
} else if (action === 3) {// request more info
request.NewUserEMPId = this.replcamentID;
@@ -534,34 +534,47 @@ export class WorkListMainItgComponent implements OnInit {
}
}
- returnDateTime(stringDate: string){
+ returnDateTime(stringDate: string) {
let allDateTime = stringDate.split(' ');
let time = allDateTime[1].split(':', 2);
- let fullDate = this.transform(stringDate);
+ let dateArr= allDateTime[0].split('/')
+ let correctDate = dateArr[1]+'/'+dateArr[0]+'/'+dateArr[2];
+ let fullDate = this.transform(correctDate);
return fullDate + ' ' + time[0] + ':' + time[1] + ' ' + allDateTime[2];
-
+
}
locale = {
en: {
- // month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
- month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
+ // month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+ month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
}
-};
+ };
transform(value: string) {
let x = new Date(Date.parse(value));
//return value.toLowerCase();
- let month = this.getMonthNameShort('en',x.getMonth())
- return ""+ x.getDate()+" "+ month +" "+x.getFullYear();
+ let month = this.getMonthNameShort('en', x.getMonth())
+ return "" + x.getDate() + " " + month + " " + x.getFullYear();
}
-
-
-
- getMonthNameShort(lang,month) {
+ getMonthNameShort(lang, month) {
lang = lang && (lang in this.locale) ? lang : 'en';
return this.locale[lang].month_names_short[month];
-};
+ }
+
+ backgroundColor(statusName: string){
+ // {'bg-blue-txt' : approvalInfo.Action === 'Submit','bg-red-txt': approvalInfo.Action == 'Not Doable' ,'bg-orange-txt' : approvalInfo.Action === 'Pending' ,'bg-red-txt' : approvalInfo.Action === 'Rejected','bg-green-txt' : approvalInfo.Action != 'Pending' && approvalInfo.Action != 'Rejected' && approvalInfo.Action != 'Submit'}
+ switch (statusName) {
+ case 'Submit':
+ return 'bg-blue-txt';
+ case 'Pending':
+ return 'bg-orange-txt';
+ case 'Not Doable' || 'Rejected':
+ return 'bg-red-txt';
+ default:
+ return 'bg-green-txt';
+ }
+ }
}
diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts
index ac841be6..09c18a12 100644
--- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts
+++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts
@@ -1117,6 +1117,6 @@ export class WorklistMainComponent implements OnInit {
getMonthNameShort(lang,month) {
lang = lang && (lang in this.locale) ? lang : 'en';
return this.locale[lang].month_names_short[month];
-};
+}
}