absence update
parent
84643553bf
commit
ef0c8a7b8a
@ -0,0 +1,136 @@
|
||||
|
||||
<ion-header >
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<ion-title color="light"> {{ts.trPK('submitAbsenceConfirm','submitAbsenceConfirm')}}</ion-title>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button color="light" class="btnBack" defaultHref=""></ion-back-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
|
||||
<ion-card>
|
||||
<ion-card-header class="boxHdr">
|
||||
<div class="hrTitle"> {{ts.trPK('confirmAddEit','approverList')}}</div>
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
|
||||
<ion-grid class=" gridAH" *ngIf="approversList?.length > 0">
|
||||
<ion-row class="rowAH titleH">
|
||||
<ion-col col-1>
|
||||
<label class="Header" for="">{{ts.trPK('confirmAddEit','no')}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label class="Header" for="">{{ts.trPK('confirmAddEit','approver')}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label class="Header" for="">{{ts.trPK('confirmAddEit','approverCategory')}} </label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label class="Header" for="">{{ts.trPK('confirmAddEit','approverType')}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-2>
|
||||
<label class="Header" for="">{{ts.trPK('confirmAddEit','status')}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row class="rowAH" *ngFor="let item of approversList">
|
||||
<ion-col col-1>
|
||||
<label for="">{{item.APPROVER_ORDER_NUMBER}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label for="">{{item.APPROVER}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label for="">{{item.APPROVER_CATEGORY}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label for="">{{item.APPROVER_TYPE}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-2>
|
||||
<label for="">{{item.APPROVAL_STATUS}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<ion-item padding>
|
||||
<ion-label class="boldTxtNav">{{ts.trPK('confirmAddEit','comment')}}</ion-label>
|
||||
<ion-textarea type="text" [(ngModel)]="absComments"></ion-textarea>
|
||||
</ion-item>
|
||||
|
||||
|
||||
<div>
|
||||
<ion-card>
|
||||
|
||||
<ion-card-header class="boxHdr">
|
||||
<div class="hrTitle">{{ts.trPK('confirmAddEit','attachList')}}</div>
|
||||
<button ion-button (click)="addAttachment(true,-1)">
|
||||
<img class="imgSize" src="../assets/imgs/attachment.png"></button>
|
||||
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-grid *ngIf="attachListOver?.length > 0">
|
||||
<div *ngFor="let attachList of attachListOver ; let i = index">
|
||||
<ion-row>
|
||||
<ion-col col-8>
|
||||
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
|
||||
</div>
|
||||
<ion-label>
|
||||
{{attachList.P_FILE_NAME }} </ion-label>
|
||||
|
||||
</ion-col>
|
||||
<ion-col col-4>
|
||||
<button float-end class="attachImgBtn"
|
||||
(click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
|
||||
<img class="attachImg" src="../assets/imgs/view.png">
|
||||
</button>
|
||||
<button float-end [disabled]="attachList.isSuccess" class="attachImgBtn"
|
||||
(click)="removeFile(attachList)"><img class="attachImg"
|
||||
src="../assets/imgs/deletegray.png"></button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
|
||||
</ion-grid>
|
||||
<ion-grid *ngIf="attachmentRes?.length > 0">
|
||||
<div *ngFor="let attachRes of attachmentRes">
|
||||
<ion-row>
|
||||
<ion-col col-8>
|
||||
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
|
||||
</div>
|
||||
<ion-label>
|
||||
{{attachRes.FILE_NAME }} </ion-label>
|
||||
|
||||
</ion-col>
|
||||
<ion-col col-4>
|
||||
<button float-end class="attachImgBtn"
|
||||
(click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
|
||||
<img class="attachImg" src="../assets/imgs/view.png">
|
||||
</button>
|
||||
<button float-end [disabled]="!isResubmitAbs" class="attachImgBtn"
|
||||
(click)="delelteFile(attachRes)"><img class="attachImg"
|
||||
src="../assets/imgs/deletegray.png"></button>
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
</div>
|
||||
|
||||
</ion-grid>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button color="customnavy" (click)="startAbApproval()">{{ts.trPK('confirmAddEit','start')}}</ion-button>
|
||||
</div>
|
||||
|
||||
</ion-footer>
|
||||
@ -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<AbsenceConfirmComponent>;
|
||||
|
||||
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();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,19 @@
|
||||
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";
|
||||
@Component({
|
||||
selector: 'app-absence-confirm',
|
||||
templateUrl: './absence-confirm.component.html',
|
||||
styleUrls: ['./absence-confirm.component.scss'],
|
||||
})
|
||||
export class AbsenceConfirmComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
public common: CommonService,
|
||||
public ts: TranslatorService,
|
||||
|
||||
) { }
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
}
|
||||
@ -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
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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();
|
||||
});
|
||||
});
|
||||
@ -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<any> {
|
||||
const request = req;
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.api.post(replacmentListService.getReplacmentEmployeeList, request, onError, errorLabel);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue