cat-documents-ng 0.2.94 → 0.2.96

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.
@@ -2,11 +2,11 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, EventEmitter, Output, ViewChild, Input, ViewEncapsulation, Component, HostListener, ChangeDetectionStrategy, Directive, NgModule, APP_INITIALIZER } from '@angular/core';
3
3
  import * as i2$1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import { firstValueFrom, tap, EMPTY, catchError, throwError, of, combineLatest, Subject, Observable, takeUntil, Subscription, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs';
6
- import { __decorate } from 'tslib';
7
- import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
5
+ import { firstValueFrom, EMPTY, tap, catchError, throwError, of, combineLatest, Subject, Observable, takeUntil, Subscription, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs';
8
6
  import * as i2 from '@angular/common/http';
9
7
  import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
8
+ import { __decorate } from 'tslib';
9
+ import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
10
10
  import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
11
11
  import { trigger, state, transition, style, animate } from '@angular/animations';
12
12
  import * as i3 from 'primeng/api';
@@ -34,8 +34,6 @@ import * as i7 from 'primeng/inputtext';
34
34
  import { InputTextModule } from 'primeng/inputtext';
35
35
  import * as i2$2 from 'primeng/table';
36
36
  import { TableModule } from 'primeng/table';
37
- import * as i5$1 from 'primeng/ripple';
38
- import { RippleModule } from 'primeng/ripple';
39
37
  import * as i6$1 from 'ng2-pdf-viewer';
40
38
  import { PdfViewerModule } from 'ng2-pdf-viewer';
41
39
  import * as i3$2 from 'primeng/accordion';
@@ -54,6 +52,7 @@ import { ListboxModule } from 'primeng/listbox';
54
52
  import { TimelineModule } from 'primeng/timeline';
55
53
  import { CheckboxModule } from 'primeng/checkbox';
56
54
  import { PanelMenuModule } from 'primeng/panelmenu';
55
+ import { RippleModule } from 'primeng/ripple';
57
56
  import { ToastModule } from 'primeng/toast';
58
57
  import { MessageModule } from 'primeng/message';
59
58
 
@@ -308,6 +307,7 @@ class SHARED {
308
307
  static COMMA = ',';
309
308
  static TEAM_LEADER = 'TeamLeader';
310
309
  static UNDERWRITER_USER = 'Underwriter User';
310
+ static INITIAL_REQUEST = 'Initial Request';
311
311
  static Menu = [
312
312
  {
313
313
  label: 'Applicant',
@@ -897,6 +897,127 @@ class ERRORS {
897
897
  static ERROR_CALLING_API_WITH_SELECTION = 'Error calling API with selection:';
898
898
  }
899
899
 
900
+ /**
901
+ * Class that holds the URLs used throughout the application.
902
+ * These URLs are typically used for making API requests and accessing various resources.
903
+ * @class URLS
904
+ * @typedef {URLS}
905
+ */
906
+ class URLS {
907
+ /**
908
+ * The URL to fetch the application configuration file.
909
+ * This JSON file typically contains settings and options for the application.
910
+ * @static
911
+ * @type {string}
912
+ */
913
+ static CONFIGFILEURL = "assets/config/api.config.json";
914
+ /**
915
+ * The URL endpoint for document uploads.
916
+ * Used to send documents to the server for storage or processing.
917
+ * @static
918
+ * @type {string}
919
+ */
920
+ static DOCUMENT_UPLOAD_FILE = "documents/uploadFile";
921
+ /**
922
+ * The URL endpoint for document uploads.
923
+ * Used to send documents to the server for storage or processing.
924
+ * @static
925
+ * @type {string}
926
+ */
927
+ static DOCUMENT_UPLOAD = "Documents";
928
+ /**
929
+ * The URL endpoint for document uploads.
930
+ * Used to send documents to the server for storage or processing.
931
+ * @static
932
+ * @type {string}
933
+ */
934
+ static DOCUMENTS = "documents";
935
+ /**
936
+ * The URL endpoint for document uploads.
937
+ * Used to send documents to the server for storage or processing.
938
+ * @static
939
+ * @type {string}
940
+ */
941
+ static DOCUMENTS_CATAGORIES = "documents/getAllCategoriesByApplicationId";
942
+ /**
943
+ * The query parameter to pass a context ID in API requests.
944
+ * Used to specify the context for certain API calls, such as filtering or scoping the request.
945
+ * @static
946
+ * @type {string}
947
+ */
948
+ static CONTEXT = "?contextId=";
949
+ /**
950
+ * The query parameter to pass a document ID in API requests.
951
+ * @static
952
+ * @type {string}
953
+ */
954
+ static DOCUMENT_TYPES = "documentTypes";
955
+ /**
956
+ * The URL endpoint for getting categories by source (Applicant/Application).
957
+ * Used to fetch document categories based on the selected source.
958
+ * @static
959
+ * @type {string}
960
+ */
961
+ static GET_CATEGORIES_BY_SOURCE = "documentTypes/getAllCategoriesBySource/";
962
+ /**
963
+ * The URL endpoint for getting document types by category ID.
964
+ * Used to fetch document types based on the selected category.
965
+ * @static
966
+ * @type {string}
967
+ */
968
+ static GET_DOCUMENT_TYPES_BY_CATEGORY = "documentTypes/getAllDocumentTypesByCategoryId/";
969
+ /**
970
+ * The URL endpoint for saving document upload data.
971
+ * Used to save the complete document upload information.
972
+ * @static
973
+ * @type {string}
974
+ */
975
+ static SAVE_DOCUMENT_UPLOAD = "documents/create";
976
+ /**
977
+ * The query parameter to pass a context ID in API requests.
978
+ * @static
979
+ * @type {string}
980
+ */
981
+ static FOLDERS = "/folders?contextId=";
982
+ /**
983
+ * The query parameter to pass a document ID in API requests.
984
+ * @static
985
+ * @type {string}
986
+ */
987
+ static ALERT_BY_DOCUMENT_ID = "alerts?documentId=";
988
+ /**
989
+ * The query parameter to pass a document ID in API requests.
990
+ * @static
991
+ * @type {string}
992
+ */
993
+ static PARENT_DOCUMENT_TYPE_ID = "parentDocumentType?parentDocumentTypeId=";
994
+ /**
995
+ * The query parameter to pass a document ID in API requests.
996
+ * @static
997
+ * @type {string}
998
+ */
999
+ static USERLIST = "documents/getContextIdListByApplicationId/";
1000
+ /**
1001
+ * The URL endpoint for getting document status count by context ID.
1002
+ * Used to fetch status data with applicationId, contextId, and category parameters.
1003
+ * @static
1004
+ * @type {string}
1005
+ */
1006
+ static STATUS_DOCUMENT_COUNT = "documents/getStatusDocumentCountByContextId/";
1007
+ /**
1008
+ * The query parameter to pass a context ID in API requests.
1009
+ * Used to specify the context for certain API calls, such as filtering or scoping the request.
1010
+ * @static
1011
+ * @type {string}
1012
+ */
1013
+ static CONTEXT_ID = "&contextId=";
1014
+ static GETALL = "documents/getAllByContextId";
1015
+ static DOCUMENT_LIST = "list";
1016
+ static DOCUMENT_HISTORY = "documents/getDocumentHistoryByDocumentId/";
1017
+ static DELETE_DOCUMENT = "documents/deleteDocumentByDocumentId/";
1018
+ static UPDATE_DOCUMENT_STATUS = "documents/updateDocumentStatusByDocumentId/";
1019
+ }
1020
+
900
1021
  /**
901
1022
  * Creates the initial state for the `DocumentState` store.
902
1023
  * This function provides default values for all properties in the `DocumentState` interface,
@@ -1091,127 +1212,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1091
1212
  args: [{ providedIn: 'root' }]
1092
1213
  }], ctorParameters: () => [] });
1093
1214
 
1094
- /**
1095
- * Class that holds the URLs used throughout the application.
1096
- * These URLs are typically used for making API requests and accessing various resources.
1097
- * @class URLS
1098
- * @typedef {URLS}
1099
- */
1100
- class URLS {
1101
- /**
1102
- * The URL to fetch the application configuration file.
1103
- * This JSON file typically contains settings and options for the application.
1104
- * @static
1105
- * @type {string}
1106
- */
1107
- static CONFIGFILEURL = "assets/config/api.config.json";
1108
- /**
1109
- * The URL endpoint for document uploads.
1110
- * Used to send documents to the server for storage or processing.
1111
- * @static
1112
- * @type {string}
1113
- */
1114
- static DOCUMENT_UPLOAD_FILE = "documents/uploadFile";
1115
- /**
1116
- * The URL endpoint for document uploads.
1117
- * Used to send documents to the server for storage or processing.
1118
- * @static
1119
- * @type {string}
1120
- */
1121
- static DOCUMENT_UPLOAD = "Documents";
1122
- /**
1123
- * The URL endpoint for document uploads.
1124
- * Used to send documents to the server for storage or processing.
1125
- * @static
1126
- * @type {string}
1127
- */
1128
- static DOCUMENTS = "documents";
1129
- /**
1130
- * The URL endpoint for document uploads.
1131
- * Used to send documents to the server for storage or processing.
1132
- * @static
1133
- * @type {string}
1134
- */
1135
- static DOCUMENTS_CATAGORIES = "documents/getAllCategoriesByApplicationId";
1136
- /**
1137
- * The query parameter to pass a context ID in API requests.
1138
- * Used to specify the context for certain API calls, such as filtering or scoping the request.
1139
- * @static
1140
- * @type {string}
1141
- */
1142
- static CONTEXT = "?contextId=";
1143
- /**
1144
- * The query parameter to pass a document ID in API requests.
1145
- * @static
1146
- * @type {string}
1147
- */
1148
- static DOCUMENT_TYPES = "documentTypes";
1149
- /**
1150
- * The URL endpoint for getting categories by source (Applicant/Application).
1151
- * Used to fetch document categories based on the selected source.
1152
- * @static
1153
- * @type {string}
1154
- */
1155
- static GET_CATEGORIES_BY_SOURCE = "documentTypes/getAllCategoriesBySource/";
1156
- /**
1157
- * The URL endpoint for getting document types by category ID.
1158
- * Used to fetch document types based on the selected category.
1159
- * @static
1160
- * @type {string}
1161
- */
1162
- static GET_DOCUMENT_TYPES_BY_CATEGORY = "documentTypes/getAllDocumentTypesByCategoryId/";
1163
- /**
1164
- * The URL endpoint for saving document upload data.
1165
- * Used to save the complete document upload information.
1166
- * @static
1167
- * @type {string}
1168
- */
1169
- static SAVE_DOCUMENT_UPLOAD = "documents/create";
1170
- /**
1171
- * The query parameter to pass a context ID in API requests.
1172
- * @static
1173
- * @type {string}
1174
- */
1175
- static FOLDERS = "/folders?contextId=";
1176
- /**
1177
- * The query parameter to pass a document ID in API requests.
1178
- * @static
1179
- * @type {string}
1180
- */
1181
- static ALERT_BY_DOCUMENT_ID = "alerts?documentId=";
1182
- /**
1183
- * The query parameter to pass a document ID in API requests.
1184
- * @static
1185
- * @type {string}
1186
- */
1187
- static PARENT_DOCUMENT_TYPE_ID = "parentDocumentType?parentDocumentTypeId=";
1188
- /**
1189
- * The query parameter to pass a document ID in API requests.
1190
- * @static
1191
- * @type {string}
1192
- */
1193
- static USERLIST = "documents/getContextIdListByApplicationId/";
1194
- /**
1195
- * The URL endpoint for getting document status count by context ID.
1196
- * Used to fetch status data with applicationId, contextId, and category parameters.
1197
- * @static
1198
- * @type {string}
1199
- */
1200
- static STATUS_DOCUMENT_COUNT = "documents/getStatusDocumentCountByContextId/";
1201
- /**
1202
- * The query parameter to pass a context ID in API requests.
1203
- * Used to specify the context for certain API calls, such as filtering or scoping the request.
1204
- * @static
1205
- * @type {string}
1206
- */
1207
- static CONTEXT_ID = "&contextId=";
1208
- static GETALL = "documents/getAllByContextId";
1209
- static DOCUMENT_LIST = "list";
1210
- static DOCUMENT_HISTORY = "documents/getDocumentHistoryByDocumentId/";
1211
- static DELETE_DOCUMENT = "documents/deleteDocumentByDocumentId/";
1212
- static UPDATE_DOCUMENT_STATUS = "documents/updateDocumentStatusByDocumentId/";
1213
- }
1214
-
1215
1215
  /**
1216
1216
  * Service that handles loading and providing configuration settings for the application.
1217
1217
  * It fetches configuration data from a remote server and exposes various configuration options.
@@ -1284,14 +1284,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1284
1284
  }], ctorParameters: () => [{ type: i2.HttpClient }] });
1285
1285
 
1286
1286
  /**
1287
- * Service for managing document-related operations.
1288
- * The `DocumentService` acts as a bridge between the application and the backend API for handling document-related data.
1289
- * It interacts with the `DocumentStore` for state management and uses `HttpClient` for making HTTP requests.
1290
- * Creates an instance of `DocumentService`.
1291
- * @param {DocumentStore} documentStore - The store that manages the state of documents.
1292
- * @param {HttpClient} http - The Angular HTTP client for making API requests.
1293
- */
1294
- class DocumentService {
1287
+ * Service for making HTTP requests related to documents.
1288
+ * @class DocumentHttpService
1289
+ * @typedef {DocumentHttpService}
1290
+ */
1291
+ class DocumentHttpService {
1295
1292
  documentStore;
1296
1293
  http;
1297
1294
  appConfigService;
@@ -1315,134 +1312,367 @@ class DocumentService {
1315
1312
  return this.appConfigService.apiBaseUrl;
1316
1313
  }
1317
1314
  /**
1318
- * Sends a request to create a new document.
1319
- * @param {*} entity - The data of the document to be created.
1320
- * @returns {Observable<any>} Observable that emits the newly created document.
1315
+ * Fetches a document by its path name and transforms the response for dropdown options.
1316
+ * Includes error handling for failed API requests.
1317
+ * @param {string} contextId - The context ID to fetch the document.
1318
+ * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1321
1319
  */
1322
- create(entity) {
1323
- const headers = { 'Authorization': 'Bearer 368626b1-44dd-4cc9-af54-0b9987eced92' };
1324
- return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
1320
+ getFoldersData(contextId) {
1321
+ if (!contextId)
1322
+ return EMPTY;
1323
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}${URLS.FOLDERS}${contextId}`).pipe(tap((folders) => {
1324
+ this.documentStore.setFolders(folders);
1325
+ }), catchError((error) => {
1326
+ return throwError(() => new Error(error));
1327
+ }));
1325
1328
  }
1326
1329
  /**
1327
- * Fetches all documents from the backend.
1328
- * @returns {Observable<DocumentModel[]>} Observable that emits an array of documents.
1330
+ * Fetches a document catagories by its path name.
1331
+ * Includes error handling for failed API requests.
1332
+ * @param {string} contextId - The context ID to fetch the document.
1333
+ * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1329
1334
  */
1330
- getAll() {
1331
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}`).pipe(tap((entities) => this.documentStore.set(entities)));
1335
+ getDocumentCatagories(contextId) {
1336
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1337
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers }).pipe(tap((response) => {
1338
+ // Store only the categories array, not the entire response
1339
+ if (response && response.categories) {
1340
+ this.documentStore.setDocumentCategories(response.categories);
1341
+ }
1342
+ }), catchError((error) => {
1343
+ return throwError(() => new Error(error));
1344
+ }));
1332
1345
  }
1333
1346
  /**
1334
- * Fetches a document by its ID.
1335
- * @param {string} id - The unique identifier of the document.
1336
- * @returns {Observable<any>} Observable that emits the retrieved document.
1347
+ * Fetches a document by its path name and transforms the response for dropdown options.
1348
+ * Includes error handling for failed API requests.
1349
+ * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1337
1350
  */
1338
- getById(id) {
1339
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${id}`).pipe(tap((entity) => this.documentStore.upsert(id, entity)));
1340
- }
1351
+ // getDocumentTypes(): Observable<DocumentTypeModel[]> {
1352
+ // return this.http.get<DocumentTypeModel[]>(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.DOCUMENT_TYPES}`).pipe(
1353
+ // tap((documentTypes: DocumentTypeModel[]) => {
1354
+ // this.documentStore.setDocumentTypes(documentTypes);
1355
+ // }),
1356
+ // catchError((error) => {
1357
+ // return throwError(() => new Error(error));
1358
+ // })
1359
+ // );
1360
+ // }
1341
1361
  /**
1342
- * Updates an existing document by its ID.
1343
- * @param {string} id - The unique identifier of the document.
1344
- * @param {DocumentModel} entity - The updated data of the document.
1345
- * @returns {Observable<DocumentModel>} Observable that emits the updated document.
1362
+ * Fetches a document by its path name and transforms the response for dropdown options.
1363
+ * @param {string} documentId - The document ID to fetch the document.
1364
+ * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1346
1365
  */
1347
- update(id, entity) {
1348
- return this.http.put(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${id}`, entity).pipe(tap((updatedEntity) => this.documentStore.update(id, updatedEntity)));
1366
+ getAlertsByDocumentID(documentId) {
1367
+ return this.http.get(`${this.apiUrl}${URLS.ALERT_BY_DOCUMENT_ID}${documentId}`).pipe(tap((documentAlert) => {
1368
+ this.documentStore.setDocumentAlert(documentAlert);
1369
+ }), catchError((error) => {
1370
+ return throwError(() => new Error(error));
1371
+ }));
1349
1372
  }
1350
1373
  /**
1351
- * Deletes a document by its ID.
1352
- * @param {string} id - The unique identifier of the document to be deleted.
1353
- * @returns {Observable<void>} Observable that completes when the document is deleted.
1374
+ * Fetches a document by its folder ID and transforms the response for dropdown options.
1375
+ * @param {string} folderId - The folder ID to fetch the document.
1376
+ * @param {string} contextId - The context ID to fetch the document.
1377
+ * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1354
1378
  */
1355
- delete(id) {
1356
- return this.http.delete(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}/${id}`).pipe(tap(() => this.documentStore.remove(id)));
1357
- }
1358
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentService, deps: [{ token: DocumentStore }, { token: i2.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
1359
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentService, providedIn: 'root' });
1360
- }
1361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentService, decorators: [{
1362
- type: Injectable,
1363
- args: [{ providedIn: 'root' }]
1364
- }], ctorParameters: () => [{ type: DocumentStore }, { type: i2.HttpClient }, { type: AppConfigService }] });
1365
-
1366
- /**
1367
- * Query service for managing document state.
1368
- * This class extends Akita's `QueryEntity` to provide additional functionality for querying document data.
1369
- * @class DocumentQuery
1370
- * @typedef {DocumentQuery}
1371
- * @augments {QueryEntity<DocumentState>}
1372
- */
1373
- class DocumentQuery extends QueryEntity {
1374
- store;
1375
- constructor(store) {
1376
- super(store);
1377
- this.store = store;
1379
+ getDocumentByFolderID(folderId, contextId) {
1380
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`).pipe(tap((records) => {
1381
+ this.documentStore.set(records);
1382
+ }), catchError((error) => {
1383
+ return throwError(() => new Error(error));
1384
+ }));
1378
1385
  }
1379
1386
  /**
1380
- * Selects the currently selected folder ID from the document state.
1381
- * @returns {Observable<string | null>} Observable that emits the currently selected folder ID.
1387
+ * Updates the name of a document.
1388
+ * This method sends an HTTP PUT request to update the document's file name using the provided document ID and payload.
1389
+ * In case of an error, it will return an observable that throws an Error.
1390
+ * @param {string} documentId - The unique identifier of the document to update.
1391
+ * @param {any} payload - The payload containing the updated document data (e.g., fileName).
1392
+ * @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
1382
1393
  */
1383
- getParentDocumentTypeId() {
1384
- return this.getValue()['parentDocumentTypeId'];
1394
+ updateDocumentName(documentId, payload) {
1395
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1396
+ return this.http.put(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${documentId}`, payload, { headers }).pipe(catchError((error) => {
1397
+ return throwError(() => new Error(error));
1398
+ }));
1385
1399
  }
1386
1400
  /**
1387
- * Selects the currently selected folder ID from the document state.
1388
- * @returns {Observable<string | null>} Observable that emits the currently selected folder ID.
1389
- */
1390
- selectParentDocumentTypeId() {
1391
- return this.select((state) => state['parentDocumentTypeId']);
1401
+ * Fetches a userlist by its path name.
1402
+ * @param {string} contextId - The document ID to fetch the document.
1403
+ * @returns {Observable<UserListModel[]>} Observable that emits the user list data.
1404
+ */
1405
+ getUserListByContextId(contextId) {
1406
+ if (!contextId)
1407
+ return EMPTY;
1408
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1409
+ return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers }).pipe(tap((userList) => {
1410
+ this.documentStore.setUserList(userList);
1411
+ }), catchError((error) => {
1412
+ return throwError(() => new Error(error));
1413
+ }));
1392
1414
  }
1393
1415
  /**
1394
- * Selects the set messages.
1395
- * @returns {Observable<Message>} Observable that emits the current Message.
1416
+ * Fetches document status count data by application ID with optional context ID and category parameters.
1417
+ * @param {string} applicationId - The application ID to fetch status data.
1418
+ * @param {string | null} contextId - The context ID (applicant ID) to filter by. If null, uses applicationId.
1419
+ * @param {string | null} categoryId - The category ID to filter by.
1420
+ * @returns {Observable<StatusDataModel[]>} Observable that emits the status data.
1396
1421
  */
1397
- selectMessages() {
1398
- return this.select((state) => state.messages);
1422
+ getStatusDocumentCount(applicationId, contextId = null, categoryId = null) {
1423
+ if (!applicationId)
1424
+ return EMPTY;
1425
+ let url = `${this.apiUrl}${URLS.STATUS_DOCUMENT_COUNT}${applicationId}`;
1426
+ let params = new HttpParams();
1427
+ const contextParam = contextId || null;
1428
+ if (contextParam) {
1429
+ params = params.set(SHARED.CONTEXT_ID, contextParam);
1430
+ }
1431
+ if (categoryId) {
1432
+ params = params.set(SHARED.CATEGORY, categoryId);
1433
+ }
1434
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1435
+ return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
1436
+ this.documentStore.setStatusData(statusData);
1437
+ }), catchError((error) => {
1438
+ return throwError(() => new Error(error));
1439
+ }));
1399
1440
  }
1400
1441
  /**
1401
- * Selects the set documents.
1402
- * @returns {Observable<DocumentModel[]>} Observable that emits the documets.
1442
+ * Fetches documents based on selection criteria (user ID, status, and search key).
1443
+ * This method sends an HTTP GET request with query parameters for the selected filters.
1444
+ * Note: Menu item filtering has been removed - menu items are now used for navigation only.
1445
+ * @param {string} contextId - The context ID (applicationId or applicantId).
1446
+ * @param {string | null} menuItem - Reserved parameter (no longer used for filtering).
1447
+ * @param {string | null} userId - The selected user ID filter.
1448
+ * @param {string | null} status - The selected status filter.
1449
+ * @param {string | null} searchKey - The search key filter.
1450
+ * @returns {Observable<any>} An observable that emits the filtered document data.
1403
1451
  */
1404
- selectDocumets() {
1405
- return this.select((state) => state.documentList);
1452
+ getDocumentsBySelection(contextId, menuItem, userId, status, searchKey = null) {
1453
+ let params = new HttpParams();
1454
+ // Menu item filtering removed - menu items are now used for navigation only
1455
+ // if (menuItem) {
1456
+ // params = params.set(SHARED.CATEGORY, menuItem);
1457
+ // }
1458
+ if (userId) {
1459
+ params = params.set(SHARED.CONTEXT_ID, userId);
1460
+ }
1461
+ if (status) {
1462
+ params = params.set(SHARED.STATUS_PARAM, status);
1463
+ }
1464
+ if (searchKey) {
1465
+ params = params.set(SHARED.SEARCH_KEY, searchKey);
1466
+ }
1467
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1468
+ return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
1469
+ if (response.documents) {
1470
+ this.documentStore.setDocumentList(response.documents);
1471
+ }
1472
+ }), catchError((error) => {
1473
+ return throwError(() => new Error(error));
1474
+ }));
1406
1475
  }
