fixed structure issues

MOHEMM-SFH-COLORS
umasoodch 4 years ago
parent 86f8a25bee
commit 5ae2c2f170

@ -8,7 +8,8 @@ export class EitAddressRequest {
public P_FUNCTION_NAME: string;
public P_SELECTED_RESP_ID: Number;
P_DESC_FLEX_CONTEXT_CODE: string;
EITTransactionTBL: EitTransactionModel[];
P_COUNTRY_CODE: string
P_EFFECTIVE_DATE: string
P_TRANSACTION_VALUES_TBL: EitTransactionModel[];
P_COUNTRY_CODE: string;
P_EFFECTIVE_DATE: string;
P_ACTION: string;
}

@ -125,7 +125,7 @@ export class AddAddressComponent implements OnInit {
// this.functionName = this.getPassMnuEntryObj.FUNCTION_NAME;
// this.menuType = this.selMenu.List_Menu.MENU_TYPE;
// this.validateEitObj = this.addEITData.submitEITObjList;
// this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
// this.eitSubmitAction = this.cs.sharedService.getSharedData(
// EITTransactionsRequest.SUBMIT_EIT_ACTION
// );
@ -1506,8 +1506,8 @@ export class AddAddressComponent implements OnInit {
}
submitEit() {
let list = this.eitRequest.EITTransactionTBL;
this.eitRequest.EITTransactionTBL = this.fixTransactionNo(list);
// let list = this.eitRequest.EITTransactionTBL;
// this.eitRequest.EITTransactionTBL = this.fixTransactionNo(list);
this.eitService
.submitEit(this.eitRequest)
@ -1582,11 +1582,12 @@ export class AddAddressComponent implements OnInit {
P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,
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.functionName,
P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME,
P_DESC_FLEX_CONTEXT_CODE: this.eitResponse[0].DESC_FLEX_CONTEXT_CODE,
EITTransactionTBL: this.arrValues,
P_TRANSACTION_VALUES_TBL: this.arrValues,
P_COUNTRY_CODE: this.country,
P_EFFECTIVE_DATE: '28-June-2021'
P_EFFECTIVE_DATE: '28-June-2021',
P_ACTION: 'NEW'
};
this.profileService

@ -151,10 +151,13 @@
</ion-label>
</ion-col>
<ion-col size="2">
<ion-col size="2" *ngIf="basicDetailsSubMenu && basicDetailsSubMenu.UPDATE_BUTTON === 'Y'">
<img style="width: 70%;" src="../assets/imgs/profile-icons/editing@2x.png"
(click)="allowEdit('basic')">
</ion-col>
<ion-col size="2" *ngIf="basicDetailsSubMenu && basicDetailsSubMenu.ADD_BUTTON === 'Y'">
<ion-icon class="add-icon-styling" name="add"></ion-icon>
</ion-col>
</ion-row>
</ion-grid>
<br>
@ -182,7 +185,7 @@
</ion-card>
<ion-card *ngIf="addressSegment" [ngClass]="direction === 'ltr'? 'card-size-info-en': 'card-size-info-ar' ">
<!-- <ion-card-content *ngIf="!editAddress">
<ion-card-content *ngIf="!editAddress && employeeAdress">
<ion-grid>
<ion-row>
<ion-col size="10">
@ -191,42 +194,45 @@
</ion-label>
</ion-col>
<ion-col size="2">
<ion-col size="2" *ngIf="addressSubMenu && addressSubMenu.UPDATE_BUTTON === 'Y'" (click)="allowEdit('address')">
<img style="width: 70%;" src="../assets/imgs/profile-icons/editing@2x.png"
(click)="allowEdit('address')">
</ion-col>
<ion-col size="2" *ngIf="addressSubMenu && addressSubMenu.ADD_BUTTON === 'Y'" (click)="allowEdit('address')">
<ion-icon class="add-icon-styling" name="add"></ion-icon>
</ion-col>
</ion-row>
</ion-grid>
<br>
<ion-label>
<h3 class="type-label-text-form">{{ts.trPK('general','address')}}</h3>
<h3 class="type-label-text-form">{{ts.trPK('userProfile','address')}}</h3>
</ion-label>
<h3 class="result-label-text-form">Riyadh</h3>
<h3 class="result-label-text-form">{{address}}</h3>
<br>
<ion-label>
<h3 class="type-label-text-form">{{ts.trPK('general','street')}}</h3>
<h3 class="type-label-text-form">{{ts.trPK('userProfile','street')}}</h3>
</ion-label>
<h3 class="result-label-text-form">-</h3>
<h3 class="result-label-text-form">{{street}}</h3>
<br>
<ion-label>
<h3 class="type-label-text-form">{{ts.trPK('general','area')}}</h3>
<h3 class="type-label-text-form">{{ts.trPK('userProfile','area')}}</h3>
</ion-label>
<h3 class="result-label-text-form">-</h3>
<h3 class="result-label-text-form">{{area}}</h3>
<br>
<ion-label>
<h3 class="type-label-text-form">{{ts.trPK('general','p-o-box')}}</h3>
<h3 class="type-label-text-form">{{ts.trPK('userProfile','p-o-box')}}</h3>
</ion-label>
<h3 class="result-label-text-form">22617</h3>
<h3 class="result-label-text-form">{{poBox}}</h3>
<br>
<ion-label>
<h3 class="type-label-text-form">{{ts.trPK('general','city')}}</h3>
<h3 class="type-label-text-form">{{ts.trPK('userProfile','city')}}</h3>
</ion-label>
<h3 class="result-label-text-form">Riyadh</h3>
<h3 class="result-label-text-form">{{city}}</h3>
<br>
<ion-label>
<h3 class="type-label-text-form">{{ts.trPK('general','postal-code')}}</h3>
<h3 class="type-label-text-form">{{ts.trPK('userProfile','postal-code')}}</h3>
</ion-label>
<h3 class="result-label-text-form">11416</h3>
<h3 class="result-label-text-form">{{postalCode}}</h3>
<br>
</ion-card-content>
</ion-card>
@ -245,11 +251,11 @@
</ion-grid>
</ion-footer> -->
<ion-card-content>
<!-- <ion-card-content>
<ion-grid>
<ion-row>
<ion-col> <!-- Add condition employeeAdress here -->
<ion-col>
<ion-button (click)="presentModal()" class="add" >Update
</ion-button>
</ion-col>
@ -258,7 +264,6 @@
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card-content> -->
</ion-card>
</ion-content>

@ -1076,3 +1076,10 @@ $actionBtnSize: 36px;
.add{
--background: #00bcd4; background: white; width: 100%;
}
.add-icon-styling {
background-color: #191814;
width: 35px;
height: 35px;
color: white;
border-radius: 50%;
}

@ -41,7 +41,13 @@ export class HomeComponent implements OnInit {
public menuEntries: any;
public basicDetailsSubMenu: any;
public addressSubMenu: any;
transactionNo = 0;
public transactionNo = 0;
public address: any;
public street: any;
public area: any;
public poBox: any;
public city: any;
public postalCode: any;
public employeeAdress: any = [];
constructor(
@ -65,12 +71,20 @@ export class HomeComponent implements OnInit {
this.targetValue = params.targetValue;
if (this.targetValue === 'sideMenu') {
this.personalInfoSegment = true;
this.basicDetailsSegment = false;
this.addressSegment = false;
} else if (this.targetValue === 'basicDetails') {
this.personalInfoSegment = false;
this.basicDetailsSegment = true;
this.addressSegment = false;
} else if (this.targetValue === 'address') {
this.personalInfoSegment = false;
this.basicDetailsSegment = false;
this.addressSegment = true;
} else {
this.personalInfoSegment = true;
this.basicDetailsSegment = false;
this.addressSegment = false;
}
});
}
@ -106,7 +120,27 @@ export class HomeComponent implements OnInit {
}
console.log(this.basicDetailsSubMenu);
console.log(this.addressSubMenu);
}
public getProfile() {
console.log('getProfile');
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
console.log(user);
this.personalInfo = user;
if (this.cs.getUpdateImage().status) {
this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,' + this.cs.getUpdateImage().img);
} else {
this.user_image = user.EMPLOYEE_IMAGE
? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE
: '../assets/imgs/profile.png';
}
this.getBasicDetails();
this.getAddress();
}
});
}
public getBasicDetails() {
@ -119,7 +153,6 @@ export class HomeComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.employeeBasicDetails = result.GetEmployeeBasicDetailsList;
console.log(this.employeeBasicDetails);
this.getAddress();
for (let i = 0; i < this.employeeBasicDetails.length; i++) {
if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'FULL_NAME') {
this.fullName = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP;
@ -135,24 +168,31 @@ export class HomeComponent implements OnInit {
});
}
public getProfile() {
console.log('getProfile');
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
console.log(user);
this.personalInfo = user;
if (this.cs.getUpdateImage().status) {
this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,' + this.cs.getUpdateImage().img);
} else {
this.user_image = user.EMPLOYEE_IMAGE
? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE
: '../assets/imgs/profile.png';
public getAddress() {
const body = {
P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER,
P_MENU_TYPE: "E",
P_SELECTED_RESP_ID: -999
};
this.profileService.getEmployeeAddress(body).subscribe((result) => {
console.log(result);
this.employeeAdress = result.GetEmployeeAddressList;
for (let i = 0; i < this.employeeAdress.length; i++) {
if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'ADDRESS_LINE1') {
this.address = this.employeeAdress[i].SEGMENT_VALUE_DSP;
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'REGION_1') {
this.street = this.employeeAdress[i].SEGMENT_VALUE_DSP;
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'REGION_2') {
this.area = this.employeeAdress[i].SEGMENT_VALUE_DSP;
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'REGION_3') {
this.poBox = this.employeeAdress[i].SEGMENT_VALUE_DSP;
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'TOWN_OR_CITY') {
this.city = this.employeeAdress[i].SEGMENT_VALUE_DSP;
} else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'POSTAL_CODE') {
this.postalCode = this.employeeAdress[i].SEGMENT_VALUE_DSP;
}
this.getBasicDetails();
}
});
})
}
public openEditprofile() {
@ -228,7 +268,7 @@ export class HomeComponent implements OnInit {
this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: undefined, transNo: this.transactionNo }, 'AddEITData');
this.cs.openAddBasicDetails();
} else {
// this.cs.openProfile('address');
this.cs.openAddAddress();
}
}
@ -251,21 +291,11 @@ export class HomeComponent implements OnInit {
return await modal.present();
}
updateImageProfile() {
public updateImageProfile() {
this.cs.openChangeImagePage();
}
getAddress() {
const body = {
P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER,
P_MENU_TYPE: "E",
P_SELECTED_RESP_ID: -999
};
this.profileService.getEmployeeAddress(body).subscribe((result) => {
console.log(result);
this.employeeAdress = result.GetEmployeeAddressList;
})
}
openAddAddress() {
public openAddAddress() {
this.cs.openAddAddress();
}
}

Loading…
Cancel
Save