diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss
index 44d1bc00..94ace281 100644
--- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss
+++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.scss
@@ -1,7 +1,26 @@
.footer-button {
- border-radius: 2px;
- padding: 0 1.1em;
- min-height: 45px;
- min-width: 200px;
- }
-
\ No newline at end of file
+ border-radius: 2px;
+ padding: 0 1.1em;
+ min-height: 45px;
+ min-width: 200px;
+}
+
+.imgSize {
+ width: 22px;
+ height: 22px;
+}
+
+.Header {
+ font-weight: bold;
+ color: #1a586d !important;
+ font-size: 10px;
+}
+
+.tbData {
+ font-size: 10px;
+}
+
+.btnBack {
+ background: transparent;
+ float: right;
+}
diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts
index b1579cc8..4171b53f 100644
--- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts
+++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts
@@ -30,7 +30,7 @@ export class ConfirmAddEitComponent implements OnInit {
respID: number;
selMenu: MenuResponse;
getAttachList: any;
- attachListDisplay: any;
+ attachListDisplay: any = [];
headerTitle: string = "";
isTrue: any = 0;
attachItems: any;
@@ -58,9 +58,7 @@ export class ConfirmAddEitComponent implements OnInit {
this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false);
this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false);
-
this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isResubmit;
-
if (this.isResubmitEIT) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
@@ -82,7 +80,6 @@ export class ConfirmAddEitComponent implements OnInit {
this.addrespList = this.cs.sharedService.getSharedData(AddEitResponse.SHARED_DATA);
this.itemKey = this.addrespList.SubmitEITTransactionList.P_ITEM_KEY;
this.P_TransactionID = this.addrespList.SubmitEITTransactionList.P_TRANSACTION_ID;
-
this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete;
@@ -128,8 +125,8 @@ export class ConfirmAddEitComponent implements OnInit {
let request = {
AddAttachmentList: this.attachListOver
-
}
+
this.eitService.addAttachment(
request).
subscribe((result: any) => {
@@ -217,7 +214,8 @@ export class ConfirmAddEitComponent implements OnInit {
// }
// this.navCtrl.popToRoot();
- this.cs.openHome();
+ // this.cs.openHome();
+ this.cs.openNotificationPage();
}
}
@@ -232,6 +230,9 @@ export class ConfirmAddEitComponent implements OnInit {
//open the modal with return data
let attachDocID = attachItems.ATTACHED_DOCUMENT_ID;
+ this.cs.sharedService.setSharedData( this.P_TransactionID, 'TransactionID');
+ this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj');
+
const modal = await this.modalController.create({
component: AddAttachComponent
});
@@ -252,7 +253,8 @@ export class ConfirmAddEitComponent implements OnInit {
//.ATTACHED_DOCUMENT_ID
this.updateFile(data, attachDocID);
} else {
- this.attachListDisplay = data;
+ console.log(data);
+ this.attachListDisplay = data.data;
this.attachItems = this.attachListDisplay.map(function (el) {
var o = Object.assign({}, el);
o.isSuccess = false;
@@ -260,6 +262,7 @@ export class ConfirmAddEitComponent implements OnInit {
});
this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
+ // this.attachListOver = this.attachListDisplay;
}
// this.attachListDisplay=data;
@@ -268,62 +271,10 @@ export class ConfirmAddEitComponent implements OnInit {
// o.isSuccess = false;
// return o;
// })
- // console.log(this.attachListDisplay);
- // console.log(this.attachItems);
}
});
return await modal.present();
-
- // var modalPage = this.modalController.create('AddAttachPage', { indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID, enableBackdropDismiss: false });//enableBackdropDismiss: false ,enableBackdropDismiss: false
-
- // modalPage.onDidDismiss(data => {
- // if (data == "cancel" || data == "undefined") {
-
- // return;
- // }
-
- // else {
- // if (!str) {
-
- // // this.attachItems = data.map(function(el) {
- // // var o = Object.assign({}, el);
- // // o.isSuccess = false;
- // // return o;
- // // })
- // // this.objIndex1 =this.attachmentRes.findIndex(item => item == attachItems); //to use it in remove attach
- // //.ATTACHED_DOCUMENT_ID
- // this.updateFile(data, attachDocID);
- // }
-
- // else {
- // this.attachListDisplay = 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;
-
-
- // }
-
- // // this.attachListDisplay=data;
-
- // // this.attachItems = this.attachListDisplay.map(function(el) {
- // // var o = Object.assign({}, el);
- // // o.isSuccess = false;
- // // return o;
- // // })
- // // console.log(this.attachListDisplay);
- // // console.log(this.attachItems);
-
-
- // }// end else
- // });
- // modalPage.present();
-
}
removeFile(objectitem) {
diff --git a/Mohem/src/app/eit/eit.module.ts b/Mohem/src/app/eit/eit.module.ts
index 148cd9db..648bb042 100644
--- a/Mohem/src/app/eit/eit.module.ts
+++ b/Mohem/src/app/eit/eit.module.ts
@@ -11,6 +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 { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
const routes: Routes = [
@@ -58,6 +59,9 @@ const routes: Routes = [
ConfirmAddEitComponent,
AddAttachComponent
],
+ entryComponents: [
+ WorkListAttachViewComponent
+ ],
providers: [
DatePicker
]
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 fce8959a..f2fcc147 100644
--- a/Mohem/src/app/hmg-common/services/common/common.service.ts
+++ b/Mohem/src/app/hmg-common/services/common/common.service.ts
@@ -970,6 +970,19 @@ export class CommonService {
public openWorklistMainPage() {
this.nav.navigateForward(["/notification/worklist-main"]);
}
+
+ public openWorklistReplacementRollPage() {
+ this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
+ }
+public openNotificationDetailsPage(){
+ this.nav.navigateForward(["/notification/work-list-details"]);
+}
+public openWorklistHistoryPage(){
+ this.nav.navigateForward(["/notification/work-list-action-history"]);
+}
+public openWorklistAttachPage(){
+ this.nav.navigateForward(["/notification/work-list-attach"]);
+}
public reload(url: string, from: string) {
console.log("force reload called from:" + from);
// window.location.reload();
@@ -1125,6 +1138,7 @@ export class CommonService {
}
public formatDate(date) {
let FormatedDate;
+ console.log(date);
if (date) {
FormatedDate = date.replace(/-/g, "/");
FormatedDate = FormatedDate + " 00:00:00";
@@ -1133,4 +1147,19 @@ export class CommonService {
}
return FormatedDate;
}
+
+ public formatDateNew(date) {
+ let FormatedDate;
+ console.log(date);
+ if (date) {
+ // FormatedDate = date.replace(/-/g, "/");
+ FormatedDate = date.split("T")[0];
+ FormatedDate = FormatedDate + " 00:00:00";
+ console.log(FormatedDate);
+ } else {
+ FormatedDate = date;
+ }
+ return FormatedDate;
+ }
+
}
diff --git a/Mohem/src/app/notification/notification.module.ts b/Mohem/src/app/notification/notification.module.ts
index a5af9540..65f7109f 100644
--- a/Mohem/src/app/notification/notification.module.ts
+++ b/Mohem/src/app/notification/notification.module.ts
@@ -1,3 +1,6 @@
+import { WorkListAttachComponent } from './work-list-attach/work-list-attach.component';
+import { ViewNoteModalComponent } from './view-note-modal/view-note-modal.component';
+import { WorkListReplacementRollComponent } from './work-list-replacement-roll/work-list-replacement-roll.component';
import { HmgCommonModule } from './../hmg-common/hmg-common.module';
import { WorkListAttachViewComponent } from './work-list-attach-view/work-list-attach-view.component';
import { HomeComponent } from './home/home.component';
@@ -11,6 +14,13 @@ import { PipesModule } from '../pipes/pipes.module';
import { WorklistService } from './service/worklist.service';
import { WorklistMainComponent } from './worklist-main/worklist-main.component';
import { WorklistMainService } from './service/work-list.main.service';
+import { WorkListRfcComponent } from './work-list-rfc/work-list-rfc.component';
+import { ViewReplacementModalComponent } from './view-replacement-modal/view-replacement-modal.component';
+import { WorkListActionHistoryComponent } from './work-list-action-history/work-list-action-history.component';
+import { WorkListDetailsComponent } from './work-list-details/work-list-details.component';
+import { WorklistAttachService } from '../absence/service/work-list-attach.service';
+// import { WorklistMainComponent } from './worklist-main/worklist-main.component';
+
const routes: Routes = [
{
@@ -28,7 +38,40 @@ const routes: Routes = [
{
path:'worklist-main',
component:WorklistMainComponent
+ },
+ {
+ path: 'work-list-replacement-roll',
+ component: WorkListReplacementRollComponent
+ },
+ {
+ path: 'work-list-rfc',
+ component: WorkListRfcComponent
+ },
+ {
+ path: 'view-note-modal',
+ component: ViewNoteModalComponent
+ },
+ {
+ path: 'view-replacement-modal',
+ component: ViewReplacementModalComponent
+ },
+ {
+ path: 'work-list-action-history',
+ component: WorkListActionHistoryComponent
+ },
+ {
+ path: 'work-list-attach',
+ component: WorkListAttachComponent
+ },
+ {
+ path: 'work-list-details',
+ component: WorkListDetailsComponent
}
+
+ // {
+ // path:'worklist-main',
+ // component:WorklistMainComponent
+ // }
]
}
];
@@ -45,8 +88,16 @@ const routes: Routes = [
declarations: [
NotificationPage,
HomeComponent,
- WorklistMainComponent
+ WorklistMainComponent,
+ WorkListReplacementRollComponent,
+ WorkListRfcComponent,
+ ViewNoteModalComponent,
+ ViewReplacementModalComponent,
+ WorkListActionHistoryComponent,
+ WorkListAttachComponent,
+ WorkListDetailsComponent
+ // WorklistMainComponent
],
- providers:[WorklistService,WorklistMainService]
+ providers:[WorklistService,WorklistMainService, WorklistAttachService]
})
export class NotificationPageModule {}
diff --git a/Mohem/src/app/notification/service/worklist.service.ts b/Mohem/src/app/notification/service/worklist.service.ts
index 32335be1..6dce8f24 100644
--- a/Mohem/src/app/notification/service/worklist.service.ts
+++ b/Mohem/src/app/notification/service/worklist.service.ts
@@ -1,25 +1,49 @@
-import {Injectable} from '@angular/core';
-import {Http, Response, Headers} from "@angular/http";
+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 {WorkListRequest} from '../models/workListRequest';
-import {WorKListResponse} from '../models/workListResponse';
+import { Observable } from 'rxjs';
+import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeReq';
+import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
+import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes';
+import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
@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);
- }
+ public static getReplacmentEmployeeList = 'Services/ERP.svc/REST/GET_REPLACEMENT_LIST';
+ public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST';
+ public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY';
+
+ 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);
+ }
+
+ public getReplacmentEmployeeList(ReplacmentEmployeeRequest: any, onError?: any, errorLabel?: string): Observable {
+ const request = ReplacmentEmployeeRequest;
+ this.authService.authenticateRequest(request);
+ return this.api.post(WorklistService.getReplacmentEmployeeList, request, onError, errorLabel);
+ }
+
+ public getRFCEmployeeList(ActionHistoryRequest: any, onError?: any, errorLabel?: string): Observable {
+ const request = ActionHistoryRequest;
+ this.authService.authenticateRequest(request);
+ return this.api.post(WorklistService.getRFCEmployeeList, request, onError, errorLabel);
+ }
+
+ public getActionHistory(historyActionReq: any, onError?: any, errorLabel?: string): Observable {
+ const request = historyActionReq;
+ this.authService.authenticateRequest(request);
+ return this.api.post(WorklistService.getActionHistory, request, onError, errorLabel);
+ }
}
\ No newline at end of file
diff --git a/Mohem/src/app/notification/view-note-modal/view-note-modal.component.html b/Mohem/src/app/notification/view-note-modal/view-note-modal.component.html
new file mode 100644
index 00000000..14b1091b
--- /dev/null
+++ b/Mohem/src/app/notification/view-note-modal/view-note-modal.component.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/notification/view-note-modal/view-note-modal.component.scss b/Mohem/src/app/notification/view-note-modal/view-note-modal.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/Mohem/src/app/notification/view-note-modal/view-note-modal.component.spec.ts b/Mohem/src/app/notification/view-note-modal/view-note-modal.component.spec.ts
new file mode 100644
index 00000000..6a5e32fc
--- /dev/null
+++ b/Mohem/src/app/notification/view-note-modal/view-note-modal.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ViewNoteModalComponent } from './view-note-modal.component';
+
+describe('ViewNoteModalComponent', () => {
+ let component: ViewNoteModalComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ ViewNoteModalComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ViewNoteModalComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/notification/view-note-modal/view-note-modal.component.ts b/Mohem/src/app/notification/view-note-modal/view-note-modal.component.ts
new file mode 100644
index 00000000..357b7ec5
--- /dev/null
+++ b/Mohem/src/app/notification/view-note-modal/view-note-modal.component.ts
@@ -0,0 +1,24 @@
+import { Component, OnInit } from '@angular/core';
+import { ModalController } from '@ionic/angular';
+import { CommonService } from 'src/app/hmg-common/services/common/common.service';
+
+@Component({
+ selector: 'app-view-note-modal',
+ templateUrl: './view-note-modal.component.html',
+ styleUrls: ['./view-note-modal.component.scss'],
+})
+export class ViewNoteModalComponent implements OnInit {
+
+ getTextNote: any;
+
+ constructor(private modalCtrl: ModalController, private cs: CommonService) { }
+
+ ngOnInit() {
+ this.getTextNote = this.cs.sharedService.getSharedData('ViewNoteModalPage');
+ }
+
+ closeModal() {
+ this.modalCtrl.dismiss();
+ }
+
+}
diff --git a/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.html b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.html
new file mode 100644
index 00000000..72e7916b
--- /dev/null
+++ b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{RepList.USER_NAME}}
+ {{RepList.EMPLOYEE_DISPLAY_NAME}}
+ {{RepList.EMAIL_ADDRESS}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.scss b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.scss
new file mode 100644
index 00000000..b4736409
--- /dev/null
+++ b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.scss
@@ -0,0 +1,11 @@
+ion-content {
+ margin-top: 40px !important;
+ width: 95% !important;
+ height: 80% !important;
+ top: 5% !important;
+ left: 2% !important;
+ right: 5% !important;
+ bottom: 5% !important;
+ padding-top: 30px !important;
+ border: solid 1px #dedede;
+}
diff --git a/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.spec.ts b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.spec.ts
new file mode 100644
index 00000000..d6960f17
--- /dev/null
+++ b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ViewReplacementModalComponent } from './view-replacement-modal.component';
+
+describe('ViewReplacementModalComponent', () => {
+ let component: ViewReplacementModalComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ ViewReplacementModalComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ViewReplacementModalComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.ts b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.ts
new file mode 100644
index 00000000..8d1d54e5
--- /dev/null
+++ b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.ts
@@ -0,0 +1,76 @@
+import { WorklistService } from './../service/worklist.service';
+import { Component, OnInit } from '@angular/core';
+import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeReq';
+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';
+
+@Component({
+ selector: 'app-view-replacement-modal',
+ templateUrl: './view-replacement-modal.component.html',
+ styleUrls: ['./view-replacement-modal.component.scss'],
+})
+export class ViewReplacementModalComponent implements OnInit {
+
+ radioButtonValue: any;
+ getRepList: any;//WorKListReplacmentEmployeeResponse=new WorKListReplacmentEmployeeResponse();
+ IsReachEnd: boolean = false;
+ private getReplacmentEmployeeReq: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest();
+
+
+ constructor(private cs: CommonService, private ts: TranslatorService, public modalCtrl: ModalController, public worklistService: WorklistService) {
+ this.getReplacmentEmployeeReq = this.cs.sharedService.getSharedData('replacmentReqObj');
+ this.getRepList = this.cs.sharedService.getSharedData('replacmentResObj');
+ }
+
+ ngOnInit() { }
+
+ radioSelect(v) {
+ this.radioButtonValue = v;
+ }
+
+ OkBtnModal() {
+ if (!this.radioButtonValue) {
+ let msg: string = this.ts.trPK("replacementRoll", "msg");
+ this.cs.presentAlert(msg);
+ return;
+ } else {
+ let data = this.radioButtonValue;
+ this.modalCtrl.dismiss(data);
+ }
+ }
+
+ closeBtnModal() {
+ this.modalCtrl.dismiss("cancel");
+ }
+
+ doInfinite(infiniteScroll) {
+ if (!this.IsReachEnd) {
+ this.getReplacmentEmployeeReq.P_PAGE_NUM++;
+ this.worklistService.getReplacmentEmployeeList(this.getReplacmentEmployeeReq).
+ subscribe((result: any) => {
+ if (this.cs.validResponse(result)) {
+ if (result.ReplacementList != undefined) {
+ (result.ReplacementList).forEach(element => {
+ if (element.ROW_NUM == element.NO_OF_ROWS) {
+ this.IsReachEnd = true;
+ } else {
+ this.IsReachEnd = false;
+ }
+ this.getRepList.push(element);
+ });
+ }// if list length >0
+ else {
+ this.IsReachEnd = true;
+ }
+ }// if response == 1
+ //this.pageNum++;
+ infiniteScroll.target.complete();
+ });
+ } else {
+ if (infiniteScroll)
+ infiniteScroll.target.complete();
+ }
+ }//end infiniteScroll
+
+}
diff --git a/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.html b/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.html
new file mode 100644
index 00000000..daec1cf6
--- /dev/null
+++ b/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.html
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+ {{'worklistMain, actionHis' | translate}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.scss b/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.scss
new file mode 100644
index 00000000..5f7ccfcc
--- /dev/null
+++ b/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.scss
@@ -0,0 +1,55 @@
+ion-card-content.card-content.card-content-md,
+ion-card-content.card-content.card-content-ios {
+ padding: 0px;
+ margin: 0px;
+}
+.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;
+}
+.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 #d9d9d9;
+ }
+}
+.Header {
+ font-weight: bold;
+ // font-family: "WorkSans-SemiBold" !important;
+ color: #1a586d;
+ // padding: 0px !important;
+ // margin: 0px !important;
+}
+.titleH {
+ //background-color:$custgreen;
+ //height: 40px;
+ //line-height: 2;
+ font-size: 15px;
+ border: 1px solid #d9d9d9;
+ 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;
+}
diff --git a/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.spec.ts b/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.spec.ts
new file mode 100644
index 00000000..c214648a
--- /dev/null
+++ b/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { WorkListActionHistoryComponent } from './work-list-action-history.component';
+
+describe('WorkListActionHistoryComponent', () => {
+ let component: WorkListActionHistoryComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ WorkListActionHistoryComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(WorkListActionHistoryComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.ts b/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.ts
new file mode 100644
index 00000000..286f70c9
--- /dev/null
+++ b/Mohem/src/app/notification/work-list-action-history/work-list-action-history.component.ts
@@ -0,0 +1,107 @@
+import { ViewNoteModalComponent } from './../view-note-modal/view-note-modal.component';
+import { WorklistService } from './../service/worklist.service';
+import { Component, OnInit } from '@angular/core';
+import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
+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 { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
+
+@Component({
+ selector: 'app-work-list-action-history',
+ templateUrl: './work-list-action-history.component.html',
+ styleUrls: ['./work-list-action-history.component.scss'],
+})
+export class WorkListActionHistoryComponent implements OnInit {
+
+ private WorkListActionHistoryObj: WorkListActionHistoryRequest;
+ getPassNotificationDetails: any;
+ actionHistoryRes: any;
+ IsReachEnd: boolean = false;
+ P_PAGE_NUM: number = 1;
+ P_PAGE_LIMIT: number = 50;
+
+ constructor(private cs: CommonService, private ts: TranslatorService, private modalCtrl: ModalController, public worklistService: WorklistService) {
+ this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
+ this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
+ this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
+ this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
+ this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
+ }
+
+ ngOnInit() {
+ this.getActionHistory(this.WorkListActionHistoryObj);
+ }
+
+ getActionHistory(WorkListActionHistoryObj) {
+ this.IsReachEnd = false;
+ this.worklistService.getActionHistory(WorkListActionHistoryObj).
+ subscribe((result: WorkListActionHistoryResponse) => {
+ this.handleWorkListActionHistoryResult(result);
+ });
+
+
+ }
+ handleWorkListActionHistoryResult(result) {
+ if (this.cs.validResponse(result)) {
+ if (this.cs.hasData(result.GetActionHistoryList)) {
+ this.actionHistoryRes = result.GetActionHistoryList;
+ this.P_PAGE_NUM++;
+ let lastItemIndex = this.actionHistoryRes.length - 1;
+ if (result.GetActionHistoryList[lastItemIndex]) {
+ let lastitem = result.GetActionHistoryList[lastItemIndex];
+ if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
+ this.IsReachEnd = true;
+ } else {
+ this.IsReachEnd = false;
+ }
+ }
+ }
+ }
+ }
+
+ async openNoteDetail(note) {
+ // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
+ // modalPage.present();
+
+ this.cs.sharedService.setSharedData(note, 'ViewNoteModalPage')
+
+ const modal = await this.modalCtrl.create({
+ component: ViewNoteModalComponent
+ });
+
+ return await modal.present();
+ }
+
+ doInfinite(infiniteScroll) {
+ if (!this.IsReachEnd) {
+ this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
+ this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
+ subscribe((result: any) => {
+ if (this.cs.validResponse(result)) {
+ if (result.GetActionHistoryList != undefined) {
+ this.P_PAGE_NUM++;
+ (result.GetActionHistoryList).forEach(element => {
+ if (element.ROW_NUM == element.NO_OF_ROWS) {
+ this.IsReachEnd = true;
+ } else {
+ this.IsReachEnd = false;
+ }
+ this.actionHistoryRes.push(element);
+ }, (Error) => console.log(Error), () => infiniteScroll.target.complete());
+ }// if list length >0
+ else {
+ this.IsReachEnd = true;
+ }
+ }// if response == 1
+ //this.pageNum++;
+ infiniteScroll.target.complete();
+
+ });
+ } else {
+ if (infiniteScroll)
+ infiniteScroll.target.complete();
+ }
+ }//end infiniteScroll
+
+}
diff --git a/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.html b/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.html
index 59bda499..635bbcb9 100644
--- a/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.html
+++ b/Mohem/src/app/notification/work-list-attach-view/work-list-attach-view.component.html
@@ -1,6 +1,5 @@