1407
- /**
1408
- * Selects the document categories.
1409
- * @returns {Observable<DocumentCategory[]>} Observable that emits the document categories.
1410
- */
1411
- selectDocumentCategories() {
1412
- return this.select((state) => state.documentCategories);
1476
+ getDocumentHistory(documentId) {
1477
+ if (!documentId) {
1478
+ return of([]);
1479
+ }
1480
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1481
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers });
1413
1482
  }
1414
- // New query methods for selection state
1415
1483
  /**
1416
- * Selects the currently selected menu item.
1417
- * @returns {Observable<string | null>} Observable that emits the currently selected menu item _id (not the label).
1484
+ * Fetches document categories by source (Applicant/Application).
1485
+ * @param {string} source - The source type (Applicant or Application).
1486
+ * @returns {Observable<DocumentCategory[]>} Observable that emits the categories.
1418
1487
  */
1419
- selectSelectedMenuItem() {
1420
- return this.select((state) => state.selectedMenuItem);
1488
+ getCategoriesBySource(source) {
1489
+ if (!source)
1490
+ return EMPTY;
1491
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1492
+ return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
1493
+ return throwError(() => new Error(error));
1494
+ }));
1421
1495
  }
1422
1496
  /**
1423
- * Selects the currently selected user ID.
1424
- * @returns {Observable<string | null>} Observable that emits the currently selected user ID.
1497
+ * Fetches document types by category ID.
1498
+ * @param {string} categoryId - The category ID to fetch document types for.
1499
+ * @returns {Observable<DocumentTypeModel[]>} Observable that emits the document types.
1425
1500
  */
1426
- selectSelectedUserId() {
1427
- return this.select((state) => state.selectedUserId);
1501
+ getDocumentTypesByCategory(categoryId) {
1502
+ if (!categoryId)
1503
+ return EMPTY;
1504
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1505
+ return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
1506
+ return throwError(() => new Error(error));
1507
+ }));
1428
1508
  }
1429
1509
  /**
1430
- * Selects the currently selected status.
1431
- * @returns {Observable<string | null>} Observable that emits the currently selected status.
1510
+ * Uploads a single file using the uploadFile API.
1511
+ * @param {FormData} formData - The form data containing the file and metadata.
1512
+ * @returns {Observable<any>} Observable that emits the upload response.
1432
1513
  */
1433
- selectSelectedStatus() {
1434
- return this.select((state) => state.selectedStatus);
1514
+ uploadFile(formData) {
1515
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1516
+ return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
1517
+ return throwError(() => new Error(error));
1518
+ }));
1435
1519
  }
1436
1520
  /**
1437
- * Selects the current search key.
1438
- * @returns {Observable<string | null>} Observable that emits the current search key.
1521
+ * Saves the complete document upload data.
1522
+ * @param {any} payload - The document upload payload containing all necessary data.
1523
+ * @returns {Observable<any>} Observable that emits the save response.
1439
1524
  */
1440
- selectSearchKey() {
1441
- return this.select((state) => state.searchKey);
1525
+ saveDocumentUpload(payload) {
1526
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1527
+ return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
1528
+ return throwError(() => new Error(error));
1529
+ }));
1442
1530
  }
