Commit 14d4a4de by Muhammad Usman

Merge branch 'feature/Feature-Angular-MyCareer' into qa/qa_mc/angular

parents 7dfe469d 49987265
......@@ -166,6 +166,7 @@ export const routes: Routes = [
redirectPage: 'editor/index.jsp'
},
children: [
// @CodeReview : G000 : accessible for MC_Admin only
{
path: 'my-career-users',
component: MyCareerUsersComponent
......
......@@ -7,6 +7,7 @@ import { ApiService } from './oneit/services/api.service';
import { EnumService } from './oneit/services/enum.service';
import { SearchService } from './oneit/services/search.service';
import { UtilsService } from './oneit/services/utils.service';
import { environment } from '../environments/environment';
@Injectable()
......@@ -56,7 +57,12 @@ export class AppService {
);
}
socicalMediaLogin(svc, params) {
socicalMediaLogin(type) {
const params = {
environment: environment.envName,
nextPage: window.location.href.split('/#/')[0] + '/#/my-career-web/dashboard/home'
};
const svc = type === 'linkedIn' ? 'LoginWithLinkedIn' : 'LoginWithGoogle';
return this.apiService.post('svc/' + svc , params).map(
data => {
if (this.utilsService.isSuccessfulResponse(data)) {
......
......@@ -7,12 +7,12 @@
</div>
<div class="header-actions">
<span class="auto-saved">Auto saved 1 min ago</span>
<span class="auto-saved" *ngIf="autoSaveLabel">Auto saved {{autoSaveLabel}}</span>
<button pButton label="Save & exit" class="ui-button-info"></button>
<button pButton label="Save & exit" (click)="exit()" class="ui-button-info"></button>
</div>
</div>
<p-progressBar [value]="20"></p-progressBar>
<p-progressBar [value]="workPreferenceQuestion.Percentage"></p-progressBar>
<div class="assessment-body container">
......@@ -23,13 +23,14 @@
</div>
<div class="assessment-body-description">
A job isn't just about what one does, but the environment where one does it. This questionnaire will help us both learn what's most important to you in a workplace environment. There are no right or wrong answers, so please choose what best fits you (not what you think might be right for a particular job).
{{workPreferenceQuestion?.IntroductoryText}}
</div>
<div class="assessment-body-question-wrapper mc-card">
<app-overlay [isActive]="isLoading"></app-overlay>
<div class="question-completed">0%</div>
<div class="question-completed">{{workPreferenceQuestion?.Percentage}}%</div>
<div class="answer-options">
<div class="answer-option">
......
import { Component, OnInit } from '@angular/core';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { BaseComponent } from '../../base/base.component';
import * as moment from 'moment';
import { WorkPreferenceQuestionModel } from '../../models/work-preference-question.model';
import { takeUntil } from 'rxjs/operators';
import { AssessmentService } from '../../services/assessment.service';
import { Router } from '@angular/router';
import { HelperService } from '../../services/helper.service';
@Component({
selector: 'app-work-preference',
......@@ -7,13 +13,66 @@ import { BaseComponent } from '../../base/base.component';
styleUrls: ['./work-preference.component.scss']
})
export class WorkPreferenceComponent extends BaseComponent implements OnInit {
export class WorkPreferenceComponent extends BaseComponent implements OnInit, OnDestroy {
constructor() {
workPreferenceQuestion = new WorkPreferenceQuestionModel();
assocs = ['CultureElement'];
answerScales = [];
autoSaveInterval;
autoSavedOn;
autoSaveLabel = '';
constructor(
private as: AssessmentService,
private hs: HelperService,
private r: Router
) {
super();
}
ngOnInit() {
this.initiateWorkPreference();
this.setAutoSaveInterval();
}
initiateWorkPreference(): void {
this.isLoading = true;
this.as.getWorkPreferences(this.assocs)
.pipe(takeUntil(this.componentInView))
.subscribe(response => {
console.log(response);
this.isLoading = false;
this.autoSavedOn = new Date();
if (response.length > 0) {
this.workPreferenceQuestion = response[0];
}
}, err => {
this.isLoading = false;
this.hs.handleHttpError(err);
});
}
setAutoSaveInterval(): void {
if (!this.autoSaveInterval) {
setInterval(() => {
this.autoSave();
}, 60000);
}
}
autoSave(): void {
this.autoSaveLabel = moment(this.autoSavedOn).fromNow();
}
exit(): void {
this.r.navigate(['/my-career-web/dashboard/home']);
}
ngOnDestroy(): void {
super.ngOnDestroy();
if (this.autoSaveInterval) {
clearInterval(this.autoSaveInterval);
}
}
}
<div class="bck-link mc-nav-link" routerLink="/my-career-web/auth/login"><i class="fa fa-chevron-left"></i><span>Back</span></div>
<div class="row login-wrapper">
<div class="row auth-wrapper">
<div class="col-md-offset-4 col-md-4">
<div class="mc-login-logo d-flex justify-content-center">
<div class="mc-auth-logo d-flex justify-content-center">
<img src="assets/my-career-web/images/MATCHD_LOGO.jpg" alt="">
</div>
<div class="title-goes-here">Know your natural strengths.</div>
<div class="subtitle-giving-cont">Empowering career seekers to get the right job and thrive.</div>
<form class="login-form position-relative" #form="ngForm">
<form class="auth-form position-relative" #form="ngForm">
<div class="form-group" *ngIf="!emailSent">
<label>Email Address</label>
<app-form-control>
......
@import "~styles/my-career-styles/variables";
.bck-link {
position: absolute;
color: #12A8DE;
line-height: 21px;
z-index: 1000;
top: 15px;
left: 25px;
border: 0;
display: flex;
align-items: center;
span {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
padding-left: 10px;
}
.fa {
font-size: 18px;
}
}
.login-wrapper {
position: relative;
.mc-login-logo {
margin-top: 96px;
img {
height: 60px;
}
}
.title-goes-here {
color: #58595B;
font-family: $headingFont;
font-size: 24px;
font-weight: bold;
letter-spacing: 0;
line-height: 36px;
text-align: center;
margin: 32px 0 8px;
}
.subtitle-giving-cont {
color: #58595B;
font-family: $bodyFont;
font-size: 18px;
letter-spacing: 0;
line-height: 27px;
text-align: center;
margin-bottom: 32px;
padding: 0 26px;
}
.action-btn {
height: 50px;
width: 260px;
border-radius: 73px;
background-color: #12A8DE;
padding: 15px;
text-align: center;
color: #fff;
margin: 24px auto 8px;
cursor: pointer;
transition: .3s;
font-weight: bold;
border: 0;
box-shadow: none;
&:hover {
background: #127BAD;
}
}
.login-form {
border-radius: 4px;
background-color: #FFFFFF;
box-shadow: 0 0 20px 0 rgba(128,130,133,0.13);
padding: 24px 26px;
.forgot-password {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
.signup-link {
color: #58595B;
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
}
}
.mc-footer-label {
position: absolute;
width: 100%;
bottom: 10px;
color: #808285;
font-family: $bodyFont;
font-size: 11px;
letter-spacing: 0;
line-height: 13px;
left: 0;
span {
cursor: pointer;
}
}
@media only screen and (max-width: 768px) {
.login-wrapper {
.mc-login-logo {
margin-top: 77px;
img {
height: 40px;
}
}
.subtitle-giving-cont {
margin-bottom: 0;
}
.login-form {
box-shadow: none;
.action-btn {
width: 100%;
}
}
}
}
......@@ -2,10 +2,10 @@ import { Component, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms';
import { takeUntil } from 'rxjs/operators';
import { BaseComponent } from '../../base/base.component';
import { EXTERNAL_LINKS } from '../../config/constants';
import { AuthService } from '../../services/auth.service';
import { HelperService } from '../../services/helper.service';
import { ToasterService } from '../../services/toaster.service';
import { EXTERNAL_LINKS } from '../../config/constants';
@Component({
selector: 'app-forgot-password',
......@@ -38,15 +38,15 @@ export class ForgotPasswordComponent extends BaseComponent {
this.as.forgot(this.forgotForm)
.pipe(takeUntil(this.componentInView))
.subscribe(response => {
this.isLoading = false;
this.hs.oneItHttpResponse(response);
if (response.emailSent) {
this.emailSent = true;
this.ts.success('Please check your email for instructions.');
}
this.isLoading = false;
}, err => {
this.hs.handleHttpError(err);
this.isLoading = false;
this.hs.handleHttpError(err);
});
}
......
<div class="bck-link mc-nav-link" routerLink="/my-career-web"><i class="fa fa-chevron-left"></i><span>Back</span></div>
<div class="row login-wrapper">
<div class="row auth-wrapper">
<div class="col-md-offset-4 col-md-4">
<div class="mc-login-logo d-flex justify-content-center">
<div class="mc-auth-logo d-flex justify-content-center">
<img src="assets/my-career-web/images/MATCHD_LOGO.jpg" alt="">
</div>
<div class="title-goes-here">Know your natural strengths.</div>
<div class="subtitle-giving-cont">Empowering career seekers to get the right job and thrive.</div>
<form class="login-form position-relative" #form="ngForm">
<form class="auth-form position-relative" #form="ngForm">
<div class="form-group">
<label>Email Address</label>
<app-form-control>
......
......@@ -2,142 +2,13 @@
.bck-link {
position: absolute;
color: #12A8DE;
line-height: 21px;
z-index: 1000;
top: 15px;
left: 25px;
border: 0;
align-items: center;
display: none;
span {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
padding-left: 10px;
}
.fa {
font-size: 18px;
}
}
.login-wrapper {
position: relative;
.auth-wrapper {
margin-bottom: 45px;
.mc-login-logo {
margin-top: 96px;
img {
height: 60px;
}
}
.title-goes-here {
color: #58595B;
font-family: $headingFont;
font-size: 24px;
font-weight: bold;
letter-spacing: 0;
line-height: 36px;
text-align: center;
margin: 32px 0 8px;
}
.subtitle-giving-cont {
color: #58595B;
font-family: $bodyFont;
font-size: 18px;
letter-spacing: 0;
line-height: 27px;
text-align: center;
margin-bottom: 32px;
padding: 0 26px;
}
.action-btn {
height: 50px;
width: 260px;
border-radius: 73px;
background-color: #12A8DE;
padding: 15px;
text-align: center;
color: #fff;
margin: 24px auto 8px;
cursor: pointer;
transition: .3s;
font-weight: bold;
border: 0;
box-shadow: none;
&:hover {
background-color: #127BAD;
}
&.google-login {
background-color: #de5246;
&:hover {
background-color: #C34C41;
}
}
&.linkedin-login {
background-color: #0072b1;
margin: 0;
&:hover {
background-color: #005A8D;
}
}
}
.login-form {
border-radius: 4px;
background-color: #FFFFFF;
box-shadow: 0 0 20px 0 rgba(128,130,133,0.13);
padding: 24px 26px;
.forgot-password {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
.signup-link {
color: #58595B;
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
}
}
.mc-footer-label {
position: absolute;
width: 100%;
bottom: 10px;
left: 0;
color: #808285;
font-family: $bodyFont;
font-size: 11px;
letter-spacing: 0;
line-height: 13px;
span {
cursor: pointer;
}
}
@media only screen and (max-width: 768px) {
......@@ -145,26 +16,4 @@
display: flex;
}
.login-wrapper {
.mc-login-logo {
margin-top: 77px;
img {
height: 40px;
}
}
.subtitle-giving-cont {
margin-bottom: 0;
}
.login-form {
box-shadow: none;
.action-btn {
width: 100%;
}
}
}
}
......@@ -5,9 +5,9 @@ import { takeUntil } from 'rxjs/operators';
import { environment } from '../../../../../environments/environment';
import { AppService } from '../../../../app.service';
import { BaseComponent } from '../../base/base.component';
import { EXTERNAL_LINKS } from '../../config/constants';
import { AuthService } from '../../services/auth.service';
import { HelperService } from '../../services/helper.service';
import { EXTERNAL_LINKS } from '../../config/constants';
@Component({
selector: 'app-login',
......@@ -57,13 +57,8 @@ export class LoginComponent extends BaseComponent {
}
socialMediaLogin(type: 'google' | 'linkedIn') {
const params = {
environment: environment.envName,
nextPage: window.location.href.split('/#/')[0] + '/#/my-career-web/dashboard/home'
};
const svc = type === 'linkedIn' ? 'LoginWithLinkedIn' : 'LoginWithGoogle';
this.isLoading = true;
this.aps.socicalMediaLogin(svc, params)
this.aps.socicalMediaLogin(type)
.pipe(takeUntil(this.componentInView))
.subscribe(data => {
this.isLoading = false;
......@@ -73,8 +68,8 @@ export class LoginComponent extends BaseComponent {
}
},
err => {
this.hs.handleHttpError(err);
this.isLoading = false;
this.hs.handleHttpError(err);
}
)
}
......
<div class="bck-link mc-nav-link" routerLink="/my-career-web"><i class="fa fa-chevron-left"></i><span>Back</span></div>
<div class="row signup-wrapper">
<div class="row auth-wrapper">
<div class="col-md-offset-4 col-md-4">
<div class="mc-signup-logo d-flex justify-content-center">
<div class="mc-auth-logo d-flex justify-content-center">
<img src="assets/my-career-web/images/MATCHD_LOGO.jpg" alt="">
</div>
<div class="title-goes-here">Know your natural strengths.</div>
<div class="subtitle-giving-cont">Empowering career seekers to get the right job and thrive.</div>
<form class="signup-form position-relative" #form="ngForm">
<form class="auth-form position-relative" #form="ngForm">
<div class="form-group">
<label>Email Address</label>
<app-form-control>
......@@ -22,7 +22,6 @@
<i class="fa" [ngClass]="showPassword ? 'fa-eye' : 'fa-eye-slash'" (click)="showPassword = !showPassword"></i>
</app-form-control>
</div>
<div class="was-referred form-group">
<span>Were you referred by another member?</span>
<div class="mt-sm-top" style="white-space: nowrap;">
......
@import "~styles/my-career-styles/variables";
.bck-link {
position: absolute;
color: #12A8DE;
line-height: 21px;
z-index: 1000;
top: 15px;
left: 25px;
border: 0;
display: flex;
align-items: center;
span {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
padding-left: 10px;
}
.fa {
font-size: 18px;
}
}
.signup-wrapper {
position: relative;
.auth-wrapper {
margin-bottom: 85px;
.mc-signup-logo {
.mc-auth-logo {
margin-top: 96px;
img {
height: 60px;
}
}
.title-goes-here {
color: #58595B;
font-family: $headingFont;
font-size: 24px;
font-weight: bold;
letter-spacing: 0;
line-height: 36px;
text-align: center;
margin: 32px 0 8px;
}
.subtitle-giving-cont {
color: #58595B;
font-family: $bodyFont;
font-size: 18px;
letter-spacing: 0;
line-height: 27px;
text-align: center;
margin-bottom: 32px;
padding: 0 26px;
}
.password-wrapper {
.fa {
position: absolute;
right: 20px;
top: 18px;
cursor: pointer;
}
}
small.text-danger {
position: absolute;
bottom: -15px;
font-size: 10px;
}
.action-btn {
height: 50px;
width: 260px;
border-radius: 73px;
background-color: #12A8DE;
padding: 15px;
text-align: center;
color: #fff;
margin: 32px auto 8px;
cursor: pointer;
transition: .3s;
font-weight: bold;
border: 0;
box-shadow: none;
&:disabled {
pointer-events: none;
background: #83b7ca;
}
&:hover {
background: #127BAD;
}
}
.signup-form {
border-radius: 4px;
background-color: #FFFFFF;
box-shadow: 0 0 20px 0 rgba(128,130,133,0.13);
padding: 24px 26px;
.was-referred {
display: flex;
align-items: center;
justify-content: space-between;
}
.forgot-password {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
.signup-link {
color: #58595B;
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
}
}
.mc-footer-label {
position: absolute;
width: 100%;
bottom: 10px;
color: #808285;
font-family: $bodyFont;
font-size: 11px;
letter-spacing: 0;
line-height: 13px;
left: 0;
span {
cursor: pointer;
}
}
@media only screen and (max-width: 768px) {
.signup-wrapper {
.mc-signup-logo {
margin-top: 77px;
img {
height: 40px;
}
}
.subtitle-giving-cont {
margin-bottom: 0;
}
.signup-form {
box-shadow: none;
.action-btn {
width: 100%;
}
.was-referred {
display: block;
}
.was-referred {
display: block;
}
}
.mt-sm-top {
margin-top: 15px;
.mt-sm-top {
margin-top: 15px;
}
}
}
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms';
import { takeUntil } from 'rxjs/operators';
import { BaseComponent } from '../../base/base.component';
......@@ -13,7 +13,7 @@ import { EXTERNAL_LINKS } from '../../config/constants';
templateUrl: './register.component.html',
styleUrls: ['./register.component.scss']
})
export class RegisterComponent extends BaseComponent implements OnInit {
export class RegisterComponent extends BaseComponent {
registerForm = {
username: '',
......@@ -40,16 +40,13 @@ export class RegisterComponent extends BaseComponent implements OnInit {
super();
}
ngOnInit(): void {
//
}
register(): void {
if (this.form.invalid) {
return this.hs.validateAllFormFields(this.form);
}
this.registerForm.firstname = 'AA';
this.registerForm.lastname = 'BB';
this.registerForm.firstname = this.registerForm.username.split('@').pop();
this.registerForm.lastname = this.registerForm.firstname;
this.registerForm.email = this.registerForm.username;
if (!this.registerForm.was_referred) {
delete this.registerForm.ReferralCode;
......
<div class="bck-link mc-nav-link" routerLink="/my-career-web/auth/login"><i class="fa fa-chevron-left"></i><span>Back</span></div>
<div class="row login-wrapper">
<div class="row auth-wrapper">
<div class="col-md-offset-4 col-md-4">
<div class="mc-login-logo d-flex justify-content-center">
<div class="mc-auth-logo d-flex justify-content-center">
<img src="assets/my-career-web/images/MATCHD_LOGO.jpg" alt="">
</div>
<div class="title-goes-here">Know your natural strengths.</div>
<div class="subtitle-giving-cont">Empowering career seekers to get the right job and thrive.</div>
<form class="login-form position-relative" #form="ngForm">
<form class="auth-form position-relative" #form="ngForm">
<div class="form-group">
<label>Choose your password</label>
......
@import "~styles/my-career-styles/variables";
.bck-link {
position: absolute;
color: #12A8DE;
line-height: 21px;
z-index: 1000;
top: 15px;
left: 25px;
border: 0;
display: flex;
align-items: center;
span {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
padding-left: 10px;
}
.fa {
font-size: 18px;
}
}
.login-wrapper {
position: relative;
.mc-login-logo {
margin-top: 96px;
img {
height: 60px;
}
}
.title-goes-here {
color: #58595B;
font-family: $headingFont;
font-size: 24px;
font-weight: bold;
letter-spacing: 0;
line-height: 36px;
text-align: center;
margin: 32px 0 8px;
}
.subtitle-giving-cont {
color: #58595B;
font-family: $bodyFont;
font-size: 18px;
letter-spacing: 0;
line-height: 27px;
text-align: center;
margin-bottom: 32px;
padding: 0 26px;
}
.password-wrapper {
.fa {
position: absolute;
right: 20px;
top: 18px;
cursor: pointer;
}
}
small.text-danger {
position: absolute;
bottom: -15px;
font-size: 10px;
}
.action-btn {
height: 50px;
width: 260px;
border-radius: 73px;
background-color: #12A8DE;
padding: 15px;
text-align: center;
color: #fff;
margin: 24px auto 8px;
cursor: pointer;
transition: .3s;
font-weight: bold;
border: 0;
box-shadow: none;
&:disabled {
pointer-events: none;
background: #83b7ca;
}
&:hover {
background: #127BAD;
}
}
.login-form {
border-radius: 4px;
background-color: #FFFFFF;
box-shadow: 0 0 20px 0 rgba(128, 130, 133, 0.13);
padding: 24px 26px;
.forgot-password {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
.signup-link {
color: #58595B;
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
}
}
.mc-footer-label {
position: absolute;
width: 100%;
bottom: 10px;
color: #808285;
font-family: $bodyFont;
font-size: 11px;
letter-spacing: 0;
line-height: 13px;
left: 0;
span {
cursor: pointer;
}
}
@media only screen and (max-width: 768px) {
.login-wrapper {
.mc-login-logo {
margin-top: 77px;
img {
height: 40px;
}
}
.subtitle-giving-cont {
margin-bottom: 0;
}
.login-form {
box-shadow: none;
.action-btn {
width: 100%;
}
}
}
}
......@@ -16,6 +16,7 @@ export const CLASSES = {
JOB: 'performa.orm.Job',
CAREER_PROFILE: 'performa.orm.CareerProfile',
WORK_STYLE_QUESTION: 'performa.orm.WorkStyleQuestionNP',
WORK_PREFERENCE_QUESTION: 'performa.orm.WorkPreferencesQuestionNP',
QUESTION: 'performa.orm.Question'
};
......@@ -28,6 +29,8 @@ export const SERVICES = {
SAVE: 'Save',
CAREER_PROFILES: 'CareerProfiles',
JOB_TITLES: 'JobTitles',
LOGIN_LINKEDIN: 'LoginWithLinkedIn',
LOGIN_GOOGLE: 'LoginWithGoogle',
};
export const SEARCH = {
......
......@@ -22,14 +22,16 @@
<div class="col-md-6 form-group">
<label>Email</label>
<app-form-control>
<input type="email" email="" class="form-control" placeholder="Email Address" required name="Email" [(ngModel)]="careerProfile.Candidate.User.Email">
<input type="email" email="" class="form-control" placeholder="Email Address" required name="Email"
[(ngModel)]="careerProfile.Candidate.User.Email">
</app-form-control>
</div>
<div class="col-md-6 form-group">
<label>Mobile</label>
<app-form-control>
<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 (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 || careerProfile.Mobile.length < 11">
......@@ -40,7 +42,8 @@
<div class="col-md-12 form-group">
<label>Address</label>
<app-form-control>
<input type="text" appGooglePlacesAutocomplete (change)="changedAddress()" (addressSelected)="updateAddress($event)" class="form-control" placeholder="Address" required [(ngModel)]="careerProfile.GoogleAddress" name="Address">
<input type="text" appGooglePlacesAutocomplete (change)="changedAddress()" (addressSelected)="updateAddress($event)"
class="form-control" placeholder="Address" required [(ngModel)]="careerProfile.GoogleAddress" name="Address">
</app-form-control>
</div>
......@@ -54,7 +57,8 @@
<div class="col-md-6 form-group">
<label>Occupation Preference</label>
<p-autoComplete placeholder="Occupation Preference" (completeMethod)="getJobTitles($event)" [forceSelection]="true" field="JobTitle" [suggestions]="jobTitles" name="OccupationPreference" [(ngModel)]="careerProfile.Candidate.OccupationPreference" dataKey="ObjectID">
<p-autoComplete placeholder="Occupation Preference" (completeMethod)="getJobTitles($event)" [forceSelection]="true" field="JobTitle"
[suggestions]="jobTitles" name="OccupationPreference" [(ngModel)]="careerProfile.Candidate.OccupationPreference" dataKey="ObjectID">
</p-autoComplete>
</div>
......@@ -63,7 +67,8 @@
<div class="row">
<div class="col-sm-12" *ngIf="isLoadingPreferences"><i class="pi pi-spin pi-spinner"></i></div>
<div class="col-sm-6" *ngFor="let preference of employmentPreferences; let i = index;">
<p-checkbox [label]="preference.Description" [value]="preference.Value" [(ngModel)]="careerProfile.Candidate.EmploymentPreference" name="pref-{{i}}">
<p-checkbox [label]="preference.Description" [value]="preference.Value" [(ngModel)]="careerProfile.Candidate.EmploymentPreference"
name="pref-{{i}}">
</p-checkbox>
</div>
</div>
......@@ -72,7 +77,9 @@
<div class="col-md-6 form-group">
<label>Employment Status</label>
<p-dropdown placeholder="Employment Status" [options]="employmentStatuses" [dropdownIcon]="isLoadingStatuses ? 'pi pi-spin pi-spinner' : 'pi pi-chevron-down'" optionLabel="Description" name="EmploymentStatus" [(ngModel)]="careerProfile.Candidate.EmploymentStatus" dataKey="Value">
<p-dropdown placeholder="Employment Status" [options]="employmentStatuses"
[dropdownIcon]="isLoadingStatuses ? 'pi pi-spin pi-spinner' : 'pi pi-chevron-down'"
optionLabel="Description" name="EmploymentStatus" [(ngModel)]="careerProfile.Candidate.EmploymentStatus" dataKey="Value">
</p-dropdown>
</div>
......@@ -87,16 +94,19 @@
</div>
<div class="col-md-6 mt-4 d-flex justify-content-center">
<button type="button" pButton label="Connect With Google" class="ui-button-google" (click)="connectWithSocial('GOOGLE')" *ngIf="!careerProfile.IsGoogleConnected"></button>
<button type="button" pButton label="Connect With Google" class="ui-button-google" (click)="connectWithSocial('GOOGLE')"
*ngIf="!careerProfile.IsGoogleConnected"></button>
</div>
<div class="col-md-6 mt-4 d-flex justify-content-center">
<button type="button" pButton label="Connect With LinkedIn" class="ui-button-facebook" (click)="connectWithSocial('LINKEDIN')" *ngIf="!careerProfile.IsLinkedInConnected"></button>
<button type="button" pButton label="Connect With LinkedIn" class="ui-button-facebook" (click)="connectWithSocial('LINKEDIN')"
*ngIf="!careerProfile.IsLinkedInConnected"></button>
</div>
<div class="col-md-12 d-flex justify-content-end mt-5">
<button (click)="updateProfile()" pButton [icon]="isSaving ? 'pi pi-spin pi-spinner' : 'pi pi-save'" label="Update Information" class="ui-button-info update-info" [disabled]="isLoading || isSaving">
<button (click)="updateProfile()" pButton [icon]="isSaving ? 'pi pi-spin pi-spinner' : 'pi pi-save'" label="Update Information"
class="ui-button-info update-info" [disabled]="isLoading || isSaving">
</button>
</div>
</form>
......
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { BaseComponent } from '../../base/base.component';
import { PersonalDetailsService } from '../../services/personal-details.service';
import { Component, OnInit, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms';
import { takeUntil } from 'rxjs/operators';
import { HelperService } from '../../services/helper.service';
import { AppService } from '../../../../app.service';
import { BaseComponent } from '../../base/base.component';
import { CareerProfileModel } from '../../models/career-profile.model';
import { UtilsService } from '../../../../oneit/services/utils.service';
import { NgForm } from '@angular/forms';
import { HelperService } from '../../services/helper.service';
import { PersonalDetailsService } from '../../services/personal-details.service';
import { ToasterService } from '../../services/toaster.service';
import { environment } from '../../../../../environments/environment';
import { AppService } from '../../../../app.service';
@Component({
selector: 'app-personal-details',
......@@ -30,10 +28,8 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit {
constructor(
private ps: PersonalDetailsService,
private us: UtilsService,
private ts: ToasterService,
private hs: HelperService,
private cdr: ChangeDetectorRef,
private aps: AppService,
) {
super();
......@@ -136,12 +132,7 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit {
}
connectWithSocial(type): void {
const params = {
environment: environment.envName,
nextPage: window.location.href.split('/#/')[0] + '/#/my-career-web/dashboard/home'
};
const svc = type === 'LINKEDIN' ? 'LoginWithLinkedIn' : 'LoginWithGoogle';
this.aps.socicalMediaLogin(svc, params)
this.aps.socicalMediaLogin(type)
.pipe(takeUntil(this.componentInView))
.subscribe(data => {
this.isLoading = false;
......@@ -151,6 +142,7 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit {
}
},
err => {
this.isLoading = false;
this.hs.handleHttpError(err);
}
)
......
......@@ -20,7 +20,7 @@ export class ProfileTasksComponent extends BaseComponent {
profileTasks = [
{label: 'Personal Details', link: '/my-career-web/dashboard/personal-details', key: 'CompletedPercentage', active: false},
{label: 'Work Strengths', link: '/my-career-web/assessments/work-style', key: 'CompletedPercentageWS', active: false},
{label: 'Career Values', link: '', key: 'CompletedPercentageWS', active: false},
{label: 'Career Values', link: '/my-career-web/assessments/work-preference', key: 'CompletedPercentageWP', active: false},
{label: 'Career History', link: '', key: '', active: false},
{label: 'Diversity', link: '', key: '', active: false}
];
......
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AutoCompleteModule } from 'primeng/autocomplete';
import { ButtonModule } from 'primeng/button';
import { CheckboxModule } from 'primeng/checkbox';
import { DialogModule } from 'primeng/dialog';
import { DropdownModule } from 'primeng/dropdown';
import { InputMaskModule } from 'primeng/inputmask';
import { InputSwitchModule } from 'primeng/inputswitch';
import { ProgressBarModule } from 'primeng/progressbar';
import { RadioButtonModule } from 'primeng/radiobutton';
import { ToastModule } from 'primeng/toast';
import { AssessmentService } from '../services/assessment.service';
import { HelperService } from '../services/helper.service';
import { PersonalDetailsService } from '../services/personal-details.service';
import { ToasterService } from '../services/toaster.service';
import { FormControlComponent } from './form-control/form-control.component';
import { OverlayComponent } from './overlay/overlay.component';
import { DropdownModule } from 'primeng/dropdown';
import { AutoCompleteModule } from 'primeng/autocomplete';
import { PersonalDetailsService } from '../services/personal-details.service';
import { InputSwitchModule } from 'primeng/inputswitch';
import { ButtonModule } from 'primeng/button';
import { GooglePlacesAutocompleteDirective } from './google-places-autocomplete.directive';
import { InputMaskModule } from 'primeng/inputmask';
import { ProgressBarModule } from 'primeng/progressbar';
import { AssessmentService } from '../services/assessment.service';
import { OverlayComponent } from './overlay/overlay.component';
import { TruncatePipe } from './truncate.pipe';
import { DialogModule } from 'primeng/dialog';
import { TabViewModule } from 'primeng/primeng';
const MODULES = [
......
export class CultureElementModel {
Description?: string;
DetailedDescription?: string;
CultureClass?: string;
}
import { BaseModel } from './base.model';
import { CLASSES } from '../config/constants';
import { CultureElementModel } from './culture-element.model';
export class WorkPreferenceQuestionModel extends BaseModel {
ObjectClass = CLASSES.WORK_PREFERENCE_QUESTION;
Percentage: number;
IntroductoryText: string;
QuestionNo: number;
CultureElement: CultureElementModel;
}
......@@ -20,6 +20,15 @@ export class AssessmentService {
)
}
getWorkPreferences(assocs = []): Observable<any> {
return this.ss.getObjects('WorkPreferences', 'All', '', assocs, null, null, null, null)
.map(
data => {
return this.us.convertResponseToObjects(data, assocs);
}
)
}
saveWorkStyle(params): Observable<any> {
return this.us.processObjects('SaveWorkStyle', params);
}
......
......@@ -9,7 +9,8 @@
<button pButton type="button" label="Save" icon="ui-icon-save" (click)="saveUser(false)"></button>
</div>
<div class="ui-toolbar-group-right">
<button pButton type="button" icon="ui-icon-cancel" label="Cancel" [routerLink]="['/my-career/my-career-users']" class="secondary-btn"></button>
<button pButton type="button" icon="ui-icon-cancel" label="Cancel" [routerLink]="['/my-career/my-career-users']"
class="secondary-btn"></button>
</div>
</p-toolbar>
</div>
......@@ -48,7 +49,8 @@
</div>
<div class="ui-g-12 ui-md-3" *ngIf="careerUser.Candidate.ReferredBy">
<p-button label="Remove Referred By" (onClick)="removeReferredBy()" icon="ui-icon-delete"></p-button>
<a [routerLink]="['/my-career/view-career-user', careerUser.Candidate.ReferredBy.ObjectID]" class="data-link" style="">{{user?.Candidate?.ReferredBy?.Name}}</a>
<a [routerLink]="['/my-career/view-career-user', careerUser.Candidate.ReferredBy.ObjectID]" class="data-link" style="">
{{user?.Candidate?.ReferredBy?.Name}}</a>
</div>
</div>
<div class="ui-g">
......
.bck-link {
position: absolute;
color: #12A8DE;
line-height: 21px;
z-index: 1000;
top: 15px;
left: 25px;
border: 0;
display: flex;
align-items: center;
span {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
padding-left: 10px;
}
.fa {
font-size: 18px;
}
}
.auth-wrapper {
position: relative;
.mc-auth-logo {
margin-top: 96px;
img {
height: 60px;
}
}
.title-goes-here {
color: #58595B;
font-family: $headingFont;
font-size: 24px;
font-weight: bold;
letter-spacing: 0;
line-height: 36px;
text-align: center;
margin: 32px 0 8px;
}
.subtitle-giving-cont {
color: #58595B;
font-family: $bodyFont;
font-size: 18px;
letter-spacing: 0;
line-height: 27px;
text-align: center;
margin-bottom: 32px;
padding: 0 26px;
}
.action-btn {
height: 50px;
width: 260px;
border-radius: 73px;
background-color: #12A8DE;
padding: 15px;
text-align: center;
color: #fff;
margin: 24px auto 8px;
cursor: pointer;
transition: .3s;
font-weight: bold;
border: 0;
box-shadow: none;
&:hover {
background: #127BAD;
}
&.google-login {
background-color: #de5246;
&:hover {
background-color: #C34C41;
}
}
&.linkedin-login {
background-color: #0072b1;
margin: 0;
&:hover {
background-color: #005A8D;
}
}
}
.auth-form {
border-radius: 4px;
background-color: #FFFFFF;
box-shadow: 0 0 20px 0 rgba(128,130,133,0.13);
padding: 24px 26px;
.password-wrapper {
.fa {
position: absolute;
right: 20px;
top: 18px;
cursor: pointer;
}
}
small.text-danger {
position: absolute;
bottom: -15px;
font-size: 10px;
}
.was-referred {
display: flex;
align-items: center;
justify-content: space-between;
}
.forgot-password {
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
.signup-link {
color: #58595B;
font-family: $bodyFont;
font-size: 14px;
letter-spacing: 0;
line-height: 21px;
text-align: center;
}
}
}
.mc-footer-label {
position: absolute;
width: 100%;
bottom: 10px;
color: #808285;
font-family: $bodyFont;
font-size: 11px;
letter-spacing: 0;
line-height: 13px;
left: 0;
span {
cursor: pointer;
}
}
@media only screen and (max-width: 768px) {
.auth-wrapper {
.mc-auth-logo {
margin-top: 77px;
img {
height: 40px;
}
}
.subtitle-giving-cont {
margin-bottom: 0;
}
.auth-form {
box-shadow: none;
.action-btn {
width: 100%;
}
}
}
}
......@@ -8,6 +8,7 @@
@import "flex-helpers";
@import "form";
@import "misc";
@import "auth";
@import "primeng/radio";
@import "primeng/checkbox";
@import "primeng/toast";
......
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