Merge branch 'sultan26April' into umar-q2-branch

# Conflicts:
#	Mohem/src/app/profile/home/home.component.html
#	Mohem/src/app/profile/home/home.component.ts
#	Mohem/src/app/profile/profile.module.ts
#	Mohem/src/app/profile/service/profile.service.ts
MOHEMM-SFH-COLORS
umasoodch 4 years ago
commit 86f8a25bee

@ -12,7 +12,7 @@
.alert-tappable.sc-ion-alert-md,
.alert-tappable.sc-ion-alert-ios {
height: 70px;
height: 50px;
}
.main-badge{
position: absolute;

@ -0,0 +1,14 @@
import { EitTransactionModel } from './eit.transaction.model';
export class EitAddressRequest {
public static SHARED_DATA = 'eit-request';
public P_MENU_TYPE: string;
public P_SELECTED_EMPLOYEE_NUMBER: string;
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
}

@ -8,4 +8,5 @@ export class EitRequest {
public P_SELECTED_RESP_ID: Number;
P_DESC_FLEX_CONTEXT_CODE: string;
EITTransactionTBL: EitTransactionModel[];
}

@ -1099,16 +1099,16 @@ export class CommonService {
public openChangePassword() {
this.nav.navigateForward(['/authentication/changepassowrd']);
}
// public openProfile() {
// this.nav.navigateForward(['/profile/home']);
// }
public openProfile(target: any) {
const navigationExtras: NavigationExtras = {
queryParams: {
targetValue: target
}
queryParams: {
targetValue: target
}
};
this.nav.navigateForward(['/profile/home'], navigationExtras);
}
@ -1141,11 +1141,11 @@ export class CommonService {
public openHRRequestFormPage() {
this.nav.navigateForward(['/mowadhafi/hr-request-form']);
}
public openRequestDetailsPage() {
public openRequestDetailsPage() {
this.nav.navigateForward(['/mowadhafi/request-details']);
}
public openPage(link: string) {
this.nav.navigateForward([link]);
@ -1247,6 +1247,9 @@ export class CommonService {
public openEditprofile() {
this.nav.navigateForward(['/profile/editProfile']);
}
public openAddAddress() {
this.nav.navigateForward(['/profile/add-address']);
}
public openPerformanceevaluation() {
this.nav.navigateForward(['/profile/performanceevaluation']);
}

@ -32,4 +32,5 @@ ion-card-header{
}
.details-button ion-button{
--background: #565656;
width: 125px;
}

@ -1,3 +1,34 @@
<p>
add-address works!
</p>
<app-generic-header
showBack="!getPassdirfromNotifiPage"
[updateDirection]="getPassdirfromNotifiPage"
[headerText]="headerTitle"
(trigger)="closeModal()"
>
</app-generic-header>
<ion-content padding>
<ion-item class="country dynamicField" lines="none">
<ion-label> {{ts.trPK('general','country')}}</ion-label>
<ion-select value="brown" okText="Okay" cancelText="Dismiss" [(ngModel)]="country">
<ion-select-option [value]="country.COUNTRY_CODE" *ngFor="let country of countries">{{country.COUNTRY_NAME}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item class="country dynamicField" lines="none">
<ion-label> Effective Date</ion-label>
<ion-datetime [(ngModel)]="effectiveDate" min="1900" max="2100" displayFormat="DD/MM/YYYY " placeholder="MM/DD/YYYY"
></ion-datetime>
</ion-item>
<div #containerDiv id="containerDiv">
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="validateEITTransaction()">
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,44 @@
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
ion-label {
color: var(--customnavy) !important;
}
.daynamicForm-Label {
font-size: 16px;
color: #a2a5a6 !important;
display: block;
overflow: hidden;
-webkit-flex: 1;
flex: 1;
font-size: inherit;
white-space: normal;
padding: 5px 0px;
margin: 10px auto;
padding-left: 10px;
}
.header-toolbar-new{
--background: #269DB8;
}
.addEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #269DB8;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}
.country{
margin-top: 10px;
padding: 10px;
}

File diff suppressed because it is too large Load Diff

@ -182,7 +182,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">
<ion-grid>
<ion-row>
<ion-col size="10">
@ -245,4 +245,20 @@
</ion-grid>
</ion-footer> -->
<ion-card-content>
<ion-grid>
<ion-row>
<ion-col> <!-- Add condition employeeAdress here -->
<ion-button (click)="presentModal()" class="add" >Update
</ion-button>
</ion-col>
<ion-col>
<ion-button class="update" (click)="openAddAddress()">Add</ion-button>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-content>

@ -1069,4 +1069,10 @@ $actionBtnSize: 36px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
}
.update{
--background: #20A169; background: white; width: 100%;
}
.add{
--background: #00bcd4; background: white; width: 100%;
}

@ -33,7 +33,7 @@ export class HomeComponent implements OnInit {
public editBasic = false;
public editAddress = false;
public targetValue: any;
public employeeBasicDetails: any = [];
public employeeBasicDetails: any = [];
public fullName: string;
public maritalStatus: string;
public birthDate: any;
@ -43,6 +43,7 @@ export class HomeComponent implements OnInit {
public addressSubMenu: any;
transactionNo = 0;
public employeeAdress: any = [];
constructor(
public ts: TranslatorService,
public cs: CommonService,
@ -64,9 +65,9 @@ export class HomeComponent implements OnInit {
this.targetValue = params.targetValue;
if (this.targetValue === 'sideMenu') {
this.personalInfoSegment = true;
} else if(this.targetValue === 'basicDetails') {
} else if (this.targetValue === 'basicDetails') {
this.basicDetailsSegment = true;
} else if(this.targetValue === 'address') {
} else if (this.targetValue === 'address') {
this.addressSegment = true;
} else {
this.personalInfoSegment = true;
@ -105,6 +106,7 @@ export class HomeComponent implements OnInit {
}
console.log(this.basicDetailsSubMenu);
console.log(this.addressSubMenu);
}
public getBasicDetails() {
@ -117,16 +119,17 @@ export class HomeComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.employeeBasicDetails = result.GetEmployeeBasicDetailsList;
console.log(this.employeeBasicDetails);
for( let i = 0; i < this.employeeBasicDetails.length; i++ ){
if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'FULL_NAME') {
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;
} else if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'MARITAL_STATUS') {
} else if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'MARITAL_STATUS') {
this.maritalStatus = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP;
} else if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'DATE_OF_BIRTH') {
} else if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'DATE_OF_BIRTH') {
this.birthDate = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP;
} else if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'NATIONAL_IDENTIFIER') {
} else if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'NATIONAL_IDENTIFIER') {
this.civilIdentityNumber = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP;
}
}
}
}
});
@ -186,8 +189,8 @@ export class HomeComponent implements OnInit {
}
}
public selectedSegment(segmentData){
switch (segmentData){
public selectedSegment(segmentData) {
switch (segmentData) {
case "personal":
this.personalInfoSegment = true;
this.basicDetailsSegment = false;
@ -212,10 +215,6 @@ export class HomeComponent implements OnInit {
}
}
public getFunction (value: string) {
}
public allowEdit(allowVal: string){
let selMenu: MenuResponse = new MenuResponse();
@ -233,8 +232,8 @@ export class HomeComponent implements OnInit {
}
}
public disableEdit(disableVal){
switch(disableVal){
public disableEdit(disableVal) {
switch (disableVal) {
case 1:
this.editBasic = false;
break;
@ -255,5 +254,19 @@ export class HomeComponent implements OnInit {
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() {
this.cs.openAddAddress();
}
}

@ -12,12 +12,13 @@ import { DatePicker } from "@ionic-native/date-picker/ngx";
import { ProfilePage } from './profile.page';
import { HomeComponent } from './home/home.component';
import {EditProfileComponent} from './edit-profile/edit-profile.component';
import {ProfileImageComponent} from './profile-image/profile-image.component'
import {PerformanceEvaluationComponent} from './performance-evaluation/performance-evaluation.component'
import { EditProfileComponent } from './edit-profile/edit-profile.component';
import { ProfileImageComponent } from './profile-image/profile-image.component'
import { PerformanceEvaluationComponent } from './performance-evaluation/performance-evaluation.component'
import { from } from 'rxjs';
import { EditDetailProfileComponent } from './modal/edit-detail-profile/edit-detail-profile.component';
import { AddBasicDetailsComponent } from './add-basic-details/add-basic-details.component';
import { AddAddressComponent } from './add-address/add-address.component';
const routes: Routes = [
{
@ -25,8 +26,12 @@ const routes: Routes = [
component: ProfilePage,
children: [
{
path: 'home',
component: HomeComponent
path: 'home',
component: HomeComponent
},
{
path: 'add-address',
component: AddAddressComponent
}
],
},
@ -35,11 +40,11 @@ const routes: Routes = [
component: ProfilePage,
children: [
{
path: 'profileImg',
component: ProfileImageComponent
path: 'profileImg',
component: ProfileImageComponent
}
],
},
{
@ -47,8 +52,8 @@ const routes: Routes = [
component: ProfilePage,
children: [
{
path: 'editprofile',
component: EditProfileComponent
path: 'editprofile',
component: EditProfileComponent
}
],
},
@ -58,8 +63,8 @@ const routes: Routes = [
component: ProfilePage,
children: [
{
path: 'performanceevaluation',
component: PerformanceEvaluationComponent
path: 'performanceevaluation',
component: PerformanceEvaluationComponent
}
],
},
@ -86,17 +91,16 @@ const routes: Routes = [
NgxChartsModule,
RouterModule.forChild(routes)
],
providers: [
DatePicker
],
declarations: [
ProfilePage,
EditDetailProfileComponent,
AddAddressComponent,
HomeComponent,
ProfileImageComponent,
EditProfileComponent,
PerformanceEvaluationComponent,
AddBasicDetailsComponent],
entryComponents:[EditDetailProfileComponent]
entryComponents: [EditDetailProfileComponent],
providers: [DatePicker]
})
export class ProfilePageModule {}
export class ProfilePageModule { }

@ -25,6 +25,11 @@ export class ProfileService {
public static addAttachment = 'Services/ERP.svc/REST/ADD_ATTACHMENT';
public static cancelHRTransaction = 'Services/ERP.svc/REST/CANCEL_HR_TRANSACTION';
public static getAttach = 'Services/ERP.svc/REST/GET_ATTACHMENTS';
public static getEmployeeAddress = "Services/ERP.svc/REST/GET_EMPLOYEE_ADDRESS";
public static getCountries = "Services/ERP.svc/REST/GET_COUNTRIES";
public static getDiffStructure = "Services/ERP.svc/REST/GET_ADDRESS_DFF_STRUCTURE"
public static submitAddressTransactions = "Services/ERP.svc/REST/SUBMIT_ADDRESS_TRANSACTION"
constructor(
public con: ConnectorService,
@ -43,6 +48,12 @@ export class ProfileService {
);
}
public getEmployeeAddress(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = basicEmployeeDetailsRequest;
this.authService.authenticateRequest(request);
return this.con.post(ProfileService.getEmployeeAddress, request, onError, errorLabel);
}
public getEmployeeBasicDetails(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = basicEmployeeDetailsRequest;
this.authService.authenticateRequest(request);
@ -79,4 +90,20 @@ export class ProfileService {
this.authService.authenticateRequest(request);
return this.con.post(ProfileService.submitEit, request, onError, errorLabel);
}
public getCountries(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = basicEmployeeDetailsRequest;
this.authService.authenticateRequest(request);
return this.con.post(ProfileService.getCountries, request, onError, errorLabel);
}
public getAddressDiffStructure(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = basicEmployeeDetailsRequest;
this.authService.authenticateRequest(request);
return this.con.post(ProfileService.getDiffStructure, request, onError, errorLabel);
}
public submitAddressTransaction(validateEITTransactionReq: any, onError?: any, errorLabel?: string): Observable<any> {
const request = validateEITTransactionReq;
this.authService.authenticateRequest(request);
return this.con.post(ProfileService.submitAddressTransactions, request, onError, errorLabel);
}
}
Loading…
Cancel
Save