@sunbird-cb/cbp-ai 0.1.99 → 0.1.101

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.
@@ -472,13 +472,23 @@ class SharedService {
472
472
  return response;
473
473
  }));
474
474
  }
475
- getDepartmentList(ministryId) {
475
+ getDepartmentList(ministryId, options) {
476
476
  const storageData = JSON.parse(localStorage.getItem('loginData'));
477
477
  this.headers = new HttpHeaders({
478
478
  'Authorization': `Bearer ${storageData?.access_token}`
479
479
  });
480
480
  const headers = this.headers;
481
- return this.http.get(`${this.baseUrl}${API_END_POINTS$1.GET_DEPARTMENT}/${ministryId}`, { headers })
481
+ let params = new HttpParams();
482
+ if (options?.limit !== undefined) {
483
+ params = params.set('limit', String(options.limit));
484
+ }
485
+ if (options?.offset !== undefined) {
486
+ params = params.set('offset', String(options.offset));
487
+ }
488
+ if (options?.query) {
489
+ params = params.set('query', options.query);
490
+ }
491
+ return this.http.get(`${this.baseUrl}${API_END_POINTS$1.GET_DEPARTMENT}/${ministryId}`, { headers, params })
482
492
  .pipe(map((response) => {
483
493
  return response;
484
494
  }));
@@ -867,10 +877,16 @@ class SharedService {
867
877
  URL.revokeObjectURL(downloadUrl);
868
878
  });
869
879
  }