1443
1531
  /**
1444
- * Selects all selection state properties (menu item, user ID, status, search key).
1445
- * @returns {Observable<{menuItem: string | null, userId: string | null, status: string | null, searchKey: string | null}>} Observable that emits the current selection state.
1532
+ * Updates the status of a document by document ID
1533
+ * @param {string} documentId - The ID of the document to update
1534
+ * @param {string} status - The new status (Approved, Rejected, etc.)
1535
+ * @param {string} statusUpdateDescription - The description/note for the status update
1536
+ * @returns {Observable<any>} Observable that emits the updated document data with normalized status
1537
+ */
1538
+ updateDocumentStatus(documentId, status, statusUpdateDescription) {
1539
+ const payload = {
1540
+ statusUpdateDescription: statusUpdateDescription
1541
+ };
1542
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1543
+ return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
1544
+ if (response && response.status) {
1545
+ const normalizedStatus = this.normalizeStatus(response.status);
1546
+ response.normalizedStatus = normalizedStatus;
1547
+ }
1548
+ }), catchError((error) => {
1549
+ return throwError(() => new Error(error));
1550
+ }));
1551
+ }
1552
+ /**
1553
+ * Normalizes the status from API response to match component expectations
1554
+ * @param {string} status - The status from API response (Approved, Rejected, etc.)
1555
+ * @returns {string} Normalized status value
1556
+ */
1557
+ normalizeStatus(status) {
1558
+ switch (status.toLowerCase()) {
1559
+ case SHARED.APPROVED:
1560
+ return SHARED.STATUS_ACCEPTED;
1561
+ case SHARED.STATUS_REJECTED_LOWERCASE:
1562
+ return SHARED.STATUS_REJECTED_LOWERCASE;
1563
+ case SHARED.STATUS_PENDING:
1564
+ return SHARED.STATUS_PENDING;
1565
+ default:
1566
+ return status.toLowerCase();
1567
+ }
1568
+ }
1569
+ /**
1570
+ * Deletes a document by its ID and refreshes all data (categories, userlist, status, and document list)
1571
+ * @param {string} documentId - The ID of the document to delete
1572
+ * @param {string} contextId - The context ID to refresh all data
1573
+ * @returns {Observable<any>} Observable that emits the delete response
1574
+ */
1575
+ deleteDocument(documentId, contextId) {
1576
+ let headers = new HttpHeaders({ Authorization: `Bearer ec20c488-dee2-4598-96df-9137ab0d85ce` });
1577
+ return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
1578
+ this.getDocumentCatagories(contextId).subscribe();
1579
+ this.getUserListByContextId(contextId).subscribe();
1580
+ this.getStatusDocumentCount(contextId).subscribe();
1581
+ this.getDocumentsBySelection(contextId, null, null, null, null).subscribe();
1582
+ }), catchError((error) => {
1583
+ return throwError(() => new Error(error));
1584
+ }));
1585
+ }
1586
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, deps: [{ token: DocumentStore }, { token: i2.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
1587
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, providedIn: 'root' });
1588
+ }
1589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, decorators: [{
1590
+ type: Injectable,
1591
+ args: [{
1592
+ providedIn: 'root'
1593
+ }]
1594
+ }], ctorParameters: () => [{ type: DocumentStore }, { type: i2.HttpClient }, { type: AppConfigService }] });
1595
+
1596
+ /**
1597
+ * Query service for managing document state.
1598
+ * This class extends Akita's `QueryEntity` to provide additional functionality for querying document data.
1599
+ * @class DocumentQuery
1600
+ * @typedef {DocumentQuery}
1601
+ * @augments {QueryEntity<DocumentState>}
1602
+ */
1603
+ class DocumentQuery extends QueryEntity {
1604
+ store;
1605
+ constructor(store) {
1606
+ super(store);
1607
+ this.store = store;
1608
+ }
1609
+ /**
1610
+ * Selects the currently selected folder ID from the document state.
1611
+ * @returns {Observable<string | null>} Observable that emits the currently selected folder ID.
1612
+ */
1613
+ getParentDocumentTypeId() {
1614
+ return this.getValue()['parentDocumentTypeId'];
1615
+ }
1616
+ /**
1617
+ * Selects the currently selected folder ID from the document state.
1618
+ * @returns {Observable<string | null>} Observable that emits the currently selected folder ID.
1619
+ */
1620
+ selectParentDocumentTypeId() {
1621
+ return this.select((state) => state['parentDocumentTypeId']);
1622
+ }
1623
+ /**
1624
+ * Selects the set messages.
1625
+ * @returns {Observable<Message>} Observable that emits the current Message.
1626
+ */
1627
+ selectMessages() {
1628
+ return this.select((state) => state.messages);
1629
+ }
1630
+ /**
1631
+ * Selects the set documents.
1632
+ * @returns {Observable<DocumentModel[]>} Observable that emits the documets.
1633
+ */
1634
+ selectDocumets() {
1635
+ return this.select((state) => state.documentList);
1636
+ }
1637
+ /**
1638
+ * Selects the document categories.
1639
+ * @returns {Observable<DocumentCategory[]>} Observable that emits the document categories.
1640
+ */
1641
+ selectDocumentCategories() {
1642
+ return this.select((state) => state.documentCategories);
1643
+ }
1644
+ // New query methods for selection state
1645
+ /**
1646
+ * Selects the currently selected menu item.
1647
+ * @returns {Observable<string | null>} Observable that emits the currently selected menu item _id (not the label).
1648
+ */
1649
+ selectSelectedMenuItem() {
1650
+ return this.select((state) => state.selectedMenuItem);
1651
+ }
1652
+ /**
1653
+ * Selects the currently selected user ID.
1654
+ * @returns {Observable<string | null>} Observable that emits the currently selected user ID.
1655
+ */
1656
+ selectSelectedUserId() {
1657
+ return this.select((state) => state.selectedUserId);
1658
+ }
1659
+ /**
1660
+ * Selects the currently selected status.
1661
+ * @returns {Observable<string | null>} Observable that emits the currently selected status.
1662
+ */
1663
+ selectSelectedStatus() {
1664
+ return this.select((state) => state.selectedStatus);
1665
+ }
1666
+ /**
1667
+ * Selects the current search key.
1668
+ * @returns {Observable<string | null>} Observable that emits the current search key.
1669
+ */
1670
+ selectSearchKey() {
1671
+ return this.select((state) => state.searchKey);
1672
+ }
1673
+ /**
1674
+ * Selects all selection state properties (menu item, user ID, status, search key).
1675
+ * @returns {Observable<{menuItem: string | null, userId: string | null, status: string | null, searchKey: string | null}>} Observable that emits the current selection state.
1446
1676
  * Note: menuItem is the _id of the selected menu item, not the label.
1447
1677
  */
1448
1678
  selectSelectionState() {
@@ -1620,368 +1850,60 @@ class DocumentQuery extends QueryEntity {
1620
1850
  * @returns {boolean} The current document uploaded state.
1621
1851
  */
1622
1852
  getDocumentIsUploaded() {
1623
- return this.getValue().documentIsUploaded;
1624
- }
1625
- /**
1626
- * Selects the alert data.
1627
- * @returns {Observable<any>} Observable that emits the current alert data.
1628
- */
1629
- selectAlertData() {
1630
- return this.select((state) => state.alertData);
1631
- }
1632
- /**
1633
- * Gets the current alert data value (synchronous).
1634
- * @returns {any} The current alert data.
1635
- */
1636
- getAlertData() {
1637
- return this.getValue().alertData;
1638
- }
1639
- /**
1640
- * Selects all document viewer state properties.
1641
- * @returns {Observable<{selectedDocument?: DocumentListItem, documentHistory: DocumentHistorySection[], showDocumentHistory: boolean, isActionLoading: boolean, documentStatus: 'pending' | 'accepted' | 'rejected', documentIsUploaded: boolean, alertData: any}>} Observable that emits the current document viewer state.
1642
- */
1643
- selectDocumentViewerState() {
1644
- return this.select((state) => ({
1645
- selectedDocument: state.selectedDocument,
1646
- documentHistory: state.documentHistory,
1647
- showDocumentHistory: state.showDocumentHistory,
1648
- isActionLoading: state.isActionLoading,
1649
- documentStatus: state.documentStatus,
1650
- documentIsUploaded: state.documentIsUploaded,
1651
- alertData: state.alertData
1652
- }));
1653
- }
1654
- /**
1655
- * Gets the current document viewer state values (synchronous).
1656
- * @returns {Object} The current document viewer state values.
1657
- */
1658
- getDocumentViewerState() {
1659
- const state = this.getValue();
1660
- return {
1661
- selectedDocument: state.selectedDocument,
1662
- documentHistory: state.documentHistory,
1663
- showDocumentHistory: state.showDocumentHistory,
1664
- isActionLoading: state.isActionLoading,
1665
- documentStatus: state.documentStatus,
1666
- documentIsUploaded: state.documentIsUploaded,
1667
- alertData: state.alertData
1668
- };
1669
- }
1670
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentQuery, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Injectable });
1671
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentQuery, providedIn: 'root' });
1672
- }
1673
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentQuery, decorators: [{
1674
- type: Injectable,
1675
- args: [{ providedIn: 'root' }]
1676
- }], ctorParameters: () => [{ type: DocumentStore }] });
1677
-
1678
- /**
1679
- * Service for making HTTP requests related to documents.
1680
- * @class DocumentHttpService
1681
- * @typedef {DocumentHttpService}
1682
- */
1683
- class DocumentHttpService {
1684
- documentStore;
1685
- http;
1686
- appConfigService;
1687
- /**
1688
- * Creates an instance of DocumentService.
1689
- * @param {DocumentStore} documentStore - Store managing the state of documents.
1690
- * @param {HttpClient} http - Angular HTTP client for making API requests.
1691
- * @param {AppConfigService} appConfigService - Service for retrieving application configuration, such as API base URL.
1692
- */
1693
- constructor(documentStore, http, appConfigService) {
1694
- this.documentStore = documentStore;
1695
- this.http = http;
1696
- this.appConfigService = appConfigService;
1697
- }
1698
- /**
1699
- * Get api url from appConfigService.
1700
- * @readonly
1701
- * @type {string}
1702
- */
1703
- get apiUrl() {
1704
- return this.appConfigService.apiBaseUrl;
1705
- }
1706
- /**
1707
- * Fetches a document by its path name and transforms the response for dropdown options.
1708
- * Includes error handling for failed API requests.
1709
- * @param {string} contextId - The context ID to fetch the document.
1710
- * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1711
- */
1712
- getFoldersData(contextId) {
1713
- if (!contextId)
1714
- return EMPTY;
1715
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}${URLS.FOLDERS}${contextId}`).pipe(tap((folders) => {
1716
- this.documentStore.setFolders(folders);
1717
- }), catchError((error) => {
1718
- return throwError(() => new Error(error));
1719
- }));
1720
- }
1721
- /**
1722
- * Fetches a document catagories by its path name.
1723
- * Includes error handling for failed API requests.
1724
- * @param {string} contextId - The context ID to fetch the document.
1725
- * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1726
- */
1727
- getDocumentCatagories(contextId) {
1728
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1729
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers }).pipe(tap((response) => {
1730
- // Store only the categories array, not the entire response
1731
- if (response && response.categories) {
1732
- this.documentStore.setDocumentCategories(response.categories);
1733
- }
1734
- }), catchError((error) => {
1735
- return throwError(() => new Error(error));
1736
- }));
1737
- }
1738
- /**
1739
- * Fetches a document by its path name and transforms the response for dropdown options.
1740
- * Includes error handling for failed API requests.
1741
- * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1742
- */
1743
- // getDocumentTypes(): Observable<DocumentTypeModel[]> {
1744
- // return this.http.get<DocumentTypeModel[]>(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.DOCUMENT_TYPES}`).pipe(
1745
- // tap((documentTypes: DocumentTypeModel[]) => {
1746
- // this.documentStore.setDocumentTypes(documentTypes);
1747
- // }),
1748
- // catchError((error) => {
1749
- // return throwError(() => new Error(error));
1750
- // })
1751
- // );
1752
- // }
1753
- /**
1754
- * Fetches a document by its path name and transforms the response for dropdown options.
1755
- * @param {string} documentId - The document ID to fetch the document.
1756
- * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1757
- */
1758
- getAlertsByDocumentID(documentId) {
1759
- return this.http.get(`${this.apiUrl}${URLS.ALERT_BY_DOCUMENT_ID}${documentId}`).pipe(tap((documentAlert) => {
1760
- this.documentStore.setDocumentAlert(documentAlert);
1761
- }), catchError((error) => {
1762
- return throwError(() => new Error(error));
1763
- }));
1764
- }
1765
- /**
1766
- * Fetches a document by its folder ID and transforms the response for dropdown options.
1767
- * @param {string} folderId - The folder ID to fetch the document.
1768
- * @param {string} contextId - The context ID to fetch the document.
1769
- * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1770
- */
1771
- getDocumentByFolderID(folderId, contextId) {
1772
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`).pipe(tap((records) => {
1773
- this.documentStore.set(records);
1774
- }), catchError((error) => {
1775
- return throwError(() => new Error(error));
1776
- }));
1777
- }
1778
- /**
1779
- * Updates the name of a document.
1780
- * This method sends an HTTP PUT request to update the document's file name using the provided document ID and payload.
1781
- * In case of an error, it will return an observable that throws an Error.
1782
- * @param {string} documentId - The unique identifier of the document to update.
1783
- * @param {any} payload - The payload containing the updated document data (e.g., fileName).
1784
- * @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
1785
- */
1786
- updateDocumentName(documentId, payload) {
1787
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1788
- return this.http.put(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${documentId}`, payload, { headers }).pipe(catchError((error) => {
1789
- return throwError(() => new Error(error));
1790
- }));
1791
- }
1792
- /**
1793
- * Fetches a userlist by its path name.
1794
- * @param {string} contextId - The document ID to fetch the document.
1795
- * @returns {Observable<UserListModel[]>} Observable that emits the user list data.
1796
- */
1797
- getUserListByContextId(contextId) {
1798
- if (!contextId)
1799
- return EMPTY;
1800
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1801
- return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers }).pipe(tap((userList) => {
1802
- this.documentStore.setUserList(userList);
1803
- }), catchError((error) => {
1804
- return throwError(() => new Error(error));
1805
- }));
1806
- }
1807
- /**
1808
- * Fetches document status count data by application ID with optional context ID and category parameters.
1809
- * @param {string} applicationId - The application ID to fetch status data.
1810
- * @param {string | null} contextId - The context ID (applicant ID) to filter by. If null, uses applicationId.
1811
- * @param {string | null} categoryId - The category ID to filter by.
1812
- * @returns {Observable<StatusDataModel[]>} Observable that emits the status data.
1813
- */
1814
- getStatusDocumentCount(applicationId, contextId = null, categoryId = null) {
1815
- if (!applicationId)
1816
- return EMPTY;
1817
- let url = `${this.apiUrl}${URLS.STATUS_DOCUMENT_COUNT}${applicationId}`;
1818
- let params = new HttpParams();
1819
- const contextParam = contextId || null;
1820
- if (contextParam) {
1821
- params = params.set(SHARED.CONTEXT_ID, contextParam);
1822
- }
1823
- if (categoryId) {
1824
- params = params.set(SHARED.CATEGORY, categoryId);
1825
- }
1826
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1827
- return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
1828
- this.documentStore.setStatusData(statusData);
1829
- }), catchError((error) => {
1830
- return throwError(() => new Error(error));
1831
- }));
1832
- }
1833
- /**
1834
- * Fetches documents based on selection criteria (menu item, user ID, status, and search key).
1835
- * This method sends an HTTP GET request with query parameters for the selected filters.
1836
- * @param {string} contextId - The context ID (applicationId or applicantId).
1837
- * @param {string | null} menuItem - The selected menu item filter.
1838
- * @param {string | null} userId - The selected user ID filter.
1839
- * @param {string | null} status - The selected status filter.
1840
- * @param {string | null} searchKey - The search key filter.
1841
- * @returns {Observable<any>} An observable that emits the filtered document data.
1842
- */
1843
- getDocumentsBySelection(contextId, menuItem, userId, status, searchKey = null) {
1844
- let params = new HttpParams();
1845
- if (menuItem) {
1846
- params = params.set(SHARED.CATEGORY, menuItem);
1847
- }
1848
- if (userId) {
1849
- params = params.set(SHARED.CONTEXT_ID, userId);
1850
- }
1851
- if (status) {
1852
- params = params.set(SHARED.STATUS_PARAM, status);
1853
- }
1854
- if (searchKey) {
1855
- params = params.set(SHARED.SEARCH_KEY, searchKey);
1856
- }
1857
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1858
- return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
1859
- if (response.documents) {
1860
- this.documentStore.setDocumentList(response.documents);
1861
- }
1862
- }), catchError((error) => {
1863
- return throwError(() => new Error(error));
1864
- }));
1865
- }
1866
- getDocumentHistory(documentId) {
1867
- if (!documentId) {
1868
- return of([]);
1869
- }
1870
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1871
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers });
1872
- }
1873
- /**
1874
- * Fetches document categories by source (Applicant/Application).
1875
- * @param {string} source - The source type (Applicant or Application).
1876
- * @returns {Observable<DocumentCategory[]>} Observable that emits the categories.
1877
- */
1878
- getCategoriesBySource(source) {
1879
- if (!source)
1880
- return EMPTY;
1881
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1882
- return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
1883
- return throwError(() => new Error(error));
1884
- }));
1885
- }
1886
- /**
1887
- * Fetches document types by category ID.
1888
- * @param {string} categoryId - The category ID to fetch document types for.
1889
- * @returns {Observable<DocumentTypeModel[]>} Observable that emits the document types.
1890
- */
1891
- getDocumentTypesByCategory(categoryId) {
1892
- if (!categoryId)
1893
- return EMPTY;
1894
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1895
- return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
1896
- return throwError(() => new Error(error));
1897
- }));
1898
- }
1899
- /**
1900
- * Uploads a single file using the uploadFile API.
1901
- * @param {FormData} formData - The form data containing the file and metadata.
1902
- * @returns {Observable<any>} Observable that emits the upload response.
1903
- */
1904
- uploadFile(formData) {
1905
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1906
- return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
1907
- return throwError(() => new Error(error));
1908
- }));
1909
- }
1910
- /**
1911
- * Saves the complete document upload data.
1912
- * @param {any} payload - The document upload payload containing all necessary data.
1913
- * @returns {Observable<any>} Observable that emits the save response.
1914
- */
1915
- saveDocumentUpload(payload) {
1916
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1917
- return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
1918
- return throwError(() => new Error(error));
1919
- }));
1920
- }
1921
- /**
1922
- * Updates the status of a document by document ID
1923
- * @param {string} documentId - The ID of the document to update
1924
- * @param {string} status - The new status (Approved, Rejected, etc.)
1925
- * @param {string} statusUpdateDescription - The description/note for the status update
1926
- * @returns {Observable<any>} Observable that emits the updated document data with normalized status
1927
- */
1928
- updateDocumentStatus(documentId, status, statusUpdateDescription) {
1929
- const payload = {
1930
- statusUpdateDescription: statusUpdateDescription
1931
- };
1932
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1933
- return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
1934
- if (response && response.status) {
1935
- const normalizedStatus = this.normalizeStatus(response.status);
1936
- response.normalizedStatus = normalizedStatus;
1937
- }
1938
- }), catchError((error) => {
1939
- return throwError(() => new Error(error));
1940
- }));
1853
+ return this.getValue().documentIsUploaded;
1941
1854
  }
1942
1855
  /**
1943
- * Normalizes the status from API response to match component expectations
1944
- * @param {string} status - The status from API response (Approved, Rejected, etc.)
1945
- * @returns {string} Normalized status value
1856
+ * Selects the alert data.
1857
+ * @returns {Observable<any>} Observable that emits the current alert data.
1946
1858
  */
