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,12 +127,12 @@ 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;
let msg: string = ''; let msg: string = '';
// msg = this.translate.translate("addAttach.errorMsg"); // msg = this.translate.translate("addAttach.errorMsg");
//this.common.showAlert(msg); //this.common.showAlert(msg);
} }
} }
@ -168,11 +169,12 @@ export class AbsenceConfirmComponent implements OnInit {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.isSubmitBtnClicked = true; this.isSubmitBtnClicked = true;
//if(this.isResubmitAbs==false){ //if(this.isResubmitAbs==false){
// let msg: string = this.ts.trPK('general', 'messageSuccess'); // let msg: string = this.ts.trPK('general', 'messageSuccess');
// this.common.presentAlert(msg); // this.common.presentAlert(msg);
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,61 +206,61 @@ 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
}); });
modal.onDidDismiss() modal.onDidDismiss()
.then((data) => { .then((data) => {
if (data == 'cancel' || data == 'undefined') { if (data == 'cancel' || data == 'undefined') {
return; return;
} else {
if (!str) {
this.updateFile(data, attachDocID);
} else { } else {
this.attachListDisplay = data.data; if (!str) {
this.attachItems = this.attachListDisplay.map(function (el) { this.updateFile(data, attachDocID);
var o = Object.assign({}, el); } else {
o.isSuccess = false; this.attachListDisplay = data.data;
return o; this.attachItems = this.attachListDisplay.map(function (el) {
}); var o = Object.assign({}, el);
this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems; o.isSuccess = false;
return o;
});
this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
}
} }
} });
});
return await modal.present(); return await modal.present();
} }
/*****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,
backdropDismiss: false, backdropDismiss: false,
}); });
modal.cssClass = 'note-modal'; modal.cssClass = 'note-modal';
modal.onDidDismiss() modal.onDidDismiss()
.then((data) => { .then((data) => {
console.log(data.data); console.log(data.data);
if (data.data == 'cancel' || data.data == undefined) { if (data.data == 'cancel' || data.data == undefined) {
return; return;
} else { } else {
this.startAbApproval(); this.startAbApproval();
} }
}); });
return await modal.present(); return await modal.present();
} }
@ -300,7 +302,7 @@ async openSubmitModal() {
} // valid it } // valid it
} }
async OpenAttachFiles(value, Type) { async OpenAttachFiles(value, Type) {
this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage'); this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage');
const modal = await this.modalCtrl.create({ const modal = await this.modalCtrl.create({
component: WorkListAttachViewComponent component: WorkListAttachViewComponent
@ -367,9 +369,9 @@ async openSubmitModal() {
/*******************Add attchement Functions*************/ /*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({ public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'], allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024, maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true, formatDataFunctionIsAsync: true,
@ -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('.');
@ -438,11 +440,11 @@ async openSubmitModal() {
this.attachListOver.push( this.attachListOver.push(
{ {
AttachmentID: this.attachListOver.length, AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1], P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1], P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0], P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID P_TRANSACTION_ID: this.P_TransactionID
}) })
} catch (e) { } catch (e) {

@ -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,8 +501,8 @@ 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') {
this.actionService(1, this.commentText); this.actionService(1, this.commentText);
@ -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',
@ -39,7 +40,7 @@ export class WorkListRfcComponent implements OnInit {
public ts: TranslatorService, public ts: TranslatorService,
public workListMainService: WorklistMainService, public workListMainService: WorklistMainService,
public modalCtrl: ModalController public modalCtrl: ModalController
) { ) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo'); this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr'); this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
@ -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',
@ -98,7 +99,7 @@ export class ConfirmBasicDetailsComponent implements OnInit {
P_PAGE_LIMIT: 1000 P_PAGE_LIMIT: 1000
} }
this.eitService.getApproversList(body).subscribe((result: any) => { this.eitService.getApproversList(body).subscribe((result: any) => {
this.handleApproversResult(result); this.handleApproversResult(result);
}); });
} }
@ -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();
} }
} }
@ -302,7 +304,7 @@ export class ConfirmBasicDetailsComponent implements OnInit {
modal.onDidDismiss() modal.onDidDismiss()
.then((data) => { .then((data) => {
}); });
return await modal.present(); return await modal.present();
} }

@ -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