cat-documents-ng 0.3.26 → 0.3.29
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/constant/ERROR.d.ts +2 -0
- package/fesm2022/cat-documents-ng.mjs +262 -163
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-actions/document-actions.component.d.ts +16 -1
- package/lib/document/components/document-container/document-container.component.d.ts +1 -2
- package/lib/document/components/document-list/document-list.component.d.ts +11 -2
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +13 -2
- package/lib/document/services/document-history.service.d.ts +6 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import * as i2$1 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { firstValueFrom, EMPTY, tap, catchError, throwError, of, combineLatest, Subject, Observable, takeUntil, Subscription, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs';
|
|
6
6
|
import * as i2 from '@angular/common/http';
|
|
7
|
-
import { HttpParams, HttpClientModule } from '@angular/common/http';
|
|
7
|
+
import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
9
|
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
10
10
|
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
|
|
@@ -924,6 +924,8 @@ class ERRORS {
|
|
|
924
924
|
static ERROR_FETCHING_DOCUMENTS_BY_STATUS = 'Error fetching documents by status:';
|
|
925
925
|
static ERROR_FETCHING_DOCUMENTS_BY_CATEGORY = 'Error fetching documents by category:';
|
|
926
926
|
static ERROR_CALLING_API_WITH_SELECTION = 'Error calling API with selection:';
|
|
927
|
+
static ERROR_FILE_NAME_INVALID_CHARACTERS = 'File name contains invalid characters (< > : " / \\ | ? *)';
|
|
928
|
+
static ERROR_FILE_NAME_EMPTY = 'File name cannot be empty';
|
|
927
929
|
}
|
|
928
930
|
|
|
929
931
|
/**
|
|
@@ -1364,7 +1366,8 @@ class DocumentHttpService {
|
|
|
1364
1366
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1365
1367
|
*/
|
|
1366
1368
|
getDocumentCatagories(contextId) {
|
|
1367
|
-
|
|
1369
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1370
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers })
|
|
1368
1371
|
.pipe(tap((response) => {
|
|
1369
1372
|
if (response && response.categories) {
|
|
1370
1373
|
this.documentStore.setDocumentCategories(response.categories);
|
|
@@ -1407,7 +1410,8 @@ class DocumentHttpService {
|
|
|
1407
1410
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1408
1411
|
*/
|
|
1409
1412
|
getDocumentByFolderID(folderId, contextId) {
|
|
1410
|
-
|
|
1413
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1414
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`, { headers }).pipe(tap((records) => {
|
|
1411
1415
|
this.documentStore.set(records);
|
|
1412
1416
|
}), catchError((error) => {
|
|
1413
1417
|
return throwError(() => new Error(error));
|
|
@@ -1422,7 +1426,8 @@ class DocumentHttpService {
|
|
|
1422
1426
|
* @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
|
|
1423
1427
|
*/
|
|
1424
1428
|
updateDocumentName(documentId, payload) {
|
|
1425
|
-
|
|
1429
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1430
|
+
return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload, { headers }).pipe(catchError((error) => {
|
|
1426
1431
|
return throwError(() => new Error(error));
|
|
1427
1432
|
}));
|
|
1428
1433
|
}
|
|
@@ -1434,7 +1439,8 @@ class DocumentHttpService {
|
|
|
1434
1439
|
getUserListByContextId(contextId) {
|
|
1435
1440
|
if (!contextId)
|
|
1436
1441
|
return EMPTY;
|
|
1437
|
-
|
|
1442
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1443
|
+
return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers }).pipe(tap((userList) => {
|
|
1438
1444
|
this.documentStore.setUserList(userList);
|
|
1439
1445
|
}), catchError((error) => {
|
|
1440
1446
|
return throwError(() => new Error(error));
|
|
@@ -1459,7 +1465,8 @@ class DocumentHttpService {
|
|
|
1459
1465
|
if (categoryId) {
|
|
1460
1466
|
params = params.set(SHARED.CATEGORY, categoryId);
|
|
1461
1467
|
}
|
|
1462
|
-
|
|
1468
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1469
|
+
return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
|
|
1463
1470
|
this.documentStore.setStatusData(statusData);
|
|
1464
1471
|
}), catchError((error) => {
|
|
1465
1472
|
return throwError(() => new Error(error));
|
|
@@ -1487,7 +1494,8 @@ class DocumentHttpService {
|
|
|
1487
1494
|
if (searchKey) {
|
|
1488
1495
|
params = params.set(SHARED.SEARCH_KEY, searchKey);
|
|
1489
1496
|
}
|
|
1490
|
-
|
|
1497
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1498
|
+
return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
|
|
1491
1499
|
if (response.documents) {
|
|
1492
1500
|
this.documentStore.setDocumentList(response.documents);
|
|
1493
1501
|
}
|
|
@@ -1499,7 +1507,8 @@ class DocumentHttpService {
|
|
|
1499
1507
|
if (!documentId) {
|
|
1500
1508
|
return of([]);
|
|
1501
1509
|
}
|
|
1502
|
-
|
|
1510
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1511
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers }).pipe(catchError((error) => {
|
|
1503
1512
|
return throwError(() => new Error(error));
|
|
1504
1513
|
}));
|
|
1505
1514
|
}
|
|
@@ -1511,7 +1520,8 @@ class DocumentHttpService {
|
|
|
1511
1520
|
getCategoriesBySource(source) {
|
|
1512
1521
|
if (!source)
|
|
1513
1522
|
return EMPTY;
|
|
1514
|
-
|
|
1523
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1524
|
+
return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
|
|
1515
1525
|
return throwError(() => new Error(error));
|
|
1516
1526
|
}));
|
|
1517
1527
|
}
|
|
@@ -1523,7 +1533,8 @@ class DocumentHttpService {
|
|
|
1523
1533
|
getDocumentTypesByCategory(categoryId) {
|
|
1524
1534
|
if (!categoryId)
|
|
1525
1535
|
return EMPTY;
|
|
1526
|
-
|
|
1536
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1537
|
+
return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
|
|
1527
1538
|
return throwError(() => new Error(error));
|
|
1528
1539
|
}));
|
|
1529
1540
|
}
|
|
@@ -1533,7 +1544,8 @@ class DocumentHttpService {
|
|
|
1533
1544
|
* @returns {Observable<any>} Observable that emits the upload response.
|
|
1534
1545
|
*/
|
|
1535
1546
|
uploadFile(formData) {
|
|
1536
|
-
|
|
1547
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1548
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
|
|
1537
1549
|
return throwError(() => new Error(error));
|
|
1538
1550
|
}));
|
|
1539
1551
|
}
|
|
@@ -1543,7 +1555,8 @@ class DocumentHttpService {
|
|
|
1543
1555
|
* @returns {Observable<any>} Observable that emits the save response.
|
|
1544
1556
|
*/
|
|
1545
1557
|
saveDocumentUpload(payload) {
|
|
1546
|
-
|
|
1558
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1559
|
+
return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
|
|
1547
1560
|
return throwError(() => new Error(error));
|
|
1548
1561
|
}));
|
|
1549
1562
|
}
|
|
@@ -1558,7 +1571,8 @@ class DocumentHttpService {
|
|
|
1558
1571
|
const payload = {
|
|
1559
1572
|
statusUpdateDescription: statusUpdateDescription
|
|
1560
1573
|
};
|
|
1561
|
-
|
|
1574
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1575
|
+
return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
|
|
1562
1576
|
if (response && response.status) {
|
|
1563
1577
|
const normalizedStatus = this.normalizeStatus(response.status);
|
|
1564
1578
|
response.normalizedStatus = normalizedStatus;
|
|
@@ -1591,7 +1605,8 @@ class DocumentHttpService {
|
|
|
1591
1605
|
* @returns {Observable<any>} Observable that emits the delete response
|
|
1592
1606
|
*/
|
|
1593
1607
|
deleteDocument(documentId, contextId) {
|
|
1594
|
-
|
|
1608
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
1609
|
+
return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
|
|
1595
1610
|
this.getDocumentCatagories(contextId).subscribe();
|
|
1596
1611
|
this.getUserListByContextId(contextId).subscribe();
|
|
1597
1612
|
this.getStatusDocumentCount(contextId).subscribe();
|
|
@@ -2416,7 +2431,8 @@ class DocumentService {
|
|
|
2416
2431
|
* @returns {Observable<any>} Observable that emits the newly created document.
|
|
2417
2432
|
*/
|
|
2418
2433
|
create(entity) {
|
|
2419
|
-
|
|
2434
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer 9437a82d-edfb-450f-ace6-52ffb681720d` });
|
|
2435
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
|
|
2420
2436
|
}
|
|
2421
2437
|
/**
|
|
2422
2438
|
* Fetches all documents from the backend.
|
|
@@ -4840,30 +4856,24 @@ class DocumentScrollService {
|
|
|
4840
4856
|
}
|
|
4841
4857
|
this.sectionObserver = new IntersectionObserver((entries) => {
|
|
4842
4858
|
entries.forEach(entry => {
|
|
4843
|
-
if (entry.intersectionRatio === 0
|
|
4844
|
-
// Use a longer delay to prevent interference with main app navigation
|
|
4859
|
+
if (entry.intersectionRatio === 0) {
|
|
4845
4860
|
setTimeout(() => {
|
|
4846
4861
|
if (this.sectionObserver && menuItemId && entry.intersectionRatio === 0) {
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
this.disconnectSectionObserver();
|
|
4850
|
-
}
|
|
4862
|
+
this.documentStore.setSelectedMenuItem(null);
|
|
4863
|
+
this.disconnectSectionObserver();
|
|
4851
4864
|
}
|
|
4852
|
-
},
|
|
4865
|
+
}, 200);
|
|
4853
4866
|
}
|
|
4854
4867
|
});
|
|
4855
4868
|
}, {
|
|
4856
4869
|
threshold: [0, 0.1, 0.5, 1],
|
|
4857
|
-
rootMargin: '0px
|
|
4870
|
+
rootMargin: '0px'
|
|
4858
4871
|
});
|
|
4859
|
-
//
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
this.currentObservedSection = sectionElement;
|
|
4865
|
-
}
|
|
4866
|
-
}, 1500); // Increased from 1200ms to 1500ms for gentler behavior
|
|
4872
|
+
// Always start observing regardless of current visibility
|
|
4873
|
+
// The IntersectionObserver will handle visibility changes automatically
|
|
4874
|
+
this.sectionObserver.observe(sectionElement);
|
|
4875
|
+
this.currentObservedSection = sectionElement;
|
|
4876
|
+
}, 1200);
|
|
4867
4877
|
}
|
|
4868
4878
|
/**
|
|
4869
4879
|
* Disconnects the section observer
|
|
@@ -5530,41 +5540,91 @@ class DocumentHistoryService {
|
|
|
5530
5540
|
* @param docName - The name of the document
|
|
5531
5541
|
*/
|
|
5532
5542
|
downloadDocument(documentUrl, docName) {
|
|
5543
|
+
console.log('DocumentHistoryService: downloadDocument called with:', { documentUrl, docName });
|
|
5533
5544
|
if (!documentUrl) {
|
|
5545
|
+
console.warn('DocumentHistoryService: No document URL provided');
|
|
5534
5546
|
console.warn(ERRORS.NO_DOCUMENT_URL);
|
|
5535
5547
|
return;
|
|
5536
5548
|
}
|
|
5537
|
-
console.log('
|
|
5538
|
-
this.http.get(documentUrl, {
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5549
|
+
console.log('DocumentHistoryService: Starting download request to:', documentUrl);
|
|
5550
|
+
this.http.get(documentUrl, {
|
|
5551
|
+
responseType: 'blob',
|
|
5552
|
+
observe: 'response'
|
|
5553
|
+
}).subscribe({
|
|
5554
|
+
next: (response) => {
|
|
5555
|
+
console.log('DocumentHistoryService: Download response received:', response);
|
|
5556
|
+
console.log('DocumentHistoryService: Response headers:', response.headers);
|
|
5557
|
+
console.log('DocumentHistoryService: Response status:', response.status);
|
|
5558
|
+
const blob = response.body;
|
|
5559
|
+
if (!blob) {
|
|
5560
|
+
console.error('DocumentHistoryService: No blob data in response');
|
|
5561
|
+
return;
|
|
5562
|
+
}
|
|
5563
|
+
console.log('DocumentHistoryService: Blob size:', blob.size, 'bytes');
|
|
5564
|
+
console.log('DocumentHistoryService: Blob type:', blob.type);
|
|
5565
|
+
try {
|
|
5566
|
+
const blobUrl = window.URL.createObjectURL(blob);
|
|
5567
|
+
console.log('DocumentHistoryService: Created blob URL:', blobUrl);
|
|
5568
|
+
const a = document.createElement('a');
|
|
5569
|
+
a.href = blobUrl;
|
|
5570
|
+
a.download = docName ?? SHARED.DOCUMENT;
|
|
5571
|
+
a.style.display = SHARED.NONE;
|
|
5572
|
+
console.log('DocumentHistoryService: Download link created with filename:', a.download);
|
|
5573
|
+
document.body.appendChild(a);
|
|
5574
|
+
a.click();
|
|
5575
|
+
a.remove();
|
|
5576
|
+
console.log('DocumentHistoryService: Download initiated successfully');
|
|
5577
|
+
// Clean up blob URL
|
|
5578
|
+
setTimeout(() => {
|
|
5579
|
+
window.URL.revokeObjectURL(blobUrl);
|
|
5580
|
+
console.log('DocumentHistoryService: Blob URL cleaned up');
|
|
5581
|
+
}, 1000);
|
|
5582
|
+
}
|
|
5583
|
+
catch (error) {
|
|
5584
|
+
console.error('DocumentHistoryService: Error creating download link:', error);
|
|
5545
5585
|
}
|
|
5546
|
-
const blobUrl = window.URL.createObjectURL(blob);
|
|
5547
|
-
const a = document.createElement('a');
|
|
5548
|
-
a.href = blobUrl;
|
|
5549
|
-
a.download = downloadName;
|
|
5550
|
-
a.style.display = SHARED.NONE;
|
|
5551
|
-
document.body.appendChild(a);
|
|
5552
|
-
a.click();
|
|
5553
|
-
a.remove();
|
|
5554
|
-
window.URL.revokeObjectURL(blobUrl);
|
|
5555
|
-
console.log('Download initiated for:', downloadName);
|
|
5556
5586
|
},
|
|
5557
5587
|
error: (err) => {
|
|
5558
|
-
console.error(
|
|
5559
|
-
console.error('
|
|
5588
|
+
console.error('DocumentHistoryService: Download request failed:', err);
|
|
5589
|
+
console.error('DocumentHistoryService: Error details:', {
|
|
5560
5590
|
status: err.status,
|
|
5561
5591
|
statusText: err.statusText,
|
|
5562
5592
|
message: err.message,
|
|
5563
5593
|
url: documentUrl
|
|
5564
5594
|
});
|
|
5595
|
+
// Try alternative download method for CORS issues
|
|
5596
|
+
console.log('DocumentHistoryService: Attempting alternative download method...');
|
|
5597
|
+
this.downloadWithAlternativeMethod(documentUrl, docName);
|
|
5565
5598
|
}
|
|
5566
5599
|
});
|
|
5567
5600
|
}
|
|
5601
|
+
/**
|
|
5602
|
+
* Alternative download method for CORS issues
|
|
5603
|
+
* @param documentUrl - The URL of the document to download
|
|
5604
|
+
* @param docName - The name of the document
|
|
5605
|
+
*/
|
|
5606
|
+
downloadWithAlternativeMethod(documentUrl, docName) {
|
|
5607
|
+
console.log('DocumentHistoryService: Using alternative download method');
|
|
5608
|
+
try {
|
|
5609
|
+
const a = document.createElement('a');
|
|
5610
|
+
a.href = documentUrl;
|
|
5611
|
+
a.download = docName ?? SHARED.DOCUMENT;
|
|
5612
|
+
a.target = '_blank';
|
|
5613
|
+
a.style.display = SHARED.NONE;
|
|
5614
|
+
console.log('DocumentHistoryService: Alternative download link created:', {
|
|
5615
|
+
href: a.href,
|
|
5616
|
+
download: a.download,
|
|
5617
|
+
target: a.target
|
|
5618
|
+
});
|
|
5619
|
+
document.body.appendChild(a);
|
|
5620
|
+
a.click();
|
|
5621
|
+
a.remove();
|
|
5622
|
+
console.log('DocumentHistoryService: Alternative download method completed');
|
|
5623
|
+
}
|
|
5624
|
+
catch (error) {
|
|
5625
|
+
console.error('DocumentHistoryService: Alternative download method failed:', error);
|
|
5626
|
+
}
|
|
5627
|
+
}
|
|
5568
5628
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryService, deps: [{ token: DocumentHistoryStyleService }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5569
5629
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryService, providedIn: 'root' });
|
|
5570
5630
|
}
|
|
@@ -5636,6 +5696,8 @@ class DocumentHistoryComponent {
|
|
|
5636
5696
|
* @param docName - The name of the document
|
|
5637
5697
|
*/
|
|
5638
5698
|
downloadDocument(documentUrl, docName) {
|
|
5699
|
+
console.log('DocumentHistoryComponent: downloadDocument called with:', { documentUrl, docName });
|
|
5700
|
+
console.log('DocumentHistoryComponent: Calling service download method...');
|
|
5639
5701
|
this.documentHistoryService.downloadDocument(documentUrl, docName);
|
|
5640
5702
|
}
|
|
5641
5703
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, deps: [{ token: DocumentHistoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -6788,13 +6850,18 @@ class DocumentActionsService {
|
|
|
6788
6850
|
if (statusId) {
|
|
6789
6851
|
return `status-${statusId}-card`;
|
|
6790
6852
|
}
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6853
|
+
if (!currentStatus) {
|
|
6854
|
+
return SHARED.CARD_PENDING;
|
|
6855
|
+
}
|
|
6856
|
+
const status = currentStatus.toLowerCase();
|
|
6857
|
+
if (status === SHARED.STATUS_ACCEPTED.toLowerCase() || status === SHARED.STATUS_APPROVED.toLowerCase()) {
|
|
6858
|
+
return SHARED.CARD_ACCEPTED;
|
|
6859
|
+
}
|
|
6860
|
+
else if (status === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() || status === SHARED.STATUS_REJECTED.toLowerCase()) {
|
|
6861
|
+
return SHARED.CARD_REJECTED;
|
|
6862
|
+
}
|
|
6863
|
+
else {
|
|
6864
|
+
return SHARED.CARD_PENDING;
|
|
6798
6865
|
}
|
|
6799
6866
|
}
|
|
6800
6867
|
/**
|
|
@@ -6808,13 +6875,18 @@ class DocumentActionsService {
|
|
|
6808
6875
|
if (statusId) {
|
|
6809
6876
|
return `status-${statusId}-reject`;
|
|
6810
6877
|
}
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6878
|
+
if (!currentStatus) {
|
|
6879
|
+
return SHARED.BUTTON_DEFAULT_REJECT;
|
|
6880
|
+
}
|
|
6881
|
+
const status = currentStatus.toLowerCase();
|
|
6882
|
+
if (status === SHARED.STATUS_ACCEPTED.toLowerCase() || status === SHARED.STATUS_APPROVED.toLowerCase()) {
|
|
6883
|
+
return SHARED.BUTTON_SECONDARY_REJECT;
|
|
6884
|
+
}
|
|
6885
|
+
else if (status === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() || status === SHARED.STATUS_REJECTED.toLowerCase()) {
|
|
6886
|
+
return SHARED.BUTTON_PRIMARY_REJECT;
|
|
6887
|
+
}
|
|
6888
|
+
else {
|
|
6889
|
+
return SHARED.BUTTON_DEFAULT_REJECT;
|
|
6818
6890
|
}
|
|
6819
6891
|
}
|
|
6820
6892
|
/**
|
|
@@ -6828,13 +6900,18 @@ class DocumentActionsService {
|
|
|
6828
6900
|
if (statusId) {
|
|
6829
6901
|
return `status-${statusId}-accept`;
|
|
6830
6902
|
}
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6903
|
+
if (!currentStatus) {
|
|
6904
|
+
return SHARED.BUTTON_DEFAULT_ACCEPT;
|
|
6905
|
+
}
|
|
6906
|
+
const status = currentStatus.toLowerCase();
|
|
6907
|
+
if (status === SHARED.STATUS_ACCEPTED.toLowerCase() || status === SHARED.STATUS_APPROVED.toLowerCase()) {
|
|
6908
|
+
return SHARED.BUTTON_PRIMARY_ACCEPT;
|
|
6909
|
+
}
|
|
6910
|
+
else if (status === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() || status === SHARED.STATUS_REJECTED.toLowerCase()) {
|
|
6911
|
+
return SHARED.BUTTON_SECONDARY_ACCEPT;
|
|
6912
|
+
}
|
|
6913
|
+
else {
|
|
6914
|
+
return SHARED.BUTTON_DEFAULT_ACCEPT;
|
|
6838
6915
|
}
|
|
6839
6916
|
}
|
|
6840
6917
|
/**
|
|
@@ -7064,6 +7141,29 @@ class DocumentActionsComponent {
|
|
|
7064
7141
|
this._rejectNote = value;
|
|
7065
7142
|
this.updateRejectNoteEmpty();
|
|
7066
7143
|
}
|
|
7144
|
+
/**
|
|
7145
|
+
* Checks if both action buttons should be disabled
|
|
7146
|
+
* @returns {boolean} True if both buttons should be disabled
|
|
7147
|
+
*/
|
|
7148
|
+
get areButtonsDisabled() {
|
|
7149
|
+
return this.isDocumentApproved || this.isDocumentRejected;
|
|
7150
|
+
}
|
|
7151
|
+
/**
|
|
7152
|
+
* Checks if the document is approved (case-insensitive)
|
|
7153
|
+
* @returns {boolean} True if document is approved
|
|
7154
|
+
*/
|
|
7155
|
+
get isDocumentApproved() {
|
|
7156
|
+
return this.currentStatus?.toLowerCase() === SHARED.STATUS_ACCEPTED.toLowerCase() ||
|
|
7157
|
+
this.currentStatus?.toLowerCase() === SHARED.STATUS_APPROVED.toLowerCase();
|
|
7158
|
+
}
|
|
7159
|
+
/**
|
|
7160
|
+
* Checks if the document is rejected (case-insensitive)
|
|
7161
|
+
* @returns {boolean} True if document is rejected
|
|
7162
|
+
*/
|
|
7163
|
+
get isDocumentRejected() {
|
|
7164
|
+
return this.currentStatus?.toLowerCase() === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() ||
|
|
7165
|
+
this.currentStatus?.toLowerCase() === SHARED.STATUS_REJECTED.toLowerCase();
|
|
7166
|
+
}
|
|
7067
7167
|
ngOnChanges(changes) {
|
|
7068
7168
|
this.updateComputedProperties();
|
|
7069
7169
|
if (changes['isLoading'] && !this.isLoading) {
|
|
@@ -7139,11 +7239,11 @@ class DocumentActionsComponent {
|
|
|
7139
7239
|
this.rejectNote = SHARED.EMPTY;
|
|
7140
7240
|
}
|
|
7141
7241
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, deps: [{ token: DocumentActionsService }, { token: SessionService }, { token: i3.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7142
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentActionsComponent, isStandalone: false, selector: "document-actions", inputs: { document: "document", documentId: "documentId", currentStatus: "currentStatus", isLoading: "isLoading", isUploaded: "isUploaded", statusId: "statusId" }, outputs: { actionPerformed: "actionPerformed" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !=='Pending' && !document?.isUploaded && document?.status === 'Reviewing'\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_REJECTED_LOWERCASE ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"currentStatus === SHARED.STATUS_ACCEPTED || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"currentStatus === SHARED.STATUS_ACCEPTED\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_ACCEPTED ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if(document?.isUploaded){\r\n<div class=\"actions-card\">\r\n <div class=\"actions-buttons\">\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n}\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card:has(.delete-btn){width:auto;margin-left:0;background-color:#fff;border:1px solid #e2e8f0;padding:.5rem}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#f5f5f5;border-color:#e57373;color:#e57373;padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:6px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i6$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i9$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
|
|
7242
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentActionsComponent, isStandalone: false, selector: "document-actions", inputs: { document: "document", documentId: "documentId", currentStatus: "currentStatus", isLoading: "isLoading", isUploaded: "isUploaded", statusId: "statusId" }, outputs: { actionPerformed: "actionPerformed" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !=='Pending' && !document?.isUploaded && document?.status === 'Reviewing'\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"areButtonsDisabled || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"isDocumentRejected\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ isDocumentRejected ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"areButtonsDisabled || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"isDocumentApproved\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ isDocumentApproved ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if(document?.isUploaded){\r\n<div class=\"actions-card\">\r\n <div class=\"actions-buttons\">\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n}\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card:has(.delete-btn){width:auto;margin-left:0;background-color:#fff;border:1px solid #e2e8f0;padding:.5rem}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#f5f5f5;border-color:#e57373;color:#e57373;padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:6px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i6$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i9$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
|
|
7143
7243
|
}
|
|
7144
7244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, decorators: [{
|
|
7145
7245
|
type: Component,
|
|
7146
|
-
args: [{ selector: 'document-actions', standalone: false, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !=='Pending' && !document?.isUploaded && document?.status === 'Reviewing'\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_REJECTED_LOWERCASE ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"currentStatus === SHARED.STATUS_ACCEPTED || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"currentStatus === SHARED.STATUS_ACCEPTED\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_ACCEPTED ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if(document?.isUploaded){\r\n<div class=\"actions-card\">\r\n <div class=\"actions-buttons\">\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n}\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card:has(.delete-btn){width:auto;margin-left:0;background-color:#fff;border:1px solid #e2e8f0;padding:.5rem}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#f5f5f5;border-color:#e57373;color:#e57373;padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:6px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"] }]
|
|
7246
|
+
args: [{ selector: 'document-actions', standalone: false, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !=='Pending' && !document?.isUploaded && document?.status === 'Reviewing'\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"areButtonsDisabled || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"isDocumentRejected\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ isDocumentRejected ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"areButtonsDisabled || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"isDocumentApproved\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ isDocumentApproved ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if(document?.isUploaded){\r\n<div class=\"actions-card\">\r\n <div class=\"actions-buttons\">\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n}\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card:has(.delete-btn){width:auto;margin-left:0;background-color:#fff;border:1px solid #e2e8f0;padding:.5rem}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#f5f5f5;border-color:#e57373;color:#e57373;padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:6px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"] }]
|
|
7147
7247
|
}], ctorParameters: () => [{ type: DocumentActionsService }, { type: SessionService }, { type: i3.ConfirmationService }], propDecorators: { document: [{
|
|
7148
7248
|
type: Input
|
|
7149
7249
|
}], documentId: [{
|
|
@@ -7170,6 +7270,7 @@ class DocumentViewerComponent {
|
|
|
7170
7270
|
documentService;
|
|
7171
7271
|
messageService;
|
|
7172
7272
|
documentViewerService;
|
|
7273
|
+
documentStore;
|
|
7173
7274
|
/**
|
|
7174
7275
|
* Get the selected document by user.
|
|
7175
7276
|
* @type {*}
|
|
@@ -7190,6 +7291,11 @@ class DocumentViewerComponent {
|
|
|
7190
7291
|
* @type {EventEmitter<void>}
|
|
7191
7292
|
*/
|
|
7192
7293
|
documentStatusUpdated = new EventEmitter();
|
|
7294
|
+
/**
|
|
7295
|
+
* Event emitted when the document viewer is destroyed to trigger refresh
|
|
7296
|
+
* @type {EventEmitter<void>}
|
|
7297
|
+
*/
|
|
7298
|
+
viewerDestroyed = new EventEmitter();
|
|
7193
7299
|
/**
|
|
7194
7300
|
* Indicates whether a checkbox is selected.
|
|
7195
7301
|
* @type {boolean}
|
|
@@ -7234,11 +7340,12 @@ class DocumentViewerComponent {
|
|
|
7234
7340
|
* @param {DocumentService} documentService - Handle the states.
|
|
7235
7341
|
* @param {DocumentViewerService} documentViewerService - Handle the viewer business logic.
|
|
7236
7342
|
*/
|
|
7237
|
-
constructor(documentHttpService, documentService, messageService, documentViewerService) {
|
|
7343
|
+
constructor(documentHttpService, documentService, messageService, documentViewerService, documentStore) {
|
|
7238
7344
|
this.documentHttpService = documentHttpService;
|
|
7239
7345
|
this.documentService = documentService;
|
|
7240
7346
|
this.messageService = messageService;
|
|
7241
7347
|
this.documentViewerService = documentViewerService;
|
|
7348
|
+
this.documentStore = documentStore;
|
|
7242
7349
|
// Subscribe to state changes from the service
|
|
7243
7350
|
this.subscription.add(this.documentViewerService.state$.subscribe(state => {
|
|
7244
7351
|
this.currentState = state;
|
|
@@ -7271,14 +7378,36 @@ class DocumentViewerComponent {
|
|
|
7271
7378
|
}
|
|
7272
7379
|
ngOnDestroy() {
|
|
7273
7380
|
this.subscription.unsubscribe();
|
|
7381
|
+
// Refresh document data when viewer is destroyed (modal closed)
|
|
7382
|
+
if (this.contextId) {
|
|
7383
|
+
this.refreshDocumentData();
|
|
7384
|
+
}
|
|
7385
|
+
// Emit event to notify parent that viewer is destroyed
|
|
7386
|
+
this.viewerDestroyed.emit();
|
|
7387
|
+
}
|
|
7388
|
+
/**
|
|
7389
|
+
* Refreshes document data when the viewer is closed
|
|
7390
|
+
*/
|
|
7391
|
+
refreshDocumentData() {
|
|
7392
|
+
// Clear only the necessary state, preserve document history
|
|
7393
|
+
// This will trigger the parent components to re-fetch data when needed
|
|
7394
|
+
this.documentStore.clearSelectionState();
|
|
7395
|
+
this.documentStore.setDocumentListResponse(null);
|
|
7396
|
+
this.documentStore.setDocumentList([]);
|
|
7397
|
+
this.documentStore.setDocumentCategories([]);
|
|
7398
|
+
this.documentStore.setUserList([]);
|
|
7399
|
+
this.documentStore.setStatusData([]);
|
|
7400
|
+
this.documentStore.setCurrentDocument(null);
|
|
7401
|
+
this.documentStore.setFolders([]);
|
|
7402
|
+
this.documentStore.setDocumentAlert(null);
|
|
7274
7403
|
}
|
|
7275
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: i3.MessageService }, { token: DocumentViewerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7276
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList", contextId: "contextId" }, outputs: { documentStatusUpdated: "documentStatusUpdated" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer-container grid p-formgrid\">\r\n <div class=\"main-content col-12 md:col-12\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid col-12 md:col-12\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview col-12 md:col-9\">\r\n <document-content-viewer\r\n [documentUrl]=\"selectedDocument?.documentUrl\"\r\n [contentType]=\"selectedDocument?.contentType\"\r\n [documentName]=\"selectedDocument?.docName\"\r\n ></document-content-viewer>\r\n </div>\r\n }\r\n\r\n <div class=\"sidebar col-12 md:col-3 pt-0\">\r\n \r\n <!-- <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n -->\r\n \r\n <div class=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;height:100%;width:100%;overflow:hidden;position:relative}.document-viewer-container{height:100%;width:100%;position:relative;z-index:1;overflow:hidden;display:flex;flex-direction:column}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column;overflow:hidden;min-height:0}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem;flex-shrink:0}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 400px;gap:1rem;height:0;min-height:0;overflow:hidden;flex:1}.document-viewer-container .main-content .content-grid .document-preview{background:transparent;border-radius:8px;height:100%;width:100%;min-width:0;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .document-preview::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;height:100%;overflow-y:auto;min-width:0;width:100%;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container::-webkit-scrollbar{display:none}::ng-deep .p-dialog-content{overflow:hidden!important;height:100%!important}::ng-deep .p-dialog{overflow:hidden!important}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 380px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer{position:relative;z-index:1}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important;z-index:9999!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header{background-color:#fff;border-radius:0;padding:.5rem}.document-viewer .p-dialog-content{background-color:#fff;border-radius:0;overflow:hidden}\n"], dependencies: [{ kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: DocumentHistoryComponent, selector: "document-history", inputs: ["historyData", "showHistory"] }, { kind: "component", type: DocumentContentViewerComponent, selector: "document-content-viewer", inputs: ["documentUrl", "contentType", "documentName"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: i3.MessageService }, { token: DocumentViewerService }, { token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
7405
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList", contextId: "contextId" }, outputs: { documentStatusUpdated: "documentStatusUpdated", viewerDestroyed: "viewerDestroyed" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer-container grid p-formgrid\">\r\n <div class=\"main-content col-12 md:col-12\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid col-12 md:col-12\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview col-12 md:col-9\">\r\n <document-content-viewer\r\n [documentUrl]=\"selectedDocument?.documentUrl\"\r\n [contentType]=\"selectedDocument?.contentType\"\r\n [documentName]=\"selectedDocument?.docName\"\r\n ></document-content-viewer>\r\n </div>\r\n }\r\n\r\n <div class=\"sidebar col-12 md:col-3 pt-0\">\r\n \r\n <!-- <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n -->\r\n \r\n <div class=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;height:100%;width:100%;overflow:hidden;position:relative}.document-viewer-container{height:100%;width:100%;position:relative;z-index:1;overflow:hidden;display:flex;flex-direction:column}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column;overflow:hidden;min-height:0}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem;flex-shrink:0}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 400px;gap:1rem;height:0;min-height:0;overflow:hidden;flex:1}.document-viewer-container .main-content .content-grid .document-preview{background:transparent;border-radius:8px;height:100%;width:100%;min-width:0;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .document-preview::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;height:100%;overflow-y:auto;min-width:0;width:100%;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container::-webkit-scrollbar{display:none}::ng-deep .p-dialog-content{overflow:hidden!important;height:100%!important}::ng-deep .p-dialog{overflow:hidden!important}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 380px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer{position:relative;z-index:1}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important;z-index:9999!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header{background-color:#fff;border-radius:0;padding:.5rem}.document-viewer .p-dialog-content{background-color:#fff;border-radius:0;overflow:hidden}\n"], dependencies: [{ kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: DocumentHistoryComponent, selector: "document-history", inputs: ["historyData", "showHistory"] }, { kind: "component", type: DocumentContentViewerComponent, selector: "document-content-viewer", inputs: ["documentUrl", "contentType", "documentName"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7277
7406
|
}
|
|
7278
7407
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, decorators: [{
|
|
7279
7408
|
type: Component,
|
|
7280
7409
|
args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer-container grid p-formgrid\">\r\n <div class=\"main-content col-12 md:col-12\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid col-12 md:col-12\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview col-12 md:col-9\">\r\n <document-content-viewer\r\n [documentUrl]=\"selectedDocument?.documentUrl\"\r\n [contentType]=\"selectedDocument?.contentType\"\r\n [documentName]=\"selectedDocument?.docName\"\r\n ></document-content-viewer>\r\n </div>\r\n }\r\n\r\n <div class=\"sidebar col-12 md:col-3 pt-0\">\r\n \r\n <!-- <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n -->\r\n \r\n <div class=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;height:100%;width:100%;overflow:hidden;position:relative}.document-viewer-container{height:100%;width:100%;position:relative;z-index:1;overflow:hidden;display:flex;flex-direction:column}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column;overflow:hidden;min-height:0}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem;flex-shrink:0}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 400px;gap:1rem;height:0;min-height:0;overflow:hidden;flex:1}.document-viewer-container .main-content .content-grid .document-preview{background:transparent;border-radius:8px;height:100%;width:100%;min-width:0;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .document-preview::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;height:100%;overflow-y:auto;min-width:0;width:100%;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container::-webkit-scrollbar{display:none}::ng-deep .p-dialog-content{overflow:hidden!important;height:100%!important}::ng-deep .p-dialog{overflow:hidden!important}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 380px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer{position:relative;z-index:1}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important;z-index:9999!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header{background-color:#fff;border-radius:0;padding:.5rem}.document-viewer .p-dialog-content{background-color:#fff;border-radius:0;overflow:hidden}\n"] }]
|
|
7281
|
-
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: i3.MessageService }, { type: DocumentViewerService }], propDecorators: { selectedDocument: [{
|
|
7410
|
+
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: i3.MessageService }, { type: DocumentViewerService }, { type: DocumentStore }], propDecorators: { selectedDocument: [{
|
|
7282
7411
|
type: Input
|
|
7283
7412
|
}], documentList: [{
|
|
7284
7413
|
type: Input
|
|
@@ -7286,6 +7415,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7286
7415
|
type: Input
|
|
7287
7416
|
}], documentStatusUpdated: [{
|
|
7288
7417
|
type: Output
|
|
7418
|
+
}], viewerDestroyed: [{
|
|
7419
|
+
type: Output
|
|
7289
7420
|
}] } });
|
|
7290
7421
|
|
|
7291
7422
|
/**
|
|
@@ -7429,11 +7560,20 @@ class DocumentListComponent {
|
|
|
7429
7560
|
*/
|
|
7430
7561
|
disallowedCharsRegex = /[<>:"\/\\|?*]/;
|
|
7431
7562
|
/**
|
|
7432
|
-
* Getter to
|
|
7563
|
+
* Getter to return category labels as they come from the API
|
|
7433
7564
|
*/
|
|
7434
7565
|
get formattedCategoryLabels() {
|
|
7435
|
-
return this.documentCategories.map(category =>
|
|
7436
|
-
|
|
7566
|
+
return this.documentCategories.map(category => category.label);
|
|
7567
|
+
}
|
|
7568
|
+
/**
|
|
7569
|
+
* Getter to generate safe category IDs for HTML elements
|
|
7570
|
+
*/
|
|
7571
|
+
get categoryIds() {
|
|
7572
|
+
return this.documentCategories.map((category, index) => {
|
|
7573
|
+
if (category?.label) {
|
|
7574
|
+
return `section-${category.label.toLowerCase().replace(' ', '-')}`;
|
|
7575
|
+
}
|
|
7576
|
+
return `section-category-${index}`;
|
|
7437
7577
|
});
|
|
7438
7578
|
}
|
|
7439
7579
|
/**
|
|
@@ -7483,7 +7623,6 @@ class DocumentListComponent {
|
|
|
7483
7623
|
this.scrollToCategorySection(this.selectedMenuItemId);
|
|
7484
7624
|
}, 100);
|
|
7485
7625
|
}
|
|
7486
|
-
// Setup scroll event listeners to track scrolling state
|
|
7487
7626
|
this.documentScrollService.setupScrollListeners(this.documentCategoriesContainer.nativeElement);
|
|
7488
7627
|
}
|
|
7489
7628
|
/**
|
|
@@ -7553,21 +7692,18 @@ class DocumentListComponent {
|
|
|
7553
7692
|
*/
|
|
7554
7693
|
onDocumentNameClick() {
|
|
7555
7694
|
this.isEditingDocumentName = true;
|
|
7556
|
-
|
|
7557
|
-
if (this.selectedDocument.aliasName && this.selectedDocument.aliasName.trim() !== '') {
|
|
7558
|
-
// We're editing an existing alias name
|
|
7695
|
+
if (this.selectedDocument.aliasName && this.selectedDocument.aliasName.trim() !== SHARED.EMPTY) {
|
|
7559
7696
|
this.documentName = this.selectedDocument.aliasName;
|
|
7560
|
-
this.documentExtension =
|
|
7697
|
+
this.documentExtension = SHARED.EMPTY;
|
|
7561
7698
|
}
|
|
7562
7699
|
else {
|
|
7563
|
-
// We're editing the docName (extract name without extension for editing)
|
|
7564
7700
|
const lastDotIndex = this.selectedDocument.docName.lastIndexOf('.');
|
|
7565
7701
|
if (lastDotIndex !== -1) {
|
|
7566
7702
|
this.documentExtension = this.selectedDocument.docName.substring(lastDotIndex);
|
|
7567
7703
|
this.documentName = this.selectedDocument.docName.substring(0, lastDotIndex);
|
|
7568
7704
|
}
|
|
7569
7705
|
else {
|
|
7570
|
-
this.documentExtension =
|
|
7706
|
+
this.documentExtension = SHARED.EMPTY;
|
|
7571
7707
|
this.documentName = this.selectedDocument.docName;
|
|
7572
7708
|
}
|
|
7573
7709
|
}
|
|
@@ -7584,16 +7720,13 @@ class DocumentListComponent {
|
|
|
7584
7720
|
*/
|
|
7585
7721
|
cancelDocumentNameEdit() {
|
|
7586
7722
|
this.isEditingDocumentName = false;
|
|
7587
|
-
|
|
7588
|
-
if (this.selectedDocument.aliasName && this.selectedDocument.aliasName.trim() !== '') {
|
|
7589
|
-
// We were editing an alias name
|
|
7723
|
+
if (this.selectedDocument.aliasName && this.selectedDocument.aliasName.trim() !== SHARED.EMPTY) {
|
|
7590
7724
|
this.documentName = this.selectedDocument.aliasName;
|
|
7591
|
-
this.documentExtension =
|
|
7725
|
+
this.documentExtension = SHARED.EMPTY;
|
|
7592
7726
|
}
|
|
7593
7727
|
else {
|
|
7594
|
-
// We were editing the docName
|
|
7595
7728
|
this.documentName = this.selectedDocument.docName;
|
|
7596
|
-
this.documentExtension =
|
|
7729
|
+
this.documentExtension = SHARED.EMPTY;
|
|
7597
7730
|
}
|
|
7598
7731
|
this.fileNameError = SHARED.EMPTY;
|
|
7599
7732
|
}
|
|
@@ -7624,14 +7757,21 @@ class DocumentListComponent {
|
|
|
7624
7757
|
}
|
|
7625
7758
|
}
|
|
7626
7759
|
/**
|
|
7627
|
-
*
|
|
7760
|
+
* Handles the event when the document viewer is destroyed
|
|
7761
|
+
* Triggers a refresh of the document data
|
|
7762
|
+
*/
|
|
7763
|
+
handleViewerDestroyed() {
|
|
7764
|
+
// Refresh document data when viewer is closed
|
|
7765
|
+
this.documentListService.refreshDocumentList(this.contextId);
|
|
7766
|
+
}
|
|
7767
|
+
/**
|
|
7768
|
+
* Scrolls to the category section that matches the selected menu item
|
|
7628
7769
|
* @param menuItemId - The ID of the selected menu item
|
|
7629
7770
|
*/
|
|
7630
7771
|
scrollToCategorySection(menuItemId) {
|
|
7631
7772
|
if (!this.documentCategories || !this.documentCategoriesContainer) {
|
|
7632
7773
|
return;
|
|
7633
7774
|
}
|
|
7634
|
-
// Set scrolling flag
|
|
7635
7775
|
this.documentScrollService.setScrolling();
|
|
7636
7776
|
let targetCategory = this.documentCategories.find(category => category.label.toLowerCase().includes(SHARED.APPLICATION_LOWERCASE) ||
|
|
7637
7777
|
category.label.toLowerCase().includes(SHARED.APPLICANT_LOWERCASE) ||
|
|
@@ -7652,24 +7792,13 @@ class DocumentListComponent {
|
|
|
7652
7792
|
const categoryIndex = this.documentCategories.findIndex(cat => cat === targetCategory);
|
|
7653
7793
|
const categoryElements = this.documentCategoriesContainer.nativeElement.querySelectorAll('.category');
|
|
7654
7794
|
if (categoryElements[categoryIndex]) {
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
const containerRect = container.getBoundingClientRect();
|
|
7660
|
-
const targetRect = targetElement.getBoundingClientRect();
|
|
7661
|
-
// Calculate scroll position within container bounds
|
|
7662
|
-
const targetTop = Math.max(0, targetElement.offsetTop - container.offsetTop - 20);
|
|
7663
|
-
const maxScrollTop = container.scrollHeight - container.clientHeight;
|
|
7664
|
-
const finalScrollTop = Math.min(targetTop, maxScrollTop);
|
|
7665
|
-
container.scrollTo({
|
|
7666
|
-
top: finalScrollTop,
|
|
7667
|
-
behavior: 'smooth'
|
|
7795
|
+
categoryElements[categoryIndex].scrollIntoView({
|
|
7796
|
+
behavior: 'smooth',
|
|
7797
|
+
block: 'start',
|
|
7798
|
+
inline: 'nearest'
|
|
7668
7799
|
});
|
|
7669
7800
|
this.highlightCategory(categoryElements[categoryIndex]);
|
|
7670
|
-
// Setup observer to deselect menu item when section scrolls out of view
|
|
7671
7801
|
this.documentScrollService.setupSectionObserver(categoryElements[categoryIndex], this.selectedMenuItemId);
|
|
7672
|
-
// Reset scrolling flag after smooth scroll completes
|
|
7673
7802
|
this.documentScrollService.resetScrollingAfterDelay(1200);
|
|
7674
7803
|
}
|
|
7675
7804
|
}
|
|
@@ -7689,36 +7818,25 @@ class DocumentListComponent {
|
|
|
7689
7818
|
const sectionId = 'section-' + targetCategory.label.toLowerCase().replace(SHARED.EMPTY_SPACE, SHARED.HYPEN);
|
|
7690
7819
|
let targetElement = this.documentCategoriesContainer.nativeElement.querySelector(`#${sectionId}`);
|
|
7691
7820
|
if (targetElement) {
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
const maxScrollTop = container.scrollHeight - container.clientHeight;
|
|
7697
|
-
const finalScrollTop = Math.min(targetTop, maxScrollTop);
|
|
7698
|
-
container.scrollTo({
|
|
7699
|
-
top: finalScrollTop,
|
|
7700
|
-
behavior: 'smooth'
|
|
7821
|
+
targetElement.scrollIntoView({
|
|
7822
|
+
behavior: 'smooth',
|
|
7823
|
+
block: 'start',
|
|
7824
|
+
inline: 'nearest'
|
|
7701
7825
|
});
|
|
7702
7826
|
this.highlightCategory(targetElement);
|
|
7703
7827
|
// Setup observer to deselect menu item when section scrolls out of view
|
|
7704
7828
|
this.documentScrollService.setupSectionObserver(targetElement, this.selectedMenuItemId);
|
|
7705
7829
|
// Reset scrolling flag after smooth scroll completes
|
|
7706
|
-
this.documentScrollService.resetScrollingAfterDelay(
|
|
7830
|
+
this.documentScrollService.resetScrollingAfterDelay(1200);
|
|
7707
7831
|
}
|
|
7708
7832
|
else {
|
|
7709
7833
|
const categoryIndex = this.documentCategories.findIndex(cat => cat === targetCategory);
|
|
7710
7834
|
const categoryElements = this.documentCategoriesContainer.nativeElement.querySelectorAll('.category');
|
|
7711
7835
|
if (categoryElements[categoryIndex]) {
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
const targetTop = Math.max(0, targetElement.offsetTop - container.offsetTop - 20);
|
|
7717
|
-
const maxScrollTop = container.scrollHeight - container.clientHeight;
|
|
7718
|
-
const finalScrollTop = Math.min(targetTop, maxScrollTop);
|
|
7719
|
-
container.scrollTo({
|
|
7720
|
-
top: finalScrollTop,
|
|
7721
|
-
behavior: 'smooth'
|
|
7836
|
+
categoryElements[categoryIndex].scrollIntoView({
|
|
7837
|
+
behavior: 'smooth',
|
|
7838
|
+
block: 'start',
|
|
7839
|
+
inline: 'nearest'
|
|
7722
7840
|
});
|
|
7723
7841
|
this.highlightCategory(categoryElements[categoryIndex]);
|
|
7724
7842
|
// Setup observer to deselect menu item when section scrolls out of view
|
|
@@ -7755,17 +7873,7 @@ class DocumentListComponent {
|
|
|
7755
7873
|
const observer = new IntersectionObserver((entries) => {
|
|
7756
7874
|
entries.forEach(entry => {
|
|
7757
7875
|
if (entry.isIntersecting && entry.target.id === `section-${targetCategory.label.toLowerCase().replace(SHARED.EMPTY_SPACE, SHARED.HYPEN)}`) {
|
|
7758
|
-
|
|
7759
|
-
const targetElement = entry.target;
|
|
7760
|
-
const container = this.documentCategoriesContainer.nativeElement;
|
|
7761
|
-
// Ensure we stay within container bounds
|
|
7762
|
-
const targetTop = Math.max(0, targetElement.offsetTop - container.offsetTop - 20);
|
|
7763
|
-
const maxScrollTop = container.scrollHeight - container.clientHeight;
|
|
7764
|
-
const finalScrollTop = Math.min(targetTop, maxScrollTop);
|
|
7765
|
-
container.scrollTo({
|
|
7766
|
-
top: finalScrollTop,
|
|
7767
|
-
behavior: 'smooth'
|
|
7768
|
-
});
|
|
7876
|
+
entry.target.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
7769
7877
|
this.highlightCategory(entry.target);
|
|
7770
7878
|
observer.disconnect();
|
|
7771
7879
|
// Setup observer to deselect menu item when section scrolls out of view
|
|
@@ -7787,7 +7895,6 @@ class DocumentListComponent {
|
|
|
7787
7895
|
*/
|
|
7788
7896
|
resetToTop() {
|
|
7789
7897
|
if (this.documentCategoriesContainer) {
|
|
7790
|
-
// Use gentler scrolling that doesn't interfere with main app layout
|
|
7791
7898
|
this.documentCategoriesContainer.nativeElement.scrollTo({
|
|
7792
7899
|
top: 0,
|
|
7793
7900
|
behavior: 'smooth'
|
|
@@ -7800,10 +7907,10 @@ class DocumentListComponent {
|
|
|
7800
7907
|
const input = event.target;
|
|
7801
7908
|
this.documentName = input.value;
|
|
7802
7909
|
if (this.disallowedCharsRegex.test(this.documentName)) {
|
|
7803
|
-
this.fileNameError =
|
|
7910
|
+
this.fileNameError = ERRORS.ERROR_FILE_NAME_INVALID_CHARACTERS;
|
|
7804
7911
|
}
|
|
7805
|
-
else if (this.documentName.trim() ===
|
|
7806
|
-
this.fileNameError =
|
|
7912
|
+
else if (this.documentName.trim() === SHARED.EMPTY) {
|
|
7913
|
+
this.fileNameError = ERRORS.ERROR_FILE_NAME_EMPTY;
|
|
7807
7914
|
}
|
|
7808
7915
|
else {
|
|
7809
7916
|
this.fileNameError = SHARED.EMPTY;
|
|
@@ -7811,12 +7918,12 @@ class DocumentListComponent {
|
|
|
7811
7918
|
}
|
|
7812
7919
|
handleSaveClick() {
|
|
7813
7920
|
let hasChanged = false;
|
|
7814
|
-
if (this.selectedDocument.aliasName && this.selectedDocument.aliasName.trim() !==
|
|
7921
|
+
if (this.selectedDocument.aliasName && this.selectedDocument.aliasName.trim() !== SHARED.EMPTY) {
|
|
7815
7922
|
hasChanged = this.documentName !== this.selectedDocument.aliasName;
|
|
7816
7923
|
}
|
|
7817
7924
|
else {
|
|
7818
|
-
const docNameWithoutExtension = this.selectedDocument.docName.lastIndexOf(
|
|
7819
|
-
? this.selectedDocument.docName.substring(0, this.selectedDocument.docName.lastIndexOf(
|
|
7925
|
+
const docNameWithoutExtension = this.selectedDocument.docName.lastIndexOf(SHARED.DOT) !== -1
|
|
7926
|
+
? this.selectedDocument.docName.substring(0, this.selectedDocument.docName.lastIndexOf(SHARED.DOT))
|
|
7820
7927
|
: this.selectedDocument.docName;
|
|
7821
7928
|
hasChanged = this.documentName !== docNameWithoutExtension;
|
|
7822
7929
|
}
|
|
@@ -7854,11 +7961,11 @@ class DocumentListComponent {
|
|
|
7854
7961
|
}
|
|
7855
7962
|
}
|
|
7856
7963
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentListService }, { token: DocumentHttpService }, { token: DocumentMenuService }, { token: DocumentStore }, { token: DocumentScrollService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7857
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", selectedMenuItemId: "selectedMenuItemId", navigationInfo: "navigationInfo", documentList: "documentList" }, outputs: { handleSelectedDocument: "handleSelectedDocument" }, viewQueries: [{ propertyName: "documentCategoriesContainer", first: true, predicate: ["documentCategoriesContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Show alias name and document name when available -->\r\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \r\n class=\"document-name-display clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName }}\r\n <i class=\"pi pi-pencil edit-icon-small\"></i>\r\n </div>\r\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\r\n </div>\r\n <span \r\n *ngIf=\"!isEditingDocumentName && !aliasName\" \r\n class=\"font-bold white-space-nowrap clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n {{selectedDocument?.docName}}\r\n <i class=\"pi pi-pencil edit-icon\"></i>\r\n </span>\r\n <input \r\n *ngIf=\"isEditingDocumentName\"\r\n #fileInput \r\n type=\"text\" \r\n class=\"h-3rem file-input-wrapper document-name-input\" \r\n pInputText \r\n [(ngModel)]=\"documentName\"\r\n (input)=\"onDocumentNameChange($event)\" \r\n (blur)=\"handleSaveClick()\"\r\n (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" />\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n @if(selectedDocument?.status === 'Approved'){\r\n <ng-content></ng-content>\r\n }\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"'section-' + category.label.toLowerCase().replace(' ', '-')\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"categoryCompletionCounts[i] + ' Complete'\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.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}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:auto;max-height:100%;overscroll-behavior:contain;scroll-behavior:smooth;overflow:hidden;position:relative}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease;contain:layout style}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.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{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.document-categories-container .category .category-header .completion-status .completion-badge{font-size:.75rem;padding:.25rem .5rem}.document-categories-container .category .table-container{padding:1.5rem;background-color:#fff}.category-highlight{animation:highlightPulse 2s ease-in-out}@keyframes highlightPulse{0%{box-shadow:0 2px 4px #0000001a}50%{box-shadow:0 4px 12px #3b82f64d}to{box-shadow:0 2px 4px #0000001a}}.document-categories-container{isolation:isolate;scroll-behavior:smooth;overscroll-behavior:contain;transform:translateZ(0);contain:layout style paint;box-sizing:border-box;width:100%;max-width:100%;min-height:0;flex:1;flex-shrink:1;position:relative;overflow:auto}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.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:stretch}.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:center;width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i9$2.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i12$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7964
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", selectedMenuItemId: "selectedMenuItemId", navigationInfo: "navigationInfo", documentList: "documentList" }, outputs: { handleSelectedDocument: "handleSelectedDocument" }, viewQueries: [{ propertyName: "documentCategoriesContainer", first: true, predicate: ["documentCategoriesContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Show alias name and document name when available -->\r\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \r\n class=\"document-name-display clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName }}\r\n <i class=\"pi pi-pencil edit-icon-small\"></i>\r\n </div>\r\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\r\n </div>\r\n <span \r\n *ngIf=\"!isEditingDocumentName && !aliasName\" \r\n class=\"font-bold white-space-nowrap clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n {{selectedDocument?.docName}}\r\n <i class=\"pi pi-pencil edit-icon\"></i>\r\n </span>\r\n <input \r\n *ngIf=\"isEditingDocumentName\"\r\n #fileInput \r\n type=\"text\" \r\n class=\"h-3rem file-input-wrapper document-name-input\" \r\n pInputText \r\n [(ngModel)]=\"documentName\"\r\n (input)=\"onDocumentNameChange($event)\" \r\n (blur)=\"handleSaveClick()\"\r\n (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" />\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\"\r\n (viewerDestroyed)=\"handleViewerDestroyed()\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n @if(selectedDocument?.status === 'Approved'){\r\n <ng-content></ng-content>\r\n }\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"categoryIds[i]\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"categoryCompletionCounts[i] + ' Complete'\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.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}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.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{display:flex;align-items:center;justify-content:center;min-width:fit-content}.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 .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.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:stretch}.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:center;width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i9$2.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i12$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated", "viewerDestroyed"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7858
7965
|
}
|
|
7859
7966
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, decorators: [{
|
|
7860
7967
|
type: Component,
|
|
7861
|
-
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Show alias name and document name when available -->\r\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \r\n class=\"document-name-display clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName }}\r\n <i class=\"pi pi-pencil edit-icon-small\"></i>\r\n </div>\r\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\r\n </div>\r\n <span \r\n *ngIf=\"!isEditingDocumentName && !aliasName\" \r\n class=\"font-bold white-space-nowrap clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n {{selectedDocument?.docName}}\r\n <i class=\"pi pi-pencil edit-icon\"></i>\r\n </span>\r\n <input \r\n *ngIf=\"isEditingDocumentName\"\r\n #fileInput \r\n type=\"text\" \r\n class=\"h-3rem file-input-wrapper document-name-input\" \r\n pInputText \r\n [(ngModel)]=\"documentName\"\r\n (input)=\"onDocumentNameChange($event)\" \r\n (blur)=\"handleSaveClick()\"\r\n (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" />\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n @if(selectedDocument?.status === 'Approved'){\r\n <ng-content></ng-content>\r\n }\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"'section-' + category.label.toLowerCase().replace(' ', '-')\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"categoryCompletionCounts[i] + ' Complete'\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.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}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:auto;max-height:100%;overscroll-behavior:contain;scroll-behavior:smooth;overflow:hidden;position:relative}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease;contain:layout style}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.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{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.document-categories-container .category .category-header .completion-status .completion-badge{font-size:.75rem;padding:.25rem .5rem}.document-categories-container .category .table-container{padding:1.5rem;background-color:#fff}.category-highlight{animation:highlightPulse 2s ease-in-out}@keyframes highlightPulse{0%{box-shadow:0 2px 4px #0000001a}50%{box-shadow:0 4px 12px #3b82f64d}to{box-shadow:0 2px 4px #0000001a}}.document-categories-container{isolation:isolate;scroll-behavior:smooth;overscroll-behavior:contain;transform:translateZ(0);contain:layout style paint;box-sizing:border-box;width:100%;max-width:100%;min-height:0;flex:1;flex-shrink:1;position:relative;overflow:auto}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.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:stretch}.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:center;width:100%;justify-content:center}}\n"] }]
|
|
7968
|
+
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Show alias name and document name when available -->\r\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \r\n class=\"document-name-display clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName }}\r\n <i class=\"pi pi-pencil edit-icon-small\"></i>\r\n </div>\r\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\r\n </div>\r\n <span \r\n *ngIf=\"!isEditingDocumentName && !aliasName\" \r\n class=\"font-bold white-space-nowrap clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n {{selectedDocument?.docName}}\r\n <i class=\"pi pi-pencil edit-icon\"></i>\r\n </span>\r\n <input \r\n *ngIf=\"isEditingDocumentName\"\r\n #fileInput \r\n type=\"text\" \r\n class=\"h-3rem file-input-wrapper document-name-input\" \r\n pInputText \r\n [(ngModel)]=\"documentName\"\r\n (input)=\"onDocumentNameChange($event)\" \r\n (blur)=\"handleSaveClick()\"\r\n (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" />\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\"\r\n (viewerDestroyed)=\"handleViewerDestroyed()\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n @if(selectedDocument?.status === 'Approved'){\r\n <ng-content></ng-content>\r\n }\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"categoryIds[i]\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"categoryCompletionCounts[i] + ' Complete'\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.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}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.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{display:flex;align-items:center;justify-content:center;min-width:fit-content}.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 .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.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:stretch}.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:center;width:100%;justify-content:center}}\n"] }]
|
|
7862
7969
|
}], ctorParameters: () => [{ type: DocumentListService }, { type: DocumentHttpService }, { type: DocumentMenuService }, { type: DocumentStore }, { type: DocumentScrollService }], propDecorators: { contextId: [{
|
|
7863
7970
|
type: Input
|
|
7864
7971
|
}], documentListResponse: [{
|
|
@@ -8103,7 +8210,6 @@ class DocumentContainerComponent {
|
|
|
8103
8210
|
documentQuery;
|
|
8104
8211
|
documentStore;
|
|
8105
8212
|
documentMenuService;
|
|
8106
|
-
refreshTrigger = SHARED.INITIAL_VALUE;
|
|
8107
8213
|
/**
|
|
8108
8214
|
* The document list response data
|
|
8109
8215
|
* @type {DocumentListResponse[] | null}
|
|
@@ -8170,10 +8276,6 @@ class DocumentContainerComponent {
|
|
|
8170
8276
|
if (changes[SHARED.CONTEXT_ID] && !changes[SHARED.CONTEXT_ID].firstChange) {
|
|
8171
8277
|
this.handleContextIdChange();
|
|
8172
8278
|
}
|
|
8173
|
-
if (changes[SHARED.REFRESH_TRIGGER] && changes[SHARED.REFRESH_TRIGGER].currentValue !== SHARED.INITIAL_VALUE && !changes[SHARED.REFRESH_TRIGGER].firstChange) {
|
|
8174
|
-
this.clearAllState();
|
|
8175
|
-
this.initializeData();
|
|
8176
|
-
}
|
|
8177
8279
|
}
|
|
8178
8280
|
/**
|
|
8179
8281
|
* Initializes the component
|
|
@@ -8213,7 +8315,6 @@ class DocumentContainerComponent {
|
|
|
8213
8315
|
*/
|
|
8214
8316
|
resetContentScrollToTop() {
|
|
8215
8317
|
if (this.contentScrollContainer) {
|
|
8216
|
-
// Use gentler scrolling that doesn't interfere with main app layout
|
|
8217
8318
|
this.contentScrollContainer.nativeElement.scrollTo({
|
|
8218
8319
|
top: 0,
|
|
8219
8320
|
behavior: 'smooth'
|
|
@@ -8235,7 +8336,7 @@ class DocumentContainerComponent {
|
|
|
8235
8336
|
*/
|
|
8236
8337
|
clearAllState() {
|
|
8237
8338
|
this.documentStore.clearSelectionState();
|
|
8238
|
-
|
|
8339
|
+
// Don't clear document viewer state - let the viewer handle its own cleanup
|
|
8239
8340
|
this.documentStore.setDocumentListResponse(null);
|
|
8240
8341
|
this.documentStore.setDocumentList([]);
|
|
8241
8342
|
this.documentStore.setDocumentCategories([]);
|
|
@@ -8385,14 +8486,12 @@ class DocumentContainerComponent {
|
|
|
8385
8486
|
this.clearAllState();
|
|
8386
8487
|
}
|
|
8387
8488
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: DocumentQuery }, { token: DocumentStore }, { token: DocumentMenuService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8388
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: {
|
|
8489
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId" }, outputs: { selectedDocument: "selectedDocument" }, viewQueries: [{ propertyName: "contentScrollContainer", first: true, predicate: ["contentScrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0 flex document-container-layout\">\r\n <!-- Fixed Left Menu -->\r\n <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div>\r\n \r\n <!-- Scrollable Right Content -->\r\n <div class=\"content-panel col-12 md:col-10\" #contentScrollContainer>\r\n <div class=\"card content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div>\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"], dependencies: [{ kind: "component", type: i6$2.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "selectedMenuItemId", "navigationInfo", "documentList"], outputs: ["handleSelectedDocument"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["catagories", "applicationNumber", "contextId"], outputs: ["menuItemSelected"] }] });
|
|
8389
8490
|
}
|
|
8390
8491
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, decorators: [{
|
|
8391
8492
|
type: Component,
|
|
8392
|
-
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 flex document-container-layout\">\r\n <!-- Fixed Left Menu -->\r\n <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div>\r\n \r\n <!-- Scrollable Right Content -->\r\n <div class=\"content-panel col-12 md:col-10\" #contentScrollContainer>\r\n <div class=\"card content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div>\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:
|
|
8393
|
-
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentMenuService }], propDecorators: {
|
|
8394
|
-
type: Input
|
|
8395
|
-
}], contentScrollContainer: [{
|
|
8493
|
+
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 flex document-container-layout\">\r\n <!-- Fixed Left Menu -->\r\n <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div>\r\n \r\n <!-- Scrollable Right Content -->\r\n <div class=\"content-panel col-12 md:col-10\" #contentScrollContainer>\r\n <div class=\"card content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div>\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"] }]
|
|
8494
|
+
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentMenuService }], propDecorators: { contentScrollContainer: [{
|
|
8396
8495
|
type: ViewChild,
|
|
8397
8496
|
args: ['contentScrollContainer', { static: false }]
|
|
8398
8497
|
}], selectedDocument: [{
|