Commit eb47c8ee by Muhammad Usman

privacy policy

parent e16d05d1
......@@ -51,7 +51,7 @@ export class ForgotPasswordComponent extends BaseComponent {
}
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 {
}
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 {
}
openTermsAndConditions(): void {
window.location.href = EXTERNAL_LINKS.TERMS_CONDITIONS;
window.open(EXTERNAL_LINKS.TERMS_CONDITIONS, '_blank');
}
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 {
}
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 {
}
openPrivacyPolicy(): void {
window.location.href = EXTERNAL_LINKS.PRIVACY_POLICY;
window.open(EXTERNAL_LINKS.PRIVACY_POLICY, '_blank')
}
}
......@@ -29,10 +29,10 @@
<div class="col-md-6 form-group">
<label>Mobile</label>
<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>
</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.
</div>
</div>
......
......@@ -119,15 +119,20 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit {
})
}
updateAddress($event): void {
console.log($event);
this.careerProfile.GoogleAddress = $event.address;
checkMobilePattern() {
if (this.careerProfile.Mobile && this.careerProfile.Mobile.length < 11) {
this.careerProfile.Mobile = '';
}
}
changedAddress(): void {
this.careerProfile.GoogleAddress = ' ';
}
updateAddress($event): void {
this.careerProfile.GoogleAddress = $event.formatted;
}
connectWithSocial(type): void {
const params = {
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;
......@@ -15,8 +15,8 @@ export class GooglePlacesAutocompleteDirective implements OnInit {
const googleLocation: any = {};
googleLocation.lat = place.geometry.location.lat();
googleLocation.lng = place.geometry.location.lng();
googleLocation.address = `${place.name} ${place.formatted_address}`;
googleLocation.address = place.name;
googleLocation.formatted = place.formatted_address;
// for (const i in place.address_components) {
// if (place.address_components.hasOwnProperty(i)) {
// const item = place.address_components[i];
......@@ -46,14 +46,19 @@ export class GooglePlacesAutocompleteDirective implements OnInit {
return googleLocation;
}
constructor(private elRef: ElementRef) {
constructor(
private elRef: ElementRef,
private zn: NgZone
) {
this.element = elRef.nativeElement;
}
ngOnInit(): void {
const autocomplete = new google.maps.places.Autocomplete(this.element);
google.maps.event.addListener(autocomplete, 'place_changed', () => {
this.addressSelected.emit(GooglePlacesAutocompleteDirective.getFormattedAddress(autocomplete.getPlace()));
this.zn.run(() => {
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