1947
- normalizeStatus(status) {
1948
- switch (status.toLowerCase()) {
1949
- case SHARED.APPROVED:
1950
- return SHARED.STATUS_ACCEPTED;
1951
- case SHARED.STATUS_REJECTED_LOWERCASE:
1952
- return SHARED.STATUS_REJECTED_LOWERCASE;
1953
- case SHARED.STATUS_PENDING:
1954
- return SHARED.STATUS_PENDING;
1955
- default:
1956
- return status.toLowerCase();
1957
- }
1859
+ selectAlertData() {
1860
+ return this.select((state) => state.alertData);
1958
1861
  }
1959
1862
  /**
1960
- * Deletes a document by its ID and refreshes all data (categories, userlist, status, and document list)
1961
- * @param {string} documentId - The ID of the document to delete
1962
- * @param {string} contextId - The context ID to refresh all data
1963
- * @returns {Observable<any>} Observable that emits the delete response
1863
+ * Gets the current alert data value (synchronous).
1864
+ * @returns {any} The current alert data.
1964
1865
  */
1965
- deleteDocument(documentId, contextId) {
1966
- let headers = new HttpHeaders({ Authorization: `Bearer 368626b1-44dd-4cc9-af54-0b9987eced92` });
1967
- return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
1968
- this.getDocumentCatagories(contextId).subscribe();
1969
- this.getUserListByContextId(contextId).subscribe();
1970
- this.getStatusDocumentCount(contextId).subscribe();
1971
- this.getDocumentsBySelection(contextId, null, null, null, null).subscribe();
1972
- }), catchError((error) => {
1973
- return throwError(() => new Error(error));
1866
+ getAlertData() {
1867
+ return this.getValue().alertData;
1868
+ }
1869
+ /**
1870
+ * Selects all document viewer state properties.
1871
+ * @returns {Observable<{selectedDocument?: DocumentListItem, documentHistory: DocumentHistorySection[], showDocumentHistory: boolean, isActionLoading: boolean, documentStatus: 'pending' | 'accepted' | 'rejected', documentIsUploaded: boolean, alertData: any}>} Observable that emits the current document viewer state.
1872
+ */
1873
+ selectDocumentViewerState() {
1874
+ return this.select((state) => ({
1875
+ selectedDocument: state.selectedDocument,
1876
+ documentHistory: state.documentHistory,
1877
+ showDocumentHistory: state.showDocumentHistory,
1878
+ isActionLoading: state.isActionLoading,
1879
+ documentStatus: state.documentStatus,
1880
+ documentIsUploaded: state.documentIsUploaded,
1881
+ alertData: state.alertData
1974
1882
  }));
1975
1883
  }
1976
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, deps: [{ token: DocumentStore }, { token: i2.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
1977
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, providedIn: 'root' });
1884
+ /**
1885
+ * Gets the current document viewer state values (synchronous).
1886
+ * @returns {Object} The current document viewer state values.
1887
+ */
1888
+ getDocumentViewerState() {
1889
+ const state = this.getValue();
1890
+ return {
1891
+ selectedDocument: state.selectedDocument,
1892
+ documentHistory: state.documentHistory,
1893
+ showDocumentHistory: state.showDocumentHistory,
1894
+ isActionLoading: state.isActionLoading,
1895
+ documentStatus: state.documentStatus,
1896
+ documentIsUploaded: state.documentIsUploaded,
1897
+ alertData: state.alertData
1898
+ };
1899
+ }
1900
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentQuery, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Injectable });
1901
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentQuery, providedIn: 'root' });
1978
1902
  }
1979
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, decorators: [{
1903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentQuery, decorators: [{
1980
1904
  type: Injectable,
1981
- args: [{
1982
- providedIn: 'root'
1983
- }]
1984
- }], ctorParameters: () => [{ type: DocumentStore }, { type: i2.HttpClient }, { type: AppConfigService }] });
1905
+ args: [{ providedIn: 'root' }]
1906
+ }], ctorParameters: () => [{ type: DocumentStore }] });
1985
1907
 
1986
1908
  /**
1987
1909
  * Service to manage the document data and selection state
@@ -2006,15 +1928,14 @@ class DocumentHelperService {
2006
1928
  // Clean up any existing subscription
2007
1929
  this.cleanupSelectionWatcher();
2008
1930
  this.selectionWatcherSubscription = combineLatest([
2009
- this.documentQuery.selectSelectedMenuItem(),
2010
1931
  this.documentQuery.selectSelectedUserId(),
2011
1932
  this.documentQuery.selectSelectedStatus(),
2012
1933
  this.documentQuery.selectSearchKey()
2013
1934
  ]).pipe(debounceTime(300), distinctUntilChanged((prev, curr) => {
2014
- const isSame = prev[0] === curr[0] && prev[1] === curr[1] && prev[2] === curr[2] && prev[3] === curr[3];
1935
+ const isSame = prev[0] === curr[0] && prev[1] === curr[1] && prev[2] === curr[2];
2015
1936
  return isSame;
2016
- }), switchMap(([menuItem, userId, status, searchKey]) => {
2017
- return this.documentHttpService.getDocumentsBySelection(contextId, menuItem, userId, status, searchKey);
1937
+ }), switchMap(([userId, status, searchKey]) => {
1938
+ return this.documentHttpService.getDocumentsBySelection(contextId, null, userId, status, searchKey);
2018
1939
  })).subscribe({
2019
1940
  next: (response) => {
2020
1941
  const currentState = this.documentQuery.getSelectionState();
@@ -2166,7 +2087,8 @@ class DocumentHelperService {
2166
2087
  */
2167
2088
  refreshDocumentsWithCurrentSelection(contextId) {
2168
2089
  const currentState = this.documentQuery.getSelectionState();
2169
- this.documentHttpService.getDocumentsBySelection(contextId, currentState.menuItem, currentState.userId, currentState.status).subscribe({
2090
+ this.documentHttpService.getDocumentsBySelection(contextId, null, // No menu item filtering
2091
+ currentState.userId, currentState.status).subscribe({
2170
2092
  next: (response) => {
2171
2093
  this.documentStore.setDocumentListResponse(response);
2172
2094
  },
@@ -2211,22 +2133,21 @@ class DocumentHelperService {
2211
2133
  *
2212
2134
  * This method ensures that after a document action (accept/reject/delete):
2213
2135
  * 1. Document categories are refreshed
2214
- * 2. Status counts are refreshed with current menu item and user filters
2136
+ * 2. Status counts are refreshed with current user filters
2215
2137
  * 3. User list is refreshed with current filters (if applicable)
2216
- * 4. Document list is refreshed with all current filters (menu item, user, status, search)
2138
+ * 4. Document list is refreshed with current filters (user, status, search)
2217
2139
  *
2218
2140
  * Filter application:
2219
2141
  * - Document categories: Uses base contextId
2220
- * - Status data: Uses userId as contextId and menuItem as categoryId
2142
+ * - Status data: Uses userId as contextId (no category filtering)
2221
2143
  * - User list: Uses base contextId (can be enhanced with additional filters if API supports)
2222
- * - Document list: Uses all current filters (menuItem, userId, status, searchKey)
2144
+ * - Document list: Uses current filters (userId, status, searchKey)
2223
2145
  *
2224
2146
  * @param contextId - The context ID to use for the API calls
2225
2147
  */
2226
2148
  refreshAllDataWithCurrentFilters(contextId) {
2227
2149
  const currentState = this.documentQuery.getSelectionState();
2228
2150
  const statusContextId = currentState.userId || null;
2229
- const categoryId = currentState.menuItem || null;
2230
2151
  // Refresh document categories
2231
2152
  this.documentHttpService.getDocumentCatagories(contextId).subscribe({
2232
2153
  next: (response) => {
@@ -2236,8 +2157,8 @@ class DocumentHelperService {
2236
2157
  console.error('Error refreshing document categories after action:', error);
2237
2158
  }
2238
2159
  });
2239
- // Refresh status data
2240
- this.documentHttpService.getStatusDocumentCount(contextId, statusContextId, categoryId).subscribe({
2160
+ // Refresh status data (no category filtering)
2161
+ this.documentHttpService.getStatusDocumentCount(contextId, statusContextId, null).subscribe({
2241
2162
  next: (statusData) => {
2242
2163
  this.documentStore.setStatusData(statusData);
2243
2164
  },
@@ -2266,6 +2187,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
2266
2187
  }]
2267
2188
  }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }, { type: DocumentHttpService }] });
2268
2189
 
2190
+ /**
2191
+ * Service for managing document-related operations.
2192
+ * The `DocumentService` acts as a bridge between the application and the backend API for handling document-related data.
2193
+ * It interacts with the `DocumentStore` for state management and uses `HttpClient` for making HTTP requests.
2194
+ * Creates an instance of `DocumentService`.
2195
+ * @param {DocumentStore} documentStore - The store that manages the state of documents.
2196
+ * @param {HttpClient} http - The Angular HTTP client for making API requests.
2197
+ */
2198
+ class DocumentService {
2199
+ documentStore;
2200
+ http;
2201
+ appConfigService;
2202
+ /**
2203
+ * Creates an instance of DocumentService.
2204
+ * @param {DocumentStore} documentStore - Store managing the state of documents.
2205
+ * @param {HttpClient} http - Angular HTTP client for making API requests.
2206
+ * @param {AppConfigService} appConfigService - Service for retrieving application configuration, such as API base URL.
2207
+ */
2208
+ constructor(documentStore, http, appConfigService) {
2209
+ this.documentStore = documentStore;
2210
+ this.http = http;
2211
+ this.appConfigService = appConfigService;
2212
+ }
2213
+ /**
2214
+ * Get api url from appConfigService.
2215
+ * @readonly
2216
+ * @type {string}
2217
+ */
2218
+ get apiUrl() {
2219
+ return this.appConfigService.apiBaseUrl;
2220
+ }
2221
+ /**
2222
+ * Sends a request to create a new document.
2223
+ * @param {*} entity - The data of the document to be created.
2224
+ * @returns {Observable<any>} Observable that emits the newly created document.
2225
+ */
2226
+ create(entity) {
2227
+ const headers = { 'Authorization': 'Bearer ec20c488-dee2-4598-96df-9137ab0d85ce' };
2228
+ return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
2229
+ }
2230
+ /**
2231
+ * Fetches all documents from the backend.
2232
+ * @returns {Observable<DocumentModel[]>} Observable that emits an array of documents.
2233
+ */
2234
+ getAll() {
2235
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}`).pipe(tap((entities) => this.documentStore.set(entities)));
2236
+ }
2237
+ /**
2238
+ * Fetches a document by its ID.
2239
+ * @param {string} id - The unique identifier of the document.
2240
+ * @returns {Observable<any>} Observable that emits the retrieved document.
2241
+ */
2242
+ getById(id) {
2243
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${id}`).pipe(tap((entity) => this.documentStore.upsert(id, entity)));
2244
+ }
2245
+ /**
2246
+ * Updates an existing document by its ID.
2247
+ * @param {string} id - The unique identifier of the document.
2248
+ * @param {DocumentModel} entity - The updated data of the document.
2249
+ * @returns {Observable<DocumentModel>} Observable that emits the updated document.
2250
+ */
2251
+ update(id, entity) {
2252
+ return this.http.put(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${id}`, entity).pipe(tap((updatedEntity) => this.documentStore.update(id, updatedEntity)));
2253
+ }
2254
+ /**
2255
+ * Deletes a document by its ID.
2256
+ * @param {string} id - The unique identifier of the document to be deleted.
2257
+ * @returns {Observable<void>} Observable that completes when the document is deleted.
2258
+ */
2259
+ delete(id) {
2260
+ return this.http.delete(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}/${id}`).pipe(tap(() => this.documentStore.remove(id)));
2261
+ }
2262
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentService, deps: [{ token: DocumentStore }, { token: i2.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2263
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentService, providedIn: 'root' });
2264
+ }
2265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentService, decorators: [{
2266
+ type: Injectable,
2267
+ args: [{ providedIn: 'root' }]
2268
+ }], ctorParameters: () => [{ type: DocumentStore }, { type: i2.HttpClient }, { type: AppConfigService }] });
2269
+
2269
2270
  /**
2270
2271
  * Service for handling document uploads.
2271
2272
  * @class DocumentUploadService
@@ -3769,23 +3770,6 @@ class UserListService {
3769
3770
  color: this.getColorByIndex(index)
3770
3771
  }));
3771
3772
  }
3772
- /**
3773
- * Finds the selected menu item from categories
3774
- * @param selectedMenuItemId - The ID of the selected menu item
3775
- * @param categories - The document categories
3776
- * @returns The selected menu item or null
3777
- */
3778
- findSelectedMenuItem(selectedMenuItemId, categories) {
3779
- for (const category of categories) {
3780
- if (category.items) {
3781
- const item = category.items.find(item => item._id === selectedMenuItemId);
3782
- if (item) {
3783
- return item;
3784
- }
3785
- }
3786
- }
3787
- return null;
3788
- }
3789
3773
  /**
3790
3774
  * Filters user list based on selected menu item category
3791
3775
  * @param userList - The complete user list
@@ -3793,21 +3777,8 @@ class UserListService {
3793
3777
  * @returns Filtered user list
3794
3778
  */
3795
3779
  filterUsersByCategory(userList, categories) {
3796
- const selectedMenuItemId = this.documentQuery.getSelectionState().menuItem;
3797
- if (!selectedMenuItemId) {
3798
- return userList;
3799
- }
3800
- const selectedMenuItem = this.findSelectedMenuItem(selectedMenuItemId, categories);
3801
- if (!selectedMenuItem) {
3802
- return userList;
3803
- }
3804
- const selectedCategory = categories.find(category => category.items?.some(item => item._id === selectedMenuItemId));
3805
- if (!selectedCategory) {
3806
- return userList;
3807
- }
3808
- if (selectedCategory.label === SHARED.APPLICATION) {
3809
- return userList.filter(user => user.name === SHARED.APPLICATION_DOCS);
3810
- }
3780
+ // No menu item filtering - return all users
3781
+ // The menu item is now used for navigation, not filtering
3811
3782
  return userList;
3812
3783
  }
3813
3784
  selectUser(userId, userData) {
@@ -3922,18 +3893,19 @@ class UserListComponent {
3922
3893
  }
3923
3894
  this.cdr.markForCheck();
3924
3895
  });
3925
- this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
3926
- this.updateFilteredUserData();
3927
- if (this.selectedUser) {
3928
- const selectedUserInFiltered = this.filteredUserData.find(user => user.name === this.selectedUser);
3929
- if (!selectedUserInFiltered) {
3930
- this.selectedUser = undefined;
3931
- this.documentStore.setSelectedUserId(null);
3932
- this.userSelected.emit(SHARED.EMPTY);
3933
- }
3934
- }
3935
- this.cdr.markForCheck();
3936
- });
3896
+ // Remove menu item dependency - users are no longer filtered by menu item
3897
+ // this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
3898
+ // this.updateFilteredUserData();
3899
+ // if (this.selectedUser) {
3900
+ // const selectedUserInFiltered = this.filteredUserData.find(user => user.name === this.selectedUser);
3901
+ // if (!selectedUserInFiltered) {
3902
+ // this.selectedUser = undefined;
3903
+ // this.documentStore.setSelectedUserId(null);
3904
+ // this.userSelected.emit(SHARED.EMPTY);
3905
+ // }
3906
+ // }
3907
+ // this.cdr.markForCheck();
3908
+ // });
3937
3909
  this.documentQuery.selectShowUserList().subscribe(show => {
3938
3910
  if (!show && this.selectedUser) {
3939
3911
  this.selectedUser = undefined;
@@ -4744,90 +4716,18 @@ class DocumentListService {
4744
4716
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListService, deps: [{ token: DocumentUploadService }, { token: DocumentHttpService }, { token: DocumentQuery }, { token: DocumentStore }, { token: DocumentTableBuilderService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
4745
4717
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListService, providedIn: 'root' });
4746
4718
  }
4747
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListService, decorators: [{
4748
- type: Injectable,
4749
- args: [{
4750
- providedIn: 'root'
4751
- }]
4752
- }], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentTableBuilderService }, { type: DocumentHelperService }] });
4753
-
4754
- /**
4755
- * Directive to conditionally show or hide elements based on user permissions.
4756
- * @class HasPermissionDirective
4757
- * @typedef {HasPermissionDirective}
4758
- */
4759
- class HasPermissionDirective {
4760
- el;
4761
- renderer;
4762
- sessionService;
4763
- /**
4764
- * The required permission(s) to display the element.
4765
- * Accepts a single string or an array of strings.
4766
- * @type {string | string[]}
4767
- */
4768
- permission;
4769
- /**
4770
- * Creates an instance of HasPermissionDirective.
4771
- * @param {ElementRef} el - Reference to the host element.
4772
- * @param {Renderer2} renderer - Angular Renderer for DOM manipulation.
4773
- * @param {SessionService} sessionService - Service to retrieve user permissions.
4774
- */
4775
- constructor(el, renderer, sessionService) {
4776
- this.el = el;
4777
- this.renderer = renderer;
4778
- this.sessionService = sessionService;
4779
- }
4780
- /**
4781
- * Lifecycle hook that is called when input properties change.
4782
- * @param {SimpleChanges} changes - The changes in input properties.
4783
- */
4784
- ngOnChanges(changes) {
4785
- if (changes['permission']) {
4786
- this.checkPermission();
4787
- }
4788
- }
4789
- /**
4790
- * Checks if the user has the required permission(s).
4791
- * Hides the element if the permission is not found.
4792
- */
4793
- checkPermission() {
4794
- // If no permission is required (empty string, null, or undefined), show the element
4795
- if (!this.permission || this.permission === '' || (Array.isArray(this.permission) && this.permission.length === 0)) {
4796
- this.renderer.removeStyle(this.el.nativeElement, 'display');
4797
- return;
4798
- }
4799
- const userPermissionsObjects = this.sessionService.getUserPermissions();
4800
- const userPermissionNames = userPermissionsObjects?.map((perm) => perm.name) || [];
4801
- const requiredPermissions = Array.isArray(this.permission)
4802
- ? this.permission
4803
- : [this.permission];
4804
- const hasPermission = requiredPermissions.some(permission => userPermissionNames.includes(permission));
4805
- if (!hasPermission) {
4806
- this.renderer.setStyle(this.el.nativeElement, 'display', 'none');
4807
- }
4808
- else {
4809
- this.renderer.removeStyle(this.el.nativeElement, 'display');
4810
- }
4811
- }
4812
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Directive });
4813
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: HasPermissionDirective, isStandalone: false, selector: "[permission]", inputs: { permission: "permission" }, usesOnChanges: true, ngImport: i0 });
4814
- }
4815
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, decorators: [{
4816
- type: Directive,
4719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListService, decorators: [{
4720
+ type: Injectable,
4817
4721
  args: [{
4818
- selector: '[permission]',
4819
- standalone: false
4722
+ providedIn: 'root'
4820
4723
  }]
4821
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SessionService }], propDecorators: { permission: [{
4822
- type: Input
4823
- }] } });
4724
+ }], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentTableBuilderService }, { type: DocumentHelperService }] });
4824
4725
 
