Commit 738f6ec7 by Muhammad Usman

go back & diversity save issue fixed

parent 9b553f13
...@@ -74,7 +74,9 @@ export class DiversityProfileComponent extends BaseComponent implements OnInit { ...@@ -74,7 +74,9 @@ export class DiversityProfileComponent extends BaseComponent implements OnInit {
if (div.MultipleAnswers) { if (div.MultipleAnswers) {
answers.push(...this.selectedAnswers[div.ObjectID]); answers.push(...this.selectedAnswers[div.ObjectID]);
} else { } else {
answers.push(this.selectedAnswers[div.ObjectID]) if (this.selectedAnswers[div.ObjectID]) {
answers.push(this.selectedAnswers[div.ObjectID])
}
} }
}); });
this.assessmentService.saveDiversityProfile({Answers: answers}) this.assessmentService.saveDiversityProfile({Answers: answers})
......
...@@ -41,11 +41,14 @@ ...@@ -41,11 +41,14 @@
</div> </div>
</div> </div>
<hr class="mt-5"> <ng-container *ngIf="!isBack">
<hr class="mt-5">
<div class="d-flex justify-content-center mt-5">
<button class="ui-button-info mc-btn-primary" (click)="initiateWorkPreference(true)" *ngIf="workPreferenceQuestion.QuestionNo > 1" pButton label="Go Back"></button>
</div>
</ng-container>
<div class="d-flex justify-content-center mt-5">
<button class="ui-button-info mc-btn-primary" (click)="initiateWorkPreference(true)" *ngIf="workPreferenceQuestion.QuestionNo > 1" pButton label="Go Back"></button>
</div>
</div> </div>
</div> </div>
......
...@@ -24,6 +24,7 @@ export class WorkPreferenceComponent extends BaseComponent implements OnInit, On ...@@ -24,6 +24,7 @@ export class WorkPreferenceComponent extends BaseComponent implements OnInit, On
autoSavedOn; autoSavedOn;
autoSaveLabel = 'a few seconds ago'; autoSaveLabel = 'a few seconds ago';
selectedAns; selectedAns;
isBack;
constructor( constructor(
private assessmentService: AssessmentService, private assessmentService: AssessmentService,
...@@ -40,6 +41,7 @@ export class WorkPreferenceComponent extends BaseComponent implements OnInit, On ...@@ -40,6 +41,7 @@ export class WorkPreferenceComponent extends BaseComponent implements OnInit, On
} }
initiateWorkPreference(previousQuestion = false): void { initiateWorkPreference(previousQuestion = false): void {
this.isBack = previousQuestion;
this.isLoading = true; this.isLoading = true;
this.assessmentService.getWorkPreferences(this.assocs, previousQuestion) this.assessmentService.getWorkPreferences(this.assocs, previousQuestion)
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
......
...@@ -58,11 +58,14 @@ ...@@ -58,11 +58,14 @@
</div> </div>
<hr class="mt-5"> <ng-container *ngIf="!isBack">
<hr class="mt-5">
<div class="d-flex justify-content-center mt-5">
<button class="ui-button-info mc-btn-primary" (click)="initiateWorkStyle(true)" *ngIf="workStyleQuestion.QuestionNo > 1" pButton label="Go Back"></button>
</div>
</ng-container>
<div class="d-flex justify-content-center mt-5">
<button class="ui-button-info mc-btn-primary" (click)="initiateWorkStyle(true)" *ngIf="workStyleQuestion.QuestionNo > 1" pButton label="Go Back"></button>
</div>
</div> </div>
</div> </div>
......
...@@ -22,6 +22,7 @@ export class WorkStyleComponent extends BaseComponent implements OnInit, OnDestr ...@@ -22,6 +22,7 @@ export class WorkStyleComponent extends BaseComponent implements OnInit, OnDestr
autoSavedOn; autoSavedOn;
autoSaveLabel = 'a few seconds ago'; autoSaveLabel = 'a few seconds ago';
wasUpdated = false; wasUpdated = false;
isBack = false;
selectedAns; selectedAns;
constructor( constructor(
...@@ -39,6 +40,7 @@ export class WorkStyleComponent extends BaseComponent implements OnInit, OnDestr ...@@ -39,6 +40,7 @@ export class WorkStyleComponent extends BaseComponent implements OnInit, OnDestr
} }
initiateWorkStyle(previousQuestion = false): void { initiateWorkStyle(previousQuestion = false): void {
this.isBack = previousQuestion;
this.isLoading = true; this.isLoading = true;
this.assessmentService.getWorkStyle(this.assocs, previousQuestion) this.assessmentService.getWorkStyle(this.assocs, previousQuestion)
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
...@@ -71,6 +73,7 @@ export class WorkStyleComponent extends BaseComponent implements OnInit, OnDestr ...@@ -71,6 +73,7 @@ export class WorkStyleComponent extends BaseComponent implements OnInit, OnDestr
submitAnswer(scale): void { submitAnswer(scale): void {
this.selectedAns = scale; this.selectedAns = scale;
this.isBack = false;
const formData = { const formData = {
Question: this.workStyleQuestion.Question.ObjectID, Question: this.workStyleQuestion.Question.ObjectID,
Answer: scale, Answer: scale,
......
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { CareerHistoryComponent } from './career-history/career-history.component'; import { CareerHistoryComponent } from './career-history/career-history.component';
import { PublishComponent } from './career-history/publish/publish.component';
const routes: Routes = [ const routes: Routes = [
{ {
path: 'update',
component: PublishComponent
},
{
path: ':screen', path: ':screen',
component: CareerHistoryComponent component: CareerHistoryComponent
} }
......
...@@ -29,28 +29,28 @@ ...@@ -29,28 +29,28 @@
<div class="assessment-body-tabs mc-card career-builder position-relative" *ngIf="careerProfile"> <div class="assessment-body-tabs mc-card career-builder position-relative" *ngIf="careerProfile">
<p-tabView (onChange)="tabChanged($event)"> <p-tabView (onChange)="tabChanged($event)">
<p-tabPanel header="1{{isMobileView ? '' : '. Templates'}}" [selected]="activeTab === 'templates'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.TEMPLATES ? 'completed' : ''"> <p-tabPanel header="1{{isMobileView ? '' : '. Personal Data'}}" [selected]="activeTab === 'personal-data'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.PERSONAL_DATA ? 'completed' : ''">
<app-templates></app-templates> <app-personal-details #personalDetailsComponent [asChildComponent]="true" (detailsSaved)="tabChanged({index: 1})">
</p-tabPanel>
<p-tabPanel header="2{{isMobileView ? '' : '. Personal Data'}}" [selected]="activeTab === 'personal-data'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.PERSONAL_DATA ? 'completed' : ''">
<app-personal-details #personalDetailsComponent [asChildComponent]="true" (detailsSaved)="tabChanged({index: 2})">
</app-personal-details> </app-personal-details>
</p-tabPanel> </p-tabPanel>
<p-tabPanel header="3{{isMobileView ? '' : '. Work History'}}" [selected]="activeTab === 'work-history'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.WORK_HISTORY ? 'completed' : ''"> <p-tabPanel header="2{{isMobileView ? '' : '. Work History'}}" [selected]="activeTab === 'work-history'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.WORK_HISTORY ? 'completed' : ''">
<app-work-history #workHistoryComponent (workSaved)="tabChanged({index: 3})"> <app-work-history #workHistoryComponent (workSaved)="tabChanged({index: 2})">
</app-work-history> </app-work-history>
</p-tabPanel> </p-tabPanel>
<p-tabPanel header="4{{isMobileView ? '' : '. Education'}}" [selected]="activeTab === 'education'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.EDUCATION ? 'completed' : ''"> <p-tabPanel header="3{{isMobileView ? '' : '. Education'}}" [selected]="activeTab === 'education'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.EDUCATION ? 'completed' : ''">
<app-education #educationComponent (educationSaved)="tabChanged({index: 4})"></app-education> <app-education #educationComponent (educationSaved)="tabChanged({index: 3})"></app-education>
</p-tabPanel> </p-tabPanel>
<p-tabPanel header="5{{isMobileView ? '' : '. Skills'}}" [selected]="activeTab === 'skills'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.SKILLS ? 'completed' : ''"> <p-tabPanel header="4{{isMobileView ? '' : '. Skills'}}" [selected]="activeTab === 'skills'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.SKILLS ? 'completed' : ''">
<app-skills #skillsComponent (skillsSaved)="tabChanged({index: 5})"></app-skills> <app-skills #skillsComponent (skillsSaved)="tabChanged({index: 4})"></app-skills>
</p-tabPanel> </p-tabPanel>
<p-tabPanel header="6{{isMobileView ? '' : '. References'}}" [selected]="activeTab === 'references'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.REFERENCES ? 'completed' : ''"> <p-tabPanel header="5{{isMobileView ? '' : '. References'}}" [selected]="activeTab === 'references'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.REFERENCES ? 'completed' : ''">
<app-references #referencesComponent (refereeSaved)="tabChanged({index: 6})"></app-references> <app-references #referencesComponent (refereeSaved)="tabChanged({index: 5})"></app-references>
</p-tabPanel>
<p-tabPanel header="6{{isMobileView ? '' : '. Templates'}}" [selected]="activeTab === 'templates'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.TEMPLATES ? 'completed' : ''">
<app-templates></app-templates>
</p-tabPanel> </p-tabPanel>
<p-tabPanel header="7{{isMobileView ? '' : '. Publish'}}" [selected]="activeTab === 'publish'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.PUBLISH ? 'completed' : ''"> <p-tabPanel header="7{{isMobileView ? '' : '. Publish'}}" [selected]="activeTab === 'publish'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.PUBLISH ? 'completed' : ''">
<app-publish></app-publish> <app-publish [asChild]="true"></app-publish>
</p-tabPanel> </p-tabPanel>
</p-tabView> </p-tabView>
</div> </div>
......
...@@ -18,7 +18,7 @@ import { UtilsService } from '../../../oneit/services/utils.service'; ...@@ -18,7 +18,7 @@ import { UtilsService } from '../../../oneit/services/utils.service';
}) })
export class CareerHistoryComponent extends BaseComponent implements OnInit { export class CareerHistoryComponent extends BaseComponent implements OnInit {
tabs = ['templates', 'personal-data', 'work-history', 'education', 'skills', 'references', 'publish']; tabs = ['personal-data', 'work-history', 'education', 'skills', 'references', 'templates', 'publish'];
careerProfile: CareerProfileModel; careerProfile: CareerProfileModel;
activeTab = ''; activeTab = '';
isExiting = false; isExiting = false;
......
<div class="position-relative"> <div class="mc-page" *ngIf="!asChild">
<app-overlay [isActive]="isLoading || isSaving"></app-overlay>
<h4 class="tab-heading">Your Career Profile is ready, click the preview profile button to see a preview. </h4> <div class="mc-page-header">
<div class="mc-page-header-logo">
<img src="assets/my-career-web/images/MATCHD_LOGO.jpg" alt="">
</div>
</div>
<div class="d-flex justify-content-center mt-3"> <div class="mc-page-body container">
<button class="mc-btn-primary" pButton label="Preview Profile"></button> <ng-container *ngTemplateOutlet="publishTemplate"></ng-container>
</div> </div>
</div>
<h4 class="tab-heading">Do you want to make any changes to the profile? </h4>
<div class="row"> <ng-container *ngIf="asChild">
<div class="mt-3 col-md-6 d-flex justify-content-center"> <ng-container *ngTemplateOutlet="publishTemplate"></ng-container>
<button class="mc-btn-secondary" pButton label="Change Template" routerLink="/my-career-web/career-history/templates"></button> </ng-container>
</div>
<div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Update Profile Info" routerLink="/my-career-web/career-history/personal-data"></button>
</div>
</div>
<div class="row">
<div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Update Work History" routerLink="/my-career-web/career-history/work-history"></button> <ng-template #publishTemplate>
<div class="position-relative">
<app-overlay [isActive]="isLoading || isSaving"></app-overlay>
<h4 *ngIf="asChild" class="tab-heading">Your Career Profile is ready, click the preview profile button to see a preview. </h4>
<div *ngIf="asChild" class="d-flex justify-content-center mt-3">
<button class="mc-btn-primary" pButton label="Preview Profile"></button>
</div> </div>
<div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Update Educational Qualifications" routerLink="/my-career-web/career-history/education"></button>
<h4 class="tab-heading">Do you want to make any changes to the profile? </h4>
<div class="row">
<div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Change Template" routerLink="/my-career-web/career-history/templates"></button>
</div>
<div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Update Profile Info" routerLink="/my-career-web/career-history/personal-data"></button>
</div>
</div> </div>
</div>
<div class="row"> <div class="row">
<div class="mt-3 col-md-6 d-flex justify-content-center"> <div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Update Skills" routerLink="/my-career-web/career-history/skills"></button> <button class="mc-btn-secondary" pButton label="Update Work History" routerLink="/my-career-web/career-history/work-history"></button>
</div>
<div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Update Educational Qualifications" routerLink="/my-career-web/career-history/education"></button>
</div>
</div> </div>
<div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Update Referees" routerLink="/my-career-web/career-history/references"></button> <div class="row">
<div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Update Skills" routerLink="/my-career-web/career-history/skills"></button>
</div>
<div class="mt-3 col-md-6 d-flex justify-content-center">
<button class="mc-btn-secondary" pButton label="Update Referees" routerLink="/my-career-web/career-history/references"></button>
</div>
</div> </div>
</div>
<div class="row mt-4"> <div class="row mt-4">
<div class="col-md-6 d-flex justify-content-between"> <div class="col-md-6 d-flex justify-content-between">
<span class="ml-4">Do you wish to publish the career profile? </span> <span class="ml-4">Do you wish to publish the career profile? </span>
<p-inputSwitch [(ngModel)]="careerProfile.PublishProfile" (onChange)="saveProfile()"></p-inputSwitch> <p-inputSwitch [(ngModel)]="careerProfile.PublishProfile" (onChange)="saveProfile()"></p-inputSwitch>
</div>
</div> </div>
</div>
<div class="row mt-4" *ngIf="careerProfile?.PublishProfile"> <div class="row mt-4" *ngIf="careerProfile?.PublishProfile">
<div class="col-md-6 d-flex justify-content-between"> <div class="col-md-6 d-flex justify-content-between">
<span class="ml-4" style="white-space: nowrap;">Share URL</span> <span class="ml-4" style="white-space: nowrap;">Share URL</span>
<a target="_blank" style="word-break: break-all; margin-left: 80px;" href="#">http://career.matchd.com/john+peters4</a> <a target="_blank" style="word-break: break-all; margin-left: 80px;" href="#">http://career.matchd.com/john+peters4</a>
</div>
</div> </div>
</div>
<div class="d-flex justify-content-center mt-5"> <div class="d-flex justify-content-center mt-5">
<button class="mc-btn-secondary" pButton label="Download Profile"></button> <button class="mc-btn-secondary" pButton label="Download Profile"></button>
</div> </div>
<div class="d-flex justify-content-center mt-5"> <div class="d-flex justify-content-center mt-5">
<button class="mc-btn-primary" pButton label="Complete" (click)="saveProfile(true)"></button> <button class="mc-btn-primary" pButton label="Complete" (click)="saveProfile(true)"></button>
</div>
</div> </div>
</div> </ng-template>
import { Component, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { PersonalDetailsService } from '../../../services/personal-details.service'; import { PersonalDetailsService } from '../../../services/personal-details.service';
import { CareerProfileModel } from '../../../models/career-profile.model'; import { CareerProfileModel } from '../../../models/career-profile.model';
import { UtilsService } from '../../../../oneit/services/utils.service'; import { UtilsService } from '../../../../oneit/services/utils.service';
...@@ -17,6 +17,7 @@ export class PublishComponent extends BaseComponent implements OnInit { ...@@ -17,6 +17,7 @@ export class PublishComponent extends BaseComponent implements OnInit {
assocs = []; assocs = [];
careerProfile = new CareerProfileModel(); careerProfile = new CareerProfileModel();
@Input() asChild = false;
constructor( constructor(
private personalDetailsService: PersonalDetailsService, private personalDetailsService: PersonalDetailsService,
......
...@@ -24,7 +24,7 @@ const routes: Routes = [ ...@@ -24,7 +24,7 @@ const routes: Routes = [
component: GoPremiumComponent component: GoPremiumComponent
}, },
{ {
path: 'reports', path: 'summary-report',
component: SummaryReportComponent component: SummaryReportComponent
}, },
{ {
......
...@@ -24,20 +24,25 @@ ...@@ -24,20 +24,25 @@
</div> </div>
<!-- <div class="home-body-heading">--> <ng-container *ngIf="careerProfile?.CompletedPercentageWP === 100 && careerProfile?.CompletedPercentageWS === 100">
<!-- Get to know yourself-->
<!-- </div>--> <div class="home-body-heading">
Get to know yourself
<!-- <div class="home-body-extra-features" style="min-height: 240px;">--> </div>
<!-- <div class="extra-feature">-->
<!-- <div class="feature-heading">Development Reports</div>--> <div class="home-body-extra-features" style="min-height: 240px;">
<!-- <div class="feature-content">Information about feature that gives user context as to why to upgrade.</div>--> <div class="extra-feature">
<!-- <div class="feature-action">View my summary report</div>--> <div class="feature-heading">Development Reports</div>
<!-- </div>--> <div class="feature-content">Information about feature that gives user context as to why to upgrade.</div>
<!-- <div class="extra-feature-image" style="position: relative;">--> <div class="feature-action">View my summary report</div>
<!-- <img src="assets/my-career-web/svgs/summary-report.svg" style="position: absolute; top: -54px; right: -26px;">--> </div>
<!-- </div>--> <div class="extra-feature-image" style="position: relative;" routerLink="/my-career-web/dashboard/summary-report">
<!-- </div>--> <img src="assets/my-career-web/svgs/summary-report.svg" style="position: absolute; top: -54px; right: -26px;">
</div>
</div>
</ng-container>
<div class="home-body-heading"> <div class="home-body-heading">
...@@ -106,21 +111,25 @@ ...@@ -106,21 +111,25 @@
<div class="home-mobile-body"> <div class="home-mobile-body">
<!-- <div class="mobile-body-heading">--> <ng-container *ngIf="careerProfile?.CompletedPercentageWP === 100 && careerProfile?.CompletedPercentageWS === 100">
<!-- Get to know yourself-->
<!-- </div>--> <div class="mobile-body-heading">
Get to know yourself
<!-- <div class="home-mobile-body-features">--> </div>
<!-- <div class="feature">-->
<!-- <div class="feature-heading">Development Reports</div>--> <div class="home-mobile-body-features">
<!-- <div class="feature-content">Information about feature that gives user context as to why to upgrade.</div>--> <div class="feature">
<!-- <div class="feature-action">Get this feature</div>--> <div class="feature-heading">Development Reports</div>
<div class="feature-content">Information about feature that gives user context as to why to upgrade.</div>
<!-- <div class="extra-feature-image" style="position: relative;">--> <div class="feature-action">Get this feature</div>
<!-- <img src="assets/my-career-web/svgs/summary-report.svg" style="margin-top: 10px;">-->
<!-- </div>--> <div class="extra-feature-image" style="position: relative;">
<!-- </div>--> <img src="assets/my-career-web/svgs/summary-report.svg" style="margin-top: 10px;">
<!-- </div>--> </div>
</div>
</div>
</ng-container>
<div class="mobile-body-heading"> <div class="mobile-body-heading">
......
...@@ -38,6 +38,8 @@ export class HomeComponent extends BaseComponent implements OnInit { ...@@ -38,6 +38,8 @@ export class HomeComponent extends BaseComponent implements OnInit {
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
.subscribe(profile => { .subscribe(profile => {
this.careerProfile = this.utilsService.cloneObject(profile); this.careerProfile = this.utilsService.cloneObject(profile);
console.log(this.careerProfile);
}); });
this.personalDetailsService.currentTab$ this.personalDetailsService.currentTab$
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</span> </span>
</div> </div>
<div class="sidebar-navigation-item disabled"> <div class="sidebar-navigation-item" routerLink="/my-career-web/career-history/update">
<span class="sidebar-navigation-item-icon"> <span class="sidebar-navigation-item-icon">
<i class="fa fa-lock"></i> <i class="fa fa-lock"></i>
</span> </span>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</span> </span>
</div> </div>
<div class="sidebar-navigation-item" routerLink="/my-career-web/dashboard/reports" routerLinkActive="active"> <div class="sidebar-navigation-item">
<span class="sidebar-navigation-item-icon"> <span class="sidebar-navigation-item-icon">
<i class="fa fa-clipboard"></i> <i class="fa fa-clipboard"></i>
</span> </span>
......
...@@ -14,6 +14,8 @@ export class CareerProfileModel extends BaseModel { ...@@ -14,6 +14,8 @@ export class CareerProfileModel extends BaseModel {
Candidate = new CandidateModel(); Candidate = new CandidateModel();
CompletedPercentage: number; CompletedPercentage: number;
CompletedPercentageCH: number; CompletedPercentageCH: number;
CompletedPercentageWP: number;
CompletedPercentageWS: number;
PersonalStatement: string; PersonalStatement: string;
Achievements: string; Achievements: string;
IsGoogleConnected: boolean; IsGoogleConnected: boolean;
......
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