cat-documents-ng 0.2.35 → 0.2.38
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.
- package/Shared/components/table-primary/table-primary.component.d.ts +8 -12
- package/Shared/components/table-primary/table-primary.model.d.ts +19 -0
- package/Shared/constant/SHARED.d.ts +60 -0
- package/Shared/constant/URLS.d.ts +1 -0
- package/fesm2022/cat-documents-ng.mjs +423 -200
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-history/document-history.component.d.ts +43 -0
- package/lib/document/components/document-list/document-list.component.d.ts +5 -5
- package/lib/document/components/document-status/document-status.component.d.ts +2 -2
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +16 -0
- package/lib/document/document.module.d.ts +30 -29
- package/lib/document/models/document-category.model.d.ts +8 -4
- package/lib/document/models/document-history.model.d.ts +60 -0
- package/lib/document/models/document-list-response.model.d.ts +1 -0
- package/lib/document/services/document-history-style.service.d.ts +29 -0
- package/lib/document/services/document-http.service.d.ts +2 -0
- package/lib/document/services/document-table-builder.service.d.ts +1 -19
- package/lib/document/services/status-calculator.service.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, EventEmitter, Output, Input, Component, ViewChild, ViewEncapsulation, Directive, NgModule, APP_INITIALIZER } from '@angular/core';
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { firstValueFrom, tap, EMPTY, catchError, throwError, combineLatest, Subscription } from 'rxjs';
|
|
5
|
+
import { firstValueFrom, tap, EMPTY, catchError, throwError, of, combineLatest, Subscription } from 'rxjs';
|
|
6
6
|
import { __decorate } from 'tslib';
|
|
7
7
|
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
8
8
|
import * as i2 from '@angular/common/http';
|
|
@@ -34,13 +34,14 @@ import * as i8$1 from 'primeng/progressbar';
|
|
|
34
34
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
35
35
|
import * as i4 from 'ng2-pdf-viewer';
|
|
36
36
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
|
37
|
+
import * as i3$1 from 'primeng/accordion';
|
|
38
|
+
import { AccordionModule } from 'primeng/accordion';
|
|
37
39
|
import * as i7$1 from 'primeng/badge';
|
|
38
40
|
import { BadgeModule } from 'primeng/badge';
|
|
39
41
|
import * as i8$2 from 'primeng/menu';
|
|
40
42
|
import { MenuModule } from 'primeng/menu';
|
|
41
43
|
import * as i9$1 from 'primeng/card';
|
|
42
44
|
import { CardModule } from 'primeng/card';
|
|
43
|
-
import { AccordionModule } from 'primeng/accordion';
|
|
44
45
|
import { ListboxModule } from 'primeng/listbox';
|
|
45
46
|
import { TimelineModule } from 'primeng/timeline';
|
|
46
47
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
@@ -350,6 +351,102 @@ class SHARED {
|
|
|
350
351
|
static STATUS_WITH_DASH = 'status-';
|
|
351
352
|
static ICON_WITH_DASH = 'icon-';
|
|
352
353
|
static SEARCH_KEY = 'searchKey';
|
|
354
|
+
static APPROVED = 'approved';
|
|
355
|
+
static UPLOADED = 'uploaded';
|
|
356
|
+
static PENDING = 'Pending';
|
|
357
|
+
static DOT = '.';
|
|
358
|
+
static PDF = 'PDF';
|
|
359
|
+
static PENDING_STATUS = 'pending';
|
|
360
|
+
// File extension constants
|
|
361
|
+
static JPG = 'JPG';
|
|
362
|
+
static PNG = 'PNG';
|
|
363
|
+
static XLSX = 'XLSX';
|
|
364
|
+
// Status constants
|
|
365
|
+
static APPROVED_STATUS = 'approved';
|
|
366
|
+
static ALERT_STATUS = 'alert';
|
|
367
|
+
static UPLOADED_STATUS = 'uploaded';
|
|
368
|
+
static REVIEWING_STATUS = 'reviewing';
|
|
369
|
+
static REJECTED_STATUS = 'rejected';
|
|
370
|
+
static REQUESTED_STATUS = 'document requested';
|
|
371
|
+
// Status class constants
|
|
372
|
+
static STATUS_PENDING_CLASS = 'status-pending';
|
|
373
|
+
static STATUS_APPROVED_CLASS = 'status-approved';
|
|
374
|
+
static STATUS_ALERT_CLASS = 'status-alert';
|
|
375
|
+
static STATUS_UPLOADED_CLASS = 'status-uploaded';
|
|
376
|
+
static STATUS_REVIEWING_CLASS = 'status-reviewing';
|
|
377
|
+
static STATUS_REJECTED_CLASS = 'status-rejected';
|
|
378
|
+
// Icon constants
|
|
379
|
+
static ICON_CHECK = 'pi pi-check';
|
|
380
|
+
static ICON_EXCLAMATION_TRIANGLE = 'pi pi-exclamation-triangle';
|
|
381
|
+
static ICON_CLOUD_UPLOAD = 'pi pi-cloud-upload';
|
|
382
|
+
static ICON_EYE = 'pi pi-eye';
|
|
383
|
+
static ICON_TIMES = 'pi pi-times';
|
|
384
|
+
static ICON_CLOCK = 'pi pi-clock';
|
|
385
|
+
// Text color constants
|
|
386
|
+
static TEXT_COLOR_GREEN = 'text-green-600';
|
|
387
|
+
static TEXT_COLOR_RED = 'text-red-600';
|
|
388
|
+
static TEXT_COLOR_GRAY = 'text-gray-600';
|
|
389
|
+
// Background color constants
|
|
390
|
+
static BG_COLOR_GREEN = 'bg-green-50';
|
|
391
|
+
static BG_COLOR_RED = 'bg-red-50';
|
|
392
|
+
static BG_COLOR_GRAY = 'bg-gray-50';
|
|
393
|
+
// Border color constants
|
|
394
|
+
static BORDER_COLOR_GREEN = 'border-green-200';
|
|
395
|
+
static BORDER_COLOR_RED = 'border-red-200';
|
|
396
|
+
static BORDER_COLOR_GRAY = 'border-gray-200';
|
|
397
|
+
// Icon background color constants
|
|
398
|
+
static ICON_BG_GREEN = 'icon-bg-green';
|
|
399
|
+
static ICON_BG_RED = 'icon-bg-red';
|
|
400
|
+
static ICON_BG_BLUE = 'icon-bg-blue';
|
|
401
|
+
static ICON_BG_GRAY = 'icon-bg-gray';
|
|
402
|
+
// File type icons
|
|
403
|
+
static ICON_FILE_PDF = 'pi pi-file-pdf';
|
|
404
|
+
static ICON_IMAGE = 'pi pi-image';
|
|
405
|
+
static ICON_FILE_EXCEL = 'pi pi-file-excel';
|
|
406
|
+
static ICON_FILE = 'pi pi-file';
|
|
407
|
+
static ICON_DELETE = 'ri-delete-bin-6-line';
|
|
408
|
+
// Cell type constants
|
|
409
|
+
static CELL_TYPE_DOCUMENT = 'document';
|
|
410
|
+
static CELL_TYPE_STATUS = 'status';
|
|
411
|
+
static CELL_TYPE_ACTIONS = 'actions';
|
|
412
|
+
static CELL_TYPE_TEXT = 'text';
|
|
413
|
+
/**
|
|
414
|
+
* Document table columns configuration
|
|
415
|
+
* @static
|
|
416
|
+
* @type {Array<{field: string, header: string, type: 'text' | 'status' | 'document' | 'actions', width: string}>}
|
|
417
|
+
*/
|
|
418
|
+
static DOCUMENT_TABLE_COLUMNS = [
|
|
419
|
+
{
|
|
420
|
+
field: 'docName',
|
|
421
|
+
header: 'Document',
|
|
422
|
+
type: 'document',
|
|
423
|
+
width: '35%'
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
field: 'status',
|
|
427
|
+
header: 'Status',
|
|
428
|
+
type: 'status',
|
|
429
|
+
width: '15%'
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
field: 'ownerName',
|
|
433
|
+
header: 'Owner',
|
|
434
|
+
type: 'text',
|
|
435
|
+
width: '20%'
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
field: 'uploadedOn',
|
|
439
|
+
header: 'Uploaded',
|
|
440
|
+
type: 'text',
|
|
441
|
+
width: '15%'
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
field: 'actions',
|
|
445
|
+
header: 'Actions',
|
|
446
|
+
type: 'actions',
|
|
447
|
+
width: '15%'
|
|
448
|
+
}
|
|
449
|
+
];
|
|
353
450
|
}
|
|
354
451
|
/**
|
|
355
452
|
* `DUMMYDOCUMENTLIST` is a mock list of document objects used for testing and development purposes.
|
|
@@ -839,6 +936,7 @@ class URLS {
|
|
|
839
936
|
static CONTEXT_ID = "&contextId=";
|
|
840
937
|
static GETALL = "documents/getAllByContextId";
|
|
841
938
|
static DOCUMENT_LIST = "list";
|
|
939
|
+
static DOCUMENT_HISTORY = "documents/getDocumentHistoryByDocumentId/";
|
|
842
940
|
}
|
|
843
941
|
|
|
844
942
|
/**
|
|
@@ -1298,8 +1396,10 @@ class DocumentHttpService {
|
|
|
1298
1396
|
return EMPTY;
|
|
1299
1397
|
let url = `${this.apiUrl}${URLS.STATUS_DOCUMENT_COUNT}${applicationId}`;
|
|
1300
1398
|
let params = new HttpParams();
|
|
1301
|
-
const contextParam = contextId ||
|
|
1302
|
-
|
|
1399
|
+
const contextParam = contextId || null;
|
|
1400
|
+
if (contextParam) {
|
|
1401
|
+
params = params.set(SHARED.CONTEXT_ID, contextParam);
|
|
1402
|
+
}
|
|
1303
1403
|
if (categoryId) {
|
|
1304
1404
|
params = params.set(SHARED.CATEGORY, categoryId);
|
|
1305
1405
|
}
|
|
@@ -1341,6 +1441,12 @@ class DocumentHttpService {
|
|
|
1341
1441
|
return throwError(() => new Error(error));
|
|
1342
1442
|
}));
|
|
1343
1443
|
}
|
|
1444
|
+
getDocumentHistory(documentId) {
|
|
1445
|
+
if (!documentId) {
|
|
1446
|
+
return of([]);
|
|
1447
|
+
}
|
|
1448
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`);
|
|
1449
|
+
}
|
|
1344
1450
|
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 });
|
|
1345
1451
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, providedIn: 'root' });
|
|
1346
1452
|
}
|
|
@@ -1376,20 +1482,12 @@ class DocumentHelperService {
|
|
|
1376
1482
|
this.documentQuery.selectSelectedStatus()
|
|
1377
1483
|
]).pipe(debounceTime(300), distinctUntilChanged((prev, curr) => {
|
|
1378
1484
|
const isSame = prev[0] === curr[0] && prev[1] === curr[1] && prev[2] === curr[2];
|
|
1379
|
-
console.log('Selection state changed:', { prev, curr, isSame });
|
|
1380
1485
|
return isSame;
|
|
1381
1486
|
}), switchMap(([menuItem, userId, status]) => {
|
|
1382
|
-
// Always call the API, even when filters are cleared
|
|
1383
1487
|
return this.documentHttpService.getDocumentsBySelection(contextId, menuItem, userId, status);
|
|
1384
1488
|
})).subscribe({
|
|
1385
1489
|
next: (response) => {
|
|
1386
1490
|
const currentState = this.documentQuery.getSelectionState();
|
|
1387
|
-
console.log('API called with filters:', {
|
|
1388
|
-
menuItem: currentState.menuItem,
|
|
1389
|
-
userId: currentState.userId,
|
|
1390
|
-
status: currentState.status
|
|
1391
|
-
});
|
|
1392
|
-
console.log('API response:', response);
|
|
1393
1491
|
this.documentStore.setDocumentListResponse(response);
|
|
1394
1492
|
},
|
|
1395
1493
|
error: (error) => {
|
|
@@ -1402,17 +1500,14 @@ class DocumentHelperService {
|
|
|
1402
1500
|
* @param contextId - The context ID to use for API calls
|
|
1403
1501
|
*/
|
|
1404
1502
|
initializeSelectionWatcherWithInitialLoad(contextId) {
|
|
1405
|
-
// First, load initial data without filters
|
|
1406
1503
|
this.documentHttpService.getDocumentsBySelection(contextId, null, null, null).subscribe({
|
|
1407
1504
|
next: (response) => {
|
|
1408
|
-
console.log('Initial API call:', response);
|
|
1409
1505
|
this.documentStore.setDocumentListResponse(response);
|
|
1410
1506
|
},
|
|
1411
1507
|
error: (error) => {
|
|
1412
1508
|
console.error('Error calling initial API:', error);
|
|
1413
1509
|
}
|
|
1414
1510
|
});
|
|
1415
|
-
// Then set up the watcher for filter changes
|
|
1416
1511
|
this.initializeSelectionWatcher(contextId);
|
|
1417
1512
|
}
|
|
1418
1513
|
/**
|
|
@@ -1499,10 +1594,8 @@ class DocumentHelperService {
|
|
|
1499
1594
|
*/
|
|
1500
1595
|
refreshDocumentsWithCurrentSelection(contextId) {
|
|
1501
1596
|
const currentState = this.documentQuery.getSelectionState();
|
|
1502
|
-
console.log('Manual API refresh with state:', currentState);
|
|
1503
1597
|
this.documentHttpService.getDocumentsBySelection(contextId, currentState.menuItem, currentState.userId, currentState.status).subscribe({
|
|
1504
1598
|
next: (response) => {
|
|
1505
|
-
console.log('Manual API refresh response:', response);
|
|
1506
1599
|
this.documentStore.setDocumentListResponse(response);
|
|
1507
1600
|
},
|
|
1508
1601
|
error: (error) => {
|
|
@@ -1515,10 +1608,8 @@ class DocumentHelperService {
|
|
|
1515
1608
|
* @param contextId - The context ID to use for the API call
|
|
1516
1609
|
*/
|
|
1517
1610
|
refreshDocumentsWithoutFilters(contextId) {
|
|
1518
|
-
console.log('Force refreshing documents without filters');
|
|
1519
1611
|
this.documentHttpService.getDocumentsBySelection(contextId, null, null, null).subscribe({
|
|
1520
1612
|
next: (response) => {
|
|
1521
|
-
console.log('Force refresh response:', response);
|
|
1522
1613
|
this.documentStore.setDocumentListResponse(response);
|
|
1523
1614
|
},
|
|
1524
1615
|
error: (error) => {
|
|
@@ -1715,7 +1806,7 @@ class UserListComponent {
|
|
|
1715
1806
|
}
|
|
1716
1807
|
}
|
|
1717
1808
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, deps: [{ token: DocumentHelperService }, { token: DocumentStore }, { token: DocumentQuery }, { token: UserListService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1718
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UserListComponent, isStandalone: false, selector: "lib-user-list", inputs: { userList: "userList", categories: "categories" }, outputs: { userSelected: "userSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? '#f97316' : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n {{ user.approved }} approved / {{ user.pending }} pending\r\n </div>\r\n </div>\r\n <div class=\"selection-indicator\" *ngIf=\"selectedUser === user.name\" [@fadeIn]>\r\n <i class=\"ri-check-line\"></i>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem}.user-cards{display:flex;flex-wrap:wrap;gap:1rem;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:330px;position:relative}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px}.avatar-orange{background-color:#f97316}.avatar-blue{background-color:#3b82f6}.avatar-green{background-color:#10b981}.avatar-grey{background-color:#6b7280}.avatar-purple{background-color:#8b5cf6}.user-info{flex:1}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem}.document-counts{font-size:.875rem;color:#6b7280}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
|
|
1809
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UserListComponent, isStandalone: false, selector: "lib-user-list", inputs: { userList: "userList", categories: "categories" }, outputs: { userSelected: "userSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? '#f97316' : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n {{ user.approved }} approved / {{ user.pending }} pending\r\n </div>\r\n </div>\r\n <div class=\"selection-indicator\" *ngIf=\"selectedUser === user.name\" [@fadeIn]>\r\n <i class=\"ri-check-line\"></i>\r\n </div>\r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem}.user-cards{display:flex;flex-wrap:wrap;gap:1rem;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:330px;position:relative}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px}.avatar-orange{background-color:#f97316}.avatar-blue{background-color:#3b82f6}.avatar-green{background-color:#10b981}.avatar-grey{background-color:#6b7280}.avatar-purple{background-color:#8b5cf6}.user-info{flex:1}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem}.document-counts{font-size:.875rem;color:#6b7280}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
|
|
1719
1810
|
trigger('slideInFromTop', [
|
|
1720
1811
|
state('void', style({
|
|
1721
1812
|
opacity: 0,
|
|
@@ -1773,7 +1864,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1773
1864
|
animate('200ms ease-in-out')
|
|
1774
1865
|
])
|
|
1775
1866
|
])
|
|
1776
|
-
], template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? '#f97316' : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n {{ user.approved }} approved / {{ user.pending }} pending\r\n </div>\r\n </div>\r\n <div class=\"selection-indicator\" *ngIf=\"selectedUser === user.name\" [@fadeIn]>\r\n <i class=\"ri-check-line\"></i>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem}.user-cards{display:flex;flex-wrap:wrap;gap:1rem;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:330px;position:relative}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px}.avatar-orange{background-color:#f97316}.avatar-blue{background-color:#3b82f6}.avatar-green{background-color:#10b981}.avatar-grey{background-color:#6b7280}.avatar-purple{background-color:#8b5cf6}.user-info{flex:1}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem}.document-counts{font-size:.875rem;color:#6b7280}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"] }]
|
|
1867
|
+
], template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? '#f97316' : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n {{ user.approved }} approved / {{ user.pending }} pending\r\n </div>\r\n </div>\r\n <div class=\"selection-indicator\" *ngIf=\"selectedUser === user.name\" [@fadeIn]>\r\n <i class=\"ri-check-line\"></i>\r\n </div>\r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem}.user-cards{display:flex;flex-wrap:wrap;gap:1rem;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:330px;position:relative}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px}.avatar-orange{background-color:#f97316}.avatar-blue{background-color:#3b82f6}.avatar-green{background-color:#10b981}.avatar-grey{background-color:#6b7280}.avatar-purple{background-color:#8b5cf6}.user-info{flex:1}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem}.document-counts{font-size:.875rem;color:#6b7280}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"] }]
|
|
1777
1868
|
}], ctorParameters: () => [{ type: DocumentHelperService }, { type: DocumentStore }, { type: DocumentQuery }, { type: UserListService }], propDecorators: { userList: [{
|
|
1778
1869
|
type: Input
|
|
1779
1870
|
}], categories: [{
|
|
@@ -1786,14 +1877,14 @@ class StatusCalculatorService {
|
|
|
1786
1877
|
calculateTotalCount(statusData) {
|
|
1787
1878
|
return statusData?.reduce((total, status) => total + (status.count ?? 0), 0) || 0;
|
|
1788
1879
|
}
|
|
1789
|
-
calculateStatusDataWithPercentages(statusData,
|
|
1880
|
+
calculateStatusDataWithPercentages(statusData, selectedStatus) {
|
|
1790
1881
|
if (!statusData)
|
|
1791
1882
|
return [];
|
|
1792
1883
|
const totalCount = this.calculateTotalCount(statusData);
|
|
1793
1884
|
return statusData.map((status) => ({
|
|
1794
1885
|
...status,
|
|
1795
1886
|
percentage: totalCount > 0 ? (status.count ?? 0) / totalCount * 100 : 0,
|
|
1796
|
-
isSelected:
|
|
1887
|
+
isSelected: selectedStatus === status.status,
|
|
1797
1888
|
statusClass: status.status ? SHARED.STATUS_WITH_DASH + status.status.toLowerCase() : SHARED.EMPTY,
|
|
1798
1889
|
iconClass: SHARED.ICON_WITH_DASH + (status?.status?.toLowerCase() || SHARED.EMPTY)
|
|
1799
1890
|
}));
|
|
@@ -1814,7 +1905,7 @@ class DocumentStatusComponent {
|
|
|
1814
1905
|
statusCalculatorService;
|
|
1815
1906
|
contextId = SHARED.EMPTY;
|
|
1816
1907
|
statusData;
|
|
1817
|
-
|
|
1908
|
+
selectedStatus = null;
|
|
1818
1909
|
statusDataWithPercentages = [];
|
|
1819
1910
|
subscription = new Subscription();
|
|
1820
1911
|
constructor(documentQuery, documentService, statusCalculatorService) {
|
|
@@ -1823,9 +1914,8 @@ class DocumentStatusComponent {
|
|
|
1823
1914
|
this.statusCalculatorService = statusCalculatorService;
|
|
1824
1915
|
}
|
|
1825
1916
|
ngOnInit() {
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
this.selectedStatusId = statusId;
|
|
1917
|
+
this.subscription.add(this.documentQuery.selectSelectedStatus().subscribe(status => {
|
|
1918
|
+
this.selectedStatus = status;
|
|
1829
1919
|
this.updateCalculatedStatusData();
|
|
1830
1920
|
}));
|
|
1831
1921
|
this.subscription.add(this.documentQuery.selectStatusData().subscribe(statusData => {
|
|
@@ -1838,20 +1928,19 @@ class DocumentStatusComponent {
|
|
|
1838
1928
|
ngOnDestroy() {
|
|
1839
1929
|
this.subscription.unsubscribe();
|
|
1840
1930
|
}
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
this.documentService.setSelectedStatus(newStatusId);
|
|
1931
|
+
selectStatus(status) {
|
|
1932
|
+
const newStatus = this.selectedStatus === status ? null : status;
|
|
1933
|
+
this.documentService.setSelectedStatus(newStatus);
|
|
1845
1934
|
}
|
|
1846
1935
|
updateCalculatedStatusData() {
|
|
1847
|
-
this.statusDataWithPercentages = this.statusCalculatorService.calculateStatusDataWithPercentages(this.statusData, this.
|
|
1936
|
+
this.statusDataWithPercentages = this.statusCalculatorService.calculateStatusDataWithPercentages(this.statusData, this.selectedStatus);
|
|
1848
1937
|
}
|
|
1849
1938
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStatusComponent, deps: [{ token: DocumentQuery }, { token: DocumentHelperService }, { token: StatusCalculatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1850
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentStatusComponent, isStandalone: false, selector: "lib-document-status", inputs: { contextId: "contextId", statusData: "statusData" }, ngImport: i0, template: "<div class=\"status-summary-container\">\r\n <div class=\"status-cards\">\r\n \r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"status-card {{ status.statusClass }}\"\r\n [class.selected]=\"status.isSelected\"\r\n (click)=\"selectStatus(status.
|
|
1939
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentStatusComponent, isStandalone: false, selector: "lib-document-status", inputs: { contextId: "contextId", statusData: "statusData" }, ngImport: i0, template: "<div class=\"status-summary-container\">\r\n <div class=\"status-cards\">\r\n \r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"status-card {{ status.statusClass }}\"\r\n [class.selected]=\"status.isSelected\"\r\n (click)=\"selectStatus(status.status || '')\"\r\n >\r\n <div class=\"status-icon {{ status.iconClass }}\">\r\n <i [class]=\"status.icon\"></i>\r\n </div>\r\n <div class=\"status-info\">\r\n <div class=\"status-count\">{{ status.count }}</div>\r\n <div class=\"status-name\">{{ status.status }}</div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"progress-bar-container\">\r\n <div class=\"progress-bar\">\r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"progress-segment\"\r\n [style.width.%]=\"status.percentage\"\r\n [style.background-color]=\"status.color\"\r\n ></div>\r\n </div>\r\n </div>\r\n</div>", styles: [".status-summary-container{padding:1rem}.status-cards{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}.status-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border-radius:8px;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:150px;flex:1;cursor:pointer;transition:all .2s ease;border:2px solid transparent}.status-card:hover{transform:translateY(-2px);box-shadow:0 4px 8px #00000026}.status-card.selected{border-width:3px!important;border-style:solid!important;box-shadow:0 4px 12px #0003}.status-card.selected.status-approved{border-color:#10b981!important;background:#ecfdf5!important}.status-card.selected.status-pending{border-color:#6b7280!important;background:#f8fafc!important}.status-card.selected.status-reviewing{border-color:#f59e0b!important;background:#fffbeb!important}.status-card.selected.status-rejected{border-color:#ef4444!important;background:#fff1f2!important}.status-card.selected.status-alert{border-color:#dc2626!important;background:#ef4444!important}.status-icon{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff}.icon-approved{background-color:#10b981}.icon-pending{background-color:#6b7280}.icon-reviewing{background-color:#f59e0b}.icon-rejected{background-color:#ef4444}.icon-alert{background-color:#dc2626}.status-info{flex:1}.status-name{font-weight:600;color:#1f2937;margin-bottom:.25rem}.status-count{font-size:1.5rem;font-weight:700;color:#374151}.progress-bar-container{margin-top:1rem}.progress-bar{height:8px;background-color:#e5e7eb;border-radius:4px;overflow:hidden;display:flex}.progress-segment{height:100%;transition:width .3s ease}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1851
1940
|
}
|
|
1852
1941
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStatusComponent, decorators: [{
|
|
1853
1942
|
type: Component,
|
|
1854
|
-
args: [{ selector: 'lib-document-status', standalone: false, template: "<div class=\"status-summary-container\">\r\n <div class=\"status-cards\">\r\n \r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"status-card {{ status.statusClass }}\"\r\n [class.selected]=\"status.isSelected\"\r\n (click)=\"selectStatus(status.
|
|
1943
|
+
args: [{ selector: 'lib-document-status', standalone: false, template: "<div class=\"status-summary-container\">\r\n <div class=\"status-cards\">\r\n \r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"status-card {{ status.statusClass }}\"\r\n [class.selected]=\"status.isSelected\"\r\n (click)=\"selectStatus(status.status || '')\"\r\n >\r\n <div class=\"status-icon {{ status.iconClass }}\">\r\n <i [class]=\"status.icon\"></i>\r\n </div>\r\n <div class=\"status-info\">\r\n <div class=\"status-count\">{{ status.count }}</div>\r\n <div class=\"status-name\">{{ status.status }}</div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"progress-bar-container\">\r\n <div class=\"progress-bar\">\r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"progress-segment\"\r\n [style.width.%]=\"status.percentage\"\r\n [style.background-color]=\"status.color\"\r\n ></div>\r\n </div>\r\n </div>\r\n</div>", styles: [".status-summary-container{padding:1rem}.status-cards{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}.status-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border-radius:8px;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:150px;flex:1;cursor:pointer;transition:all .2s ease;border:2px solid transparent}.status-card:hover{transform:translateY(-2px);box-shadow:0 4px 8px #00000026}.status-card.selected{border-width:3px!important;border-style:solid!important;box-shadow:0 4px 12px #0003}.status-card.selected.status-approved{border-color:#10b981!important;background:#ecfdf5!important}.status-card.selected.status-pending{border-color:#6b7280!important;background:#f8fafc!important}.status-card.selected.status-reviewing{border-color:#f59e0b!important;background:#fffbeb!important}.status-card.selected.status-rejected{border-color:#ef4444!important;background:#fff1f2!important}.status-card.selected.status-alert{border-color:#dc2626!important;background:#ef4444!important}.status-icon{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff}.icon-approved{background-color:#10b981}.icon-pending{background-color:#6b7280}.icon-reviewing{background-color:#f59e0b}.icon-rejected{background-color:#ef4444}.icon-alert{background-color:#dc2626}.status-info{flex:1}.status-name{font-weight:600;color:#1f2937;margin-bottom:.25rem}.status-count{font-size:1.5rem;font-weight:700;color:#374151}.progress-bar-container{margin-top:1rem}.progress-bar{height:8px;background-color:#e5e7eb;border-radius:4px;overflow:hidden;display:flex}.progress-segment{height:100%;transition:width .3s ease}\n"] }]
|
|
1855
1944
|
}], ctorParameters: () => [{ type: DocumentQuery }, { type: DocumentHelperService }, { type: StatusCalculatorService }], propDecorators: { contextId: [{
|
|
1856
1945
|
type: Input
|
|
1857
1946
|
}], statusData: [{
|
|
@@ -2161,108 +2250,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
2161
2250
|
|
|
2162
2251
|
class DocumentTableBuilderService {
|
|
2163
2252
|
constructor() { }
|
|
2164
|
-
/**
|
|
2165
|
-
* Gets document type from file name extension
|
|
2166
|
-
* @param fileName File name with extension
|
|
2167
|
-
* @returns Document type string
|
|
2168
|
-
*/
|
|
2169
|
-
getDocumentTypeFromFileName(fileName) {
|
|
2170
|
-
if (!fileName)
|
|
2171
|
-
return '';
|
|
2172
|
-
const extension = fileName.split('.').pop()?.toUpperCase();
|
|
2173
|
-
return extension || '';
|
|
2174
|
-
}
|
|
2175
|
-
/**
|
|
2176
|
-
* Builds table data for document categories
|
|
2177
|
-
* @param categories Array of document categories
|
|
2178
|
-
* @returns Array of TableData objects
|
|
2179
|
-
*/
|
|
2180
|
-
buildDocumentCategoriesTables(categories) {
|
|
2181
|
-
return categories.map(category => this.buildTableForCategory(category));
|
|
2182
|
-
}
|
|
2183
|
-
/**
|
|
2184
|
-
* Builds table data for a single document category
|
|
2185
|
-
* @param category Document category
|
|
2186
|
-
* @returns TableData object
|
|
2187
|
-
*/
|
|
2188
|
-
buildTableForCategory(category) {
|
|
2189
|
-
const columns = [
|
|
2190
|
-
{
|
|
2191
|
-
field: 'docName',
|
|
2192
|
-
header: 'Document',
|
|
2193
|
-
type: 'document',
|
|
2194
|
-
width: '35%'
|
|
2195
|
-
},
|
|
2196
|
-
{
|
|
2197
|
-
field: 'status',
|
|
2198
|
-
header: 'Status',
|
|
2199
|
-
type: 'status',
|
|
2200
|
-
width: '15%'
|
|
2201
|
-
},
|
|
2202
|
-
{
|
|
2203
|
-
field: 'ownerName',
|
|
2204
|
-
header: 'Owner',
|
|
2205
|
-
type: 'text',
|
|
2206
|
-
width: '20%'
|
|
2207
|
-
},
|
|
2208
|
-
{
|
|
2209
|
-
field: 'uploadedOn',
|
|
2210
|
-
header: 'Uploaded',
|
|
2211
|
-
type: 'text',
|
|
2212
|
-
width: '15%'
|
|
2213
|
-
},
|
|
2214
|
-
{
|
|
2215
|
-
field: 'actions',
|
|
2216
|
-
header: 'Actions',
|
|
2217
|
-
type: 'actions',
|
|
2218
|
-
width: '15%'
|
|
2219
|
-
}
|
|
2220
|
-
];
|
|
2221
|
-
return {
|
|
2222
|
-
columns: columns,
|
|
2223
|
-
data: category.list
|
|
2224
|
-
};
|
|
2225
|
-
}
|
|
2226
2253
|
/**
|
|
2227
2254
|
* Builds a single table from document list items
|
|
2228
2255
|
* @param documents Array of document list items
|
|
2229
2256
|
* @returns TableData object
|
|
2230
2257
|
*/
|
|
2231
2258
|
buildDocumentTable(documents) {
|
|
2232
|
-
const columns = [
|
|
2233
|
-
{
|
|
2234
|
-
field: 'docName',
|
|
2235
|
-
header: 'Document',
|
|
2236
|
-
type: 'document',
|
|
2237
|
-
width: '35%'
|
|
2238
|
-
},
|
|
2239
|
-
{
|
|
2240
|
-
field: 'status',
|
|
2241
|
-
header: 'Status',
|
|
2242
|
-
type: 'status',
|
|
2243
|
-
width: '15%'
|
|
2244
|
-
},
|
|
2245
|
-
{
|
|
2246
|
-
field: 'ownerName',
|
|
2247
|
-
header: 'Owner',
|
|
2248
|
-
type: 'text',
|
|
2249
|
-
width: '20%'
|
|
2250
|
-
},
|
|
2251
|
-
{
|
|
2252
|
-
field: 'uploadedOn',
|
|
2253
|
-
header: 'Uploaded',
|
|
2254
|
-
type: 'text',
|
|
2255
|
-
width: '15%'
|
|
2256
|
-
},
|
|
2257
|
-
{
|
|
2258
|
-
field: 'actions',
|
|
2259
|
-
header: 'Actions',
|
|
2260
|
-
type: 'actions',
|
|
2261
|
-
width: '15%'
|
|
2262
|
-
}
|
|
2263
|
-
];
|
|
2264
2259
|
return {
|
|
2265
|
-
columns:
|
|
2260
|
+
columns: SHARED.DOCUMENT_TABLE_COLUMNS,
|
|
2266
2261
|
data: documents
|
|
2267
2262
|
};
|
|
2268
2263
|
}
|
|
@@ -2273,8 +2268,8 @@ class DocumentTableBuilderService {
|
|
|
2273
2268
|
*/
|
|
2274
2269
|
getCompletionCount(category) {
|
|
2275
2270
|
const total = category.list.length;
|
|
2276
|
-
const completed = category.list.filter(doc => doc.status.toLowerCase() ===
|
|
2277
|
-
doc.status.toLowerCase() ===
|
|
2271
|
+
const completed = category.list.filter(doc => doc.status.toLowerCase() === SHARED.APPROVED ||
|
|
2272
|
+
doc.status.toLowerCase() === SHARED.UPLOADED).length;
|
|
2278
2273
|
return `${completed}/${total}`;
|
|
2279
2274
|
}
|
|
2280
2275
|
/**
|
|
@@ -2300,14 +2295,15 @@ class DocumentTableBuilderService {
|
|
|
2300
2295
|
*/
|
|
2301
2296
|
transformDocumentModelToListItem(documents) {
|
|
2302
2297
|
return documents.map(doc => ({
|
|
2303
|
-
_id: doc._id ||
|
|
2304
|
-
fileName: doc.fileName ||
|
|
2305
|
-
docName: doc.docName || doc.documentName ||
|
|
2306
|
-
fileSize: doc.fileSize ||
|
|
2307
|
-
documentUrl: doc.documentUrl || doc.url ||
|
|
2308
|
-
status: doc.status ||
|
|
2309
|
-
uploadedOn: doc.uploadedOn || doc.uploadDate ||
|
|
2310
|
-
ownerName: doc.ownerName || doc.applicantName ||
|
|
2298
|
+
_id: doc._id || SHARED.EMPTY,
|
|
2299
|
+
fileName: doc.fileName || SHARED.EMPTY,
|
|
2300
|
+
docName: doc.docName || doc.documentName || SHARED.EMPTY,
|
|
2301
|
+
fileSize: doc.fileSize || SHARED.EMPTY,
|
|
2302
|
+
documentUrl: doc.documentUrl || doc.url || SHARED.EMPTY,
|
|
2303
|
+
status: doc.status || SHARED.PENDING,
|
|
2304
|
+
uploadedOn: doc.uploadedOn || doc.uploadDate || SHARED.EMPTY,
|
|
2305
|
+
ownerName: doc.ownerName || doc.applicantName || SHARED.EMPTY,
|
|
2306
|
+
contentType: doc.contentType || SHARED.EMPTY
|
|
2311
2307
|
}));
|
|
2312
2308
|
}
|
|
2313
2309
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentTableBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -2325,60 +2321,85 @@ class TablePrimaryComponent {
|
|
|
2325
2321
|
showHeader = true;
|
|
2326
2322
|
tableStyle = { 'min-width': '100%' };
|
|
2327
2323
|
rowClick = new EventEmitter();
|
|
2328
|
-
|
|
2324
|
+
processedData = [];
|
|
2325
|
+
// Expose SHARED constants for template use
|
|
2326
|
+
SHARED = SHARED;
|
|
2327
|
+
ngOnChanges(changes) {
|
|
2328
|
+
if (changes['tableData'] && this.tableData) {
|
|
2329
|
+
this.processTableData();
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
processTableData() {
|
|
2333
|
+
this.processedData = this.tableData.data.map(rowData => {
|
|
2334
|
+
const processedRow = { ...rowData };
|
|
2335
|
+
if (rowData.fileName) {
|
|
2336
|
+
processedRow._fileExtension = this.getFileExtension(rowData.fileName);
|
|
2337
|
+
processedRow._isPdfFile = processedRow._fileExtension === SHARED.PDF;
|
|
2338
|
+
processedRow._isImageFile = processedRow._fileExtension === SHARED.JPG || processedRow._fileExtension === SHARED.PNG;
|
|
2339
|
+
processedRow._isExcelFile = processedRow._fileExtension === SHARED.XLSX;
|
|
2340
|
+
processedRow._isOtherFile = !processedRow._isPdfFile && !processedRow._isImageFile && !processedRow._isExcelFile;
|
|
2341
|
+
}
|
|
2342
|
+
this.tableData.columns.forEach(col => {
|
|
2343
|
+
if (col.type === SHARED.STATUS_PARAM && rowData[col.field]) {
|
|
2344
|
+
const status = rowData[col.field];
|
|
2345
|
+
processedRow._statusClass = this.getStatusClass(status);
|
|
2346
|
+
processedRow._statusIcon = this.getStatusIcon(status);
|
|
2347
|
+
}
|
|
2348
|
+
});
|
|
2349
|
+
return processedRow;
|
|
2350
|
+
});
|
|
2351
|
+
}
|
|
2329
2352
|
getStatusClass(status) {
|
|
2330
2353
|
switch (status.toLowerCase()) {
|
|
2331
|
-
case
|
|
2332
|
-
return
|
|
2333
|
-
case
|
|
2334
|
-
return
|
|
2335
|
-
case
|
|
2336
|
-
return
|
|
2337
|
-
case
|
|
2338
|
-
return
|
|
2339
|
-
case
|
|
2340
|
-
return
|
|
2341
|
-
case
|
|
2342
|
-
return
|
|
2354
|
+
case SHARED.PENDING_STATUS:
|
|
2355
|
+
return SHARED.STATUS_PENDING_CLASS;
|
|
2356
|
+
case SHARED.APPROVED_STATUS:
|
|
2357
|
+
return SHARED.STATUS_APPROVED_CLASS;
|
|
2358
|
+
case SHARED.ALERT_STATUS:
|
|
2359
|
+
return SHARED.STATUS_ALERT_CLASS;
|
|
2360
|
+
case SHARED.UPLOADED_STATUS:
|
|
2361
|
+
return SHARED.STATUS_UPLOADED_CLASS;
|
|
2362
|
+
case SHARED.REVIEWING_STATUS:
|
|
2363
|
+
return SHARED.STATUS_REVIEWING_CLASS;
|
|
2364
|
+
case SHARED.REJECTED_STATUS:
|
|
2365
|
+
return SHARED.STATUS_REJECTED_CLASS;
|
|
2343
2366
|
default:
|
|
2344
|
-
return
|
|
2367
|
+
return SHARED.STATUS_PENDING_CLASS;
|
|
2345
2368
|
}
|
|
2346
2369
|
}
|
|
2347
2370
|
getStatusIcon(status) {
|
|
2348
2371
|
switch (status.toLowerCase()) {
|
|
2349
|
-
case
|
|
2350
|
-
return
|
|
2351
|
-
case
|
|
2352
|
-
return
|
|
2353
|
-
case
|
|
2354
|
-
return
|
|
2355
|
-
case
|
|
2356
|
-
return
|
|
2357
|
-
case
|
|
2358
|
-
return
|
|
2359
|
-
case
|
|
2360
|
-
return
|
|
2372
|
+
case SHARED.PENDING_STATUS:
|
|
2373
|
+
return SHARED.ICON_CLOCK;
|
|
2374
|
+
case SHARED.APPROVED_STATUS:
|
|
2375
|
+
return SHARED.ICON_CHECK;
|
|
2376
|
+
case SHARED.ALERT_STATUS:
|
|
2377
|
+
return SHARED.ICON_EXCLAMATION_TRIANGLE;
|
|
2378
|
+
case SHARED.UPLOADED_STATUS:
|
|
2379
|
+
return SHARED.ICON_CLOUD_UPLOAD;
|
|
2380
|
+
case SHARED.REVIEWING_STATUS:
|
|
2381
|
+
return SHARED.ICON_EYE;
|
|
2382
|
+
case SHARED.REJECTED_STATUS:
|
|
2383
|
+
return SHARED.ICON_TIMES;
|
|
2361
2384
|
default:
|
|
2362
|
-
return
|
|
2385
|
+
return SHARED.ICON_CLOCK;
|
|
2363
2386
|
}
|
|
2364
2387
|
}
|
|
2365
2388
|
getFileExtension(fileName) {
|
|
2366
|
-
return fileName.split(
|
|
2389
|
+
return fileName.split(SHARED.DOT).pop()?.toUpperCase() || SHARED.PDF;
|
|
2367
2390
|
}
|
|
2368
2391
|
onActionClick(event, rowData) {
|
|
2369
2392
|
event.stopPropagation();
|
|
2370
|
-
// Handle action menu click - can be extended with menu functionality
|
|
2371
|
-
console.log('Action clicked for document:', rowData);
|
|
2372
2393
|
}
|
|
2373
2394
|
onRowClick(rowData) {
|
|
2374
2395
|
this.rowClick.emit(rowData);
|
|
2375
2396
|
}
|
|
2376
2397
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2377
|
-
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" }, ngImport: i0, template: "<div class=\"card\">\n <p-table [value]=\"
|
|
2398
|
+
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\">\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 <button pButton pRipple type=\"button\" [icon]=\"SHARED.ICON_DELETE\" \r\n class=\"p-button-text p-button-rounded\" \r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\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 </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}.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}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.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: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i5$1.Ripple, selector: "[pRipple]" }] });
|
|
2378
2399
|
}
|
|
2379
2400
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, decorators: [{
|
|
2380
2401
|
type: Component,
|
|
2381
|
-
args: [{ selector: 'lib-table-primary', standalone: false, template: "<div class=\"card\">\n <p-table [value]=\"
|
|
2402
|
+
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 <button pButton pRipple type=\"button\" [icon]=\"SHARED.ICON_DELETE\" \r\n class=\"p-button-text p-button-rounded\" \r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\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 </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}.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}\n"] }]
|
|
2382
2403
|
}], propDecorators: { tableData: [{
|
|
2383
2404
|
type: Input
|
|
2384
2405
|
}], showHeader: [{
|
|
@@ -2584,6 +2605,171 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
2584
2605
|
args: ['fileUploader']
|
|
2585
2606
|
}] } });
|
|
2586
2607
|
|
|
2608
|
+
/**
|
|
2609
|
+
* Service for handling document history styling logic
|
|
2610
|
+
*/
|
|
2611
|
+
class DocumentHistoryStyleService {
|
|
2612
|
+
constructor() { }
|
|
2613
|
+
/**
|
|
2614
|
+
* Get the appropriate icon class based on the action label
|
|
2615
|
+
*/
|
|
2616
|
+
getActionIcon(label) {
|
|
2617
|
+
switch (label.toLowerCase()) {
|
|
2618
|
+
case SHARED.UPLOADED_STATUS:
|
|
2619
|
+
return SHARED.ICON_CLOUD_UPLOAD;
|
|
2620
|
+
case SHARED.REJECTED_STATUS:
|
|
2621
|
+
return SHARED.ICON_TIMES;
|
|
2622
|
+
case SHARED.APPROVED_STATUS:
|
|
2623
|
+
return SHARED.ICON_CHECK;
|
|
2624
|
+
case SHARED.REQUESTED_STATUS:
|
|
2625
|
+
return SHARED.ICON_FILE;
|
|
2626
|
+
default:
|
|
2627
|
+
return SHARED.ICON_FILE;
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
/**
|
|
2631
|
+
* Get the appropriate color class based on the action label
|
|
2632
|
+
*/
|
|
2633
|
+
getActionColor(label) {
|
|
2634
|
+
switch (label.toLowerCase()) {
|
|
2635
|
+
case SHARED.UPLOADED_STATUS:
|
|
2636
|
+
return SHARED.TEXT_COLOR_GREEN;
|
|
2637
|
+
case SHARED.REJECTED_STATUS:
|
|
2638
|
+
return SHARED.TEXT_COLOR_RED;
|
|
2639
|
+
case SHARED.APPROVED_STATUS:
|
|
2640
|
+
return SHARED.TEXT_COLOR_GREEN;
|
|
2641
|
+
case SHARED.REQUESTED_STATUS:
|
|
2642
|
+
return SHARED.TEXT_COLOR_GRAY;
|
|
2643
|
+
default:
|
|
2644
|
+
return SHARED.TEXT_COLOR_GRAY;
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Get the appropriate background color class based on the action label
|
|
2649
|
+
*/
|
|
2650
|
+
getActionBgColor(label) {
|
|
2651
|
+
switch (label.toLowerCase()) {
|
|
2652
|
+
case SHARED.UPLOADED_STATUS:
|
|
2653
|
+
return SHARED.BG_COLOR_GREEN;
|
|
2654
|
+
case SHARED.REJECTED_STATUS:
|
|
2655
|
+
return SHARED.BG_COLOR_RED;
|
|
2656
|
+
case SHARED.APPROVED_STATUS:
|
|
2657
|
+
return SHARED.BG_COLOR_GREEN;
|
|
2658
|
+
case SHARED.REQUESTED_STATUS:
|
|
2659
|
+
return SHARED.BG_COLOR_GRAY;
|
|
2660
|
+
default:
|
|
2661
|
+
return SHARED.BG_COLOR_GRAY;
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
/**
|
|
2665
|
+
* Get the appropriate border color class based on the action label
|
|
2666
|
+
*/
|
|
2667
|
+
getActionBorderColor(label) {
|
|
2668
|
+
switch (label.toLowerCase()) {
|
|
2669
|
+
case SHARED.UPLOADED_STATUS:
|
|
2670
|
+
return SHARED.BORDER_COLOR_GREEN;
|
|
2671
|
+
case SHARED.REJECTED_STATUS:
|
|
2672
|
+
return SHARED.BORDER_COLOR_RED;
|
|
2673
|
+
case SHARED.APPROVED_STATUS:
|
|
2674
|
+
return SHARED.BORDER_COLOR_GREEN;
|
|
2675
|
+
case SHARED.REQUESTED_STATUS:
|
|
2676
|
+
return SHARED.BORDER_COLOR_GRAY;
|
|
2677
|
+
default:
|
|
2678
|
+
return SHARED.BORDER_COLOR_GRAY;
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
/**
|
|
2682
|
+
* Get the appropriate icon background color class based on the action label
|
|
2683
|
+
*/
|
|
2684
|
+
getActionIconBgColor(label) {
|
|
2685
|
+
switch (label.toLowerCase()) {
|
|
2686
|
+
case SHARED.UPLOADED_STATUS:
|
|
2687
|
+
return SHARED.ICON_BG_GREEN;
|
|
2688
|
+
case SHARED.REJECTED_STATUS:
|
|
2689
|
+
return SHARED.ICON_BG_RED;
|
|
2690
|
+
case SHARED.APPROVED_STATUS:
|
|
2691
|
+
return SHARED.ICON_BG_GREEN;
|
|
2692
|
+
case SHARED.REQUESTED_STATUS:
|
|
2693
|
+
return SHARED.ICON_BG_BLUE;
|
|
2694
|
+
default:
|
|
2695
|
+
return SHARED.ICON_BG_GRAY;
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryStyleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2699
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryStyleService, providedIn: 'root' });
|
|
2700
|
+
}
|
|
2701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryStyleService, decorators: [{
|
|
2702
|
+
type: Injectable,
|
|
2703
|
+
args: [{
|
|
2704
|
+
providedIn: 'root'
|
|
2705
|
+
}]
|
|
2706
|
+
}], ctorParameters: () => [] });
|
|
2707
|
+
|
|
2708
|
+
/**
|
|
2709
|
+
* Component for displaying document history in a timeline format.
|
|
2710
|
+
*/
|
|
2711
|
+
class DocumentHistoryComponent {
|
|
2712
|
+
documentHistoryStyleService;
|
|
2713
|
+
/**
|
|
2714
|
+
* Input data for document history sections
|
|
2715
|
+
*/
|
|
2716
|
+
historyData = [];
|
|
2717
|
+
/**
|
|
2718
|
+
* Whether to show the history component
|
|
2719
|
+
*/
|
|
2720
|
+
showHistory = false;
|
|
2721
|
+
constructor(documentHistoryStyleService) {
|
|
2722
|
+
this.documentHistoryStyleService = documentHistoryStyleService;
|
|
2723
|
+
}
|
|
2724
|
+
ngOnInit() { }
|
|
2725
|
+
/**
|
|
2726
|
+
* Process history data to add computed properties
|
|
2727
|
+
*/
|
|
2728
|
+
get processedHistoryData() {
|
|
2729
|
+
return this.historyData.map(section => ({
|
|
2730
|
+
...section,
|
|
2731
|
+
list: section.list.map(item => ({
|
|
2732
|
+
...item,
|
|
2733
|
+
actionIcon: this.documentHistoryStyleService.getActionIcon(item.label),
|
|
2734
|
+
actionColor: this.documentHistoryStyleService.getActionColor(item.label),
|
|
2735
|
+
actionBgColor: this.documentHistoryStyleService.getActionBgColor(item.label),
|
|
2736
|
+
actionBorderColor: this.documentHistoryStyleService.getActionBorderColor(item.label),
|
|
2737
|
+
actionIconBgColor: this.documentHistoryStyleService.getActionIconBgColor(item.label)
|
|
2738
|
+
}))
|
|
2739
|
+
}));
|
|
2740
|
+
}
|
|
2741
|
+
/**
|
|
2742
|
+
* Downloads a document when clicked
|
|
2743
|
+
* @param documentUrl - The URL of the document to download
|
|
2744
|
+
* @param docName - The name of the document
|
|
2745
|
+
*/
|
|
2746
|
+
downloadDocument(documentUrl, docName) {
|
|
2747
|
+
if (!documentUrl) {
|
|
2748
|
+
console.warn('No document URL provided for download');
|
|
2749
|
+
return;
|
|
2750
|
+
}
|
|
2751
|
+
// Create a temporary anchor element to trigger download
|
|
2752
|
+
const link = document.createElement('a');
|
|
2753
|
+
link.href = documentUrl;
|
|
2754
|
+
link.download = docName || 'document';
|
|
2755
|
+
link.target = '_blank';
|
|
2756
|
+
// Append to body, click, and remove
|
|
2757
|
+
document.body.appendChild(link);
|
|
2758
|
+
link.click();
|
|
2759
|
+
document.body.removeChild(link);
|
|
2760
|
+
}
|
|
2761
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, deps: [{ token: DocumentHistoryStyleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2762
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory" }, ngImport: i0, template: "<div class=\"document-history-container\" *ngIf=\"showHistory && historyData.length > 0\">\n <div class=\"history-sections\">\n <div class=\"history-section\" *ngFor=\"let section of processedHistoryData\">\n <div *ngIf=\"section.header === 'Initial Request'\" class=\"initial-request-section\">\n <p-accordion>\n <p-accordionTab [header]=\"section.header\">\n <div class=\"history-timeline\">\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\n <div class=\"card-header\">\n <div class=\"action-info\">\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\n <i [class]=\"item.actionIcon\"></i>\n </div>\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\n {{ item.label }}\n </span>\n </div>\n <div class=\"timestamp\">\n {{ item.dateTime }}\n </div>\n </div>\n \n <!-- Description -->\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\n <p class=\"description-text\">{{ item.requestDescription ?? 'No Request' }}</p>\n </div>\n \n <!-- Document details if URL exists -->\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\n <div class=\"document-card\">\n <div class=\"document-info\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <div class=\"document-text\">\n <div class=\"document-title\">Document</div>\n <div class=\"document-filename clickable\" \n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\n title=\"Click to download\">\n {{ item.docName || 'Document' }}\n </div>\n </div>\n </div>\n <div class=\"document-actions\">\n <button class=\"action-btn download-btn\" \n title=\"Download\"\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\">\n <i class=\"pi pi-download\"></i>\n </button>\n </div>\n </div>\n </div>\n \n <!-- User information -->\n <div class=\"user-info\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n </div>\n </div>\n </div>\n </p-accordionTab>\n </p-accordion>\n </div>\n \n <!-- Document History as regular timeline -->\n <div *ngIf=\"section.header !== 'Initial Request'\" class=\"document-history-section\">\n <div class=\"section-header\" *ngIf=\"section.header\">\n <h4 class=\"section-title\">{{ section.header }}</h4>\n </div>\n \n <div class=\"history-timeline\">\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\n <!-- Header with icon and timestamp -->\n <div class=\"card-header\">\n <div class=\"action-info\">\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\n <i [class]=\"item.actionIcon\"></i>\n </div>\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\n {{ item.label }}\n </span>\n </div>\n <div class=\"timestamp\">\n {{ item.dateTime }}\n </div>\n </div>\n \n <!-- Description -->\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\n <p class=\"description-text\">{{ item.requestDescription }}</p>\n </div>\n \n <!-- Document details if URL exists -->\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\n <div class=\"document-card\">\n <div class=\"document-info\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <div class=\"document-text\">\n <div class=\"document-title\">Document</div>\n <div class=\"document-filename clickable\" \n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\n title=\"Click to download\">\n {{ item.docName || 'Document' }}\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <!-- User information -->\n <div class=\"user-info\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>", styles: [".document-history-container{padding:1rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;max-height:70vh;overflow-y:auto}.document-history-container .history-header{margin-bottom:1.5rem}.document-history-container .history-header .history-title{font-size:1.5rem;font-weight:600;color:#374151;margin:0}.document-history-container .history-sections .history-section{margin-bottom:2rem}.document-history-container .history-sections .history-section .initial-request-section{margin-bottom:1.5rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{background:#fff;border:1px solid #3b82f6;border-radius:8px;padding:1rem 1.5rem;font-weight:600;color:#1f2937;font-size:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link:focus{box-shadow:none;border-color:#3b82f6}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link .p-accordion-header-icon{color:#6b7280;font-size:.875rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header.p-highlight .p-accordion-header-link{background:#fff;border-color:#3b82f6}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content{background:#fff;border:1px solid #e5e7eb;border-top:none;border-radius:0 0 8px 8px;padding:1.5rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item{margin-bottom:0}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:1rem;border-right:3px solid #3b82f6}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{background:#7d879b;color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{color:#1f2937;font-weight:600}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .timestamp{color:#6b7280;font-size:.75rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-description .description-text{color:#374151;line-height:1.5}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-name{color:#1f2937;font-weight:500}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280}.document-history-container .history-sections .history-section .document-history-section .section-header{margin-bottom:1rem}.document-history-container .history-sections .history-section .document-history-section .section-header .section-title{font-size:1.25rem;font-weight:500;color:#374151;margin:0}.document-history-container .history-sections .history-section .history-timeline .timeline-item{margin-bottom:1rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card{border-radius:8px;border:1px solid;padding:1rem;position:relative;border-right:3px solid}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-green-50{background-color:#f0fdf4;border-color:#bbf7d0;border-right-color:#10b981}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-red-50{background-color:#fef2f2;border-color:#fecaca;border-right-color:#ef4444}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-blue-50{background-color:#eff6ff;border-color:#bfdbfe;border-right-color:#3b82f6}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-gray-50{background-color:#f8fafc;border-color:#e2e8f0;border-right-color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{font-weight:600;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .timestamp{font-size:.75rem;color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description .description-text{margin:0;color:#374151;font-size:.875rem;line-height:1.4}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card{background:#fff;border-radius:6px;padding:.75rem;display:flex;justify-content:space-between;align-items:center;border:1px solid #e5e7eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-icon{color:#3b82f6;font-size:1.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-title{font-weight:500;color:#374151;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename{color:#3b82f6;font-size:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename.clickable{cursor:pointer;text-decoration:underline}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename.clickable:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions{display:flex;gap:.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn{width:24px;height:24px;border:none;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn{background:#3b82f6;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn:hover{background:#2563eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn{background:#ef4444;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn:hover{background:#dc2626}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn{background:#10b981;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn:hover{background:#059669}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info{text-align:right;font-size:.75rem;color:#374151}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-name{font-weight:500}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280}.text-green-600{color:#059669}.text-red-600{color:#dc2626}.text-blue-600{color:#2563eb}.text-gray-600{color:#4b5563}.bg-green-50{background-color:#f0fdf4}.bg-red-50{background-color:#fef2f2}.bg-blue-50{background-color:#eff6ff}.bg-gray-50{background-color:#f8fafc}.border-green-200{border-color:#bbf7d0}.border-red-200{border-color:#fecaca}.border-blue-200{border-color:#bfdbfe}.border-gray-200{border-color:#e2e8f0}.icon-bg-green{background-color:#10b981}.icon-bg-red{background-color:#ef4444}.icon-bg-blue{background-color:#3b82f6}.icon-bg-gray{background-color:#6b7280}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i3$1.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }] });
|
|
2763
|
+
}
|
|
2764
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, decorators: [{
|
|
2765
|
+
type: Component,
|
|
2766
|
+
args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-history-container\" *ngIf=\"showHistory && historyData.length > 0\">\n <div class=\"history-sections\">\n <div class=\"history-section\" *ngFor=\"let section of processedHistoryData\">\n <div *ngIf=\"section.header === 'Initial Request'\" class=\"initial-request-section\">\n <p-accordion>\n <p-accordionTab [header]=\"section.header\">\n <div class=\"history-timeline\">\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\n <div class=\"card-header\">\n <div class=\"action-info\">\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\n <i [class]=\"item.actionIcon\"></i>\n </div>\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\n {{ item.label }}\n </span>\n </div>\n <div class=\"timestamp\">\n {{ item.dateTime }}\n </div>\n </div>\n \n <!-- Description -->\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\n <p class=\"description-text\">{{ item.requestDescription ?? 'No Request' }}</p>\n </div>\n \n <!-- Document details if URL exists -->\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\n <div class=\"document-card\">\n <div class=\"document-info\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <div class=\"document-text\">\n <div class=\"document-title\">Document</div>\n <div class=\"document-filename clickable\" \n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\n title=\"Click to download\">\n {{ item.docName || 'Document' }}\n </div>\n </div>\n </div>\n <div class=\"document-actions\">\n <button class=\"action-btn download-btn\" \n title=\"Download\"\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\">\n <i class=\"pi pi-download\"></i>\n </button>\n </div>\n </div>\n </div>\n \n <!-- User information -->\n <div class=\"user-info\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n </div>\n </div>\n </div>\n </p-accordionTab>\n </p-accordion>\n </div>\n \n <!-- Document History as regular timeline -->\n <div *ngIf=\"section.header !== 'Initial Request'\" class=\"document-history-section\">\n <div class=\"section-header\" *ngIf=\"section.header\">\n <h4 class=\"section-title\">{{ section.header }}</h4>\n </div>\n \n <div class=\"history-timeline\">\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\n <!-- Header with icon and timestamp -->\n <div class=\"card-header\">\n <div class=\"action-info\">\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\n <i [class]=\"item.actionIcon\"></i>\n </div>\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\n {{ item.label }}\n </span>\n </div>\n <div class=\"timestamp\">\n {{ item.dateTime }}\n </div>\n </div>\n \n <!-- Description -->\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\n <p class=\"description-text\">{{ item.requestDescription }}</p>\n </div>\n \n <!-- Document details if URL exists -->\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\n <div class=\"document-card\">\n <div class=\"document-info\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <div class=\"document-text\">\n <div class=\"document-title\">Document</div>\n <div class=\"document-filename clickable\" \n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\n title=\"Click to download\">\n {{ item.docName || 'Document' }}\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <!-- User information -->\n <div class=\"user-info\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>", styles: [".document-history-container{padding:1rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;max-height:70vh;overflow-y:auto}.document-history-container .history-header{margin-bottom:1.5rem}.document-history-container .history-header .history-title{font-size:1.5rem;font-weight:600;color:#374151;margin:0}.document-history-container .history-sections .history-section{margin-bottom:2rem}.document-history-container .history-sections .history-section .initial-request-section{margin-bottom:1.5rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{background:#fff;border:1px solid #3b82f6;border-radius:8px;padding:1rem 1.5rem;font-weight:600;color:#1f2937;font-size:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link:focus{box-shadow:none;border-color:#3b82f6}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link .p-accordion-header-icon{color:#6b7280;font-size:.875rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header.p-highlight .p-accordion-header-link{background:#fff;border-color:#3b82f6}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content{background:#fff;border:1px solid #e5e7eb;border-top:none;border-radius:0 0 8px 8px;padding:1.5rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item{margin-bottom:0}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:1rem;border-right:3px solid #3b82f6}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{background:#7d879b;color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{color:#1f2937;font-weight:600}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .timestamp{color:#6b7280;font-size:.75rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-description .description-text{color:#374151;line-height:1.5}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-name{color:#1f2937;font-weight:500}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280}.document-history-container .history-sections .history-section .document-history-section .section-header{margin-bottom:1rem}.document-history-container .history-sections .history-section .document-history-section .section-header .section-title{font-size:1.25rem;font-weight:500;color:#374151;margin:0}.document-history-container .history-sections .history-section .history-timeline .timeline-item{margin-bottom:1rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card{border-radius:8px;border:1px solid;padding:1rem;position:relative;border-right:3px solid}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-green-50{background-color:#f0fdf4;border-color:#bbf7d0;border-right-color:#10b981}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-red-50{background-color:#fef2f2;border-color:#fecaca;border-right-color:#ef4444}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-blue-50{background-color:#eff6ff;border-color:#bfdbfe;border-right-color:#3b82f6}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-gray-50{background-color:#f8fafc;border-color:#e2e8f0;border-right-color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{font-weight:600;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .timestamp{font-size:.75rem;color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description .description-text{margin:0;color:#374151;font-size:.875rem;line-height:1.4}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card{background:#fff;border-radius:6px;padding:.75rem;display:flex;justify-content:space-between;align-items:center;border:1px solid #e5e7eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-icon{color:#3b82f6;font-size:1.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-title{font-weight:500;color:#374151;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename{color:#3b82f6;font-size:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename.clickable{cursor:pointer;text-decoration:underline}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename.clickable:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions{display:flex;gap:.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn{width:24px;height:24px;border:none;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn{background:#3b82f6;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn:hover{background:#2563eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn{background:#ef4444;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn:hover{background:#dc2626}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn{background:#10b981;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn:hover{background:#059669}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info{text-align:right;font-size:.75rem;color:#374151}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-name{font-weight:500}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280}.text-green-600{color:#059669}.text-red-600{color:#dc2626}.text-blue-600{color:#2563eb}.text-gray-600{color:#4b5563}.bg-green-50{background-color:#f0fdf4}.bg-red-50{background-color:#fef2f2}.bg-blue-50{background-color:#eff6ff}.bg-gray-50{background-color:#f8fafc}.border-green-200{border-color:#bbf7d0}.border-red-200{border-color:#fecaca}.border-blue-200{border-color:#bfdbfe}.border-gray-200{border-color:#e2e8f0}.icon-bg-green{background-color:#10b981}.icon-bg-red{background-color:#ef4444}.icon-bg-blue{background-color:#3b82f6}.icon-bg-gray{background-color:#6b7280}\n"] }]
|
|
2767
|
+
}], ctorParameters: () => [{ type: DocumentHistoryStyleService }], propDecorators: { historyData: [{
|
|
2768
|
+
type: Input
|
|
2769
|
+
}], showHistory: [{
|
|
2770
|
+
type: Input
|
|
2771
|
+
}] } });
|
|
2772
|
+
|
|
2587
2773
|
/**
|
|
2588
2774
|
* Description placeholder
|
|
2589
2775
|
* @class LinkedDocumentComponent
|
|
@@ -2671,6 +2857,16 @@ class DocumentViewerComponent {
|
|
|
2671
2857
|
* @type {any}
|
|
2672
2858
|
*/
|
|
2673
2859
|
alertData;
|
|
2860
|
+
/**
|
|
2861
|
+
* Document history data
|
|
2862
|
+
* @type {DocumentHistorySection[]}
|
|
2863
|
+
*/
|
|
2864
|
+
documentHistory = [];
|
|
2865
|
+
/**
|
|
2866
|
+
* Whether to show document history
|
|
2867
|
+
* @type {boolean}
|
|
2868
|
+
*/
|
|
2869
|
+
showDocumentHistory = false;
|
|
2674
2870
|
/**
|
|
2675
2871
|
* Holds the subscription to manage observable cleanup.
|
|
2676
2872
|
* @private
|
|
@@ -2694,12 +2890,32 @@ class DocumentViewerComponent {
|
|
|
2694
2890
|
if (this.selectedDocument) {
|
|
2695
2891
|
this.documentService.set(this.selectedDocument);
|
|
2696
2892
|
this.alertData = DocumentAlertList.find((res) => res.status === this.selectedDocument?.status);
|
|
2893
|
+
this.loadDocumentHistory(this.selectedDocument._id);
|
|
2697
2894
|
}
|
|
2698
2895
|
}
|
|
2699
2896
|
handleSelectedDocument(document) {
|
|
2700
2897
|
this.selectedDocument = document;
|
|
2701
2898
|
this.documentService.set(this.selectedDocument);
|
|
2702
2899
|
}
|
|
2900
|
+
/**
|
|
2901
|
+
* Loads document history data
|
|
2902
|
+
* @returns {void}
|
|
2903
|
+
*/
|
|
2904
|
+
loadDocumentHistory(documentId) {
|
|
2905
|
+
if (documentId) {
|
|
2906
|
+
this.documentHttpService.getDocumentHistory(documentId)
|
|
2907
|
+
.subscribe({
|
|
2908
|
+
next: (history) => {
|
|
2909
|
+
this.documentHistory = history;
|
|
2910
|
+
this.showDocumentHistory = true;
|
|
2911
|
+
},
|
|
2912
|
+
error: (error) => {
|
|
2913
|
+
console.error('Error loading document history:', error);
|
|
2914
|
+
this.showDocumentHistory = false;
|
|
2915
|
+
}
|
|
2916
|
+
});
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2703
2919
|
/**
|
|
2704
2920
|
* Determines if the given content type is an image.
|
|
2705
2921
|
* @param {string | undefined} contentType - The MIME type of the content.
|
|
@@ -2712,11 +2928,11 @@ class DocumentViewerComponent {
|
|
|
2712
2928
|
this.subscription.unsubscribe();
|
|
2713
2929
|
}
|
|
2714
2930
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2715
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-
|
|
2931
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-9\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\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]=\"1\"\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: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\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-3 pt-0\">\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 <document-history \r\n [historyData]=\"documentHistory\" \r\n [showHistory]=\"showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".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}.uploadedImages{width:95%;height:100%;object-fit:contain}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.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: LinkedDocumentComponent, selector: "app-linked-document", inputs: ["selectedDocument", "documentList"], outputs: ["selectedDocumentChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2716
2932
|
}
|
|
2717
2933
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, decorators: [{
|
|
2718
2934
|
type: Component,
|
|
2719
|
-
args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-
|
|
2935
|
+
args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-9\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\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]=\"1\"\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: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\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-3 pt-0\">\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 <document-history \r\n [historyData]=\"documentHistory\" \r\n [showHistory]=\"showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".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}.uploadedImages{width:95%;height:100%;object-fit:contain}\n"] }]
|
|
2720
2936
|
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }], propDecorators: { selectedDocument: [{
|
|
2721
2937
|
type: Input
|
|
2722
2938
|
}], documentList: [{
|
|
@@ -2824,6 +3040,10 @@ class DocumentListComponent {
|
|
|
2824
3040
|
* Document categories from the response
|
|
2825
3041
|
*/
|
|
2826
3042
|
documentCategories = [];
|
|
3043
|
+
/**
|
|
3044
|
+
* Completion counts for each category
|
|
3045
|
+
*/
|
|
3046
|
+
categoryCompletionCounts = [];
|
|
2827
3047
|
/**
|
|
2828
3048
|
* Filter properties
|
|
2829
3049
|
*/
|
|
@@ -2936,12 +3156,6 @@ class DocumentListComponent {
|
|
|
2936
3156
|
handleOpenSideBar(isVisible) {
|
|
2937
3157
|
this.isSidebarVisible = isVisible;
|
|
2938
3158
|
}
|
|
2939
|
-
/**
|
|
2940
|
-
* Builds table data for all document categories
|
|
2941
|
-
*/
|
|
2942
|
-
buildCategoryTables() {
|
|
2943
|
-
this.categoryTables = this.documentTableBuilder.buildDocumentCategoriesTables(this.documentCategories);
|
|
2944
|
-
}
|
|
2945
3159
|
/**
|
|
2946
3160
|
* Gets completion count for a category
|
|
2947
3161
|
*/
|
|
@@ -2964,16 +3178,15 @@ class DocumentListComponent {
|
|
|
2964
3178
|
* Builds document categories from the API response
|
|
2965
3179
|
*/
|
|
2966
3180
|
buildDocumentCategories() {
|
|
2967
|
-
console.log('Building document categories with response:', this.documentListResponse);
|
|
2968
3181
|
if (!this.documentListResponse) {
|
|
2969
|
-
this.documentCategories =
|
|
2970
|
-
this.categoryTables =
|
|
2971
|
-
|
|
3182
|
+
this.documentCategories = SHARED.EMPTY_ARRAY;
|
|
3183
|
+
this.categoryTables = SHARED.EMPTY_ARRAY;
|
|
3184
|
+
this.categoryCompletionCounts = SHARED.EMPTY_ARRAY;
|
|
2972
3185
|
return;
|
|
2973
3186
|
}
|
|
2974
3187
|
this.documentCategories = [...this.documentListResponse];
|
|
2975
3188
|
this.categoryTables = this.documentListResponse.map(category => this.documentTableBuilder.buildDocumentTable(category.list));
|
|
2976
|
-
|
|
3189
|
+
this.categoryCompletionCounts = this.documentListResponse.map(category => this.getCompletionCount(category));
|
|
2977
3190
|
}
|
|
2978
3191
|
/**
|
|
2979
3192
|
* Sets up subscription to document list response from store
|
|
@@ -2981,7 +3194,6 @@ class DocumentListComponent {
|
|
|
2981
3194
|
setupDocumentListSubscription() {
|
|
2982
3195
|
this.documentListSubscription.add(this.documentQuery.selectDocumentListResponse().subscribe({
|
|
2983
3196
|
next: (response) => {
|
|
2984
|
-
console.log('DocumentListComponent received response:', response);
|
|
2985
3197
|
this.documentListResponse = response;
|
|
2986
3198
|
this.buildDocumentCategories();
|
|
2987
3199
|
},
|
|
@@ -3001,11 +3213,11 @@ class DocumentListComponent {
|
|
|
3001
3213
|
this.documentListSubscription.unsubscribe();
|
|
3002
3214
|
}
|
|
3003
3215
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentUploadService }, { token: DocumentHttpService }, { token: DocumentQuery }, { token: DocumentStore }, { token: DocumentTableBuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3004
|
-
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", isUploadButtonVisible: "isUploadButtonVisible", documentList: "documentList", status: "status", category: "category", searchKey: "searchKey" }, ngImport: i0, template: "<div class=\"document-viewer\">\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" \n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\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 <button pButton pRipple class=\"mx-3 w-6rem save-btn-wrapper\" label=\"Save\" (click)=\"handleSaveClick()\">\n </button>\n </div>\n </ng-template>\n <ng-content></ng-content>\n </document-viewer>\n </p-dialog>\n</div>\n\n\n<div class=\"document-categories-container\">\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\">\n <div class=\"category-header\">\n <div class=\"category-title\">\n <h3>{{ category.label }} Documents</h3>\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\n </div>\n <div class=\"completion-status\">\n <span class=\"status-badge\">{{ getCompletionCount(category) }} 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 </lib-table-primary>\n </div>\n </div>\n</div>\n<div class=\"grid m-0\">\n <div class=\"col-12 p-0\">\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\n <ng-template pTemplate=\"header\">\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\n </ng-template>\n <ng-template pTemplate=\"content\">\n <div class=\"side-bar-con\">\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\n <div class=\"p-fluid\">\n <div class=\"field\">\n <label for=\"city\">Select Folder</label>\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\n <div class=\"bg-gray-100 p-4\">\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\n [disabled]=\"!selectedOption\">\n </p-button>\n </div>\n </ng-template>\n </p-sidebar>\n </div>\n</div>", 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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i8.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i9.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i10.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i12.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: "component", type: i13.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i14.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3216
|
+
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", isUploadButtonVisible: "isUploadButtonVisible", documentList: "documentList", status: "status", category: "category", searchKey: "searchKey" }, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" \r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\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 <button pButton pRipple class=\"mx-3 w-6rem save-btn-wrapper\" label=\"Save\" (click)=\"handleSaveClick()\">\r\n </button>\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\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>{{ category.label }} Documents</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 </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"grid m-0\">\r\n <div class=\"col-12 p-0\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", 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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i8.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i9.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i10.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i12.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: "component", type: i13.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i14.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3005
3217
|
}
|
|
3006
3218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, decorators: [{
|
|
3007
3219
|
type: Component,
|
|
3008
|
-
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" \n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\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 <button pButton pRipple class=\"mx-3 w-6rem save-btn-wrapper\" label=\"Save\" (click)=\"handleSaveClick()\">\n </button>\n </div>\n </ng-template>\n <ng-content></ng-content>\n </document-viewer>\n </p-dialog>\n</div>\n\n\n<div class=\"document-categories-container\">\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\">\n <div class=\"category-header\">\n <div class=\"category-title\">\n <h3>{{ category.label }} Documents</h3>\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\n </div>\n <div class=\"completion-status\">\n <span class=\"status-badge\">{{
|
|
3220
|
+
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" \r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\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 <button pButton pRipple class=\"mx-3 w-6rem save-btn-wrapper\" label=\"Save\" (click)=\"handleSaveClick()\">\r\n </button>\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\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>{{ category.label }} Documents</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 </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"grid m-0\">\r\n <div class=\"col-12 p-0\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", 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"] }]
|
|
3009
3221
|
}], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentTableBuilderService }], propDecorators: { contextId: [{
|
|
3010
3222
|
type: Input
|
|
3011
3223
|
}], documentListResponse: [{
|
|
@@ -3097,7 +3309,13 @@ class DocumentMenuService {
|
|
|
3097
3309
|
* @returns Total number of documents
|
|
3098
3310
|
*/
|
|
3099
3311
|
getTotalDocuments(item) {
|
|
3100
|
-
|
|
3312
|
+
const status = item.status;
|
|
3313
|
+
// Handle both uppercase and lowercase keys
|
|
3314
|
+
const pending = status.Pending || status.pending || 0;
|
|
3315
|
+
const reviewing = status.Reviewing || status.reviewing || 0;
|
|
3316
|
+
const accepted = status.Accepted || status.approved || 0; // Note: approved maps to Accepted
|
|
3317
|
+
const rejected = status.Rejected || status.rejected || 0;
|
|
3318
|
+
return pending + reviewing + accepted + rejected;
|
|
3101
3319
|
}
|
|
3102
3320
|
/**
|
|
3103
3321
|
* Calculates completed documents for a menu item
|
|
@@ -3105,7 +3323,9 @@ class DocumentMenuService {
|
|
|
3105
3323
|
* @returns Number of completed documents
|
|
3106
3324
|
*/
|
|
3107
3325
|
getCompletedDocuments(item) {
|
|
3108
|
-
|
|
3326
|
+
const status = item.status;
|
|
3327
|
+
// Handle both uppercase and lowercase keys, with approved mapping to Accepted
|
|
3328
|
+
return status.Accepted || status.approved || 0;
|
|
3109
3329
|
}
|
|
3110
3330
|
/**
|
|
3111
3331
|
* Gets badge value for a menu item
|
|
@@ -3221,16 +3441,12 @@ class DocumentsMenuComponent {
|
|
|
3221
3441
|
*/
|
|
3222
3442
|
onMenuItemClick(event, item) {
|
|
3223
3443
|
if (this.selectedMenuItemId === item._id) {
|
|
3224
|
-
console.log('Deselecting menu item:', item._id);
|
|
3225
|
-
console.log('Using contextId for API call:', this.contextId);
|
|
3226
3444
|
this.selectedMenuItem = null;
|
|
3227
3445
|
this.selectedMenuItemId = null;
|
|
3228
3446
|
this.documentStore.setSelectedMenuItem(null);
|
|
3229
|
-
// Force refresh to get unfiltered results
|
|
3230
3447
|
this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
|
|
3231
3448
|
}
|
|
3232
3449
|
else {
|
|
3233
|
-
console.log('Selecting menu item:', item._id);
|
|
3234
3450
|
this.selectedMenuItem = item.label;
|
|
3235
3451
|
this.selectedMenuItemId = item._id;
|
|
3236
3452
|
this.documentStore.setSelectedMenuItem(item._id);
|
|
@@ -3250,7 +3466,6 @@ class DocumentsMenuComponent {
|
|
|
3250
3466
|
this.selectedMenuItem = null;
|
|
3251
3467
|
this.selectedMenuItemId = null;
|
|
3252
3468
|
this.documentStore.setSelectedMenuItem(null);
|
|
3253
|
-
// Force refresh to get unfiltered results
|
|
3254
3469
|
this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
|
|
3255
3470
|
}
|
|
3256
3471
|
getSelectedMenuItem() {
|
|
@@ -3260,11 +3475,11 @@ class DocumentsMenuComponent {
|
|
|
3260
3475
|
return this.selectedMenuItemId;
|
|
3261
3476
|
}
|
|
3262
3477
|
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 });
|
|
3263
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3478
|
+
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\">\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]=\"catagories\" styleClass=\"w-full md:w-15rem\">\n <ng-template pTemplate=\"submenuheader\" let-item>\n <span [style]=\"{\n color : '#9EA0B3'\n }\">{{ 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-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;background:#0066ff1a!important;background-color:#0066ff1a!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 .selected-menu-item span{color:var(--primary-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:var(--surface-0)!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:#44486d1a!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}\n"], dependencies: [{ kind: "directive", type: i5.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$2.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$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
|
|
3264
3479
|
}
|
|
3265
3480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, decorators: [{
|
|
3266
3481
|
type: Component,
|
|
3267
|
-
args: [{ selector: 'lib-documents-menu', standalone: false, template: "<div class=\"document-sidebar-container h-full\">\
|
|
3482
|
+
args: [{ selector: 'lib-documents-menu', standalone: false, template: "<div class=\"document-sidebar-container h-full\">\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]=\"catagories\" styleClass=\"w-full md:w-15rem\">\n <ng-template pTemplate=\"submenuheader\" let-item>\n <span [style]=\"{\n color : '#9EA0B3'\n }\">{{ 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-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;background:#0066ff1a!important;background-color:#0066ff1a!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 .selected-menu-item span{color:var(--primary-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:var(--surface-0)!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:#44486d1a!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}\n"] }]
|
|
3268
3483
|
}], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }, { type: DocumentMenuService }, { type: DocumentHelperService }], propDecorators: { catagories: [{
|
|
3269
3484
|
type: Input
|
|
3270
3485
|
}], applicationNumber: [{
|
|
@@ -3361,7 +3576,7 @@ class DocumentContainerComponent {
|
|
|
3361
3576
|
return;
|
|
3362
3577
|
}
|
|
3363
3578
|
const currentState = this.documentQuery.getSelectionState();
|
|
3364
|
-
const contextId = currentState.userId ||
|
|
3579
|
+
const contextId = currentState.userId || null;
|
|
3365
3580
|
const categoryId = currentState.menuItem || null;
|
|
3366
3581
|
this.documentHttpService.getStatusDocumentCount(this.contextId, contextId, categoryId).subscribe({
|
|
3367
3582
|
next: (statusData) => {
|
|
@@ -3423,11 +3638,11 @@ class DocumentContainerComponent {
|
|
|
3423
3638
|
this.subscription.unsubscribe();
|
|
3424
3639
|
}
|
|
3425
3640
|
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 });
|
|
3426
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId" }, ngImport: i0, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-3 lg:col-3\">\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-9 lg:col-9 p-0 h-full\" >\r\n <div>\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: "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", "isUploadButtonVisible", "documentList", "status", "category", "searchKey"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["catagories", "applicationNumber", "contextId"] }] });
|
|
3641
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId" }, ngImport: i0, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-3 lg:col-3\">\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-9 lg:col-9 p-0 h-full\" [ngClass]=\"{'custom-scroll': true}\">\r\n <div>\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: i5.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", "isUploadButtonVisible", "documentList", "status", "category", "searchKey"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["catagories", "applicationNumber", "contextId"] }] });
|
|
3427
3642
|
}
|
|
3428
3643
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, decorators: [{
|
|
3429
3644
|
type: Component,
|
|
3430
|
-
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-3 lg:col-3\">\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-9 lg:col-9 p-0 h-full\" >\r\n <div>\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"] }]
|
|
3645
|
+
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-3 lg:col-3\">\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-9 lg:col-9 p-0 h-full\" [ngClass]=\"{'custom-scroll': true}\">\r\n <div>\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"] }]
|
|
3431
3646
|
}], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentService }, { type: DocumentQuery }, { type: DocumentHttpService }, { type: DocumentHelperService }], propDecorators: { contextId: [{
|
|
3432
3647
|
type: Input
|
|
3433
3648
|
}] } });
|
|
@@ -3797,6 +4012,10 @@ class DocumentModule {
|
|
|
3797
4012
|
* A component representing and allow you to view the document.
|
|
3798
4013
|
*/
|
|
3799
4014
|
DocumentViewerComponent,
|
|
4015
|
+
/**
|
|
4016
|
+
* A component representing document history timeline.
|
|
4017
|
+
*/
|
|
4018
|
+
DocumentHistoryComponent,
|
|
3800
4019
|
/**
|
|
3801
4020
|
* A directive to show the document.
|
|
3802
4021
|
*/
|
|
@@ -4049,6 +4268,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
4049
4268
|
* A component representing and allow you to view the document.
|
|
4050
4269
|
*/
|
|
4051
4270
|
DocumentViewerComponent,
|
|
4271
|
+
/**
|
|
4272
|
+
* A component representing document history timeline.
|
|
4273
|
+
*/
|
|
4274
|
+
DocumentHistoryComponent,
|
|
4052
4275
|
/**
|
|
4053
4276
|
* A directive to show the document.
|
|
4054
4277
|
*/
|
|
@@ -4206,5 +4429,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
4206
4429
|
* Generated bundle index. Do not edit.
|
|
4207
4430
|
*/
|
|
4208
4431
|
|
|
4209
|
-
export { DocumentContainerComponent, DocumentDirective, DocumentListComponent, DocumentModule, DocumentTableBuilderService, DocumentViewerComponent, HasPermissionDirective };
|
|
4432
|
+
export { DocumentContainerComponent, DocumentDirective, DocumentHistoryComponent, DocumentListComponent, DocumentModule, DocumentTableBuilderService, DocumentViewerComponent, HasPermissionDirective };
|
|
4210
4433
|
//# sourceMappingURL=cat-documents-ng.mjs.map
|