worklist count

enad-pre-live
Sultan Khan 4 years ago
parent fe341aaca6
commit 1e83686fad

@ -15,13 +15,14 @@ import { AbsenceAttachmentComponent } from '../absence-attachment/absence-attach
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { FileUploader } from 'ng2-file-upload'; import { FileUploader } from 'ng2-file-upload';
import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component'; import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component';
import { HomeComponent } from "src/app/notification/home/home.component";
@Component({ @Component({
selector: 'app-absence-confirm', selector: 'app-absence-confirm',
templateUrl: './absence-confirm.component.html', templateUrl: './absence-confirm.component.html',
styleUrls: ['./absence-confirm.component.scss'] styleUrls: ['./absence-confirm.component.scss']
}) })
export class AbsenceConfirmComponent implements OnInit { export class AbsenceConfirmComponent implements OnInit {
direction:string; direction: string;
P_TransactionID: number; P_TransactionID: number;
approversList = []; approversList = [];
selEmp: string = ''; selEmp: string = '';
@ -58,7 +59,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.P_TransactionID = this.common.sharedService.getSharedData( this.P_TransactionID = this.common.sharedService.getSharedData(
AbsenceResponse.SHARED_DATA AbsenceResponse.SHARED_DATA
); );
this.getPassNotificationDetails =this.common.sharedService.getSharedData( this.getPassNotificationDetails = this.common.sharedService.getSharedData(
AbsenceNotificatonBodyResponse.NOT_WORKLIST, AbsenceNotificatonBodyResponse.NOT_WORKLIST,
true true
); );
@ -89,7 +90,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.getApproversList(); this.getApproversList();
} }
ngOnInit() {} ngOnInit() { }
startAbApproval() { startAbApproval() {
if (this.attachListOver) { if (this.attachListOver) {
//first call add attach inside success call submit //first call add attach inside success call submit
@ -126,7 +127,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.startAbsApprovalProcess(); this.startAbsApprovalProcess();
} else { } else {
//stope //stope
let filtered = this.attachListOver.filter(function(el) { let filtered = this.attachListOver.filter(function (el) {
return el.isSuccess == true; return el.isSuccess == true;
}); });
this.attachListOver = filtered; this.attachListOver = filtered;
@ -173,6 +174,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.common.greenToastPK("eit", "approval-message-success") this.common.greenToastPK("eit", "approval-message-success")
// } // }
// this.navCtrl.popToRoot(); // this.navCtrl.popToRoot();
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage(); this.common.openNotificationPage();
} }
} }
@ -204,7 +206,7 @@ export class AbsenceConfirmComponent implements OnInit {
// }); // });
const modal = await this.modalCtrl.create({ const modal = await this.modalCtrl.create({
component: AbsenceAttachmentComponent, component: AbsenceAttachmentComponent,
componentProps:{ indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID}, componentProps: { indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID },
keyboardClose: true, keyboardClose: true,
animated: false animated: false
}); });
@ -231,9 +233,9 @@ export class AbsenceConfirmComponent implements OnInit {
} }
/*****submit modal********/ /*****submit modal********/
async openSubmitModal() { async openSubmitModal() {
this.common.sharedService.setSharedData( this.attachListOver, 'submitAbsAttachmentList'); this.common.sharedService.setSharedData(this.attachListOver, 'submitAbsAttachmentList');
this.common.sharedService.setSharedData(this.absComments, 'absComments'); this.common.sharedService.setSharedData(this.absComments, 'absComments');
const modal = await this.modalCtrl.create({ const modal = await this.modalCtrl.create({
component: SubmitAbsenceModalComponent, component: SubmitAbsenceModalComponent,
@ -258,7 +260,7 @@ async openSubmitModal() {
} }
@ -386,7 +388,7 @@ async openSubmitModal() {
}); });
onFileSelectedclick(event){ onFileSelectedclick(event) {
event.target.value = ''; event.target.value = '';
} }
@ -430,7 +432,7 @@ async openSubmitModal() {
pushObject(fileData, name, type) { pushObject(fileData, name, type) {
console.log('before push: '+ this.index); console.log('before push: ' + this.index);
//this.attachListOver.length++; //this.attachListOver.length++;
try { try {
let array = name.split('.'); let array = name.split('.');

@ -27,8 +27,8 @@ export class ConnectorService {
public static retryTimes = 0; public static retryTimes = 0;
public static timeOut = 180 * 1000; public static timeOut = 180 * 1000;
// public static host = 'https://uat.hmgwebservices.com/'; public static host = 'https://uat.hmgwebservices.com/';
public static host = 'https://hmgwebservices.com/'; //public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient, constructor(public httpClient: HttpClient,
public cs: CommonService, public cs: CommonService,

@ -702,7 +702,6 @@ export class HomeComponent implements OnInit {
openNotificationsDashboard() { openNotificationsDashboard() {
this.common.startLoading(); this.common.startLoading();
this.resetFiltersUI();
this.totalRequestCount = 0; this.totalRequestCount = 0;
this.DS.getOpenNotifications('', '', false).subscribe((result: GetOpenNotificationsResponse) => { this.DS.getOpenNotifications('', '', false).subscribe((result: GetOpenNotificationsResponse) => {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
@ -715,9 +714,7 @@ export class HomeComponent implements OnInit {
); );
this.common.setFilterValues(result['GetOpenNotificationsList']); this.common.setFilterValues(result['GetOpenNotificationsList']);
const values = this.common.getFiltersData();
this.data = values.data;
this.filters = values.filters;
} }
}); });
@ -726,6 +723,9 @@ export class HomeComponent implements OnInit {
this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => { this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS); this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
this.common.filterKeys['ITG'] = result.TotalCount; this.common.filterKeys['ITG'] = result.TotalCount;
const values = this.common.getFiltersData();
this.data = values.data;
this.filters = values.filters;
this.totalRequestCount = Math.floor(count + result.TotalCount); this.totalRequestCount = Math.floor(count + result.TotalCount);
this.common.sharedService.setSharedData(this.totalRequestCount, 'total-count'); this.common.sharedService.setSharedData(this.totalRequestCount, 'total-count');
this.getCOCNotificationCount(); this.getCOCNotificationCount();

@ -218,6 +218,7 @@ export class WorkListMainItgComponent implements OnInit {
} }
} else if (this.index === this.all_request_names.length) { // if its the end request redirecte to worklist home } else if (this.index === this.all_request_names.length) { // if its the end request redirecte to worklist home
this.common.sharedService.setSharedData(true, 'loadWorkList'); this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage(); this.common.openNotificationPage();
return false; return false;
} }
@ -233,6 +234,7 @@ export class WorkListMainItgComponent implements OnInit {
return; return;
} else { } else {
this.common.sharedService.setSharedData(true, 'loadWorkList'); this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage(); this.common.openNotificationPage();
return; return;
} }
@ -240,6 +242,7 @@ export class WorkListMainItgComponent implements OnInit {
} }
} }
this.common.sharedService.setSharedData(true, 'loadWorkList'); this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage(); this.common.openNotificationPage();
return; return;
} }
@ -498,7 +501,7 @@ export class WorkListMainItgComponent implements OnInit {
} }
if (this.actionSelected === 'Delegate') { if (this.actionSelected === 'Delegate') {
this.common.sharedService.setSharedData(info, 'selectedEmpInfo'), this.common.sharedService.setSharedData(info, 'selectedEmpInfo'),
this.common.sharedService.setSharedData('Delegate','pressedBtn') this.common.sharedService.setSharedData('Delegate', 'pressedBtn')
this.presentModal(4); this.presentModal(4);
} }
if (this.actionSelected === 'Doable') { if (this.actionSelected === 'Doable') {
@ -517,7 +520,7 @@ export class WorkListMainItgComponent implements OnInit {
this.actionService(2, this.commentText); this.actionService(2, this.commentText);
} }
if (this.actionSelected === 'RequestInformation') { if (this.actionSelected === 'RequestInformation') {
this.common.sharedService.setSharedData('RequestInformation','pressedBtn') this.common.sharedService.setSharedData('RequestInformation', 'pressedBtn')
this.presentModal(3); this.presentModal(3);
} }
if (this.actionSelected === 'ReportGenerated') { if (this.actionSelected === 'ReportGenerated') {

@ -7,6 +7,7 @@ import { WorklistService } from '../service/worklist.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ModalController } from '@ionic/angular'; import { ModalController } from '@ionic/angular';
import { HomeComponent } from '../home/home.component';
@Component({ @Component({
selector: 'app-work-list-rfc', selector: 'app-work-list-rfc',
@ -138,6 +139,7 @@ export class WorkListRfcComponent implements OnInit {
}); });
}, 5000); }, 5000);
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage(); this.cs.openNotificationPage();
} }
@ -178,18 +180,18 @@ export class WorkListRfcComponent implements OnInit {
this.modalCtrl.dismiss(); this.modalCtrl.dismiss();
} }
select(selectEmp,index){ select(selectEmp, index) {
console.log(selectEmp.USER_NAME); console.log(selectEmp.USER_NAME);
console.log(selectEmp.SEQ); console.log(selectEmp.SEQ);
this.radioButtonValue=selectEmp.USER_NAME this.radioButtonValue = selectEmp.USER_NAME
this.seqNo = selectEmp.SEQ; this.seqNo = selectEmp.SEQ;
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// let emp: any = this.RFCEmployeeListListRes[v]; // let emp: any = this.RFCEmployeeListListRes[v];
// this.seqNo = emp.SEQ; // this.seqNo = emp.SEQ;
// this.radioButtonValue = emp.USER_NAME; // this.radioButtonValue = emp.USER_NAME;
this.active=index; this.active = index;
} }
} }

