Commit eb47c8ee by Muhammad Usman

privacy policy

parent e16d05d1
...@@ -51,7 +51,7 @@ export class ForgotPasswordComponent extends BaseComponent { ...@@ -51,7 +51,7 @@ export class ForgotPasswordComponent extends BaseComponent {
} }
openPrivacyPolicy(): void { openPrivacyPolicy(): void {
window.location.href = EXTERNAL_LINKS.PRIVACY_POLICY; window.open(EXTERNAL_LINKS.PRIVACY_POLICY, '_blank');
} }
} }
...@@ -80,7 +80,7 @@ export class LoginComponent extends BaseComponent { ...@@ -80,7 +80,7 @@ export class LoginComponent extends BaseComponent {
} }
openPrivacyPolicy(): void { openPrivacyPolicy(): void {
window.location.href = EXTERNAL_LINKS.PRIVACY_POLICY; window.open(EXTERNAL_LINKS.PRIVACY_POLICY, '_blank')
} }
} }
...@@ -71,11 +71,11 @@ export class RegisterComponent extends BaseComponent implements OnInit { ...@@ -71,11 +71,11 @@ export class RegisterComponent extends BaseComponent implements OnInit {
} }
openTermsAndConditions(): void { openTermsAndConditions(): void {
window.location.href = EXTERNAL_LINKS.TERMS_CONDITIONS; window.open(EXTERNAL_LINKS.TERMS_CONDITIONS, '_blank');
} }
openPrivacyPolicy(): void { openPrivacyPolicy(): void {
window.location.href = EXTERNAL_LINKS.PRIVACY_POLICY; window.open(EXTERNAL_LINKS.PRIVACY_POLICY, '_blank');
} }
} }
...@@ -67,7 +67,7 @@ export class ResetPasswordComponent extends BaseComponent implements OnInit { ...@@ -67,7 +67,7 @@ export class ResetPasswordComponent extends BaseComponent implements OnInit {
} }
openPrivacyPolicy(): void { openPrivacyPolicy(): void {
window.location.href = EXTERNAL_LINKS.PRIVACY_POLICY; window.open(EXTERNAL_LINKS.PRIVACY_POLICY, '_blank')
} }
} }
...@@ -32,7 +32,7 @@ export class LeftSidebarComponent extends BaseComponent { ...@@ -32,7 +32,7 @@ export class LeftSidebarComponent extends BaseComponent {
} }
openPrivacyPolicy(): void { openPrivacyPolicy(): void {
window.location.href = EXTERNAL_LINKS.PRIVACY_POLICY; window.open(EXTERNAL_LINKS.PRIVACY_POLICY, '_blank')
} }
} }
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
<div class="col-md-6 form-group"> <div class="col-md-6 form-group">
<label>Mobile</label> <label>Mobile</label>
<app-form-control> <app-form-control>
<p-inputMask mask="9999 999 9999" styleClass="form-control" placeholder="Mobile No" [(ngModel)]="careerProfile.Mobile" name="Mobile"> <p-inputMask (focusout)="checkMobilePattern()" slotChar="-" [unmask]="true" [autoClear]="true" mask="9999 999 9999" styleClass="form-control" placeholder="Mobile No" [(ngModel)]="careerProfile.Mobile" name="Mobile">
</p-inputMask> </p-inputMask>
</app-form-control> </app-form-control>
<div class="mobile-no-msg" *ngIf="!careerProfile.Mobile && !isLoading"> <div class="mobile-no-msg" *ngIf="!careerProfile.Mobile || careerProfile.Mobile.length < 11">
You did not enter a mobile phone number. We occasionally try to contact you via text message. You did not enter a mobile phone number. We occasionally try to contact you via text message.
</div> </div>
</div> </div>
......
...@@ -119,15 +119,20 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit { ...@@ -119,15 +119,20 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit {
}) })
} }
updateAddress($event): void { checkMobilePattern() {
console.log($event); if (this.careerProfile.Mobile && this.careerProfile.Mobile.length < 11) {
this.careerProfile.GoogleAddress = $event.address; this.careerProfile.Mobile = '';
}
} }
changedAddress(): void { changedAddress(): void {
this.careerProfile.GoogleAddress = ' '; this.careerProfile.GoogleAddress = ' ';
} }
updateAddress($event): void {
this.careerProfile.GoogleAddress = $event.formatted;
}
connectWithSocial(type): void { connectWithSocial(type): void {
const params = { const params = {
environment: environment.envName, environment: environment.envName,
......
import { Directive, ElementRef, EventEmitter, OnInit, Output } from '@angular/core'; import { Directive, ElementRef, EventEmitter, NgZone, OnInit, Output } from '@angular/core';
declare var google: any; declare var google: any;
...@@ -15,8 +15,8 @@ export class GooglePlacesAutocompleteDirective implements OnInit { ...@@ -15,8 +15,8 @@ export class GooglePlacesAutocompleteDirective implements OnInit {
const googleLocation: any = {}; const googleLocation: any = {};
googleLocation.lat = place.geometry.location.lat(); googleLocation.lat = place.geometry.location.lat();
googleLocation.lng = place.geometry.location.lng(); googleLocation.lng = place.geometry.location.lng();
googleLocation.address = place.name;
googleLocation.address = `${place.name} ${place.formatted_address}`; googleLocation.formatted = place.formatted_address;
// for (const i in place.address_components) { // for (const i in place.address_components) {
// if (place.address_components.hasOwnProperty(i)) { // if (place.address_components.hasOwnProperty(i)) {
// const item = place.address_components[i]; // const item = place.address_components[i];
...@@ -46,15 +46,20 @@ export class GooglePlacesAutocompleteDirective implements OnInit { ...@@ -46,15 +46,20 @@ export class GooglePlacesAutocompleteDirective implements OnInit {
return googleLocation; return googleLocation;
} }
constructor(private elRef: ElementRef) { constructor(
private elRef: ElementRef,
private zn: NgZone
) {
this.element = elRef.nativeElement; this.element = elRef.nativeElement;
} }
ngOnInit(): void { ngOnInit(): void {
const autocomplete = new google.maps.places.Autocomplete(this.element); const autocomplete = new google.maps.places.Autocomplete(this.element);
google.maps.event.addListener(autocomplete, 'place_changed', () => { google.maps.event.addListener(autocomplete, 'place_changed', () => {
this.zn.run(() => {
this.addressSelected.emit(GooglePlacesAutocompleteDirective.getFormattedAddress(autocomplete.getPlace())); this.addressSelected.emit(GooglePlacesAutocompleteDirective.getFormattedAddress(autocomplete.getPlace()));
}); });
});
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment