diff --git a/Mohem/src/app/absence/absence-attachment/absence-attachment.component.html b/Mohem/src/app/absence/absence-attachment/absence-attachment.component.html new file mode 100644 index 00000000..ac5ff227 --- /dev/null +++ b/Mohem/src/app/absence/absence-attachment/absence-attachment.component.html @@ -0,0 +1,51 @@ + + + + {{ts.trPK('addAttach','title')}} + + + + + + + + + +
{{ts.trPK('addAttach','title')}}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ {{ts.trPK('general','ok')}} +
+
\ No newline at end of file diff --git a/Mohem/src/app/absence/absence-attachment/absence-attachment.component.scss b/Mohem/src/app/absence/absence-attachment/absence-attachment.component.scss new file mode 100644 index 00000000..f8da0c30 --- /dev/null +++ b/Mohem/src/app/absence/absence-attachment/absence-attachment.component.scss @@ -0,0 +1,103 @@ +.col { + //border: #dedede solid 1px; + padding: 2px !important; + text-align: center; + font-size: 15px; + +} + +.item-md.item-block .item-inner, +.item-ios.item-block .item-inner { + padding: 0px !important; +} +.iconButton .imgSize{ +width:22px !important; +} +.itemAH { + padding: 0px !important; + font-size: 13px; + +} + +.gridAH { + text-align: center; + padding: 5px 5px !important; + border-radius: 5px; +} + +.rowAH { + white-space: normal; + + .col { + border: 1px solid var(--cusgray); + + label { + font-size: 14px; + } + } +} + +.Header { + font-weight: bold; + color: var(--customnavy); + font-size: 14px; + +} + +.titleH { + font-size: 15px; + border: 1px solid var(--cusgray); + border-top-right-radius: 5px; + border-top-left-radius: 5px; + border-bottom: 0px; + + .col { + border: 0px; + } +} + +ion-label.label.label-md, +ion-label.label.label-ios { + margin: 0px; +} + +.fileDiv .inputfile { + width: 0.1px; + height: 0.1px; + opacity: 0; + overflow: hidden; + position: absolute; + width: 40px; + height: 40px; + top: 0; + z-index: 100; + // z-index: -1; +} + +.inputfile+label { + display: inline-block; + color: var(--light); +} + +.fileDiv { + padding: 10px; + position: absolute; + right:0; + top:0; + :root[dir="ltr"] { + float: right; + } + + :root[dir="rtl"] { + float: left; + } +} + +ion-icon{ + font-size: 28px; +} + +button.iconButton.button.button-ios.button-default.button-default-ios, +button.iconButton.button.button-md.button-default.button-default-md { + padding: 0px; +} \ No newline at end of file diff --git a/Mohem/src/app/absence/absence-attachment/absence-attachment.component.spec.ts b/Mohem/src/app/absence/absence-attachment/absence-attachment.component.spec.ts new file mode 100644 index 00000000..659db874 --- /dev/null +++ b/Mohem/src/app/absence/absence-attachment/absence-attachment.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AbsenceAttachmentComponent } from './absence-attachment.component'; + +describe('AbsenceAttachmentComponent', () => { + let component: AbsenceAttachmentComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AbsenceAttachmentComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AbsenceAttachmentComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/absence/absence-attachment/absence-attachment.component.ts b/Mohem/src/app/absence/absence-attachment/absence-attachment.component.ts new file mode 100644 index 00000000..3601bbd9 --- /dev/null +++ b/Mohem/src/app/absence/absence-attachment/absence-attachment.component.ts @@ -0,0 +1,168 @@ +import { Component, EventEmitter, OnInit } from "@angular/core"; +import { CommonService } from "src/app/hmg-common/services/common/common.service"; +import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; +import { FileUploader } from "ng2-file-upload"; +import { AddAttachService } from "../service/add-attach-service"; +import { AddEitResponse } from "src/app/eit/models/add.eit.response"; +import { ModalController } from '@ionic/angular'; + +/** + * Generated class for the AddAttachPage page. + * + * See https://ionicframework.com/docs/components/#navigation for more info on + * Ionic pages and navigation. + */ + +@Component({ + selector: "absence-attachment", + templateUrl: "absence-attachment.component.html", + styleUrls: ["./absence-attachment.component.scss"] +}) +export class AbsenceAttachmentComponent implements OnInit { + private eitResponse: any; //AddEitResponse=new AddEitResponse(); + isUpload: boolean = false; + inQueue: boolean = false; + addAttachmentListReq: any; + attachmentID: number = 0; + addAttachRequest: any = []; + fileData: any; + fileType: any; + index: any = 1; + dirPage: any; + TransactionID: any; + indexLastObj: any; + filterAllowedType: any = [ + "application/pdf", + "image/jpeg", + "image/png", + "text/plain", + "image/jpg", + "application/vnd.ms-excel", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + ]; + + constructor( + public common: CommonService, + public AddAttachService: AddAttachService, + public modalCtrl: ModalController, + public ts: TranslatorService + ) { + this.eitResponse = this.common.sharedService.getSharedData( + AddEitResponse.SHARED_DATA, + true + ); + // this.TransactionID = this.navParams.get("TransactionID"); + // this.indexLastObj = this.navParams.get("indexLastObj"); + + // console.log("this.TransactionID : "+ this.TransactionID); + this.isUpload = false; + } + + + 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" + ], + maxFileSize: 10 * 1024 * 1024, + formatDataFunctionIsAsync: true, + formatDataFunction: async item => { + return new Promise((resolve, reject) => { + resolve({ + name: item._file.name, + length: item._file.size, + contentType: item._file.type, + date: new Date() + }); + }); + } + }); + + public hasBaseDropZoneOver: boolean = false; + public hasAnotherDropZoneOver: boolean = false; + ngOnInit() {} + public fileOverBase(e: any): void { + this.hasBaseDropZoneOver = e; + } + + public fileOverAnother(e: any): void { + this.hasAnotherDropZoneOver = e; + } + + OkBtnModal() { + let fileCount: number = this.uploader.queue.length; + if (fileCount > 0) { + let data: any = this.addAttachRequest; + this.modalCtrl.dismiss(data); + + } + else { + let msg: string = ""; + msg = this.ts.trPK("general", "noFileSelect"); + this.common.presentAlert(msg); + return; + } + } // end ok button + + closeBtnModal() { + // this.viewCtrl.dismiss("cancel"); + } + + onFileSelected(input) { + if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { + let msg: string = ""; + msg = this.ts.trPK("general", "noFileSelect"); + this.common.presentAlert(msg); + return; + } // todo: show alert that you tried uploading wrong files + else { + const file = input.target.files[0]; + + // console.log(file); + + this.getBase64(file).then(data => + this.pushObject(data, file.name, file.type) + ); + } + } + + getBase64(file) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); + } + + pushObject(fileData, name, type) { + // console.log("before push: "+ this.index); + this.indexLastObj++; + try { + let array = name.split("."); + let attachType: string = array[array.length - 1]; + + this.addAttachRequest.push({ + AttachmentID: this.indexLastObj, + P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1], + P_FILE_DATA: fileData.split(",")[1], + P_FILE_NAME: name, //.split('.')[0], + P_TRANSACTION_ID: this.TransactionID + }); + } catch (e) {} + } + + removeFile(objectitem) { + let objIndex1 = this.uploader.queue.findIndex(item => item == objectitem); + this.uploader.queue.splice(objIndex1, 1); + let objIndex = this.addAttachRequest.findIndex( + item => item.AttachmentID == objectitem.AttachmentID + ); + this.addAttachRequest.splice(objIndex, 1); + } +} diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html new file mode 100644 index 00000000..30597134 --- /dev/null +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html @@ -0,0 +1,136 @@ + + + + {{ts.trPK('submitAbsenceConfirm','submitAbsenceConfirm')}} + + + + + + + + + + + +
{{ts.trPK('confirmAddEit','approverList')}}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + {{ts.trPK('confirmAddEit','comment')}} + + + + +
+ + + +
{{ts.trPK('absenceList','attachList')}}
+ + + +
+ + +
+ + +
+
+ + {{attachList.P_FILE_NAME }} + +
+ + + + +
+
+ +
+ +
+ + +
+
+ + {{attachRes.FILE_NAME }} + +
+ + + + + +
+
+ +
+
+
+ +
+ +
+ +
+ {{ts.trPK('confirmAddEit','start')}} +
+ +
\ No newline at end of file diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss new file mode 100644 index 00000000..b4dba631 --- /dev/null +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss @@ -0,0 +1,31 @@ +.imgSize{ + position: absolute; + right: 15px; + top: 0; + bottom: 0; + margin: auto; + height:20px; + width:20px; +} +.rowAH ion-col { + border: 1px solid #d9d9d9; + font-size: 13px; +} +.titleH { + font-size: 13px; + border: 1px solid #d9d9d9; + border-top-right-radius: 5px; + border-top-left-radius: 5px; + border-bottom: 0px; +} +.gridAH { + text-align: center; + padding: 5px 5px !important; + border-radius: 5px; +} +ion-card-content.confirm-details{ + padding: 0; +} +.confirm-details label{ + font-size: 13px; +} \ No newline at end of file diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.spec.ts b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.spec.ts new file mode 100644 index 00000000..53af4ff6 --- /dev/null +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AbsenceConfirmComponent } from './absence-confirm.component'; + +describe('AbsenceConfirmComponent', () => { + let component: AbsenceConfirmComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AbsenceConfirmComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AbsenceConfirmComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts new file mode 100644 index 00000000..06b73416 --- /dev/null +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts @@ -0,0 +1,327 @@ +import { Component, OnInit } from "@angular/core"; +import { CommonService } from "src/app/hmg-common/services/common/common.service"; +import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; +import { ApproversList } from '../models/approvers'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { WorkListButtonRequest } from 'src/app/eit/models/NotificationButtonReq'; +import { ModalController } from '@ionic/angular'; +import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes'; +import { AbsenceResponse } from '../models/absence.response'; +import { SubmitAbConfirmService } from '../service/submit-absence-confirm.service'; +import { WorklistAttachService } from '../service/work-list-attach.service'; +import { ConfirmAddEitService } from '../service/confirm-add-eit-service'; +import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes'; +import { AbsenceAttachmentComponent } from '../absence-attachment/absence-attachment.component'; +import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; + +@Component({ + selector: "app-absence-confirm", + templateUrl: "./absence-confirm.component.html", + styleUrls: ["./absence-confirm.component.scss"] +}) +export class AbsenceConfirmComponent implements OnInit { + P_TransactionID: number; + approversList: ApproversList; + selEmp: string = ""; + respID: number; + absComments: string = ""; + selMenu: MenuResponse; + attachItems: any; + attachListDisplay: any; + isTrue: any = 0; + getPassNotificationDetails: any; + menuType: string = ""; + attachmentRes: any; + objIndex1: any; + attachListOver: any = []; + index: any = 0; + attachReqObj: WorkListButtonRequest = new WorkListButtonRequest(); + private isResubmitAbs: boolean = false; + private isSubmitBtnClicked: boolean; + constructor( + public common: CommonService, + public ts: TranslatorService, + public modalCtrl: ModalController, + public ConfirmAddEitService: ConfirmAddEitService, + public submitConService: SubmitAbConfirmService, + public WorklistAttachService: WorklistAttachService + ) { + this.isSubmitBtnClicked = false; + + // this.isResubmitAbs = this.navParams.get("isResubmit"); + if (this.isResubmitAbs) { + this.P_TransactionID = this.common.sharedService.getSharedData( + AbsenceResponse.SHARED_DATA + ); + this.getPassNotificationDetails =this.common.sharedService.getSharedData( + AbsenceNotificatonBodyResponse.NOT_WORKLIST, + true + ); + this.selEmp = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER; + this.menuType = "E"; + this.respID = -999; + // this.getApproversList(); + // console.log("this.getPassNotificationDetails.P_NOTIFICATION_ID :"+this.getPassNotificationDetails.NOTIFICATION_ID); + this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + } else { + this.selMenu = this.common.sharedService.getSharedData( + MenuResponse.SHARED_DATA, + true + ); + this.selEmp = this.common.sharedService.getSharedData( + MenuResponse.SHARED_SEL_EMP, + true + ); + this.respID = this.common.sharedService.getSharedData( + MenuResponse.SHARED_SEL_RESP_ID, + true + ); + this.P_TransactionID = this.common.sharedService.getSharedData( + AbsenceResponse.SHARED_DATA + ); + this.menuType = this.selMenu.List_Menu.MENU_TYPE; + } + this.getApproversList(); + } + + ngOnInit() {} + startAbApproval() { + if (this.attachListOver) { + //first call add attach inside success call submit + let request = { + AddAttachmentList: this.attachListOver + }; + this.ConfirmAddEitService.addAttachment(request).subscribe( + (result: any) => { + this.handleAddAttachmentResults(result); + } + ); + } else { + this.startAbsApprovalProcess(); + } + } //end + + handleAddAttachmentResults(result) { + if (this.common.validResponse(result)) { + //this.isUpload=true; + this.isTrue = 0; + for (let i = 0; i < result.AddAttSuccessList.length; i++) { + if (!result.AddAttSuccessList[i].AddSuccess) { + this.attachListOver[i].isSuccess = false; + // if false display cancel button with waring icon or design + } // end if + else { + // if true remove cancel and set isSuccess = true + this.attachListOver[i].isSuccess = true; + this.isTrue = this.isTrue + 1; //count flag of attach status + } // end else + } // end for + + if (this.isTrue == result.AddAttSuccessList.length) { + this.startAbsApprovalProcess(); + } else { + //stope + let filtered = this.attachListOver.filter(function(el) { + return el.isSuccess == true; + }); + this.attachListOver = filtered; + let msg: string = ""; + // msg = this.translate.translate("addAttach.errorMsg"); + //this.common.showAlert(msg); + } + } + } + + startAbsApprovalProcess() { + let request: any = {}; + request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp; + request.P_MENU_TYPE = this.menuType; + request.P_SELECTED_RESP_ID = this.respID; + request.P_TRANSACTION_ID = this.P_TransactionID; + request.P_COMMENTS = this.absComments; + this.submitConService + .startAbApprovalProcess(request) + .subscribe((result: any) => { + this.handleResults(result); + }); + } + cancelAbProcess() { + let body: any = { + P_TRANSACTION_ID: this.P_TransactionID + }; + this.submitConService.cancelHRTransaction(body).subscribe((result: any) => { + this.handleCancelResults(result); + }); + } + handleCancelResults(result) { + if (this.common.validResponse(result)) { + this.isSubmitBtnClicked = false; + // this.navCtrl.popToRoot(); + } + } + handleResults(result) { + if (this.common.validResponse(result)) { + this.isSubmitBtnClicked = true; + //if(this.isResubmitAbs==false){ + let msg: string = this.ts.trPK("general", "messageSuccess"); + this.common.presentAlert(msg); + + // } + // this.navCtrl.popToRoot(); + this.common.openNotificationPage(); + } + } + + getApproversList() { + let body: any = { + P_TRANSACTION_ID: this.P_TransactionID, + P_AME_TRANSACTION_TYPE: "SSHRMS", + P_PAGE_NUM: 1, + P_PAGE_LIMIT: 1000 + }; + this.submitConService.getApproversList(body).subscribe((result: any) => { + this.handleApproversResult(result); + }); + } + + handleApproversResult(result) { + if (this.common.validResponse(result)) { + this.approversList = result.GetApprovesList; + } + } + + async addAttachment(str: boolean, attachItems: any) { + let attachDocID = attachItems.ATTACHED_DOCUMENT_ID; + // var modalPage = this.modalCtrl.create("AddAttachPage", { + // indexLastObj: this.attachListOver.length, + // TransactionID: this.P_TransactionID, + // enableBackdropDismiss: false + // }); + const modal = await this.modalCtrl.create({ + component: AbsenceAttachmentComponent, + componentProps:{ indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID}, + keyboardClose: true, + animated: false + }); + modal.onDidDismiss() + .then((data) => { + if (data == "cancel" || data == "undefined") { + return; + } else { + if (!str) { + this.updateFile(data, attachDocID); + } else { + this.attachListDisplay = data.data; + this.attachItems = this.attachListDisplay.map(function (el) { + var o = Object.assign({}, el); + o.isSuccess = false; + return o; + }); + this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems; + } + } + }); + return await modal.present(); + + } + + removeFile(objectitem) { + + if (this.attachListOver) { + let index2 = this.attachListOver.findIndex(item => item == objectitem); + if (index2 > -1) { + this.attachListOver.splice(index2, 1); + } + } + if (this.attachmentRes) { + let index3 = this.attachmentRes.findIndex(item => item == objectitem); + if (index3 > -1) { + this.attachmentRes.splice(index3, 1); + } + } + } + + getAttachment(NotificationID) { + this.attachReqObj.P_NOTIFICATION_ID = NotificationID; + + this.WorklistAttachService.getAttach(this.attachReqObj).subscribe( + (result: NotificationGetAttachResponse) => { + this.handleWorkListAttachResult(result); + } + ); + } + + handleWorkListAttachResult(result) { + if (this.common.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (result.GetAttachementList != null) { + this.attachmentRes = result.GetAttachementList; + } // if result == null + } // valid it + } + + async OpenAttachFiles(value, Type) { + this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage'); + const modal = await this.modalCtrl.create({ + component: WorkListAttachViewComponent + }); + + modal.onDidDismiss() + .then((data) => { + }); + + return await modal.present(); + } + + updateFile(attachList, attachDocID) { + + let req = { + P_ATTACHED_DOCUMENT_ID: attachDocID, + P_FILE_DATA: attachList[0].P_FILE_DATA, + P_FILE_NAME: attachList[0].P_FILE_NAME, + P_FILE_CONTENT_TYPE: attachList[0].P_FILE_CONTENT_TYPE + }; + this.submitConService.updateAttach(req).subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.MessageStatus == 1) { + let msg: string = ""; + // msg = this.translate.translate("addAttach.attachUpdate"); + // this.common.showAlert(msg); + + this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + } + } // val + }); + } + + delelteFile(attach) { + // let alert = this.common.showConfirmMsg( + // this.translate.translate("general.deletePerm") + // ); + // alert.onDidDismiss(data => { + // if (data == true) { + // this.continueDelete(attach); + // } + // }); + } + continueDelete(attach) { + + let req = { + P_ATTACHED_DOCUMENT_ID: attach.ATTACHED_DOCUMENT_ID + }; + this.submitConService.delteAttach(req).subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.DeleteAttachmentList.P_RETURN_STATUS === "S") { + this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + // let msg: string = ""; + // msg = this.translate.translate("addAttach.deleteAttach"); + // this.common.showAlert(msg); + } + } + }); + } + ionViewWillLeave() { + if (this.P_TransactionID && this.isSubmitBtnClicked == false) + this.cancelAbProcess(); + } +} diff --git a/Mohem/src/app/absence/absence.module.ts b/Mohem/src/app/absence/absence.module.ts index b4e10326..2a2c609b 100644 --- a/Mohem/src/app/absence/absence.module.ts +++ b/Mohem/src/app/absence/absence.module.ts @@ -1,26 +1,57 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { Routes, RouterModule } from '@angular/router'; +import { NgModule } from "@angular/core"; +import { CommonModule } from "@angular/common"; +import { FormsModule } from "@angular/forms"; +import { Routes, RouterModule } from "@angular/router"; import { AbsenceListService } from "./service/service.service"; -import { IonicModule } from '@ionic/angular'; -import { SubmitAbsenceService } from './service/submit.absence.service'; -import { AbsencePage } from './absence.page'; -import { DatePicker } from '@ionic-native/date-picker/ngx'; -import { HomeComponent } from './home/home.component'; -import { SubmitAbsenceComponent } from './submit-absence/submit-absence.component'; +import { IonicModule } from "@ionic/angular"; +import { SubmitAbsenceService } from "./service/submit.absence.service"; +import { AbsencePage } from "./absence.page"; +import { DatePicker } from "@ionic-native/date-picker/ngx"; +import { HomeComponent } from "./home/home.component"; +import { SubmitAbsenceComponent } from "./submit-absence/submit-absence.component"; +import { replacmentListService } from "./service/replacement-list.service"; +import { HmgCommonModule } from "./../hmg-common/hmg-common.module"; +import { ReplacementListComponent } from "../vacation-rule/replacement-list/replacement-list.component"; +import { AbsenceConfirmComponent } from "./absence-confirm/absence-confirm.component"; +import { ConfirmAddEitService } from "./service/confirm-add-eit-service"; +import { SubmitAbConfirmService } from "./service/submit-absence-confirm.service"; +import { WorklistAttachService } from "./service/work-list-attach.service"; +import { AbsenceAttachmentComponent } from "./absence-attachment/absence-attachment.component"; +import { AddAttachService } from "./service/add-attach-service"; +import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component"; +import { ViewAttachmentsComponent } from './view-attachments/view-attachments.component'; const routes: Routes = [ { - path: '', + path: "", component: AbsencePage, children: [ { - path: 'home', + path: "home", component: HomeComponent }, { - path: 'submit-absence', + path: "submit-absence", component: SubmitAbsenceComponent + }, + { + path: "replacement-list", + component: ReplacementListComponent + }, + { + path: "confirm-absence", + component: AbsenceConfirmComponent + }, + { + path: "absence-attachment", + component: AbsenceAttachmentComponent + }, + { + path: "worklist-attachment", + component: WorkListAttachViewComponent + }, + { + path:'view-attachements', + component:ViewAttachmentsComponent } ] } @@ -31,9 +62,26 @@ const routes: Routes = [ CommonModule, FormsModule, IonicModule, + HmgCommonModule, RouterModule.forChild(routes) ], - providers:[AbsenceListService, SubmitAbsenceService, DatePicker], - declarations: [AbsencePage, HomeComponent, SubmitAbsenceComponent] + providers: [ + AbsenceListService, + SubmitAbsenceService, + replacmentListService, + WorklistAttachService, + SubmitAbConfirmService, + DatePicker, + ConfirmAddEitService, + AddAttachService + ], + declarations: [ + AbsencePage, + HomeComponent, + SubmitAbsenceComponent, + AbsenceConfirmComponent, + AbsenceAttachmentComponent, + ViewAttachmentsComponent + ] }) export class AbsencePageModule {} diff --git a/Mohem/src/app/absence/home/home.component.html b/Mohem/src/app/absence/home/home.component.html index 10dee901..73c20ece 100644 --- a/Mohem/src/app/absence/home/home.component.html +++ b/Mohem/src/app/absence/home/home.component.html @@ -2,7 +2,7 @@ {{ts.trPK('absenceList','absenceList')}} - + + + diff --git a/Mohem/src/app/absence/home/home.component.scss b/Mohem/src/app/absence/home/home.component.scss index e69de29b..36a672b9 100644 --- a/Mohem/src/app/absence/home/home.component.scss +++ b/Mohem/src/app/absence/home/home.component.scss @@ -0,0 +1,9 @@ +.imgSize{ + position: absolute; + right: 15px; + top: 0; + bottom: 0; + margin: auto; + height:20px; + width:20px; +} diff --git a/Mohem/src/app/absence/home/home.component.ts b/Mohem/src/app/absence/home/home.component.ts index 53129072..f6abd335 100644 --- a/Mohem/src/app/absence/home/home.component.ts +++ b/Mohem/src/app/absence/home/home.component.ts @@ -67,11 +67,12 @@ export class HomeComponent implements OnInit { result.GetAbsenceAttachmentsList, AbsenceAttahcmentResponse.SHARED_DATA ); + this.common.openviewAbsenceAttachment(); // this.navCtrl.push("AbsenceAttachmentPage"); } else { let msg: string = ""; - // msg=this.translate.translate("general.notAttch"); - // this.common.showAlert(msg); + msg = this.ts.trPK("general", "noFileSelect"); + this.common.presentAlert(msg); } //this.GetAbsenceTransactionList =result.GetAbsenceTransactionList; } diff --git a/Mohem/src/app/absence/models/AbsenceNotificationBodtItems.ts b/Mohem/src/app/absence/models/AbsenceNotificationBodtItems.ts new file mode 100644 index 00000000..ed18017a --- /dev/null +++ b/Mohem/src/app/absence/models/AbsenceNotificationBodtItems.ts @@ -0,0 +1,17 @@ +export class AbsenceNotificationBodyItems { + public TRANSACTION_NUMBER :number; + public DESC_FLEX_NAME : string; + public ACTION : string; + public DESC_FLEX_CONTEXT_COD : string; + public APPLICATION_COLUMN_NAME : string; + public SEGMENT_SEQ_NUM :number; + public DATATYPE : string; + public SEGMENT_NAME : string; + public VARCHAR2_VALUE : string; + public SEGMENT_PROMPT : string; + public NUMBER_VALUE :number; + public SEGMENT_VALUE_DSP : string; + public DATE_VALUE : string ; + public PREV_SEGMENT_VALUE_DSP : string; + public DISPLAY_FLAG : string ; +} \ No newline at end of file diff --git a/Mohem/src/app/absence/models/AbsenceNotificationBodyRes.ts b/Mohem/src/app/absence/models/AbsenceNotificationBodyRes.ts new file mode 100644 index 00000000..cc09ebf0 --- /dev/null +++ b/Mohem/src/app/absence/models/AbsenceNotificationBodyRes.ts @@ -0,0 +1,8 @@ +import { Response } from './response'; +import { AbsenceNotificationBodyItems } from './AbsenceNotificationBodtItems'; + +export class AbsenceNotificatonBodyResponse extends Response { +public static SHARED_DATA = 'Abs_Notif_BODY_List'; +public static NOT_WORKLIST = 'Abs_Notif_WORK_LIST'; +public AbsenceNotificationBodyItems: AbsenceNotificationBodyItems []; +} \ No newline at end of file diff --git a/Mohem/src/app/absence/models/replacement-Service.request.ts b/Mohem/src/app/absence/models/replacement-Service.request.ts new file mode 100644 index 00000000..320af90f --- /dev/null +++ b/Mohem/src/app/absence/models/replacement-Service.request.ts @@ -0,0 +1,10 @@ +import {Request} from './request' + +export class ReplacementServiceRequest extends Request{ + P_SEARCH_USER_NAME:string; + P_SEARCH_EMPLOYEE_DISPLAY_NAME:string; + P_SEARCH_EMAIL_ADDRESS:string; + P_PAGE_NUM:number; + P_PAGE_LIMIT:number; + P_SELECTED_EMPLOYEE_NUMBER:string +} \ No newline at end of file diff --git a/Mohem/src/app/absence/models/replacment-info.ts b/Mohem/src/app/absence/models/replacment-info.ts new file mode 100644 index 00000000..6ba3b7d0 --- /dev/null +++ b/Mohem/src/app/absence/models/replacment-info.ts @@ -0,0 +1,10 @@ + +export class replacmentinfo extends Request{ + public EMAIL_ADDRESS:string; + public EMPLOYEE_DISPLAY_NAME: string; + public FROM_ROW_NUM: number; + public NO_OF_ROWS: number; + public ROW_NUM: number; + public TO_ROW_NUM: number; + public USER_NAME: string; +} diff --git a/Mohem/src/app/absence/models/replacment-response.ts b/Mohem/src/app/absence/models/replacment-response.ts new file mode 100644 index 00000000..976e0ed9 --- /dev/null +++ b/Mohem/src/app/absence/models/replacment-response.ts @@ -0,0 +1,7 @@ +import { Response } from './response'; +import {replacmentinfo} from './replacment-info'; + +export class ReplacmentResponse extends Response { + public static SHARED_DATA = 'replacment-shared'; + public replacmentInfo: replacmentinfo; +} diff --git a/Mohem/src/app/absence/service/add-attach-service.ts b/Mohem/src/app/absence/service/add-attach-service.ts new file mode 100644 index 00000000..5b66103b --- /dev/null +++ b/Mohem/src/app/absence/service/add-attach-service.ts @@ -0,0 +1,27 @@ +import { Injectable } from "@angular/core"; +import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service"; +import { Observable } from "rxjs"; +@Injectable() +export class AddAttachService { + public static addAttachment = "Services/ERP.svc/REST/ADD_ATTACHMENT"; + constructor( + public api: ConnectorService, + public authService: AuthenticationService + ) {} + + public addAttachment( + addAttachrequest: any, + onError?: any, + errorLabel?: string + ): Observable { + const request = addAttachrequest; + this.authService.authenticateRequest(request); + return this.api.post( + AddAttachService.addAttachment, + request, + onError, + errorLabel + ); + } +} diff --git a/Mohem/src/app/absence/service/confirm-add-eit-service.ts b/Mohem/src/app/absence/service/confirm-add-eit-service.ts new file mode 100644 index 00000000..295f6724 --- /dev/null +++ b/Mohem/src/app/absence/service/confirm-add-eit-service.ts @@ -0,0 +1,58 @@ +import { Injectable } from "@angular/core"; +import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service"; +import { Observable } from "rxjs"; +// import {AddEitResponse} from '../models/add.eit.response' +@Injectable() +export class ConfirmAddEitService { + public static addAttachment = "Services/ERP.svc/REST/ADD_ATTACHMENT"; + public static submitEit = "Services/ERP.svc/REST/SUBMIT_EIT_TRANSACTION"; + public static startEitProcess = + "Services/ERP.svc/REST/START_EIT_APPROVAL_PROCESS"; + constructor( + public api: ConnectorService, + public authService: AuthenticationService + ) {} + + public submitEit(eit: any, onError?: any, errorLabel?: string) { + const request = eit; + request.EITTransactionTBLModel = eit.EITTransactionTBL; + //request.EITTransactionTBL=[]; + this.authService.authenticateRequest(request); + return this.api.post( + ConfirmAddEitService.submitEit, + request, + onError, + errorLabel + ); + } + + public startEitApprovalProcess( + eitProcess: any, + onError?: any, + errorLabel?: string + ): Observable { + const request = eitProcess; + this.authService.authenticateRequest(request); + return this.api.post( + ConfirmAddEitService.startEitProcess, + request, + onError, + errorLabel + ); + } + public addAttachment( + addAttachrequest: any, + onError?: any, + errorLabel?: string + ): Observable { + const request = addAttachrequest; + this.authService.authenticateRequest(request); + return this.api.post( + ConfirmAddEitService.addAttachment, + request, + onError, + errorLabel + ); + } +} diff --git a/Mohem/src/app/absence/service/replacement-list.service.spec.ts b/Mohem/src/app/absence/service/replacement-list.service.spec.ts new file mode 100644 index 00000000..f2f15955 --- /dev/null +++ b/Mohem/src/app/absence/service/replacement-list.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { ReplacementListService } from './replacement-list.service'; + +describe('ReplacementListService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: ReplacementListService = TestBed.get(ReplacementListService); + expect(service).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/absence/service/replacement-list.service.ts b/Mohem/src/app/absence/service/replacement-list.service.ts new file mode 100644 index 00000000..d03c419e --- /dev/null +++ b/Mohem/src/app/absence/service/replacement-list.service.ts @@ -0,0 +1,23 @@ +import {Injectable} from '@angular/core'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service'; +import { Observable } from 'rxjs';; +import {Request} from '../models/request' +import { ReplacementServiceRequest } from '../models/replacement-Service.request'; + +@Injectable() +export class replacmentListService { + public static getReplacmentEmployeeList = 'Services/ERP.svc/REST/GET_REPLACEMENT_LIST'; + constructor( + public api: ConnectorService, + public authService: AuthenticationService, + + ) { + + } + public getReplacmentList(req: any, onError?: any, errorLabel?: string): Observable { + const request = req; + this.authService.authenticateRequest(request); + return this.api.post(replacmentListService.getReplacmentEmployeeList, request, onError, errorLabel); + } +} \ No newline at end of file diff --git a/Mohem/src/app/absence/service/submit-absence-confirm.service.ts b/Mohem/src/app/absence/service/submit-absence-confirm.service.ts new file mode 100644 index 00000000..4dfe307a --- /dev/null +++ b/Mohem/src/app/absence/service/submit-absence-confirm.service.ts @@ -0,0 +1,51 @@ +import {Injectable} from '@angular/core'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service'; +import { Observable } from 'rxjs'; +import {ApproversList} from '../models/approvers' + + +@Injectable() +export class SubmitAbConfirmService { + public static cancelHRTransaction='Services/ERP.svc/REST/CANCEL_HR_TRANSACTION'; + public static startAbsenceProcess='Services/ERP.svc/REST/START_ABSENCE_APPROVAL_PROCESS'; + public static getApproversList='Services/ERP.svc/REST/GET_APPROVERS_LIST'; + public static updateAttach='Services/ERP.svc/REST/UPDATE_ATTACHMENT'; + public static delteAttach='Services/ERP.svc/REST/DELETE_ATTACHMENT'; + constructor( + public api: ConnectorService, + public authService: AuthenticationService) { } + + public cancelHRTransaction(transactionID: any, onError?: any, errorLabel?: string): Observable { + const request = transactionID; + this.authService.authenticateRequest(request); + return this.api.post(SubmitAbConfirmService.cancelHRTransaction, request, onError, errorLabel); + } + + public startAbApprovalProcess(abProcess: any, onError?: any, errorLabel?: string): Observable { + const request = abProcess; + this.authService.authenticateRequest(request); + return this.api.post(SubmitAbConfirmService.startAbsenceProcess, request, onError, errorLabel); + } + + public getApproversList(abProcess: any, onError?: any, errorLabel?: string): Observable { + const request = abProcess; + request.P_AME_TRANSACTION_TYPE="SSHRMS"; + request.P_PAGE_NUM=1; + request.P_PAGE_LIMIT=1000;//check later on + this.authService.authenticateRequest(request); + return this.api.post(SubmitAbConfirmService.getApproversList, request, onError, errorLabel); + } + + public updateAttach(updateAttachReq: any, onError?: any, errorLabel?: string): Observable { + const request = updateAttachReq; + this.authService.authenticateRequest(request); + return this.api.post(SubmitAbConfirmService.updateAttach, request, onError, errorLabel); + } + + public delteAttach(delteAttachReq: any, onError?: any, errorLabel?: string): Observable { + const request = delteAttachReq; + this.authService.authenticateRequest(request); + return this.api.post(SubmitAbConfirmService.delteAttach, request, onError, errorLabel); + } +} \ No newline at end of file diff --git a/Mohem/src/app/absence/service/work-list-attach.service.ts b/Mohem/src/app/absence/service/work-list-attach.service.ts new file mode 100644 index 00000000..31c58166 --- /dev/null +++ b/Mohem/src/app/absence/service/work-list-attach.service.ts @@ -0,0 +1,30 @@ +import { Injectable } from "@angular/core"; +import { Http, Response, Headers } from "@angular/http"; +import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service"; +import { Observable } from "rxjs"; +import { WorkListButtonRequest } from "src/app/eit/models/NotificationButtonReq"; + +@Injectable() +export class WorklistAttachService { + public static getAttach = "Services/ERP.svc/REST/GET_ATTACHMENTS"; + constructor( + public api: ConnectorService, + public authService: AuthenticationService + ) {} + + public getAttach( + getAttachReq: WorkListButtonRequest, + onError?: any, + errorLabel?: string + ) { + const request = getAttachReq; + this.authService.authenticateRequest(request); + return this.api.post( + WorklistAttachService.getAttach, + request, + onError, + errorLabel + ); + } +} diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.html b/Mohem/src/app/absence/submit-absence/submit-absence.component.html index abab4c25..19fd2200 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.html +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.html @@ -2,7 +2,7 @@ {{ts.trPK('submitAbsence','submitAbsence')}} - + diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts index a5dbad41..1cea406c 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts @@ -22,6 +22,9 @@ import { DateTimeInput } from "../../uI-elements/date-time.input"; import { DatePicker } from "@ionic-native/date-picker/ngx"; import { Request } from "../models/request"; import * as moment from "moment"; +import {ReplacementListComponent} from "../../vacation-rule/replacement-list/replacement-list.component"; +import {ReplacmentResponse} from "../models/replacment-response"; +import { AbsenceResponse } from '../models/absence.response'; @Component({ selector: "app-submit-absence", templateUrl: "./submit-absence.component.html", @@ -39,6 +42,7 @@ export class SubmitAbsenceComponent implements OnInit { private hiddenInput: HiddenInput; private eitVALSettoCall: any = []; private action: string = ""; + private modalFlag: any = false; menuType: any; employeeSel: any; absenceType: any; @@ -77,7 +81,8 @@ export class SubmitAbsenceComponent implements OnInit { public common: CommonService, public datePicker: DatePicker, public ts: TranslatorService, - private elementRef: ElementRef + private elementRef: ElementRef, + ) { ////*new add*///// /**********resubmit************ */ @@ -209,23 +214,37 @@ export class SubmitAbsenceComponent implements OnInit { this.totalDays = result.CalculateAbsenceDuration.P_ABSENCE_DAYS; } } + async openSearch(){ + const modal = await this.modalCtrl.create({ + component: ReplacementListComponent, + keyboardClose: true, + animated: false + }); + let dismissed = modal.onDidDismiss(); + dismissed.then(() => { + this.modalFlag = false; + }); + return await modal.present(); + } - SearchReplacment() { - let pageClosed = retData => { - this.replacmentEmployeeInfo = retData; - // this.replacmentEmployeeInfo=this.sharedData.getSharedData(ReplacmentResponse.SHARED_DATA,true); - // console.log(this.replacmentEmployeeInfo) - if (this.replacmentEmployeeInfo) { - this.employeeName = this.replacmentEmployeeInfo.EMPLOYEE_DISPLAY_NAME; - this.employeeID = this.replacmentEmployeeInfo.USER_NAME; - this.employeeSel = this.employeeName + "," + this.employeeID; - } - //Do something - }; - // this.navCtrl.push(ServiceNewPage, {pageClosed: pageClosed}); - // this.navCtrl.push("ReplacmentListModelPage", { - // pageClosed: pageClosed - // }); + async SearchReplacment() { + const modal = await this.modalCtrl.create({ + component: ReplacementListComponent + }); + + modal.onDidDismiss() + .then((data) => { + const user = data.data.empData; + console.log(data) + console.log(user); + if (data) { + this.employeeName = user.EMPLOYEE_DISPLAY_NAME; + this.employeeID = user.USER_NAME; + this.employeeSel = this.employeeName + "," + this.employeeID; + } + }); + + return await modal.present(); } handleReplacment(result) { if (this.common.validResponse(result)) { @@ -454,8 +473,9 @@ export class SubmitAbsenceComponent implements OnInit { this.fillAbsStructure(); } } + bindHtmlElemEvents(id, obj) { - return false; + const elem = document.getElementById(id); elem.addEventListener("change", e => { elem.classList.remove("requiredClassElm"); @@ -1000,9 +1020,17 @@ export class SubmitAbsenceComponent implements OnInit { let elem = document.getElementById( this.absenceDffresponse[i].APPLICATION_COLUMN_NAME ) as HTMLInputElement; - let elemVal = (document.getElementById( + let elemVal=""; + if (elem.classList.contains('onic-date')) { + elemVal = (document.getElementById( + this.absenceDffresponse[i].APPLICATION_COLUMN_NAME + ) as HTMLInputElement).value; + elemVal = moment(elemVal).format("YYYY/MM/DD hh:mm:ss"); + }else{ + elemVal = (document.getElementById( this.absenceDffresponse[i].APPLICATION_COLUMN_NAME ) as HTMLInputElement).value; + } textValue = elemVal; if ( @@ -1395,10 +1423,12 @@ export class SubmitAbsenceComponent implements OnInit { private handleSubmitAbsence(result) { if (this.common.validResponse(result)) { if (this.getPassdirfromNotifiPage) { - // this.common.sharedService.setSharedData(result.ResubmitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA); - // this.navCtrl.push("SubmitAbsenceConfirmPage", { isResubmit: true }); + this.common.sharedService.setSharedData(result.ResubmitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA); + this.common.openConfirmAbsece(); + // this.navCtrl.push("SubmitAbsenceConfirmPage", { isResubmit: true }); } else { - // this.sharedData.setSharedData(result.SumbitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA); + this.common.sharedService.setSharedData(result.SumbitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA); + this.common.openConfirmAbsece(); // this.navCtrl.push("SubmitAbsenceConfirmPage", { isResubmit: false }); } } diff --git a/Mohem/src/app/absence/view-attachments/view-attachments.component.html b/Mohem/src/app/absence/view-attachments/view-attachments.component.html new file mode 100644 index 00000000..921c5ac8 --- /dev/null +++ b/Mohem/src/app/absence/view-attachments/view-attachments.component.html @@ -0,0 +1,46 @@ + + + + {{ts.trPK('absenceList','attach')}} + + + + + + +
+

{{ts.trPK('general','notAttch')}}

+
+
+ + + +
{{ts.trPK('absenceList','attachList')}}
+
+ + +
+ + +
+
+ + {{item.SEQ_NUM }}. {{item.FILE_NAME}} + +
+ + + +
+
+ +
+
+
+ +
+ +
\ No newline at end of file diff --git a/Mohem/src/app/absence/view-attachments/view-attachments.component.scss b/Mohem/src/app/absence/view-attachments/view-attachments.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/absence/view-attachments/view-attachments.component.spec.ts b/Mohem/src/app/absence/view-attachments/view-attachments.component.spec.ts new file mode 100644 index 00000000..50f8a67c --- /dev/null +++ b/Mohem/src/app/absence/view-attachments/view-attachments.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ViewAttachmentsComponent } from './view-attachments.component'; + +describe('ViewAttachmentsComponent', () => { + let component: ViewAttachmentsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ViewAttachmentsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ViewAttachmentsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/absence/view-attachments/view-attachments.component.ts b/Mohem/src/app/absence/view-attachments/view-attachments.component.ts new file mode 100644 index 00000000..e126968c --- /dev/null +++ b/Mohem/src/app/absence/view-attachments/view-attachments.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from "@angular/core"; +import { CommonService } from "src/app/hmg-common/services/common/common.service"; +import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; +import { ModalController } from "@ionic/angular"; +import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component"; +import { AbsenceAttahcment } from "../models/abs.attach"; +import { AbsenceAttahcmentResponse } from "../models/abs.attach.response"; +@Component({ + selector: "app-view-attachments", + templateUrl: "./view-attachments.component.html", + styleUrls: ["./view-attachments.component.scss"] +}) +export class ViewAttachmentsComponent implements OnInit { + AttachmentList: AbsenceAttahcment[]; + constructor( + public common: CommonService, + public modalCtrl: ModalController, + private ts: TranslatorService + ) {} + + ngOnInit() { + this.AttachmentList = this.common.sharedService.getSharedData( + AbsenceAttahcmentResponse.SHARED_DATA + ); + } + async OpenAttachFiles(value, Type) { + this.common.sharedService.setSharedData( + { displayData: value, TypeData: Type }, + "WorkListAttachViewPage" + ); + const modal = await this.modalCtrl.create({ + component: WorkListAttachViewComponent + }); + + modal.onDidDismiss().then(data => {}); + + return await modal.present(); + } +} diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index d4260c37..db0a1684 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -12,7 +12,7 @@ - + diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index c77be859..4bc82b92 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -111,5 +111,10 @@ export class AppComponent implements OnInit, AfterViewInit { this.cs.openProfile(); this.menu.toggle(); } + openNotification(){ + + this.cs.openNotificationPage(); + this.menu.toggle(); + } } diff --git a/Mohem/src/app/app.module.ts b/Mohem/src/app/app.module.ts index f71d2085..26ba2d6e 100644 --- a/Mohem/src/app/app.module.ts +++ b/Mohem/src/app/app.module.ts @@ -11,6 +11,7 @@ import { AppRoutingModule } from './app-routing.module'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ZBar } from '@ionic-native/zbar/ngx'; import { Geolocation } from '@ionic-native/geolocation/ngx'; + @NgModule({ declarations: [AppComponent], entryComponents: [], diff --git a/Mohem/src/app/authentication/login/login.component.scss b/Mohem/src/app/authentication/login/login.component.scss index 87c1751c..aabac2f5 100644 --- a/Mohem/src/app/authentication/login/login.component.scss +++ b/Mohem/src/app/authentication/login/login.component.scss @@ -109,4 +109,4 @@ img.centerDiv { } } -.centerDiv .button{width:200px;} + diff --git a/Mohem/src/app/eit/eit.module.ts b/Mohem/src/app/eit/eit.module.ts index cf75a356..148cd9db 100644 --- a/Mohem/src/app/eit/eit.module.ts +++ b/Mohem/src/app/eit/eit.module.ts @@ -11,7 +11,7 @@ import { EITPage } from './eit.page'; import { HomeComponent } from './home/home.component'; import { EitListComponent } from './eit-list/eit-list.component'; import { DatePicker } from '@ionic-native/date-picker/ngx'; -import { FileSelectDirective } from 'ng2-file-upload'; + const routes: Routes = [ { @@ -56,8 +56,7 @@ const routes: Routes = [ EitListComponent, AddEitComponent, ConfirmAddEitComponent, - AddAttachComponent, - FileSelectDirective + AddAttachComponent ], providers: [ DatePicker diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index 154867ad..fcf894c9 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -90,6 +90,11 @@ import { RateService } from './services/rate/rate.service'; import { PaymentComponent } from './ui/payment/payment.component'; import { PaymentService } from './ui/payment/service/payment.service'; import { MenuService } from './services/menu/menuservice.service'; +import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component'; +import { FileSelectDirective } from 'ng2-file-upload'; + import { PdfViewerModule } from 'ng2-pdf-viewer'; +import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component'; + @NgModule({ imports: [ CommonModule, @@ -98,8 +103,8 @@ import { MenuService } from './services/menu/menuservice.service'; IonicModule, HttpClientModule, NgxChartsModule, - ListboxModule - + ListboxModule, + PdfViewerModule ], declarations: [ NumberRangeComponent, @@ -149,8 +154,10 @@ import { MenuService } from './services/menu/menuservice.service'; EmptyDataComponent, DetailButtonComponent, HeaderButtonComponent, - PaymentComponent - + PaymentComponent, + ReplacementListComponent, + FileSelectDirective, + WorkListAttachViewComponent ], exports: [ NumberRangeComponent, @@ -197,8 +204,10 @@ import { MenuService } from './services/menu/menuservice.service'; EmptyDataComponent, DetailButtonComponent, HeaderButtonComponent, - PaymentComponent - + PaymentComponent, + ReplacementListComponent, + FileSelectDirective, + WorkListAttachViewComponent ], providers: [ ConnectorService, diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index babcd7f6..1e6c42e5 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -955,10 +955,18 @@ export class CommonService { public openSubmitAbsencePage() { this.nav.navigateForward(["/absence/submit-absence"]); } + public openConfirmAbsece(){ + this.nav.navigateForward(["/absence/confirm-absence"]); + } public openWorkListAttachViewPage() { this.nav.navigateForward(["/notification/work-list-attach-view"]); } - + public openviewAbsenceAttachment(){ + this.nav.navigateForward(["/absence/view-attachements"]); + } + public openNotificationPage() { + this.nav.navigateForward(["/notification/homepage"]); + } public reload(url: string, from: string) { console.log("force reload called from:" + from); // window.location.reload(); diff --git a/Mohem/src/app/my-team/my-team.module.ts b/Mohem/src/app/my-team/my-team.module.ts index 60bab748..96084068 100644 --- a/Mohem/src/app/my-team/my-team.module.ts +++ b/Mohem/src/app/my-team/my-team.module.ts @@ -7,6 +7,7 @@ import { DetailsComponent } from './details/details.component'; import { IonicModule } from '@ionic/angular'; import { MyTeamPage } from './my-team.page'; +import { HmgCommonModule } from '../hmg-common/hmg-common.module'; const routes: Routes = [ { @@ -26,6 +27,7 @@ const routes: Routes = [ @NgModule({ imports: [ + HmgCommonModule, CommonModule, FormsModule, IonicModule, diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index afc16a36..1bad8976 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -1,3 +1,85 @@ -

- home works! -

+ + + {{ts.trPK('home','worklist')}} + + + + + + + + + {{ts.trPK('worklist','view')}} + + {{ts.trPK('worklist','openNot')}} + {{ts.trPK('worklist','fyi')}} + {{ts.trPK('worklist','toDo')}} + {{ts.trPK('worklist','all')}} + {{ts.trPK('worklist','meNot')}} + + + + + + {{ts.trPK('worklist','searchby')}} + + {{ts.trPK('worklist','from')}} + {{ts.trPK('worklist','subject')}} + {{ts.trPK('worklist','sent')}} + {{ts.trPK('worklist','itemType')}} + {{ts.trPK('worklist','none')}} + + + + + +
+ + {{ts.trPK('worklist','sent')}} + + +
+
+ + + + +
+ + +
+ + +
+ + +
{{notificationList.BEGIN_DATE | dateString }}
+
+
+
+ + {{notificationList.SUBJECT}} + + +
+
+
+ + + + + + + + + +
+ +
+ + {{ts.trPK('worklist','search')}} +
+
\ No newline at end of file diff --git a/Mohem/src/app/notification/home/home.component.scss b/Mohem/src/app/notification/home/home.component.scss index e69de29b..ae8332ce 100644 --- a/Mohem/src/app/notification/home/home.component.scss +++ b/Mohem/src/app/notification/home/home.component.scss @@ -0,0 +1,159 @@ + + .bar-stable { + background-color: var(--cusgray) !important; + } + .tabs{ + background-color: var(--cusgray) !important; + } + .icon-size-lg { + font-size: 40px; + } + + /*Timeline*/ + + .pos-absolute-right { + position: absolute; + right: 8px; + } + + .timeline { + position: relative; + margin: 15px 0 0 0; + } + + .timeline:before { + + content: ''; + position: absolute; + top: 0; + bottom: 0; + width: 4px; + background: #e4e4e4; + z-index: 1; + /* margin-left: -10px; */ + /* z-index: 1; */ + } + + .timeline .timeline-thumb { + + border-radius: 500px; + width: 50px; + z-index: 2; + position: absolute; + // :root[dir="ltr"]{ + // left: 37px; + // } + // :root[dir="rtl"]{ + // right: 37px; + // } + width: 50px; + float: right; + top: 0px; + } + + .timeline .timeline-thumb.timeline-icon { + height: 50px; + // text-align: center; + // color: white; + // border: 5px solid #CBD0D3; + transform: scale(0.3); + } + + + + .timeline .timeline-item { + width: 50px; + + } + + .timeline .timeline-stats { + position: relative; + font-size: 12px; + color: var(--darkgray); + + } + + + .divider-title { + background: #e4e4e4; + padding: 5px 15px; + } + + + .color-red { + color: var(--danger) !important; + } + + .bg-color-dot { + // background-color: #ff3b30 !important; + background: var(--primary); + background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); + background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); + background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); + + + } + +.notification-list{ + ion-item{ + // margin-top: 5px; + // margin-bottom: 5px; + + background-color: transparent; + .item-date{ + width: 55px; + font-size: 14px; + font-weight: bold; + + text-align: center; + padding: 0; + margin: 0; + + position: absolute; + left: 0; + top: 0; + } + ion-label , [item-end]{ + + white-space: normal; + font-size: 14px; + // :root[dir="ltr"]{ + // margin-left: 10px; + // } + // :root[dir="rtl"]{ + // margin-right: 10px; + // } + + } + + } +} +.input-wrapper { + --flex:none; +} +ion-input ,ion-datetime{ + border-bottom: #dedede 1px solid; +} +.left { + .timeline:before{ + left: 62px; + } + .notification-list ion-item{ + padding-left: 3px; + } + .timeline-thumb{ + left: 37px; + } +} +.right { + .timeline:before{ + right: 62px; + } + .notification-list ion-item{ + padding-right: 3px; + } + .timeline-thumb{ + right: 37px; + } +} + \ No newline at end of file diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index a7aad8ad..eba72364 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -1,14 +1,187 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from "@angular/core"; +import { CommonService } from "src/app/hmg-common/services/common/common.service"; +import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; +import { WorkListRequest } from "../models/workListRequest"; +import * as moment from "moment"; +import { WorKListResponse } from "../models/workListResponse"; +import { WorklistService } from "../service/worklist.service"; @Component({ - selector: 'app-home', - templateUrl: './home.component.html', - styleUrls: ['./home.component.scss'], + selector: "app-home", + templateUrl: "./home.component.html", + styleUrls: ["./home.component.scss"] }) export class HomeComponent implements OnInit { + // @ViewChild(Navbar) navBar: Navbar; + private WorkListObj: WorkListRequest; + WorkListResObj: any; //WorKListResponse; + notificationType: string = "1"; + pageNum: number = 1; + rowsNo: number; + noOfrows: number; + selectedValue: string = ""; + FromUserName: string = ""; + ItemKeyDisplayName: string = ""; + SentDate: string = ""; + Subject: string = ""; + inputSearch: string = ""; + HideDateInput: boolean = false; + HideTextInput: boolean = false; + InputDate: string; + IsReachEnd: boolean = false; + public direction = 'ltr'; + constructor( + public common: CommonService, + public ts: TranslatorService, + public WorklistService: WorklistService + ) { + 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; //number + } - constructor() { } + ngOnInit() { + this.direction = TranslatorService.getCurrentDirection(); + } + ionViewDidLoad() { + // this.navBar.backButtonClick = () => { + // // you can set a full custom history here if you want + // let pages = [ + // { + // page: "HomePage" + // } + // ]; + // this.navCtrl.setPages(pages); + // }; + } - ngOnInit() {} + ionViewWillEnter() { + this.getAllPushNotificationFun(); + } + getValueSelected(Value) { + this.selectedValue = Value; + if (this.selectedValue == "1") { + this.HideDateInput = false; + this.HideTextInput = true; + } else if (this.selectedValue == "2") { + this.HideDateInput = false; + this.HideTextInput = true; + } else if (this.selectedValue == "3") { + this.HideDateInput = true; + this.HideTextInput = false; + } else if (this.selectedValue == "4") { + this.HideDateInput = false; + this.HideTextInput = true; + } else if (this.selectedValue == "5") { + this.HideDateInput = false; + this.HideTextInput = false; + } + } + getAllPushNotificationFun() { + this.WorkListObj.P_PAGE_NUM = 1; + this.IsReachEnd = false; + + if (this.selectedValue == "1") { + this.WorkListObj.P_SEARCH_FROM_USER = this.inputSearch; + this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = ""; + this.WorkListObj.P_SEARCH_SENT_DATE = ""; + this.WorkListObj.P_SEARCH_SUBJECT = ""; + } else if (this.selectedValue == "2") { + 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.inputSearch; + } else if (this.selectedValue == "3") { + this.WorkListObj.P_SEARCH_FROM_USER = ""; + this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = ""; + if (this.InputDate) + this.WorkListObj.P_SEARCH_SENT_DATE = moment(this.InputDate).format( + "DD-MMM-YYYY" + ); + else this.WorkListObj.P_SEARCH_SENT_DATE = ""; + this.WorkListObj.P_SEARCH_SUBJECT = ""; + } else if (this.selectedValue == "4") { + this.WorkListObj.P_SEARCH_FROM_USER = ""; + this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.inputSearch; + this.WorkListObj.P_SEARCH_SENT_DATE = ""; + this.WorkListObj.P_SEARCH_SUBJECT = ""; + } else 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).subscribe( + (result: WorKListResponse) => { + this.handleWorkListResult(result); + } + ); + } //End getNotifications + + private handleWorkListResult(result) { + if (this.common.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (this.common.hasData(result.GetWorkList)) { + this.WorkListObj.P_PAGE_NUM++; + this.WorkListResObj = result.GetWorkList; + let lastItemIndex = this.WorkListResObj.length - 1; + if (result.GetWorkList[lastItemIndex]) { + let lastitem = result.GetWorkList[lastItemIndex]; + if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + // this.navCtrl.push('SmsAuthenticatePage'); + } + } else { + this.WorkListResObj = []; + } + } + } + + openNotificationDetail(obj) { + //this.navCtrl.push("WorkListMainPage", { passNotificationList: obj }); + } + onChangeView(selectedValue: any) { + this.WorkListObj.P_NOTIFICATION_TYPE = selectedValue; + } + + doInfinite(infiniteScroll) { + //this.pageNum= this.pageNum + 1; + + if (!this.IsReachEnd) { + this.WorklistService.getWorkList(this.WorkListObj).subscribe( + (result: any) => { + if (this.common.validResponse(result)) { + this.WorkListObj.P_PAGE_NUM++; + if (this.common.hasData(result.GetWorkList)) { + result.GetWorkList.forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.WorkListResObj.push(element); + }); + } // if list length >0 + else { + this.IsReachEnd = true; + } + } // if response == 1 + //this.pageNum++; + infiniteScroll.complete(); + } + ); + } else { + if (infiniteScroll) infiniteScroll.complete(); + } + } //end infiniteScroll } diff --git a/Mohem/src/app/notification/models/AbsenceNotificationBodtItems.ts b/Mohem/src/app/notification/models/AbsenceNotificationBodtItems.ts new file mode 100644 index 00000000..ed18017a --- /dev/null +++ b/Mohem/src/app/notification/models/AbsenceNotificationBodtItems.ts @@ -0,0 +1,17 @@ +export class AbsenceNotificationBodyItems { + public TRANSACTION_NUMBER :number; + public DESC_FLEX_NAME : string; + public ACTION : string; + public DESC_FLEX_CONTEXT_COD : string; + public APPLICATION_COLUMN_NAME : string; + public SEGMENT_SEQ_NUM :number; + public DATATYPE : string; + public SEGMENT_NAME : string; + public VARCHAR2_VALUE : string; + public SEGMENT_PROMPT : string; + public NUMBER_VALUE :number; + public SEGMENT_VALUE_DSP : string; + public DATE_VALUE : string ; + public PREV_SEGMENT_VALUE_DSP : string; + public DISPLAY_FLAG : string ; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/AbsenceNotificationBodyRes.ts b/Mohem/src/app/notification/models/AbsenceNotificationBodyRes.ts new file mode 100644 index 00000000..cc09ebf0 --- /dev/null +++ b/Mohem/src/app/notification/models/AbsenceNotificationBodyRes.ts @@ -0,0 +1,8 @@ +import { Response } from './response'; +import { AbsenceNotificationBodyItems } from './AbsenceNotificationBodtItems'; + +export class AbsenceNotificatonBodyResponse extends Response { +public static SHARED_DATA = 'Abs_Notif_BODY_List'; +public static NOT_WORKLIST = 'Abs_Notif_WORK_LIST'; +public AbsenceNotificationBodyItems: AbsenceNotificationBodyItems []; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/ActionHistoryReq.ts b/Mohem/src/app/notification/models/ActionHistoryReq.ts new file mode 100644 index 00000000..1b23d13e --- /dev/null +++ b/Mohem/src/app/notification/models/ActionHistoryReq.ts @@ -0,0 +1,9 @@ +import { Request } from './request'; + +export class WorkListActionHistoryRequest extends Request{ + //public static SHARED_DATA = ''; + public P_NOTIFICATION_ID :any; + public P_PAGE_NUM:number ;//number + public P_PAGE_LIMIT:number;//number + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/ActionHistoryRes.ts b/Mohem/src/app/notification/models/ActionHistoryRes.ts new file mode 100644 index 00000000..196046e2 --- /dev/null +++ b/Mohem/src/app/notification/models/ActionHistoryRes.ts @@ -0,0 +1,15 @@ +import { Response } from './response'; + +export class WorkListActionHistoryResponse extends Response { +//public static SHARED_DATA = ''; +public NOTIFICATION_ID = 0; //Int +public ROW_NUM = 0; //Int +public SEQUENCE = 0; //Int +public NO_OF_ROWS = 0; //Int +public NAME = ''; //String +public FROM_ROW_NUM = 0; //Int +public ACTION = ''; //String +public TO_ROW_NUM = 0; //Int +public NOTIFICATION_DATE = ''; //String +public NOTE = ''; //String +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/EITNotificationBodyItems.ts b/Mohem/src/app/notification/models/EITNotificationBodyItems.ts new file mode 100644 index 00000000..4c1bf836 --- /dev/null +++ b/Mohem/src/app/notification/models/EITNotificationBodyItems.ts @@ -0,0 +1,18 @@ +export class EITNotificationBodyItems { + public TRANSACTION_NUMBER :number; + public DESC_FLEX_NAME : string; + public ACTION : string; + public EXTRA_INFO_ID :number; + public DESC_FLEX_CONTEXT_COD : string; + public APPLICATION_COLUMN_NAME : string; + public SEGMENT_SEQ_NUM :number; + public DATATYPE : string; + public SEGMENT_NAME : string; + public VARCHAR2_VALUE : string; + public SEGMENT_PROMPT : string; + public NUMBER_VALUE :number; + public SEGMENT_VALUE_DSP : string; + public DATE_VALUE : string ; + public PREV_SEGMENT_VALUE_DSP : string; + public DISPLAY_FLAG : string ; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/EITNotificationBodyRes.ts b/Mohem/src/app/notification/models/EITNotificationBodyRes.ts new file mode 100644 index 00000000..673db702 --- /dev/null +++ b/Mohem/src/app/notification/models/EITNotificationBodyRes.ts @@ -0,0 +1,8 @@ +import { Response } from './response'; +import { EITNotificationBodyItems } from './EITNotificationBodyItems'; + +export class EITNotificatonBodyResponse extends Response { +public static SHARED_DATA = 'Notif_BODY_List'; +public static NOT_WORKLIST = 'Notif_WORK_LOST'; +public EITNotificationBodyItems: EITNotificationBodyItems []; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/NotificationActionReq.ts b/Mohem/src/app/notification/models/NotificationActionReq.ts new file mode 100644 index 00000000..dc23e68d --- /dev/null +++ b/Mohem/src/app/notification/models/NotificationActionReq.ts @@ -0,0 +1,12 @@ +import { Request } from './request'; + +export class WorkListActionRequest extends Request{ + // public static SHARED_DATA = ''; + public P_NOTIFICATION_ID :any; + public P_FORWARD_TO_USER_NAME:string;//String + public P_ACTION_MODE:string;//String + public P_COMMENTS:string; + public RespondAttributeList:any[]; + public P_APPROVER_INDEX :any; + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/NotificationBodyReq.ts b/Mohem/src/app/notification/models/NotificationBodyReq.ts new file mode 100644 index 00000000..238bc49a --- /dev/null +++ b/Mohem/src/app/notification/models/NotificationBodyReq.ts @@ -0,0 +1,8 @@ +import { Request } from './request'; + +export class WorkListBodyRequest extends Request{ + // public static SHARED_DATA = ''; + public P_NOTIFICATION_ID :any; + public P_TRANSACTION_ID :number; + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/NotificationButtonReq.ts b/Mohem/src/app/notification/models/NotificationButtonReq.ts new file mode 100644 index 00000000..30ce7eef --- /dev/null +++ b/Mohem/src/app/notification/models/NotificationButtonReq.ts @@ -0,0 +1,6 @@ +import { Request } from './request'; + +export class WorkListButtonRequest extends Request{ + //public static SHARED_DATA = ''; + public P_NOTIFICATION_ID :any; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/NotificationButtonRes.ts b/Mohem/src/app/notification/models/NotificationButtonRes.ts new file mode 100644 index 00000000..c857d787 --- /dev/null +++ b/Mohem/src/app/notification/models/NotificationButtonRes.ts @@ -0,0 +1,10 @@ +import { Response } from './response'; + +export class NotificatonButtonResponse extends Response { +//public static SHARED_DATA = ''; + +public BUTTON_SEQ = -1; +public BUTTON_LABEL = ''; +public BUTTON_ACTION = ''; + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/NotificationGetAttachRes.ts b/Mohem/src/app/notification/models/NotificationGetAttachRes.ts new file mode 100644 index 00000000..e6f28069 --- /dev/null +++ b/Mohem/src/app/notification/models/NotificationGetAttachRes.ts @@ -0,0 +1,21 @@ +import { Response } from './response'; + +export class NotificationGetAttachResponse extends Response { +public static SHARED_DATA = ''; +public SEQ_NUM = 0;// Int +public FILE_NAME = '';//String +public FILE_DATA = '';//base64 +public PK1_VALUE = '';//String +public PK2_VALUE = '';//String +public PK3_VALUE = '';//String +public PK4_VALUE = '';//String +public FILE_CONTENT_TYPE = '';//String +public ATTACHED_DOCUMENT_ID = 0;//Int +public DOCUMENT_ID = 0;//Int +public CATEGORY_ID = 0;//Int +public DATATYPE_ID = 0;//Int +public ENTITY_NAME = '';//String +public FILE_ID = 0;//Int +public PK5_VALUE = '';//String + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/RFC-EmployeeRes.ts b/Mohem/src/app/notification/models/RFC-EmployeeRes.ts new file mode 100644 index 00000000..4f3279db --- /dev/null +++ b/Mohem/src/app/notification/models/RFC-EmployeeRes.ts @@ -0,0 +1,7 @@ +import { Response } from './response'; +import {RFCEmployeeList } from './RFCEmployee'; + +export class WorKListRFCEmployeeResponse extends Response { + +public RFCEmployeeList: RFCEmployeeList []; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/RFCEmployee.ts b/Mohem/src/app/notification/models/RFCEmployee.ts new file mode 100644 index 00000000..e45bd9d4 --- /dev/null +++ b/Mohem/src/app/notification/models/RFCEmployee.ts @@ -0,0 +1,11 @@ +export class RFCEmployeeList { + public SEQ :number; + public ROW_NUM : number; + public USER_NAME : string; + public NO_OF_ROWS :number; + public EMPLOYEE_DISPLAY_NAME : string; + public FROM_ROW_NUM : number; + public ACTION :string; + public TO_ROW_NUM : number; + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/ReplacmentEmployeeList.ts b/Mohem/src/app/notification/models/ReplacmentEmployeeList.ts new file mode 100644 index 00000000..6a51dbea --- /dev/null +++ b/Mohem/src/app/notification/models/ReplacmentEmployeeList.ts @@ -0,0 +1,12 @@ +export class ReplacmentEmployeeList { + public ROW_NUM : number; + public USER_NAME : string; + public NO_OF_ROWS :number; + public EMPLOYEE_DISPLAY_NAME : string; + public FROM_ROW_NUM : number; + public EMAIL_ADDRESS :string; + public TO_ROW_NUM : number; + +} + + diff --git a/Mohem/src/app/notification/models/ReplacmentEmployeeReq.ts b/Mohem/src/app/notification/models/ReplacmentEmployeeReq.ts new file mode 100644 index 00000000..fbb83818 --- /dev/null +++ b/Mohem/src/app/notification/models/ReplacmentEmployeeReq.ts @@ -0,0 +1,10 @@ +import { Request } from './request'; + +export class WorkListReplacmentEmployeeRequest extends Request{ +public P_PAGE_NUM : any; +public P_PAGE_LIMIT : Number; +public P_SEARCH_USER_NAME:String; +public P_SEARCH_EMPLOYEE_DISPLAY_NAME:String; +public P_SEARCH_EMAIL_ADDRESS:String; + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/ReplacmentEmployeeRes.ts b/Mohem/src/app/notification/models/ReplacmentEmployeeRes.ts new file mode 100644 index 00000000..459a0adc --- /dev/null +++ b/Mohem/src/app/notification/models/ReplacmentEmployeeRes.ts @@ -0,0 +1,8 @@ +import { Response } from './response'; +import {ReplacmentEmployeeList } from './ReplacmentEmployeeList'; + +export class WorKListReplacmentEmployeeResponse extends Response { +public static SHARED_DATA = 'work-list'; + +public ReplacmentEmployeeList: ReplacmentEmployeeList []; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/WorklistsubmitterInfoItems.ts b/Mohem/src/app/notification/models/WorklistsubmitterInfoItems.ts new file mode 100644 index 00000000..4ece1063 --- /dev/null +++ b/Mohem/src/app/notification/models/WorklistsubmitterInfoItems.ts @@ -0,0 +1,72 @@ +export class WorklistsubmitterInfoItems { + +public BUSINESS_GROUP_ID:number; +public ACTUAL_TERMINATION_DATE:string; +public BUSINESS_GROUP_NAME :string; +public EMPLOYEE_EMAIL_ADDRESS :string; +public PERSON_ID:number; +public JOB_ID:number; +public PERSON_TYPE_ID:number; +public POSITION_ID:number; +public ASSIGNMENT_ID:number; +public ORGANIZATION_ID:number; +public ASSIGNMENT_START_DATE:string; +public LOCATION_ID:number; +public ASSIGNMENT_END_DATE:string; +public PAYROLL_ID:number; +public PRIMARY_FLAG:string; +public GRADE_ID:number; +public CURRENT_EMPLOYEE_FLAG:string; +public JOB_NAME:string; +public ASSIGNMENT_STATUS_TYPE_ID:number; +public POSITION_NAME:string; +public NORMAL_HOURS:number; +public ORGANIZATION_NAME:string; +public FREQUENCY:string; +public LOCATION_NAME:string; +public FREQUENCY_MEANING:string; +public PAYROLL_NAME:string; +public EMPLOYEE_NUMBER:string; +public PAYROLL_CODE:string; +public EMPLOYEE_NAME:string; +public GRADE_NAME:string; +public EMPLOYEE_DISPLAY_NAME:string; +public EMPLOYEE_MOBILE_NUMBER:string; +public NATIONAL_IDENTIFIER:string; +public EMPLOYEE_WORK_NUMBER:string; +public SYSTEM_PERSON_TYPE:string; +public SUPERVISOR_ID:number; +public PERSON_TYPE:string; +public SUPERVISOR_ASSIGNMENT_ID:string; +public MANUAL_TIMECARD_FLAG:string; +public SUPERVISOR_NUMBER:string; +public MANUAL_TIMECARD_MEANING:string; +public SUPERVISOR_NAME:string; +public SWIPES_EXEMPTED_FLAG:string; +public SUPERVISOR_DISPLAY_NAME:string; +public SWIPES_EXEMPTED_MEANING:string; +public SUPERVISOR_EMAIL_ADDRESS:string; +public ASSIGNMENT_NUMBER:string; +public SUPERVISOR_MOBILE_NUMBER:string; +public UNIT_NUMBER:string; +public SUPERVISOR_WORK_NUMBER:string; +public USER_STATUS:string; +public EMPLOYEE_IMAGE:string;//base64; +public EMPLOYMENT_CATEGORY:string; +public TK_PERSON_ID:number; +public ASSIGNMENT_TYPE:string; +public TK_EMPLOYEE_NUMBER:string; +public EMPLOYMENT_CATEGORY_MEANING:string; +public TK_EMPLOYEE_NAME:string; +public PER_INFORMATION_CATEGORY:string; +public TK_EMPLOYEE_DISPLAY_NAME:string; +public NATIONALITY_CODE:string; +public TK_EMAIL_ADDRESS:string; +public NATIONALITY_MEANING:string; +public NUM_OF_SUBORDINATES :number; +public HIRE_DATE:string; +public FROM_ROW_NUM:number; +public TO_ROW_NUM:number; +public NO_OF_ROWS:number; +public ROW_NUM:number; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/WorklistsubmitterInfoReq.ts b/Mohem/src/app/notification/models/WorklistsubmitterInfoReq.ts new file mode 100644 index 00000000..c11f6867 --- /dev/null +++ b/Mohem/src/app/notification/models/WorklistsubmitterInfoReq.ts @@ -0,0 +1,13 @@ +import { Request } from './request'; + +export class WorkListSubmitterInfoRequest extends Request{ +public P_NOTIFICATION_TYPE: string;//string +public P_SELECTED_EMPLOYEE_NUMBER: string;//String +public P_SELECTED_RESP_ID: Number;//NUMBER +public P_PAGE_NUM : Number; +public P_PAGE_LIMIT : Number; +public P_SEARCH_USER_NAME:String; +public P_SEARCH_EMPLOYEE_DISPLAY_NAME:String; +public P_SEARCH_EMAIL_ADDRESS:String; + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/WorklistsubmitterInfoRes.ts b/Mohem/src/app/notification/models/WorklistsubmitterInfoRes.ts new file mode 100644 index 00000000..7a61ea1c --- /dev/null +++ b/Mohem/src/app/notification/models/WorklistsubmitterInfoRes.ts @@ -0,0 +1,10 @@ +import { Response } from './response'; +import { WorklistsubmitterInfoItems } from './WorklistsubmitterInfoItems'; + +export class WorklistsubmitterInfoResponse extends Response { +//public static SHARED_DATA = ''; + + +public WorklistsubmitterInfoItems: WorklistsubmitterInfoItems []; + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/request.ts b/Mohem/src/app/notification/models/request.ts new file mode 100644 index 00000000..8cf1c27f --- /dev/null +++ b/Mohem/src/app/notification/models/request.ts @@ -0,0 +1,18 @@ +export class Request { + public P_USER_NAME: string; + public LanguageID: number; + //public IPAdress: string; + public P_SESSION_ID: number; + public VersionID: number; + public Channel: number; + public P_PASSWORD: string; + public P_MOBILE_NUMBER: string; + public P_EMAIL_ADDRESS: string; + public TokenID:string; + public P_NOTIFICATION_ID:number; + public MobileNumber: string; + public UserName:string; + public LogInTokenID:string; + public MobileType:string; + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/response.ts b/Mohem/src/app/notification/models/response.ts new file mode 100644 index 00000000..b1c2e1cb --- /dev/null +++ b/Mohem/src/app/notification/models/response.ts @@ -0,0 +1,11 @@ +export class Response { + public LanguageID?: number; + public ErrorCode:string; + public ErrorEndUserMessage:string; + public ErrorMessage:string; + public ErrorType: number; + public MessageStatus: number; + public SuccessMsg:string; + public SuccessMsgN:string; + public IsAuthenticated:boolean; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/workListRequest.ts b/Mohem/src/app/notification/models/workListRequest.ts new file mode 100644 index 00000000..0936e2a1 --- /dev/null +++ b/Mohem/src/app/notification/models/workListRequest.ts @@ -0,0 +1,17 @@ +import { Request } from './request'; + +export class WorkListRequest extends Request{ + public static SHARED_DATA = 'login-request'; + // Channel: Channel, //channel + // LanguageID: LanguageID,//langlist + // P_USER_NAME:userName,//string + // P_SESSION_ID:sessionID,//number + public P_NOTIFICATION_TYPE: string;//string + public P_SEARCH_FROM_USER:string;//string + public P_SEARCH_SUBJECT:string;//string + public P_SEARCH_SENT_DATE:string;//string + public P_SEARCH_ITEM_TYPE_DSP_NAME:string;//string + public P_PAGE_NUM:number;//number + public P_PAGE_LIMIT:number;//number + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/workListResItems.ts b/Mohem/src/app/notification/models/workListResItems.ts new file mode 100644 index 00000000..ca567fb3 --- /dev/null +++ b/Mohem/src/app/notification/models/workListResItems.ts @@ -0,0 +1,28 @@ +export class WorkListResItems { + public ITEM_KEY: string; + public PRIORITY_F : string; + public NOTIFICATION_ID: number; + public RECIPIENT_ROLE : string; + public FROM_USER : string; + public END_DATE: string; + public TO_USER: string; + public ITEM_TYPE_DISPLAY_NAME: string; + public SUBJECT: string; + public MORE_INFO_ROLE: string; + public LANGUAGE: string; + public FROM_ROLE: string; + public BEGIN_DATE: string; + public ITEM_TYPE: string; + public DUE_DATE: string; + public NOTIFICATION_NAME: string; + public STATUS: string; + public MAIL_STATUS: string; + public PRIORITY: number; + public ORIGINAL_RECIPIENT: string; + public SELECTED_EMPLOYEE_NUMBER: string; + public ROW_NUM: number; + public NO_OF_ROWS: number; + public FROM_ROW_NUM : number; + public TO_ROW_NUM : number; + public REQUEST_TYPE: string; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/models/workListResponse.ts b/Mohem/src/app/notification/models/workListResponse.ts new file mode 100644 index 00000000..43807895 --- /dev/null +++ b/Mohem/src/app/notification/models/workListResponse.ts @@ -0,0 +1,8 @@ +import { Response } from './response'; +import { WorkListResItems } from './workListResItems'; + +export class WorKListResponse extends Response { +public static SHARED_DATA = 'work-list'; + +public WorkListItems: WorkListResItems []; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/notification.module.ts b/Mohem/src/app/notification/notification.module.ts index 3e7edeea..19b619d3 100644 --- a/Mohem/src/app/notification/notification.module.ts +++ b/Mohem/src/app/notification/notification.module.ts @@ -7,7 +7,9 @@ import { FormsModule } from '@angular/forms'; import { Routes, RouterModule } from '@angular/router'; import { IonicModule } from '@ionic/angular'; import { NotificationPage } from './notification.page'; -import { PdfViewerModule } from 'ng2-pdf-viewer'; +import { PipesModule } from '../pipes/pipes.module'; +import { WorklistService } from './service/worklist.service'; + const routes: Routes = [ { @@ -32,13 +34,13 @@ const routes: Routes = [ FormsModule, IonicModule, HmgCommonModule, - PdfViewerModule, + PipesModule, RouterModule.forChild(routes) ], declarations: [ NotificationPage, - HomeComponent, - WorkListAttachViewComponent - ] + HomeComponent + ], + providers:[WorklistService] }) export class NotificationPageModule {} diff --git a/Mohem/src/app/notification/service/notification.service.spec.ts b/Mohem/src/app/notification/service/notification.service.spec.ts new file mode 100644 index 00000000..698c4215 --- /dev/null +++ b/Mohem/src/app/notification/service/notification.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { NotificationService } from './notification.service'; + +describe('NotificationService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: NotificationService = TestBed.get(NotificationService); + expect(service).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/notification/service/worklist.service.ts b/Mohem/src/app/notification/service/worklist.service.ts new file mode 100644 index 00000000..32335be1 --- /dev/null +++ b/Mohem/src/app/notification/service/worklist.service.ts @@ -0,0 +1,25 @@ +import {Injectable} from '@angular/core'; +import {Http, Response, Headers} from "@angular/http"; +import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service"; +import {Observable} from 'rxjs'; +import {WorkListRequest} from '../models/workListRequest'; +import {WorKListResponse} from '../models/workListResponse'; + + +@Injectable() +export class WorklistService { + public static getWorkList = 'Services/ERP.svc/REST/GET_WORKLIST'; + constructor( + public api: ConnectorService, + public authService: AuthenticationService, + + ) { } + + public getWorkList(WorkListReq: any, onError?: any, errorLabel?: string): Observable { + const request = WorkListReq; + this.authService.authenticateRequest(request); + return this.api.post(WorklistService.getWorkList, request, onError, errorLabel); + } + +} \ No newline at end of file diff --git a/Mohem/src/app/pipes/date-string/date-string.ts b/Mohem/src/app/pipes/date-string/date-string.ts new file mode 100644 index 00000000..7c3dd093 --- /dev/null +++ b/Mohem/src/app/pipes/date-string/date-string.ts @@ -0,0 +1,39 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +/** + * Generated class for the DateStringPipe pipe. + * + * See https://angular.io/api/core/Pipe for more info on Angular Pipes. + */ +@Pipe({ + name: 'dateString', +}) +export class DateStringPipe implements PipeTransform { + /** + * Takes a value and makes it lowercase. + */ + 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'] + } +}; + 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(); + + + } + + + + + getMonthNameShort(lang,month) { + lang = lang && (lang in this.locale) ? lang : 'en'; + return this.locale[lang].month_names_short[month]; +}; + + +} diff --git a/Mohem/src/app/pipes/filter-lang/filter-lang.ts b/Mohem/src/app/pipes/filter-lang/filter-lang.ts new file mode 100644 index 00000000..b99b6645 --- /dev/null +++ b/Mohem/src/app/pipes/filter-lang/filter-lang.ts @@ -0,0 +1,28 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +/** + * Generated class for the FilterLangPipe pipe. + * + * See https://angular.io/api/core/Pipe for more info on Angular Pipes. + */ +@Pipe({ + name: 'filterLang', +}) +export class FilterLangPipe implements PipeTransform { + /** + * return the correct translated values. + */ + transform(value: string, valuen:string) { + let desc =value; + if(valuen){ + let lang= localStorage.getItem('language'); + lang = lang!=null ? lang:'2'; + if(lang=='2'){ + desc=value; + }else{ + desc=valuen; + } + } + return desc + } +} diff --git a/Mohem/src/app/pipes/pipes.module.ts b/Mohem/src/app/pipes/pipes.module.ts new file mode 100644 index 00000000..de2e17a1 --- /dev/null +++ b/Mohem/src/app/pipes/pipes.module.ts @@ -0,0 +1,11 @@ +import { NgModule } from '@angular/core'; +import { DateStringPipe } from './date-string/date-string'; +import { FilterLangPipe } from './filter-lang/filter-lang'; +@NgModule({ + declarations: [DateStringPipe, + FilterLangPipe], + imports: [], + exports: [DateStringPipe, + FilterLangPipe] +}) +export class PipesModule {} diff --git a/Mohem/src/app/uI-elements/date.input.ts b/Mohem/src/app/uI-elements/date.input.ts index 9692b42a..1d8cbcb0 100644 --- a/Mohem/src/app/uI-elements/date.input.ts +++ b/Mohem/src/app/uI-elements/date.input.ts @@ -19,6 +19,9 @@ export class DateInput extends UiElement { let date = new Date(); this.value = date.toISOString().slice(0, 10); } + dateChange($event){ + console.log($event) + } public getTemplate() { let requiredClass: string = ""; if (this.disabled == "N") { this.disabled = "disabled" } else { this.disabled = "" } @@ -41,8 +44,7 @@ export class DateInput extends UiElement { "" + " " + this.label + "" + // "
" + this.value + "
" + - // "" + - "" + + "" + // " "+ // " "+ // " "+ diff --git a/Mohem/src/app/uI-elements/select.input.ts b/Mohem/src/app/uI-elements/select.input.ts index 3caa7772..9d1e8f70 100644 --- a/Mohem/src/app/uI-elements/select.input.ts +++ b/Mohem/src/app/uI-elements/select.input.ts @@ -26,7 +26,7 @@ export class SelectInput extends UiElement { "
" + "" + "" + "
"; diff --git a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss index fad75a46..0187d5a3 100644 --- a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss +++ b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss @@ -8,4 +8,8 @@ ion-item { padding: 0 1.1em; min-height: 45px; min-width: 200px; - } \ No newline at end of file + } + .item-radio-checked ion-label { + color: #3ac1f1 !important; +} +.boldTxt{font-weight:bold;} \ No newline at end of file diff --git a/Mohem/src/app/vacation-rule/vacation-rule.module.ts b/Mohem/src/app/vacation-rule/vacation-rule.module.ts index 57c90173..7f2456cc 100644 --- a/Mohem/src/app/vacation-rule/vacation-rule.module.ts +++ b/Mohem/src/app/vacation-rule/vacation-rule.module.ts @@ -67,8 +67,7 @@ const routes: Routes = [ HomeComponent, VacationTypeComponent, NotificationTypeComponent, - CreateVacationRuleComponent, - ReplacementListComponent + CreateVacationRuleComponent ] }) export class VacationRulePageModule { } diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 6526e503..528a6fe1 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -1219,6 +1219,24 @@ "ar":"اختر نوع الإجازة" } }, + "submitAbsenceConfirm": { + "submitAbsenceConfirm":{ + "en": "Submit Absence Confirm", + "ar": "إرسال تأكيد الإجازة" + }, + "start":{ + "en":"Submit", + "ar":"تنفيذ" + }, + "cancel":{ + "en":"Cancel", + "ar":"إلغاء" + }, + "addAttch":{ + "en":"Add Attachment", + "ar":"أضف مرفق" + } + }, "confirmAddEit": { "confirmAddEit": { "en": "Confirm Add Eit", @@ -1266,5 +1284,110 @@ "en": "Support Documents", "ar": "مستندات الدعم" } + }, + "addAttach":{ + "select":{ + "en":"Select File", + "ar":"أختر الملف" + }, + "name":{ + "en":"Name", + "ar":"الإسم" + }, + "size":{ + "en":"Size", + "ar":"الحجم" + }, + "remove":{ + "en":"Remove", + "ar":"حذف" + }, + "title":{ + "en":"Add Attachment", + "ar":"إضافة مرفق" + }, + "errorMsg":{ + "en":"Failed to upload some of the attached files", + "ar":"حدث خطأ في إرفاق بعض الملفات" + }, + "attachUpdate":{ + "en":"Attachment updated successfully", + "ar":"تم تحديث المرفق بنجاح" + + }, + "deleteAttach":{ + "en":"Attachment deleted successfully", + "ar":"تم حذف المرفق بنجاح" + }, + "noFileSelect":{ + "en":"No file selected", + "ar":"لايوجد ملف مرفق" + }, + "notSupport":{ + "en":"This file type can't be attached", + "ar":"هذا النوع من الملفات لايمكن ارفاقه" + }, + "notSupportFile":{ + "en":"This file type is not supported", + "ar":"لايمكن عرض هذا النوع من الملفات" + } + }, + "worklist": { + "view":{ + "en": "View", + "ar":"عرض" + }, + "openNot":{ + "en": "Open Notifications", + "ar":"التبليغات المفتوحة" + }, + "fyi":{ + "en": "FYI Notifications", + "ar":"تبليغات للعلم" + }, + "toDo": { + "en":"To Do Notifications", + "ar":"تبليغات الأعمال" + }, + "all": { + "en":"All Notifications", + "ar":"كل التبليغات" + }, + "meNot": { + "en":"Notifications from Me", + "ar": "تبليغات صادرة مني" + }, + "searchby": { + "en":"Search By", + "ar":"البحث ب" + }, + "from": { + "en":"From User Name", + "ar":"من" + }, + "subject": { + "en":"Subject", + "ar":"الموضوع" + }, + "sent": { + "en":"Sent Date", + "ar":"تاريخ الإرسال" + }, + "itemType":{ + "en": "Item Type Display Name", + "ar":"اسم العرض" + }, + "none": { + "en":"None", + "ar":"بدون" + }, + "enter": { + "en":"Enter", + "ar":"ادخل" + }, + "search": { + "en":"Search", + "ar":"بحث" + } } } \ No newline at end of file diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 11e9217d..97d1f3c9 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -746,3 +746,4 @@ color: var(--dark); width:100%; margin-left: 0.4cm; } +.centerDiv .button{width:200px;} \ No newline at end of file