4825
4726
  class TablePrimaryComponent {
4826
4727
  tableData = { columns: [], data: [] };
4827
4728
  showHeader = true;
4828
4729
  tableStyle = { 'min-width': '100%' };
4829
4730
  rowClick = new EventEmitter();
4830
- deleteAction = new EventEmitter();
4831
4731
  processedData = [];
4832
4732
  // Expose SHARED constants for template use
4833
4733
  SHARED = SHARED;
@@ -4895,19 +4795,15 @@ class TablePrimaryComponent {
4895
4795
  getFileExtension(fileName) {
4896
4796
  return fileName.split(SHARED.DOT).pop()?.toUpperCase() || SHARED.PDF;
4897
4797
  }
4898
- onActionClick(event, rowData) {
4899
- event.stopPropagation();
4900
- this.deleteAction.emit(rowData);
4901
- }
4902
4798
  onRowClick(rowData) {
4903
4799
  this.rowClick.emit(rowData);
4904
4800
  }
4905
4801
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4906
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TablePrimaryComponent, isStandalone: false, selector: "lib-table-primary", inputs: { tableData: "tableData", showHeader: "showHeader", tableStyle: "tableStyle" }, outputs: { rowClick: "rowClick", deleteAction: "deleteAction" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"card\">\r\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <th *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr (click)=\"onRowClick(rowData)\" class=\"clickable-row\">\r\n <td *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\r\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\">{{ rowData.docName }}</div>\r\n <div class=\"file-info\">{{ rowData.fileName }} - {{ rowData.fileSize }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n \r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\r\n <i [class]=\"rowData._statusIcon\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_ACTIONS\" class=\"actions-cell\">\r\n @if(rowData.isUploaded){\r\n <button pButton pRipple type=\"button\" [icon]=\"SHARED.ICON_DELETE\" \r\n class=\"p-button-text p-button-rounded\" \r\n [permission]=\"'documents-deleteDocumentByDocumentId'\"\r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\r\n } \r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"tableData.columns.length\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:20px;font-size:14px;margin-bottom:.25rem;text-align:left;word-break:break-word}.document-cell .document-info .document-details .file-info{font-size:.75rem;color:#6c757d;text-align:left}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#dbeafe;color:#1d4ed8}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i5$1.Ripple, selector: "[pRipple]" }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
4802
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TablePrimaryComponent, isStandalone: false, selector: "lib-table-primary", inputs: { tableData: "tableData", showHeader: "showHeader", tableStyle: "tableStyle" }, outputs: { rowClick: "rowClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"card\">\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\n {{ col.header }}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData>\n <tr (click)=\"onRowClick(rowData)\" class=\"clickable-row\">\n <td *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\n <!-- Document Cell -->\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\n <div class=\"document-info\">\n <div class=\"document-icon\">\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\n </div>\n <div class=\"document-details\">\n <div class=\"document-name\">{{ rowData.docName }}</div>\n <div class=\"file-info\">{{ rowData.fileName }} - {{ rowData.fileSize }}</div>\n </div>\n </div>\n </div>\n\n <!-- Status Cell -->\n \n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\n <i [class]=\"rowData._statusIcon\"></i>\n {{ rowData[col.field] }}\n </span>\n </div>\n\n\n\n <!-- Default Text Cell -->\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\n {{ rowData[col.field] }}\n </div>\n </td>\n </tr>\n </ng-template>\n \n <!-- No Records Template -->\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td [attr.colspan]=\"tableData.columns.length\" class=\"no-records-cell\">\n <div class=\"no-records-content\">\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\n <p class=\"no-records-text\">No records found</p>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:20px;font-size:14px;margin-bottom:.25rem;text-align:left;word-break:break-word}.document-cell .document-info .document-details .file-info{font-size:.75rem;color:#6c757d;text-align:left}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#dbeafe;color:#1d4ed8}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] });
4907
4803
  }
4908
4804
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, decorators: [{
4909
4805
  type: Component,
4910
- args: [{ selector: 'lib-table-primary', standalone: false, template: "<div class=\"card\">\r\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <th *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr (click)=\"onRowClick(rowData)\" class=\"clickable-row\">\r\n <td *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\r\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\">{{ rowData.docName }}</div>\r\n <div class=\"file-info\">{{ rowData.fileName }} - {{ rowData.fileSize }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n \r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\r\n <i [class]=\"rowData._statusIcon\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_ACTIONS\" class=\"actions-cell\">\r\n @if(rowData.isUploaded){\r\n <button pButton pRipple type=\"button\" [icon]=\"SHARED.ICON_DELETE\" \r\n class=\"p-button-text p-button-rounded\" \r\n [permission]=\"'documents-deleteDocumentByDocumentId'\"\r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\r\n } \r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"tableData.columns.length\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:20px;font-size:14px;margin-bottom:.25rem;text-align:left;word-break:break-word}.document-cell .document-info .document-details .file-info{font-size:.75rem;color:#6c757d;text-align:left}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#dbeafe;color:#1d4ed8}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"] }]
4806
+ args: [{ selector: 'lib-table-primary', standalone: false, template: "<div class=\"card\">\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\n {{ col.header }}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData>\n <tr (click)=\"onRowClick(rowData)\" class=\"clickable-row\">\n <td *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\n <!-- Document Cell -->\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\n <div class=\"document-info\">\n <div class=\"document-icon\">\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\n </div>\n <div class=\"document-details\">\n <div class=\"document-name\">{{ rowData.docName }}</div>\n <div class=\"file-info\">{{ rowData.fileName }} - {{ rowData.fileSize }}</div>\n </div>\n </div>\n </div>\n\n <!-- Status Cell -->\n \n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\n <i [class]=\"rowData._statusIcon\"></i>\n {{ rowData[col.field] }}\n </span>\n </div>\n\n\n\n <!-- Default Text Cell -->\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\n {{ rowData[col.field] }}\n </div>\n </td>\n </tr>\n </ng-template>\n \n <!-- No Records Template -->\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td [attr.colspan]=\"tableData.columns.length\" class=\"no-records-cell\">\n <div class=\"no-records-content\">\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\n <p class=\"no-records-text\">No records found</p>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:20px;font-size:14px;margin-bottom:.25rem;text-align:left;word-break:break-word}.document-cell .document-info .document-details .file-info{font-size:.75rem;color:#6c757d;text-align:left}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#dbeafe;color:#1d4ed8}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"] }]
4911
4807
  }], propDecorators: { tableData: [{
4912
4808
  type: Input
4913
4809
  }], showHeader: [{
@@ -4916,8 +4812,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4916
4812
  type: Input
4917
4813
  }], rowClick: [{
4918
4814
  type: Output
4919
- }], deleteAction: [{
4920
- type: Output
4921
4815
  }] } });
4922
4816
 
4923
4817
  class DocumentViewerService {
@@ -5373,12 +5267,19 @@ class DocumentHistoryService {
5373
5267
  actionIconBgColor: this.documentHistoryStyleService.getActionIconBgColor(item.label)
5374
5268
  }))
5375
5269
  };
5376
- // Add accordion class based on the first item's label
5377
5270
  processedSection.accordionClass = this.getAccordionClass(processedSection);
5378
- // Add hasValidContent property
5379
5271
  processedSection.hasValidContent = this.checkValidContent(processedSection);
5380
5272
  return processedSection;
5381
- });
5273
+ }).sort((a, b) => {
5274
+ if (a.header === SHARED.INITIAL_REQUEST)
5275
+ return -1;
5276
+ if (b.header === SHARED.INITIAL_REQUEST)
5277
+ return 1;
5278
+ return 0;
5279
+ }).map(section => ({
5280
+ ...section,
5281
+ list: section.list.reverse()
5282
+ }));
5382
5283
  }
