user profile

MOHEMM-Q3-DEV-LATEST
Sultan Khan 5 years ago
parent 25a920b3ef
commit 9e509e143f

@ -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);
}
@ -1138,11 +1138,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]);
@ -1244,6 +1244,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

@ -367,7 +367,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">
@ -515,6 +515,21 @@
</ion-col>
</ion-row>
</ion-grid>
</ion-footer>
</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%;
}

@ -32,12 +32,12 @@ 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;
public civilIdentityNumber: any;
public employeeAdress: any = [];
constructor(
public ts: TranslatorService,
public cs: CommonService,
@ -59,9 +59,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;
@ -71,6 +71,7 @@ export class HomeComponent implements OnInit {
ngOnInit() {
this.getProfile();
}
public getBasicDetails() {
@ -83,16 +84,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;
}
}
}
}
});
@ -152,8 +154,8 @@ export class HomeComponent implements OnInit {
}
}
public selectedSegment(segmentData){
switch (segmentData){
public selectedSegment(segmentData) {
switch (segmentData) {
case "personal":
this.personalInfoSegment = true;
this.basicDetailsSegment = false;
@ -178,8 +180,8 @@ export class HomeComponent implements OnInit {
}
}
public allowEdit(allowVal){
switch(allowVal){
public allowEdit(allowVal) {
switch (allowVal) {
case 1:
this.editBasic = true;
break;
@ -189,8 +191,8 @@ export class HomeComponent implements OnInit {
}
}
public disableEdit(disableVal){
switch(disableVal){
public disableEdit(disableVal) {
switch (disableVal) {
case 1:
this.editBasic = false;
break;
@ -211,5 +213,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();
}
}

@ -11,11 +11,13 @@ import { NgxChartsModule } from '@swimlane/ngx-charts';
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 { AddAddressComponent } from './add-address/add-address.component';
import { DatePicker } from '@ionic-native/date-picker/ngx';
const routes: Routes = [
{
@ -23,8 +25,12 @@ const routes: Routes = [
component: ProfilePage,
children: [
{
path: 'home',
component: HomeComponent
path: 'home',
component: HomeComponent
},
{
path: 'add-address',
component: AddAddressComponent
}
],
},
@ -33,11 +39,11 @@ const routes: Routes = [
component: ProfilePage,
children: [
{
path: 'profileImg',
component: ProfileImageComponent
path: 'profileImg',
component: ProfileImageComponent
}
],
},
{
@ -45,8 +51,8 @@ const routes: Routes = [
component: ProfilePage,
children: [
{
path: 'editprofile',
component: EditProfileComponent
path: 'editprofile',
component: EditProfileComponent
}
],
},
@ -56,8 +62,8 @@ const routes: Routes = [
component: ProfilePage,
children: [
{
path: 'performanceevaluation',
component: PerformanceEvaluationComponent
path: 'performanceevaluation',
component: PerformanceEvaluationComponent
}
],
},
@ -73,7 +79,8 @@ const routes: Routes = [
NgxChartsModule,
RouterModule.forChild(routes)
],
declarations: [ProfilePage ,EditDetailProfileComponent, HomeComponent,ProfileImageComponent,EditProfileComponent,PerformanceEvaluationComponent],
entryComponents:[EditDetailProfileComponent]
declarations: [ProfilePage, EditDetailProfileComponent, AddAddressComponent, HomeComponent, ProfileImageComponent, EditProfileComponent, PerformanceEvaluationComponent],
entryComponents: [EditDetailProfileComponent],
providers: [DatePicker]
})
export class ProfilePageModule {}
export class ProfilePageModule { }

@ -6,29 +6,53 @@ import { AuthenticationService } from "src/app/hmg-common/services/authenticatio
providedIn: 'root'
})
export class ProfileService {
public static updateEmpImage ="Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE";
public static getEmployeeBasicDetails ="Services/ERP.svc/REST/GET_EMPLOYEE_BASIC_DETAILS";
public static updateEmpImage = "Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE";
public static getEmployeeBasicDetails = "Services/ERP.svc/REST/GET_EMPLOYEE_BASIC_DETAILS";
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 api: ConnectorService,
public authService: AuthenticationService
) { }
constructor(
public api: ConnectorService,
public authService: AuthenticationService
) {}
public updateImageProfile(updateImgRequest: any, onError?: any, errorLabel?: string
): Observable<any> {
const request = updateImgRequest;
this.authService.authenticateRequest(request);
return this.api.post(
ProfileService.updateEmpImage,
request,
onError,
errorLabel
);
}
public updateImageProfile( updateImgRequest: any,onError?: any,errorLabel?: string
): Observable<any> {
const request = updateImgRequest;
this.authService.authenticateRequest(request);
return this.api.post(
ProfileService.updateEmpImage,
request,
onError,
errorLabel
);
}
public getEmployeeBasicDetails(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = basicEmployeeDetailsRequest;
this.authService.authenticateRequest(request);
return this.api.post(ProfileService.getEmployeeBasicDetails, request, onError, errorLabel);
}
public getEmployeeAddress(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = basicEmployeeDetailsRequest;
this.authService.authenticateRequest(request);
return this.api.post(ProfileService.getEmployeeAddress, request, onError, errorLabel);
}
public getCountries(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = basicEmployeeDetailsRequest;
this.authService.authenticateRequest(request);
return this.api.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.api.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.api.post(ProfileService.submitAddressTransactions, request, onError, errorLabel);
}
public getEmployeeBasicDetails(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = basicEmployeeDetailsRequest;
this.authService.authenticateRequest(request);
return this.api.post(ProfileService.getEmployeeBasicDetails, request, onError, errorLabel);
}
}
Loading…
Cancel
Save