fixed basic details modal issue

enad-Q1
umasoodch 4 years ago
parent 6a07e1d7b7
commit 436e85873f

@ -27,8 +27,8 @@ export class ConnectorService {
public static retryTimes = 0; public static retryTimes = 0;
public static timeOut = 120 * 1000; public static timeOut = 120 * 1000;
public static host = 'https://uat.hmgwebservices.com/'; // public static host = 'https://uat.hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/'; public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient, constructor(public httpClient: HttpClient,
public cs: CommonService, public cs: CommonService,

@ -315,22 +315,22 @@ export class HomeComponent implements OnInit {
modal.onDidDismiss() modal.onDidDismiss()
.then((data) => { .then((data) => {
console.log(data); console.log(data);
this.cs.sharedService.setSharedData(data.data, ProfileService.SELECTED_STATUS); if (data.data && data.data.actionClicked === 'next') {
if (data.data && data.data.data == 1 && source === 'address') { this.cs.sharedService.setSharedData(data.data, ProfileService.SELECTED_STATUS);
this.cs.sharedService.setSharedData(this.addressSubMenu, ProfileService.ADRESS_ENTRIES); if (data.data && data.data.data == 1 && source === 'address') {
this.cs.sharedService.setSharedData(this.employeeAdress, ProfileService.EMP_ADDRESS); this.cs.sharedService.setSharedData(this.addressSubMenu, ProfileService.ADRESS_ENTRIES);
this.cs.sharedService.setSharedData(this.country, ProfileService.COUNTRY); this.cs.sharedService.setSharedData(this.employeeAdress, ProfileService.EMP_ADDRESS);
this.cs.sharedService.setSharedData(this.country, ProfileService.COUNTRY);
this.cs.openAddAddress(); this.cs.openAddAddress();
} else if (data.data && data.data.data == 2 && source === 'address') { } else if (data.data && data.data.data == 2 && source === 'address') {
this.cs.openAddAddress(); this.cs.openAddAddress();
} else if (data.data && data.data.data == 1 && source === 'basicDetails') { } else if (data.data && data.data.data == 1 && source === 'basicDetails') {
this.cs.openAddBasicDetails('correct'); this.cs.openAddBasicDetails('correct');
} else if (data.data && data.data.data == 2 && source === 'basicDetails') { } else if (data.data && data.data.data == 2 && source === 'basicDetails') {
this.cs.openAddBasicDetails('new'); this.cs.openAddBasicDetails('new');
}
} }
}) })
return await modal.present(); return await modal.present();
} }

@ -27,11 +27,11 @@
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col> <ion-col>
<ion-button style=" width: 90%; background: white; --background: #b4b4b4" (click)="dismiss()">{{ts.trPK('eit','cancel-text')}}</ion-button> <ion-button style=" width: 90%; background: white; --background: #b4b4b4" (click)="dismiss('cancel')">{{ts.trPK('eit','cancel-text')}}</ion-button>
</ion-col> </ion-col>
<ion-col> <ion-col>
<ion-button style=" width: 90%; background: white; --background: #269db8" (click)="dismiss()" [disabled]="!isChange">{{ts.trPK('general','next')}}</ion-button> <ion-button style=" width: 90%; background: white; --background: #269db8" (click)="dismiss('next')" [disabled]="!isChange">{{ts.trPK('general','next')}}</ion-button>
</ion-col> </ion-col>
</ion-row> </ion-row>
</ion-grid> </ion-grid>

@ -19,11 +19,12 @@ export class EditDetailProfileComponent implements OnInit {
ngOnInit() { } ngOnInit() { }
dismiss() { dismiss(actionValue: any) {
// using the injected ModalController this page // using the injected ModalController this page
// can "dismiss" itself and optionally pass back data // can "dismiss" itself and optionally pass back data
this.modalController.dismiss({ this.modalController.dismiss({
'dismissed': true, dismissed: true,
actionClicked: actionValue,
data: this.isChange data: this.isChange
}); });
} }

Loading…
Cancel
Save