5383
5284
  /**
5384
5285
  * Downloads a document when clicked
@@ -5594,6 +5495,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
5594
5495
  }]
5595
5496
  }] });
5596
5497
 
5498
+ /**
5499
+ * Directive to conditionally show or hide elements based on user permissions.
5500
+ * @class HasPermissionDirective
5501
+ * @typedef {HasPermissionDirective}
5502
+ */
5503
+ class HasPermissionDirective {
5504
+ el;
5505
+ renderer;
5506
+ sessionService;
5507
+ /**
5508
+ * The required permission(s) to display the element.
5509
+ * Accepts a single string or an array of strings.
5510
+ * @type {string | string[]}
5511
+ */
5512
+ permission;
5513
+ /**
5514
+ * Creates an instance of HasPermissionDirective.
5515
+ * @param {ElementRef} el - Reference to the host element.
5516
+ * @param {Renderer2} renderer - Angular Renderer for DOM manipulation.
5517
+ * @param {SessionService} sessionService - Service to retrieve user permissions.
5518
+ */
5519
+ constructor(el, renderer, sessionService) {
5520
+ this.el = el;
5521
+ this.renderer = renderer;
5522
+ this.sessionService = sessionService;
5523
+ }
5524
+ /**
5525
+ * Lifecycle hook that is called when input properties change.
5526
+ * @param {SimpleChanges} changes - The changes in input properties.
5527
+ */
5528
+ ngOnChanges(changes) {
5529
+ if (changes['permission']) {
5530
+ this.checkPermission();
5531
+ }
5532
+ }
5533
+ /**
5534
+ * Checks if the user has the required permission(s).
5535
+ * Hides the element if the permission is not found.
5536
+ */
5537
+ checkPermission() {
5538
+ // If no permission is required (empty string, null, or undefined), show the element
5539
+ if (!this.permission || this.permission === '' || (Array.isArray(this.permission) && this.permission.length === 0)) {
5540
+ this.renderer.removeStyle(this.el.nativeElement, 'display');
5541
+ return;
5542
+ }
5543
+ const userPermissionsObjects = this.sessionService.getUserPermissions();
5544
+ const userPermissionNames = userPermissionsObjects?.map((perm) => perm.name) || [];
5545
+ const requiredPermissions = Array.isArray(this.permission)
5546
+ ? this.permission
5547
+ : [this.permission];
5548
+ const hasPermission = requiredPermissions.some(permission => userPermissionNames.includes(permission));
5549
+ if (!hasPermission) {
5550
+ this.renderer.setStyle(this.el.nativeElement, 'display', 'none');
5551
+ }
5552
+ else {
5553
+ this.renderer.removeStyle(this.el.nativeElement, 'display');
5554
+ }
5555
+ }
5556
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Directive });
5557
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: HasPermissionDirective, isStandalone: false, selector: "[permission]", inputs: { permission: "permission" }, usesOnChanges: true, ngImport: i0 });
5558
+ }
5559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, decorators: [{
5560
+ type: Directive,
5561
+ args: [{
5562
+ selector: '[permission]',
5563
+ standalone: false
5564
+ }]
5565
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SessionService }], propDecorators: { permission: [{
5566
+ type: Input
5567
+ }] } });
5568
+
5597
5569
  class DocumentActionsComponent {
5598
5570
  documentActionsService;
5599
5571
  sessionService;
@@ -5709,11 +5681,11 @@ class DocumentActionsComponent {
5709
5681
  this.rejectNote = SHARED.EMPTY;
5710
5682
  }
5711
5683
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, deps: [{ token: DocumentActionsService }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Component });
5712
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentActionsComponent, isStandalone: false, selector: "document-actions", inputs: { document: "document", documentId: "documentId", currentStatus: "currentStatus", isLoading: "isLoading", isUploaded: "isUploaded", statusId: "statusId" }, outputs: { actionPerformed: "actionPerformed" }, viewQueries: [{ propertyName: "confirmationDialog", first: true, predicate: ConfirmationDialogComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !== SHARED.STATUS_PENDING && !document?.isUploaded\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_REJECTED_LOWERCASE ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"currentStatus === SHARED.STATUS_ACCEPTED || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"currentStatus === SHARED.STATUS_ACCEPTED\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_ACCEPTED ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if(document?.isUploaded){\r\n<div class=\"actions-card\">\r\n <div class=\"actions-buttons\">\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n}\r\n<app-confirmation-dialog></app-confirmation-dialog>\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card:has(.delete-btn){width:auto;margin-left:0;background-color:#fff;border:1px solid #e2e8f0;padding:.5rem}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#f5f5f5;border-color:#e57373;color:#e57373;padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:6px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i6.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i3$1.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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i9$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }, { kind: "component", type: ConfirmationDialogComponent, selector: "app-confirmation-dialog", inputs: ["confirmationOptions"] }] });
5684
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentActionsComponent, isStandalone: false, selector: "document-actions", inputs: { document: "document", documentId: "documentId", currentStatus: "currentStatus", isLoading: "isLoading", isUploaded: "isUploaded", statusId: "statusId" }, outputs: { actionPerformed: "actionPerformed" }, viewQueries: [{ propertyName: "confirmationDialog", first: true, predicate: ConfirmationDialogComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !=='Pending' && !document?.isUploaded && document?.status === 'Reviewing'\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_REJECTED_LOWERCASE ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"currentStatus === SHARED.STATUS_ACCEPTED || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"currentStatus === SHARED.STATUS_ACCEPTED\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_ACCEPTED ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if(document?.isUploaded){\r\n<div class=\"actions-card\">\r\n <div class=\"actions-buttons\">\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n}\r\n<app-confirmation-dialog></app-confirmation-dialog>\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card:has(.delete-btn){width:auto;margin-left:0;background-color:#fff;border:1px solid #e2e8f0;padding:.5rem}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#f5f5f5;border-color:#e57373;color:#e57373;padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:6px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i6.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i3$1.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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i9$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }, { kind: "component", type: ConfirmationDialogComponent, selector: "app-confirmation-dialog", inputs: ["confirmationOptions"] }] });
5713
5685
  }
5714
5686
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, decorators: [{
5715
5687
  type: Component,
5716
- args: [{ selector: 'document-actions', standalone: false, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !== SHARED.STATUS_PENDING && !document?.isUploaded\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_REJECTED_LOWERCASE ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"currentStatus === SHARED.STATUS_ACCEPTED || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"currentStatus === SHARED.STATUS_ACCEPTED\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_ACCEPTED ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if(document?.isUploaded){\r\n<div class=\"actions-card\">\r\n <div class=\"actions-buttons\">\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n}\r\n<app-confirmation-dialog></app-confirmation-dialog>\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card:has(.delete-btn){width:auto;margin-left:0;background-color:#fff;border:1px solid #e2e8f0;padding:.5rem}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#f5f5f5;border-color:#e57373;color:#e57373;padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:6px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"] }]
5688
+ args: [{ selector: 'document-actions', standalone: false, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !=='Pending' && !document?.isUploaded && document?.status === 'Reviewing'\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_REJECTED_LOWERCASE ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"currentStatus === SHARED.STATUS_ACCEPTED || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"currentStatus === SHARED.STATUS_ACCEPTED\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_ACCEPTED ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if(document?.isUploaded){\r\n<div class=\"actions-card\">\r\n <div class=\"actions-buttons\">\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n}\r\n<app-confirmation-dialog></app-confirmation-dialog>\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card:has(.delete-btn){width:auto;margin-left:0;background-color:#fff;border:1px solid #e2e8f0;padding:.5rem}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#f5f5f5;border-color:#e57373;color:#e57373;padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:6px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"] }]
5717
5689
  }], ctorParameters: () => [{ type: DocumentActionsService }, { type: SessionService }], propDecorators: { document: [{
5718
5690
  type: Input
5719
5691
  }], documentId: [{
@@ -5875,11 +5847,11 @@ class DocumentViewerComponent {
5875
5847
  this.subscription.unsubscribe();
5876
5848
  }
5877
5849
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: i3.MessageService }, { token: DocumentViewerService }], target: i0.ɵɵFactoryTarget.Component });
5878
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList", contextId: "contextId" }, outputs: { documentStatusUpdated: "documentStatusUpdated" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer-container\">\r\n <div class=\"main-content\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview\">\r\n @if(isSelectedDocumentImage){\r\n <div class=\"img-container\">\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n }@else if(isSelectedDocumentPdf){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"0.7\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 100%; height: 100%\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else if(isSelectedDocumentUnsupported){\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-12 pt-0\">\r\n \r\n <!-- <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n -->\r\n \r\n <div class=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-viewer-container{height:100%;width:100%}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 350px;gap:1rem;height:calc(100% - 60px);min-height:0}.document-viewer-container .main-content .content-grid .document-preview{background:#f8f9fa;border-radius:8px;padding:.5rem;display:flex;align-items:center;justify-content:center;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .img-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container .uploadedImages{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .pdf-container{width:100%;height:100%;border-radius:4px;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .incorrect-docType{color:#dc3545;font-weight:500;text-align:center;padding:2rem}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;max-height:100%;overflow-y:auto}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 300px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}\n"], dependencies: [{ kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i6$1.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }, { kind: "component", type: DocumentHistoryComponent, selector: "document-history", inputs: ["historyData", "showHistory"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
5850
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList", contextId: "contextId" }, outputs: { documentStatusUpdated: "documentStatusUpdated" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer-container\">\r\n <div class=\"main-content\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview\">\r\n @if(isSelectedDocumentImage){\r\n <div class=\"img-container\">\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n }@else if(isSelectedDocumentPdf){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"0.7\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 100%; height: 100%\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else if(isSelectedDocumentUnsupported){\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-12 pt-0\">\r\n \r\n <!-- <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n -->\r\n \r\n <div class=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-viewer-container{height:100%;width:100%}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 350px;gap:1rem;height:calc(100% - 60px);min-height:0}.document-viewer-container .main-content .content-grid .document-preview{background:#f8f9fa;border-radius:8px;padding:.5rem;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container .uploadedImages{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .pdf-container{width:100%;height:100%;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .incorrect-docType{color:#dc3545;font-weight:500;text-align:center;padding:2rem}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;max-height:100%;overflow-y:auto}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 300px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}\n"], dependencies: [{ kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i6$1.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }, { kind: "component", type: DocumentHistoryComponent, selector: "document-history", inputs: ["historyData", "showHistory"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
5879
5851
  }
5880
5852
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, decorators: [{
5881
5853
  type: Component,
5882
- args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer-container\">\r\n <div class=\"main-content\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview\">\r\n @if(isSelectedDocumentImage){\r\n <div class=\"img-container\">\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n }@else if(isSelectedDocumentPdf){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"0.7\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 100%; height: 100%\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else if(isSelectedDocumentUnsupported){\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-12 pt-0\">\r\n \r\n <!-- <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n -->\r\n \r\n <div class=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-viewer-container{height:100%;width:100%}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 350px;gap:1rem;height:calc(100% - 60px);min-height:0}.document-viewer-container .main-content .content-grid .document-preview{background:#f8f9fa;border-radius:8px;padding:.5rem;display:flex;align-items:center;justify-content:center;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .img-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container .uploadedImages{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .pdf-container{width:100%;height:100%;border-radius:4px;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .incorrect-docType{color:#dc3545;font-weight:500;text-align:center;padding:2rem}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;max-height:100%;overflow-y:auto}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 300px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}\n"] }]
5854
+ args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer-container\">\r\n <div class=\"main-content\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview\">\r\n @if(isSelectedDocumentImage){\r\n <div class=\"img-container\">\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n }@else if(isSelectedDocumentPdf){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"0.7\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 100%; height: 100%\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else if(isSelectedDocumentUnsupported){\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-12 pt-0\">\r\n \r\n <!-- <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n -->\r\n \r\n <div class=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-viewer-container{height:100%;width:100%}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 350px;gap:1rem;height:calc(100% - 60px);min-height:0}.document-viewer-container .main-content .content-grid .document-preview{background:#f8f9fa;border-radius:8px;padding:.5rem;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container .uploadedImages{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .pdf-container{width:100%;height:100%;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .incorrect-docType{color:#dc3545;font-weight:500;text-align:center;padding:2rem}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;max-height:100%;overflow-y:auto}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 300px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}\n"] }]
5883
5855
  }], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: i3.MessageService }, { type: DocumentViewerService }], propDecorators: { selectedDocument: [{
5884
5856
  type: Input
5885
5857
  }], documentList: [{
@@ -5910,6 +5882,22 @@ class DocumentListComponent {
5910
5882
  * @memberof DocumentListComponent
5911
5883
  */
5912
5884
  documentListResponse = null;
5885
+ /**
5886
+ * The selected menu item ID for scrolling to specific sections
5887
+ * @type {string | null}
5888
+ * @memberof DocumentListComponent
5889
+ */
5890
+ selectedMenuItemId = null;
5891
+ /**
5892
+ * Additional navigation information for precise scrolling
5893
+ * @type {object | null}
5894
+ * @memberof DocumentListComponent
5895
+ */
5896
+ navigationInfo = null;
5897
+ /**
5898
+ * Reference to the document categories container for scrolling
5899
+ */
5900
+ documentCategoriesContainer;
5913
5901
  /**
5914
5902
  * Subscription to document list response from store
5915
5903
  */
@@ -5999,6 +5987,12 @@ class DocumentListComponent {
5999
5987
  if (changes[SHARED.CONTEXT_ID] && !changes[SHARED.CONTEXT_ID].firstChange) {
6000
5988
  this.documentListService.refreshDocumentListForNewContext(this.contextId);
6001
5989
  }
5990
+ if (changes['selectedMenuItemId'] && this.selectedMenuItemId) {
5991
+ this.scrollToCategorySection(this.selectedMenuItemId);
5992
+ }
5993
+ if (changes['navigationInfo'] && this.navigationInfo) {
5994
+ this.scrollToCategorySectionWithNavigationInfo(this.navigationInfo);
5995
+ }
6002
5996
  }
6003
5997
  /**
6004
5998
  * Initializes the component by setting up document list subscription.
@@ -6006,6 +6000,17 @@ class DocumentListComponent {
6006
6000
  ngOnInit() {
6007
6001
  this.setupDocumentListSubscription();
6008
6002
  }
6003
+ /**
6004
+ * Called after the view is initialized
6005
+ */
6006
+ ngAfterViewInit() {
6007
+ // If there's a selected menu item on init, scroll to it after a short delay
6008
+ if (this.selectedMenuItemId) {
6009
+ setTimeout(() => {
6010
+ this.scrollToCategorySection(this.selectedMenuItemId);
6011
+ }, 100);
6012
+ }
6013
+ }
6009
6014
  /**
6010
6015
  * Handles the visibility of the sidebar.
6011
6016
  * @param {boolean} isVisible - Indicates whether the sidebar should be visible or not.
@@ -6084,6 +6089,161 @@ class DocumentListComponent {
6084
6089
  }, 2000);
6085
6090
  }
6086
6091
  }
6092
+ /**
6093
+ * Scrolls to the category section that matches the selected menu item
6094
+ * @param menuItemId - The ID of the selected menu item
6095
+ */
6096
+ scrollToCategorySection(menuItemId) {
6097
+ if (!this.documentCategories || !this.documentCategoriesContainer) {
6098
+ return;
6099
+ }
6100
+ let targetCategory = this.documentCategories.find(category => category.label.toLowerCase().includes('application') ||
6101
+ category.label.toLowerCase().includes('applicant') ||
6102
+ category.label.toLowerCase().includes('document'));
6103
+ if (!targetCategory) {
6104
+ if (menuItemId.includes('application') || menuItemId.includes('app')) {
6105
+ targetCategory = this.documentCategories.find(cat => cat.label.toLowerCase().includes('application'));
6106
+ }
6107
+ else if (menuItemId.includes('applicant') || menuItemId.includes('user')) {
6108
+ targetCategory = this.documentCategories.find(cat => cat.label.toLowerCase().includes('applicant') ||
6109
+ cat.label.toLowerCase().includes('user'));
6110
+ }
6111
+ else {
6112
+ targetCategory = this.documentCategories[0];
6113
+ }
6114
+ }
6115
+ if (targetCategory) {
6116
+ const categoryIndex = this.documentCategories.findIndex(cat => cat === targetCategory);
6117
+ const categoryElements = this.documentCategoriesContainer.nativeElement.querySelectorAll('.category');
6118
+ if (categoryElements[categoryIndex]) {
6119
+ categoryElements[categoryIndex].scrollIntoView({
6120
+ behavior: 'smooth',
6121
+ block: 'start',
6122
+ inline: 'nearest'
6123
+ });
6124
+ // Add a temporary highlight effect
6125
+ this.highlightCategory(categoryElements[categoryIndex]);
6126
+ }
6127
+ else {
6128
+ console.log('Scroll: Category element not found at index:', categoryIndex);
6129
+ }
6130
+ }
6131
+ else {
6132
+ console.log('Scroll: No target category found');
6133
+ }
6134
+ }
6135
+ /**
6136
+ * Scrolls to the category section using navigationInfo
6137
+ * @param navigationInfo - The navigation info object containing menuItemId
6138
+ */
6139
+ scrollToCategorySectionWithNavigationInfo(navigationInfo) {
6140
+ if (!this.documentCategories || !this.documentCategoriesContainer) {
6141
+ console.log('Scroll: Missing required data for scrolling');
6142
+ return;
6143
+ }
6144
+ console.log('Scroll: Using navigation info for scrolling');
6145
+ console.log('Scroll: Menu item:', navigationInfo.menuItemLabel);
6146
+ console.log('Scroll: Available categories:', this.documentCategories.map(cat => cat.label));
6147
+ // Find the target category by exact menu item label match
6148
+ // This is the clean, dynamic approach since menu item labels match section labels
6149
+ const targetCategory = this.documentCategories.find(category => category.label.toLowerCase() === navigationInfo.menuItemLabel.toLowerCase());
6150
+ if (targetCategory) {
6151
+ console.log('Scroll: Found target category:', targetCategory.label);
6152
+ // Try to find the element by semantic ID first (more reliable)
6153
+ const sectionId = 'section-' + targetCategory.label.toLowerCase().replace(' ', '-');
6154
+ let targetElement = this.documentCategoriesContainer.nativeElement.querySelector(`#${sectionId}`);
6155
+ if (targetElement) {
6156
+ console.log('Scroll: Found target element by ID:', sectionId);
6157
+ // Scroll to the target category with smooth behavior
6158
+ // Use scrollIntoView to work with the parent content container
6159
+ targetElement.scrollIntoView({
6160
+ behavior: 'smooth',
6161
+ block: 'start',
6162
+ inline: 'nearest'
6163
+ });
6164
+ // Add a temporary highlight effect
6165
+ this.highlightCategory(targetElement);
6166
+ }
6167
+ else {
6168
+ // Fallback to index-based approach
6169
+ console.log('Scroll: Element not found by ID, using index-based approach');
6170
+ const categoryIndex = this.documentCategories.findIndex(cat => cat === targetCategory);
6171
+ const categoryElements = this.documentCategoriesContainer.nativeElement.querySelectorAll('.category');
6172
+ if (categoryElements[categoryIndex]) {
6173
+ console.log('Scroll: Scrolling to category element by index');
6174
+ categoryElements[categoryIndex].scrollIntoView({
6175
+ behavior: 'smooth',
6176
+ block: 'start',
6177
+ inline: 'nearest'
6178
+ });
6179
+ this.highlightCategory(categoryElements[categoryIndex]);
6180
+ }
6181
+ else {
6182
+ console.log('Scroll: Category element not found at index:', categoryIndex);
6183
+ }
6184
+ }
6185
+ }
6186
+ else {
6187
+ console.log('Scroll: No target category found for menu item:', navigationInfo.menuItemLabel);
6188
+ console.log('Scroll: Available sections:', this.documentCategories.map(cat => cat.label));
6189
+ }
6190
+ }
6191
+ /**
6192
+ * Adds a temporary highlight effect to the scrolled category
6193
+ * @param categoryElement - The DOM element of the category to highlight
6194
+ */
6195
+ highlightCategory(categoryElement) {
6196
+ // Add highlight class
6197
+ categoryElement.classList.add('category-highlight');
6198
+ // Remove highlight after animation
6199
+ setTimeout(() => {
6200
+ categoryElement.classList.remove('category-highlight');
6201
+ }, 2000);
6202
+ }
6203
+ /**
6204
+ * Alternative scrolling method using IntersectionObserver for better performance
6205
+ * This method can be used as a fallback or alternative to the current approach
6206
+ * @param navigationInfo - The navigation info object
6207
+ */
6208
+ scrollToCategorySectionWithIntersectionObserver(navigationInfo) {
6209
+ if (!this.documentCategories || !this.documentCategoriesContainer) {
6210
+ return;
6211
+ }
6212
+ // Find the target category
6213
+ const targetCategory = this.documentCategories.find(category => category.label.toLowerCase() === navigationInfo.menuItemLabel.toLowerCase());
6214
+ if (!targetCategory) {
6215
+ return;
6216
+ }
6217
+ // Create a temporary observer to find the target element
6218
+ const observer = new IntersectionObserver((entries) => {
6219
+ entries.forEach(entry => {
6220
+ if (entry.isIntersecting && entry.target.id === `section-${targetCategory.label.toLowerCase().replace(' ', '-')}`) {
6221
+ // Element is visible, scroll to it
6222
+ entry.target.scrollIntoView({
6223
+ behavior: 'smooth',
6224
+ block: 'start'
6225
+ });
6226
+ // Highlight the element
6227
+ this.highlightCategory(entry.target);
6228
+ // Disconnect observer after use
6229
+ observer.disconnect();
6230
+ }
6231
+ });
6232
+ }, {
6233
+ threshold: 0.1,
6234
+ rootMargin: '0px 0px -100px 0px'
6235
+ });
6236
+ // Observe all category elements
6237
+ const categoryElements = this.documentCategoriesContainer.nativeElement.querySelectorAll('.category');
6238
+ categoryElements.forEach((element) => {
6239
+ observer.observe(element);
6240
+ });
6241
+ // Fallback: if no intersection after a short delay, use direct scrolling
6242
+ setTimeout(() => {
6243
+ observer.disconnect();
6244
+ this.scrollToCategorySectionWithNavigationInfo(navigationInfo);
6245
+ }, 100);
6246
+ }
6087
6247
  /**
6088
6248
  * Cleanup subscriptions on component destroy
6089
6249
  */
@@ -6091,15 +6251,22 @@ class DocumentListComponent {
6091
6251
  this.documentListSubscription.unsubscribe();
6092
6252
  }
6093
6253
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentListService }], target: i0.ɵɵFactoryTarget.Component });
6094
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", documentList: "documentList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [header]=\"selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\" \r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\"\r\n (onHide)=\"handleCloseModal()\">\r\n <p-messages \r\n[(value)]=\"deleteMessage\" \r\n[enableService]=\"false\" \r\n[closable]=\"false\" />\r\n <document-viewer \r\n [selectedDocument]=\"selectedDocument\" \r\n [documentList]=\"documentList\" \r\n [contextId]=\"contextId\" \r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n \r\n </div>\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\">\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <span class=\"status-badge\">{{ categoryCompletionCounts[i] }} Complete</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary \r\n [tableData]=\"categoryTables[i]\" \r\n [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\"\r\n (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .table-container{padding:0}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:flex-end}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i3$1.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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick", "deleteAction"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated"] }], encapsulation: i0.ViewEncapsulation.None });
6254
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", selectedMenuItemId: "selectedMenuItemId", navigationInfo: "navigationInfo", documentList: "documentList" }, viewQueries: [{ propertyName: "documentCategoriesContainer", first: true, predicate: ["documentCategoriesContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer\">\n <p-dialog [header]=\"selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\" \n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\"\n (onHide)=\"handleCloseModal()\">\n <p-messages \n[(value)]=\"deleteMessage\" \n[enableService]=\"false\" \n[closable]=\"false\" />\n <document-viewer \n [selectedDocument]=\"selectedDocument\" \n [documentList]=\"documentList\" \n [contextId]=\"contextId\" \n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\n <ng-template pTemplate=\"header\">\n <div class=\"w-full flex align-items-center justify-content-between\">\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\n [(ngModel)]=\"fileName\" />\n \n </div>\n </ng-template>\n <ng-content></ng-content>\n </document-viewer>\n </p-dialog>\n</div>\n\n<div class=\"document-categories-container\" #documentCategoriesContainer>\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\" [id]=\"'section-' + category.label.toLowerCase().replace(' ', '-')\">\n <div class=\"category-header\">\n <div class=\"category-title\">\n <h3>{{ formattedCategoryLabels[i] }}</h3>\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\n </div>\n <div class=\"completion-status\">\n <span class=\"status-badge\">{{ categoryCompletionCounts[i] }} Complete</span>\n </div>\n </div>\n\n <div class=\"table-container\">\n <lib-table-primary \n [tableData]=\"categoryTables[i]\" \n [tableStyle]=\"{ 'min-width': '100%' }\"\n (rowClick)=\"handleTableRowClick($event)\"\n (deleteAction)=\"handleDeleteAction($event)\">\n </lib-table-primary>\n </div>\n </div>\n</div>\n", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:flex-end}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i3$1.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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated"] }], encapsulation: i0.ViewEncapsulation.None });
6095
6255
  }
6096
6256
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, decorators: [{
6097
6257
  type: Component,
6098
- args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [header]=\"selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\" \r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\"\r\n (onHide)=\"handleCloseModal()\">\r\n <p-messages \r\n[(value)]=\"deleteMessage\" \r\n[enableService]=\"false\" \r\n[closable]=\"false\" />\r\n <document-viewer \r\n [selectedDocument]=\"selectedDocument\" \r\n [documentList]=\"documentList\" \r\n [contextId]=\"contextId\" \r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n \r\n </div>\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\">\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <span class=\"status-badge\">{{ categoryCompletionCounts[i] }} Complete</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary \r\n [tableData]=\"categoryTables[i]\" \r\n [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\"\r\n (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .table-container{padding:0}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:flex-end}}\n"] }]
6258
+ args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\n <p-dialog [header]=\"selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\" \n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\"\n (onHide)=\"handleCloseModal()\">\n <p-messages \n[(value)]=\"deleteMessage\" \n[enableService]=\"false\" \n[closable]=\"false\" />\n <document-viewer \n [selectedDocument]=\"selectedDocument\" \n [documentList]=\"documentList\" \n [contextId]=\"contextId\" \n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\n <ng-template pTemplate=\"header\">\n <div class=\"w-full flex align-items-center justify-content-between\">\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\n [(ngModel)]=\"fileName\" />\n \n </div>\n </ng-template>\n <ng-content></ng-content>\n </document-viewer>\n </p-dialog>\n</div>\n\n<div class=\"document-categories-container\" #documentCategoriesContainer>\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\" [id]=\"'section-' + category.label.toLowerCase().replace(' ', '-')\">\n <div class=\"category-header\">\n <div class=\"category-title\">\n <h3>{{ formattedCategoryLabels[i] }}</h3>\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\n </div>\n <div class=\"completion-status\">\n <span class=\"status-badge\">{{ categoryCompletionCounts[i] }} Complete</span>\n </div>\n </div>\n\n <div class=\"table-container\">\n <lib-table-primary \n [tableData]=\"categoryTables[i]\" \n [tableStyle]=\"{ 'min-width': '100%' }\"\n (rowClick)=\"handleTableRowClick($event)\"\n (deleteAction)=\"handleDeleteAction($event)\">\n </lib-table-primary>\n </div>\n </div>\n</div>\n", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:flex-end}}\n"] }]
6099
6259
  }], ctorParameters: () => [{ type: DocumentListService }], propDecorators: { contextId: [{
6100
6260
  type: Input
6101
6261
  }], documentListResponse: [{
6102
6262
  type: Input
6263
+ }], selectedMenuItemId: [{
6264
+ type: Input
6265
+ }], navigationInfo: [{
6266
+ type: Input
6267
+ }], documentCategoriesContainer: [{
6268
+ type: ViewChild,
6269
+ args: ['documentCategoriesContainer', { static: false }]
6103
6270
  }], documentList: [{
6104
6271
  type: Input
6105
6272
  }] } });
