|
|
|
@ -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('.');
|
|
|
|
|