Q3 changes
parent
3be79111d2
commit
d4c09d7eb7
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
<app-generic-header
|
||||||
|
showBack="!getPassdirfromNotifiPage"
|
||||||
|
[updateDirection]="getPassdirfromNotifiPage"
|
||||||
|
[headerText]="headerTitle"
|
||||||
|
(trigger)="closeModal()"
|
||||||
|
class="dependent-title"
|
||||||
|
>
|
||||||
|
</app-generic-header>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-content padding>
|
||||||
|
<ion-item class="country dynamicField" lines="none" *ngIf="targetValue === 'correct' && showEffectiveDate">
|
||||||
|
<ion-label>Effective Date</ion-label>
|
||||||
|
<ion-label>{{showEffectiveDate}}</ion-label>
|
||||||
|
</ion-item>
|
||||||
|
<div #containerDiv id="containerDiv">
|
||||||
|
<div #containerDivTwo id="containerDivTwo"></div>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
<ion-footer>
|
||||||
|
<div class="centerDiv">
|
||||||
|
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="submitBasicDetailsTransaction()">
|
||||||
|
{{'vacation-rule, next-label' | translate}}</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 { AddUpdateContactComponent } from './add-update-contact.component';
|
||||||
|
|
||||||
|
describe('AddUpdateContactComponent', () => {
|
||||||
|
let component: AddUpdateContactComponent;
|
||||||
|
let fixture: ComponentFixture<AddUpdateContactComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ AddUpdateContactComponent ],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(AddUpdateContactComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,53 @@
|
|||||||
|
<ion-content>
|
||||||
|
<div class="head-title">
|
||||||
|
|
||||||
|
<app-generic-header showImage="false" showBack="true" [headerText]="'general,contact' | translate">
|
||||||
|
</app-generic-header>
|
||||||
|
</div>
|
||||||
|
<div class="header"></div>
|
||||||
|
<div class="bottom"></div>
|
||||||
|
<div class="container" id="containerDiv">
|
||||||
|
<ion-card class="add-new-row-card">
|
||||||
|
<div class="new-row" (click)="addNewRow()">
|
||||||
|
<p>
|
||||||
|
<img class="add-icons" src="assets/imgs/itemsforsale/add.svg"> {{ts.trPK('general','add-new-row')}}
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</ion-card>
|
||||||
|
<div class="" *ngFor="let phone of phoneNumbers">
|
||||||
|
<ion-card class="phoneContainer" *ngIf="!phone['DELETE_ROW']">
|
||||||
|
<ion-row >
|
||||||
|
<ion-col size="12">
|
||||||
|
<div [ngClass]=" direction === 'en' ? 'custom-text-area-element Field-en' : 'custom-text-area-element Field-ar'" >
|
||||||
|
|
||||||
|
<label class="label" position='floating' class="colBold requiredClass">{{ 'general,select' | translate}} </label>
|
||||||
|
<select name="selectAbsenceType" class="label-Select" #selectAbsenceType="ngModel" [(ngModel)]="phone.PHONE_TYPE" required>
|
||||||
|
<option value="noType" selected hidden selected><p>{{ts.trPK('absenceList','selectType')}}</p></option>
|
||||||
|
<option *ngFor="let obj of objectValue" [value]="obj.CODE">{{ obj.MEANING}} </option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col size="12">
|
||||||
|
<div [ngClass]=" direction === 'en' ? 'custom-text-area-element Field-en' : 'custom-text-area-element Field-ar'" >
|
||||||
|
|
||||||
|
<ion-input class="login-input" required type="tel" [(ngModel)]="phone.PHONE_NUMBER">
|
||||||
|
</ion-input>
|
||||||
|
</div>
|
||||||
|
</ion-col>
|
||||||
|
<div class="delete-icon" (click)="deleteRow(phone)">
|
||||||
|
<p><img class="icons-delete" src="assets/imgs/itemsforsale/delete.svg"> {{ts.trPK('general','delete')}}</p>
|
||||||
|
</div>
|
||||||
|
</ion-row>
|
||||||
|
</ion-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
||||||
|
<ion-footer>
|
||||||
|
<div class="centerDiv">
|
||||||
|
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; width:80%" ion-button [disabled]="phoneNumbers.length==0" (click)="updatePhone()">
|
||||||
|
{{'userProfile, update' | translate}}</ion-button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ion-footer>
|
||||||
|
|
||||||
@ -0,0 +1,118 @@
|
|||||||
|
.bold{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
#containerDiv{
|
||||||
|
|
||||||
|
margin: 20px 0px;
|
||||||
|
}
|
||||||
|
.padding{
|
||||||
|
padding-left:5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
.color-black{
|
||||||
|
color:#000;
|
||||||
|
}
|
||||||
|
.date{
|
||||||
|
position: absolute;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 10px;
|
||||||
|
right:0;
|
||||||
|
width: 100px;
|
||||||
|
color:#969696;
|
||||||
|
}
|
||||||
|
.transaction-list{
|
||||||
|
margin-top:20px;
|
||||||
|
}
|
||||||
|
.date-container{
|
||||||
|
margin:0px 20px;
|
||||||
|
}
|
||||||
|
.colBold{
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.label{
|
||||||
|
font-size: 12px;
|
||||||
|
// margin-left: 15px;
|
||||||
|
color: #a2a5a6 !important;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
-ms-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
/* font-size: inherit; */
|
||||||
|
// text-overflow: ellipsis;
|
||||||
|
// white-space: nowrap;
|
||||||
|
white-space: normal;
|
||||||
|
// padding-top: 10px;
|
||||||
|
padding: 5px 0px;
|
||||||
|
padding-left: 10px !important;
|
||||||
|
margin: 10px auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.Field-en{
|
||||||
|
border-radius: 30px;
|
||||||
|
border: 1px solid #a2a5a6!important;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
padding-left: 10px !important;
|
||||||
|
padding-top: 6px !important;
|
||||||
|
color: #999999 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Field-ar{
|
||||||
|
border-radius: 30px;
|
||||||
|
border: 1px solid #a2a5a6!important;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding-right: 20px !important;
|
||||||
|
padding-top: 6px !important;
|
||||||
|
color: #999999 !important;
|
||||||
|
}
|
||||||
|
select{
|
||||||
|
width: 85% !important;
|
||||||
|
border: none !important;
|
||||||
|
position: relative;
|
||||||
|
bottom: 5px;
|
||||||
|
}
|
||||||
|
.delete-icon{
|
||||||
|
position: absolute;
|
||||||
|
right: 20px;
|
||||||
|
bottom: -10px;
|
||||||
|
color: #d60505;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.phoneContainer{
|
||||||
|
position: relative;
|
||||||
|
margin-top: 15px;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0px 0px 3px 0px #ccc
|
||||||
|
}
|
||||||
|
.new-row{
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
color: #259CB8;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.add-new-row-card{
|
||||||
|
box-shadow: none;
|
||||||
|
background: #d6d6d652;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
.add-icons{
|
||||||
|
height: 22px;
|
||||||
|
width: 22px;
|
||||||
|
display: inline-flex;
|
||||||
|
background: #259CB8;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 5px;
|
||||||
|
top: 5px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.icons-delete{
|
||||||
|
height: 16px;
|
||||||
|
width: 13px;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ConatactComponent } from './contact.component';
|
||||||
|
|
||||||
|
describe('ContactComponent', () => {
|
||||||
|
let component: ConatactComponent;
|
||||||
|
let fixture: ComponentFixture<ConatactComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ConatactComponent],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ConatactComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { AddEitResponse } from 'src/app/eit/models/add.eit.response';
|
||||||
|
import { EitRequest } from 'src/app/eit/models/eit.request';
|
||||||
|
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||||
|
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
|
||||||
|
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||||
|
import { ProfileService } from '../service/profile.service';
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-conatact',
|
||||||
|
templateUrl: './contact.component.html',
|
||||||
|
styleUrls: ['./contact.component.scss'],
|
||||||
|
})
|
||||||
|
export class ConatactComponent implements OnInit {
|
||||||
|
public phoneNumbers: any = [];
|
||||||
|
public objectValue: any = [];
|
||||||
|
direction: any;
|
||||||
|
selEmp: any;
|
||||||
|
respID: any;
|
||||||
|
selMenu: any;
|
||||||
|
submitrequest: any;
|
||||||
|
constructor(public cs: CommonService, public ts: TranslatorService, public profileService: ProfileService,) {
|
||||||
|
this.direction = TranslatorService.getCurrentLanguageName();
|
||||||
|
this.selEmp = this.cs.sharedService.getSharedData(
|
||||||
|
MenuResponse.SHARED_SEL_EMP,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
this.respID = this.cs.sharedService.getSharedData(
|
||||||
|
MenuResponse.SHARED_SEL_RESP_ID,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
this.selMenu = new MenuResponse();
|
||||||
|
this.selMenu = this.cs.sharedService.getSharedData(
|
||||||
|
MenuResponse.SHARED_DATA,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.phoneNumbers = this.cs.sharedService.getSharedData(ProfileService.EMP_PHONE, false);
|
||||||
|
this.setIsUpdated();
|
||||||
|
this.direction = TranslatorService.getCurrentLanguageName();
|
||||||
|
this.getObjectValue();
|
||||||
|
}
|
||||||
|
setIsUpdated() {
|
||||||
|
this.phoneNumbers.forEach(element => {
|
||||||
|
element['ACTION'] = 'UPDATE_ROW';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getObjectValue() {
|
||||||
|
this.profileService.getObjectValue({
|
||||||
|
'P_OBJECT_TYPE': 'LOOKUP',
|
||||||
|
'P_OBJECT_NAME': 'PHONE_TYPE'
|
||||||
|
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
|
||||||
|
if (this.cs.validResponse(response)) {
|
||||||
|
console.log(response);
|
||||||
|
this.objectValue = response['GetObjectValuesList'];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
setIsDeletedStatus() {
|
||||||
|
this.phoneNumbers.forEach(element => {
|
||||||
|
if (element['DELETE_ROW'] == true) {
|
||||||
|
element['ACTION'] = 'DELETE_ROW';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
updatePhone() {
|
||||||
|
|
||||||
|
this.setIsDeletedStatus();
|
||||||
|
console.log(this.phoneNumbers);
|
||||||
|
this.submitrequest = {
|
||||||
|
|
||||||
|
P_MENU_TYPE: this.selMenu.List_Menu.MENU_TYPE,
|
||||||
|
P_SELECTED_RESP_ID: this.respID, //this.selMenu.List_Menu.RESP_ID,//-999,
|
||||||
|
P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME,
|
||||||
|
P_MBL_PHONES_TBL: this.phoneNumbers,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
this.profileService.submitPhoneTransaction(this.submitrequest, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
|
||||||
|
if (this.cs.validResponse(response)) {
|
||||||
|
console.log(response);
|
||||||
|
this.handleSubmitEitResult(response);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
addNewRow() {
|
||||||
|
this.phoneNumbers.push({ 'PHONE_NUMBER': '', 'PHONE_TYPE': '', 'ACTION': 'NEW_ROW', 'OBJECT_VERSION_NUMBER': null, 'PHONE_ID': null })
|
||||||
|
}
|
||||||
|
deleteRow(row) {
|
||||||
|
row['DELETE_ROW'] = true;
|
||||||
|
// this.phoneNumbers =
|
||||||
|
// this.phoneNumbers.filter(item => item !== row);
|
||||||
|
console.log(this.phoneNumbers);
|
||||||
|
|
||||||
|
}
|
||||||
|
handleSubmitEitResult(result) {
|
||||||
|
if (this.cs.validResponse(result)) {
|
||||||
|
this.cs.sharedService.setSharedData(
|
||||||
|
this.submitrequest,
|
||||||
|
EitRequest.SHARED_DATA
|
||||||
|
);
|
||||||
|
this.cs.sharedService.setSharedData(result, AddEitResponse.SHARED_DATA);
|
||||||
|
this.cs.sharedService.setSharedData(true, AddEitResponse.isContact);
|
||||||
|
this.cs.sharedService.setSharedData(
|
||||||
|
{ isResubmit: false },
|
||||||
|
"confirmAddEITData"
|
||||||
|
);
|
||||||
|
this.cs.openConfirmAddAddress();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
import { EitTransactionModel } from './eit.transaction.model';
|
||||||
|
|
||||||
|
export class ContactRequest {
|
||||||
|
public static SHARED_DATA = 'basic-request';
|
||||||
|
public P_MENU_TYPE: string;
|
||||||
|
public P_SELECTED_EMPLOYEE_NUMBER: string;
|
||||||
|
public P_FUNCTION_NAME: string;
|
||||||
|
public P_SELECTED_RESP_ID: Number;
|
||||||
|
public P_CONTACT_RELATIONSHIP_ID: number;
|
||||||
|
EITTransactionTBL: EitTransactionModel[];
|
||||||
|
P_ACTION_TYPE: string;
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
module.exports = {
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.*pdfjs-dist.*$/,
|
||||||
|
use: {
|
||||||
|
loader: 'babel-loader',
|
||||||
|
options: {
|
||||||
|
presets: ['@babel/preset-env']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue