diff --git a/Mohem/src/app/authentication/login/login.component.html b/Mohem/src/app/authentication/login/login.component.html
index 638b6265..e8219d21 100644
--- a/Mohem/src/app/authentication/login/login.component.html
+++ b/Mohem/src/app/authentication/login/login.component.html
@@ -24,8 +24,10 @@
-
+
+
+
diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts
index 447b9d2b..eadc6411 100644
--- a/Mohem/src/app/authentication/login/login.component.ts
+++ b/Mohem/src/app/authentication/login/login.component.ts
@@ -100,6 +100,7 @@ export class LoginComponent implements OnInit, OnDestroy {
getlastlogin: any;
public keyboardOpened = false;
private checkUserResult: CheckUserAuthenticationResponse;
+ private inputType = "password";
ngOnInit() {
this.monitorKeyboardChange();
@@ -392,4 +393,12 @@ export class LoginComponent implements OnInit, OnDestroy {
return await modal.present();
}
+ showPassword(){
+ this.inputType = 'password';
+ }
+
+ hidePassword(){
+ this.inputType = 'text';
+ }
+
}
diff --git a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts
index 43ea2773..7b7d05e0 100644
--- a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts
+++ b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts
@@ -153,7 +153,7 @@ export class ApplyActionModalComponent implements OnInit {
setTimeout(() => {
this.messageSuccess = false;
- }, 5000);
+ }, 2000);
this.cs.openNotificationPage();
// this.getNotificationCountAfterSubmit();
diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts
index ec019152..fc4f266c 100644
--- a/Mohem/src/app/notification/home/home.component.ts
+++ b/Mohem/src/app/notification/home/home.component.ts
@@ -156,22 +156,22 @@ export class HomeComponent implements OnInit {
spaceBetween: 10
};
constructor(
- public common: CommonService,
- public ts: TranslatorService,
- // tslint:disable-next-line: no-shadowed-variable
- public WorklistService: WorklistService,
- public workListService: WorklistMainService,
- public modalController: ModalController,
- public DS: DashboredService
- ) {
- this.WorkListObj = new WorkListRequest();
- this.WorkListObj.P_NOTIFICATION_TYPE = '1';
- this.WorkListObj.P_SEARCH_FROM_USER = '';
- this.WorkListObj.P_SEARCH_SUBJECT = '';
- this.WorkListObj.P_SEARCH_SENT_DATE = '';
- this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
- this.WorkListObj.P_PAGE_NUM = 0;
- this.WorkListObj.P_PAGE_LIMIT = 50;
+ public common: CommonService,
+ public ts: TranslatorService,
+ // tslint:disable-next-line: no-shadowed-variable
+ public WorklistService: WorklistService,
+ public workListService: WorklistMainService,
+ public modalController: ModalController,
+ public DS: DashboredService
+ ) {
+ this.WorkListObj = new WorkListRequest();
+ this.WorkListObj.P_NOTIFICATION_TYPE = '1';
+ this.WorkListObj.P_SEARCH_FROM_USER = '';
+ this.WorkListObj.P_SEARCH_SUBJECT = '';
+ this.WorkListObj.P_SEARCH_SENT_DATE = '';
+ this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
+ this.WorkListObj.P_PAGE_NUM = 0;
+ this.WorkListObj.P_PAGE_LIMIT = 50;
}
ngOnInit() {
@@ -247,17 +247,17 @@ export class HomeComponent implements OnInit {
for (const notification of openNotificationsArray) {
if (notification.ITEM_TYPE === 'HRSSA') {
- this.filters[1].value = this.totalHR;
- this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER;
+ this.filters[1].value = this.totalHR;
+ this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'POAPPRV') {
- this.filters[2].value = this.totalPO;
- this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER;
+ this.filters[2].value = this.totalPO;
+ this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'REQAPPRV') {
- this.filters[3].value = this.totalPR;
- this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER;
+ this.filters[3].value = this.totalPR;
+ this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'INVMOA') {
- this.filters[4].value = this.totalMR;
- this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER;
+ this.filters[4].value = this.totalMR;
+ this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER;
}
}
// this.data.datasets[0].data[4] = this.ITGCount;
@@ -266,7 +266,7 @@ export class HomeComponent implements OnInit {
this.isLoading = false;
}
- checkLoadingStatus () {
+ checkLoadingStatus() {
if (this.showChart && this.receivedITGCount) {
this.common.stopLoading();
return true;
@@ -322,28 +322,28 @@ export class HomeComponent implements OnInit {
});
modal.onDidDismiss().then(result => {
if (result.data) {
- if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') {
- this.common.startLoading();
- this.isLoading = true;
- this.showSearchButton = true;
- this.itemType = result.data.itemType;
- this.notificationType = result.data.notificationType;
- this.selectedValue = result.data.selectedValue;
- this.inputDate = result.data.inputDate;
- this.inputSearch = result.data.inputSearch;
- this.WorkListObj.P_PAGE_NUM = 1;
- this.newWorkListResponse = [];
- this.showFormattedData = [];
- this.selectedFilter = 'ALL';
- this.filters[this.currentActiveIndex].active = false;
- this.currentActiveIndex = 0;
- this.previousActiveIndex = 0;
- this.filters[this.currentActiveIndex].active = true;
- if (this.itemType !== '') {
- this.disableFilters();
- }
- this.isPostNoLoad = false;
- this.getAllPushNotificationFun();
+ if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') {
+ this.common.startLoading();
+ this.isLoading = true;
+ this.showSearchButton = true;
+ this.itemType = result.data.itemType;
+ this.notificationType = result.data.notificationType;
+ this.selectedValue = result.data.selectedValue;
+ this.inputDate = result.data.inputDate;
+ this.inputSearch = result.data.inputSearch;
+ this.WorkListObj.P_PAGE_NUM = 1;
+ this.newWorkListResponse = [];
+ this.showFormattedData = [];
+ this.selectedFilter = 'ALL';
+ this.filters[this.currentActiveIndex].active = false;
+ this.currentActiveIndex = 0;
+ this.previousActiveIndex = 0;
+ this.filters[this.currentActiveIndex].active = true;
+ if (this.itemType !== '') {
+ this.disableFilters();
+ }
+ this.isPostNoLoad = false;
+ this.getAllPushNotificationFun();
}
}
});
@@ -351,41 +351,41 @@ export class HomeComponent implements OnInit {
}
getAllPushNotificationFun() {
- this.WorkListObj.P_PAGE_NUM = 1;
- this.isReachEnd = false;
- this.WorkListObj.P_SEARCH_FROM_USER = this.selectedValue === '1' ? this.inputSearch : '';
- this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : '';
- this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3')
- ? moment(this.inputDate).format('DD-MMM-YYYY') : '';
- this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : '';
- this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : '';
- this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1';
- if (this.selectedValue === '5') {
- this.WorkListObj.P_SEARCH_FROM_USER = '';
- this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
- this.WorkListObj.P_SEARCH_SENT_DATE = '';
- this.WorkListObj.P_SEARCH_SUBJECT = '';
+ this.WorkListObj.P_PAGE_NUM = 1;
+ this.isReachEnd = false;
+ this.WorkListObj.P_SEARCH_FROM_USER = this.selectedValue === '1' ? this.inputSearch : '';
+ this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : '';
+ this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3')
+ ? moment(this.inputDate).format('DD-MMM-YYYY') : '';
+ this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : '';
+ this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : '';
+ this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1';
+ if (this.selectedValue === '5') {
+ this.WorkListObj.P_SEARCH_FROM_USER = '';
+ this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
+ this.WorkListObj.P_SEARCH_SENT_DATE = '';
+ this.WorkListObj.P_SEARCH_SUBJECT = '';
+ }
+ this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
+ if (this.common.validResponse(result)) {
+ this.handleWorkListResult(result.GetWorkList);
}
- this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
- if (this.common.validResponse(result)) {
- this.handleWorkListResult(result.GetWorkList);
- }
- }
- );
+ }
+ );
}
getFilteredData(filter: string) {
if (filter === 'ALL') {
this.showFormattedData = this.allFormattedData;
} else {
- let arrayToFilter;
- arrayToFilter = this.newWorkListResponse.filter((workList) => {
- return workList.ITEM_TYPE === filter;
- });
- const categorizeData = this.categorizeData(arrayToFilter);
- this.showFormattedData = this.sortArray(categorizeData);
- // const sortData = this.sortArray(arrayToFilter);
- // this.showFormattedData = this.categorizeData(sortData);
+ let arrayToFilter;
+ arrayToFilter = this.newWorkListResponse.filter((workList) => {
+ return workList.ITEM_TYPE === filter;
+ });
+ const categorizeData = this.categorizeData(arrayToFilter);
+ this.showFormattedData = this.sortArray(categorizeData);
+ // const sortData = this.sortArray(arrayToFilter);
+ // this.showFormattedData = this.categorizeData(sortData);
}
}
@@ -393,11 +393,11 @@ export class HomeComponent implements OnInit {
let existsBefore = false;
let index = 0;
for (let i = 0; i < formattedData.length; i++) {
- if (formattedData[i].date === currentDate) {
- existsBefore = true;
- index = i;
- break;
- }
+ if (formattedData[i].date === currentDate) {
+ existsBefore = true;
+ index = i;
+ break;
+ }
}
return {
exists: existsBefore,
@@ -409,7 +409,7 @@ export class HomeComponent implements OnInit {
if (workList.ITEM_TYPE === 'HRSSA') {
this.totalHR = this.totalHR + 1;
} else if (workList.ITEM_TYPE === 'POAPPRV') {
- this.totalPO = this.totalPO + 1;
+ this.totalPO = this.totalPO + 1;
} else if (workList.ITEM_TYPE === 'REQAPPRV') {
this.totalPR = this.totalPR + 1;
} else if (workList.ITEM_TYPE === 'INVMOA') {
@@ -418,41 +418,41 @@ export class HomeComponent implements OnInit {
}
categorizeData(arrayToCategorize: any) {
- this.totalHR = 0;
- this.totalPO = 0;
- this.totalPR = 0;
- this.totalMR = 0;
-
- const datePipe = new DatePipe('en-US');
- const formattedData = [];
- for (const workList of arrayToCategorize) {
- this.addCountInFilters(workList);
- const currentDate = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y');
- const currentObject = {
- date: '',
- data: []
- };
- if (formattedData.length === 0) {
- currentObject.date = currentDate;
- currentObject.data.push(workList);
- formattedData.push(currentObject);
- } else {
- const existsBefore = this.checkDateExistance(currentDate, formattedData);
- if (existsBefore.exists) {
- formattedData[existsBefore.indexNumber].data.push(workList);
- } else {
- currentObject.date = currentDate;
- currentObject.data.push(workList);
- formattedData.push(currentObject);
- }
- }
+ this.totalHR = 0;
+ this.totalPO = 0;
+ this.totalPR = 0;
+ this.totalMR = 0;
+
+ const datePipe = new DatePipe('en-US');
+ const formattedData = [];
+ for (const workList of arrayToCategorize) {
+ this.addCountInFilters(workList);
+ const currentDate = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y');
+ const currentObject = {
+ date: '',
+ data: []
+ };
+ if (formattedData.length === 0) {
+ currentObject.date = currentDate;
+ currentObject.data.push(workList);
+ formattedData.push(currentObject);
+ } else {
+ const existsBefore = this.checkDateExistance(currentDate, formattedData);
+ if (existsBefore.exists) {
+ formattedData[existsBefore.indexNumber].data.push(workList);
+ } else {
+ currentObject.date = currentDate;
+ currentObject.data.push(workList);
+ formattedData.push(currentObject);
+ }
}
- return formattedData;
+ }
+ return formattedData;
}
sortArray(arrayToSort: any) {
return arrayToSort.sort((a: any, b: any) =>
- new Date(b.date).getTime() - new Date(a.date).getTime()
+ new Date(b.date).getTime() - new Date(a.date).getTime()
);
}
@@ -493,22 +493,23 @@ export class HomeComponent implements OnInit {
this.data.datasets[0].data[4] = this.ITGCount;
this.showChart = true;
// this.common.stopLoading();
- this.isLoading =false;
+ this.isLoading = false;
}
}
openNotificationDetail(obj) {
- this.common.sharedService.setSharedData(false, 'loadWorkList');
- this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA);
- if (obj.REQUEST_TYPE === 'PR') {
+ this.common.sharedService.setSharedData(this.selectedFilter, 'selectedFilter');
+ this.common.sharedService.setSharedData(false, 'loadWorkList');
+ this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA);
+ if (obj.REQUEST_TYPE === 'PR') {
this.common.openWorklistMainPRPage();
- } else if (obj.REQUEST_TYPE === 'PO') {
- this.common.openWorklistMainPOPage();
- } else if (obj.REQUEST_TYPE === 'MO') {
- this.common.openWorklistMainMRPage();
- } else {
- this.common.openWorklistMainPage();
- }
+ } else if (obj.REQUEST_TYPE === 'PO') {
+ this.common.openWorklistMainPOPage();
+ } else if (obj.REQUEST_TYPE === 'MO') {
+ this.common.openWorklistMainMRPage();
+ } else {
+ this.common.openWorklistMainPage();
+ }
}
resetData() {
@@ -562,9 +563,9 @@ export class HomeComponent implements OnInit {
Count() {
const datas = [];
const names = [];
- this.workListService.getITGCount('', '', this.isPostNoLoad)
+ this.workListService.getITGCount('', '', this.isPostNoLoad)
.subscribe((result: any) => {
- if(result.RequestType.length > 0){
+ if (result.RequestType.length > 0) {
this.ITGSegment[0] = {
name: 'All',
code: 'All',
@@ -576,7 +577,7 @@ export class HomeComponent implements OnInit {
this.setActive(this.ITGSegment[0].code);
}
console.log(result.RequestType);
- let count =1;
+ let count = 1;
for (let i = 0; i < result.RequestType.length; i++) {
console.log()
this.ITGSegment[count] = {
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 6a644cae..0f66b227 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
@@ -1,7 +1,7 @@
-
+
@@ -450,8 +450,19 @@
+
+
+
+
+
+
+ {{'worklistMain, Tran_Succ' | translate}}
+
+
+
+
-