cat-documents-ng 1.0.23 → 1.0.25
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.
|
@@ -4,7 +4,7 @@ import * as i6 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, BehaviorSubject } from 'rxjs';
|
|
6
6
|
import * as i2 from '@angular/common/http';
|
|
7
|
-
import { HttpParams, HttpClientModule
|
|
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, map, catchError as catchError$1 } from 'rxjs/operators';
|
|
@@ -719,7 +719,7 @@ const SAMPLE_STATUS_DATA = [
|
|
|
719
719
|
status: "Reviewing",
|
|
720
720
|
count: 1,
|
|
721
721
|
color: "#f59e0b",
|
|
722
|
-
icon: "pi pi-
|
|
722
|
+
icon: "pi pi-eye"
|
|
723
723
|
},
|
|
724
724
|
{
|
|
725
725
|
status: "Rejected",
|
|
@@ -1421,7 +1421,10 @@ class DocumentHttpService {
|
|
|
1421
1421
|
getFoldersData(contextId) {
|
|
1422
1422
|
if (!contextId)
|
|
1423
1423
|
return EMPTY;
|
|
1424
|
-
|
|
1424
|
+
let headers = new HttpHeaders({
|
|
1425
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1426
|
+
});
|
|
1427
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}${URLS.FOLDERS}${contextId}`, { headers }).pipe(tap((folders) => {
|
|
1425
1428
|
this.documentStore.setFolders(folders);
|
|
1426
1429
|
}), catchError((error) => {
|
|
1427
1430
|
return throwError(() => new Error(error));
|
|
@@ -1434,7 +1437,10 @@ class DocumentHttpService {
|
|
|
1434
1437
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1435
1438
|
*/
|
|
1436
1439
|
getDocumentCatagories(contextId) {
|
|
1437
|
-
|
|
1440
|
+
let headers = new HttpHeaders({
|
|
1441
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1442
|
+
});
|
|
1443
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers })
|
|
1438
1444
|
.pipe(tap((response) => {
|
|
1439
1445
|
if (response && response.categories) {
|
|
1440
1446
|
this.documentStore.setDocumentCategories(response.categories);
|
|
@@ -1464,7 +1470,10 @@ class DocumentHttpService {
|
|
|
1464
1470
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1465
1471
|
*/
|
|
1466
1472
|
getAlertsByDocumentID(documentId) {
|
|
1467
|
-
|
|
1473
|
+
let headers = new HttpHeaders({
|
|
1474
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1475
|
+
});
|
|
1476
|
+
return this.http.get(`${this.apiUrl}${URLS.ALERT_BY_DOCUMENT_ID}${documentId}`, { headers }).pipe(tap((documentAlert) => {
|
|
1468
1477
|
this.documentStore.setDocumentAlert(documentAlert);
|
|
1469
1478
|
}), catchError((error) => {
|
|
1470
1479
|
return throwError(() => new Error(error));
|
|
@@ -1477,7 +1486,10 @@ class DocumentHttpService {
|
|
|
1477
1486
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1478
1487
|
*/
|
|
1479
1488
|
getDocumentByFolderID(folderId, contextId) {
|
|
1480
|
-
|
|
1489
|
+
let headers = new HttpHeaders({
|
|
1490
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1491
|
+
});
|
|
1492
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`, { headers }).pipe(tap((records) => {
|
|
1481
1493
|
this.documentStore.set(records);
|
|
1482
1494
|
}), catchError((error) => {
|
|
1483
1495
|
return throwError(() => new Error(error));
|
|
@@ -1492,7 +1504,10 @@ class DocumentHttpService {
|
|
|
1492
1504
|
* @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
|
|
1493
1505
|
*/
|
|
1494
1506
|
updateDocumentName(documentId, payload) {
|
|
1495
|
-
|
|
1507
|
+
let headers = new HttpHeaders({
|
|
1508
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1509
|
+
});
|
|
1510
|
+
return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload, { headers }).pipe(catchError((error) => {
|
|
1496
1511
|
return throwError(() => new Error(error));
|
|
1497
1512
|
}));
|
|
1498
1513
|
}
|
|
@@ -1504,7 +1519,10 @@ class DocumentHttpService {
|
|
|
1504
1519
|
getUserListByContextId(contextId) {
|
|
1505
1520
|
if (!contextId)
|
|
1506
1521
|
return EMPTY;
|
|
1507
|
-
|
|
1522
|
+
let headers = new HttpHeaders({
|
|
1523
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1524
|
+
});
|
|
1525
|
+
return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers }).pipe(tap((userList) => {
|
|
1508
1526
|
this.documentStore.setUserList(userList);
|
|
1509
1527
|
}), catchError((error) => {
|
|
1510
1528
|
return throwError(() => new Error(error));
|
|
@@ -1520,6 +1538,9 @@ class DocumentHttpService {
|
|
|
1520
1538
|
getStatusDocumentCount(applicationId, contextId = null, categoryId = null) {
|
|
1521
1539
|
if (!applicationId)
|
|
1522
1540
|
return EMPTY;
|
|
1541
|
+
let headers = new HttpHeaders({
|
|
1542
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1543
|
+
});
|
|
1523
1544
|
let url = `${this.apiUrl}${URLS.STATUS_DOCUMENT_COUNT}${applicationId}`;
|
|
1524
1545
|
let params = new HttpParams();
|
|
1525
1546
|
const contextParam = contextId || null;
|
|
@@ -1529,7 +1550,7 @@ class DocumentHttpService {
|
|
|
1529
1550
|
if (categoryId) {
|
|
1530
1551
|
params = params.set(SHARED.CATEGORY, categoryId);
|
|
1531
1552
|
}
|
|
1532
|
-
return this.http.get(url, { params }).pipe(tap((statusData) => {
|
|
1553
|
+
return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
|
|
1533
1554
|
this.documentStore.setStatusData(statusData);
|
|
1534
1555
|
}), catchError((error) => {
|
|
1535
1556
|
return throwError(() => new Error(error));
|
|
@@ -1547,6 +1568,9 @@ class DocumentHttpService {
|
|
|
1547
1568
|
* @returns {Observable<any>} An observable that emits the filtered document data.
|
|
1548
1569
|
*/
|
|
1549
1570
|
getDocumentsBySelection(contextId, menuItem, userId, status, searchKey = null) {
|
|
1571
|
+
let headers = new HttpHeaders({
|
|
1572
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1573
|
+
});
|
|
1550
1574
|
let params = new HttpParams();
|
|
1551
1575
|
if (userId) {
|
|
1552
1576
|
params = params.set(SHARED.CONTEXT_ID, userId);
|
|
@@ -1557,7 +1581,7 @@ class DocumentHttpService {
|
|
|
1557
1581
|
if (searchKey) {
|
|
1558
1582
|
params = params.set(SHARED.SEARCH_KEY, searchKey);
|
|
1559
1583
|
}
|
|
1560
|
-
return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params }).pipe(tap((response) => {
|
|
1584
|
+
return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
|
|
1561
1585
|
if (response.documents) {
|
|
1562
1586
|
this.documentStore.setDocumentList(response.documents);
|
|
1563
1587
|
}
|
|
@@ -1569,7 +1593,10 @@ class DocumentHttpService {
|
|
|
1569
1593
|
if (!documentId) {
|
|
1570
1594
|
return of([]);
|
|
1571
1595
|
}
|
|
1572
|
-
|
|
1596
|
+
let headers = new HttpHeaders({
|
|
1597
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1598
|
+
});
|
|
1599
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers }).pipe(catchError((error) => {
|
|
1573
1600
|
return throwError(() => new Error(error));
|
|
1574
1601
|
}));
|
|
1575
1602
|
}
|
|
@@ -1581,7 +1608,10 @@ class DocumentHttpService {
|
|
|
1581
1608
|
getCategoriesBySource(source) {
|
|
1582
1609
|
if (!source)
|
|
1583
1610
|
return EMPTY;
|
|
1584
|
-
|
|
1611
|
+
let headers = new HttpHeaders({
|
|
1612
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1613
|
+
});
|
|
1614
|
+
return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
|
|
1585
1615
|
return throwError(() => new Error(error));
|
|
1586
1616
|
}));
|
|
1587
1617
|
}
|
|
@@ -1593,7 +1623,10 @@ class DocumentHttpService {
|
|
|
1593
1623
|
getDocumentTypesByCategory(categoryId) {
|
|
1594
1624
|
if (!categoryId)
|
|
1595
1625
|
return EMPTY;
|
|
1596
|
-
|
|
1626
|
+
let headers = new HttpHeaders({
|
|
1627
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1628
|
+
});
|
|
1629
|
+
return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
|
|
1597
1630
|
return throwError(() => new Error(error));
|
|
1598
1631
|
}));
|
|
1599
1632
|
}
|
|
@@ -1603,7 +1636,10 @@ class DocumentHttpService {
|
|
|
1603
1636
|
* @returns {Observable<any>} Observable that emits the upload response.
|
|
1604
1637
|
*/
|
|
1605
1638
|
uploadFile(formData) {
|
|
1606
|
-
|
|
1639
|
+
let headers = new HttpHeaders({
|
|
1640
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1641
|
+
});
|
|
1642
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
|
|
1607
1643
|
return throwError(() => new Error(error));
|
|
1608
1644
|
}));
|
|
1609
1645
|
}
|
|
@@ -1613,7 +1649,10 @@ class DocumentHttpService {
|
|
|
1613
1649
|
* @returns {Observable<any>} Observable that emits the save response.
|
|
1614
1650
|
*/
|
|
1615
1651
|
saveDocumentUpload(payload) {
|
|
1616
|
-
|
|
1652
|
+
let headers = new HttpHeaders({
|
|
1653
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1654
|
+
});
|
|
1655
|
+
return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
|
|
1617
1656
|
return throwError(() => new Error(error));
|
|
1618
1657
|
}));
|
|
1619
1658
|
}
|
|
@@ -1628,7 +1667,10 @@ class DocumentHttpService {
|
|
|
1628
1667
|
const payload = {
|
|
1629
1668
|
statusUpdateDescription: statusUpdateDescription
|
|
1630
1669
|
};
|
|
1631
|
-
|
|
1670
|
+
let headers = new HttpHeaders({
|
|
1671
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1672
|
+
});
|
|
1673
|
+
return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
|
|
1632
1674
|
if (response && response.status) {
|
|
1633
1675
|
const normalizedStatus = this.normalizeStatus(response.status);
|
|
1634
1676
|
response.normalizedStatus = normalizedStatus;
|
|
@@ -1661,7 +1703,10 @@ class DocumentHttpService {
|
|
|
1661
1703
|
* @returns {Observable<any>} Observable that emits the delete response
|
|
1662
1704
|
*/
|
|
1663
1705
|
deleteDocument(documentId, contextId) {
|
|
1664
|
-
|
|
1706
|
+
let headers = new HttpHeaders({
|
|
1707
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1708
|
+
});
|
|
1709
|
+
return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
|
|
1665
1710
|
this.getDocumentCatagories(contextId).subscribe();
|
|
1666
1711
|
this.getUserListByContextId(contextId).subscribe();
|
|
1667
1712
|
this.getStatusDocumentCount(contextId).subscribe();
|
|
@@ -1677,7 +1722,10 @@ class DocumentHttpService {
|
|
|
1677
1722
|
* @returns {Observable<ArrayBuffer>} Observable that emits the file data as ArrayBuffer
|
|
1678
1723
|
*/
|
|
1679
1724
|
downloadExcelFile(documentUrl) {
|
|
1680
|
-
|
|
1725
|
+
let headers = new HttpHeaders({
|
|
1726
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1727
|
+
});
|
|
1728
|
+
return this.http.get(documentUrl, { headers,
|
|
1681
1729
|
responseType: 'arraybuffer'
|
|
1682
1730
|
}).pipe(catchError((error) => {
|
|
1683
1731
|
return throwError(() => new Error(error));
|
|
@@ -1690,7 +1738,10 @@ class DocumentHttpService {
|
|
|
1690
1738
|
* @returns {Observable<string>} Observable that emits the file data as string
|
|
1691
1739
|
*/
|
|
1692
1740
|
downloadCsvFile(documentUrl) {
|
|
1693
|
-
|
|
1741
|
+
let headers = new HttpHeaders({
|
|
1742
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1743
|
+
});
|
|
1744
|
+
return this.http.get(documentUrl, { headers,
|
|
1694
1745
|
responseType: 'text'
|
|
1695
1746
|
}).pipe(catchError((error) => {
|
|
1696
1747
|
return throwError(() => new Error(error));
|
|
@@ -1702,22 +1753,28 @@ class DocumentHttpService {
|
|
|
1702
1753
|
* @returns Observable of file content as text
|
|
1703
1754
|
*/
|
|
1704
1755
|
downloadEmailFile(documentUrl) {
|
|
1756
|
+
let headers = new HttpHeaders({
|
|
1757
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1758
|
+
});
|
|
1705
1759
|
const isAzureBlobStorage = documentUrl.includes('.blob.core.windows.net');
|
|
1706
1760
|
if (isAzureBlobStorage) {
|
|
1707
|
-
return this.http.get(documentUrl, {
|
|
1761
|
+
return this.http.get(documentUrl, { headers,
|
|
1708
1762
|
responseType: 'text'
|
|
1709
1763
|
}).pipe(catchError((error) => {
|
|
1710
1764
|
return throwError(() => new Error('Failed to download email file. Please check if the file URL is valid and accessible.'));
|
|
1711
1765
|
}));
|
|
1712
1766
|
}
|
|
1713
1767
|
else {
|
|
1714
|
-
return this.http.get(documentUrl).pipe(catchError((error) => {
|
|
1768
|
+
return this.http.get(documentUrl, { headers }).pipe(catchError((error) => {
|
|
1715
1769
|
return throwError(() => new Error('Failed to download email file. Please check if the file URL is valid and accessible.'));
|
|
1716
1770
|
}));
|
|
1717
1771
|
}
|
|
1718
1772
|
}
|
|
1719
1773
|
documentRequest(payload) {
|
|
1720
|
-
|
|
1774
|
+
let headers = new HttpHeaders({
|
|
1775
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1776
|
+
});
|
|
1777
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_REQUEST}`, payload, { headers }).pipe(catchError((error) => {
|
|
1721
1778
|
return throwError(() => new Error(error));
|
|
1722
1779
|
}));
|
|
1723
1780
|
}
|
|
@@ -1729,7 +1786,10 @@ class DocumentHttpService {
|
|
|
1729
1786
|
getValuationReportByContextId(contextId) {
|
|
1730
1787
|
if (!contextId)
|
|
1731
1788
|
return EMPTY;
|
|
1732
|
-
|
|
1789
|
+
let headers = new HttpHeaders({
|
|
1790
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1791
|
+
});
|
|
1792
|
+
return this.http.get(`${this.apiUrl}${URLS.VALUATION_REPORT}${contextId}`, { headers }).pipe(catchError((error) => {
|
|
1733
1793
|
// Return empty object if no data found or error occurs
|
|
1734
1794
|
return of(null);
|
|
1735
1795
|
}));
|
|
@@ -1743,7 +1803,10 @@ class DocumentHttpService {
|
|
|
1743
1803
|
if (!documentUrl)
|
|
1744
1804
|
return EMPTY;
|
|
1745
1805
|
const payload = { documentUrl: documentUrl };
|
|
1746
|
-
|
|
1806
|
+
let headers = new HttpHeaders({
|
|
1807
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
1808
|
+
});
|
|
1809
|
+
return this.http.post(`${this.apiUrl}${URLS.CONVERT_TO_PDF}`, payload, { headers,
|
|
1747
1810
|
responseType: 'blob'
|
|
1748
1811
|
}).pipe(catchError((error) => {
|
|
1749
1812
|
return throwError(() => new Error(error?.message || 'Failed to convert email to PDF'));
|
|
@@ -2669,7 +2732,10 @@ class DocumentService {
|
|
|
2669
2732
|
* @returns {Observable<any>} Observable that emits the newly created document.
|
|
2670
2733
|
*/
|
|
2671
2734
|
create(entity) {
|
|
2672
|
-
|
|
2735
|
+
let headers = new HttpHeaders({
|
|
2736
|
+
'Authorization': `Bearer 3def65bf-2dfc-466b-85a3-13cd1db0960e`
|
|
2737
|
+
});
|
|
2738
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
|
|
2673
2739
|
}
|
|
2674
2740
|
/**
|
|
2675
2741
|
* Fetches all documents from the backend.
|
|
@@ -4509,13 +4575,21 @@ class StatusCalculatorService {
|
|
|
4509
4575
|
if (!statusData)
|
|
4510
4576
|
return [];
|
|
4511
4577
|
const totalCount = this.calculateTotalCount(statusData);
|
|
4512
|
-
return statusData.map((status) =>
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4578
|
+
return statusData.map((status) => {
|
|
4579
|
+
// Normalize icon for reviewing status to use eye icon consistently
|
|
4580
|
+
let normalizedIcon = status.icon;
|
|
4581
|
+
if (status.status?.toLowerCase() === SHARED.REVIEWING_STATUS) {
|
|
4582
|
+
normalizedIcon = SHARED.ICON_EYE;
|
|
4583
|
+
}
|
|
4584
|
+
return {
|
|
4585
|
+
...status,
|
|
4586
|
+
icon: normalizedIcon,
|
|
4587
|
+
percentage: totalCount > 0 ? (status.count ?? 0) / totalCount * 100 : 0,
|
|
4588
|
+
isSelected: selectedStatus === status.status,
|
|
4589
|
+
statusClass: status.status ? SHARED.STATUS_WITH_DASH + status.status.toLowerCase() : SHARED.EMPTY,
|
|
4590
|
+
iconClass: SHARED.ICON_WITH_DASH + (status?.status?.toLowerCase() || SHARED.EMPTY)
|
|
4591
|
+
};
|
|
4592
|
+
});
|
|
4519
4593
|
}
|
|
4520
4594
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4521
4595
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, providedIn: 'root' });
|
|
@@ -6882,11 +6956,11 @@ class DocumentHistoryComponent {
|
|
|
6882
6956
|
}
|
|
6883
6957
|
}
|
|
6884
6958
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, deps: [{ token: DocumentHistoryService }, { token: DocumentViewerService }, { token: DocumentActionsService }, { token: i3.ConfirmationService }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6885
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory", contextId: "contextId", selectedDocument: "selectedDocument" }, outputs: { deleteTaskRequested: "deleteTaskRequested", documentSelected: "documentSelected" }, host: { listeners: { "document:click": "onDocumentClickOutside($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div>\r\n <div *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete task</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:.5rem 1rem;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
|
|
6959
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory", contextId: "contextId", selectedDocument: "selectedDocument" }, outputs: { deleteTaskRequested: "deleteTaskRequested", documentSelected: "documentSelected" }, host: { listeners: { "document:click": "onDocumentClickOutside($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div>\r\n <div *ngIf=\"selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:.5rem 1rem;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
|
|
6886
6960
|
}
|
|
6887
6961
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, decorators: [{
|
|
6888
6962
|
type: Component,
|
|
6889
|
-
args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div>\r\n <div *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete task</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:.5rem 1rem;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}\n"] }]
|
|
6963
|
+
args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div>\r\n <div *ngIf=\"selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:.5rem 1rem;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}\n"] }]
|
|
6890
6964
|
}], ctorParameters: () => [{ type: DocumentHistoryService }, { type: DocumentViewerService }, { type: DocumentActionsService }, { type: i3.ConfirmationService }, { type: DocumentHttpService }], propDecorators: { historyData: [{
|
|
6891
6965
|
type: Input
|
|
6892
6966
|
}], showHistory: [{
|
|
@@ -8392,7 +8466,7 @@ class DocumentContentViewerComponent {
|
|
|
8392
8466
|
* Converts email to PDF and renders it
|
|
8393
8467
|
*/
|
|
8394
8468
|
loadEmailData() {
|
|
8395
|
-
if (this.documentUrl) {
|
|
8469
|
+
if (this.isEmail && this.documentUrl) {
|
|
8396
8470
|
this.isLoadingEmail = true;
|
|
8397
8471
|
this.emailError = null;
|
|
8398
8472
|
// Clean up previous blob URL if exists
|