@@ -6147,18 +6314,9 @@ class DocumentMenuService {
6147
6314
  */
6148
6315
  handleUserListVisibility(menuItemId, categories) {
6149
6316
  const category = this.getMenuItemCategory(menuItemId, categories);
6150
- const menuItem = this.getMenuItemById(menuItemId, categories);
6151
- if (category === SHARED.APPLICATION) {
6152
- this.documentStore.setShowUserList(true);
6153
- }
6154
- else if (category === SHARED.APPLICANTS) {
6155
- this.documentStore.setShowUserList(true);
6156
- }
6157
- else {
6158
- this.documentStore.setShowUserList(false);
6159
- this.documentStore.setSelectedUserId(null);
6160
- this.documentStore.setSelectedStatus(null);
6161
- }
6317
+ // Always show user list for navigation purposes
6318
+ // Menu items are now used for navigation, not filtering
6319
+ this.documentStore.setShowUserList(true);
6162
6320
  }
6163
6321
  /**
6164
6322
  * Handles document status based on selected menu item
@@ -6168,9 +6326,8 @@ class DocumentMenuService {
6168
6326
  handleDocumentStatus(menuItemId, categories) {
6169
6327
  const menuItem = this.getMenuItemById(menuItemId, categories);
6170
6328
  if (menuItem) {
6171
- // You can add logic here to handle document status based on the selected menu item
6172
- // For example, filtering documents by status, updating status counts, etc.
6173
- console.log('Selected menu item:', menuItem.label, 'with status:', menuItem.status);
6329
+ // Menu items are now used for navigation, not status filtering
6330
+ console.log('Selected menu item for navigation:', menuItem.label);
6174
6331
  }
6175
6332
  }
6176
6333
  /**
@@ -6205,17 +6362,25 @@ class DocumentMenuService {
6205
6362
  getBadgeSeverity(item) {
6206
6363
  const status = item.status;
6207
6364
  const total = this.getTotalDocuments(item);
6208
- const approved = this.getApprovedDocuments(item);
6365
+ const pending = status.Pending || status.pending || 0;
6209
6366
  const rejected = status.Rejected || status.rejected || 0;
6367
+ const reviewing = status.Reviewing || status.reviewing || 0;
6368
+ const approved = this.getApprovedDocuments(item);
6210
6369
  if (total === 0)
6211
6370
  return 'info';
6212
- // If any docs are rejected, show red
6371
+ // 1st Preference: Grey if any documents are pending
6372
+ if (pending > 0)
6373
+ return 'info';
6374
+ // 2nd Preference: Red if any documents are rejected
6213
6375
  if (rejected > 0)
6214
6376
  return 'danger';
6215
- // If all docs are approved, show green
6377
+ // 3rd Preference: Amber if any documents are reviewing
6378
+ if (reviewing > 0)
6379
+ return 'warning';
6380
+ // 4th Preference: Green if all documents are approved
6216
6381
  if (approved === total && total > 0)
6217
6382
  return 'success';
6218
- // Otherwise show amber
6383
+ // Fallback: show amber for any other state
6219
6384
  return 'warning';
6220
6385
  }
6221
6386
  /**
@@ -6254,6 +6419,7 @@ class DocumentsMenuComponent {
6254
6419
  catagories = SHARED.EMPTY_ARRAY;
6255
6420
  applicationNumber = SHARED.EMPTY;
6256
6421
  contextId = SHARED.EMPTY;
6422
+ menuItemSelected = new EventEmitter();
6257
6423
  selectedMenuItem = null;
6258
6424
  selectedMenuItemId = null;
6259
6425
  // Store the categories from the store
@@ -6322,6 +6488,24 @@ class DocumentsMenuComponent {
6322
6488
  }
6323
6489
  return null;
6324
6490
  }
6491
+ /**
6492
+ * Finds the category for a menu item by its _id
6493
+ * @param id The _id to search for
6494
+ * @returns The category or null if not found
6495
+ */
6496
+ findMenuItemCategoryById(id) {
6497
+ if (!id)
6498
+ return null;
6499
+ for (const category of this.categories) {
6500
+ if (category.items) {
6501
+ const item = category.items.find(item => item._id === id);
6502
+ if (item) {
6503
+ return category;
6504
+ }
6505
+ }
6506
+ }
6507
+ return null;
6508
+ }
6325
6509
  /**
6326
6510
  * Update menu use catagories
6327
6511
  */
@@ -6342,48 +6526,69 @@ class DocumentsMenuComponent {
6342
6526
  });
6343
6527
  }
6344
6528
  /**
6345
- * Handle the menu item click
6529
+ * Handle the menu item click for navigation
6346
6530
  * @param {*} event - Event
6347
6531
  * @param {DocumentCategoryItem} item - catagory item
6348
6532
  */
6349
6533
  onMenuItemClick(event, item) {
6350
6534
  if (this.selectedMenuItemId === item._id) {
6351
- // Immediately clear the selection state
6535
+ // If clicking the same item, deselect it
6352
6536
  this.selectedMenuItem = null;
6353
6537
  this.selectedMenuItemId = null;
6354
- // Update the store
6355
6538
  this.documentStore.setSelectedMenuItem(null);
6356
- // Refresh documents
6357
- this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
6358
- // Force change detection by updating the component state
6359
- this.handleDeselection();
6539
+ // Emit deselection event
6540
+ this.menuItemSelected.emit({
6541
+ item: item,
6542
+ category: this.findMenuItemCategoryById(item._id),
6543
+ navigationInfo: undefined
6544
+ });
6360
6545
  }
6361
6546
  else {
6547
+ // Select the new item
6362
6548
  this.selectedMenuItem = item.label;
6363
6549
  this.selectedMenuItemId = item._id;
6364
6550
  this.documentStore.setSelectedMenuItem(item._id);
6551
+ const category = this.findMenuItemCategoryById(item._id);
6552
+ if (category) {
6553
+ this.menuItemSelected.emit({
6554
+ item: item,
6555
+ category: category,
6556
+ navigationInfo: {
6557
+ menuItemId: item._id,
6558
+ menuItemLabel: item.label,
6559
+ categoryLabel: category.label,
6560
+ categoryIndex: this.categories.findIndex(cat => cat === category)
6561
+ }
6562
+ });
6563
+ }
6365
6564
  this.documentMenuService.handleUserListVisibility(item._id, this.categories);
6366
6565
  }
6367
6566
  }
6368
- /**
6369
- * Handle deselection to ensure immediate visual feedback
6370
- */
6371
- handleDeselection() {
6372
- this.selectedMenuItemId = null;
6373
- this.selectedMenuItem = null;
6374
- setTimeout(() => {
6375
- }, 0);
6376
- }
6377
6567
  /**
6378
6568
  * Handle the menu item selection
6379
6569
  * @param {string} menuItemId - The ID of the menu item to select
6380
6570
  */
