@sunbird-cb/cbp-ai 0.1.86 → 0.1.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1736,6 +1736,14 @@ class EditCbpPlanComponent {
1736
1736
  }
1737
1737
  saveRoleMapping() {
1738
1738
  console.log("saved function called...");
1739
+ if (!this.planData?.igot_designation_id &&
1740
+ this.cbpForm.get('designation_name')?.value === this.planData?.designation_name) {
1741
+ this.snackBar.open('Please select atleast one designation', 'X', {
1742
+ duration: 3000,
1743
+ panelClass: ['snackbar-error']
1744
+ });
1745
+ return;
1746
+ }
1739
1747
  if (this.cbpForm.invalid)
1740
1748
  return;
1741
1749
  const formData = this.cbpForm.value;
@@ -1764,24 +1772,37 @@ class EditCbpPlanComponent {
1764
1772
  "competencies": formData.competencies
1765
1773
  };
1766
1774
  console.log('masterData?.designation', this.masterData?.designation);
1767
- if (formData?.igot_designation_id) {
1768
- req["igot_designation_id"] = formData?.igot_designation_id || '',
1769
- req["designation_name"] = formData?.designation_name ? formData.designation_name : '';
1775
+ const normalize = (v) => (v || '').trim().toLowerCase();
1776
+ const selectedDesignationName = formData?.designation_name ? formData.designation_name : '';
1777
+ const visibleDesignation = (this.masterData?.designation || []).find((item) => normalize(item?.name) === normalize(selectedDesignationName) &&
1778
+ item?.igot_designation_id);
1779
+ const backupDesignation = (this.masterData?.designationBackup || []).find((item) => normalize(item?.name) === normalize(selectedDesignationName) &&
1780
+ item?.igot_designation_id);
1781
+ const isSameAsExistingDesignation = normalize(this.planData?.designation_name || '') ===
1782
+ normalize(selectedDesignationName);
1783
+ const resolvedDesignationId = formData?.igot_designation_id ||
1784
+ visibleDesignation?.igot_designation_id ||
1785
+ backupDesignation?.igot_designation_id ||
1786
+ (isSameAsExistingDesignation
1787
+ ? (this.planData?.igot_designation_id || '')
1788
+ : '');
1789
+ if (isSameAsExistingDesignation && !resolvedDesignationId) {
1790
+ console.log('Skipping designation payload for unchanged unmatched designation');
1770
1791
  }
1771
1792
  else {
1772
- console.log('masterData?.designation', this.masterData?.designation);
1773
- req["designation_name"] = formData?.designation_name ? formData.designation_name : '';
1774
- console.log('Searching in backup:', this.masterData.designationBackup.find((x) => x.name?.trim().toLowerCase() ===
1775
- formData.designation_name?.trim().toLowerCase()));
1776
- const selectedDesignation = this.masterData?.designation?.find((item) => item?.name?.toLowerCase() === formData?.designation_name?.toLowerCase());
1777
- const backupDesignation = this.masterData.designationBackup.find((x) => x.name?.toLowerCase() ===
1778
- formData.designation_name?.toLowerCase());
1779
- console.log('backupDesignation', backupDesignation);
1780
- req["igot_designation_id"] = selectedDesignation?.igot_designation_id || '';
1781
- console.log('designation_name 123 ', formData.designation_name);
1782
- console.log('selectedDesignation 123', selectedDesignation);
1783
- console.log('igot_designation_id 123', req['igot_designation_id']);
1793
+ if (!resolvedDesignationId) {
1794
+ this.loading = false;
1795
+ this.snackBar.open('Please select a valid designation from the list.', 'X', {
1796
+ duration: 3000,
1797
+ panelClass: ['snackbar-error']
1798
+ });
1799
+ return;
1800
+ }
1801
+ req["designation_name"] = selectedDesignationName;
1802
+ req["igot_designation_id"] = resolvedDesignationId;
1784
1803
  }
1804
+ console.log('backupDesignation', backupDesignation);
1805
+ console.log('igot_designation_id 123', req['igot_designation_id']);
1785
1806
  if (this.sharedService.fromMdoPortal) {
1786
1807
  req['request_id'] = this.requestRowData?.id;
1787
1808
  req['item_id'] = this.planData?.id;
@@ -2225,10 +2246,10 @@ class EditCbpPlanComponent {
2225
2246
  igot_designation_id: '',
2226
2247
  };
2227
2248
  }
2228
- // 🔥 Move to top
2249
+ const deduplicatedBackup = backup.filter((item) => normalize(item?.name) !== normalize(selectedDesignation));
2229
2250
  this.masterData.designationBackup = [
2230
2251
  selectedObj,
2231
- ...backup
2252
+ ...deduplicatedBackup
2232
2253
  ];
2233
2254
  // Also update visible list (same order logic)
2234
2255
  const visible = [...(this.masterData.designation || [])];
@@ -2396,11 +2417,11 @@ class EditCbpPlanComponent {
2396
2417
  }
2397
2418
  }
2398
2419
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditCbpPlanComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i2.FormBuilder }, { token: i0.ChangeDetectorRef }, { token: SharedService }, { token: i3$1.MatSnackBar }, { token: i1.HttpClient }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
2399
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EditCbpPlanComponent, selector: "app-edit-cbp-plan", viewQueries: [{ propertyName: "dialogContent", first: true, predicate: ["dialogContent"], descendants: true }, { propertyName: "designationRef", first: true, predicate: ["designation"], descendants: true, read: ElementRef }, { propertyName: "editSection", first: true, predicate: ["editSection"], descendants: true }], ngImport: i0, template: "<div class=\"view-cbp-plan\" #dialogContent>\n <div class=\"popup-container\">\n <div class=\"popup-header\">\n <div>\n <div class=\"heading\">Edit Role Mapping</div>\n </div>\n <div class=\"cursor-pointer\" (click)=\"closeDialog()\">\n <mat-icon>close</mat-icon>\n </div>\n </div>\n <div class=\"section-container\" [formGroup]=\"cbpForm\">\n\n <!-- <div class=\"section-header mt-4\">\n <input type=\"text\" formControlName=\"designation_name\" [value]=\"planData?.designation_name\"\n style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n\n\n </div> -->\n\n <mat-form-field appearance=\"outline\" class=\"mt-4 margin-top-s w-full required-select\" style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n <mat-select #designation formControlName=\"designation_name\"\n placeholder=\"Select designation\" (closed)=\"onDesignationDropdownClosed()\"\n panelClass=\"search-panel\" (openedChange)=\"setupScrollListener($event)\"\n >\n\n <!-- Sticky search input container -->\n <div class=\"sticky-search-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"search-input-wrapper\">\n <input type=\"text\" placeholder=\"Search designation\" style=\"width:100%\"\n formControlName=\"searchDesignation\" class=\"search-input\"\n (keydown)=\"$event.stopPropagation()\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation()\"\n autocomplete=\"off\">\n <!-- (keyup)=\"designationSearch($event)\" -->\n <div *ngIf=\"searchDesignationControl?.value\" type=\"button\" class=\"clear-icon\"\n (click)=\"clearDesignationSearch($event)\">\n <mat-icon>close</mat-icon>\n </div>\n </div>\n </div>\n <!-- Options list -->\n <mat-option [value]=\"designation?.name\" *ngFor=\"let designation of masterData?.designation\">\n {{designation?.name}}\n </mat-option>\n <!-- Loading indicator -->\n <div *ngIf=\"isLoadingMoreDesignations\" class=\"loading-indicator\">\n Load More...\n </div>\n <!-- No results message -->\n <mat-option *ngIf=\"(masterData?.designation)?.length === 0 || noMoreLegacyDesignations\" disabled class=\"no-data-option\">\n\n Designation Not Found.\n\n </mat-option>\n \n </mat-select>\n <!-- <mat-error class=\"text-xs\"\n *ngIf=\"designationForm?.get('designation_name')?.touched && designationForm?.get('designation_name')?.invalid\">\n Please select at least one designation.\n </mat-error> -->\n </mat-form-field>\n\n <div class=\"competency-container mt-4\">\n <div class=\"outside-layer-total\">\n <div class=\"inside-layer\">\n Total Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.total}}\n </div>\n </div>\n <div class=\"outside-layer-behavioral\">\n <div class=\"inside-layer\">\n Behavioral Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.behavioral}}\n </div>\n </div>\n <div class=\"outside-layer-functional\">\n <div class=\"inside-layer\">\n Functional Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.functional}}\n </div>\n </div>\n <div class=\"outside-layer-domain\">\n <div class=\"inside-layer\">\n Domain Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.domain}}\n </div>\n </div>\n </div>\n <div class=\"mt-4 section\">\n <div class=\"sub-heading\">\n <p>Wing/Division</p>\n </div>\n <div class=\"mt-4\">\n <input type=\"text\" formControlName=\"wing_division_section\" [value]=\"planData?.wing_division_section\"\n style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width:100%;font-size: 14px;font-family: 'Lato';\">\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Roles & Responsibilities</p>\n </div>\n <div class=\"mt-4 additional-details\">\n <textarea class=\"custom-textarea\" formControlName=\"role_responsibilities_text\" rows=\"5\"\n placeholder=\"Roles & Responsibilities\"\n [value]=\"planData?.role_responsibilities?.join('\\n')\"></textarea>\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Activities</p>\n </div>\n <div class=\"mt-4 additional-details\">\n <textarea class=\"custom-textarea\" formControlName=\"activities_text\" rows=\"5\"\n placeholder=\"Activities\" [value]=\"planData?.activities?.join('\\n')\"></textarea>\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Competency</p>\n </div>\n <div #editSection class=\"enhanced-competency-section mt-2\">\n <!-- Step 1: Select Competency Type -->\n <div class=\"competency-step\">\n <label class=\"step-label\">1. Select Core Competency Type</label>\n <div class=\"competency-dropdown-container\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencyType\" placeholder=\"Select Competency Type\"\n (selectionChange)=\"onCompetencyTypeChange($event.value)\">\n <mat-option value=\"Behavioral\">Behavioral</mat-option>\n <mat-option value=\"Functional\">Functional</mat-option>\n <mat-option value=\"Domain\">Domain</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n <!-- Step 2: Theme Selection (Behavioral/Functional from JSON, Domain manual) -->\n <div class=\"competency-step\" *ngIf=\"selectedCompetencyType\">\n <label class=\"step-label\">2. Select/Enter Theme</label>\n\n <!-- For Behavioral and Functional: Searchable Dropdown from JSON -->\n <div class=\"competency-dropdown-container\"\n *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencyTheme\" placeholder=\"Search and select theme\"\n (selectionChange)=\"onThemeChange($event.value)\">\n <!-- Search input inside dropdown -->\n <mat-option class=\"search-option\" disabled>\n <mat-form-field appearance=\"outline\" class=\"search-field\">\n <input matInput placeholder=\"Search themes...\" formControlName=\"themeSearch\"\n (input)=\"filterThemes($event.target?.value)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n </mat-form-field>\n </mat-option>\n\n <!-- Theme options -->\n <mat-option *ngFor=\"let theme of filteredThemes\" [value]=\"theme.name\">\n {{theme.name}}\n </mat-option>\n\n <!-- No results message -->\n <mat-option *ngIf=\"filteredThemes.length === 0 && themeSearchText\" disabled>\n No themes found matching \"{{themeSearchText}}\"\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- For Domain: Manual input -->\n <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n <input type=\"text\" formControlName=\"manualThemeInput\" placeholder=\"Enter Theme manually\"\n class=\"manual-input\" />\n </div>\n </div>\n\n <!-- Step 3: Sub-theme Selection -->\n <div class=\"competency-step\" *ngIf=\"selectedTheme || (selectedCompetencyType === 'Domain')\">\n <label class=\"step-label\">3. Select/Enter Sub-theme</label>\n\n <!-- For Behavioral and Functional: Searchable Dropdown based on selected theme -->\n <div class=\"competency-dropdown-container\"\n *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencySubTheme\"\n placeholder=\"Search and select sub-theme\"\n (selectionChange)=\"onSubThemeChange($event.value)\">\n <!-- Search input inside dropdown -->\n <mat-option class=\"search-option\" disabled>\n <mat-form-field appearance=\"outline\" class=\"search-field\">\n <input matInput placeholder=\"Search sub-themes...\"\n formControlName=\"subThemeSearch\"\n (input)=\"filterSubThemes($event.target.value)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n </mat-form-field>\n </mat-option>\n\n <!-- Sub-theme options -->\n <mat-option *ngFor=\"let subTheme of filteredSubThemes\" [value]=\"subTheme\">\n {{subTheme}}\n </mat-option>\n\n <!-- No results message -->\n <mat-option *ngIf=\"filteredSubThemes.length === 0 && subThemeSearchText\" disabled>\n No sub-themes found matching \"{{subThemeSearchText}}\"\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- For Domain: Manual input -->\n <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n <input type=\"text\" formControlName=\"manualSubThemeInput\"\n placeholder=\"Enter Sub-theme manually\" class=\"manual-input\" />\n </div>\n </div>\n\n <!-- Add Button -->\n <div class=\"add-button-section\" *ngIf=\"selectedCompetencyType \">\n <button type=\"button\" *ngIf=\"!editDomainCompetencyFlag\" class=\"add-competency-btn\"\n [disabled]=\"!canAddCompetency()\"\n [ngClass]=\"canAddCompetency() ? 'btn-active' : 'btn-disable'\" (click)=\"addCompetency()\">\n Add Competency\n </button>\n <button type=\"button\" *ngIf=\"editDomainCompetencyFlag\" class=\"add-competency-btn btn-active\"\n (click)=\"updateCompetency()\">\n Update Competency\n </button>\n <button type=\"button\" *ngIf=\"editDomainCompetencyFlag\" class=\"add-competency-btn btn-active\"\n style=\"margin-left: 5px;\" (click)=\"cancelUpdate()\">\n Cancel </button>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Behavioral')?.length\">\n Behavioral Competencies\n </div>\n\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item behavioural-pill\"\n *ngFor=\"let comp of getCompetenciesByType('Behavioral')\">\n <span class=\"competency-text-behavioral\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Functional')?.length\">\n Functional Competencies</div>\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item functional-pill\"\n *ngFor=\"let comp of getCompetenciesByType('Functional')\">\n <span class=\"competency-text-functional\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\">Domain Competencies</div>\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item domain-pill\" *ngFor=\"let comp of getCompetenciesByType('Domain')\">\n <span class=\"competency-text-domain\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer edit\" (click)=\"editCompetency(comp)\">\n <mat-icon>edit</mat-icon>\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"popup-footer\">\n <div>\n <input class=\"btn-active\" type=\"button\" value=\"Cancel\" (click)=\"cancelForm()\" />\n </div>\n <div>\n <input class=\"btn-active\" type=\"button\" value=\"Save\" (click)=\"saveRoleMapping()\" />\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: ["@charset \"UTF-8\";.container{margin:10px auto}.sub-heading p{color:#000;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.radio-label{color:#000;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.radio-btn-group{display:flex;width:32px;height:32px;padding:2px;gap:10px}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:150%}::ng-deep .legacy-form-field{background-color:#fff!important;border-radius:25px!important;padding-left:12px;padding-right:12px;height:42px;width:100%}::ng-deep mat-select{border-radius:25px!important;background-color:#fff!important}::ng-deep .mat-select-panel{background-color:#fff!important}::ng-deep .mat-select-panel .mat-option{border-radius:0!important}::ng-deep mat-form-field .mat-form-field-underline{display:none!important}::ng-deep mat-select .mat-select-placeholder{color:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}::ng-deep mat-select .mat-select-value-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;line-height:normal!important;padding-top:0!important;padding-bottom:0!important}::ng-deep mat-select .mat-select-value{display:flex!important;align-items:center!important;height:100%!important}.additional-details textarea{display:flex;padding:16px 16px 0;flex-direction:column;align-items:flex-start;gap:10px;flex:1 0 0;align-self:stretch;width:100%;color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;resize:none}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.btn-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.4;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:5px}.search-filter-section{display:flex;flex-direction:row;gap:10px}.legacy-search-filter{display:none}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:10px;font-size:20px;left:10px}.search .sinput{border-radius:4px;border:1px solid #d5d0d0;padding:15px 36px;font:400 14px Lato}.select-map-route-container{display:flex;flex-direction:row}.selected-mapping-route p{color:#1b4ca1;font-family:Lato;font-size:20px;font-style:normal;font-weight:400;line-height:normal;text-decoration-line:underline;text-decoration-style:solid;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font}.edit-plan{display:flex;padding:4px;justify-content:center;align-items:center;gap:8px;border-radius:4px;background:#1b4ca129;color:#1b4ca1;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;margin-left:10px}.search-container{display:flex;flex-direction:row}.course-container{display:flex;width:100%;padding:16px;flex-direction:column;align-items:flex-start;gap:24px;grid-row:2/span 1;grid-column:1/span 1;border-radius:12px;border:1px solid var(--borders-black-border-16-black, rgba(0, 0, 0, .16));background:#fff}.course-header{display:flex;flex-direction:row;justify-content:space-between;width:100%}.course-pill{display:flex;height:24px;padding:8px;align-items:center;gap:4px;border-radius:16px;border:1px solid var(--borders-border-fill-focussed-4-light-100, #EF951E);background:#fefaf4}.ai-recommened-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #1B4CA1;background:#1b4ca129}.igot-platform-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #EF951E;background:#ef951e29}.course-title{color:var(--Primary-KB-Primary-Light, #1B4CA1);font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:30px}.course-desc{color:#0009;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.relevancy,.competencies-matched{color:var(--accessbility-shades-with-opacity-kb-greys-black-60, rgba(0, 0, 0, .6));font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;align-items:center}.percentage{color:#1d8923;font-family:Lato;font-size:14px;font-style:normal;font-weight:800;line-height:normal}.relevancy-container,.competencies-matched-container{display:flex;flex-direction:row;align-items:center}.dash{padding:0 5px}::ng-deep .mat-radio-checked .mat-radio-inner-circle{background:#1b4ca1!important}.course-list-container{display:flex;flex-wrap:wrap;gap:16px}.course-list-item{flex:0 0 48%;box-sizing:border-box;border:1px solid #ccc;padding:16px;background-color:#fff;border-radius:8px}.checked-course-container{display:flex}.ml-2{margin-left:8px}::ng-deep .mat-checkbox-checked .mat-checkbox-background{background:#1b4ca1!important}.ai-recommened-pill-text,.igot-platform-pill-text{color:#1b4ca1;font-family:Lato;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.course-pill-text{color:var(--accessbility-shades-without-opacity-kb-greys-black-87, #212121);text-align:center;font-family:Poppins;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.ai-loader-icon img,.igot-platform-icon img{width:15.714px;height:15.714px;flex-shrink:0}.competency-container{display:flex;justify-content:space-between;flex-direction:row}.outside-layer-total{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #1B4CA1;border-right:2px solid #1B4CA1;background:#edf1f8;margin:0 10px}.outside-layer-functional{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #E24577;border-right:2px solid #E24577;background:#f8d2de;margin:0 10px}.outside-layer-domain{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #7B47A4;border-right:2px solid #7B47A4;background:#dfd3e9;margin:0 10px}.outside-layer-behavioral{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #F8B861;border-right:2px solid #F8B861;background:#fde8cc;margin:0 10px}.inside-layer{color:#1b4ca1;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.count{color:#1b4ca1;font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal}.suggest-courses-header{display:flex;flex-direction:row;justify-content:space-between}.suggest-course-control{display:flex;flex-direction:row}.course-card-container{width:172px;border-radius:3.307px;border:.827px solid var(--borders-border-8-black, rgba(0, 0, 0, .08));background-color:#fff}.highlight-ai{font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal;background:linear-gradient(90deg,#3b27ff,#2de3d6);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;display:inline-block}.ai-loader-icon-medium img{width:40px;height:40px;flex-shrink:0}.heading{color:#000;font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:normal;margin:10px 0}.progress-popup{display:flex;flex-direction:column;justify-content:center;align-items:center}.progress-popup .desc{color:#000000de;text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.behavioural-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #F8B861;background:linear-gradient(0deg,#f8b86152 0% 100%),#fff;margin:5px 0}.functional-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #E24577;background:linear-gradient(0deg,#e245773d 0% 100%),#fff;margin:5px 0}.domain-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #7B47A4;background:linear-gradient(0deg,#7b47a43d 0% 100%),#fff;margin:5px 0}.popup-header{display:flex;flex-direction:row;justify-content:space-between}.popup-footer{display:flex;flex-direction:row;justify-content:end}.view-cbp-plan{margin:10px;padding:10px}.view-cbp-plan-popup{padding:24px;max-height:70vh;overflow-y:auto}.section{border-radius:8px;background:#1b4ca114;padding:16px}.popup-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;font-weight:700;flex-shrink:0}.popup-footer{display:flex;justify-content:flex-end;gap:16px;padding:16px 24px;border-top:1px solid #ddd;background-color:#fff;flex-shrink:0;position:sticky;bottom:0}.section-container{overflow-y:auto;flex:1 1 auto}.competency-list{display:flex;flex-direction:row;gap:6px}.competency-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;padding:5px}.competency-text-behavioral{color:#654321;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-functional{color:#b01669;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-domain{color:#301934;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-sub-heading{color:#1b4ca1;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.cursor-pointer{cursor:pointer}.btn-active{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.custom-textarea{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.overlay-loader{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#ffffffbf;z-index:9999;display:flex;justify-content:center;align-items:center}.close .mat-icon{height:18px!important;width:18px!important}.edit .mat-icon{height:24px!important;width:24px!important;overflow:visible;vertical-align:middle}:host ::ng-deep .mat-select-arrow-wrapper{height:6px!important}::ng-deep .filter-section .mat-form-field-appearance-fill .mat-form-field-flex{padding:.5em .75em 0!important}.competency-grid{display:flex;flex-wrap:wrap;gap:12px}.competency-item{flex:0 0 calc(33.333% - 12px);box-sizing:border-box;background-color:#f5f5f5;padding:4px 10px;border-radius:6px;display:flex;justify-content:space-between;align-items:center}.snackbar-success{background-color:#4caf50!important;color:#fff!important;font-weight:500;font-size:14px;border-radius:4px}.enhanced-competency-section{display:flex;flex-direction:column;gap:24px;padding:24px;background:linear-gradient(135deg,#1b4ca105,#1b4ca10f);border-radius:12px;border:1px solid rgba(27,76,161,.15);box-shadow:0 2px 8px #1b4ca114}.competency-step{display:flex;flex-direction:column;gap:12px}.step-label{color:#1b4ca1;font-family:Lato;font-size:15px;font-weight:600;margin-bottom:8px;display:flex;align-items:center}.step-label:before{content:\"\";width:4px;height:16px;background:#1b4ca1;border-radius:2px;margin-right:8px}.competency-dropdown-container,.manual-input-container{width:100%;position:relative}.competency-dropdown{width:100%}.competency-dropdown ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.competency-dropdown ::ng-deep .mat-form-field-flex{padding:0 16px 0 20px;height:48px;align-items:center;transition:all .3s ease;display:flex;justify-content:space-between}.competency-dropdown ::ng-deep .mat-form-field-flex:hover{border-color:#1b4ca1}.competency-dropdown ::ng-deep .mat-form-field-outline,.competency-dropdown ::ng-deep .mat-form-field-outline-start,.competency-dropdown ::ng-deep .mat-form-field-outline-gap,.competency-dropdown ::ng-deep .mat-form-field-outline-end{display:none}.competency-dropdown ::ng-deep .mat-form-field-infix{padding:0;border:none;height:48px;display:flex;align-items:center;flex:1;width:auto}.competency-dropdown ::ng-deep .mat-select{height:100%;display:flex;align-items:center;font-family:Lato;font-size:14px;color:#333;width:100%;flex:1}.competency-dropdown ::ng-deep .mat-select-value{display:flex;align-items:center;height:100%;color:#333;font-weight:400;flex:1;width:100%;justify-content:flex-start}.competency-dropdown ::ng-deep .mat-select-placeholder{color:#00000080;width:100%;display:flex;align-items:center}.competency-dropdown ::ng-deep .mat-select-value-text{width:100%;display:flex;align-items:center;font-weight:400}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper{height:20px;display:flex;align-items:center;margin-left:8px;flex-shrink:0}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper .mat-select-arrow{color:#1b4ca1;border-top-color:#1b4ca1;margin:0}.competency-dropdown ::ng-deep .mat-form-field-label{display:none}.competency-dropdown ::ng-deep .mat-focused .mat-form-field-flex{border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.competency-dropdown ::ng-deep .mat-select-min-line{line-height:normal}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{padding:0}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0;padding:0}.search-option{pointer-events:auto!important;opacity:1!important}.search-option ::ng-deep .mat-option-text{width:100%;padding:0}.search-field{width:100%;margin:0}.search-field ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.search-field ::ng-deep .mat-form-field-flex{height:36px;padding:0 12px;align-items:center}.search-field ::ng-deep .mat-form-field-infix{padding:0;border:none;height:36px;display:flex;align-items:center}.search-field ::ng-deep .mat-form-field-underline,.search-field ::ng-deep .mat-form-field-outline{display:none}.search-field ::ng-deep input{font-family:Lato;font-size:13px;color:#495057}.search-field ::ng-deep input::placeholder{color:#6c757d}::ng-deep .mat-select-panel{background:#fff;border-radius:12px;box-shadow:0 8px 32px #0000001f;border:1px solid #e0e0e0;max-height:320px;margin-top:4px}::ng-deep .mat-select-panel .mat-option{font-family:Lato;font-size:14px;padding:14px 16px;line-height:1.4;transition:all .2s ease;border-bottom:1px solid rgba(0,0,0,.05)}::ng-deep .mat-select-panel .mat-option:last-child{border-bottom:none}::ng-deep .mat-select-panel .mat-option:hover{background-color:#1b4ca10f;color:#1b4ca1}::ng-deep .mat-select-panel .mat-option.mat-selected{background-color:#1b4ca11a;color:#1b4ca1;font-weight:500;position:relative}::ng-deep .mat-select-panel .mat-option.mat-selected:after{content:\"\\2713\";position:absolute;right:16px;color:#1b4ca1;font-weight:700}::ng-deep .mat-select-panel .mat-option.search-option{padding:12px;background-color:#f8f9fa;border-bottom:2px solid #e9ecef;position:sticky;top:0;z-index:10}::ng-deep .mat-select-panel .mat-option.search-option:hover{background-color:#f8f9fa}.enhanced-competency-section ::ng-deep mat-select{border-radius:0!important;background-color:transparent!important}.enhanced-competency-section ::ng-deep mat-form-field .mat-form-field-underline{display:none!important}.enhanced-competency-section ::ng-deep .mat-select-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:auto}.enhanced-competency-section ::ng-deep .mat-form-field-suffix{margin:0;padding:0;display:flex;align-items:center}.manual-input{border-radius:25px;border:2px solid #e0e0e0;padding:12px 16px;width:100%;font-size:14px;font-family:Lato;background:#fff;height:48px;box-sizing:border-box;transition:all .3s ease;box-shadow:0 2px 4px #0000000d}.manual-input::placeholder{color:#00000080;font-family:Lato;font-size:14px}.manual-input:focus{outline:none;border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.manual-input:hover{border-color:#1b4ca1;box-shadow:0 4px 8px #1b4ca11a}.add-button-section{display:flex;justify-content:flex-start;margin-top:20px;padding-top:20px;border-top:2px solid rgba(27,76,161,.1)}.add-competency-btn{border-radius:25px;padding:12px 24px;font-family:Lato;font-size:14px;font-weight:600;border:none;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 8px #0000001a;min-width:140px}.add-competency-btn.btn-active{background:linear-gradient(135deg,#1b4ca1,#164080);color:#fff}.add-competency-btn.btn-active:hover{background:linear-gradient(135deg,#164080,#0f2f5f);box-shadow:0 4px 16px #1b4ca14d;transform:translateY(-1px)}.add-competency-btn.btn-active:active{transform:translateY(0);box-shadow:0 2px 8px #1b4ca133}.add-competency-btn.btn-disable{background:#e9ecef;color:#6c757d;cursor:not-allowed;opacity:.7;box-shadow:none;border:1px solid #ccc}:host ::ng-deep .mat-select-panel.search-panel{max-height:300px!important;overflow-y:auto!important;box-sizing:border-box}::ng-deep .search-panel .sticky-search-container{position:sticky;top:0;z-index:100;background:#fff;padding:8px;border-bottom:1px solid #eee}:host ::ng-deep .search-panel .search-input-wrapper{display:flex;gap:8px;align-items:center}:host ::ng-deep .search-panel .search-input{width:100%;height:32px;padding:6px 10px}:host ::ng-deep .search-panel .mat-option{padding:8px 16px!important}:host ::ng-deep .search-panel .mat-pseudo-checkbox{margin-right:8px}:host ::ng-deep .search-panel .no-data-option{padding:10px 16px;font-size:14px;color:#f44336}::ng-deep .search-panel .no-data-option .mat-pseudo-checkbox{display:none!important}.search-input-wrapper{position:relative;width:100%;display:flex;align-items:center}.search-input{width:100%;padding-right:40px;height:40px;line-height:40px;box-sizing:border-box}.clear-icon{position:absolute;right:10px;cursor:pointer;font-size:20px;color:#666;display:flex;align-items:center;height:100%}.clear-icon:hover{color:#000}:host ::ng-deep .search-panel .mat-option:first-child{margin-top:0}:host ::ng-deep .mat-notched-outline{border-radius:25px!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{border-radius:25px!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start,:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-width:1px!important;min-width:0!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:transparent!important}:host ::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:transparent!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{border-radius:25px;height:30px;align-items:center;padding:0 16px;background:#fff}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i7.MatLegacyFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLegacyInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", exportAs: ["matInput"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatLegacySelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i11.MatLegacyOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i11$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
2420
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EditCbpPlanComponent, selector: "app-edit-cbp-plan", viewQueries: [{ propertyName: "dialogContent", first: true, predicate: ["dialogContent"], descendants: true }, { propertyName: "designationRef", first: true, predicate: ["designation"], descendants: true, read: ElementRef }, { propertyName: "editSection", first: true, predicate: ["editSection"], descendants: true }], ngImport: i0, template: "<div class=\"view-cbp-plan\" #dialogContent>\n <div class=\"popup-container\">\n <div class=\"popup-header\">\n <div>\n <div class=\"heading\">\n Edit Role Mapping\n <span class=\"text-sm\">\n ({{ cbpForm?.get('designation_name')?.value || planData?.designation_name }})\n </span>\n</div>\n </div>\n <div class=\"cursor-pointer\" (click)=\"closeDialog()\">\n <mat-icon>close</mat-icon>\n </div>\n </div>\n <div class=\"section-container\" [formGroup]=\"cbpForm\">\n\n <!-- <div class=\"section-header mt-4\">\n <input type=\"text\" formControlName=\"designation_name\" [value]=\"planData?.designation_name\"\n style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n\n\n </div> -->\n\n <mat-form-field appearance=\"outline\" class=\"mt-4 margin-top-s w-full required-select\" style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n <mat-select #designation formControlName=\"designation_name\"\n placeholder=\"Select designation\" (closed)=\"onDesignationDropdownClosed()\"\n panelClass=\"search-panel\" (openedChange)=\"setupScrollListener($event)\"\n >\n\n <!-- Sticky search input container -->\n <div class=\"sticky-search-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"search-input-wrapper\">\n <input type=\"text\" placeholder=\"Search designation\" style=\"width:100%\"\n formControlName=\"searchDesignation\" class=\"search-input\"\n (keydown)=\"$event.stopPropagation()\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation()\"\n autocomplete=\"off\">\n <!-- (keyup)=\"designationSearch($event)\" -->\n <div *ngIf=\"searchDesignationControl?.value\" type=\"button\" class=\"clear-icon\"\n (click)=\"clearDesignationSearch($event)\">\n <mat-icon>close</mat-icon>\n </div>\n </div>\n </div>\n <!-- Options list -->\n <!-- <ng-container *ngFor=\"let designation of masterData?.designation\">\n <mat-option\n *ngIf=\"designation?.name !== planData?.designation_name\"\n [value]=\"designation?.name\">\n {{ designation?.name }}\n </mat-option>\n</ng-container> -->\n<ng-container *ngFor=\"let designation of masterData?.designation\">\n <mat-option\n *ngIf=\"planData?.igot_designation_id || designation?.name !== planData?.designation_name\"\n [value]=\"designation?.name\">\n {{ designation?.name }}\n </mat-option>\n</ng-container>\n <!-- Loading indicator -->\n <div *ngIf=\"isLoadingMoreDesignations\" class=\"loading-indicator\">\n Load More...\n </div>\n <!-- No results message -->\n <mat-option *ngIf=\"(masterData?.designation)?.length === 0 || noMoreLegacyDesignations\" disabled class=\"no-data-option\">\n\n Designation Not Found.\n\n </mat-option>\n \n </mat-select>\n <!-- <mat-error class=\"text-xs\"\n *ngIf=\"designationForm?.get('designation_name')?.touched && designationForm?.get('designation_name')?.invalid\">\n Please select at least one designation.\n </mat-error> -->\n </mat-form-field>\n\n <div class=\"competency-container mt-4\">\n <div class=\"outside-layer-total\">\n <div class=\"inside-layer\">\n Total Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.total}}\n </div>\n </div>\n <div class=\"outside-layer-behavioral\">\n <div class=\"inside-layer\">\n Behavioral Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.behavioral}}\n </div>\n </div>\n <div class=\"outside-layer-functional\">\n <div class=\"inside-layer\">\n Functional Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.functional}}\n </div>\n </div>\n <div class=\"outside-layer-domain\">\n <div class=\"inside-layer\">\n Domain Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.domain}}\n </div>\n </div>\n </div>\n <div class=\"mt-4 section\">\n <div class=\"sub-heading\">\n <p>Wing/Division</p>\n </div>\n <div class=\"mt-4\">\n <input type=\"text\" formControlName=\"wing_division_section\" [value]=\"planData?.wing_division_section\"\n style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width:100%;font-size: 14px;font-family: 'Lato';\">\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Roles & Responsibilities</p>\n </div>\n <div class=\"mt-4 additional-details\">\n <textarea class=\"custom-textarea\" formControlName=\"role_responsibilities_text\" rows=\"5\"\n placeholder=\"Roles & Responsibilities\"\n [value]=\"planData?.role_responsibilities?.join('\\n')\"></textarea>\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Activities</p>\n </div>\n <div class=\"mt-4 additional-details\">\n <textarea class=\"custom-textarea\" formControlName=\"activities_text\" rows=\"5\"\n placeholder=\"Activities\" [value]=\"planData?.activities?.join('\\n')\"></textarea>\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Competency</p>\n </div>\n <div #editSection class=\"enhanced-competency-section mt-2\">\n <!-- Step 1: Select Competency Type -->\n <div class=\"competency-step\">\n <label class=\"step-label\">1. Select Core Competency Type</label>\n <div class=\"competency-dropdown-container\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencyType\" placeholder=\"Select Competency Type\"\n (selectionChange)=\"onCompetencyTypeChange($event.value)\">\n <mat-option value=\"Behavioral\">Behavioral</mat-option>\n <mat-option value=\"Functional\">Functional</mat-option>\n <mat-option value=\"Domain\">Domain</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n <!-- Step 2: Theme Selection (Behavioral/Functional from JSON, Domain manual) -->\n <div class=\"competency-step\" *ngIf=\"selectedCompetencyType\">\n <label class=\"step-label\">2. Select/Enter Theme</label>\n\n <!-- For Behavioral and Functional: Searchable Dropdown from JSON -->\n <div class=\"competency-dropdown-container\"\n *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencyTheme\" placeholder=\"Search and select theme\"\n (selectionChange)=\"onThemeChange($event.value)\">\n <!-- Search input inside dropdown -->\n <mat-option class=\"search-option\" disabled>\n <mat-form-field appearance=\"outline\" class=\"search-field\">\n <input matInput placeholder=\"Search themes...\" formControlName=\"themeSearch\"\n (input)=\"filterThemes($event.target?.value)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n </mat-form-field>\n </mat-option>\n\n <!-- Theme options -->\n <mat-option *ngFor=\"let theme of filteredThemes\" [value]=\"theme.name\">\n {{theme.name}}\n </mat-option>\n\n <!-- No results message -->\n <mat-option *ngIf=\"filteredThemes.length === 0 && themeSearchText\" disabled>\n No themes found matching \"{{themeSearchText}}\"\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- For Domain: Manual input -->\n <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n <input type=\"text\" formControlName=\"manualThemeInput\" placeholder=\"Enter Theme manually\"\n class=\"manual-input\" />\n </div>\n </div>\n\n <!-- Step 3: Sub-theme Selection -->\n <div class=\"competency-step\" *ngIf=\"selectedTheme || (selectedCompetencyType === 'Domain')\">\n <label class=\"step-label\">3. Select/Enter Sub-theme</label>\n\n <!-- For Behavioral and Functional: Searchable Dropdown based on selected theme -->\n <div class=\"competency-dropdown-container\"\n *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencySubTheme\"\n placeholder=\"Search and select sub-theme\"\n (selectionChange)=\"onSubThemeChange($event.value)\">\n <!-- Search input inside dropdown -->\n <mat-option class=\"search-option\" disabled>\n <mat-form-field appearance=\"outline\" class=\"search-field\">\n <input matInput placeholder=\"Search sub-themes...\"\n formControlName=\"subThemeSearch\"\n (input)=\"filterSubThemes($event.target.value)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n </mat-form-field>\n </mat-option>\n\n <!-- Sub-theme options -->\n <mat-option *ngFor=\"let subTheme of filteredSubThemes\" [value]=\"subTheme\">\n {{subTheme}}\n </mat-option>\n\n <!-- No results message -->\n <mat-option *ngIf=\"filteredSubThemes.length === 0 && subThemeSearchText\" disabled>\n No sub-themes found matching \"{{subThemeSearchText}}\"\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- For Domain: Manual input -->\n <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n <input type=\"text\" formControlName=\"manualSubThemeInput\"\n placeholder=\"Enter Sub-theme manually\" class=\"manual-input\" />\n </div>\n </div>\n\n <!-- Add Button -->\n <div class=\"add-button-section\" *ngIf=\"selectedCompetencyType \">\n <button type=\"button\" *ngIf=\"!editDomainCompetencyFlag\" class=\"add-competency-btn\"\n [disabled]=\"!canAddCompetency()\"\n [ngClass]=\"canAddCompetency() ? 'btn-active' : 'btn-disable'\" (click)=\"addCompetency()\">\n Add Competency\n </button>\n <button type=\"button\" *ngIf=\"editDomainCompetencyFlag\" class=\"add-competency-btn btn-active\"\n (click)=\"updateCompetency()\">\n Update Competency\n </button>\n <button type=\"button\" *ngIf=\"editDomainCompetencyFlag\" class=\"add-competency-btn btn-active\"\n style=\"margin-left: 5px;\" (click)=\"cancelUpdate()\">\n Cancel </button>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Behavioral')?.length\">\n Behavioral Competencies\n </div>\n\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item behavioural-pill\"\n *ngFor=\"let comp of getCompetenciesByType('Behavioral')\">\n <span class=\"competency-text-behavioral\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Functional')?.length\">\n Functional Competencies</div>\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item functional-pill\"\n *ngFor=\"let comp of getCompetenciesByType('Functional')\">\n <span class=\"competency-text-functional\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\">Domain Competencies</div>\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item domain-pill\" *ngFor=\"let comp of getCompetenciesByType('Domain')\">\n <span class=\"competency-text-domain\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer edit\" (click)=\"editCompetency(comp)\">\n <mat-icon>edit</mat-icon>\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"popup-footer\">\n <div>\n <input class=\"btn-active\" type=\"button\" value=\"Cancel\" (click)=\"cancelForm()\" />\n </div>\n <div>\n <input class=\"btn-active\" type=\"button\" value=\"Save\" (click)=\"saveRoleMapping()\" />\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: ["@charset \"UTF-8\";.container{margin:10px auto}.sub-heading p{color:#000;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.radio-label{color:#000;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.radio-btn-group{display:flex;width:32px;height:32px;padding:2px;gap:10px}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:150%}::ng-deep .legacy-form-field{background-color:#fff!important;border-radius:25px!important;padding-left:12px;padding-right:12px;height:42px;width:100%}::ng-deep mat-select{border-radius:25px!important;background-color:#fff!important}::ng-deep .mat-select-panel{background-color:#fff!important}::ng-deep .mat-select-panel .mat-option{border-radius:0!important}::ng-deep mat-form-field .mat-form-field-underline{display:none!important}::ng-deep mat-select .mat-select-placeholder{color:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}::ng-deep mat-select .mat-select-value-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;line-height:normal!important;padding-top:0!important;padding-bottom:0!important}::ng-deep mat-select .mat-select-value{display:flex!important;align-items:center!important;height:100%!important}.additional-details textarea{display:flex;padding:16px 16px 0;flex-direction:column;align-items:flex-start;gap:10px;flex:1 0 0;align-self:stretch;width:100%;color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;resize:none}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.btn-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.4;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:5px}.search-filter-section{display:flex;flex-direction:row;gap:10px}.legacy-search-filter{display:none}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:10px;font-size:20px;left:10px}.search .sinput{border-radius:4px;border:1px solid #d5d0d0;padding:15px 36px;font:400 14px Lato}.select-map-route-container{display:flex;flex-direction:row}.selected-mapping-route p{color:#1b4ca1;font-family:Lato;font-size:20px;font-style:normal;font-weight:400;line-height:normal;text-decoration-line:underline;text-decoration-style:solid;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font}.edit-plan{display:flex;padding:4px;justify-content:center;align-items:center;gap:8px;border-radius:4px;background:#1b4ca129;color:#1b4ca1;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;margin-left:10px}.search-container{display:flex;flex-direction:row}.course-container{display:flex;width:100%;padding:16px;flex-direction:column;align-items:flex-start;gap:24px;grid-row:2/span 1;grid-column:1/span 1;border-radius:12px;border:1px solid var(--borders-black-border-16-black, rgba(0, 0, 0, .16));background:#fff}.course-header{display:flex;flex-direction:row;justify-content:space-between;width:100%}.course-pill{display:flex;height:24px;padding:8px;align-items:center;gap:4px;border-radius:16px;border:1px solid var(--borders-border-fill-focussed-4-light-100, #EF951E);background:#fefaf4}.ai-recommened-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #1B4CA1;background:#1b4ca129}.igot-platform-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #EF951E;background:#ef951e29}.course-title{color:var(--Primary-KB-Primary-Light, #1B4CA1);font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:30px}.course-desc{color:#0009;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.relevancy,.competencies-matched{color:var(--accessbility-shades-with-opacity-kb-greys-black-60, rgba(0, 0, 0, .6));font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;align-items:center}.percentage{color:#1d8923;font-family:Lato;font-size:14px;font-style:normal;font-weight:800;line-height:normal}.relevancy-container,.competencies-matched-container{display:flex;flex-direction:row;align-items:center}.dash{padding:0 5px}::ng-deep .mat-radio-checked .mat-radio-inner-circle{background:#1b4ca1!important}.course-list-container{display:flex;flex-wrap:wrap;gap:16px}.course-list-item{flex:0 0 48%;box-sizing:border-box;border:1px solid #ccc;padding:16px;background-color:#fff;border-radius:8px}.checked-course-container{display:flex}.ml-2{margin-left:8px}::ng-deep .mat-checkbox-checked .mat-checkbox-background{background:#1b4ca1!important}.ai-recommened-pill-text,.igot-platform-pill-text{color:#1b4ca1;font-family:Lato;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.course-pill-text{color:var(--accessbility-shades-without-opacity-kb-greys-black-87, #212121);text-align:center;font-family:Poppins;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.ai-loader-icon img,.igot-platform-icon img{width:15.714px;height:15.714px;flex-shrink:0}.competency-container{display:flex;justify-content:space-between;flex-direction:row}.outside-layer-total{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #1B4CA1;border-right:2px solid #1B4CA1;background:#edf1f8;margin:0 10px}.outside-layer-functional{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #E24577;border-right:2px solid #E24577;background:#f8d2de;margin:0 10px}.outside-layer-domain{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #7B47A4;border-right:2px solid #7B47A4;background:#dfd3e9;margin:0 10px}.outside-layer-behavioral{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #F8B861;border-right:2px solid #F8B861;background:#fde8cc;margin:0 10px}.inside-layer{color:#1b4ca1;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.count{color:#1b4ca1;font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal}.suggest-courses-header{display:flex;flex-direction:row;justify-content:space-between}.suggest-course-control{display:flex;flex-direction:row}.course-card-container{width:172px;border-radius:3.307px;border:.827px solid var(--borders-border-8-black, rgba(0, 0, 0, .08));background-color:#fff}.highlight-ai{font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal;background:linear-gradient(90deg,#3b27ff,#2de3d6);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;display:inline-block}.ai-loader-icon-medium img{width:40px;height:40px;flex-shrink:0}.heading{color:#000;font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:normal;margin:10px 0}.progress-popup{display:flex;flex-direction:column;justify-content:center;align-items:center}.progress-popup .desc{color:#000000de;text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.behavioural-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #F8B861;background:linear-gradient(0deg,#f8b86152 0% 100%),#fff;margin:5px 0}.functional-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #E24577;background:linear-gradient(0deg,#e245773d 0% 100%),#fff;margin:5px 0}.domain-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #7B47A4;background:linear-gradient(0deg,#7b47a43d 0% 100%),#fff;margin:5px 0}.popup-header{display:flex;flex-direction:row;justify-content:space-between}.popup-footer{display:flex;flex-direction:row;justify-content:end}.view-cbp-plan{margin:10px;padding:10px}.view-cbp-plan-popup{padding:24px;max-height:70vh;overflow-y:auto}.section{border-radius:8px;background:#1b4ca114;padding:16px}.popup-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;font-weight:700;flex-shrink:0}.popup-footer{display:flex;justify-content:flex-end;gap:16px;padding:16px 24px;border-top:1px solid #ddd;background-color:#fff;flex-shrink:0;position:sticky;bottom:0}.section-container{overflow-y:auto;flex:1 1 auto}.competency-list{display:flex;flex-direction:row;gap:6px}.competency-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;padding:5px}.competency-text-behavioral{color:#654321;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-functional{color:#b01669;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-domain{color:#301934;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-sub-heading{color:#1b4ca1;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.cursor-pointer{cursor:pointer}.btn-active{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.custom-textarea{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.overlay-loader{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#ffffffbf;z-index:9999;display:flex;justify-content:center;align-items:center}.close .mat-icon{height:18px!important;width:18px!important}.edit .mat-icon{height:24px!important;width:24px!important;overflow:visible;vertical-align:middle}:host ::ng-deep .mat-select-arrow-wrapper{height:6px!important}::ng-deep .filter-section .mat-form-field-appearance-fill .mat-form-field-flex{padding:.5em .75em 0!important}.competency-grid{display:flex;flex-wrap:wrap;gap:12px}.competency-item{flex:0 0 calc(33.333% - 12px);box-sizing:border-box;background-color:#f5f5f5;padding:4px 10px;border-radius:6px;display:flex;justify-content:space-between;align-items:center}.snackbar-success{background-color:#4caf50!important;color:#fff!important;font-weight:500;font-size:14px;border-radius:4px}.enhanced-competency-section{display:flex;flex-direction:column;gap:24px;padding:24px;background:linear-gradient(135deg,#1b4ca105,#1b4ca10f);border-radius:12px;border:1px solid rgba(27,76,161,.15);box-shadow:0 2px 8px #1b4ca114}.competency-step{display:flex;flex-direction:column;gap:12px}.step-label{color:#1b4ca1;font-family:Lato;font-size:15px;font-weight:600;margin-bottom:8px;display:flex;align-items:center}.step-label:before{content:\"\";width:4px;height:16px;background:#1b4ca1;border-radius:2px;margin-right:8px}.competency-dropdown-container,.manual-input-container{width:100%;position:relative}.competency-dropdown{width:100%}.competency-dropdown ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.competency-dropdown ::ng-deep .mat-form-field-flex{padding:0 16px 0 20px;height:48px;align-items:center;transition:all .3s ease;display:flex;justify-content:space-between}.competency-dropdown ::ng-deep .mat-form-field-flex:hover{border-color:#1b4ca1}.competency-dropdown ::ng-deep .mat-form-field-outline,.competency-dropdown ::ng-deep .mat-form-field-outline-start,.competency-dropdown ::ng-deep .mat-form-field-outline-gap,.competency-dropdown ::ng-deep .mat-form-field-outline-end{display:none}.competency-dropdown ::ng-deep .mat-form-field-infix{padding:0;border:none;height:48px;display:flex;align-items:center;flex:1;width:auto}.competency-dropdown ::ng-deep .mat-select{height:100%;display:flex;align-items:center;font-family:Lato;font-size:14px;color:#333;width:100%;flex:1}.competency-dropdown ::ng-deep .mat-select-value{display:flex;align-items:center;height:100%;color:#333;font-weight:400;flex:1;width:100%;justify-content:flex-start}.competency-dropdown ::ng-deep .mat-select-placeholder{color:#00000080;width:100%;display:flex;align-items:center}.competency-dropdown ::ng-deep .mat-select-value-text{width:100%;display:flex;align-items:center;font-weight:400}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper{height:20px;display:flex;align-items:center;margin-left:8px;flex-shrink:0}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper .mat-select-arrow{color:#1b4ca1;border-top-color:#1b4ca1;margin:0}.competency-dropdown ::ng-deep .mat-form-field-label{display:none}.competency-dropdown ::ng-deep .mat-focused .mat-form-field-flex{border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.competency-dropdown ::ng-deep .mat-select-min-line{line-height:normal}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{padding:0}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0;padding:0}.search-option{pointer-events:auto!important;opacity:1!important}.search-option ::ng-deep .mat-option-text{width:100%;padding:0}.search-field{width:100%;margin:0}.search-field ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.search-field ::ng-deep .mat-form-field-flex{height:36px;padding:0 12px;align-items:center}.search-field ::ng-deep .mat-form-field-infix{padding:0;border:none;height:36px;display:flex;align-items:center}.search-field ::ng-deep .mat-form-field-underline,.search-field ::ng-deep .mat-form-field-outline{display:none}.search-field ::ng-deep input{font-family:Lato;font-size:13px;color:#495057}.search-field ::ng-deep input::placeholder{color:#6c757d}::ng-deep .mat-select-panel{background:#fff;border-radius:12px;box-shadow:0 8px 32px #0000001f;border:1px solid #e0e0e0;max-height:320px;margin-top:4px}::ng-deep .mat-select-panel .mat-option{font-family:Lato;font-size:14px;padding:14px 16px;line-height:1.4;transition:all .2s ease;border-bottom:1px solid rgba(0,0,0,.05)}::ng-deep .mat-select-panel .mat-option:last-child{border-bottom:none}::ng-deep .mat-select-panel .mat-option:hover{background-color:#1b4ca10f;color:#1b4ca1}::ng-deep .mat-select-panel .mat-option.mat-selected{background-color:#1b4ca11a;color:#1b4ca1;font-weight:500;position:relative}::ng-deep .mat-select-panel .mat-option.mat-selected:after{content:\"\\2713\";position:absolute;right:16px;color:#1b4ca1;font-weight:700}::ng-deep .mat-select-panel .mat-option.search-option{padding:12px;background-color:#f8f9fa;border-bottom:2px solid #e9ecef;position:sticky;top:0;z-index:10}::ng-deep .mat-select-panel .mat-option.search-option:hover{background-color:#f8f9fa}.enhanced-competency-section ::ng-deep mat-select{border-radius:0!important;background-color:transparent!important}.enhanced-competency-section ::ng-deep mat-form-field .mat-form-field-underline{display:none!important}.enhanced-competency-section ::ng-deep .mat-select-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:auto}.enhanced-competency-section ::ng-deep .mat-form-field-suffix{margin:0;padding:0;display:flex;align-items:center}.manual-input{border-radius:25px;border:2px solid #e0e0e0;padding:12px 16px;width:100%;font-size:14px;font-family:Lato;background:#fff;height:48px;box-sizing:border-box;transition:all .3s ease;box-shadow:0 2px 4px #0000000d}.manual-input::placeholder{color:#00000080;font-family:Lato;font-size:14px}.manual-input:focus{outline:none;border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.manual-input:hover{border-color:#1b4ca1;box-shadow:0 4px 8px #1b4ca11a}.add-button-section{display:flex;justify-content:flex-start;margin-top:20px;padding-top:20px;border-top:2px solid rgba(27,76,161,.1)}.add-competency-btn{border-radius:25px;padding:12px 24px;font-family:Lato;font-size:14px;font-weight:600;border:none;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 8px #0000001a;min-width:140px}.add-competency-btn.btn-active{background:linear-gradient(135deg,#1b4ca1,#164080);color:#fff}.add-competency-btn.btn-active:hover{background:linear-gradient(135deg,#164080,#0f2f5f);box-shadow:0 4px 16px #1b4ca14d;transform:translateY(-1px)}.add-competency-btn.btn-active:active{transform:translateY(0);box-shadow:0 2px 8px #1b4ca133}.add-competency-btn.btn-disable{background:#e9ecef;color:#6c757d;cursor:not-allowed;opacity:.7;box-shadow:none;border:1px solid #ccc}:host ::ng-deep .mat-select-panel.search-panel{max-height:300px!important;overflow-y:auto!important;box-sizing:border-box}::ng-deep .search-panel .sticky-search-container{position:sticky;top:0;z-index:100;background:#fff;padding:8px;border-bottom:1px solid #eee}:host ::ng-deep .search-panel .search-input-wrapper{display:flex;gap:8px;align-items:center}:host ::ng-deep .search-panel .search-input{width:100%;height:32px;padding:6px 10px}:host ::ng-deep .search-panel .mat-option{padding:8px 16px!important}:host ::ng-deep .search-panel .mat-pseudo-checkbox{margin-right:8px}:host ::ng-deep .search-panel .no-data-option{padding:10px 16px;font-size:14px;color:#f44336}::ng-deep .search-panel .no-data-option .mat-pseudo-checkbox{display:none!important}.search-input-wrapper{position:relative;width:100%;display:flex;align-items:center}.search-input{width:100%;padding-right:40px;height:40px;line-height:40px;box-sizing:border-box}.clear-icon{position:absolute;right:10px;cursor:pointer;font-size:20px;color:#666;display:flex;align-items:center;height:100%}.clear-icon:hover{color:#000}:host ::ng-deep .search-panel .mat-option:first-child{margin-top:0}:host ::ng-deep .mat-notched-outline{border-radius:25px!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{border-radius:25px!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start,:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-width:1px!important;min-width:0!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:transparent!important}:host ::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:transparent!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{border-radius:25px;height:30px;align-items:center;padding:0 16px;background:#fff}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i7.MatLegacyFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLegacyInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", exportAs: ["matInput"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatLegacySelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i11.MatLegacyOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i11$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
2400
2421
  }
2401
2422
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditCbpPlanComponent, decorators: [{
2402
2423
  type: Component,
2403
- args: [{ selector: 'app-edit-cbp-plan', template: "<div class=\"view-cbp-plan\" #dialogContent>\n <div class=\"popup-container\">\n <div class=\"popup-header\">\n <div>\n <div class=\"heading\">Edit Role Mapping</div>\n </div>\n <div class=\"cursor-pointer\" (click)=\"closeDialog()\">\n <mat-icon>close</mat-icon>\n </div>\n </div>\n <div class=\"section-container\" [formGroup]=\"cbpForm\">\n\n <!-- <div class=\"section-header mt-4\">\n <input type=\"text\" formControlName=\"designation_name\" [value]=\"planData?.designation_name\"\n style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n\n\n </div> -->\n\n <mat-form-field appearance=\"outline\" class=\"mt-4 margin-top-s w-full required-select\" style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n <mat-select #designation formControlName=\"designation_name\"\n placeholder=\"Select designation\" (closed)=\"onDesignationDropdownClosed()\"\n panelClass=\"search-panel\" (openedChange)=\"setupScrollListener($event)\"\n >\n\n <!-- Sticky search input container -->\n <div class=\"sticky-search-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"search-input-wrapper\">\n <input type=\"text\" placeholder=\"Search designation\" style=\"width:100%\"\n formControlName=\"searchDesignation\" class=\"search-input\"\n (keydown)=\"$event.stopPropagation()\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation()\"\n autocomplete=\"off\">\n <!-- (keyup)=\"designationSearch($event)\" -->\n <div *ngIf=\"searchDesignationControl?.value\" type=\"button\" class=\"clear-icon\"\n (click)=\"clearDesignationSearch($event)\">\n <mat-icon>close</mat-icon>\n </div>\n </div>\n </div>\n <!-- Options list -->\n <mat-option [value]=\"designation?.name\" *ngFor=\"let designation of masterData?.designation\">\n {{designation?.name}}\n </mat-option>\n <!-- Loading indicator -->\n <div *ngIf=\"isLoadingMoreDesignations\" class=\"loading-indicator\">\n Load More...\n </div>\n <!-- No results message -->\n <mat-option *ngIf=\"(masterData?.designation)?.length === 0 || noMoreLegacyDesignations\" disabled class=\"no-data-option\">\n\n Designation Not Found.\n\n </mat-option>\n \n </mat-select>\n <!-- <mat-error class=\"text-xs\"\n *ngIf=\"designationForm?.get('designation_name')?.touched && designationForm?.get('designation_name')?.invalid\">\n Please select at least one designation.\n </mat-error> -->\n </mat-form-field>\n\n <div class=\"competency-container mt-4\">\n <div class=\"outside-layer-total\">\n <div class=\"inside-layer\">\n Total Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.total}}\n </div>\n </div>\n <div class=\"outside-layer-behavioral\">\n <div class=\"inside-layer\">\n Behavioral Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.behavioral}}\n </div>\n </div>\n <div class=\"outside-layer-functional\">\n <div class=\"inside-layer\">\n Functional Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.functional}}\n </div>\n </div>\n <div class=\"outside-layer-domain\">\n <div class=\"inside-layer\">\n Domain Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.domain}}\n </div>\n </div>\n </div>\n <div class=\"mt-4 section\">\n <div class=\"sub-heading\">\n <p>Wing/Division</p>\n </div>\n <div class=\"mt-4\">\n <input type=\"text\" formControlName=\"wing_division_section\" [value]=\"planData?.wing_division_section\"\n style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width:100%;font-size: 14px;font-family: 'Lato';\">\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Roles & Responsibilities</p>\n </div>\n <div class=\"mt-4 additional-details\">\n <textarea class=\"custom-textarea\" formControlName=\"role_responsibilities_text\" rows=\"5\"\n placeholder=\"Roles & Responsibilities\"\n [value]=\"planData?.role_responsibilities?.join('\\n')\"></textarea>\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Activities</p>\n </div>\n <div class=\"mt-4 additional-details\">\n <textarea class=\"custom-textarea\" formControlName=\"activities_text\" rows=\"5\"\n placeholder=\"Activities\" [value]=\"planData?.activities?.join('\\n')\"></textarea>\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Competency</p>\n </div>\n <div #editSection class=\"enhanced-competency-section mt-2\">\n <!-- Step 1: Select Competency Type -->\n <div class=\"competency-step\">\n <label class=\"step-label\">1. Select Core Competency Type</label>\n <div class=\"competency-dropdown-container\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencyType\" placeholder=\"Select Competency Type\"\n (selectionChange)=\"onCompetencyTypeChange($event.value)\">\n <mat-option value=\"Behavioral\">Behavioral</mat-option>\n <mat-option value=\"Functional\">Functional</mat-option>\n <mat-option value=\"Domain\">Domain</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n <!-- Step 2: Theme Selection (Behavioral/Functional from JSON, Domain manual) -->\n <div class=\"competency-step\" *ngIf=\"selectedCompetencyType\">\n <label class=\"step-label\">2. Select/Enter Theme</label>\n\n <!-- For Behavioral and Functional: Searchable Dropdown from JSON -->\n <div class=\"competency-dropdown-container\"\n *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencyTheme\" placeholder=\"Search and select theme\"\n (selectionChange)=\"onThemeChange($event.value)\">\n <!-- Search input inside dropdown -->\n <mat-option class=\"search-option\" disabled>\n <mat-form-field appearance=\"outline\" class=\"search-field\">\n <input matInput placeholder=\"Search themes...\" formControlName=\"themeSearch\"\n (input)=\"filterThemes($event.target?.value)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n </mat-form-field>\n </mat-option>\n\n <!-- Theme options -->\n <mat-option *ngFor=\"let theme of filteredThemes\" [value]=\"theme.name\">\n {{theme.name}}\n </mat-option>\n\n <!-- No results message -->\n <mat-option *ngIf=\"filteredThemes.length === 0 && themeSearchText\" disabled>\n No themes found matching \"{{themeSearchText}}\"\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- For Domain: Manual input -->\n <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n <input type=\"text\" formControlName=\"manualThemeInput\" placeholder=\"Enter Theme manually\"\n class=\"manual-input\" />\n </div>\n </div>\n\n <!-- Step 3: Sub-theme Selection -->\n <div class=\"competency-step\" *ngIf=\"selectedTheme || (selectedCompetencyType === 'Domain')\">\n <label class=\"step-label\">3. Select/Enter Sub-theme</label>\n\n <!-- For Behavioral and Functional: Searchable Dropdown based on selected theme -->\n <div class=\"competency-dropdown-container\"\n *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencySubTheme\"\n placeholder=\"Search and select sub-theme\"\n (selectionChange)=\"onSubThemeChange($event.value)\">\n <!-- Search input inside dropdown -->\n <mat-option class=\"search-option\" disabled>\n <mat-form-field appearance=\"outline\" class=\"search-field\">\n <input matInput placeholder=\"Search sub-themes...\"\n formControlName=\"subThemeSearch\"\n (input)=\"filterSubThemes($event.target.value)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n </mat-form-field>\n </mat-option>\n\n <!-- Sub-theme options -->\n <mat-option *ngFor=\"let subTheme of filteredSubThemes\" [value]=\"subTheme\">\n {{subTheme}}\n </mat-option>\n\n <!-- No results message -->\n <mat-option *ngIf=\"filteredSubThemes.length === 0 && subThemeSearchText\" disabled>\n No sub-themes found matching \"{{subThemeSearchText}}\"\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- For Domain: Manual input -->\n <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n <input type=\"text\" formControlName=\"manualSubThemeInput\"\n placeholder=\"Enter Sub-theme manually\" class=\"manual-input\" />\n </div>\n </div>\n\n <!-- Add Button -->\n <div class=\"add-button-section\" *ngIf=\"selectedCompetencyType \">\n <button type=\"button\" *ngIf=\"!editDomainCompetencyFlag\" class=\"add-competency-btn\"\n [disabled]=\"!canAddCompetency()\"\n [ngClass]=\"canAddCompetency() ? 'btn-active' : 'btn-disable'\" (click)=\"addCompetency()\">\n Add Competency\n </button>\n <button type=\"button\" *ngIf=\"editDomainCompetencyFlag\" class=\"add-competency-btn btn-active\"\n (click)=\"updateCompetency()\">\n Update Competency\n </button>\n <button type=\"button\" *ngIf=\"editDomainCompetencyFlag\" class=\"add-competency-btn btn-active\"\n style=\"margin-left: 5px;\" (click)=\"cancelUpdate()\">\n Cancel </button>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Behavioral')?.length\">\n Behavioral Competencies\n </div>\n\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item behavioural-pill\"\n *ngFor=\"let comp of getCompetenciesByType('Behavioral')\">\n <span class=\"competency-text-behavioral\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Functional')?.length\">\n Functional Competencies</div>\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item functional-pill\"\n *ngFor=\"let comp of getCompetenciesByType('Functional')\">\n <span class=\"competency-text-functional\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\">Domain Competencies</div>\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item domain-pill\" *ngFor=\"let comp of getCompetenciesByType('Domain')\">\n <span class=\"competency-text-domain\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer edit\" (click)=\"editCompetency(comp)\">\n <mat-icon>edit</mat-icon>\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"popup-footer\">\n <div>\n <input class=\"btn-active\" type=\"button\" value=\"Cancel\" (click)=\"cancelForm()\" />\n </div>\n <div>\n <input class=\"btn-active\" type=\"button\" value=\"Save\" (click)=\"saveRoleMapping()\" />\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: ["@charset \"UTF-8\";.container{margin:10px auto}.sub-heading p{color:#000;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.radio-label{color:#000;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.radio-btn-group{display:flex;width:32px;height:32px;padding:2px;gap:10px}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:150%}::ng-deep .legacy-form-field{background-color:#fff!important;border-radius:25px!important;padding-left:12px;padding-right:12px;height:42px;width:100%}::ng-deep mat-select{border-radius:25px!important;background-color:#fff!important}::ng-deep .mat-select-panel{background-color:#fff!important}::ng-deep .mat-select-panel .mat-option{border-radius:0!important}::ng-deep mat-form-field .mat-form-field-underline{display:none!important}::ng-deep mat-select .mat-select-placeholder{color:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}::ng-deep mat-select .mat-select-value-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;line-height:normal!important;padding-top:0!important;padding-bottom:0!important}::ng-deep mat-select .mat-select-value{display:flex!important;align-items:center!important;height:100%!important}.additional-details textarea{display:flex;padding:16px 16px 0;flex-direction:column;align-items:flex-start;gap:10px;flex:1 0 0;align-self:stretch;width:100%;color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;resize:none}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.btn-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.4;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:5px}.search-filter-section{display:flex;flex-direction:row;gap:10px}.legacy-search-filter{display:none}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:10px;font-size:20px;left:10px}.search .sinput{border-radius:4px;border:1px solid #d5d0d0;padding:15px 36px;font:400 14px Lato}.select-map-route-container{display:flex;flex-direction:row}.selected-mapping-route p{color:#1b4ca1;font-family:Lato;font-size:20px;font-style:normal;font-weight:400;line-height:normal;text-decoration-line:underline;text-decoration-style:solid;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font}.edit-plan{display:flex;padding:4px;justify-content:center;align-items:center;gap:8px;border-radius:4px;background:#1b4ca129;color:#1b4ca1;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;margin-left:10px}.search-container{display:flex;flex-direction:row}.course-container{display:flex;width:100%;padding:16px;flex-direction:column;align-items:flex-start;gap:24px;grid-row:2/span 1;grid-column:1/span 1;border-radius:12px;border:1px solid var(--borders-black-border-16-black, rgba(0, 0, 0, .16));background:#fff}.course-header{display:flex;flex-direction:row;justify-content:space-between;width:100%}.course-pill{display:flex;height:24px;padding:8px;align-items:center;gap:4px;border-radius:16px;border:1px solid var(--borders-border-fill-focussed-4-light-100, #EF951E);background:#fefaf4}.ai-recommened-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #1B4CA1;background:#1b4ca129}.igot-platform-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #EF951E;background:#ef951e29}.course-title{color:var(--Primary-KB-Primary-Light, #1B4CA1);font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:30px}.course-desc{color:#0009;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.relevancy,.competencies-matched{color:var(--accessbility-shades-with-opacity-kb-greys-black-60, rgba(0, 0, 0, .6));font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;align-items:center}.percentage{color:#1d8923;font-family:Lato;font-size:14px;font-style:normal;font-weight:800;line-height:normal}.relevancy-container,.competencies-matched-container{display:flex;flex-direction:row;align-items:center}.dash{padding:0 5px}::ng-deep .mat-radio-checked .mat-radio-inner-circle{background:#1b4ca1!important}.course-list-container{display:flex;flex-wrap:wrap;gap:16px}.course-list-item{flex:0 0 48%;box-sizing:border-box;border:1px solid #ccc;padding:16px;background-color:#fff;border-radius:8px}.checked-course-container{display:flex}.ml-2{margin-left:8px}::ng-deep .mat-checkbox-checked .mat-checkbox-background{background:#1b4ca1!important}.ai-recommened-pill-text,.igot-platform-pill-text{color:#1b4ca1;font-family:Lato;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.course-pill-text{color:var(--accessbility-shades-without-opacity-kb-greys-black-87, #212121);text-align:center;font-family:Poppins;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.ai-loader-icon img,.igot-platform-icon img{width:15.714px;height:15.714px;flex-shrink:0}.competency-container{display:flex;justify-content:space-between;flex-direction:row}.outside-layer-total{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #1B4CA1;border-right:2px solid #1B4CA1;background:#edf1f8;margin:0 10px}.outside-layer-functional{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #E24577;border-right:2px solid #E24577;background:#f8d2de;margin:0 10px}.outside-layer-domain{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #7B47A4;border-right:2px solid #7B47A4;background:#dfd3e9;margin:0 10px}.outside-layer-behavioral{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #F8B861;border-right:2px solid #F8B861;background:#fde8cc;margin:0 10px}.inside-layer{color:#1b4ca1;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.count{color:#1b4ca1;font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal}.suggest-courses-header{display:flex;flex-direction:row;justify-content:space-between}.suggest-course-control{display:flex;flex-direction:row}.course-card-container{width:172px;border-radius:3.307px;border:.827px solid var(--borders-border-8-black, rgba(0, 0, 0, .08));background-color:#fff}.highlight-ai{font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal;background:linear-gradient(90deg,#3b27ff,#2de3d6);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;display:inline-block}.ai-loader-icon-medium img{width:40px;height:40px;flex-shrink:0}.heading{color:#000;font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:normal;margin:10px 0}.progress-popup{display:flex;flex-direction:column;justify-content:center;align-items:center}.progress-popup .desc{color:#000000de;text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.behavioural-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #F8B861;background:linear-gradient(0deg,#f8b86152 0% 100%),#fff;margin:5px 0}.functional-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #E24577;background:linear-gradient(0deg,#e245773d 0% 100%),#fff;margin:5px 0}.domain-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #7B47A4;background:linear-gradient(0deg,#7b47a43d 0% 100%),#fff;margin:5px 0}.popup-header{display:flex;flex-direction:row;justify-content:space-between}.popup-footer{display:flex;flex-direction:row;justify-content:end}.view-cbp-plan{margin:10px;padding:10px}.view-cbp-plan-popup{padding:24px;max-height:70vh;overflow-y:auto}.section{border-radius:8px;background:#1b4ca114;padding:16px}.popup-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;font-weight:700;flex-shrink:0}.popup-footer{display:flex;justify-content:flex-end;gap:16px;padding:16px 24px;border-top:1px solid #ddd;background-color:#fff;flex-shrink:0;position:sticky;bottom:0}.section-container{overflow-y:auto;flex:1 1 auto}.competency-list{display:flex;flex-direction:row;gap:6px}.competency-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;padding:5px}.competency-text-behavioral{color:#654321;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-functional{color:#b01669;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-domain{color:#301934;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-sub-heading{color:#1b4ca1;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.cursor-pointer{cursor:pointer}.btn-active{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.custom-textarea{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.overlay-loader{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#ffffffbf;z-index:9999;display:flex;justify-content:center;align-items:center}.close .mat-icon{height:18px!important;width:18px!important}.edit .mat-icon{height:24px!important;width:24px!important;overflow:visible;vertical-align:middle}:host ::ng-deep .mat-select-arrow-wrapper{height:6px!important}::ng-deep .filter-section .mat-form-field-appearance-fill .mat-form-field-flex{padding:.5em .75em 0!important}.competency-grid{display:flex;flex-wrap:wrap;gap:12px}.competency-item{flex:0 0 calc(33.333% - 12px);box-sizing:border-box;background-color:#f5f5f5;padding:4px 10px;border-radius:6px;display:flex;justify-content:space-between;align-items:center}.snackbar-success{background-color:#4caf50!important;color:#fff!important;font-weight:500;font-size:14px;border-radius:4px}.enhanced-competency-section{display:flex;flex-direction:column;gap:24px;padding:24px;background:linear-gradient(135deg,#1b4ca105,#1b4ca10f);border-radius:12px;border:1px solid rgba(27,76,161,.15);box-shadow:0 2px 8px #1b4ca114}.competency-step{display:flex;flex-direction:column;gap:12px}.step-label{color:#1b4ca1;font-family:Lato;font-size:15px;font-weight:600;margin-bottom:8px;display:flex;align-items:center}.step-label:before{content:\"\";width:4px;height:16px;background:#1b4ca1;border-radius:2px;margin-right:8px}.competency-dropdown-container,.manual-input-container{width:100%;position:relative}.competency-dropdown{width:100%}.competency-dropdown ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.competency-dropdown ::ng-deep .mat-form-field-flex{padding:0 16px 0 20px;height:48px;align-items:center;transition:all .3s ease;display:flex;justify-content:space-between}.competency-dropdown ::ng-deep .mat-form-field-flex:hover{border-color:#1b4ca1}.competency-dropdown ::ng-deep .mat-form-field-outline,.competency-dropdown ::ng-deep .mat-form-field-outline-start,.competency-dropdown ::ng-deep .mat-form-field-outline-gap,.competency-dropdown ::ng-deep .mat-form-field-outline-end{display:none}.competency-dropdown ::ng-deep .mat-form-field-infix{padding:0;border:none;height:48px;display:flex;align-items:center;flex:1;width:auto}.competency-dropdown ::ng-deep .mat-select{height:100%;display:flex;align-items:center;font-family:Lato;font-size:14px;color:#333;width:100%;flex:1}.competency-dropdown ::ng-deep .mat-select-value{display:flex;align-items:center;height:100%;color:#333;font-weight:400;flex:1;width:100%;justify-content:flex-start}.competency-dropdown ::ng-deep .mat-select-placeholder{color:#00000080;width:100%;display:flex;align-items:center}.competency-dropdown ::ng-deep .mat-select-value-text{width:100%;display:flex;align-items:center;font-weight:400}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper{height:20px;display:flex;align-items:center;margin-left:8px;flex-shrink:0}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper .mat-select-arrow{color:#1b4ca1;border-top-color:#1b4ca1;margin:0}.competency-dropdown ::ng-deep .mat-form-field-label{display:none}.competency-dropdown ::ng-deep .mat-focused .mat-form-field-flex{border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.competency-dropdown ::ng-deep .mat-select-min-line{line-height:normal}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{padding:0}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0;padding:0}.search-option{pointer-events:auto!important;opacity:1!important}.search-option ::ng-deep .mat-option-text{width:100%;padding:0}.search-field{width:100%;margin:0}.search-field ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.search-field ::ng-deep .mat-form-field-flex{height:36px;padding:0 12px;align-items:center}.search-field ::ng-deep .mat-form-field-infix{padding:0;border:none;height:36px;display:flex;align-items:center}.search-field ::ng-deep .mat-form-field-underline,.search-field ::ng-deep .mat-form-field-outline{display:none}.search-field ::ng-deep input{font-family:Lato;font-size:13px;color:#495057}.search-field ::ng-deep input::placeholder{color:#6c757d}::ng-deep .mat-select-panel{background:#fff;border-radius:12px;box-shadow:0 8px 32px #0000001f;border:1px solid #e0e0e0;max-height:320px;margin-top:4px}::ng-deep .mat-select-panel .mat-option{font-family:Lato;font-size:14px;padding:14px 16px;line-height:1.4;transition:all .2s ease;border-bottom:1px solid rgba(0,0,0,.05)}::ng-deep .mat-select-panel .mat-option:last-child{border-bottom:none}::ng-deep .mat-select-panel .mat-option:hover{background-color:#1b4ca10f;color:#1b4ca1}::ng-deep .mat-select-panel .mat-option.mat-selected{background-color:#1b4ca11a;color:#1b4ca1;font-weight:500;position:relative}::ng-deep .mat-select-panel .mat-option.mat-selected:after{content:\"\\2713\";position:absolute;right:16px;color:#1b4ca1;font-weight:700}::ng-deep .mat-select-panel .mat-option.search-option{padding:12px;background-color:#f8f9fa;border-bottom:2px solid #e9ecef;position:sticky;top:0;z-index:10}::ng-deep .mat-select-panel .mat-option.search-option:hover{background-color:#f8f9fa}.enhanced-competency-section ::ng-deep mat-select{border-radius:0!important;background-color:transparent!important}.enhanced-competency-section ::ng-deep mat-form-field .mat-form-field-underline{display:none!important}.enhanced-competency-section ::ng-deep .mat-select-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:auto}.enhanced-competency-section ::ng-deep .mat-form-field-suffix{margin:0;padding:0;display:flex;align-items:center}.manual-input{border-radius:25px;border:2px solid #e0e0e0;padding:12px 16px;width:100%;font-size:14px;font-family:Lato;background:#fff;height:48px;box-sizing:border-box;transition:all .3s ease;box-shadow:0 2px 4px #0000000d}.manual-input::placeholder{color:#00000080;font-family:Lato;font-size:14px}.manual-input:focus{outline:none;border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.manual-input:hover{border-color:#1b4ca1;box-shadow:0 4px 8px #1b4ca11a}.add-button-section{display:flex;justify-content:flex-start;margin-top:20px;padding-top:20px;border-top:2px solid rgba(27,76,161,.1)}.add-competency-btn{border-radius:25px;padding:12px 24px;font-family:Lato;font-size:14px;font-weight:600;border:none;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 8px #0000001a;min-width:140px}.add-competency-btn.btn-active{background:linear-gradient(135deg,#1b4ca1,#164080);color:#fff}.add-competency-btn.btn-active:hover{background:linear-gradient(135deg,#164080,#0f2f5f);box-shadow:0 4px 16px #1b4ca14d;transform:translateY(-1px)}.add-competency-btn.btn-active:active{transform:translateY(0);box-shadow:0 2px 8px #1b4ca133}.add-competency-btn.btn-disable{background:#e9ecef;color:#6c757d;cursor:not-allowed;opacity:.7;box-shadow:none;border:1px solid #ccc}:host ::ng-deep .mat-select-panel.search-panel{max-height:300px!important;overflow-y:auto!important;box-sizing:border-box}::ng-deep .search-panel .sticky-search-container{position:sticky;top:0;z-index:100;background:#fff;padding:8px;border-bottom:1px solid #eee}:host ::ng-deep .search-panel .search-input-wrapper{display:flex;gap:8px;align-items:center}:host ::ng-deep .search-panel .search-input{width:100%;height:32px;padding:6px 10px}:host ::ng-deep .search-panel .mat-option{padding:8px 16px!important}:host ::ng-deep .search-panel .mat-pseudo-checkbox{margin-right:8px}:host ::ng-deep .search-panel .no-data-option{padding:10px 16px;font-size:14px;color:#f44336}::ng-deep .search-panel .no-data-option .mat-pseudo-checkbox{display:none!important}.search-input-wrapper{position:relative;width:100%;display:flex;align-items:center}.search-input{width:100%;padding-right:40px;height:40px;line-height:40px;box-sizing:border-box}.clear-icon{position:absolute;right:10px;cursor:pointer;font-size:20px;color:#666;display:flex;align-items:center;height:100%}.clear-icon:hover{color:#000}:host ::ng-deep .search-panel .mat-option:first-child{margin-top:0}:host ::ng-deep .mat-notched-outline{border-radius:25px!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{border-radius:25px!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start,:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-width:1px!important;min-width:0!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:transparent!important}:host ::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:transparent!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{border-radius:25px;height:30px;align-items:center;padding:0 16px;background:#fff}\n"] }]
2424
+ args: [{ selector: 'app-edit-cbp-plan', template: "<div class=\"view-cbp-plan\" #dialogContent>\n <div class=\"popup-container\">\n <div class=\"popup-header\">\n <div>\n <div class=\"heading\">\n Edit Role Mapping\n <span class=\"text-sm\">\n ({{ cbpForm?.get('designation_name')?.value || planData?.designation_name }})\n </span>\n</div>\n </div>\n <div class=\"cursor-pointer\" (click)=\"closeDialog()\">\n <mat-icon>close</mat-icon>\n </div>\n </div>\n <div class=\"section-container\" [formGroup]=\"cbpForm\">\n\n <!-- <div class=\"section-header mt-4\">\n <input type=\"text\" formControlName=\"designation_name\" [value]=\"planData?.designation_name\"\n style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n\n\n </div> -->\n\n <mat-form-field appearance=\"outline\" class=\"mt-4 margin-top-s w-full required-select\" style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width: 100%;font-size: 14px;font-family: 'Lato';\">\n <mat-select #designation formControlName=\"designation_name\"\n placeholder=\"Select designation\" (closed)=\"onDesignationDropdownClosed()\"\n panelClass=\"search-panel\" (openedChange)=\"setupScrollListener($event)\"\n >\n\n <!-- Sticky search input container -->\n <div class=\"sticky-search-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"search-input-wrapper\">\n <input type=\"text\" placeholder=\"Search designation\" style=\"width:100%\"\n formControlName=\"searchDesignation\" class=\"search-input\"\n (keydown)=\"$event.stopPropagation()\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation()\"\n autocomplete=\"off\">\n <!-- (keyup)=\"designationSearch($event)\" -->\n <div *ngIf=\"searchDesignationControl?.value\" type=\"button\" class=\"clear-icon\"\n (click)=\"clearDesignationSearch($event)\">\n <mat-icon>close</mat-icon>\n </div>\n </div>\n </div>\n <!-- Options list -->\n <!-- <ng-container *ngFor=\"let designation of masterData?.designation\">\n <mat-option\n *ngIf=\"designation?.name !== planData?.designation_name\"\n [value]=\"designation?.name\">\n {{ designation?.name }}\n </mat-option>\n</ng-container> -->\n<ng-container *ngFor=\"let designation of masterData?.designation\">\n <mat-option\n *ngIf=\"planData?.igot_designation_id || designation?.name !== planData?.designation_name\"\n [value]=\"designation?.name\">\n {{ designation?.name }}\n </mat-option>\n</ng-container>\n <!-- Loading indicator -->\n <div *ngIf=\"isLoadingMoreDesignations\" class=\"loading-indicator\">\n Load More...\n </div>\n <!-- No results message -->\n <mat-option *ngIf=\"(masterData?.designation)?.length === 0 || noMoreLegacyDesignations\" disabled class=\"no-data-option\">\n\n Designation Not Found.\n\n </mat-option>\n \n </mat-select>\n <!-- <mat-error class=\"text-xs\"\n *ngIf=\"designationForm?.get('designation_name')?.touched && designationForm?.get('designation_name')?.invalid\">\n Please select at least one designation.\n </mat-error> -->\n </mat-form-field>\n\n <div class=\"competency-container mt-4\">\n <div class=\"outside-layer-total\">\n <div class=\"inside-layer\">\n Total Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.total}}\n </div>\n </div>\n <div class=\"outside-layer-behavioral\">\n <div class=\"inside-layer\">\n Behavioral Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.behavioral}}\n </div>\n </div>\n <div class=\"outside-layer-functional\">\n <div class=\"inside-layer\">\n Functional Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.functional}}\n </div>\n </div>\n <div class=\"outside-layer-domain\">\n <div class=\"inside-layer\">\n Domain Competencies\n </div>\n <div class=\"count\">\n {{competenciesCount?.domain}}\n </div>\n </div>\n </div>\n <div class=\"mt-4 section\">\n <div class=\"sub-heading\">\n <p>Wing/Division</p>\n </div>\n <div class=\"mt-4\">\n <input type=\"text\" formControlName=\"wing_division_section\" [value]=\"planData?.wing_division_section\"\n style=\"border-radius: 25px; border: 1px solid #ccc; padding: 8px 12px; width:100%;font-size: 14px;font-family: 'Lato';\">\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Roles & Responsibilities</p>\n </div>\n <div class=\"mt-4 additional-details\">\n <textarea class=\"custom-textarea\" formControlName=\"role_responsibilities_text\" rows=\"5\"\n placeholder=\"Roles & Responsibilities\"\n [value]=\"planData?.role_responsibilities?.join('\\n')\"></textarea>\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Activities</p>\n </div>\n <div class=\"mt-4 additional-details\">\n <textarea class=\"custom-textarea\" formControlName=\"activities_text\" rows=\"5\"\n placeholder=\"Activities\" [value]=\"planData?.activities?.join('\\n')\"></textarea>\n </div>\n </div>\n <div class=\"mt-2 section\">\n <div class=\"sub-heading\">\n <p>Competency</p>\n </div>\n <div #editSection class=\"enhanced-competency-section mt-2\">\n <!-- Step 1: Select Competency Type -->\n <div class=\"competency-step\">\n <label class=\"step-label\">1. Select Core Competency Type</label>\n <div class=\"competency-dropdown-container\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencyType\" placeholder=\"Select Competency Type\"\n (selectionChange)=\"onCompetencyTypeChange($event.value)\">\n <mat-option value=\"Behavioral\">Behavioral</mat-option>\n <mat-option value=\"Functional\">Functional</mat-option>\n <mat-option value=\"Domain\">Domain</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n\n <!-- Step 2: Theme Selection (Behavioral/Functional from JSON, Domain manual) -->\n <div class=\"competency-step\" *ngIf=\"selectedCompetencyType\">\n <label class=\"step-label\">2. Select/Enter Theme</label>\n\n <!-- For Behavioral and Functional: Searchable Dropdown from JSON -->\n <div class=\"competency-dropdown-container\"\n *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencyTheme\" placeholder=\"Search and select theme\"\n (selectionChange)=\"onThemeChange($event.value)\">\n <!-- Search input inside dropdown -->\n <mat-option class=\"search-option\" disabled>\n <mat-form-field appearance=\"outline\" class=\"search-field\">\n <input matInput placeholder=\"Search themes...\" formControlName=\"themeSearch\"\n (input)=\"filterThemes($event.target?.value)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n </mat-form-field>\n </mat-option>\n\n <!-- Theme options -->\n <mat-option *ngFor=\"let theme of filteredThemes\" [value]=\"theme.name\">\n {{theme.name}}\n </mat-option>\n\n <!-- No results message -->\n <mat-option *ngIf=\"filteredThemes.length === 0 && themeSearchText\" disabled>\n No themes found matching \"{{themeSearchText}}\"\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- For Domain: Manual input -->\n <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n <input type=\"text\" formControlName=\"manualThemeInput\" placeholder=\"Enter Theme manually\"\n class=\"manual-input\" />\n </div>\n </div>\n\n <!-- Step 3: Sub-theme Selection -->\n <div class=\"competency-step\" *ngIf=\"selectedTheme || (selectedCompetencyType === 'Domain')\">\n <label class=\"step-label\">3. Select/Enter Sub-theme</label>\n\n <!-- For Behavioral and Functional: Searchable Dropdown based on selected theme -->\n <div class=\"competency-dropdown-container\"\n *ngIf=\"selectedCompetencyType === 'Behavioral' || selectedCompetencyType === 'Functional'\">\n <mat-form-field appearance=\"outline\" class=\"competency-dropdown\">\n <mat-select formControlName=\"competencySubTheme\"\n placeholder=\"Search and select sub-theme\"\n (selectionChange)=\"onSubThemeChange($event.value)\">\n <!-- Search input inside dropdown -->\n <mat-option class=\"search-option\" disabled>\n <mat-form-field appearance=\"outline\" class=\"search-field\">\n <input matInput placeholder=\"Search sub-themes...\"\n formControlName=\"subThemeSearch\"\n (input)=\"filterSubThemes($event.target.value)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n </mat-form-field>\n </mat-option>\n\n <!-- Sub-theme options -->\n <mat-option *ngFor=\"let subTheme of filteredSubThemes\" [value]=\"subTheme\">\n {{subTheme}}\n </mat-option>\n\n <!-- No results message -->\n <mat-option *ngIf=\"filteredSubThemes.length === 0 && subThemeSearchText\" disabled>\n No sub-themes found matching \"{{subThemeSearchText}}\"\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- For Domain: Manual input -->\n <div class=\"manual-input-container\" *ngIf=\"selectedCompetencyType === 'Domain'\">\n <input type=\"text\" formControlName=\"manualSubThemeInput\"\n placeholder=\"Enter Sub-theme manually\" class=\"manual-input\" />\n </div>\n </div>\n\n <!-- Add Button -->\n <div class=\"add-button-section\" *ngIf=\"selectedCompetencyType \">\n <button type=\"button\" *ngIf=\"!editDomainCompetencyFlag\" class=\"add-competency-btn\"\n [disabled]=\"!canAddCompetency()\"\n [ngClass]=\"canAddCompetency() ? 'btn-active' : 'btn-disable'\" (click)=\"addCompetency()\">\n Add Competency\n </button>\n <button type=\"button\" *ngIf=\"editDomainCompetencyFlag\" class=\"add-competency-btn btn-active\"\n (click)=\"updateCompetency()\">\n Update Competency\n </button>\n <button type=\"button\" *ngIf=\"editDomainCompetencyFlag\" class=\"add-competency-btn btn-active\"\n style=\"margin-left: 5px;\" (click)=\"cancelUpdate()\">\n Cancel </button>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Behavioral')?.length\">\n Behavioral Competencies\n </div>\n\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item behavioural-pill\"\n *ngFor=\"let comp of getCompetenciesByType('Behavioral')\">\n <span class=\"competency-text-behavioral\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\" *ngIf=\"getCompetenciesByType('Functional')?.length\">\n Functional Competencies</div>\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item functional-pill\"\n *ngFor=\"let comp of getCompetenciesByType('Functional')\">\n <span class=\"competency-text-functional\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n <div class=\"mt-4\">\n <div class=\"competency-sub-heading mt-2\">Domain Competencies</div>\n <div class=\"competency-grid mt-2\">\n <div class=\"competency-item domain-pill\" *ngFor=\"let comp of getCompetenciesByType('Domain')\">\n <span class=\"competency-text-domain\">\n {{ comp.theme }} - {{ comp.sub_theme }}\n </span>\n <span class=\"cursor-pointer edit\" (click)=\"editCompetency(comp)\">\n <mat-icon>edit</mat-icon>\n </span>\n <span class=\"cursor-pointer close\" (click)=\"deleteCompetency(comp)\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"popup-footer\">\n <div>\n <input class=\"btn-active\" type=\"button\" value=\"Cancel\" (click)=\"cancelForm()\" />\n </div>\n <div>\n <input class=\"btn-active\" type=\"button\" value=\"Save\" (click)=\"saveRoleMapping()\" />\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n</div>", styles: ["@charset \"UTF-8\";.container{margin:10px auto}.sub-heading p{color:#000;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.radio-label{color:#000;font-family:Lato;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.radio-btn-group{display:flex;width:32px;height:32px;padding:2px;gap:10px}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:150%}::ng-deep .legacy-form-field{background-color:#fff!important;border-radius:25px!important;padding-left:12px;padding-right:12px;height:42px;width:100%}::ng-deep mat-select{border-radius:25px!important;background-color:#fff!important}::ng-deep .mat-select-panel{background-color:#fff!important}::ng-deep .mat-select-panel .mat-option{border-radius:0!important}::ng-deep mat-form-field .mat-form-field-underline{display:none!important}::ng-deep mat-select .mat-select-placeholder{color:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}::ng-deep mat-select .mat-select-value-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;line-height:normal!important;padding-top:0!important;padding-bottom:0!important}::ng-deep mat-select .mat-select-value{display:flex!important;align-items:center!important;height:100%!important}.additional-details textarea{display:flex;padding:16px 16px 0;flex-direction:column;align-items:flex-start;gap:10px;flex:1 0 0;align-self:stretch;width:100%;color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;resize:none}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.btn-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.4;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:5px}.search-filter-section{display:flex;flex-direction:row;gap:10px}.legacy-search-filter{display:none}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:10px;font-size:20px;left:10px}.search .sinput{border-radius:4px;border:1px solid #d5d0d0;padding:15px 36px;font:400 14px Lato}.select-map-route-container{display:flex;flex-direction:row}.selected-mapping-route p{color:#1b4ca1;font-family:Lato;font-size:20px;font-style:normal;font-weight:400;line-height:normal;text-decoration-line:underline;text-decoration-style:solid;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font}.edit-plan{display:flex;padding:4px;justify-content:center;align-items:center;gap:8px;border-radius:4px;background:#1b4ca129;color:#1b4ca1;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;margin-left:10px}.search-container{display:flex;flex-direction:row}.course-container{display:flex;width:100%;padding:16px;flex-direction:column;align-items:flex-start;gap:24px;grid-row:2/span 1;grid-column:1/span 1;border-radius:12px;border:1px solid var(--borders-black-border-16-black, rgba(0, 0, 0, .16));background:#fff}.course-header{display:flex;flex-direction:row;justify-content:space-between;width:100%}.course-pill{display:flex;height:24px;padding:8px;align-items:center;gap:4px;border-radius:16px;border:1px solid var(--borders-border-fill-focussed-4-light-100, #EF951E);background:#fefaf4}.ai-recommened-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #1B4CA1;background:#1b4ca129}.igot-platform-pill{display:flex;padding:4px 8px;align-items:center;gap:8px;border-radius:var(--Radius-4, 4px);border:1px solid #EF951E;background:#ef951e29}.course-title{color:var(--Primary-KB-Primary-Light, #1B4CA1);font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:30px}.course-desc{color:#0009;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.relevancy,.competencies-matched{color:var(--accessbility-shades-with-opacity-kb-greys-black-60, rgba(0, 0, 0, .6));font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;align-items:center}.percentage{color:#1d8923;font-family:Lato;font-size:14px;font-style:normal;font-weight:800;line-height:normal}.relevancy-container,.competencies-matched-container{display:flex;flex-direction:row;align-items:center}.dash{padding:0 5px}::ng-deep .mat-radio-checked .mat-radio-inner-circle{background:#1b4ca1!important}.course-list-container{display:flex;flex-wrap:wrap;gap:16px}.course-list-item{flex:0 0 48%;box-sizing:border-box;border:1px solid #ccc;padding:16px;background-color:#fff;border-radius:8px}.checked-course-container{display:flex}.ml-2{margin-left:8px}::ng-deep .mat-checkbox-checked .mat-checkbox-background{background:#1b4ca1!important}.ai-recommened-pill-text,.igot-platform-pill-text{color:#1b4ca1;font-family:Lato;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.course-pill-text{color:var(--accessbility-shades-without-opacity-kb-greys-black-87, #212121);text-align:center;font-family:Poppins;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.ai-loader-icon img,.igot-platform-icon img{width:15.714px;height:15.714px;flex-shrink:0}.competency-container{display:flex;justify-content:space-between;flex-direction:row}.outside-layer-total{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #1B4CA1;border-right:2px solid #1B4CA1;background:#edf1f8;margin:0 10px}.outside-layer-functional{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #E24577;border-right:2px solid #E24577;background:#f8d2de;margin:0 10px}.outside-layer-domain{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #7B47A4;border-right:2px solid #7B47A4;background:#dfd3e9;margin:0 10px}.outside-layer-behavioral{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px;border-left:2px solid #F8B861;border-right:2px solid #F8B861;background:#fde8cc;margin:0 10px}.inside-layer{color:#1b4ca1;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.count{color:#1b4ca1;font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal}.suggest-courses-header{display:flex;flex-direction:row;justify-content:space-between}.suggest-course-control{display:flex;flex-direction:row}.course-card-container{width:172px;border-radius:3.307px;border:.827px solid var(--borders-border-8-black, rgba(0, 0, 0, .08));background-color:#fff}.highlight-ai{font-family:Montserrat;font-size:24px;font-style:normal;font-weight:600;line-height:normal;background:linear-gradient(90deg,#3b27ff,#2de3d6);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;display:inline-block}.ai-loader-icon-medium img{width:40px;height:40px;flex-shrink:0}.heading{color:#000;font-family:Montserrat;font-size:20px;font-style:normal;font-weight:600;line-height:normal;margin:10px 0}.progress-popup{display:flex;flex-direction:column;justify-content:center;align-items:center}.progress-popup .desc{color:#000000de;text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.behavioural-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #F8B861;background:linear-gradient(0deg,#f8b86152 0% 100%),#fff;margin:5px 0}.functional-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #E24577;background:linear-gradient(0deg,#e245773d 0% 100%),#fff;margin:5px 0}.domain-pill{display:flex;padding:2px 8px;justify-content:center;align-items:center;gap:10px;border-radius:8px;border:1px solid #7B47A4;background:linear-gradient(0deg,#7b47a43d 0% 100%),#fff;margin:5px 0}.popup-header{display:flex;flex-direction:row;justify-content:space-between}.popup-footer{display:flex;flex-direction:row;justify-content:end}.view-cbp-plan{margin:10px;padding:10px}.view-cbp-plan-popup{padding:24px;max-height:70vh;overflow-y:auto}.section{border-radius:8px;background:#1b4ca114;padding:16px}.popup-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;font-weight:700;flex-shrink:0}.popup-footer{display:flex;justify-content:flex-end;gap:16px;padding:16px 24px;border-top:1px solid #ddd;background-color:#fff;flex-shrink:0;position:sticky;bottom:0}.section-container{overflow-y:auto;flex:1 1 auto}.competency-list{display:flex;flex-direction:row;gap:6px}.competency-text{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;padding:5px}.competency-text-behavioral{color:#654321;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-functional{color:#b01669;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-text-domain{color:#301934;font-family:Lato;font-size:14px;font-style:normal;line-height:normal;font-weight:550}.competency-sub-heading{color:#1b4ca1;font-family:Montserrat;font-size:16px;font-style:normal;font-weight:600;line-height:normal}.cursor-pointer{cursor:pointer}.btn-active{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #1B4CA1);color:var(--white-kb-white-100, #FFF);text-align:center;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:32px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none}.custom-textarea{color:#000;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.overlay-loader{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#ffffffbf;z-index:9999;display:flex;justify-content:center;align-items:center}.close .mat-icon{height:18px!important;width:18px!important}.edit .mat-icon{height:24px!important;width:24px!important;overflow:visible;vertical-align:middle}:host ::ng-deep .mat-select-arrow-wrapper{height:6px!important}::ng-deep .filter-section .mat-form-field-appearance-fill .mat-form-field-flex{padding:.5em .75em 0!important}.competency-grid{display:flex;flex-wrap:wrap;gap:12px}.competency-item{flex:0 0 calc(33.333% - 12px);box-sizing:border-box;background-color:#f5f5f5;padding:4px 10px;border-radius:6px;display:flex;justify-content:space-between;align-items:center}.snackbar-success{background-color:#4caf50!important;color:#fff!important;font-weight:500;font-size:14px;border-radius:4px}.enhanced-competency-section{display:flex;flex-direction:column;gap:24px;padding:24px;background:linear-gradient(135deg,#1b4ca105,#1b4ca10f);border-radius:12px;border:1px solid rgba(27,76,161,.15);box-shadow:0 2px 8px #1b4ca114}.competency-step{display:flex;flex-direction:column;gap:12px}.step-label{color:#1b4ca1;font-family:Lato;font-size:15px;font-weight:600;margin-bottom:8px;display:flex;align-items:center}.step-label:before{content:\"\";width:4px;height:16px;background:#1b4ca1;border-radius:2px;margin-right:8px}.competency-dropdown-container,.manual-input-container{width:100%;position:relative}.competency-dropdown{width:100%}.competency-dropdown ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.competency-dropdown ::ng-deep .mat-form-field-flex{padding:0 16px 0 20px;height:48px;align-items:center;transition:all .3s ease;display:flex;justify-content:space-between}.competency-dropdown ::ng-deep .mat-form-field-flex:hover{border-color:#1b4ca1}.competency-dropdown ::ng-deep .mat-form-field-outline,.competency-dropdown ::ng-deep .mat-form-field-outline-start,.competency-dropdown ::ng-deep .mat-form-field-outline-gap,.competency-dropdown ::ng-deep .mat-form-field-outline-end{display:none}.competency-dropdown ::ng-deep .mat-form-field-infix{padding:0;border:none;height:48px;display:flex;align-items:center;flex:1;width:auto}.competency-dropdown ::ng-deep .mat-select{height:100%;display:flex;align-items:center;font-family:Lato;font-size:14px;color:#333;width:100%;flex:1}.competency-dropdown ::ng-deep .mat-select-value{display:flex;align-items:center;height:100%;color:#333;font-weight:400;flex:1;width:100%;justify-content:flex-start}.competency-dropdown ::ng-deep .mat-select-placeholder{color:#00000080;width:100%;display:flex;align-items:center}.competency-dropdown ::ng-deep .mat-select-value-text{width:100%;display:flex;align-items:center;font-weight:400}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper{height:20px;display:flex;align-items:center;margin-left:8px;flex-shrink:0}.competency-dropdown ::ng-deep .mat-select-arrow-wrapper .mat-select-arrow{color:#1b4ca1;border-top-color:#1b4ca1;margin:0}.competency-dropdown ::ng-deep .mat-form-field-label{display:none}.competency-dropdown ::ng-deep .mat-focused .mat-form-field-flex{border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.competency-dropdown ::ng-deep .mat-select-min-line{line-height:normal}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{padding:0}.competency-dropdown ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0;padding:0}.search-option{pointer-events:auto!important;opacity:1!important}.search-option ::ng-deep .mat-option-text{width:100%;padding:0}.search-field{width:100%;margin:0}.search-field ::ng-deep .mat-form-field-wrapper{padding:0;margin:0}.search-field ::ng-deep .mat-form-field-flex{height:36px;padding:0 12px;align-items:center}.search-field ::ng-deep .mat-form-field-infix{padding:0;border:none;height:36px;display:flex;align-items:center}.search-field ::ng-deep .mat-form-field-underline,.search-field ::ng-deep .mat-form-field-outline{display:none}.search-field ::ng-deep input{font-family:Lato;font-size:13px;color:#495057}.search-field ::ng-deep input::placeholder{color:#6c757d}::ng-deep .mat-select-panel{background:#fff;border-radius:12px;box-shadow:0 8px 32px #0000001f;border:1px solid #e0e0e0;max-height:320px;margin-top:4px}::ng-deep .mat-select-panel .mat-option{font-family:Lato;font-size:14px;padding:14px 16px;line-height:1.4;transition:all .2s ease;border-bottom:1px solid rgba(0,0,0,.05)}::ng-deep .mat-select-panel .mat-option:last-child{border-bottom:none}::ng-deep .mat-select-panel .mat-option:hover{background-color:#1b4ca10f;color:#1b4ca1}::ng-deep .mat-select-panel .mat-option.mat-selected{background-color:#1b4ca11a;color:#1b4ca1;font-weight:500;position:relative}::ng-deep .mat-select-panel .mat-option.mat-selected:after{content:\"\\2713\";position:absolute;right:16px;color:#1b4ca1;font-weight:700}::ng-deep .mat-select-panel .mat-option.search-option{padding:12px;background-color:#f8f9fa;border-bottom:2px solid #e9ecef;position:sticky;top:0;z-index:10}::ng-deep .mat-select-panel .mat-option.search-option:hover{background-color:#f8f9fa}.enhanced-competency-section ::ng-deep mat-select{border-radius:0!important;background-color:transparent!important}.enhanced-competency-section ::ng-deep mat-form-field .mat-form-field-underline{display:none!important}.enhanced-competency-section ::ng-deep .mat-select-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:auto}.enhanced-competency-section ::ng-deep .mat-form-field-suffix{margin:0;padding:0;display:flex;align-items:center}.manual-input{border-radius:25px;border:2px solid #e0e0e0;padding:12px 16px;width:100%;font-size:14px;font-family:Lato;background:#fff;height:48px;box-sizing:border-box;transition:all .3s ease;box-shadow:0 2px 4px #0000000d}.manual-input::placeholder{color:#00000080;font-family:Lato;font-size:14px}.manual-input:focus{outline:none;border-color:#1b4ca1;box-shadow:0 0 0 3px #1b4ca11a}.manual-input:hover{border-color:#1b4ca1;box-shadow:0 4px 8px #1b4ca11a}.add-button-section{display:flex;justify-content:flex-start;margin-top:20px;padding-top:20px;border-top:2px solid rgba(27,76,161,.1)}.add-competency-btn{border-radius:25px;padding:12px 24px;font-family:Lato;font-size:14px;font-weight:600;border:none;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 8px #0000001a;min-width:140px}.add-competency-btn.btn-active{background:linear-gradient(135deg,#1b4ca1,#164080);color:#fff}.add-competency-btn.btn-active:hover{background:linear-gradient(135deg,#164080,#0f2f5f);box-shadow:0 4px 16px #1b4ca14d;transform:translateY(-1px)}.add-competency-btn.btn-active:active{transform:translateY(0);box-shadow:0 2px 8px #1b4ca133}.add-competency-btn.btn-disable{background:#e9ecef;color:#6c757d;cursor:not-allowed;opacity:.7;box-shadow:none;border:1px solid #ccc}:host ::ng-deep .mat-select-panel.search-panel{max-height:300px!important;overflow-y:auto!important;box-sizing:border-box}::ng-deep .search-panel .sticky-search-container{position:sticky;top:0;z-index:100;background:#fff;padding:8px;border-bottom:1px solid #eee}:host ::ng-deep .search-panel .search-input-wrapper{display:flex;gap:8px;align-items:center}:host ::ng-deep .search-panel .search-input{width:100%;height:32px;padding:6px 10px}:host ::ng-deep .search-panel .mat-option{padding:8px 16px!important}:host ::ng-deep .search-panel .mat-pseudo-checkbox{margin-right:8px}:host ::ng-deep .search-panel .no-data-option{padding:10px 16px;font-size:14px;color:#f44336}::ng-deep .search-panel .no-data-option .mat-pseudo-checkbox{display:none!important}.search-input-wrapper{position:relative;width:100%;display:flex;align-items:center}.search-input{width:100%;padding-right:40px;height:40px;line-height:40px;box-sizing:border-box}.clear-icon{position:absolute;right:10px;cursor:pointer;font-size:20px;color:#666;display:flex;align-items:center;height:100%}.clear-icon:hover{color:#000}:host ::ng-deep .search-panel .mat-option:first-child{margin-top:0}:host ::ng-deep .mat-notched-outline{border-radius:25px!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{border-radius:25px!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start,:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-width:1px!important;min-width:0!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:transparent!important}:host ::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:transparent!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{border-radius:25px;height:30px;align-items:center;padding:0 16px;background:#fff}\n"] }]
2404
2425
  }], ctorParameters: function () { return [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
2405
2426
  type: Inject,
2406
2427
  args: [MAT_DIALOG_DATA]
@@ -4398,7 +4419,7 @@ class GenerateCourseRecommendationComponent {
4398
4419
  const behavioralThemes = data
4399
4420
  .filter(item => item?.type &&
4400
4421
  ['behavioral', 'behavioural'].includes(item.type.toLowerCase()))
4401
- .map(item => `${item.theme}-${item.sub_theme}`)
4422
+ .map(item => this.formatThemeWithSubTheme(item?.theme, item?.sub_theme))
4402
4423
  .filter((theme) => Boolean(theme)); // Ensures type safety
4403
4424
  const uniqueBehavioralThemes = Array.from(new Set(behavioralThemes));
4404
4425
  console.log(uniqueBehavioralThemes);
@@ -4408,7 +4429,7 @@ class GenerateCourseRecommendationComponent {
4408
4429
  const functionalThemes = data
4409
4430
  .filter(item => item?.type &&
4410
4431
  ['functional'].includes(item.type.toLowerCase()))
4411
- .map(item => `${item.theme}-${item.sub_theme}`)
4432
+ .map(item => this.formatThemeWithSubTheme(item?.theme, item?.sub_theme))
4412
4433
  .filter((theme) => Boolean(theme)); // Ensures type safety
4413
4434
  const uniqueFunctionalThemes = Array.from(new Set(functionalThemes));
4414
4435
  console.log(uniqueFunctionalThemes);
@@ -4419,7 +4440,7 @@ class GenerateCourseRecommendationComponent {
4419
4440
  const domainThemes = data
4420
4441
  .filter(item => item?.type &&
4421
4442
  ['domain'].includes(item.type.toLowerCase()))
4422
- .map(item => `${item.theme}-${item.sub_theme}`)
4443
+ .map(item => this.formatThemeWithSubTheme(item?.theme, item?.sub_theme))
4423
4444
  .filter((theme) => Boolean(theme)); // Ensures type safety
4424
4445
  const uniqueDomainThemes = Array.from(new Set(domainThemes));
4425
4446
  console.log(uniqueDomainThemes);
@@ -4638,10 +4659,10 @@ class GenerateCourseRecommendationComponent {
4638
4659
  });
4639
4660
  // Store matched competency info for later use
4640
4661
  let obj = {};
4641
- obj[typeKey] = [themeKey]; // Store the original theme, not the course theme
4662
+ obj[typeKey] = [this.getThemeSubThemeKey(themeKey, subThemeKey)];
4642
4663
  this.competencyNotMatchedByCategory.push(obj);
4643
4664
  seen.add(matchKey);
4644
- matchedCompetencies.add(themeKey); // Track matched themes
4665
+ matchedCompetencies.add(this.getThemeSubThemeKey(themeKey, subThemeKey));
4645
4666
  isMatched = true;
4646
4667
  if (counts.hasOwnProperty(typeKey)) {
4647
4668
  counts[typeKey]++;
@@ -4661,13 +4682,15 @@ class GenerateCourseRecommendationComponent {
4661
4682
  let allCategoryCompetencies = [];
4662
4683
  for (let i = 0; i < this.planData.competencies.length; i++) {
4663
4684
  if (this.planData.competencies[i]['type']?.toLowerCase() === categoryType?.toLowerCase()) {
4664
- allCategoryCompetencies.push(this.planData.competencies[i]['theme']?.toLowerCase().trim());
4685
+ allCategoryCompetencies.push(this.getThemeSubThemeKey(this.planData.competencies[i]['theme'], this.planData.competencies[i]['sub_theme']));
4665
4686
  }
4666
4687
  }
4667
4688
  // Get matched competencies for this category from courses
4668
4689
  let matchedCompetencies = [];
4690
+ console.log('competencyNotMatchedByCategory', this.competencyNotMatchedByCategory);
4669
4691
  for (let i = 0; i < this.competencyNotMatchedByCategory.length; i++) {
4670
4692
  if (this.competencyNotMatchedByCategory[i][categoryType?.toLowerCase()]) {
4693
+ console.log('competencyNotMatchedByCategory[i]', this.competencyNotMatchedByCategory[i]);
4671
4694
  // Extract matched themes from course competencies
4672
4695
  this.competencyNotMatchedByCategory[i][categoryType?.toLowerCase()].forEach(theme => {
4673
4696
  if (theme) {
@@ -4726,7 +4749,7 @@ class GenerateCourseRecommendationComponent {
4726
4749
  frac: { theme: fracTheme, subTheme: fracSubTheme },
4727
4750
  matchType: matchType
4728
4751
  });
4729
- matchedCompetencies.push(fracTheme);
4752
+ matchedCompetencies.push(this.getThemeSubThemeKey(fracTheme, fracSubTheme));
4730
4753
  break; // Found a match, move to next course competency
4731
4754
  }
4732
4755
  }
@@ -4755,11 +4778,11 @@ class GenerateCourseRecommendationComponent {
4755
4778
  let dialogData = { ...this.planData };
4756
4779
  // If competency parameters are provided, add them to the dialog data
4757
4780
  if (missingCompetency && competencyType) {
4758
- // Parse the theme from the missing competency string (assumes format "theme-subtheme" or just "theme")
4759
- const theme = missingCompetency.trim();
4781
+ const { theme, subTheme } = this.parseThemeAndSubTheme(missingCompetency);
4760
4782
  dialogData.prefillCompetency = {
4761
4783
  type: competencyType,
4762
- theme: theme
4784
+ theme: theme,
4785
+ subTheme: subTheme
4763
4786
  };
4764
4787
  }
4765
4788
  const dialogRef = this.dialog.open(AddCourseComponent, {
@@ -4785,8 +4808,9 @@ class GenerateCourseRecommendationComponent {
4785
4808
  }
4786
4809
  filterOnCompetencyTheme(themeItem) {
4787
4810
  this.selectedThemeFilter = themeItem;
4788
- let themeName = themeItem?.split("-")[0]?.trim();
4789
- let subThemeName = themeItem?.split("-")[1]?.trim();
4811
+ const { theme, subTheme } = this.parseThemeAndSubTheme(themeItem || '');
4812
+ let themeName = theme;
4813
+ let subThemeName = subTheme;
4790
4814
  console.log('Filtering by theme:', themeName, 'subTheme:', subThemeName, 'Tab index:', this.innerTabActiveIndex);
4791
4815
  // Get the current competency type based on the active tab
4792
4816
  let competencyType = '';
@@ -4884,10 +4908,7 @@ class GenerateCourseRecommendationComponent {
4884
4908
  console.warn('No theme selected for adding course');
4885
4909
  return;
4886
4910
  }
4887
- // Parse theme and sub-theme from selectedThemeFilter (format: "Theme - SubTheme")
4888
- const themeParts = this.selectedThemeFilter.split('-');
4889
- const theme = themeParts[0]?.trim();
4890
- const subTheme = themeParts[1]?.trim();
4911
+ const { theme, subTheme } = this.parseThemeAndSubTheme(this.selectedThemeFilter);
4891
4912
  // Get the current competency type based on the active tab
4892
4913
  // Map the tab labels to the format expected by AddCourseComponent
4893
4914
  let competencyType = '';
@@ -4940,7 +4961,8 @@ class GenerateCourseRecommendationComponent {
4940
4961
  console.log('this.planData.competencies', this.planData);
4941
4962
  console.log('this.behaviouralNotMatched', this.behaviouralNotMatched);
4942
4963
  this.planData.competencies.map((item) => {
4943
- if (item && item?.type === 'Behavioral' && this.behaviouralNotMatched.indexOf(item?.theme?.toLowerCase()) < 0) {
4964
+ const competencyKey = this.getThemeSubThemeKey(item?.theme, item?.sub_theme);
4965
+ if (item && item?.type === 'Behavioral' && this.behaviouralNotMatched.indexOf(competencyKey) < 0) {
4944
4966
  this.behaviouralMatched.push(item);
4945
4967
  }
4946
4968
  });
@@ -4949,7 +4971,8 @@ class GenerateCourseRecommendationComponent {
4949
4971
  getFunctionalMatched() {
4950
4972
  this.functionalMatched = [];
4951
4973
  this.planData.competencies.map((item) => {
4952
- if (item && item?.type === 'Functional' && this.functionalNotMatched.indexOf(item?.theme?.toLowerCase()) < 0) {
4974
+ const competencyKey = this.getThemeSubThemeKey(item?.theme, item?.sub_theme);
4975
+ if (item && item?.type === 'Functional' && this.functionalNotMatched.indexOf(competencyKey) < 0) {
4953
4976
  this.functionalMatched.push(item);
4954
4977
  }
4955
4978
  });
@@ -4958,12 +4981,47 @@ class GenerateCourseRecommendationComponent {
4958
4981
  getDomainMatched() {
4959
4982
  this.domainMatched = [];
4960
4983
  this.planData.competencies.map((item) => {
4961
- if (item && item?.type === 'Domain' && this.domainNotMatched.indexOf(item?.theme?.toLowerCase()) < 0) {
4984
+ const competencyKey = this.getThemeSubThemeKey(item?.theme, item?.sub_theme);
4985
+ if (item && item?.type === 'Domain' && this.domainNotMatched.indexOf(competencyKey) < 0) {
4962
4986
  this.domainMatched.push(item);
4963
4987
  }
4964
4988
  });
4965
4989
  console.log('this.domainMatched--', this.domainMatched);
4966
4990
  }
4991
+ formatThemeWithSubTheme(theme, subTheme) {
4992
+ const normalizedTheme = (theme || '').toString().trim();
4993
+ const normalizedSubTheme = (subTheme || '').toString().trim();
4994
+ if (normalizedTheme && normalizedSubTheme) {
4995
+ return `${normalizedTheme} - ${normalizedSubTheme}`;
4996
+ }
4997
+ return normalizedTheme || normalizedSubTheme;
4998
+ }
4999
+ getThemeSubThemeKey(theme, subTheme) {
5000
+ return this.formatThemeWithSubTheme(theme, subTheme).toLowerCase().trim();
5001
+ }
5002
+ parseThemeAndSubTheme(value) {
5003
+ const text = (value || '').toString().trim();
5004
+ if (!text) {
5005
+ return { theme: '', subTheme: '' };
5006
+ }
5007
+ if (text.includes(' - ')) {
5008
+ const parts = text.split(' - ');
5009
+ return {
5010
+ theme: (parts.shift() || '').trim(),
5011
+ subTheme: parts.join(' - ').trim()
5012
+ };
5013
+ }
5014
+ if (text.includes('-')) {
5015
+ const parts = text.split('-');
5016
+ if (parts.length === 2) {
5017
+ return {
5018
+ theme: parts[0].trim(),
5019
+ subTheme: parts[1].trim()
5020
+ };
5021
+ }
5022
+ }
5023
+ return { theme: text, subTheme: '' };
5024
+ }
4967
5025
  downloadPDF() {
4968
5026
  this.isPDFDownload = true;
4969
5027
  this.loading = true;