870
- getCenterBasedDepartment(state_center_id) {
871
- // let reqBody = { "request": { "filters": { "status": 1, "ministryOrStateType": "ministry", "ministryOrStateId": state_center_id}, "sort_by": { "createdDate": "desc" }, "limit": 9999, "offset": 0, "fields": ["identifier", "orgName", "description", "parentOrgName", "ministryOrStateId", "ministryOrStateType", "ministryOrStateName", "sbOrgSubType"] } }
880
+ getCenterBasedDepartment(state_center_id, options) {
872
881
  const headers = this.headers;
873
- return this.http.get(`${this.baseUrl}${API_END_POINTS$1.CENTER_BASED_MINISTRY}/${state_center_id}?limit=9999&offset=0&sub_org_type=ministry`, { headers })
882
+ let params = new HttpParams()
883
+ .set('limit', String(options?.limit !== undefined ? options.limit : 50))
884
+ .set('offset', String(options?.offset !== undefined ? options.offset : 0))
885
+ .set('sub_org_type', 'ministry');
886
+ if (options?.query) {
887
+ params = params.set('query', options.query);
888
+ }
889
+ return this.http.get(`${this.baseUrl}${API_END_POINTS$1.CENTER_BASED_MINISTRY}/${state_center_id}`, { headers, params })
874
890
  .pipe(map((response) => {
875
891
  return response;
876
892
  }));
@@ -3906,6 +3922,7 @@ class GenerateCourseRecommendationComponent {
3906
3922
  this.selectedProvider = null;
3907
3923
  this.firstApiResponse = null;
3908
3924
  this.existingRecommendationFound = false;
3925
+ this.lastEnrichedIdentifiersKey = ''; // Guards duplicate calls to the course suggestions API
3909
3926
  this.planData = data;
3910
3927
  }
3911
3928
  selectCategory(category) {
@@ -4436,20 +4453,24 @@ class GenerateCourseRecommendationComponent {
4436
4453
  sortedCourses.map((item) => {
4437
4454
  identifiersArr.push(item?.identifier);
4438
4455
  });
4439
- this.sharedService.getAdditionalParameterforSuggestedCourses(identifiersArr).subscribe((response) => {
4440
- if (response && response.result && response.result.content && response.result.content.length) {
4441
- for (let i = 0; i < response.result.content.length; i++) {
4442
- for (let j = 0; j < this.fullCourseList.length; j++) {
4443
- if (this.fullCourseList[j]['identifier'] === response.result.content[i]['identifier']) {
4444
- this.fullCourseList[j]['language'] = response.result.content[i]['language'];
4445
- this.fullCourseList[j]['avgRating'] = response.result.content[i]['avgRating'];
4446
- this.fullCourseList[j]['course'] = response.result.content[i]['name'];
4447
- break;
4456
+ const identifiersKey = [...identifiersArr].sort().join(',');
4457
+ if (identifiersArr.length && identifiersKey !== this.lastEnrichedIdentifiersKey) {
4458
+ this.lastEnrichedIdentifiersKey = identifiersKey;
4459
+ this.sharedService.getAdditionalParameterforSuggestedCourses(identifiersArr).subscribe((response) => {
4460
+ if (response && response.result && response.result.content && response.result.content.length) {
4461
+ for (let i = 0; i < response.result.content.length; i++) {
4462
+ for (let j = 0; j < this.fullCourseList.length; j++) {
4463
+ if (this.fullCourseList[j]['identifier'] === response.result.content[i]['identifier']) {
4464
+ this.fullCourseList[j]['language'] = response.result.content[i]['language'];
4465
+ this.fullCourseList[j]['avgRating'] = response.result.content[i]['avgRating'];
4466
+ this.fullCourseList[j]['course'] = response.result.content[i]['name'];
4467
+ break;
4468
+ }
4448
4469
  }
4449
4470
  }
4450
4471
  }
4451
- }
4452
- });
4472
+ });
4473
+ }
4453
4474
  return sortedCourses;
4454
4475
  }
4455
4476
  /**
@@ -5470,6 +5491,7 @@ class GenerateCourseRecommendationComponent {
5470
5491
  this.originalFilteredCourses = [];
5471
5492
  this.suggestedCourses = [];
5472
5493
  this.userAddedCourses = [];
5494
+ this.lastEnrichedIdentifiersKey = '';
5473
5495
  // Reset tab states
5474
5496
  this.innerTabActiveIndex = 0;
5475
5497
  this.outerTabActiveIndex = 0;
@@ -7784,8 +7806,26 @@ class DashboardComponent {
7784
7806
  this.loginUserOrgIds = [];
7785
7807
  this.dashboardResponseObj = {};
7786
7808
  this.cbpFinalObj = {};
7809
+ this.departmentPageSize = 50;
7810
+ this.departmentOffset = 0;
7811
+ this.departmentHasMore = true;
7812
+ this.departmentLoading = false;
7813
+ this.departmentSearchQuery = '';
7814
+ this.departmentMinistryId = '';
7815
+ this.departmentSearchSubject = new Subject();
7816
+ this.departmentRequestId = 0;
7817
+ this.onDepartmentScroll = (event) => {
7818
+ const panel = event.target;
7819
+ if (panel.scrollTop + panel.clientHeight >= panel.scrollHeight - 60) {
7820
+ this.loadDepartments();
7821
+ }
7822
+ };
7787
7823
  }
7788
7824
  ngOnInit() {
7825
+ this.departmentSearchSubject.pipe(debounceTime(300), distinctUntilChanged()).subscribe((query) => {
7826
+ this.departmentSearchQuery = query;
7827
+ this.loadDepartments(true);
7828
+ });
7789
7829
  this.userProfile = JSON.parse(localStorage.getItem('userProfile') || '{}');
7790
7830
  this.isSuperAdmin = this.userProfile?.role_info?.role_name === 'Super Admin'
7791
7831
  && this.userProfile?.role_info?.is_active;
@@ -7874,7 +7914,87 @@ class DashboardComponent {
7874
7914
  }
7875
7915
  onOpenedDepartment(opened) {
7876
7916
  this.departmentPanelOpen = opened;
7917
+ if (opened) {
7918
+ setTimeout(() => {
7919
+ if (this.departmentSelect && this.departmentSelect.panel && this.departmentSelect.panel.nativeElement) {
7920
+ this.departmentSelect.panel.nativeElement.addEventListener('scroll', this.onDepartmentScroll);
7921
+ }
7922
+ });
7923
+ }
7924
+ else if (this.departmentSearchQuery) {
7925
+ // panel closed with an active search: reset so the list matches the cleared search box on reopen
7926
+ this.departmentSearchSubject.next('');
7927
+ }
7928
+ }
7929
+ loadDepartments(reset = false) {
7930
+ if (!this.departmentMinistryId) {
7931
+ return;
7932
+ }
7933
+ if (!reset && (this.departmentLoading || !this.departmentHasMore)) {
7934
+ return;
7935
+ }
7936
+ if (reset) {
7937
+ this.departmentOffset = 0;
7938
+ this.departmentHasMore = true;
7939
+ }
7940
+ const requestId = ++this.departmentRequestId;
7941
+ this.departmentLoading = true;
7942
+ const options = {
7943
+ limit: this.departmentPageSize,
7944
+ offset: this.departmentOffset,
7945
+ query: this.departmentSearchQuery
7946
+ };
7947
+ const request = this.selectedMinistryType === 'ministry'
7948
+ ? this.sharedService.getCenterBasedDepartment(this.departmentMinistryId, options)
7949
+ : this.sharedService.getDepartmentList(this.departmentMinistryId, options);
7950
+ request.subscribe({
7951
+ next: (res) => {
7952
+ if (requestId !== this.departmentRequestId) {
7953
+ return;
7954
+ }
7955
+ this.departmentLoading = false;
7956
+ const items = Array.isArray(res) ? res : (res?.items || res?.data || []);
7957
+ this.departmentHasMore = items.length === this.departmentPageSize;
7958
+ this.departmentOffset += items.length;
7959
+ items.forEach((item) => {
7960
+ if (!this.departmentData.some(d => d?.identifier === item?.identifier)) {
7961
+ this.departmentData.push(item);
7962
+ }
7963
+ });
7964
+ this.filteredDepartmentList = reset ? items : [...this.filteredDepartmentList, ...items];
7965
+ // this.ensureSelectedDepartmentOptions()
7966
+ if (reset && !items.length && !this.departmentSearchQuery && this.selectedMinistryType === 'ministry') {
7967
+ this.snackBar.open('No Department Found for Selected Ministry', 'X', {
7968
+ duration: 3000,
7969
+ panelClass: ['snackbar-error']
7970
+ });
7971
+ }
7972
+ },
7973
+ error: () => {
7974
+ if (requestId !== this.departmentRequestId) {
7975
+ return;
7976
+ }
7977
+ this.departmentLoading = false;
7978
+ }
7979
+ });
7877
7980
  }
7981
+ // keeps the selected departments visible in the panel even when the current
7982
+ // search/page from the server does not include them
7983
+ // ensureSelectedDepartmentOptions() {
7984
+ // const value = this.filtersForm?.get('departments')?.value
7985
+ // const selectedIds = Array.isArray(value) ? value : (value ? [value] : [])
7986
+ // selectedIds.forEach((id) => {
7987
+ // if (!id || this.filteredDepartmentList.some(d => d?.identifier === id)) {
7988
+ // return
7989
+ // }
7990
+ // const selected = this.departmentData.find(d => d?.identifier === id)
7991
+ // || (this.cbpFinalObj?.departments === id && this.cbpFinalObj?.department_name
7992
+ // ? { identifier: id, orgName: this.cbpFinalObj.department_name } : null)
7993
+ // if (selected) {
7994
+ // this.filteredDepartmentList = [selected, ...this.filteredDepartmentList]
7995
+ // }
7996
+ // })
7997
+ // }
7878
7998
  filterData(event) {
7879
7999
  if (event && event.target && event.target.value) {
7880
8000
  const s = event.target.value.toLowerCase();
@@ -7885,13 +8005,8 @@ class DashboardComponent {
7885
8005
  }
7886
8006
  }
7887
8007
  filterDepartmentData(event) {
7888
- if (event && event.target && event.target.value) {
7889
- const s = event.target.value.toLowerCase();
7890
- this.filteredDepartmentList = this.departmentData.filter(x => x.orgName.toLowerCase().includes(s));
7891
- }
7892
- else {
7893
- this.filteredDepartmentList = this.departmentData;
7894
- }
8008
+ const value = event && event.target && event.target.value ? event.target.value : '';
8009
+ this.departmentSearchSubject.next(value.trim());
7895
8010
  }
7896
8011
  onMinistryChange(event) {
7897
8012
  const selectedMinistryId = event.value;
@@ -7900,25 +8015,11 @@ class DashboardComponent {
7900
8015
  // You can access the selected object if needed
7901
8016
  const selectedMinistry = this.ministryData.find(item => item.identifier === selectedMinistryId);
7902
8017
  this.selectedMinistryObj = selectedMinistry;
7903
- if (selectedMinistryId && this.selectedMinistryType === 'state') {
7904
- this.sharedService.getDepartmentList(selectedMinistryId).subscribe((res) => {
7905
- this.departmentData = res;
7906
- this.filteredDepartmentList = res;
7907
- });
7908
- }
7909
- if (selectedMinistryId && this.selectedMinistryType === 'ministry') {
7910
- this.sharedService.getCenterBasedDepartment(selectedMinistryId).subscribe((res) => {
7911
- if (res?.length) {
7912
- this.departmentData = res;
7913
- this.filteredDepartmentList = res;
7914
- }
7915
- else {
7916
- this.snackBar.open('No Department Found for Selected Ministry', 'X', {
7917
- duration: 3000,
7918
- panelClass: ['snackbar-error']
7919
- });
7920
- }
7921
- });
8018
+ if (selectedMinistryId && (this.selectedMinistryType === 'state' || this.selectedMinistryType === 'ministry')) {
8019
+ this.departmentMinistryId = selectedMinistryId;
8020
+ this.departmentSearchQuery = '';
8021
+ this.filteredDepartmentList = [];
8022
+ this.loadDepartments(true);
7922
8023
  }
7923
8024
  }
7924
8025
  onDepartmentChange() {
@@ -7992,12 +8093,15 @@ class DashboardComponent {
7992
8093
  this.router.navigate(['/ai/initial']);
7993
8094
  }
7994
8095
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DashboardComponent, deps: [{ token: i2.FormBuilder }, { token: SharedService }, { token: i3$1.MatSnackBar }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
7995
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DashboardComponent, selector: "app-dashboard", ngImport: i0, template: "<div class=\"dashboard-wrapper\">\n <div class=\"header\">\n <div class=\"sub-heading mt-10 mb-10 cursor-pointer\">\n <p (click)=\"routeToInitial()\"><mat-icon style=\"vertical-align: middle;\">arrow_back</mat-icon><span\n class=\"pl-10\">Back to Role Mapping Generation</span></p>\n </div>\n\n </div>\n <div class=\"dashboard-container\">\n\n <!-- FILTERS SECTION -->\n <form [formGroup]=\"filtersForm\" class=\"filters-form\">\n\n <mat-card class=\"filters-card\">\n <div class=\"filters-header\">\n <mat-icon>filter_list</mat-icon>\n <span>Filters</span>\n </div>\n\n <div class=\"filters-row\">\n <div>\n <label>Centre / State </label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n\n <mat-select formControlName=\"centreState\" [disabled]=\"!isSuperAdmin\"\n (selectionChange)=\"onMinistryTypeChange($event)\">\n <mat-option value=\"\">Select Center/State</mat-option>\n <mat-option value=\"ministry\">Center</mat-option>\n <mat-option value=\"state\">State</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div>\n <label>{{selectedMinistryType === 'ministry' ? 'Ministry':'State'}} </label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n <mat-select panelClass=\"select-with-search\" [disabled]=\"!isSuperAdmin\" multiple\n [placeholder]=\"selectedMinistryType === 'ministry' ? 'Select Ministry/ Department':'Select State'\"\n (selectionChange)=\"onMinistryChange($event)\" formControlName=\"ministries\"\n style=\"border-radius: 25px; background: white; width:100%\"\n (openedChange)=\"onOpened($event)\">\n <div class=\"search-wrapper\" *ngIf=\"panelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <!-- [selected]=\"selectedMinistryId === item?.identifier\" -->\n <mat-option [value]=\"item?.identifier\" *ngFor=\"let item of filteredList\"\n >{{item?.orgName}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div>\n <label>Department</label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px;border: 1px solid #ccc;\">\n <mat-select panelClass=\"select-with-search\" placeholder=\"Select Department\"\n [disabled]=\"!isSuperAdmin\" multiple formControlName=\"departments\"\n style=\"border-radius: 25px; background: white;\" (selectionChange)=\"onDepartmentChange()\"\n (openedChange)=\"onOpenedDepartment($event)\">\n <div class=\"search-wrapper\" *ngIf=\"departmentPanelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterDepartmentData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredDepartmentList\">{{item?.orgName}}</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- Date Range -->\n <div>\n <label>Date Range </label>\n <mat-form-field appearance=\"outline\">\n\n <input matInput ngxDaterangepickerMd formControlName=\"dateRange\" style=\"margin:10px\"\n placeholder=\"Select date range\" [autoApply]=\"true\" [linkedCalendars]=\"true\"\n [locale]=\"{ format: 'DD MMM YYYY' }\" />\n </mat-form-field>\n </div>\n\n\n </div>\n </mat-card>\n </form>\n\n <!-- OVERVIEW METRICS -->\n <h2 class=\"section-title\">\n <mat-icon>dashboard</mat-icon>\n Overview Metrics\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">States/Ministries which generated Role Mapping</p>\n <h2>{{this.dashboardData?.ministry_count}}</h2>\n <!-- <p class=\"card-subtitle\">At least 1 designation/role mapping</p> -->\n </div>\n <mat-icon class=\"icon primary\">public</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Departments which generated Role Mapping</p>\n <h2>{{this.dashboardData?.department_count}}</h2>\n <!-- <p class=\"card-subtitle\">At least 1 designation/role mapping</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Capacity Building Plans Created</p>\n <h2>{{this.dashboardData?.total_cbp_plan_count}}</h2>\n </div>\n <mat-icon class=\"icon green\">description</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- COMPETENCIES -->\n <h2 class=\"section-title\">\n <mat-icon>psychology</mat-icon>\n Competencies Recommended\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Behavioral Competencies</p>\n <h2>{{this.dashboardData?.behavioral_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon purple\">psychology</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Functional Competencies</p>\n <h2>{{this.dashboardData?.functional_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon teal\">settings</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Domain Competencies</p>\n <h2>{{this.dashboardData?.domain_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon orange\">tune</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- DOCUMENTS -->\n <h2 class=\"section-title\">\n <mat-icon>menu_book</mat-icon>\n Documents & Course Recommendations\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Documents Uploaded</p>\n <h2>{{this.dashboardData?.total_documents}}</h2>\n <!-- <p class=\"card-subtitle\">Min 1, Max 10 per role mapping</p> -->\n </div>\n <mat-icon class=\"icon amber\">upload_file</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Role Mappings with Course Recommendations</p>\n <h2>{{this.dashboardData?.role_mappings_with_recommendations}}</h2>\n <!-- <p class=\"card-subtitle\">8500 of 50,000 role mappings</p> -->\n </div>\n <mat-icon class=\"icon green\">menu_book</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Course Recommendations Saved</p>\n <h2>{{this.dashboardData?.saved_recommended_courses_count}}</h2>\n <!-- <p class=\"card-subtitle\">{{this.dashboardData?.saved_recommended_courses_count}} of 8500\n recommendations</p> -->\n </div>\n <mat-icon class=\"icon teal\">save</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- GAP ANALYSIS -->\n <div class=\"gap-section\">\n <h2 class=\"section-title warning\">\n <mat-icon>warning</mat-icon>\n Gap Analysis\n </h2>\n\n <div class=\"card-grid-alone\">\n\n <mat-card class=\"metric-card warning-bg\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Competencies Without Courses</p>\n <h2>{{this.dashboardData?.competencies_without_courses}}</h2>\n <p class=\"card-subtitle\">Unique competencies with no identified courses</p>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <!-- <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Manually Added Courses</p>\n <h2>-</h2>\n <p class=\"card-subtitle\">Competencies with user-added courses</p>\n </div>\n <mat-icon class=\"icon green\">add_circle</mat-icon>\n </div>\n </mat-card> -->\n\n </div>\n\n <div class=\"card-grid mt-2\">\n\n <mat-card class=\"metric-card warning-bg\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Behavioral Competencies Without Courses</p>\n <h2>{{this.dashboardData?.behavioral_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Functional Competencies Without Courses</p>\n <h2>{{this.dashboardData?.functional_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Domain Competencies Without Courses</p>\n <h2>{{this.dashboardData?.domain_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n </div>\n </div>\n\n <!-- OVERVIEW METRICS -->\n <h2 class=\"section-title\">\n <mat-icon>dashboard</mat-icon>\n Users and Role Mapping Metrics\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\" *ngIf=\"!isSuperAdmin\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Users (Credentials)</p>\n <h2>{{this.dashboardData?.total_users}}</h2>\n </div>\n <mat-icon class=\"icon primary\">public</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\" *ngIf=\"!isSuperAdmin\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Users with Role Mappings</p>\n <h2>{{this.dashboardData?.users_with_role_mappings}}</h2>\n <!-- <p class=\"card-subtitle\">Generated atleast 1 role mapping</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Designation/Role Mappings Generated</p>\n <h2>{{this.dashboardData?.total_role_mappings}}</h2>\n </div>\n <mat-icon class=\"icon green\">description</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Role Mappings</p>\n <h2>{{this.dashboardData?.unique_role_mappings}}</h2>\n <!-- <p class=\"card-subtitle\">10,000 unique of 50,000 total</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n </div>\n </div>\n</div>", styles: [".dashboard-wrapper{background:transparent;min-height:100vh;padding:24px 10px;margin:0 30px 0 60px}.dashboard-container{max-width:auto;margin:0 auto}.section-title{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:600;color:#000;margin:20px 0}.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px}.card-grid-alone{display:grid;grid-template-columns:repeat(1,1fr);gap:32px}.metric-card{padding:24px;border-radius:12px;box-shadow:none;border:1px solid #e5e7eb}.card-content{display:flex;justify-content:space-between;align-items:center}.card-title{font-size:14px;color:#6b7280;margin-bottom:6px}.metric-card h2{font-size:28px;font-weight:700;color:#000;margin:0}.card-subtitle{font-size:12px;color:#9ca3af;margin-top:6px}.icon{font-size:28px;width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center}.primary{color:#2563eb}.teal{color:#059669}.green{color:#16a34a}.purple{color:#9333ea}.orange{color:#f97316}.amber{color:#f59e0b}.red,.section-title.warning{color:#dc2626}.warning-card{background:#fdeaea;border:1px solid #f5c2c7}.filters-card{padding:20px 24px;border-radius:12px;border:1px solid #e5e7eb;box-shadow:none}.filters-header{display:flex;align-items:center;gap:8px;font-weight:600;margin-bottom:16px}.filters-row{display:flex;gap:24px;flex-wrap:wrap}.filters-row mat-form-field{flex:1;min-width:220px}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:#ccc}:host ::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:#1b4ca1;border-color:#1b4ca1!important}::ng-deep .select-search-panel .mat-option.mat-selected:not(.mat-option-disabled){background-color:#1b4ca1!important;color:#fff!important}:host ::ng-deep .mat-form-field-appearance-outline{border-radius:25px;border:1px solid #ccc}:host ::ng-deep .mat-form-field-focused .mat-form-field-appearance-outline{border-color:#1b4ca1!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:25px 0 0 25px;border:none!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-right:none!important;border:none!important;border-radius:0 25px 25px 0}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-gap{border:none!important;border-radius:25px}:host::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{background-color:transparent!important}.dashboard-container .mat-card{background-color:#fff}.gap-title{color:#b91c1c}.gap-section{background-color:#d926621a;padding:10px;border-radius:12px;border:1px solid #f5c2c7;margin:16px 0}.gap-card{background-color:#d926621a;border:1px solid #f8d7da}.gap-card h2{color:#dc2626}@media (max-width: 1200px){.card-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width: 768px){.card-grid{grid-template-columns:1fr}}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}.mat-select-panel mat-option{padding-top:10px}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}::ng-deep .select-with-search.mat-select-panel{padding-top:0;overflow:auto}::ng-deep .select-with-search .search-wrapper{position:sticky;top:0;z-index:10;background:#fff;padding:8px;border-bottom:1px solid #e0e0e0}::ng-deep .select-with-search .search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .select-with-search mat-option:first-of-type{margin-top:4px}::ng-deep .md-drppicker.ltr{min-width:500px!important}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.mb-10{margin-bottom:10px}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "directive", type: i12$2.DaterangepickerDirective, selector: "input[ngxDaterangepickerMd]", inputs: ["minDate", "maxDate", "autoApply", "alwaysShowCalendars", "showCustomRangeLabel", "linkedCalendars", "dateLimit", "singleDatePicker", "showWeekNumbers", "showISOWeekNumbers", "showDropdowns", "isInvalidDate", "isCustomDate", "isTooltipDate", "showClearButton", "customRangeDirection", "ranges", "opens", "drops", "firstMonthDayClass", "lastMonthDayClass", "emptyWeekRowClass", "emptyWeekColumnClass", "firstDayOfNextMonthClass", "lastDayOfPreviousMonthClass", "keepCalendarOpeningWithRange", "showRangeLabelOnInput", "showCancel", "lockStartDate", "timePicker", "timePicker24Hour", "timePickerIncrement", "timePickerSeconds", "closeOnAutoApply", "endKeyHolder", "startKey", "locale", "endKey"], outputs: ["change", "rangeClicked", "datesUpdated", "startDateChanged", "endDateChanged", "clearClicked"] }] }); }
8096
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DashboardComponent, selector: "app-dashboard", viewQueries: [{ propertyName: "departmentSelect", first: true, predicate: ["departmentSelect"], descendants: true }], ngImport: i0, template: "<div class=\"dashboard-wrapper\">\n <div class=\"header\">\n <div class=\"sub-heading mt-10 mb-10 cursor-pointer\">\n <p (click)=\"routeToInitial()\"><mat-icon style=\"vertical-align: middle;\">arrow_back</mat-icon><span\n class=\"pl-10\">Back to Role Mapping Generation</span></p>\n </div>\n\n </div>\n <div class=\"dashboard-container\">\n\n <!-- FILTERS SECTION -->\n <form [formGroup]=\"filtersForm\" class=\"filters-form\">\n\n <mat-card class=\"filters-card\">\n <div class=\"filters-header\">\n <mat-icon>filter_list</mat-icon>\n <span>Filters</span>\n </div>\n\n <div class=\"filters-row\">\n <div>\n <label>Centre / State </label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n\n <mat-select formControlName=\"centreState\" [disabled]=\"!isSuperAdmin\"\n (selectionChange)=\"onMinistryTypeChange($event)\">\n <mat-option value=\"\">Select Center/State</mat-option>\n <mat-option value=\"ministry\">Center</mat-option>\n <mat-option value=\"state\">State</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div>\n <label>{{selectedMinistryType === 'ministry' ? 'Ministry':'State'}} </label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n <mat-select panelClass=\"select-with-search\" [disabled]=\"!isSuperAdmin\" multiple\n [placeholder]=\"selectedMinistryType === 'ministry' ? 'Select Ministry/ Department':'Select State'\"\n (selectionChange)=\"onMinistryChange($event)\" formControlName=\"ministries\"\n style=\"border-radius: 25px; background: white; width:100%\"\n (openedChange)=\"onOpened($event)\">\n <div class=\"search-wrapper\" *ngIf=\"panelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <!-- [selected]=\"selectedMinistryId === item?.identifier\" -->\n <mat-option [value]=\"item?.identifier\" *ngFor=\"let item of filteredList\"\n >{{item?.orgName}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div>\n <label>Department</label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px;border: 1px solid #ccc;\">\n <mat-select #departmentSelect panelClass=\"select-with-search\" placeholder=\"Select Department\"\n [disabled]=\"!isSuperAdmin\" multiple formControlName=\"departments\"\n style=\"border-radius: 25px; background: white;\" (selectionChange)=\"onDepartmentChange()\"\n (openedChange)=\"onOpenedDepartment($event)\">\n <div class=\"search-wrapper\" *ngIf=\"departmentPanelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterDepartmentData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredDepartmentList\">{{item?.orgName}}</mat-option>\n <mat-option disabled *ngIf=\"departmentLoading\">Loading...</mat-option>\n <mat-option disabled\n *ngIf=\"!departmentLoading && !filteredDepartmentList?.length\">No department found</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- Date Range -->\n <div>\n <label>Date Range </label>\n <mat-form-field appearance=\"outline\">\n\n <input matInput ngxDaterangepickerMd formControlName=\"dateRange\" style=\"margin:10px\"\n placeholder=\"Select date range\" [autoApply]=\"true\" [linkedCalendars]=\"true\"\n [locale]=\"{ format: 'DD MMM YYYY' }\" />\n </mat-form-field>\n </div>\n\n\n </div>\n </mat-card>\n </form>\n\n <!-- OVERVIEW METRICS -->\n <h2 class=\"section-title\">\n <mat-icon>dashboard</mat-icon>\n Overview Metrics\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">States/Ministries which generated Role Mapping</p>\n <h2>{{this.dashboardData?.ministry_count}}</h2>\n <!-- <p class=\"card-subtitle\">At least 1 designation/role mapping</p> -->\n </div>\n <mat-icon class=\"icon primary\">public</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Departments which generated Role Mapping</p>\n <h2>{{this.dashboardData?.department_count}}</h2>\n <!-- <p class=\"card-subtitle\">At least 1 designation/role mapping</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Capacity Building Plans Created</p>\n <h2>{{this.dashboardData?.total_cbp_plan_count}}</h2>\n </div>\n <mat-icon class=\"icon green\">description</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- COMPETENCIES -->\n <h2 class=\"section-title\">\n <mat-icon>psychology</mat-icon>\n Competencies Recommended\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Behavioral Competencies</p>\n <h2>{{this.dashboardData?.behavioral_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon purple\">psychology</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Functional Competencies</p>\n <h2>{{this.dashboardData?.functional_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon teal\">settings</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Domain Competencies</p>\n <h2>{{this.dashboardData?.domain_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon orange\">tune</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- DOCUMENTS -->\n <h2 class=\"section-title\">\n <mat-icon>menu_book</mat-icon>\n Documents & Course Recommendations\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Documents Uploaded</p>\n <h2>{{this.dashboardData?.total_documents}}</h2>\n <!-- <p class=\"card-subtitle\">Min 1, Max 10 per role mapping</p> -->\n </div>\n <mat-icon class=\"icon amber\">upload_file</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Role Mappings with Course Recommendations</p>\n <h2>{{this.dashboardData?.role_mappings_with_recommendations}}</h2>\n <!-- <p class=\"card-subtitle\">8500 of 50,000 role mappings</p> -->\n </div>\n <mat-icon class=\"icon green\">menu_book</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Course Recommendations Saved</p>\n <h2>{{this.dashboardData?.saved_recommended_courses_count}}</h2>\n <!-- <p class=\"card-subtitle\">{{this.dashboardData?.saved_recommended_courses_count}} of 8500\n recommendations</p> -->\n </div>\n <mat-icon class=\"icon teal\">save</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- GAP ANALYSIS -->\n <div class=\"gap-section\">\n <h2 class=\"section-title warning\">\n <mat-icon>warning</mat-icon>\n Gap Analysis\n </h2>\n\n <div class=\"card-grid-alone\">\n\n <mat-card class=\"metric-card warning-bg\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Competencies Without Courses</p>\n <h2>{{this.dashboardData?.competencies_without_courses}}</h2>\n <p class=\"card-subtitle\">Unique competencies with no identified courses</p>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <!-- <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Manually Added Courses</p>\n <h2>-</h2>\n <p class=\"card-subtitle\">Competencies with user-added courses</p>\n </div>\n <mat-icon class=\"icon green\">add_circle</mat-icon>\n </div>\n </mat-card> -->\n\n </div>\n\n <div class=\"card-grid mt-2\">\n\n <mat-card class=\"metric-card warning-bg\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Behavioral Competencies Without Courses</p>\n <h2>{{this.dashboardData?.behavioral_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Functional Competencies Without Courses</p>\n <h2>{{this.dashboardData?.functional_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Domain Competencies Without Courses</p>\n <h2>{{this.dashboardData?.domain_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n </div>\n </div>\n\n <!-- OVERVIEW METRICS -->\n <h2 class=\"section-title\">\n <mat-icon>dashboard</mat-icon>\n Users and Role Mapping Metrics\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\" *ngIf=\"!isSuperAdmin\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Users (Credentials)</p>\n <h2>{{this.dashboardData?.total_users}}</h2>\n </div>\n <mat-icon class=\"icon primary\">public</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\" *ngIf=\"!isSuperAdmin\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Users with Role Mappings</p>\n <h2>{{this.dashboardData?.users_with_role_mappings}}</h2>\n <!-- <p class=\"card-subtitle\">Generated atleast 1 role mapping</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Designation/Role Mappings Generated</p>\n <h2>{{this.dashboardData?.total_role_mappings}}</h2>\n </div>\n <mat-icon class=\"icon green\">description</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Role Mappings</p>\n <h2>{{this.dashboardData?.unique_role_mappings}}</h2>\n <!-- <p class=\"card-subtitle\">10,000 unique of 50,000 total</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n </div>\n </div>\n</div>", styles: [".dashboard-wrapper{background:transparent;min-height:100vh;padding:24px 10px;margin:0 30px 0 60px}.dashboard-container{max-width:auto;margin:0 auto}.section-title{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:600;color:#000;margin:20px 0}.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px}.card-grid-alone{display:grid;grid-template-columns:repeat(1,1fr);gap:32px}.metric-card{padding:24px;border-radius:12px;box-shadow:none;border:1px solid #e5e7eb}.card-content{display:flex;justify-content:space-between;align-items:center}.card-title{font-size:14px;color:#6b7280;margin-bottom:6px}.metric-card h2{font-size:28px;font-weight:700;color:#000;margin:0}.card-subtitle{font-size:12px;color:#9ca3af;margin-top:6px}.icon{font-size:28px;width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center}.primary{color:#2563eb}.teal{color:#059669}.green{color:#16a34a}.purple{color:#9333ea}.orange{color:#f97316}.amber{color:#f59e0b}.red,.section-title.warning{color:#dc2626}.warning-card{background:#fdeaea;border:1px solid #f5c2c7}.filters-card{padding:20px 24px;border-radius:12px;border:1px solid #e5e7eb;box-shadow:none}.filters-header{display:flex;align-items:center;gap:8px;font-weight:600;margin-bottom:16px}.filters-row{display:flex;gap:24px;flex-wrap:wrap}.filters-row mat-form-field{flex:1;min-width:220px}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:#ccc}:host ::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:#1b4ca1;border-color:#1b4ca1!important}::ng-deep .select-search-panel .mat-option.mat-selected:not(.mat-option-disabled){background-color:#1b4ca1!important;color:#fff!important}:host ::ng-deep .mat-form-field-appearance-outline{border-radius:25px;border:1px solid #ccc}:host ::ng-deep .mat-form-field-focused .mat-form-field-appearance-outline{border-color:#1b4ca1!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:25px 0 0 25px;border:none!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-right:none!important;border:none!important;border-radius:0 25px 25px 0}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-gap{border:none!important;border-radius:25px}:host::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{background-color:transparent!important}.dashboard-container .mat-card{background-color:#fff}.gap-title{color:#b91c1c}.gap-section{background-color:#d926621a;padding:10px;border-radius:12px;border:1px solid #f5c2c7;margin:16px 0}.gap-card{background-color:#d926621a;border:1px solid #f8d7da}.gap-card h2{color:#dc2626}@media (max-width: 1200px){.card-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width: 768px){.card-grid{grid-template-columns:1fr}}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}.mat-select-panel mat-option{padding-top:10px}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}::ng-deep .select-with-search.mat-select-panel{padding-top:0;overflow:auto}::ng-deep .select-with-search .search-wrapper{position:sticky;top:0;z-index:10;background:#fff;padding:8px;border-bottom:1px solid #e0e0e0}::ng-deep .select-with-search .search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .select-with-search mat-option:first-of-type{margin-top:4px}::ng-deep .md-drppicker.ltr{min-width:500px!important}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.mb-10{margin-bottom:10px}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "directive", type: i12$2.DaterangepickerDirective, selector: "input[ngxDaterangepickerMd]", inputs: ["minDate", "maxDate", "autoApply", "alwaysShowCalendars", "showCustomRangeLabel", "linkedCalendars", "dateLimit", "singleDatePicker", "showWeekNumbers", "showISOWeekNumbers", "showDropdowns", "isInvalidDate", "isCustomDate", "isTooltipDate", "showClearButton", "customRangeDirection", "ranges", "opens", "drops", "firstMonthDayClass", "lastMonthDayClass", "emptyWeekRowClass", "emptyWeekColumnClass", "firstDayOfNextMonthClass", "lastDayOfPreviousMonthClass", "keepCalendarOpeningWithRange", "showRangeLabelOnInput", "showCancel", "lockStartDate", "timePicker", "timePicker24Hour", "timePickerIncrement", "timePickerSeconds", "closeOnAutoApply", "endKeyHolder", "startKey", "locale", "endKey"], outputs: ["change", "rangeClicked", "datesUpdated", "startDateChanged", "endDateChanged", "clearClicked"] }] }); }
7996
8097
  }
7997
8098
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DashboardComponent, decorators: [{
7998
8099
  type: Component,
7999
- args: [{ selector: 'app-dashboard', template: "<div class=\"dashboard-wrapper\">\n <div class=\"header\">\n <div class=\"sub-heading mt-10 mb-10 cursor-pointer\">\n <p (click)=\"routeToInitial()\"><mat-icon style=\"vertical-align: middle;\">arrow_back</mat-icon><span\n class=\"pl-10\">Back to Role Mapping Generation</span></p>\n </div>\n\n </div>\n <div class=\"dashboard-container\">\n\n <!-- FILTERS SECTION -->\n <form [formGroup]=\"filtersForm\" class=\"filters-form\">\n\n <mat-card class=\"filters-card\">\n <div class=\"filters-header\">\n <mat-icon>filter_list</mat-icon>\n <span>Filters</span>\n </div>\n\n <div class=\"filters-row\">\n <div>\n <label>Centre / State </label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n\n <mat-select formControlName=\"centreState\" [disabled]=\"!isSuperAdmin\"\n (selectionChange)=\"onMinistryTypeChange($event)\">\n <mat-option value=\"\">Select Center/State</mat-option>\n <mat-option value=\"ministry\">Center</mat-option>\n <mat-option value=\"state\">State</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div>\n <label>{{selectedMinistryType === 'ministry' ? 'Ministry':'State'}} </label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n <mat-select panelClass=\"select-with-search\" [disabled]=\"!isSuperAdmin\" multiple\n [placeholder]=\"selectedMinistryType === 'ministry' ? 'Select Ministry/ Department':'Select State'\"\n (selectionChange)=\"onMinistryChange($event)\" formControlName=\"ministries\"\n style=\"border-radius: 25px; background: white; width:100%\"\n (openedChange)=\"onOpened($event)\">\n <div class=\"search-wrapper\" *ngIf=\"panelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <!-- [selected]=\"selectedMinistryId === item?.identifier\" -->\n <mat-option [value]=\"item?.identifier\" *ngFor=\"let item of filteredList\"\n >{{item?.orgName}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div>\n <label>Department</label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px;border: 1px solid #ccc;\">\n <mat-select panelClass=\"select-with-search\" placeholder=\"Select Department\"\n [disabled]=\"!isSuperAdmin\" multiple formControlName=\"departments\"\n style=\"border-radius: 25px; background: white;\" (selectionChange)=\"onDepartmentChange()\"\n (openedChange)=\"onOpenedDepartment($event)\">\n <div class=\"search-wrapper\" *ngIf=\"departmentPanelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterDepartmentData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredDepartmentList\">{{item?.orgName}}</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- Date Range -->\n <div>\n <label>Date Range </label>\n <mat-form-field appearance=\"outline\">\n\n <input matInput ngxDaterangepickerMd formControlName=\"dateRange\" style=\"margin:10px\"\n placeholder=\"Select date range\" [autoApply]=\"true\" [linkedCalendars]=\"true\"\n [locale]=\"{ format: 'DD MMM YYYY' }\" />\n </mat-form-field>\n </div>\n\n\n </div>\n </mat-card>\n </form>\n\n <!-- OVERVIEW METRICS -->\n <h2 class=\"section-title\">\n <mat-icon>dashboard</mat-icon>\n Overview Metrics\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">States/Ministries which generated Role Mapping</p>\n <h2>{{this.dashboardData?.ministry_count}}</h2>\n <!-- <p class=\"card-subtitle\">At least 1 designation/role mapping</p> -->\n </div>\n <mat-icon class=\"icon primary\">public</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Departments which generated Role Mapping</p>\n <h2>{{this.dashboardData?.department_count}}</h2>\n <!-- <p class=\"card-subtitle\">At least 1 designation/role mapping</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Capacity Building Plans Created</p>\n <h2>{{this.dashboardData?.total_cbp_plan_count}}</h2>\n </div>\n <mat-icon class=\"icon green\">description</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- COMPETENCIES -->\n <h2 class=\"section-title\">\n <mat-icon>psychology</mat-icon>\n Competencies Recommended\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Behavioral Competencies</p>\n <h2>{{this.dashboardData?.behavioral_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon purple\">psychology</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Functional Competencies</p>\n <h2>{{this.dashboardData?.functional_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon teal\">settings</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Domain Competencies</p>\n <h2>{{this.dashboardData?.domain_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon orange\">tune</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- DOCUMENTS -->\n <h2 class=\"section-title\">\n <mat-icon>menu_book</mat-icon>\n Documents & Course Recommendations\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Documents Uploaded</p>\n <h2>{{this.dashboardData?.total_documents}}</h2>\n <!-- <p class=\"card-subtitle\">Min 1, Max 10 per role mapping</p> -->\n </div>\n <mat-icon class=\"icon amber\">upload_file</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Role Mappings with Course Recommendations</p>\n <h2>{{this.dashboardData?.role_mappings_with_recommendations}}</h2>\n <!-- <p class=\"card-subtitle\">8500 of 50,000 role mappings</p> -->\n </div>\n <mat-icon class=\"icon green\">menu_book</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Course Recommendations Saved</p>\n <h2>{{this.dashboardData?.saved_recommended_courses_count}}</h2>\n <!-- <p class=\"card-subtitle\">{{this.dashboardData?.saved_recommended_courses_count}} of 8500\n recommendations</p> -->\n </div>\n <mat-icon class=\"icon teal\">save</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- GAP ANALYSIS -->\n <div class=\"gap-section\">\n <h2 class=\"section-title warning\">\n <mat-icon>warning</mat-icon>\n Gap Analysis\n </h2>\n\n <div class=\"card-grid-alone\">\n\n <mat-card class=\"metric-card warning-bg\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Competencies Without Courses</p>\n <h2>{{this.dashboardData?.competencies_without_courses}}</h2>\n <p class=\"card-subtitle\">Unique competencies with no identified courses</p>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <!-- <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Manually Added Courses</p>\n <h2>-</h2>\n <p class=\"card-subtitle\">Competencies with user-added courses</p>\n </div>\n <mat-icon class=\"icon green\">add_circle</mat-icon>\n </div>\n </mat-card> -->\n\n </div>\n\n <div class=\"card-grid mt-2\">\n\n <mat-card class=\"metric-card warning-bg\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Behavioral Competencies Without Courses</p>\n <h2>{{this.dashboardData?.behavioral_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Functional Competencies Without Courses</p>\n <h2>{{this.dashboardData?.functional_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Domain Competencies Without Courses</p>\n <h2>{{this.dashboardData?.domain_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n </div>\n </div>\n\n <!-- OVERVIEW METRICS -->\n <h2 class=\"section-title\">\n <mat-icon>dashboard</mat-icon>\n Users and Role Mapping Metrics\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\" *ngIf=\"!isSuperAdmin\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Users (Credentials)</p>\n <h2>{{this.dashboardData?.total_users}}</h2>\n </div>\n <mat-icon class=\"icon primary\">public</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\" *ngIf=\"!isSuperAdmin\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Users with Role Mappings</p>\n <h2>{{this.dashboardData?.users_with_role_mappings}}</h2>\n <!-- <p class=\"card-subtitle\">Generated atleast 1 role mapping</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Designation/Role Mappings Generated</p>\n <h2>{{this.dashboardData?.total_role_mappings}}</h2>\n </div>\n <mat-icon class=\"icon green\">description</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Role Mappings</p>\n <h2>{{this.dashboardData?.unique_role_mappings}}</h2>\n <!-- <p class=\"card-subtitle\">10,000 unique of 50,000 total</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n </div>\n </div>\n</div>", styles: [".dashboard-wrapper{background:transparent;min-height:100vh;padding:24px 10px;margin:0 30px 0 60px}.dashboard-container{max-width:auto;margin:0 auto}.section-title{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:600;color:#000;margin:20px 0}.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px}.card-grid-alone{display:grid;grid-template-columns:repeat(1,1fr);gap:32px}.metric-card{padding:24px;border-radius:12px;box-shadow:none;border:1px solid #e5e7eb}.card-content{display:flex;justify-content:space-between;align-items:center}.card-title{font-size:14px;color:#6b7280;margin-bottom:6px}.metric-card h2{font-size:28px;font-weight:700;color:#000;margin:0}.card-subtitle{font-size:12px;color:#9ca3af;margin-top:6px}.icon{font-size:28px;width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center}.primary{color:#2563eb}.teal{color:#059669}.green{color:#16a34a}.purple{color:#9333ea}.orange{color:#f97316}.amber{color:#f59e0b}.red,.section-title.warning{color:#dc2626}.warning-card{background:#fdeaea;border:1px solid #f5c2c7}.filters-card{padding:20px 24px;border-radius:12px;border:1px solid #e5e7eb;box-shadow:none}.filters-header{display:flex;align-items:center;gap:8px;font-weight:600;margin-bottom:16px}.filters-row{display:flex;gap:24px;flex-wrap:wrap}.filters-row mat-form-field{flex:1;min-width:220px}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:#ccc}:host ::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:#1b4ca1;border-color:#1b4ca1!important}::ng-deep .select-search-panel .mat-option.mat-selected:not(.mat-option-disabled){background-color:#1b4ca1!important;color:#fff!important}:host ::ng-deep .mat-form-field-appearance-outline{border-radius:25px;border:1px solid #ccc}:host ::ng-deep .mat-form-field-focused .mat-form-field-appearance-outline{border-color:#1b4ca1!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:25px 0 0 25px;border:none!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-right:none!important;border:none!important;border-radius:0 25px 25px 0}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-gap{border:none!important;border-radius:25px}:host::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{background-color:transparent!important}.dashboard-container .mat-card{background-color:#fff}.gap-title{color:#b91c1c}.gap-section{background-color:#d926621a;padding:10px;border-radius:12px;border:1px solid #f5c2c7;margin:16px 0}.gap-card{background-color:#d926621a;border:1px solid #f8d7da}.gap-card h2{color:#dc2626}@media (max-width: 1200px){.card-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width: 768px){.card-grid{grid-template-columns:1fr}}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}.mat-select-panel mat-option{padding-top:10px}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}::ng-deep .select-with-search.mat-select-panel{padding-top:0;overflow:auto}::ng-deep .select-with-search .search-wrapper{position:sticky;top:0;z-index:10;background:#fff;padding:8px;border-bottom:1px solid #e0e0e0}::ng-deep .select-with-search .search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .select-with-search mat-option:first-of-type{margin-top:4px}::ng-deep .md-drppicker.ltr{min-width:500px!important}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.mb-10{margin-bottom:10px}.cursor-pointer{cursor:pointer}\n"] }]
8000
- }], ctorParameters: function () { return [{ type: i2.FormBuilder }, { type: SharedService }, { type: i3$1.MatSnackBar }, { type: i3.Router }]; } });
8100
+ args: [{ selector: 'app-dashboard', template: "<div class=\"dashboard-wrapper\">\n <div class=\"header\">\n <div class=\"sub-heading mt-10 mb-10 cursor-pointer\">\n <p (click)=\"routeToInitial()\"><mat-icon style=\"vertical-align: middle;\">arrow_back</mat-icon><span\n class=\"pl-10\">Back to Role Mapping Generation</span></p>\n </div>\n\n </div>\n <div class=\"dashboard-container\">\n\n <!-- FILTERS SECTION -->\n <form [formGroup]=\"filtersForm\" class=\"filters-form\">\n\n <mat-card class=\"filters-card\">\n <div class=\"filters-header\">\n <mat-icon>filter_list</mat-icon>\n <span>Filters</span>\n </div>\n\n <div class=\"filters-row\">\n <div>\n <label>Centre / State </label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n\n <mat-select formControlName=\"centreState\" [disabled]=\"!isSuperAdmin\"\n (selectionChange)=\"onMinistryTypeChange($event)\">\n <mat-option value=\"\">Select Center/State</mat-option>\n <mat-option value=\"ministry\">Center</mat-option>\n <mat-option value=\"state\">State</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div>\n <label>{{selectedMinistryType === 'ministry' ? 'Ministry':'State'}} </label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n <mat-select panelClass=\"select-with-search\" [disabled]=\"!isSuperAdmin\" multiple\n [placeholder]=\"selectedMinistryType === 'ministry' ? 'Select Ministry/ Department':'Select State'\"\n (selectionChange)=\"onMinistryChange($event)\" formControlName=\"ministries\"\n style=\"border-radius: 25px; background: white; width:100%\"\n (openedChange)=\"onOpened($event)\">\n <div class=\"search-wrapper\" *ngIf=\"panelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <!-- [selected]=\"selectedMinistryId === item?.identifier\" -->\n <mat-option [value]=\"item?.identifier\" *ngFor=\"let item of filteredList\"\n >{{item?.orgName}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div>\n <label>Department</label>\n <!-- Centre / State -->\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px;border: 1px solid #ccc;\">\n <mat-select #departmentSelect panelClass=\"select-with-search\" placeholder=\"Select Department\"\n [disabled]=\"!isSuperAdmin\" multiple formControlName=\"departments\"\n style=\"border-radius: 25px; background: white;\" (selectionChange)=\"onDepartmentChange()\"\n (openedChange)=\"onOpenedDepartment($event)\">\n <div class=\"search-wrapper\" *ngIf=\"departmentPanelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterDepartmentData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredDepartmentList\">{{item?.orgName}}</mat-option>\n <mat-option disabled *ngIf=\"departmentLoading\">Loading...</mat-option>\n <mat-option disabled\n *ngIf=\"!departmentLoading && !filteredDepartmentList?.length\">No department found</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n <!-- Date Range -->\n <div>\n <label>Date Range </label>\n <mat-form-field appearance=\"outline\">\n\n <input matInput ngxDaterangepickerMd formControlName=\"dateRange\" style=\"margin:10px\"\n placeholder=\"Select date range\" [autoApply]=\"true\" [linkedCalendars]=\"true\"\n [locale]=\"{ format: 'DD MMM YYYY' }\" />\n </mat-form-field>\n </div>\n\n\n </div>\n </mat-card>\n </form>\n\n <!-- OVERVIEW METRICS -->\n <h2 class=\"section-title\">\n <mat-icon>dashboard</mat-icon>\n Overview Metrics\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">States/Ministries which generated Role Mapping</p>\n <h2>{{this.dashboardData?.ministry_count}}</h2>\n <!-- <p class=\"card-subtitle\">At least 1 designation/role mapping</p> -->\n </div>\n <mat-icon class=\"icon primary\">public</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Departments which generated Role Mapping</p>\n <h2>{{this.dashboardData?.department_count}}</h2>\n <!-- <p class=\"card-subtitle\">At least 1 designation/role mapping</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Capacity Building Plans Created</p>\n <h2>{{this.dashboardData?.total_cbp_plan_count}}</h2>\n </div>\n <mat-icon class=\"icon green\">description</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- COMPETENCIES -->\n <h2 class=\"section-title\">\n <mat-icon>psychology</mat-icon>\n Competencies Recommended\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Behavioral Competencies</p>\n <h2>{{this.dashboardData?.behavioral_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon purple\">psychology</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Functional Competencies</p>\n <h2>{{this.dashboardData?.functional_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon teal\">settings</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Domain Competencies</p>\n <h2>{{this.dashboardData?.domain_competencies_count}}</h2>\n </div>\n <mat-icon class=\"icon orange\">tune</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- DOCUMENTS -->\n <h2 class=\"section-title\">\n <mat-icon>menu_book</mat-icon>\n Documents & Course Recommendations\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Documents Uploaded</p>\n <h2>{{this.dashboardData?.total_documents}}</h2>\n <!-- <p class=\"card-subtitle\">Min 1, Max 10 per role mapping</p> -->\n </div>\n <mat-icon class=\"icon amber\">upload_file</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Role Mappings with Course Recommendations</p>\n <h2>{{this.dashboardData?.role_mappings_with_recommendations}}</h2>\n <!-- <p class=\"card-subtitle\">8500 of 50,000 role mappings</p> -->\n </div>\n <mat-icon class=\"icon green\">menu_book</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Course Recommendations Saved</p>\n <h2>{{this.dashboardData?.saved_recommended_courses_count}}</h2>\n <!-- <p class=\"card-subtitle\">{{this.dashboardData?.saved_recommended_courses_count}} of 8500\n recommendations</p> -->\n </div>\n <mat-icon class=\"icon teal\">save</mat-icon>\n </div>\n </mat-card>\n\n </div>\n\n <!-- GAP ANALYSIS -->\n <div class=\"gap-section\">\n <h2 class=\"section-title warning\">\n <mat-icon>warning</mat-icon>\n Gap Analysis\n </h2>\n\n <div class=\"card-grid-alone\">\n\n <mat-card class=\"metric-card warning-bg\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Competencies Without Courses</p>\n <h2>{{this.dashboardData?.competencies_without_courses}}</h2>\n <p class=\"card-subtitle\">Unique competencies with no identified courses</p>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <!-- <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Manually Added Courses</p>\n <h2>-</h2>\n <p class=\"card-subtitle\">Competencies with user-added courses</p>\n </div>\n <mat-icon class=\"icon green\">add_circle</mat-icon>\n </div>\n </mat-card> -->\n\n </div>\n\n <div class=\"card-grid mt-2\">\n\n <mat-card class=\"metric-card warning-bg\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Behavioral Competencies Without Courses</p>\n <h2>{{this.dashboardData?.behavioral_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Functional Competencies Without Courses</p>\n <h2>{{this.dashboardData?.functional_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Domain Competencies Without Courses</p>\n <h2>{{this.dashboardData?.domain_without_courses}}</h2>\n </div>\n <mat-icon class=\"icon red\">cancel</mat-icon>\n </div>\n </mat-card>\n\n </div>\n </div>\n\n <!-- OVERVIEW METRICS -->\n <h2 class=\"section-title\">\n <mat-icon>dashboard</mat-icon>\n Users and Role Mapping Metrics\n </h2>\n\n <div class=\"card-grid\">\n\n <mat-card class=\"metric-card\" *ngIf=\"!isSuperAdmin\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Users (Credentials)</p>\n <h2>{{this.dashboardData?.total_users}}</h2>\n </div>\n <mat-icon class=\"icon primary\">public</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\" *ngIf=\"!isSuperAdmin\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Users with Role Mappings</p>\n <h2>{{this.dashboardData?.users_with_role_mappings}}</h2>\n <!-- <p class=\"card-subtitle\">Generated atleast 1 role mapping</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Total Designation/Role Mappings Generated</p>\n <h2>{{this.dashboardData?.total_role_mappings}}</h2>\n </div>\n <mat-icon class=\"icon green\">description</mat-icon>\n </div>\n </mat-card>\n\n <mat-card class=\"metric-card\">\n <div class=\"card-content\">\n <div>\n <p class=\"card-title\">Unique Role Mappings</p>\n <h2>{{this.dashboardData?.unique_role_mappings}}</h2>\n <!-- <p class=\"card-subtitle\">10,000 unique of 50,000 total</p> -->\n </div>\n <mat-icon class=\"icon teal\">apartment</mat-icon>\n </div>\n </mat-card>\n\n </div>\n </div>\n</div>", styles: [".dashboard-wrapper{background:transparent;min-height:100vh;padding:24px 10px;margin:0 30px 0 60px}.dashboard-container{max-width:auto;margin:0 auto}.section-title{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:600;color:#000;margin:20px 0}.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px}.card-grid-alone{display:grid;grid-template-columns:repeat(1,1fr);gap:32px}.metric-card{padding:24px;border-radius:12px;box-shadow:none;border:1px solid #e5e7eb}.card-content{display:flex;justify-content:space-between;align-items:center}.card-title{font-size:14px;color:#6b7280;margin-bottom:6px}.metric-card h2{font-size:28px;font-weight:700;color:#000;margin:0}.card-subtitle{font-size:12px;color:#9ca3af;margin-top:6px}.icon{font-size:28px;width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center}.primary{color:#2563eb}.teal{color:#059669}.green{color:#16a34a}.purple{color:#9333ea}.orange{color:#f97316}.amber{color:#f59e0b}.red,.section-title.warning{color:#dc2626}.warning-card{background:#fdeaea;border:1px solid #f5c2c7}.filters-card{padding:20px 24px;border-radius:12px;border:1px solid #e5e7eb;box-shadow:none}.filters-header{display:flex;align-items:center;gap:8px;font-weight:600;margin-bottom:16px}.filters-row{display:flex;gap:24px;flex-wrap:wrap}.filters-row mat-form-field{flex:1;min-width:220px}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{color:#ccc}:host ::ng-deep .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:#1b4ca1;border-color:#1b4ca1!important}::ng-deep .select-search-panel .mat-option.mat-selected:not(.mat-option-disabled){background-color:#1b4ca1!important;color:#fff!important}:host ::ng-deep .mat-form-field-appearance-outline{border-radius:25px;border:1px solid #ccc}:host ::ng-deep .mat-form-field-focused .mat-form-field-appearance-outline{border-color:#1b4ca1!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:25px 0 0 25px;border:none!important}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end{border-right:none!important;border:none!important;border-radius:0 25px 25px 0}:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-gap{border:none!important;border-radius:25px}:host::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix{background-color:transparent!important}.dashboard-container .mat-card{background-color:#fff}.gap-title{color:#b91c1c}.gap-section{background-color:#d926621a;padding:10px;border-radius:12px;border:1px solid #f5c2c7;margin:16px 0}.gap-card{background-color:#d926621a;border:1px solid #f8d7da}.gap-card h2{color:#dc2626}@media (max-width: 1200px){.card-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width: 768px){.card-grid{grid-template-columns:1fr}}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}.mat-select-panel mat-option{padding-top:10px}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}::ng-deep .select-with-search.mat-select-panel{padding-top:0;overflow:auto}::ng-deep .select-with-search .search-wrapper{position:sticky;top:0;z-index:10;background:#fff;padding:8px;border-bottom:1px solid #e0e0e0}::ng-deep .select-with-search .search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .select-with-search mat-option:first-of-type{margin-top:4px}::ng-deep .md-drppicker.ltr{min-width:500px!important}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.mb-10{margin-bottom:10px}.cursor-pointer{cursor:pointer}\n"] }]
8101
+ }], ctorParameters: function () { return [{ type: i2.FormBuilder }, { type: SharedService }, { type: i3$1.MatSnackBar }, { type: i3.Router }]; }, propDecorators: { departmentSelect: [{
8102
+ type: ViewChild,
8103
+ args: ['departmentSelect', { static: false }]
8104
+ }] } });
8001
8105
 
8002
8106
  class UpdateDesignationHierarchyComponent {
8003
8107
  constructor(http, sharedService, snackBar, cdr) {
@@ -11233,6 +11337,14 @@ class RoleMappingGenerationComponent {
11233
11337
  this.departmentPanelOpen = false;
11234
11338
  this.filteredList = [];
11235
11339
  this.filteredDepartmentList = [];
11340
+ this.departmentPageSize = 50;
11341
+ this.departmentOffset = 0;
11342
+ this.departmentHasMore = true;
11343
+ this.departmentLoading = false;
11344
+ this.departmentSearchQuery = '';
11345
+ this.departmentMinistryId = '';
11346
+ this.departmentSearchSubject = new Subject();
11347
+ this.departmentRequestId = 0;
11236
11348
  this.originalMinistryData = [];
11237
11349
  this.apiLoading = false;
11238
11350
  this.firstApiResponse = null;
@@ -11242,11 +11354,21 @@ class RoleMappingGenerationComponent {
11242
11354
  this.workAllocationOrderDocumentMissing = false;
11243
11355
  this.showWorkAllocationOrderDocumentMissing = false;
11244
11356
  this.destroy$ = new Subject();
11357
+ this.onDepartmentScroll = (event) => {
11358
+ const panel = event.target;
11359
+ if (panel.scrollTop + panel.clientHeight >= panel.scrollHeight - 60) {
11360
+ this.loadDepartments();
11361
+ }
11362
+ };
11245
11363
  this.router.routeReuseStrategy.shouldReuseRoute = () => false;
11246
11364
  this.dataSource = new MatTableDataSource([]);
11247
11365
  this.isMaintenancePage = window.location.href.includes('/maintenance');
11248
11366
  }
11249
11367
  ngOnInit() {
11368
+ this.departmentSearchSubject.pipe(debounceTime(300), distinctUntilChanged(), takeUntil(this.destroy$)).subscribe((query) => {
11369
+ this.departmentSearchQuery = query;
11370
+ this.loadDepartments(true);
11371
+ });
11250
11372
  this.login = this.sharedService.checkIfLogin();
11251
11373
  this.cbpFinalObj = this.sharedService.getCBPPlanLocalStorage();
11252
11374
  if (this.cbpFinalObj && this.cbpFinalObj?.ministry && this.cbpFinalObj?.ministry?.sbOrgType) {
@@ -11416,11 +11538,8 @@ class RoleMappingGenerationComponent {
11416
11538
  else if (this.cbpFinalObj?.ministry?.sbOrgType === 'state') {
11417
11539
  this.selectedMinistryType = this.cbpFinalObj?.ministry?.sbOrgType;
11418
11540
  await this.getMinistryData();
11419
- await this.sharedService.getDepartmentList(this.cbpFinalObj?.ministry?.identifier).subscribe((res) => {
11420
- this.departmentData = res;
11421
- this.filteredDepartmentList = res;
11422
- console.log('this.filteredDepartmentList --', this.filteredDepartmentList);
11423
- });
11541
+ this.departmentMinistryId = this.cbpFinalObj?.ministry?.identifier;
11542
+ this.loadDepartments(true);
11424
11543
  if (this.ministryData && this.ministryData.length) {
11425
11544
  this.selectedMinistryId = this.cbpFinalObj?.ministry?.identifier;
11426
11545
  }
@@ -11649,28 +11768,11 @@ class RoleMappingGenerationComponent {
11649
11768
  this.sharedService.cbpPlanFinalObj['role_mapping_generation'] = [];
11650
11769
  this.sharedService.roleMappingGenerationData = [];
11651
11770
  localStorage.setItem('cbpPlanFinalObj', JSON.stringify(this.sharedService.cbpPlanFinalObj));
11652
- if (selectedMinistryId && this.selectedMinistryType === 'state') {
11653
- this.sharedService.getDepartmentList(selectedMinistryId).subscribe((res) => {
11654
- this.departmentData = res;
11655
- this.filteredDepartmentList = res;
11656
- });
11657
- }
11658
- if (selectedMinistryId && this.selectedMinistryType === 'ministry') {
11659
- this.sharedService.getCenterBasedDepartment(selectedMinistryId).subscribe((res) => {
11660
- if (res?.length) {
11661
- this.departmentData = res;
11662
- this.filteredDepartmentList = res;
11663
- }
11664
- else {
11665
- this.snackBar.open('No Department Found for Selected Ministry', 'X', {
11666
- duration: 3000,
11667
- panelClass: ['snackbar-error']
11668
- });
11669
- this.sharedService.cbpPlanFinalObj['department_name'] = '';
11670
- this.sharedService.cbpPlanFinalObj['departments'] = '';
11671
- localStorage.setItem('cbpPlanFinalObj', JSON.stringify(this.sharedService.cbpPlanFinalObj));
11672
- }
11673
- });
11771
+ if (selectedMinistryId && (this.selectedMinistryType === 'state' || this.selectedMinistryType === 'ministry')) {
11772
+ this.departmentMinistryId = selectedMinistryId;
11773
+ this.departmentSearchQuery = '';
11774
+ this.filteredDepartmentList = [];
11775
+ this.loadDepartments(true);
11674
11776
  }
11675
11777
  this.getUploadedDocuments();
11676
11778
  }
@@ -12071,7 +12173,89 @@ class RoleMappingGenerationComponent {
12071
12173
  }
12072
12174
  onOpenedDepartment(opened) {
12073
12175
  this.departmentPanelOpen = opened;
12176
+ if (opened) {
12177
+ setTimeout(() => {
12178
+ if (this.departmentSelect && this.departmentSelect.panel && this.departmentSelect.panel.nativeElement) {
12179
+ this.departmentSelect.panel.nativeElement.addEventListener('scroll', this.onDepartmentScroll);
12180
+ }
12181
+ });
12182
+ }
12183
+ else if (this.departmentSearchQuery) {
12184
+ // panel closed with an active search: reset so the list matches the cleared search box on reopen
12185
+ this.departmentSearchSubject.next('');
12186
+ }
12187
+ }
12188
+ loadDepartments(reset = false) {
12189
+ if (!this.departmentMinistryId) {
12190
+ return;
12191
+ }
12192
+ if (!reset && (this.departmentLoading || !this.departmentHasMore)) {
12193
+ return;
12194
+ }
12195
+ if (reset) {
12196
+ this.departmentOffset = 0;
12197
+ this.departmentHasMore = true;
12198
+ }
12199
+ const requestId = ++this.departmentRequestId;
12200
+ this.departmentLoading = true;
12201
+ const options = {
12202
+ limit: this.departmentPageSize,
12203
+ offset: this.departmentOffset,
12204
+ query: this.departmentSearchQuery
12205
+ };
12206
+ const request = this.selectedMinistryType === 'ministry'
12207
+ ? this.sharedService.getCenterBasedDepartment(this.departmentMinistryId, options)
12208
+ : this.sharedService.getDepartmentList(this.departmentMinistryId, options);
12209
+ request.subscribe({
12210
+ next: (res) => {
12211
+ if (requestId !== this.departmentRequestId) {
12212
+ return;
12213
+ }
12214
+ this.departmentLoading = false;
12215
+ const items = Array.isArray(res) ? res : (res?.items || res?.data || []);
12216
+ this.departmentHasMore = items.length === this.departmentPageSize;
12217
+ this.departmentOffset += items.length;
12218
+ items.forEach((item) => {
12219
+ if (!this.departmentData.some(d => d?.identifier === item?.identifier)) {
12220
+ this.departmentData.push(item);
12221
+ }
12222
+ });
12223
+ this.filteredDepartmentList = reset ? items : [...this.filteredDepartmentList, ...items];
12224
+ // this.ensureSelectedDepartmentOption()
12225
+ if (reset && !items.length && !this.departmentSearchQuery && this.selectedMinistryType === 'ministry') {
12226
+ this.snackBar.open('No Department Found for Selected Ministry', 'X', {
12227
+ duration: 3000,
12228
+ panelClass: ['snackbar-error']
12229
+ });
12230
+ this.sharedService.cbpPlanFinalObj['department_name'] = '';
12231
+ this.sharedService.cbpPlanFinalObj['departments'] = '';
12232
+ localStorage.setItem('cbpPlanFinalObj', JSON.stringify(this.sharedService.cbpPlanFinalObj));
12233
+ }
12234
+ },
12235
+ error: () => {
12236
+ if (requestId !== this.departmentRequestId) {
12237
+ return;
12238
+ }
12239
+ this.departmentLoading = false;
12240
+ }
12241
+ });
12074
12242
  }
12243
+ // keeps the selected department visible in the panel even when the current
12244
+ // search/page from the server does not include it
12245
+ // ensureSelectedDepartmentOption() {
12246
+ // const selectedId = this.roleMappingForm?.get('departments')?.value
12247
+ // if (!selectedId || Array.isArray(selectedId)) {
12248
+ // return
12249
+ // }
12250
+ // if (this.filteredDepartmentList.some(d => d?.identifier === selectedId)) {
12251
+ // return
12252
+ // }
12253
+ // const selected = this.departmentData.find(d => d?.identifier === selectedId)
12254
+ // || (this.cbpFinalObj?.department_name ? { identifier: selectedId, orgName: this.cbpFinalObj.department_name } : null)
12255
+ // if (selected) {
12256
+ // this.filteredDepartmentList = [selected, ...this.filteredDepartmentList]
12257
+ // }
12258
+ // }
12075
12259
  filterData(event) {
12076
12260
  if (event && event.target && event.target.value) {
12077
12261
  const s = event.target.value.toLowerCase();
@@ -12082,17 +12266,14 @@ class RoleMappingGenerationComponent {
12082
12266
  }
12083
12267
  }
12084
12268
  filterDepartmentData(event) {
12085
- if (event && event.target && event.target.value) {
12086
- const s = event.target.value.toLowerCase();
12087
- this.filteredDepartmentList = this.departmentData.filter(x => x.orgName.toLowerCase().includes(s));
12088
- }
12089
- else {
12090
- this.filteredDepartmentList = this.departmentData;
12091
- }
12269
+ const value = event && event.target && event.target.value ? event.target.value : '';
12270
+ this.departmentSearchSubject.next(value.trim());
12092
12271
  }
12093
12272
  ngOnDestroy() {
12094
12273
  this.selectedMinistryId = '';
12095
12274
  this.roleMappingForm.reset();
12275
+ this.destroy$.next();
12276
+ this.destroy$.complete();
12096
12277
  }
12097
12278
  onDepartmentChange() {
12098
12279
  const formData = this.roleMappingForm.value;
@@ -12154,11 +12335,11 @@ class RoleMappingGenerationComponent {
12154
12335
  });
12155
12336
  }
12156
12337
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleMappingGenerationComponent, deps: [{ token: EventService }, { token: SharedService }, { token: i2.FormBuilder }, { token: i3$1.MatSnackBar }, { token: i1$1.MatDialog }, { token: RoleMappingService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
12157
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RoleMappingGenerationComponent, selector: "app-role-mapping-generation", inputs: { loginStatusFlag: "loginStatusFlag" }, outputs: { successRoleMapping: "successRoleMapping", alreadyAvailableRoleMapping: "alreadyAvailableRoleMapping", loginSuccess: "loginSuccess" }, viewQueries: [{ propertyName: "pdfContent", first: true, predicate: ["pdfContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"container\">\n <!-- <input class=\"btn-active\" type=\"button\" value=\"Download as PDF\" (click)=\"downloadPDF()\" /> -->\n <div class=\"logo-container\" *ngIf=\"login\">\n <div>\n <span class=\"ai-loader-icon-medium\"><img src=\"assets/icons/ai-loader.gif\"></span>\n </div>\n <div>\n <h2 class=\"highlight-ai\">\n <span>iGOT AI Driven CBP</span>\n </h2>\n </div>\n <!-- <div class=\"sub-heading\">\n <p>Build Your Capacity With Customized Role Mapping</p>\n </div> -->\n </div>\n <mat-card *ngIf=\"login && roleMappingForm\" class=\"mt-2\" [formGroup]=\"roleMappingForm\">\n <div class=\"depatment-container\">\n <!-- <div class=\"section-header\">-->\n <!-- <div class=\"sub-heading\">-->\n <!-- <p>Choose Your Department</p>-->\n <!-- </div>-->\n <!-- </div>-->\n\n <div class=\"radio-group mt-4\">\n <mat-radio-group class=\"radio-btn-group\" formControlName=\"ministryType\"\n [(ngModel)]=\"selectedMinistryType\" (change)=\"onMinistryTypeChange($event)\">\n\n <!-- Left radio button -->\n <mat-radio-button value=\"ministry\" class=\"radio-btn left-radio\">\n <span class=\"radio-label\">\n <!-- <mat-icon class=\"radio-icon\" [ngClass]=\"selectedMinistryType === 'center'? 'checked-label':''\">domain</mat-icon> -->\n <span [ngClass]=\"selectedMinistryType === 'ministry'? 'checked-label':''\">Centre</span>\n </span>\n </mat-radio-button>\n\n <!-- Right radio button -->\n <mat-radio-button value=\"state\" class=\"radio-btn right-radio\">\n <span class=\"radio-label\">\n <!-- <mat-icon class=\"radio-icon\" [ngClass]=\"selectedMinistryType === 'state'? 'checked-label':''\">location_on</mat-icon> -->\n <span [ngClass]=\"selectedMinistryType === 'state'? 'checked-label':''\">State</span>\n </span>\n </mat-radio-button>\n\n </mat-radio-group>\n </div>\n <div class=\"mt-4\">\n\n <label class=\"label\">\n <span *ngIf=\"selectedMinistryType === 'ministry'\">Ministry</span>\n <span *ngIf=\"selectedMinistryType === 'state'\">State</span>\n </label>\n <div class=\"mt-2 search-box-with-select\">\n\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n <mat-select panelClass=\"select-with-search\"\n [placeholder]=\"selectedMinistryType === 'ministry' ? 'Select Ministry/ Department':'Select State'\"\n (selectionChange)=\"onMinistryChange($event)\" formControlName=\"ministry\"\n style=\"border-radius: 25px; background: white; width:100%\"\n (openedChange)=\"onOpened($event)\">\n <div class=\"search-wrapper\" *ngIf=\"panelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <!-- [selected]=\"selectedMinistryId === item?.identifier\" -->\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredList\">{{item?.orgName}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <div class=\"mt-4\" *ngIf=\"departmentData?.length\">\n <label class=\"label\">Department</label>\n <div class=\"mt-2\">\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px;border: 1px solid #ccc;\">\n <mat-select panelClass=\"select-with-search\" placeholder=\"Select Department\"\n formControlName=\"departments\" style=\"border-radius: 25px; background: white;\"\n (selectionChange)=\"onDepartmentChange()\" (openedChange)=\"onOpenedDepartment($event)\">\n <div class=\"search-wrapper\" *ngIf=\"departmentPanelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterDepartmentData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredDepartmentList\">{{item?.orgName}}</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n </div>\n <!-- <div class=\"mt-4\">\n <label class=\"label\">Sector</label>\n <div>\n <mat-form-field appearance=\"fill\" style=\"background: white; border-radius: 25px; padding: 0 12px;\">\n <mat-select placeholder=\"Select Sector\" multiple formControlName=\"sectors\"\n style=\"border-radius: 25px; background: white;\">\n <mat-option [value]=\"item?.value\"\n *ngFor=\"let item of sectorData\">{{item?.value}}</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n </div> -->\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <div class=\"mt-4 additional-details\">\n <textarea rows=\"5\" placeholder=\"Additional details\" formControlName=\"additionalDetails\"></textarea>\n </div>\n <div class=\"mt-4\">\n\n <button [ngClass]=\"disableUploadDocument ? 'btn-active-primary-disable':'btn-active-primary'\" class=\"\"\n [disabled]=\"disableUploadDocument\" mat-raised-button color=\"primary\" (click)=\"goToUploadDocument()\">\n <mat-icon>upload</mat-icon> Manage Documents\n </button>\n </div>\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <!-- <div class=\"mt-4 section\" >\n <div class=\"sub-heading\">\n <p>Upload Document (PDF)</p>\n </div>\n <div class=\"file-upload-wrapper\">\n <label for=\"uploadDoc\" class=\"file-upload-label\">\n <span class=\"file-upload-icon\">\uD83D\uDCCE</span>\n <span *ngIf=\"!uploadedFile || uploadedFile.length === 0\">\n Choose up to 3 files (PDF/TXT)\n </span>\n <div *ngIf=\"uploadedFile?.length > 0\" class=\"file-list\">\n <div *ngFor=\"let file of uploadedFile; let i = index\" class=\"file-item\">\n {{ file.name }}\n <span class=\"remove-file-icon\" (click)=\"removeFile(i);$event.preventDefault()\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </label>\n <input\n id=\"uploadDoc\"\n type=\"file\"\n multiple\n (change)=\"onFileChange($event)\"\n hidden\n /> \n\n <small class=\"file-upload-hint\">Max file size: {{maxFileSizeMB}}MB</small>\n\n <input id=\"uploadDoc\" multiple type=\"file\" (change)=\"onFileChange($event)\"\n accept=\".pdf,.doc,.docx,.xls,.xlsx,.txt\" class=\"file-upload-input\" />\n\n <div *ngIf=\"uploadError\" class=\"error\">{{ uploadError }}</div>\n </div>\n </div> -->\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <!-- <div class=\"mt-2 section\">\n <div class=\"disclaimer-text\">\n <p>Disclaimer: Please do not upload any confidential documents. </p>\n </div>\n </div> -->\n <div class=\"mt-2\" *ngIf=\"documents?.length < 1 && !(roleMappingForm?.invalid) || showWorkAllocationOrderDocumentMissing\">\n <p><span style=\"font-size: .875rem;font-weight: bold;\">Note: </span>\n <span class=\"error\">Please upload the Work Allocation Order document to generate the Capacity Building Plan (CBP)</span>\n </p>\n </div>\n <!-- <div class=\"mt-2\" *ngIf=\"documents?.length > 0\">\n <p *ngIf=\"workAllocationOrderDocumentMissing\"><span style=\"font-size: .875rem;font-weight: bold;\">Note:\n </span>\n <span class=\"error\">Please upload the Work Allocation Order document to generate the Capacity\n Building Plan (CBP)</span>\n </p>\n </div> -->\n <div class=\"mt-4\">\n <input\n [disabled]=\"roleMappingForm?.invalid || (roleMappingForm.get('ministryType')?.value === 'state' && !roleMappingForm.get('departments')?.value) || loading || documents?.length < 1 \"\n [ngClass]=\"roleMappingForm?.invalid || (roleMappingForm.get('ministryType')?.value === 'state' && !roleMappingForm.get('departments')?.value) || loading || documents?.length < 1 ? 'btn-disable':'btn-active'\"\n type=\"button\" [value]=\"loading ? 'Generating CBP...' : 'Generate CBP'\"\n (click)=\"onGenerateRoleMapping()\" />\n </div>\n </div>\n </mat-card>\n\n</div>\n<!-- <div *ngIf=\"!login\">\n <app-login (success)=\"loginStatus($event)\"></app-login>\n </div> -->\n\n<div class=\"overlay-loader\" *ngIf=\"apiLoading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n</div>\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n <div class=\"loading-content\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n <div class=\"loading-text mt-3\">\n <p class=\"main-message\">{{ currentProcessingStage || 'Preparing CBP Plan generation...' }}</p>\n <div class=\"progress-details\">\n <div class=\"progress-indicator\" *ngIf=\"chunks.length > 0\">\n <div class=\"progress-bar-container\">\n <div class=\"progress-bar\" [style.width.%]=\"getDisplayProgressPercentage()\">\n </div>\n </div>\n <small class=\"progress-text\">{{ getDisplayProgressPercentage() }}% Complete</small>\n </div>\n <small class=\"time-estimate\">\n Real-time streaming in progress. This may take 2-3 minutes.\n </small>\n </div>\n </div>\n </div>\n</div>", styles: [".container{width:40%}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.radio-btn-group{display:flex;justify-content:space-between;border-radius:8px;padding:12px 16px;align-items:center;max-width:600px;margin:0 auto;gap:20px}.radio-btn{flex:1;display:flex;align-items:center;justify-content:center;padding:10px;border-radius:6px;transition:background-color .3s ease}.radio-btn,.radio-btn:hover{background-color:#eef2f7}.radio-label{display:flex;align-items:center;gap:6px;font-weight:500;font-size:16px}.radio-icon{font-size:24px;color:gray}.radio-label{color:#000;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:18px;font-style:normal;font-weight:700;line-height:150%}::ng-deep mat-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:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;border:none;outline:none;resize:none;box-shadow:none;border-radius:4px;border:1px solid #ccc}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:center}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:10px}.search-filter-section{display:flex;flex-direction:row;justify-content:space-between}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:15px;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}.outside-layer{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px 4px 4px 12px;border-left:2px solid #F8B861;background:#fde8cc;width:132px}.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:28px;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:60px;height:60px;flex-shrink:0}.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}.overlay-loader .loading-content{display:flex;flex-direction:column;align-items:center;text-align:center;background:#fff;padding:2rem;border-radius:8px;box-shadow:0 4px 12px #00000026}.overlay-loader .loading-content .loading-text{color:#1b4ca1;font-family:Lato,sans-serif;min-width:300px}.overlay-loader .loading-content .loading-text .main-message{margin:0 0 16px;font-size:18px;font-weight:600;text-align:center}.overlay-loader .loading-content .loading-text .progress-details{margin-top:16px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator{margin-bottom:12px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-bar-container{width:100%;height:8px;background-color:#e0e0e0;border-radius:4px;overflow:hidden;margin-bottom:8px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-bar-container .progress-bar{height:100%;background:linear-gradient(90deg,#1b4ca1,#2563eb);border-radius:4px;transition:width .5s ease-in-out}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-text{font-size:14px;font-weight:500;color:#1b4ca1;display:block;text-align:center}.overlay-loader .loading-content .loading-text .progress-details .time-estimate{color:#666;font-size:12px;font-style:italic;display:block;text-align:center;margin-top:8px}::ng-deep mat-option .mat-option-text{font-size:16px;color:#000;font-family:Lato}:host ::ng-deep mat-select .mat-select-placeholder{font-size:16px}:host mat-select .mat-select-value-text{font-size:16px!important}.logo-container{display:flex;justify-content:center;align-items:center;flex-direction:column}.depatment-container{background:#fff;border:1px solid rgba(27,76,161,.12);padding:5%;box-shadow:0 4px 6px #0000001a,0 8px 20px #00000026;border-radius:8px}.checked-label{color:#1b4ca1}.file-upload-wrapper{position:relative;margin:16px 0}.file-upload-label{display:inline-flex;align-items:center;padding:10px 16px;background-color:#1b4ca1;color:#fff;font-weight:500;cursor:pointer;transition:background-color .3s;-webkit-user-select:none;user-select:none;border-radius:8px}.file-upload-label:hover{background-color:#1b4ca1}.file-upload-icon{margin-right:8px;font-size:18px}.file-upload-input{display:none}.error{color:red;margin-top:6px;font-size:.875rem}.file-upload-hint{display:block;font-size:1rem;color:#000;font-family:Lato;font-size:14px;margin-top:4px;margin-bottom:8px}.disclaimer-text p{font-size:16px;font-family:Lato;font-weight:400}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}.mat-select-panel mat-option{padding-top:10px}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}::ng-deep .select-with-search.mat-select-panel{padding-top:0;overflow:auto}::ng-deep .select-with-search .search-wrapper{position:sticky;top:0;z-index:10;background:#fff;padding:8px;border-bottom:1px solid #e0e0e0}::ng-deep .select-with-search .search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .select-with-search mat-option:first-of-type{margin-top:4px}.btn-active-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.5;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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-primary{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #fff);color:#1b4ca1;text-align:center;border:1px solid #1B4CA1!important;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-primary-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.5;background:var(--Primary-KB-Primary-Light, #fff);color:#1b4ca1;text-align:center;border:1px solid #1B4CA1!important;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}\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: "component", type: i6.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { 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: "component", type: i8$1.MatLegacyButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i13$1.MatLegacyRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i13$1.MatLegacyRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { 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"] }] }); }
12338
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RoleMappingGenerationComponent, selector: "app-role-mapping-generation", inputs: { loginStatusFlag: "loginStatusFlag" }, outputs: { successRoleMapping: "successRoleMapping", alreadyAvailableRoleMapping: "alreadyAvailableRoleMapping", loginSuccess: "loginSuccess" }, viewQueries: [{ propertyName: "pdfContent", first: true, predicate: ["pdfContent"], descendants: true }, { propertyName: "departmentSelect", first: true, predicate: ["departmentSelect"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"container\">\n <!-- <input class=\"btn-active\" type=\"button\" value=\"Download as PDF\" (click)=\"downloadPDF()\" /> -->\n <div class=\"logo-container\" *ngIf=\"login\">\n <div>\n <span class=\"ai-loader-icon-medium\"><img src=\"assets/icons/ai-loader.gif\"></span>\n </div>\n <div>\n <h2 class=\"highlight-ai\">\n <span>iGOT AI Driven CBP</span>\n </h2>\n </div>\n <!-- <div class=\"sub-heading\">\n <p>Build Your Capacity With Customized Role Mapping</p>\n </div> -->\n </div>\n <mat-card *ngIf=\"login && roleMappingForm\" class=\"mt-2\" [formGroup]=\"roleMappingForm\">\n <div class=\"depatment-container\">\n <!-- <div class=\"section-header\">-->\n <!-- <div class=\"sub-heading\">-->\n <!-- <p>Choose Your Department</p>-->\n <!-- </div>-->\n <!-- </div>-->\n\n <div class=\"radio-group mt-4\">\n <mat-radio-group class=\"radio-btn-group\" formControlName=\"ministryType\"\n [(ngModel)]=\"selectedMinistryType\" (change)=\"onMinistryTypeChange($event)\">\n\n <!-- Left radio button -->\n <mat-radio-button value=\"ministry\" class=\"radio-btn left-radio\">\n <span class=\"radio-label\">\n <!-- <mat-icon class=\"radio-icon\" [ngClass]=\"selectedMinistryType === 'center'? 'checked-label':''\">domain</mat-icon> -->\n <span [ngClass]=\"selectedMinistryType === 'ministry'? 'checked-label':''\">Centre</span>\n </span>\n </mat-radio-button>\n\n <!-- Right radio button -->\n <mat-radio-button value=\"state\" class=\"radio-btn right-radio\">\n <span class=\"radio-label\">\n <!-- <mat-icon class=\"radio-icon\" [ngClass]=\"selectedMinistryType === 'state'? 'checked-label':''\">location_on</mat-icon> -->\n <span [ngClass]=\"selectedMinistryType === 'state'? 'checked-label':''\">State</span>\n </span>\n </mat-radio-button>\n\n </mat-radio-group>\n </div>\n <div class=\"mt-4\">\n\n <label class=\"label\">\n <span *ngIf=\"selectedMinistryType === 'ministry'\">Ministry</span>\n <span *ngIf=\"selectedMinistryType === 'state'\">State</span>\n </label>\n <div class=\"mt-2 search-box-with-select\">\n\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n <mat-select panelClass=\"select-with-search\"\n [placeholder]=\"selectedMinistryType === 'ministry' ? 'Select Ministry/ Department':'Select State'\"\n (selectionChange)=\"onMinistryChange($event)\" formControlName=\"ministry\"\n style=\"border-radius: 25px; background: white; width:100%\"\n (openedChange)=\"onOpened($event)\">\n <div class=\"search-wrapper\" *ngIf=\"panelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <!-- [selected]=\"selectedMinistryId === item?.identifier\" -->\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredList\">{{item?.orgName}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <div class=\"mt-4\" *ngIf=\"departmentData?.length\">\n <label class=\"label\">Department</label>\n <div class=\"mt-2\">\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px;border: 1px solid #ccc;\">\n <mat-select #departmentSelect panelClass=\"select-with-search\" placeholder=\"Select Department\"\n formControlName=\"departments\" style=\"border-radius: 25px; background: white;\"\n (selectionChange)=\"onDepartmentChange()\" (openedChange)=\"onOpenedDepartment($event)\">\n <div class=\"search-wrapper\" *ngIf=\"departmentPanelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterDepartmentData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredDepartmentList\">{{item?.orgName}}</mat-option>\n <mat-option disabled *ngIf=\"departmentLoading\">Loading...</mat-option>\n <mat-option disabled\n *ngIf=\"!departmentLoading && !filteredDepartmentList?.length\">No department found</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n </div>\n <!-- <div class=\"mt-4\">\n <label class=\"label\">Sector</label>\n <div>\n <mat-form-field appearance=\"fill\" style=\"background: white; border-radius: 25px; padding: 0 12px;\">\n <mat-select placeholder=\"Select Sector\" multiple formControlName=\"sectors\"\n style=\"border-radius: 25px; background: white;\">\n <mat-option [value]=\"item?.value\"\n *ngFor=\"let item of sectorData\">{{item?.value}}</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n </div> -->\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <div class=\"mt-4 additional-details\">\n <textarea rows=\"5\" placeholder=\"Additional details\" formControlName=\"additionalDetails\"></textarea>\n </div>\n <div class=\"mt-4\">\n\n <button [ngClass]=\"disableUploadDocument ? 'btn-active-primary-disable':'btn-active-primary'\" class=\"\"\n [disabled]=\"disableUploadDocument\" mat-raised-button color=\"primary\" (click)=\"goToUploadDocument()\">\n <mat-icon>upload</mat-icon> Manage Documents\n </button>\n </div>\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <!-- <div class=\"mt-4 section\" >\n <div class=\"sub-heading\">\n <p>Upload Document (PDF)</p>\n </div>\n <div class=\"file-upload-wrapper\">\n <label for=\"uploadDoc\" class=\"file-upload-label\">\n <span class=\"file-upload-icon\">\uD83D\uDCCE</span>\n <span *ngIf=\"!uploadedFile || uploadedFile.length === 0\">\n Choose up to 3 files (PDF/TXT)\n </span>\n <div *ngIf=\"uploadedFile?.length > 0\" class=\"file-list\">\n <div *ngFor=\"let file of uploadedFile; let i = index\" class=\"file-item\">\n {{ file.name }}\n <span class=\"remove-file-icon\" (click)=\"removeFile(i);$event.preventDefault()\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </label>\n <input\n id=\"uploadDoc\"\n type=\"file\"\n multiple\n (change)=\"onFileChange($event)\"\n hidden\n /> \n\n <small class=\"file-upload-hint\">Max file size: {{maxFileSizeMB}}MB</small>\n\n <input id=\"uploadDoc\" multiple type=\"file\" (change)=\"onFileChange($event)\"\n accept=\".pdf,.doc,.docx,.xls,.xlsx,.txt\" class=\"file-upload-input\" />\n\n <div *ngIf=\"uploadError\" class=\"error\">{{ uploadError }}</div>\n </div>\n </div> -->\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <!-- <div class=\"mt-2 section\">\n <div class=\"disclaimer-text\">\n <p>Disclaimer: Please do not upload any confidential documents. </p>\n </div>\n </div> -->\n <div class=\"mt-2\" *ngIf=\"documents?.length < 1 && !(roleMappingForm?.invalid) || showWorkAllocationOrderDocumentMissing\">\n <p><span style=\"font-size: .875rem;font-weight: bold;\">Note: </span>\n <span class=\"error\">Please upload the Work Allocation Order document to generate the Capacity Building Plan (CBP)</span>\n </p>\n </div>\n <!-- <div class=\"mt-2\" *ngIf=\"documents?.length > 0\">\n <p *ngIf=\"workAllocationOrderDocumentMissing\"><span style=\"font-size: .875rem;font-weight: bold;\">Note:\n </span>\n <span class=\"error\">Please upload the Work Allocation Order document to generate the Capacity\n Building Plan (CBP)</span>\n </p>\n </div> -->\n <div class=\"mt-4\">\n <input\n [disabled]=\"roleMappingForm?.invalid || (roleMappingForm.get('ministryType')?.value === 'state' && !roleMappingForm.get('departments')?.value) || loading || documents?.length < 1 \"\n [ngClass]=\"roleMappingForm?.invalid || (roleMappingForm.get('ministryType')?.value === 'state' && !roleMappingForm.get('departments')?.value) || loading || documents?.length < 1 ? 'btn-disable':'btn-active'\"\n type=\"button\" [value]=\"loading ? 'Generating CBP...' : 'Generate CBP'\"\n (click)=\"onGenerateRoleMapping()\" />\n </div>\n </div>\n </mat-card>\n\n</div>\n<!-- <div *ngIf=\"!login\">\n <app-login (success)=\"loginStatus($event)\"></app-login>\n </div> -->\n\n<div class=\"overlay-loader\" *ngIf=\"apiLoading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n</div>\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n <div class=\"loading-content\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n <div class=\"loading-text mt-3\">\n <p class=\"main-message\">{{ currentProcessingStage || 'Preparing CBP Plan generation...' }}</p>\n <div class=\"progress-details\">\n <div class=\"progress-indicator\" *ngIf=\"chunks.length > 0\">\n <div class=\"progress-bar-container\">\n <div class=\"progress-bar\" [style.width.%]=\"getDisplayProgressPercentage()\">\n </div>\n </div>\n <small class=\"progress-text\">{{ getDisplayProgressPercentage() }}% Complete</small>\n </div>\n <small class=\"time-estimate\">\n Real-time streaming in progress. This may take 2-3 minutes.\n </small>\n </div>\n </div>\n </div>\n</div>", styles: [".container{width:40%}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.radio-btn-group{display:flex;justify-content:space-between;border-radius:8px;padding:12px 16px;align-items:center;max-width:600px;margin:0 auto;gap:20px}.radio-btn{flex:1;display:flex;align-items:center;justify-content:center;padding:10px;border-radius:6px;transition:background-color .3s ease}.radio-btn,.radio-btn:hover{background-color:#eef2f7}.radio-label{display:flex;align-items:center;gap:6px;font-weight:500;font-size:16px}.radio-icon{font-size:24px;color:gray}.radio-label{color:#000;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:18px;font-style:normal;font-weight:700;line-height:150%}::ng-deep mat-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:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;border:none;outline:none;resize:none;box-shadow:none;border-radius:4px;border:1px solid #ccc}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:center}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:10px}.search-filter-section{display:flex;flex-direction:row;justify-content:space-between}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:15px;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}.outside-layer{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px 4px 4px 12px;border-left:2px solid #F8B861;background:#fde8cc;width:132px}.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:28px;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:60px;height:60px;flex-shrink:0}.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}.overlay-loader .loading-content{display:flex;flex-direction:column;align-items:center;text-align:center;background:#fff;padding:2rem;border-radius:8px;box-shadow:0 4px 12px #00000026}.overlay-loader .loading-content .loading-text{color:#1b4ca1;font-family:Lato,sans-serif;min-width:300px}.overlay-loader .loading-content .loading-text .main-message{margin:0 0 16px;font-size:18px;font-weight:600;text-align:center}.overlay-loader .loading-content .loading-text .progress-details{margin-top:16px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator{margin-bottom:12px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-bar-container{width:100%;height:8px;background-color:#e0e0e0;border-radius:4px;overflow:hidden;margin-bottom:8px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-bar-container .progress-bar{height:100%;background:linear-gradient(90deg,#1b4ca1,#2563eb);border-radius:4px;transition:width .5s ease-in-out}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-text{font-size:14px;font-weight:500;color:#1b4ca1;display:block;text-align:center}.overlay-loader .loading-content .loading-text .progress-details .time-estimate{color:#666;font-size:12px;font-style:italic;display:block;text-align:center;margin-top:8px}::ng-deep mat-option .mat-option-text{font-size:16px;color:#000;font-family:Lato}:host ::ng-deep mat-select .mat-select-placeholder{font-size:16px}:host mat-select .mat-select-value-text{font-size:16px!important}.logo-container{display:flex;justify-content:center;align-items:center;flex-direction:column}.depatment-container{background:#fff;border:1px solid rgba(27,76,161,.12);padding:5%;box-shadow:0 4px 6px #0000001a,0 8px 20px #00000026;border-radius:8px}.checked-label{color:#1b4ca1}.file-upload-wrapper{position:relative;margin:16px 0}.file-upload-label{display:inline-flex;align-items:center;padding:10px 16px;background-color:#1b4ca1;color:#fff;font-weight:500;cursor:pointer;transition:background-color .3s;-webkit-user-select:none;user-select:none;border-radius:8px}.file-upload-label:hover{background-color:#1b4ca1}.file-upload-icon{margin-right:8px;font-size:18px}.file-upload-input{display:none}.error{color:red;margin-top:6px;font-size:.875rem}.file-upload-hint{display:block;font-size:1rem;color:#000;font-family:Lato;font-size:14px;margin-top:4px;margin-bottom:8px}.disclaimer-text p{font-size:16px;font-family:Lato;font-weight:400}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}.mat-select-panel mat-option{padding-top:10px}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}::ng-deep .select-with-search.mat-select-panel{padding-top:0;overflow:auto}::ng-deep .select-with-search .search-wrapper{position:sticky;top:0;z-index:10;background:#fff;padding:8px;border-bottom:1px solid #e0e0e0}::ng-deep .select-with-search .search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .select-with-search mat-option:first-of-type{margin-top:4px}.btn-active-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.5;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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-primary{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #fff);color:#1b4ca1;text-align:center;border:1px solid #1B4CA1!important;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-primary-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.5;background:var(--Primary-KB-Primary-Light, #fff);color:#1b4ca1;text-align:center;border:1px solid #1B4CA1!important;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}\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: "component", type: i6.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { 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: "component", type: i8$1.MatLegacyButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i13$1.MatLegacyRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i13$1.MatLegacyRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { 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"] }] }); }
12158
12339
  }
12159
12340
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleMappingGenerationComponent, decorators: [{
12160
12341
  type: Component,
12161
- args: [{ selector: 'app-role-mapping-generation', template: "<div class=\"container\">\n <!-- <input class=\"btn-active\" type=\"button\" value=\"Download as PDF\" (click)=\"downloadPDF()\" /> -->\n <div class=\"logo-container\" *ngIf=\"login\">\n <div>\n <span class=\"ai-loader-icon-medium\"><img src=\"assets/icons/ai-loader.gif\"></span>\n </div>\n <div>\n <h2 class=\"highlight-ai\">\n <span>iGOT AI Driven CBP</span>\n </h2>\n </div>\n <!-- <div class=\"sub-heading\">\n <p>Build Your Capacity With Customized Role Mapping</p>\n </div> -->\n </div>\n <mat-card *ngIf=\"login && roleMappingForm\" class=\"mt-2\" [formGroup]=\"roleMappingForm\">\n <div class=\"depatment-container\">\n <!-- <div class=\"section-header\">-->\n <!-- <div class=\"sub-heading\">-->\n <!-- <p>Choose Your Department</p>-->\n <!-- </div>-->\n <!-- </div>-->\n\n <div class=\"radio-group mt-4\">\n <mat-radio-group class=\"radio-btn-group\" formControlName=\"ministryType\"\n [(ngModel)]=\"selectedMinistryType\" (change)=\"onMinistryTypeChange($event)\">\n\n <!-- Left radio button -->\n <mat-radio-button value=\"ministry\" class=\"radio-btn left-radio\">\n <span class=\"radio-label\">\n <!-- <mat-icon class=\"radio-icon\" [ngClass]=\"selectedMinistryType === 'center'? 'checked-label':''\">domain</mat-icon> -->\n <span [ngClass]=\"selectedMinistryType === 'ministry'? 'checked-label':''\">Centre</span>\n </span>\n </mat-radio-button>\n\n <!-- Right radio button -->\n <mat-radio-button value=\"state\" class=\"radio-btn right-radio\">\n <span class=\"radio-label\">\n <!-- <mat-icon class=\"radio-icon\" [ngClass]=\"selectedMinistryType === 'state'? 'checked-label':''\">location_on</mat-icon> -->\n <span [ngClass]=\"selectedMinistryType === 'state'? 'checked-label':''\">State</span>\n </span>\n </mat-radio-button>\n\n </mat-radio-group>\n </div>\n <div class=\"mt-4\">\n\n <label class=\"label\">\n <span *ngIf=\"selectedMinistryType === 'ministry'\">Ministry</span>\n <span *ngIf=\"selectedMinistryType === 'state'\">State</span>\n </label>\n <div class=\"mt-2 search-box-with-select\">\n\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n <mat-select panelClass=\"select-with-search\"\n [placeholder]=\"selectedMinistryType === 'ministry' ? 'Select Ministry/ Department':'Select State'\"\n (selectionChange)=\"onMinistryChange($event)\" formControlName=\"ministry\"\n style=\"border-radius: 25px; background: white; width:100%\"\n (openedChange)=\"onOpened($event)\">\n <div class=\"search-wrapper\" *ngIf=\"panelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <!-- [selected]=\"selectedMinistryId === item?.identifier\" -->\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredList\">{{item?.orgName}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <div class=\"mt-4\" *ngIf=\"departmentData?.length\">\n <label class=\"label\">Department</label>\n <div class=\"mt-2\">\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px;border: 1px solid #ccc;\">\n <mat-select panelClass=\"select-with-search\" placeholder=\"Select Department\"\n formControlName=\"departments\" style=\"border-radius: 25px; background: white;\"\n (selectionChange)=\"onDepartmentChange()\" (openedChange)=\"onOpenedDepartment($event)\">\n <div class=\"search-wrapper\" *ngIf=\"departmentPanelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterDepartmentData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredDepartmentList\">{{item?.orgName}}</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n </div>\n <!-- <div class=\"mt-4\">\n <label class=\"label\">Sector</label>\n <div>\n <mat-form-field appearance=\"fill\" style=\"background: white; border-radius: 25px; padding: 0 12px;\">\n <mat-select placeholder=\"Select Sector\" multiple formControlName=\"sectors\"\n style=\"border-radius: 25px; background: white;\">\n <mat-option [value]=\"item?.value\"\n *ngFor=\"let item of sectorData\">{{item?.value}}</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n </div> -->\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <div class=\"mt-4 additional-details\">\n <textarea rows=\"5\" placeholder=\"Additional details\" formControlName=\"additionalDetails\"></textarea>\n </div>\n <div class=\"mt-4\">\n\n <button [ngClass]=\"disableUploadDocument ? 'btn-active-primary-disable':'btn-active-primary'\" class=\"\"\n [disabled]=\"disableUploadDocument\" mat-raised-button color=\"primary\" (click)=\"goToUploadDocument()\">\n <mat-icon>upload</mat-icon> Manage Documents\n </button>\n </div>\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <!-- <div class=\"mt-4 section\" >\n <div class=\"sub-heading\">\n <p>Upload Document (PDF)</p>\n </div>\n <div class=\"file-upload-wrapper\">\n <label for=\"uploadDoc\" class=\"file-upload-label\">\n <span class=\"file-upload-icon\">\uD83D\uDCCE</span>\n <span *ngIf=\"!uploadedFile || uploadedFile.length === 0\">\n Choose up to 3 files (PDF/TXT)\n </span>\n <div *ngIf=\"uploadedFile?.length > 0\" class=\"file-list\">\n <div *ngFor=\"let file of uploadedFile; let i = index\" class=\"file-item\">\n {{ file.name }}\n <span class=\"remove-file-icon\" (click)=\"removeFile(i);$event.preventDefault()\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </label>\n <input\n id=\"uploadDoc\"\n type=\"file\"\n multiple\n (change)=\"onFileChange($event)\"\n hidden\n /> \n\n <small class=\"file-upload-hint\">Max file size: {{maxFileSizeMB}}MB</small>\n\n <input id=\"uploadDoc\" multiple type=\"file\" (change)=\"onFileChange($event)\"\n accept=\".pdf,.doc,.docx,.xls,.xlsx,.txt\" class=\"file-upload-input\" />\n\n <div *ngIf=\"uploadError\" class=\"error\">{{ uploadError }}</div>\n </div>\n </div> -->\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <!-- <div class=\"mt-2 section\">\n <div class=\"disclaimer-text\">\n <p>Disclaimer: Please do not upload any confidential documents. </p>\n </div>\n </div> -->\n <div class=\"mt-2\" *ngIf=\"documents?.length < 1 && !(roleMappingForm?.invalid) || showWorkAllocationOrderDocumentMissing\">\n <p><span style=\"font-size: .875rem;font-weight: bold;\">Note: </span>\n <span class=\"error\">Please upload the Work Allocation Order document to generate the Capacity Building Plan (CBP)</span>\n </p>\n </div>\n <!-- <div class=\"mt-2\" *ngIf=\"documents?.length > 0\">\n <p *ngIf=\"workAllocationOrderDocumentMissing\"><span style=\"font-size: .875rem;font-weight: bold;\">Note:\n </span>\n <span class=\"error\">Please upload the Work Allocation Order document to generate the Capacity\n Building Plan (CBP)</span>\n </p>\n </div> -->\n <div class=\"mt-4\">\n <input\n [disabled]=\"roleMappingForm?.invalid || (roleMappingForm.get('ministryType')?.value === 'state' && !roleMappingForm.get('departments')?.value) || loading || documents?.length < 1 \"\n [ngClass]=\"roleMappingForm?.invalid || (roleMappingForm.get('ministryType')?.value === 'state' && !roleMappingForm.get('departments')?.value) || loading || documents?.length < 1 ? 'btn-disable':'btn-active'\"\n type=\"button\" [value]=\"loading ? 'Generating CBP...' : 'Generate CBP'\"\n (click)=\"onGenerateRoleMapping()\" />\n </div>\n </div>\n </mat-card>\n\n</div>\n<!-- <div *ngIf=\"!login\">\n <app-login (success)=\"loginStatus($event)\"></app-login>\n </div> -->\n\n<div class=\"overlay-loader\" *ngIf=\"apiLoading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n</div>\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n <div class=\"loading-content\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n <div class=\"loading-text mt-3\">\n <p class=\"main-message\">{{ currentProcessingStage || 'Preparing CBP Plan generation...' }}</p>\n <div class=\"progress-details\">\n <div class=\"progress-indicator\" *ngIf=\"chunks.length > 0\">\n <div class=\"progress-bar-container\">\n <div class=\"progress-bar\" [style.width.%]=\"getDisplayProgressPercentage()\">\n </div>\n </div>\n <small class=\"progress-text\">{{ getDisplayProgressPercentage() }}% Complete</small>\n </div>\n <small class=\"time-estimate\">\n Real-time streaming in progress. This may take 2-3 minutes.\n </small>\n </div>\n </div>\n </div>\n</div>", styles: [".container{width:40%}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.radio-btn-group{display:flex;justify-content:space-between;border-radius:8px;padding:12px 16px;align-items:center;max-width:600px;margin:0 auto;gap:20px}.radio-btn{flex:1;display:flex;align-items:center;justify-content:center;padding:10px;border-radius:6px;transition:background-color .3s ease}.radio-btn,.radio-btn:hover{background-color:#eef2f7}.radio-label{display:flex;align-items:center;gap:6px;font-weight:500;font-size:16px}.radio-icon{font-size:24px;color:gray}.radio-label{color:#000;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:18px;font-style:normal;font-weight:700;line-height:150%}::ng-deep mat-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:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;border:none;outline:none;resize:none;box-shadow:none;border-radius:4px;border:1px solid #ccc}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:center}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:10px}.search-filter-section{display:flex;flex-direction:row;justify-content:space-between}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:15px;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}.outside-layer{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px 4px 4px 12px;border-left:2px solid #F8B861;background:#fde8cc;width:132px}.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:28px;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:60px;height:60px;flex-shrink:0}.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}.overlay-loader .loading-content{display:flex;flex-direction:column;align-items:center;text-align:center;background:#fff;padding:2rem;border-radius:8px;box-shadow:0 4px 12px #00000026}.overlay-loader .loading-content .loading-text{color:#1b4ca1;font-family:Lato,sans-serif;min-width:300px}.overlay-loader .loading-content .loading-text .main-message{margin:0 0 16px;font-size:18px;font-weight:600;text-align:center}.overlay-loader .loading-content .loading-text .progress-details{margin-top:16px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator{margin-bottom:12px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-bar-container{width:100%;height:8px;background-color:#e0e0e0;border-radius:4px;overflow:hidden;margin-bottom:8px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-bar-container .progress-bar{height:100%;background:linear-gradient(90deg,#1b4ca1,#2563eb);border-radius:4px;transition:width .5s ease-in-out}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-text{font-size:14px;font-weight:500;color:#1b4ca1;display:block;text-align:center}.overlay-loader .loading-content .loading-text .progress-details .time-estimate{color:#666;font-size:12px;font-style:italic;display:block;text-align:center;margin-top:8px}::ng-deep mat-option .mat-option-text{font-size:16px;color:#000;font-family:Lato}:host ::ng-deep mat-select .mat-select-placeholder{font-size:16px}:host mat-select .mat-select-value-text{font-size:16px!important}.logo-container{display:flex;justify-content:center;align-items:center;flex-direction:column}.depatment-container{background:#fff;border:1px solid rgba(27,76,161,.12);padding:5%;box-shadow:0 4px 6px #0000001a,0 8px 20px #00000026;border-radius:8px}.checked-label{color:#1b4ca1}.file-upload-wrapper{position:relative;margin:16px 0}.file-upload-label{display:inline-flex;align-items:center;padding:10px 16px;background-color:#1b4ca1;color:#fff;font-weight:500;cursor:pointer;transition:background-color .3s;-webkit-user-select:none;user-select:none;border-radius:8px}.file-upload-label:hover{background-color:#1b4ca1}.file-upload-icon{margin-right:8px;font-size:18px}.file-upload-input{display:none}.error{color:red;margin-top:6px;font-size:.875rem}.file-upload-hint{display:block;font-size:1rem;color:#000;font-family:Lato;font-size:14px;margin-top:4px;margin-bottom:8px}.disclaimer-text p{font-size:16px;font-family:Lato;font-weight:400}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}.mat-select-panel mat-option{padding-top:10px}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}::ng-deep .select-with-search.mat-select-panel{padding-top:0;overflow:auto}::ng-deep .select-with-search .search-wrapper{position:sticky;top:0;z-index:10;background:#fff;padding:8px;border-bottom:1px solid #e0e0e0}::ng-deep .select-with-search .search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .select-with-search mat-option:first-of-type{margin-top:4px}.btn-active-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.5;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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-primary{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #fff);color:#1b4ca1;text-align:center;border:1px solid #1B4CA1!important;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-primary-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.5;background:var(--Primary-KB-Primary-Light, #fff);color:#1b4ca1;text-align:center;border:1px solid #1B4CA1!important;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}\n"] }]
12342
+ args: [{ selector: 'app-role-mapping-generation', template: "<div class=\"container\">\n <!-- <input class=\"btn-active\" type=\"button\" value=\"Download as PDF\" (click)=\"downloadPDF()\" /> -->\n <div class=\"logo-container\" *ngIf=\"login\">\n <div>\n <span class=\"ai-loader-icon-medium\"><img src=\"assets/icons/ai-loader.gif\"></span>\n </div>\n <div>\n <h2 class=\"highlight-ai\">\n <span>iGOT AI Driven CBP</span>\n </h2>\n </div>\n <!-- <div class=\"sub-heading\">\n <p>Build Your Capacity With Customized Role Mapping</p>\n </div> -->\n </div>\n <mat-card *ngIf=\"login && roleMappingForm\" class=\"mt-2\" [formGroup]=\"roleMappingForm\">\n <div class=\"depatment-container\">\n <!-- <div class=\"section-header\">-->\n <!-- <div class=\"sub-heading\">-->\n <!-- <p>Choose Your Department</p>-->\n <!-- </div>-->\n <!-- </div>-->\n\n <div class=\"radio-group mt-4\">\n <mat-radio-group class=\"radio-btn-group\" formControlName=\"ministryType\"\n [(ngModel)]=\"selectedMinistryType\" (change)=\"onMinistryTypeChange($event)\">\n\n <!-- Left radio button -->\n <mat-radio-button value=\"ministry\" class=\"radio-btn left-radio\">\n <span class=\"radio-label\">\n <!-- <mat-icon class=\"radio-icon\" [ngClass]=\"selectedMinistryType === 'center'? 'checked-label':''\">domain</mat-icon> -->\n <span [ngClass]=\"selectedMinistryType === 'ministry'? 'checked-label':''\">Centre</span>\n </span>\n </mat-radio-button>\n\n <!-- Right radio button -->\n <mat-radio-button value=\"state\" class=\"radio-btn right-radio\">\n <span class=\"radio-label\">\n <!-- <mat-icon class=\"radio-icon\" [ngClass]=\"selectedMinistryType === 'state'? 'checked-label':''\">location_on</mat-icon> -->\n <span [ngClass]=\"selectedMinistryType === 'state'? 'checked-label':''\">State</span>\n </span>\n </mat-radio-button>\n\n </mat-radio-group>\n </div>\n <div class=\"mt-4\">\n\n <label class=\"label\">\n <span *ngIf=\"selectedMinistryType === 'ministry'\">Ministry</span>\n <span *ngIf=\"selectedMinistryType === 'state'\">State</span>\n </label>\n <div class=\"mt-2 search-box-with-select\">\n\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px; border: 1px solid #ccc;width: 100%;\">\n <mat-select panelClass=\"select-with-search\"\n [placeholder]=\"selectedMinistryType === 'ministry' ? 'Select Ministry/ Department':'Select State'\"\n (selectionChange)=\"onMinistryChange($event)\" formControlName=\"ministry\"\n style=\"border-radius: 25px; background: white; width:100%\"\n (openedChange)=\"onOpened($event)\">\n <div class=\"search-wrapper\" *ngIf=\"panelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <!-- [selected]=\"selectedMinistryId === item?.identifier\" -->\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredList\">{{item?.orgName}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <div class=\"mt-4\" *ngIf=\"departmentData?.length\">\n <label class=\"label\">Department</label>\n <div class=\"mt-2\">\n <mat-form-field appearance=\"fill\"\n style=\"background: white; border-radius: 25px; padding: 0 12px;border: 1px solid #ccc;\">\n <mat-select #departmentSelect panelClass=\"select-with-search\" placeholder=\"Select Department\"\n formControlName=\"departments\" style=\"border-radius: 25px; background: white;\"\n (selectionChange)=\"onDepartmentChange()\" (openedChange)=\"onOpenedDepartment($event)\">\n <div class=\"search-wrapper\" *ngIf=\"departmentPanelOpen\">\n <input type=\"text\" placeholder=\"Search...\" (input)=\"filterDepartmentData($event)\"\n class=\"search-input\" (keydown.space)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n </div>\n <mat-option [value]=\"item?.identifier\"\n *ngFor=\"let item of filteredDepartmentList\">{{item?.orgName}}</mat-option>\n <mat-option disabled *ngIf=\"departmentLoading\">Loading...</mat-option>\n <mat-option disabled\n *ngIf=\"!departmentLoading && !filteredDepartmentList?.length\">No department found</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n </div>\n <!-- <div class=\"mt-4\">\n <label class=\"label\">Sector</label>\n <div>\n <mat-form-field appearance=\"fill\" style=\"background: white; border-radius: 25px; padding: 0 12px;\">\n <mat-select placeholder=\"Select Sector\" multiple formControlName=\"sectors\"\n style=\"border-radius: 25px; background: white;\">\n <mat-option [value]=\"item?.value\"\n *ngFor=\"let item of sectorData\">{{item?.value}}</mat-option>\n\n </mat-select>\n </mat-form-field>\n </div>\n\n </div> -->\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <div class=\"mt-4 additional-details\">\n <textarea rows=\"5\" placeholder=\"Additional details\" formControlName=\"additionalDetails\"></textarea>\n </div>\n <div class=\"mt-4\">\n\n <button [ngClass]=\"disableUploadDocument ? 'btn-active-primary-disable':'btn-active-primary'\" class=\"\"\n [disabled]=\"disableUploadDocument\" mat-raised-button color=\"primary\" (click)=\"goToUploadDocument()\">\n <mat-icon>upload</mat-icon> Manage Documents\n </button>\n </div>\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <!-- <div class=\"mt-4 section\" >\n <div class=\"sub-heading\">\n <p>Upload Document (PDF)</p>\n </div>\n <div class=\"file-upload-wrapper\">\n <label for=\"uploadDoc\" class=\"file-upload-label\">\n <span class=\"file-upload-icon\">\uD83D\uDCCE</span>\n <span *ngIf=\"!uploadedFile || uploadedFile.length === 0\">\n Choose up to 3 files (PDF/TXT)\n </span>\n <div *ngIf=\"uploadedFile?.length > 0\" class=\"file-list\">\n <div *ngFor=\"let file of uploadedFile; let i = index\" class=\"file-item\">\n {{ file.name }}\n <span class=\"remove-file-icon\" (click)=\"removeFile(i);$event.preventDefault()\">\n <mat-icon>close</mat-icon>\n </span>\n </div>\n </div>\n </label>\n <input\n id=\"uploadDoc\"\n type=\"file\"\n multiple\n (change)=\"onFileChange($event)\"\n hidden\n /> \n\n <small class=\"file-upload-hint\">Max file size: {{maxFileSizeMB}}MB</small>\n\n <input id=\"uploadDoc\" multiple type=\"file\" (change)=\"onFileChange($event)\"\n accept=\".pdf,.doc,.docx,.xls,.xlsx,.txt\" class=\"file-upload-input\" />\n\n <div *ngIf=\"uploadError\" class=\"error\">{{ uploadError }}</div>\n </div>\n </div> -->\n <!-- *ngIf=\"roleMappingForm.get('ministryType')?.value === 'state'\" -->\n <!-- <div class=\"mt-2 section\">\n <div class=\"disclaimer-text\">\n <p>Disclaimer: Please do not upload any confidential documents. </p>\n </div>\n </div> -->\n <div class=\"mt-2\" *ngIf=\"documents?.length < 1 && !(roleMappingForm?.invalid) || showWorkAllocationOrderDocumentMissing\">\n <p><span style=\"font-size: .875rem;font-weight: bold;\">Note: </span>\n <span class=\"error\">Please upload the Work Allocation Order document to generate the Capacity Building Plan (CBP)</span>\n </p>\n </div>\n <!-- <div class=\"mt-2\" *ngIf=\"documents?.length > 0\">\n <p *ngIf=\"workAllocationOrderDocumentMissing\"><span style=\"font-size: .875rem;font-weight: bold;\">Note:\n </span>\n <span class=\"error\">Please upload the Work Allocation Order document to generate the Capacity\n Building Plan (CBP)</span>\n </p>\n </div> -->\n <div class=\"mt-4\">\n <input\n [disabled]=\"roleMappingForm?.invalid || (roleMappingForm.get('ministryType')?.value === 'state' && !roleMappingForm.get('departments')?.value) || loading || documents?.length < 1 \"\n [ngClass]=\"roleMappingForm?.invalid || (roleMappingForm.get('ministryType')?.value === 'state' && !roleMappingForm.get('departments')?.value) || loading || documents?.length < 1 ? 'btn-disable':'btn-active'\"\n type=\"button\" [value]=\"loading ? 'Generating CBP...' : 'Generate CBP'\"\n (click)=\"onGenerateRoleMapping()\" />\n </div>\n </div>\n </mat-card>\n\n</div>\n<!-- <div *ngIf=\"!login\">\n <app-login (success)=\"loginStatus($event)\"></app-login>\n </div> -->\n\n<div class=\"overlay-loader\" *ngIf=\"apiLoading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n</div>\n\n<div class=\"overlay-loader\" *ngIf=\"loading\">\n <div class=\"loading-content\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n <div class=\"loading-text mt-3\">\n <p class=\"main-message\">{{ currentProcessingStage || 'Preparing CBP Plan generation...' }}</p>\n <div class=\"progress-details\">\n <div class=\"progress-indicator\" *ngIf=\"chunks.length > 0\">\n <div class=\"progress-bar-container\">\n <div class=\"progress-bar\" [style.width.%]=\"getDisplayProgressPercentage()\">\n </div>\n </div>\n <small class=\"progress-text\">{{ getDisplayProgressPercentage() }}% Complete</small>\n </div>\n <small class=\"time-estimate\">\n Real-time streaming in progress. This may take 2-3 minutes.\n </small>\n </div>\n </div>\n </div>\n</div>", styles: [".container{width:40%}.sub-heading p{color:#000;font-family:Montserrat;font-size:18px;font-style:normal;font-weight:600;line-height:normal}.radio-btn-group{display:flex;justify-content:space-between;border-radius:8px;padding:12px 16px;align-items:center;max-width:600px;margin:0 auto;gap:20px}.radio-btn{flex:1;display:flex;align-items:center;justify-content:center;padding:10px;border-radius:6px;transition:background-color .3s ease}.radio-btn,.radio-btn:hover{background-color:#eef2f7}.radio-label{display:flex;align-items:center;gap:6px;font-weight:500;font-size:16px}.radio-icon{font-size:24px;color:gray}.radio-label{color:#000;font-family:Lato;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.label{color:var(--Body-Text-Body-Color, #212529);font-family:Lato;font-size:18px;font-style:normal;font-weight:700;line-height:150%}::ng-deep mat-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:#0006;font-family:Lato;font-size:14px;font-style:normal;font-weight:400;line-height:normal;border:none;outline:none;resize:none;box-shadow:none;border-radius:4px;border:1px solid #ccc}.section-header{display:flex;flex-direction:row;align-items:center;justify-content:center}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-group{display:flex;flex-direction:row;justify-content:space-between}.pl-2{padding-left:10px}.search-filter-section{display:flex;flex-direction:row;justify-content:space-between}.search .rsearch{position:relative}.search .search-icon{position:absolute;top:15px;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}.outside-layer{display:flex;padding:4px 12px;justify-content:center;align-items:center;gap:16px;border-radius:12px 4px 4px 12px;border-left:2px solid #F8B861;background:#fde8cc;width:132px}.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:28px;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:60px;height:60px;flex-shrink:0}.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}.overlay-loader .loading-content{display:flex;flex-direction:column;align-items:center;text-align:center;background:#fff;padding:2rem;border-radius:8px;box-shadow:0 4px 12px #00000026}.overlay-loader .loading-content .loading-text{color:#1b4ca1;font-family:Lato,sans-serif;min-width:300px}.overlay-loader .loading-content .loading-text .main-message{margin:0 0 16px;font-size:18px;font-weight:600;text-align:center}.overlay-loader .loading-content .loading-text .progress-details{margin-top:16px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator{margin-bottom:12px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-bar-container{width:100%;height:8px;background-color:#e0e0e0;border-radius:4px;overflow:hidden;margin-bottom:8px}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-bar-container .progress-bar{height:100%;background:linear-gradient(90deg,#1b4ca1,#2563eb);border-radius:4px;transition:width .5s ease-in-out}.overlay-loader .loading-content .loading-text .progress-details .progress-indicator .progress-text{font-size:14px;font-weight:500;color:#1b4ca1;display:block;text-align:center}.overlay-loader .loading-content .loading-text .progress-details .time-estimate{color:#666;font-size:12px;font-style:italic;display:block;text-align:center;margin-top:8px}::ng-deep mat-option .mat-option-text{font-size:16px;color:#000;font-family:Lato}:host ::ng-deep mat-select .mat-select-placeholder{font-size:16px}:host mat-select .mat-select-value-text{font-size:16px!important}.logo-container{display:flex;justify-content:center;align-items:center;flex-direction:column}.depatment-container{background:#fff;border:1px solid rgba(27,76,161,.12);padding:5%;box-shadow:0 4px 6px #0000001a,0 8px 20px #00000026;border-radius:8px}.checked-label{color:#1b4ca1}.file-upload-wrapper{position:relative;margin:16px 0}.file-upload-label{display:inline-flex;align-items:center;padding:10px 16px;background-color:#1b4ca1;color:#fff;font-weight:500;cursor:pointer;transition:background-color .3s;-webkit-user-select:none;user-select:none;border-radius:8px}.file-upload-label:hover{background-color:#1b4ca1}.file-upload-icon{margin-right:8px;font-size:18px}.file-upload-input{display:none}.error{color:red;margin-top:6px;font-size:.875rem}.file-upload-hint{display:block;font-size:1rem;color:#000;font-family:Lato;font-size:14px;margin-top:4px;margin-bottom:8px}.disclaimer-text p{font-size:16px;font-family:Lato;font-weight:400}.mat-select-panel .search-wrapper{width:100%!important;box-sizing:border-box;padding:8px;position:sticky;top:0;z-index:2;background:#fff}.search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}.mat-select-panel mat-option{padding-top:10px}::ng-deep .mat-select-panel-wrap{overflow:visible!important;padding:0;margin-top:42px}::ng-deep .mat-select-panel{border:1px solid #ccc!important;box-sizing:border-box;max-height:250px}::ng-deep .select-with-search.mat-select-panel{padding-top:0;overflow:auto}::ng-deep .select-with-search .search-wrapper{position:sticky;top:0;z-index:10;background:#fff;padding:8px;border-bottom:1px solid #e0e0e0}::ng-deep .select-with-search .search-input{width:100%;padding:6px 10px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box}::ng-deep .select-with-search mat-option:first-of-type{margin-top:4px}.btn-active-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.5;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:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-primary{border-radius:var(--Radius-Full-Round, 9999999px);opacity:1;background:var(--Primary-KB-Primary-Light, #fff);color:#1b4ca1;text-align:center;border:1px solid #1B4CA1!important;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}.btn-active-primary-disable{border-radius:var(--Radius-Full-Round, 9999999px);opacity:.5;background:var(--Primary-KB-Primary-Light, #fff);color:#1b4ca1;text-align:center;border:1px solid #1B4CA1!important;font-family:Lato;font-size:14px;font-style:normal;font-weight:700;line-height:normal;display:flex;height:48px;padding:0 16px;justify-content:center;align-items:center;gap:8px;border:none;width:100%}\n"] }]
12162
12343
  }], ctorParameters: function () { return [{ type: EventService }, { type: SharedService }, { type: i2.FormBuilder }, { type: i3$1.MatSnackBar }, { type: i1$1.MatDialog }, { type: RoleMappingService }, { type: i3.Router }]; }, propDecorators: { pdfContent: [{
12163
12344
  type: ViewChild,
12164
12345
  args: ['pdfContent', { static: false }]
@@ -12170,6 +12351,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
12170
12351
  type: Output
12171
12352
  }], loginSuccess: [{
12172
12353
  type: Output
12354
+ }], departmentSelect: [{
12355
+ type: ViewChild,
12356
+ args: ['departmentSelect', { static: false }]
12173
12357
  }] } });
12174
12358
 
12175
12359
  class DeleteRoleMappingComponent {