Commit 738f6ec7 by Muhammad Usman

go back & diversity save issue fixed

parent 9b553f13
......@@ -74,7 +74,9 @@ export class DiversityProfileComponent extends BaseComponent implements OnInit {
if (div.MultipleAnswers) {
answers.push(...this.selectedAnswers[div.ObjectID]);
} else {
answers.push(this.selectedAnswers[div.ObjectID])
if (this.selectedAnswers[div.ObjectID]) {
answers.push(this.selectedAnswers[div.ObjectID])
}
}
});
this.assessmentService.saveDiversityProfile({Answers: answers})
......
......@@ -41,11 +41,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)="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>
......
......@@ -24,6 +24,7 @@ export class WorkPreferenceComponent extends BaseComponent implements OnInit, On
autoSavedOn;
autoSaveLabel = 'a few seconds ago';
selectedAns;
isBack;
constructor(
private assessmentService: AssessmentService,
......@@ -40,6 +41,7 @@ export class WorkPreferenceComponent extends BaseComponent implements OnInit, On
}
initiateWorkPreference(previousQuestion = false): void {
this.isBack = previousQuestion;
this.isLoading = true;
this.assessmentService.getWorkPreferences(this.assocs, previousQuestion)
.pipe(takeUntil(this.componentInView))
......
......@@ -58,11 +58,14 @@
</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>
......
......@@ -22,6 +22,7 @@ export class WorkStyleComponent extends BaseComponent implements OnInit, OnDestr
autoSavedOn;
autoSaveLabel = 'a few seconds ago';
wasUpdated = false;
isBack = false;
selectedAns;
constructor(
......@@ -39,6 +40,7 @@ export class WorkStyleComponent extends BaseComponent implements OnInit, OnDestr
}
initiateWorkStyle(previousQuestion = false): void {
this.isBack = previousQuestion;
this.isLoading = true;
this.assessmentService.getWorkStyle(this.assocs, previousQuestion)
.pipe(takeUntil(this.componentInView))
......@@ -71,6 +73,7 @@ export class WorkStyleComponent extends BaseComponent implements OnInit, OnDestr
submitAnswer(scale): void {
this.selectedAns = scale;
this.isBack = false;
const formData = {
Question: this.workStyleQuestion.Question.ObjectID,
Answer: scale,
......
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { CareerHistoryComponent } from './career-history/career-history.component';
import { PublishComponent } from './career-history/publish/publish.component';
const routes: Routes = [
{
path: 'update',
component: PublishComponent
},
{
path: ':screen',
component: CareerHistoryComponent
}
......
......@@ -29,28 +29,28 @@
<div class="assessment-body-tabs mc-card career-builder position-relative" *ngIf="careerProfile">
<p-tabView (onChange)="tabChanged($event)">
<p-tabPanel header="1{{isMobileView ? '' : '. Templates'}}" [selected]="activeTab === 'templates'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.TEMPLATES ? 'completed' : ''">
<app-templates></app-templates>
</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})">
<p-tabPanel header="1{{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: 1})">
</app-personal-details>
</p-tabPanel>
<p-tabPanel header="3{{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})">
<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: 2})">
</app-work-history>
</p-tabPanel>
<p-tabPanel header="4{{isMobileView ? '' : '. Education'}}" [selected]="activeTab === 'education'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.EDUCATION ? 'completed' : ''">
<app-education #educationComponent (educationSaved)="tabChanged({index: 4})"></app-education>
<p-tabPanel header="3{{isMobileView ? '' : '. Education'}}" [selected]="activeTab === 'education'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.EDUCATION ? 'completed' : ''">
<app-education #educationComponent (educationSaved)="tabChanged({index: 3})"></app-education>
</p-tabPanel>
<p-tabPanel header="5{{isMobileView ? '' : '. Skills'}}" [selected]="activeTab === 'skills'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.SKILLS ? 'completed' : ''">
<app-skills #skillsComponent (skillsSaved)="tabChanged({index: 5})"></app-skills>
<p-tabPanel header="4{{isMobileView ? '' : '. Skills'}}" [selected]="activeTab === 'skills'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.SKILLS ? 'completed' : ''">
<app-skills #skillsComponent (skillsSaved)="tabChanged({index: 4})"></app-skills>
</p-tabPanel>
<p-tabPanel header="6{{isMobileView ? '' : '. References'}}" [selected]="activeTab === 'references'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.REFERENCES ? 'completed' : ''">
<app-references #referencesComponent (refereeSaved)="tabChanged({index: 6})"></app-references>
<p-tabPanel header="5{{isMobileView ? '' : '. References'}}" [selected]="activeTab === 'references'" rightIcon="fa fa-check" [headerStyleClass]="careerProfile?.ProfileBulderTabCompletion?.REFERENCES ? 'completed' : ''">
<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 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-tabView>
</div>
......
......@@ -18,7 +18,7 @@ import { UtilsService } from '../../../oneit/services/utils.service';
})
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;
activeTab = '';
isExiting = false;
......
<div class="position-relative">
<app-overlay [isActive]="isLoading || isSaving"></app-overlay>
<div class="mc-page" *ngIf="!asChild">
<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">
<button class="mc-btn-primary" pButton label="Preview Profile"></button>
<div class="mc-page-body container">
<ng-container *ngTemplateOutlet="publishTemplate"></ng-container>
</div>
</div>
<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>
<ng-container *ngIf="asChild">
<ng-container *ngTemplateOutlet="publishTemplate"></ng-container>
</ng-container>
<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 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 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 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>
</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 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 class="row mt-4">
<div class="col-md-6 d-flex justify-content-between">
<span class="ml-4">Do you wish to publish the career profile? </span>
<p-inputSwitch [(ngModel)]="careerProfile.PublishProfile" (onChange)="saveProfile()"></p-inputSwitch>
<div class="row mt-4">
<div class="col-md-6 d-flex justify-content-between">
<span class="ml-4">Do you wish to publish the career profile? </span>
<p-inputSwitch [(ngModel)]="careerProfile.PublishProfile" (onChange)="saveProfile()"></p-inputSwitch>
</div>
</div>
</div>
<div class="row mt-4" *ngIf="careerProfile?.PublishProfile">
<div class="col-md-6 d-flex justify-content-between">
<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>
<div class="row mt-4" *ngIf="careerProfile?.PublishProfile">
<div class="col-md-6 d-flex justify-content-between">
<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>
</div>
</div>
</div>
<div class="d-flex justify-content-center mt-5">
<button class="mc-btn-secondary" pButton label="Download Profile"></button>
</div>
<div class="d-flex justify-content-center mt-5">
<button class="mc-btn-secondary" pButton label="Download Profile"></button>
</div>
<div class="d-flex justify-content-center mt-5">
<button class="mc-btn-primary" pButton label="Complete" (click)="saveProfile(true)"></button>
<div class="d-flex justify-content-center mt-5">
<button class="mc-btn-primary" pButton label="Complete" (click)="saveProfile(true)"></button>
</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 { CareerProfileModel } from '../../../models/career-profile.model';
import { UtilsService } from '../../../../oneit/services/utils.service';
......@@ -17,6 +17,7 @@ export class PublishComponent extends BaseComponent implements OnInit {
assocs = [];
careerProfile = new CareerProfileModel();
@Input() asChild = false;
constructor(
private personalDetailsService: PersonalDetailsService,
......
......@@ -24,7 +24,7 @@ const routes: Routes = [
component: GoPremiumComponent
},
{
path: 'reports',
path: 'summary-report',
component: SummaryReportComponent
},
{
......
......@@ -24,20 +24,25 @@
</div>
<!-- <div class="home-body-heading">-->
<!-- Get to know yourself-->
<!-- </div>-->
<!-- <div class="home-body-extra-features" style="min-height: 240px;">-->
<!-- <div class="extra-feature">-->
<!-- <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="feature-action">View my summary report</div>-->
<!-- </div>-->
<!-- <div class="extra-feature-image" style="position: relative;">-->
<!-- <img src="assets/my-career-web/svgs/summary-report.svg" style="position: absolute; top: -54px; right: -26px;">-->
<!-- </div>-->
<!-- </div>-->
<ng-container *ngIf="careerProfile?.CompletedPercentageWP === 100 && careerProfile?.CompletedPercentageWS === 100">
<div class="home-body-heading">
Get to know yourself
</div>
<div class="home-body-extra-features" style="min-height: 240px;">
<div class="extra-feature">
<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="feature-action">View my summary report</div>
</div>
<div class="extra-feature-image" style="position: relative;" routerLink="/my-career-web/dashboard/summary-report">
<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">
......@@ -106,21 +111,25 @@
<div class="home-mobile-body">
<!-- <div class="mobile-body-heading">-->
<!-- Get to know yourself-->
<!-- </div>-->
<!-- <div class="home-mobile-body-features">-->
<!-- <div class="feature">-->
<!-- <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="feature-action">Get this feature</div>-->
<!-- <div class="extra-feature-image" style="position: relative;">-->
<!-- <img src="assets/my-career-web/svgs/summary-report.svg" style="margin-top: 10px;">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<ng-container *ngIf="careerProfile?.CompletedPercentageWP === 100 && careerProfile?.CompletedPercentageWS === 100">
<div class="mobile-body-heading">
Get to know yourself
</div>
<div class="home-mobile-body-features">
<div class="feature">
<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="feature-action">Get this feature</div>
<div class="extra-feature-image" style="position: relative;">
<img src="assets/my-career-web/svgs/summary-report.svg" style="margin-top: 10px;">
</div>
</div>
</div>
</ng-container>
<div class="mobile-body-heading">
......
......@@ -38,6 +38,8 @@ export class HomeComponent extends BaseComponent implements OnInit {
.pipe(takeUntil(this.componentInView))
.subscribe(profile => {
this.careerProfile = this.utilsService.cloneObject(profile);
console.log(this.careerProfile);
});
this.personalDetailsService.currentTab$
.pipe(takeUntil(this.componentInView))
......
......@@ -13,7 +13,7 @@
</span>
</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">
<i class="fa fa-lock"></i>
</span>
......@@ -22,7 +22,7 @@
</span>
</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">
<i class="fa fa-clipboard"></i>
</span>
......
......@@ -14,6 +14,8 @@ export class CareerProfileModel extends BaseModel {
Candidate = new CandidateModel();
CompletedPercentage: number;
CompletedPercentageCH: number;
CompletedPercentageWP: number;
CompletedPercentageWS: number;
PersonalStatement: string;
Achievements: string;
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