cat-documents-ng 1.0.6 → 1.0.7
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/README.md +322 -322
- package/Shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +44 -0
- package/Shared/components/table-primary/table-primary.component.d.ts +31 -0
- package/Shared/components/table-primary/table-primary.model.d.ts +19 -0
- package/Shared/constant/ERROR.d.ts +52 -0
- package/Shared/constant/SHARED.d.ts +546 -0
- package/{src/Shared/constant/URLS.ts → Shared/constant/URLS.d.ts} +25 -31
- package/Shared/services/app-config.service.d.ts +51 -0
- package/{src/Shared/services/global-error.handler.ts → Shared/services/global-error.handler.d.ts} +9 -11
- package/Shared/services/session.service.d.ts +46 -0
- package/Shared/shared.module.d.ts +14 -0
- package/fesm2022/cat-documents-ng.mjs +11405 -0
- package/fesm2022/cat-documents-ng.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/document/components/document-actions/document-actions.component.d.ts +78 -0
- package/lib/document/components/document-container/document-container.component.d.ts +162 -0
- package/lib/document/components/document-content-viewer/document-content-viewer.component.d.ts +291 -0
- package/lib/document/components/document-history/document-history.component.d.ts +160 -0
- package/lib/document/components/document-list/document-list.component.d.ts +299 -0
- package/lib/document/components/document-list-item/document-list-item.component.d.ts +28 -0
- package/lib/document/components/document-search/document-search.component.d.ts +77 -0
- package/lib/document/components/document-status/document-status.component.d.ts +24 -0
- package/lib/document/components/document-upload/document-upload.component.d.ts +321 -0
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +137 -0
- package/lib/document/components/document-zoom-controls/document-zoom-controls.component.d.ts +33 -0
- package/lib/document/components/documents-menu/documents-menu.component.d.ts +110 -0
- package/{src/lib/document/components/folder-block/folder-block.component.ts → lib/document/components/folder-block/folder-block.component.d.ts} +12 -28
- package/lib/document/components/folder-container/folder-container.component.d.ts +162 -0
- package/lib/document/components/linked-document/linked-document.component.d.ts +39 -0
- package/lib/document/components/request-document/request-document.component.d.ts +69 -0
- package/lib/document/components/sidebar/sidebar.component.d.ts +109 -0
- package/lib/document/components/user-list/user-list.component.d.ts +34 -0
- package/lib/document/constant/DOCUMENT_HISTORY.d.ts +41 -0
- package/lib/document/directives/document.directive.d.ts +20 -0
- package/lib/document/directives/permission.directive.d.ts +38 -0
- package/lib/document/document.module.d.ts +60 -0
- package/{src/lib/document/models/document-alert.model.ts → lib/document/models/document-alert.model.d.ts} +4 -11
- package/lib/document/models/document-category.model.d.ts +24 -0
- package/lib/document/models/document-history.model.d.ts +94 -0
- package/lib/document/models/document-list-response.model.d.ts +33 -0
- package/lib/document/models/document-type.model.d.ts +37 -0
- package/lib/document/models/document.model.d.ts +44 -0
- package/{src/lib/document/models/folder.model.ts → lib/document/models/folder.model.d.ts} +4 -10
- package/lib/document/models/status-data.model.d.ts +27 -0
- package/lib/document/models/uploaded-file-response.model.d.ts +7 -0
- package/lib/document/models/user-list.model.d.ts +8 -0
- package/lib/document/services/csv-parser.service.d.ts +88 -0
- package/lib/document/services/document-actions.service.d.ts +48 -0
- package/lib/document/services/document-content-type.service.d.ts +85 -0
- package/lib/document/services/document-history-style.service.d.ts +34 -0
- package/lib/document/services/document-history.service.d.ts +42 -0
- package/lib/document/services/document-http.service.d.ts +179 -0
- package/lib/document/services/document-list.service.d.ts +74 -0
- package/lib/document/services/document-menu.service.d.ts +122 -0
- package/lib/document/services/document-scroll.service.d.ts +55 -0
- package/lib/document/services/document-table-builder.service.d.ts +38 -0
- package/lib/document/services/document-upload-business.service.d.ts +107 -0
- package/lib/document/services/document-upload-data.service.d.ts +40 -0
- package/lib/document/services/document-upload-form.service.d.ts +41 -0
- package/lib/document/services/document-upload.service.d.ts +99 -0
- package/lib/document/services/document-viewer.service.d.ts +97 -0
- package/lib/document/services/document-zoom.service.d.ts +81 -0
- package/lib/document/services/document.service.d.ts +161 -0
- package/lib/document/services/eml-parser.service.d.ts +116 -0
- package/lib/document/services/excel-parser.service.d.ts +169 -0
- package/lib/document/services/file-format.service.d.ts +34 -0
- package/lib/document/services/status-calculator.service.d.ts +20 -0
- package/lib/document/services/user-list.service.d.ts +29 -0
- package/lib/document/state/document.query.d.ts +243 -0
- package/{src/lib/document/state/document.service.ts → lib/document/state/document.service.d.ts} +15 -46
- package/lib/document/state/document.state.d.ts +61 -0
- package/lib/document/state/document.store.d.ts +56 -0
- package/package.json +11 -5
- package/{src/public-api.ts → public-api.d.ts} +0 -4
- package/ng-package.json +0 -10
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.html +0 -3
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.scss +0 -13
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.spec.ts +0 -70
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.ts +0 -133
- package/src/Shared/components/table-primary/table-primary.component.html +0 -66
- package/src/Shared/components/table-primary/table-primary.component.scss +0 -227
- package/src/Shared/components/table-primary/table-primary.component.spec.ts +0 -23
- package/src/Shared/components/table-primary/table-primary.component.ts +0 -143
- package/src/Shared/components/table-primary/table-primary.model.ts +0 -21
- package/src/Shared/constant/ERROR.ts +0 -55
- package/src/Shared/constant/PERMISSIONS.ts +0 -17
- package/src/Shared/constant/SHARED.ts +0 -936
- package/src/Shared/services/app-config.service.spec.ts +0 -19
- package/src/Shared/services/app-config.service.ts +0 -73
- package/src/Shared/services/session.service.spec.ts +0 -16
- package/src/Shared/services/session.service.ts +0 -76
- package/src/Shared/shared.module.ts +0 -25
- package/src/lib/document/components/csv-viewer/csv-viewer.component.ts +0 -1
- package/src/lib/document/components/document-actions/document-actions.component.html +0 -59
- package/src/lib/document/components/document-actions/document-actions.component.scss +0 -362
- package/src/lib/document/components/document-actions/document-actions.component.spec.ts +0 -297
- package/src/lib/document/components/document-actions/document-actions.component.ts +0 -163
- package/src/lib/document/components/document-container/document-container.component.html +0 -36
- package/src/lib/document/components/document-container/document-container.component.scss +0 -144
- package/src/lib/document/components/document-container/document-container.component.spec.ts +0 -110
- package/src/lib/document/components/document-container/document-container.component.ts +0 -363
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.html +0 -332
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.scss +0 -1877
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.spec.ts +0 -258
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.ts +0 -664
- package/src/lib/document/components/document-history/document-history.component.html +0 -96
- package/src/lib/document/components/document-history/document-history.component.scss +0 -392
- package/src/lib/document/components/document-history/document-history.component.spec.ts +0 -93
- package/src/lib/document/components/document-history/document-history.component.ts +0 -373
- package/src/lib/document/components/document-list/document-list.component.html +0 -46
- package/src/lib/document/components/document-list/document-list.component.scss +0 -513
- package/src/lib/document/components/document-list/document-list.component.spec.ts +0 -486
- package/src/lib/document/components/document-list/document-list.component.ts +0 -682
- package/src/lib/document/components/document-list-item/document-list-item.component.html +0 -36
- package/src/lib/document/components/document-list-item/document-list-item.component.scss +0 -34
- package/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +0 -75
- package/src/lib/document/components/document-list-item/document-list-item.component.ts +0 -40
- package/src/lib/document/components/document-search/document-search.component.html +0 -64
- package/src/lib/document/components/document-search/document-search.component.scss +0 -206
- package/src/lib/document/components/document-search/document-search.component.spec.ts +0 -82
- package/src/lib/document/components/document-search/document-search.component.ts +0 -163
- package/src/lib/document/components/document-status/document-status.component.html +0 -31
- package/src/lib/document/components/document-status/document-status.component.scss +0 -192
- package/src/lib/document/components/document-status/document-status.component.spec.ts +0 -23
- package/src/lib/document/components/document-status/document-status.component.ts +0 -87
- package/src/lib/document/components/document-upload/document-upload.component.html +0 -160
- package/src/lib/document/components/document-upload/document-upload.component.scss +0 -235
- package/src/lib/document/components/document-upload/document-upload.component.spec.ts +0 -95
- package/src/lib/document/components/document-upload/document-upload.component.ts +0 -668
- package/src/lib/document/components/document-viewer/document-viewer.component.html +0 -50
- package/src/lib/document/components/document-viewer/document-viewer.component.scss +0 -187
- package/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +0 -79
- package/src/lib/document/components/document-viewer/document-viewer.component.ts +0 -261
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.html +0 -48
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.scss +0 -320
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.spec.ts +0 -59
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.ts +0 -150
- package/src/lib/document/components/documents-menu/documents-menu.component.html +0 -44
- package/src/lib/document/components/documents-menu/documents-menu.component.scss +0 -363
- package/src/lib/document/components/documents-menu/documents-menu.component.spec.ts +0 -23
- package/src/lib/document/components/documents-menu/documents-menu.component.ts +0 -316
- package/src/lib/document/components/folder-block/folder-block.component.html +0 -46
- package/src/lib/document/components/folder-block/folder-block.component.scss +0 -9
- package/src/lib/document/components/folder-block/folder-block.component.spec.ts +0 -70
- package/src/lib/document/components/folder-container/folder-container.component.html +0 -56
- package/src/lib/document/components/folder-container/folder-container.component.scss +0 -20
- package/src/lib/document/components/folder-container/folder-container.component.spec.ts +0 -27
- package/src/lib/document/components/folder-container/folder-container.component.ts +0 -328
- package/src/lib/document/components/linked-document/linked-document.component.html +0 -23
- package/src/lib/document/components/linked-document/linked-document.component.scss +0 -10
- package/src/lib/document/components/linked-document/linked-document.component.spec.ts +0 -61
- package/src/lib/document/components/linked-document/linked-document.component.ts +0 -49
- package/src/lib/document/components/request-document/request-document.component.html +0 -86
- package/src/lib/document/components/request-document/request-document.component.scss +0 -16
- package/src/lib/document/components/request-document/request-document.component.ts +0 -278
- package/src/lib/document/components/sidebar/sidebar.component.html +0 -75
- package/src/lib/document/components/sidebar/sidebar.component.scss +0 -157
- package/src/lib/document/components/sidebar/sidebar.component.spec.ts +0 -114
- package/src/lib/document/components/sidebar/sidebar.component.ts +0 -223
- package/src/lib/document/components/user-list/user-list.component.html +0 -33
- package/src/lib/document/components/user-list/user-list.component.scss +0 -118
- package/src/lib/document/components/user-list/user-list.component.spec.ts +0 -23
- package/src/lib/document/components/user-list/user-list.component.ts +0 -181
- package/src/lib/document/constant/DOCUMENT_HISTORY.ts +0 -52
- package/src/lib/document/directives/document.directive.ts +0 -32
- package/src/lib/document/directives/permission.directive.spec.ts +0 -0
- package/src/lib/document/directives/permission.directive.ts +0 -72
- package/src/lib/document/document.module.ts +0 -351
- package/src/lib/document/models/document-category.model.ts +0 -30
- package/src/lib/document/models/document-history.model.ts +0 -109
- package/src/lib/document/models/document-list-response.model.ts +0 -37
- package/src/lib/document/models/document-type.model.ts +0 -44
- package/src/lib/document/models/document.model.ts +0 -53
- package/src/lib/document/models/status-data.model.ts +0 -31
- package/src/lib/document/models/uploaded-file-response.model.ts +0 -7
- package/src/lib/document/models/user-list.model.ts +0 -10
- package/src/lib/document/services/csv-parser.service.spec.ts +0 -97
- package/src/lib/document/services/csv-parser.service.ts +0 -303
- package/src/lib/document/services/document-actions.service.ts +0 -125
- package/src/lib/document/services/document-content-type.service.ts +0 -193
- package/src/lib/document/services/document-history-style.service.ts +0 -138
- package/src/lib/document/services/document-history.service.ts +0 -129
- package/src/lib/document/services/document-http.service.spec.ts +0 -119
- package/src/lib/document/services/document-http.service.ts +0 -497
- package/src/lib/document/services/document-list.service.ts +0 -195
- package/src/lib/document/services/document-menu.service.ts +0 -277
- package/src/lib/document/services/document-scroll.service.ts +0 -138
- package/src/lib/document/services/document-severity.service.ts +0 -98
- package/src/lib/document/services/document-table-builder.service.ts +0 -82
- package/src/lib/document/services/document-upload-business.service.ts +0 -326
- package/src/lib/document/services/document-upload-data.service.ts +0 -82
- package/src/lib/document/services/document-upload-form.service.ts +0 -149
- package/src/lib/document/services/document-upload.service.spec.ts +0 -99
- package/src/lib/document/services/document-upload.service.ts +0 -209
- package/src/lib/document/services/document-viewer.service.ts +0 -279
- package/src/lib/document/services/document-zoom.service.spec.ts +0 -56
- package/src/lib/document/services/document-zoom.service.ts +0 -164
- package/src/lib/document/services/document.service.ts +0 -356
- package/src/lib/document/services/eml-parser.service.ts +0 -444
- package/src/lib/document/services/excel-parser.service.spec.ts +0 -66
- package/src/lib/document/services/excel-parser.service.ts +0 -483
- package/src/lib/document/services/file-format.service.spec.ts +0 -16
- package/src/lib/document/services/file-format.service.ts +0 -63
- package/src/lib/document/services/status-calculator.service.ts +0 -44
- package/src/lib/document/services/user-list.service.ts +0 -77
- package/src/lib/document/state/document.query.ts +0 -378
- package/src/lib/document/state/document.state.ts +0 -100
- package/src/lib/document/state/document.store.ts +0 -200
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<div class="status-summary-container">
|
|
2
|
-
<div class="status-cards">
|
|
3
|
-
|
|
4
|
-
<div
|
|
5
|
-
*ngFor="let status of statusDataWithPercentages"
|
|
6
|
-
class="status-card {{ status.statusClass }}"
|
|
7
|
-
[class.selected]="status.isSelected"
|
|
8
|
-
(click)="selectStatus(status.status || '')"
|
|
9
|
-
>
|
|
10
|
-
<div class="status-icon {{ status.iconClass }}">
|
|
11
|
-
<i [class]="status.icon"></i>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="status-info">
|
|
14
|
-
<div class="status-count">{{ status.count }}</div>
|
|
15
|
-
<div class="status-name">{{ status.status }}</div>
|
|
16
|
-
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<div class="progress-bar-container">
|
|
22
|
-
<div class="progress-bar">
|
|
23
|
-
<div
|
|
24
|
-
*ngFor="let status of statusDataWithPercentages"
|
|
25
|
-
class="progress-segment"
|
|
26
|
-
[style.width.%]="status.percentage"
|
|
27
|
-
[style.background-color]="status.color"
|
|
28
|
-
></div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
.status-summary-container {
|
|
2
|
-
padding: 1rem;
|
|
3
|
-
padding-top: 0px;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.status-cards {
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-wrap: wrap;
|
|
9
|
-
gap: 1rem;
|
|
10
|
-
margin-bottom: 1.5rem;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.status-card {
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
gap: 0.75rem;
|
|
17
|
-
padding: 0.7rem;
|
|
18
|
-
border-radius: 8px;
|
|
19
|
-
background: white;
|
|
20
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
21
|
-
min-width: 150px;
|
|
22
|
-
flex: 1;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
transition: all 0.2s ease;
|
|
25
|
-
border: 2px solid transparent;
|
|
26
|
-
|
|
27
|
-
&:hover {
|
|
28
|
-
transform: translateY(-2px);
|
|
29
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&.selected {
|
|
33
|
-
border-width: 3px !important;
|
|
34
|
-
border-style: solid !important;
|
|
35
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Selection border colors based on status
|
|
39
|
-
&.selected.status-approved {
|
|
40
|
-
border-color: #10b981 !important;
|
|
41
|
-
background: #ECFDF5 !important;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.selected.status-uploaded {
|
|
45
|
-
border-color: #10b981 !important;
|
|
46
|
-
background: #ECFDF5 !important;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.selected.status-pending {
|
|
50
|
-
border-color: #6b7280 !important;
|
|
51
|
-
background: #F8FAFC !important;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&.selected.status-reviewing {
|
|
55
|
-
border-color: #f59e0b !important;
|
|
56
|
-
background: #FFFBEB !important;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&.selected.status-rejected {
|
|
60
|
-
border-color: #ef4444 !important;
|
|
61
|
-
background: #FFF1F2 !important;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&.selected.status-alert {
|
|
65
|
-
border-color: #dc2626 !important;
|
|
66
|
-
background: #EF4444 !important;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Default background colors for each status
|
|
70
|
-
&.status-approved {
|
|
71
|
-
background: #ECFDF5;
|
|
72
|
-
|
|
73
|
-
.status-name {
|
|
74
|
-
color: #065f46;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.status-count {
|
|
78
|
-
color: #047857;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&.status-uploaded {
|
|
83
|
-
background: #ECFDF5;
|
|
84
|
-
|
|
85
|
-
.status-name {
|
|
86
|
-
color: #065f46;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.status-count {
|
|
90
|
-
color: #047857;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&.status-pending {
|
|
95
|
-
background: #F8FAFC;
|
|
96
|
-
|
|
97
|
-
.status-name {
|
|
98
|
-
color: #475569;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.status-count {
|
|
102
|
-
color: #334155;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&.status-reviewing {
|
|
107
|
-
background: #FFFBEB;
|
|
108
|
-
|
|
109
|
-
.status-name {
|
|
110
|
-
color: #92400e;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.status-count {
|
|
114
|
-
color: #a16207;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&.status-rejected {
|
|
119
|
-
background: #FFF1F2;
|
|
120
|
-
|
|
121
|
-
.status-name {
|
|
122
|
-
color: #be123c;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.status-count {
|
|
126
|
-
color: #e11d48;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&.status-alert {
|
|
131
|
-
background: #EF4444;
|
|
132
|
-
|
|
133
|
-
.status-name {
|
|
134
|
-
color: white;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.status-count {
|
|
138
|
-
color: white;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.status-icon {
|
|
144
|
-
width: 40px;
|
|
145
|
-
height: 40px;
|
|
146
|
-
border-radius: 50%;
|
|
147
|
-
display: flex;
|
|
148
|
-
align-items: center;
|
|
149
|
-
justify-content: center;
|
|
150
|
-
font-size: 18px;
|
|
151
|
-
color: white;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.icon-approved { background-color: #10b981; }
|
|
155
|
-
.icon-uploaded { background-color: #10b981; }
|
|
156
|
-
.icon-pending { background-color: #6b7280; }
|
|
157
|
-
.icon-reviewing { background-color: #f59e0b; }
|
|
158
|
-
.icon-rejected { background-color: #ef4444; }
|
|
159
|
-
.icon-alert { background-color: #dc2626; }
|
|
160
|
-
|
|
161
|
-
.status-info {
|
|
162
|
-
flex: 1;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.status-name {
|
|
166
|
-
font-weight: 600;
|
|
167
|
-
color: #1f2937;
|
|
168
|
-
margin-bottom: 0.25rem;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.status-count {
|
|
172
|
-
font-size: 1.2rem;
|
|
173
|
-
font-weight: bold;
|
|
174
|
-
color: #374151;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.progress-bar-container {
|
|
178
|
-
margin-top: 1rem;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.progress-bar {
|
|
182
|
-
height: 8px;
|
|
183
|
-
background-color: #e5e7eb;
|
|
184
|
-
border-radius: 4px;
|
|
185
|
-
overflow: hidden;
|
|
186
|
-
display: flex;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.progress-segment {
|
|
190
|
-
height: 100%;
|
|
191
|
-
transition: width 0.3s ease;
|
|
192
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { DocumentStatusComponent } from './document-status.component';
|
|
4
|
-
|
|
5
|
-
describe('DocumentStatusComponent', () => {
|
|
6
|
-
let component: DocumentStatusComponent;
|
|
7
|
-
let fixture: ComponentFixture<DocumentStatusComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [DocumentStatusComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(DocumentStatusComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, OnDestroy, Input, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { StatusDataModel } from '../../models/status-data.model';
|
|
3
|
-
import { DocumentQuery } from '../../state/document.query';
|
|
4
|
-
import { StatusCalculatorService, CalculatedStatusData } from '../../services/status-calculator.service';
|
|
5
|
-
import { Subscription } from 'rxjs';
|
|
6
|
-
import { SHARED } from '../../../../Shared/constant/SHARED';
|
|
7
|
-
import { DocumentHelperService } from '../../services/document.service';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'lib-document-status',
|
|
11
|
-
standalone: false,
|
|
12
|
-
templateUrl: './document-status.component.html',
|
|
13
|
-
styleUrl: './document-status.component.scss'
|
|
14
|
-
})
|
|
15
|
-
export class DocumentStatusComponent implements OnInit, OnDestroy, OnChanges {
|
|
16
|
-
@Input() contextId: string = SHARED.EMPTY;
|
|
17
|
-
@Input() statusData: any;
|
|
18
|
-
|
|
19
|
-
selectedStatus: string | null = null;
|
|
20
|
-
statusDataWithPercentages: CalculatedStatusData[] = [];
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
private subscription = new Subscription();
|
|
24
|
-
|
|
25
|
-
constructor(
|
|
26
|
-
private documentQuery: DocumentQuery,
|
|
27
|
-
private documentService: DocumentHelperService,
|
|
28
|
-
private statusCalculatorService: StatusCalculatorService
|
|
29
|
-
) {}
|
|
30
|
-
|
|
31
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
32
|
-
if (changes['contextId'] && !changes['contextId'].firstChange) {
|
|
33
|
-
// When contextId changes, refetch status data for the new context
|
|
34
|
-
this.refetchStatusData();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
ngOnInit(): void {
|
|
39
|
-
this.subscription.add(
|
|
40
|
-
this.documentQuery.selectSelectedStatus().subscribe(status => {
|
|
41
|
-
this.selectedStatus= status;
|
|
42
|
-
this.updateCalculatedStatusData();
|
|
43
|
-
})
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
this.subscription.add(
|
|
47
|
-
this.documentQuery.selectStatusData().subscribe(statusData => {
|
|
48
|
-
if (statusData && statusData.length > 0) {
|
|
49
|
-
this.statusData = statusData;
|
|
50
|
-
this.updateCalculatedStatusData();
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
if (this.contextId && this.contextId !== SHARED.EMPTY) {
|
|
56
|
-
this.refetchStatusData();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
private refetchStatusData(): void {
|
|
61
|
-
if (this.contextId && this.contextId !== SHARED.EMPTY) {
|
|
62
|
-
const currentState = this.documentQuery.getSelectionState();
|
|
63
|
-
const statusContextId = currentState.userId || null;
|
|
64
|
-
const categoryId = currentState.menuItem || null;
|
|
65
|
-
|
|
66
|
-
// Use the document service to refresh status data for the new context
|
|
67
|
-
this.documentService.refreshStatusData(this.contextId, statusContextId, categoryId);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
selectStatus(status: string): void {
|
|
73
|
-
const newStatus = this.selectedStatus === status ? null : status;
|
|
74
|
-
this.documentService.setSelectedStatus(newStatus);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
private updateCalculatedStatusData(): void {
|
|
78
|
-
this.statusDataWithPercentages = this.statusCalculatorService.calculateStatusDataWithPercentages(
|
|
79
|
-
this.statusData,
|
|
80
|
-
this.selectedStatus
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
ngOnDestroy(): void {
|
|
85
|
-
this.subscription.unsubscribe();
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
<div class="document-upload-container">
|
|
2
|
-
<!-- Assignment Section -->
|
|
3
|
-
<div class="assignment-section" *ngIf="!isFormHide">
|
|
4
|
-
<h4>Assign to Applicant(s) or Application <span class="text-red-500">*</span> </h4>
|
|
5
|
-
<div class="radio-group">
|
|
6
|
-
<div class="radio-item">
|
|
7
|
-
<p-radioButton
|
|
8
|
-
name="assignmentType"
|
|
9
|
-
value="Applicant"
|
|
10
|
-
[(ngModel)]="selectedAssignmentType"
|
|
11
|
-
(onClick)="onAssignmentTypeChange()"
|
|
12
|
-
[inputId]="'applicant'"
|
|
13
|
-
></p-radioButton>
|
|
14
|
-
<label [for]="'applicant'" class="radio-label">Applicant(s) </label>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="radio-item">
|
|
17
|
-
<p-radioButton
|
|
18
|
-
name="assignmentType"
|
|
19
|
-
value="Application"
|
|
20
|
-
[(ngModel)]="selectedAssignmentType"
|
|
21
|
-
(onClick)="onAssignmentTypeChange()"
|
|
22
|
-
[inputId]="'application'"
|
|
23
|
-
></p-radioButton>
|
|
24
|
-
<label [for]="'application'" class="radio-label">Application</label>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<!-- Applicant Selection (only shown when Applicant is selected) -->
|
|
30
|
-
<div class="applicant-section" *ngIf="!isFormHide && selectedAssignmentType === 'Applicant'">
|
|
31
|
-
<h4>Select Applicant(s) <span class="text-red-500">*</span></h4>
|
|
32
|
-
<div class="grid">
|
|
33
|
-
<div
|
|
34
|
-
*ngFor="let applicant of filteredApplicantList"
|
|
35
|
-
class="applicant-item col-12 md:col-6"
|
|
36
|
-
>
|
|
37
|
-
<p-radioButton
|
|
38
|
-
name="selectedApplicant"
|
|
39
|
-
[value]="applicant._id"
|
|
40
|
-
[(ngModel)]="selectedApplicant"
|
|
41
|
-
[inputId]="'applicant-' + applicant._id"
|
|
42
|
-
(onClick)="onApplicantSelectionChange()"
|
|
43
|
-
></p-radioButton>
|
|
44
|
-
<label [for]="'applicant-' + applicant._id" class="applicant-label">
|
|
45
|
-
{{ applicant.name }}
|
|
46
|
-
</label>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
<!-- Category Selection -->
|
|
52
|
-
<div class="category-section" *ngIf="!isFormHide">
|
|
53
|
-
<h4>Category <span class="text-red-500">*</span></h4>
|
|
54
|
-
<p-dropdown
|
|
55
|
-
[options]="categoryOptions"
|
|
56
|
-
[(ngModel)]="selectedCategory"
|
|
57
|
-
placeholder="Select Category type"
|
|
58
|
-
optionLabel="label"
|
|
59
|
-
optionValue="_id"
|
|
60
|
-
(onChange)="onCategoryChange()"
|
|
61
|
-
[disabled]="!categoryOptions.length"
|
|
62
|
-
class="w-full"
|
|
63
|
-
></p-dropdown>
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<!-- Document Type Selection -->
|
|
67
|
-
<div class="document-type-section" *ngIf="!isFormHide">
|
|
68
|
-
<h4>Document Type <span class="text-red-500">*</span></h4>
|
|
69
|
-
<p-dropdown
|
|
70
|
-
[options]="documentTypeOptions"
|
|
71
|
-
[(ngModel)]="selectedDocumentType"
|
|
72
|
-
placeholder="Select Document type"
|
|
73
|
-
optionLabel="label"
|
|
74
|
-
optionValue="_id"
|
|
75
|
-
(onChange)="onDocumentTypeChange()"
|
|
76
|
-
[disabled]="!documentTypeOptions.length || !selectedCategory"
|
|
77
|
-
class="w-full"
|
|
78
|
-
></p-dropdown>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<!-- File Upload Section -->
|
|
82
|
-
<div class="file-upload-section">
|
|
83
|
-
<h4>Upload Documents <span class="text-red-500" *ngIf="!isFormHide">*</span></h4>
|
|
84
|
-
<div class="grid">
|
|
85
|
-
<div class="col-12 md:col-12">
|
|
86
|
-
<p-fileUpload
|
|
87
|
-
#fileUploader
|
|
88
|
-
[multiple]="true"
|
|
89
|
-
auto="true"
|
|
90
|
-
[accept]="getFileUploadAcceptString()"
|
|
91
|
-
maxFileSize="27295616"
|
|
92
|
-
(onSelect)="onSelectedFiles($event)"
|
|
93
|
-
>
|
|
94
|
-
<ng-template pTemplate="header" let-chooseCallback="chooseCallback" let-clearCallback="clearCallback">
|
|
95
|
-
<div class="docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2">
|
|
96
|
-
<div class="flex gap-2">
|
|
97
|
-
<p-button
|
|
98
|
-
*ngIf="!isMultiAttachmentHidden"
|
|
99
|
-
(onClick)="choose($event, chooseCallback)"
|
|
100
|
-
icon="pi pi-images"
|
|
101
|
-
[rounded]="true"
|
|
102
|
-
[outlined]="true"
|
|
103
|
-
/>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
</ng-template>
|
|
107
|
-
<ng-template pTemplate="content" let-removeFileCallback="removeFileCallback"
|
|
108
|
-
let-removeUploadedFileCallback="removeUploadedFileCallback">
|
|
109
|
-
<div class="col-12 md:col-12 p-0">
|
|
110
|
-
<div class="col-12 md:col-12 p-0" *ngIf="uploadedFiles.length > 0">
|
|
111
|
-
<div *ngFor="let uploadedFile of uploadedFiles; let i = index"
|
|
112
|
-
class="m-0 flex flex-column align-items-center gap-1 mt-3">
|
|
113
|
-
<div class="col-12 md:col-12 p-0 flex documentInfo">
|
|
114
|
-
<div class="documentImage">
|
|
115
|
-
<img src="../../../../assets/images/document.png" [alt]="uploadedFile.file.name" width="45" height="50"
|
|
116
|
-
class="object-contain" />
|
|
117
|
-
</div>
|
|
118
|
-
<div class="flex w-full flex-column mt-2 ml-2">
|
|
119
|
-
<div class="flex justify-content-between">
|
|
120
|
-
<div style="font-weight: bold;font-size: 14px">
|
|
121
|
-
{{ uploadedFile.file.name }}
|
|
122
|
-
</div>
|
|
123
|
-
<i class="pi pi-times cursor-pointer" (click)="handleDocumentRemove(uploadedFile.file,i)"></i>
|
|
124
|
-
</div>
|
|
125
|
-
<div class="flex justify-content-between mt-1">
|
|
126
|
-
<div style="color: #676B89; font-size: 12px; color: green;" class="pi pi-verified">
|
|
127
|
-
{{ uploadedFile.formattedSize }}
|
|
128
|
-
</div>
|
|
129
|
-
<div class="white-space-nowrap" style="color: #0F8BFD; font-family: 14px;">
|
|
130
|
-
{{ uploadedFile.progress }} %
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
<div class="col-12 md:col-12 p-0">
|
|
136
|
-
<p-progressBar
|
|
137
|
-
[value]="uploadedFile.progress ?? 0"
|
|
138
|
-
[showValue]="false"
|
|
139
|
-
styleClass="h-1/2rem md:ml-auto relative"
|
|
140
|
-
[ngClass]="{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 100 }"
|
|
141
|
-
>
|
|
142
|
-
</p-progressBar>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
</ng-template>
|
|
148
|
-
<ng-template pTemplate="empty" let-chooseCallback="chooseCallback">
|
|
149
|
-
<div *ngIf="!uploadedFiles.length" class="flex align-items-center justify-content-center flex-column"
|
|
150
|
-
(click)="triggerFileUpload()">
|
|
151
|
-
<i class="pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400"></i>
|
|
152
|
-
<p class="mt-4 mb-0">Drag and drop files here to upload.</p>
|
|
153
|
-
</div>
|
|
154
|
-
</ng-template>
|
|
155
|
-
<ng-template pTemplate="file"> </ng-template>
|
|
156
|
-
</p-fileUpload>
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|