@ -15,6 +15,7 @@ import { WorkListButtonRequest } from 'src/app/notification/models/NotificationB
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { ProfileService } from '../service/profile.service'; import { ProfileService } from '../service/profile.service';
import { SubmitAddressModalComponent } from '../submit-eit-modal/submit-address-modal.component'; import { SubmitAddressModalComponent } from '../submit-eit-modal/submit-address-modal.component';
import { HomeComponent } from 'src/app/notification/home/home.component';
@Component({ @Component({
selector: 'app-confirm-basic-details', selector: 'app-confirm-basic-details',
@ -193,7 +194,8 @@ export class ConfirmBasicDetailsComponent implements OnInit {
this.isSubmitBtnClicked = true; this.isSubmitBtnClicked = true;
// let msg: string = this.ts.trPK("eit", "approval-message-success"); // let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg); // this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success") this.cs.greenToastPK("eit", "approval-message-success");
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage(); this.cs.openNotificationPage();
} }
} }

@ -15,6 +15,7 @@ import { WorkListButtonRequest } from 'src/app/notification/models/NotificationB
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { ProfileService } from '../service/profile.service'; import { ProfileService } from '../service/profile.service';
import { SubmitAddressModalComponent } from '../submit-eit-modal/submit-address-modal.component'; import { SubmitAddressModalComponent } from '../submit-eit-modal/submit-address-modal.component';
import { HomeComponent } from 'src/app/notification/home/home.component';
@Component({ @Component({
@ -194,7 +195,8 @@ export class ConfirmContactComponent implements OnInit {
this.isSubmitBtnClicked = true; this.isSubmitBtnClicked = true;
// let msg: string = this.ts.trPK("eit", "approval-message-success"); // let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg); // this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success") this.cs.greenToastPK("eit", "approval-message-success");
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage(); this.cs.openNotificationPage();
} }
} }

@ -7,6 +7,7 @@ import { EitService } from 'src/app/eit/services/eit.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { HomeComponent } from 'src/app/notification/home/home.component';
import { WorkListButtonRequest } from 'src/app/notification/models/NotificationButtonReq'; import { WorkListButtonRequest } from 'src/app/notification/models/NotificationButtonReq';
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { BasicRequest } from 'src/app/profile/models/basic.request'; import { BasicRequest } from 'src/app/profile/models/basic.request';
@ -188,7 +189,8 @@ export class ConfirmTerminationComponent implements OnInit {
this.isSubmitBtnClicked = true; this.isSubmitBtnClicked = true;
// let msg: string = this.ts.trPK("eit", "approval-message-success"); // let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg); // this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success") this.cs.greenToastPK("eit", "approval-message-success");
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage(); this.cs.openNotificationPage();
} }
} }

Loading…
Cancel
Save