6381
6571
  onSelectMenuItem(menuItemId) {
6382
6572
  const label = this.findMenuItemLabelById(menuItemId);
6383
- if (label) {
6573
+ const category = this.findMenuItemCategoryById(menuItemId);
6574
+ if (label && category) {
6384
6575
  this.selectedMenuItem = label;
6385
6576
  this.selectedMenuItemId = menuItemId;
6386
6577
  this.documentStore.setSelectedMenuItem(menuItemId);
6578
+ // Find the item and emit selection event
6579
+ const item = category.items?.find(item => item._id === menuItemId);
6580
+ if (item) {
6581
+ this.menuItemSelected.emit({
6582
+ item: item,
6583
+ category: category,
6584
+ navigationInfo: {
6585
+ menuItemId: item._id,
6586
+ menuItemLabel: item.label,
6587
+ categoryLabel: category.label,
6588
+ categoryIndex: this.categories.findIndex(cat => cat === category)
6589
+ }
6590
+ });
6591
+ }
6387
6592
  this.documentMenuService.handleUserListVisibility(menuItemId, this.categories);
6388
6593
  }
6389
6594
  }
@@ -6394,7 +6599,12 @@ class DocumentsMenuComponent {
6394
6599
  this.selectedMenuItem = null;
6395
6600
  this.selectedMenuItemId = null;
6396
6601
  this.documentStore.setSelectedMenuItem(null);
6397
- this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
6602
+ // Emit deselection event
6603
+ this.menuItemSelected.emit({
6604
+ item: {},
6605
+ category: {},
6606
+ navigationInfo: undefined
6607
+ });
6398
6608
  }
6399
6609
  /**
6400
6610
  * Get the selected menu item
@@ -6404,14 +6614,13 @@ class DocumentsMenuComponent {
6404
6614
  return this.selectedMenuItem;
6405
6615
  }
6406
6616
  /**
6407
- * Handles contextId changes by clearing current selection and refreshing data
6617
+ * Handles contextId changes by clearing current selection
6408
6618
  */
6409
6619
  handleContextIdChange() {
6410
6620
  if (this.contextId && this.contextId !== SHARED.EMPTY) {
6411
6621
  this.selectedMenuItem = null;
6412
6622
  this.selectedMenuItemId = null;
6413
6623
  this.documentStore.setSelectedMenuItem(null);
6414
- this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
6415
6624
  }
6416
6625
  }
6417
6626
  /**
@@ -6422,17 +6631,19 @@ class DocumentsMenuComponent {
6422
6631
  return this.selectedMenuItemId;
6423
6632
  }
6424
6633
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, deps: [{ token: DocumentStore }, { token: DocumentQuery }, { token: DocumentMenuService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
6425
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentsMenuComponent, isStandalone: false, selector: "lib-documents-menu", inputs: { catagories: "catagories", applicationNumber: "applicationNumber", contextId: "contextId" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-sidebar-container h-full\">\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"categories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label === 'Application' ? 'Application Documents' : item.label }}</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;border:none!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important}::ng-deep .p-menuitem-link:not(.selected-menu-item) .text-xl{color:var(--text-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{height:calc(100% - 38px)}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:#fff!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem:not(.p-focus)>.p-menuitem-content .p-menuitem-link{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important;color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-icon{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-text{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}.no-documents-message{padding:12px 16px;text-align:center}.no-documents-message .text-muted{color:#9ea0b3;font-size:14px;font-style:italic}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7$1.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "component", type: i8$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i9$2.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
6634
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentsMenuComponent, isStandalone: false, selector: "lib-documents-menu", inputs: { catagories: "catagories", applicationNumber: "applicationNumber", contextId: "contextId" }, outputs: { menuItemSelected: "menuItemSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-sidebar-container h-full\">\n <!-- Menu items are now used for navigation to specific sections, not for filtering documents -->\n <p-card class=\"widget-menu-wrapper h-full\">\n @if(applicationNumber){\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\n <div class=\"expand-icon-wrapper\">\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\n </div>\n </div>\n }\n\n <div class=\"widget-menu-container\" >\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\n <p-menu [model]=\"categories\" styleClass=\"w-full md:w-15rem\">\n <ng-template pTemplate=\"submenuheader\" let-item>\n <span [style]=\"{\n color : '#9EA0B3'\n }\">{{ item.label === 'Application' ? 'Application Documents' : item.label }}</span>\n </ng-template>\n <ng-template pTemplate=\"item\" let-item>\n <a pRipple \n class=\"flex align-items-center p-menuitem-link\"\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\n (click)=\"onMenuItemClick($event, item)\">\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\n <span class=\"ml-2\">{{ item.label }}</span>\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \n class=\"ml-auto\" \n [severity]=\"item.menuData?.badgeSeverity\" \n [value]=\"item.menuData?.badgeValue\" />\n </a>\n </ng-template>\n </p-menu>\n </div>\n </div>\n </p-card>\n</div>\n\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;border:none!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important}::ng-deep .p-menuitem-link:not(.selected-menu-item) .text-xl{color:var(--text-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{height:calc(100vh - 60px);overflow-y:auto;overflow-x:hidden}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:#fff!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem:not(.p-focus)>.p-menuitem-content .p-menuitem-link{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important;color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-icon{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-text{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}.no-documents-message{padding:12px 16px;text-align:center}.no-documents-message .text-muted{color:#9ea0b3;font-size:14px;font-style:italic}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7$1.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "component", type: i8$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i9$2.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
6426
6635
  }
6427
6636
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, decorators: [{
6428
6637
  type: Component,
6429
- args: [{ selector: 'lib-documents-menu', standalone: false, template: "<div class=\"document-sidebar-container h-full\">\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"categories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label === 'Application' ? 'Application Documents' : item.label }}</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;border:none!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important}::ng-deep .p-menuitem-link:not(.selected-menu-item) .text-xl{color:var(--text-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{height:calc(100% - 38px)}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:#fff!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem:not(.p-focus)>.p-menuitem-content .p-menuitem-link{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important;color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-icon{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-text{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}.no-documents-message{padding:12px 16px;text-align:center}.no-documents-message .text-muted{color:#9ea0b3;font-size:14px;font-style:italic}\n"] }]
6638
+ args: [{ selector: 'lib-documents-menu', standalone: false, template: "<div class=\"document-sidebar-container h-full\">\n <!-- Menu items are now used for navigation to specific sections, not for filtering documents -->\n <p-card class=\"widget-menu-wrapper h-full\">\n @if(applicationNumber){\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\n <div class=\"expand-icon-wrapper\">\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\n </div>\n </div>\n }\n\n <div class=\"widget-menu-container\" >\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\n <p-menu [model]=\"categories\" styleClass=\"w-full md:w-15rem\">\n <ng-template pTemplate=\"submenuheader\" let-item>\n <span [style]=\"{\n color : '#9EA0B3'\n }\">{{ item.label === 'Application' ? 'Application Documents' : item.label }}</span>\n </ng-template>\n <ng-template pTemplate=\"item\" let-item>\n <a pRipple \n class=\"flex align-items-center p-menuitem-link\"\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\n (click)=\"onMenuItemClick($event, item)\">\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\n <span class=\"ml-2\">{{ item.label }}</span>\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \n class=\"ml-auto\" \n [severity]=\"item.menuData?.badgeSeverity\" \n [value]=\"item.menuData?.badgeValue\" />\n </a>\n </ng-template>\n </p-menu>\n </div>\n </div>\n </p-card>\n</div>\n\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;border:none!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important}::ng-deep .p-menuitem-link:not(.selected-menu-item) .text-xl{color:var(--text-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{height:calc(100vh - 60px);overflow-y:auto;overflow-x:hidden}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:#fff!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem:not(.p-focus)>.p-menuitem-content .p-menuitem-link{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important;color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-icon{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-text{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}.no-documents-message{padding:12px 16px;text-align:center}.no-documents-message .text-muted{color:#9ea0b3;font-size:14px;font-style:italic}\n"] }]
6430
6639
  }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }, { type: DocumentMenuService }, { type: DocumentHelperService }], propDecorators: { catagories: [{
6431
6640
  type: Input
6432
6641
  }], applicationNumber: [{
6433
6642
  type: Input
6434
6643
  }], contextId: [{
6435
6644
  type: Input
6645
+ }], menuItemSelected: [{
6646
+ type: Output
6436
6647
  }] } });
6437
6648
 
6438
6649
  /**
@@ -6441,26 +6652,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
6441
6652
  * @typedef {DocumentContainerComponent}
6442
6653
  */
6443
6654
  class DocumentContainerComponent {
6444
- documentStore;
6445
- documentService;
6446
- documentQuery;
6447
6655
  documentHttpService;
6448
6656
  documentHelperService;
6657
+ documentQuery;
6658
+ documentStore;
6659
+ /**
6660
+ * The document list response data
6661
+ * @type {DocumentListResponse[] | null}
6662
+ */
6663
+ documentListResponse = null;
6664
+ /**
6665
+ * Status data for the current selection
6666
+ * @type {StatusDataModel[]}
6667
+ */
6668
+ statusData = [];
6669
+ /**
6670
+ * The currently selected menu item ID for scrolling
6671
+ */
6672
+ selectedMenuItemId = null;
6673
+ /**
6674
+ * Additional navigation information for better scrolling
6675
+ */
6676
+ navigationInfo = null;
6677
+ /**
6678
+ * Reference to the content scroll container
6679
+ */
6680
+ contentScrollContainer;
6681
+ /**
6682
+ * Subscription to track selected menu item changes
6683
+ */
6684
+ selectedMenuItemSubscription = new Subscription();
6449
6685
  /**
6450
6686
  * Creates an instance of DocumentContainerComponent.
6451
- * @param {DocumentStore} documentStore - Query Store service to manage store document-related state.
6452
- * @param {DocumentService} documentService - Service to manage document-related operations.
6453
- * @param {DocumentQuery} documentQuery - Query service to manage document-related state.
6454
- * @param {DocumentHttpService} documentHttpService - Service to make HTTP requests related to documents.
6687
+ * @param {DocumentHttpService} documentHttpService - Service for HTTP operations
6688
+ * @param {DocumentHelperService} documentHelperService - Service for document operations
6689
+ * @param {DocumentQuery} documentQuery - Query service for document state
6690
+ * @param {DocumentStore} documentStore - Store service for document state
6455
6691
  */
6456
- constructor(documentStore, documentService, documentQuery, documentHttpService, documentHelperService) {
6457
- // Note: initializeSelectionWatcher now requires contextId
6458
- // This should be called from the component that has access to contextId
6459
- this.documentStore = documentStore;
6460
- this.documentService = documentService;
6461
- this.documentQuery = documentQuery;
6692
+ constructor(documentHttpService, documentHelperService, documentQuery, documentStore) {
6462
6693
  this.documentHttpService = documentHttpService;
6463
6694
  this.documentHelperService = documentHelperService;
6695
+ this.documentQuery = documentQuery;
6696
+ this.documentStore = documentStore;
6464
6697
  }
6465
6698
  /**
6466
6699
  * Get contextId in input.
@@ -6474,19 +6707,8 @@ class DocumentContainerComponent {
6474
6707
  applicationNumber = SHARED.EMPTY;
6475
6708
  catagories = SHARED.EMPTY_ARRAY;
6476
6709
  userList = SHARED.EMPTY_ARRAY;
6477
- /**
6478
- * Status data for the current selection
6479
- * @type {StatusDataModel[]}
6480
- */
6481
- statusData = [];
6482
- /**
6483
- * Document list response from API
6484
- * @type {DocumentListResponse | null}
6485
- */
6486
- documentListResponse = null;
6487
6710
  /**
6488
6711
  * Holds the subscription to manage observable cleanup.
6489
- * @
6490
6712
  * @type {Subscription}
6491
6713
  */
6492
6714
  subscription = new Subscription();
@@ -6495,19 +6717,51 @@ class DocumentContainerComponent {
6495
6717
  */
6496
6718
  ngOnChanges(changes) {
6497
6719
  if (changes[SHARED.CONTEXT_ID] && !changes[SHARED.CONTEXT_ID].firstChange) {
6498
- // When contextId changes, clear all state and refetch data for the new context
6499
6720
  this.handleContextIdChange();
6500
6721
  }
6501
6722
  }
6502
6723
  /**
6503
- * Fetches the folder and document data on initialization.
6504
- * @returns {void}
6724
+ * Initializes the component
6505
6725
  */
6506
6726
  ngOnInit() {
6507
6727
  this.clearAllState();
6508
6728
  if (this.contextId && this.contextId !== SHARED.EMPTY) {
6509
6729
  this.initializeData();
6510
6730
  }
6731
+ this.setupSelectedMenuItemSubscription();
6732
+ }
6733
+ /**
6734
+ * Sets up subscription to track selected menu item changes
6735
+ */
6736
+ setupSelectedMenuItemSubscription() {
6737
+ this.selectedMenuItemSubscription.add(this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
6738
+ this.selectedMenuItemId = menuItemId;
6739
+ }));
6740
+ }
6741
+ /**
6742
+ * Handles menu item selection events from the documents menu
6743
+ * @param event - The menu item selection event
6744
+ */
6745
+ onMenuItemSelected(event) {
6746
+ if (event && event.navigationInfo) {
6747
+ this.navigationInfo = event.navigationInfo;
6748
+ }
6749
+ else {
6750
+ this.navigationInfo = null;
6751
+ this.resetContentScrollToTop();
6752
+ }
6753
+ }
6754
+ /**
6755
+ * Resets the content scroll container to the top
6756
+ */
6757
+ resetContentScrollToTop() {
6758
+ if (this.contentScrollContainer) {
6759
+ this.contentScrollContainer.nativeElement.scrollTo({
6760
+ top: 0,
6761
+ behavior: 'smooth'
6762
+ });
6763
+ console.log('Container: Reset scroll to top');
6764
+ }
6511
6765
  }
6512
6766
  /**
6513
6767
  * Initialize all data with proper sequencing to avoid duplicate API calls
@@ -6538,6 +6792,8 @@ class DocumentContainerComponent {
6538
6792
  this.statusData = [];
6539
6793
  this.documentListResponse = null;
6540
6794
  this.applicationNumber = SHARED.EMPTY;
6795
+ this.selectedMenuItemId = null;
6796
+ this.navigationInfo = null;
6541
6797
  }
6542
6798
  /**
6543
6799
  * Handles contextId change by clearing all state and refetching data
@@ -6556,12 +6812,6 @@ class DocumentContainerComponent {
6556
6812
  * to trigger status data fetching and user list refreshing
6557
6813
  */
6558
6814
  setupStatusDataSubscriptions() {
6559
- this.subscription.add(this.documentQuery.selectSelectedMenuItem().subscribe(menuItem => {
6560
- this.fetchStatusData();
6561
- if (this.catagories.length > 0) {
6562
- this.fetchUserListWithFilters();
6563
- }
6564
- }));
6565
6815
  this.subscription.add(this.documentQuery.selectSelectedUserId().subscribe(userId => {
6566
6816
  this.fetchStatusData();
6567
6817
  if (this.catagories.length > 0) {
@@ -6586,8 +6836,8 @@ class DocumentContainerComponent {
6586
6836
  }
6587
6837
  const currentState = this.documentQuery.getSelectionState();
6588
6838
  const contextId = currentState.userId || null;
6589
- const categoryId = currentState.menuItem || null;
6590
- this.documentHttpService.getStatusDocumentCount(this.contextId, contextId, categoryId).subscribe({
6839
+ // No category filtering - removed menu item dependency
6840
+ this.documentHttpService.getStatusDocumentCount(this.contextId, contextId, null).subscribe({
6591
6841
  next: (statusData) => {
6592
6842
  this.statusData = statusData;
6593
6843
  this.documentStore.setStatusData(statusData);
@@ -6670,16 +6920,22 @@ class DocumentContainerComponent {
6670
6920
  if (this.subscription) {
6671
6921
  this.subscription.unsubscribe();
6672
6922
  }
6923
+ if (this.selectedMenuItemSubscription) {
6924
+ this.selectedMenuItemSubscription.unsubscribe();
6925
+ }
6673
6926
  this.documentHelperService.cleanupSelectionWatcher();
6674
6927
  this.clearAllState();
6675
6928
  }
6676
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentStore }, { token: DocumentService }, { token: DocumentQuery }, { token: DocumentHttpService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
6677
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-2 lg:col-2\">\r\n <lib-documents-menu [catagories]=\"catagories\" [applicationNumber]=\"applicationNumber\" [contextId]=\"contextId\"></lib-documents-menu>\r\n </div>\r\n <div class=\"col-12 md:col-10 lg:col-10 p-0 h-full\" [ngClass]=\"{'custom-scroll': true}\">\r\n <div class=\"card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div >\r\n <lib-document-list [contextId]=\"contextId\" [documentListResponse]=\"documentListResponse\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "documentList"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["catagories", "applicationNumber", "contextId"] }] });
6929
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: DocumentQuery }, { token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
6930
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId" }, viewQueries: [{ propertyName: "contentScrollContainer", first: true, predicate: ["contentScrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-container-layout\">\r\n <!-- Fixed Left Menu -->\r\n <div class=\"menu-panel\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div>\r\n \r\n <!-- Scrollable Right Content -->\r\n <div class=\"content-panel\" #contentScrollContainer>\r\n <div class=\"card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div>\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-container-layout{display:flex;height:98vh;overflow:auto;position:relative}.menu-panel{position:fixed;left:0;top:0;bottom:0;width:280px;background-color:#fff;overflow-y:auto;overflow-x:hidden}.menu-panel::-webkit-scrollbar{width:6px}.menu-panel::-webkit-scrollbar-track{background:#f1f5f9}.menu-panel::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}.menu-panel::-webkit-scrollbar-thumb:hover{background:#94a3b8}.content-panel{flex:1;margin-left:280px;display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:1}.content-panel::-webkit-scrollbar{width:8px}.content-panel::-webkit-scrollbar-track{background:#f8fafc}.content-panel::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}.content-panel::-webkit-scrollbar-thumb:hover{background:#94a3b8}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{flex-direction:column}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{overflow:hidden;height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"], dependencies: [{ kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "selectedMenuItemId", "navigationInfo", "documentList"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["catagories", "applicationNumber", "contextId"], outputs: ["menuItemSelected"] }] });
6678
6931
  }
6679
6932
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, decorators: [{
6680
6933
  type: Component,
6681
- args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-2 lg:col-2\">\r\n <lib-documents-menu [catagories]=\"catagories\" [applicationNumber]=\"applicationNumber\" [contextId]=\"contextId\"></lib-documents-menu>\r\n </div>\r\n <div class=\"col-12 md:col-10 lg:col-10 p-0 h-full\" [ngClass]=\"{'custom-scroll': true}\">\r\n <div class=\"card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div >\r\n <lib-document-list [contextId]=\"contextId\" [documentListResponse]=\"documentListResponse\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"] }]
6682
- }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentService }, { type: DocumentQuery }, { type: DocumentHttpService }, { type: DocumentHelperService }], propDecorators: { contextId: [{
6934
+ args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"document-container-layout\">\r\n <!-- Fixed Left Menu -->\r\n <div class=\"menu-panel\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div>\r\n \r\n <!-- Scrollable Right Content -->\r\n <div class=\"content-panel\" #contentScrollContainer>\r\n <div class=\"card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div>\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-container-layout{display:flex;height:98vh;overflow:auto;position:relative}.menu-panel{position:fixed;left:0;top:0;bottom:0;width:280px;background-color:#fff;overflow-y:auto;overflow-x:hidden}.menu-panel::-webkit-scrollbar{width:6px}.menu-panel::-webkit-scrollbar-track{background:#f1f5f9}.menu-panel::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}.menu-panel::-webkit-scrollbar-thumb:hover{background:#94a3b8}.content-panel{flex:1;margin-left:280px;display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:1}.content-panel::-webkit-scrollbar{width:8px}.content-panel::-webkit-scrollbar-track{background:#f8fafc}.content-panel::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}.content-panel::-webkit-scrollbar-thumb:hover{background:#94a3b8}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{flex-direction:column}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{overflow:hidden;height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"] }]
6935
+ }], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: DocumentQuery }, { type: DocumentStore }], propDecorators: { contentScrollContainer: [{
6936
+ type: ViewChild,
6937
+ args: ['contentScrollContainer', { static: false }]
6938
+ }], contextId: [{
6683
6939
  type: Input
6684
6940
  }] } });
6685
6941