cat-documents-ng 1.0.9 → 1.0.12
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/fesm2022/cat-documents-ng.mjs +59 -55
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-upload/document-upload.component.d.ts +2 -2
- package/lib/document/services/document-upload-business.service.d.ts +7 -8
- package/lib/document/services/document-upload-form.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -19,11 +19,13 @@ import * as i10 from 'primeng/fileupload';
|
|
|
19
19
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
20
20
|
import * as i11 from 'primeng/progressbar';
|
|
21
21
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
22
|
-
import * as i12 from 'primeng/
|
|
22
|
+
import * as i12 from 'primeng/checkbox';
|
|
23
|
+
import { CheckboxModule } from 'primeng/checkbox';
|
|
24
|
+
import * as i13 from 'primeng/radiobutton';
|
|
23
25
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
24
26
|
import * as i9$1 from '@angular/forms';
|
|
25
27
|
import { FormsModule } from '@angular/forms';
|
|
26
|
-
import * as
|
|
28
|
+
import * as i15 from 'primeng/dropdown';
|
|
27
29
|
import { DropdownModule } from 'primeng/dropdown';
|
|
28
30
|
import * as i1 from '@angular/router';
|
|
29
31
|
import * as i8 from 'primeng/inputtextarea';
|
|
@@ -53,7 +55,6 @@ import { CardModule } from 'primeng/card';
|
|
|
53
55
|
import { AccordionModule } from 'primeng/accordion';
|
|
54
56
|
import { ListboxModule } from 'primeng/listbox';
|
|
55
57
|
import { TimelineModule } from 'primeng/timeline';
|
|
56
|
-
import { CheckboxModule } from 'primeng/checkbox';
|
|
57
58
|
import { PanelMenuModule } from 'primeng/panelmenu';
|
|
58
59
|
import { RippleModule } from 'primeng/ripple';
|
|
59
60
|
import { ToastModule } from 'primeng/toast';
|
|
@@ -1431,7 +1432,7 @@ class DocumentHttpService {
|
|
|
1431
1432
|
*/
|
|
1432
1433
|
getDocumentCatagories(contextId) {
|
|
1433
1434
|
let headers = new HttpHeaders({
|
|
1434
|
-
'Authorization': `Bearer
|
|
1435
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1435
1436
|
});
|
|
1436
1437
|
return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers })
|
|
1437
1438
|
.pipe(tap((response) => {
|
|
@@ -1477,7 +1478,7 @@ class DocumentHttpService {
|
|
|
1477
1478
|
*/
|
|
1478
1479
|
getDocumentByFolderID(folderId, contextId) {
|
|
1479
1480
|
let headers = new HttpHeaders({
|
|
1480
|
-
'Authorization': `Bearer
|
|
1481
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1481
1482
|
});
|
|
1482
1483
|
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`, { headers }).pipe(tap((records) => {
|
|
1483
1484
|
this.documentStore.set(records);
|
|
@@ -1495,7 +1496,7 @@ class DocumentHttpService {
|
|
|
1495
1496
|
*/
|
|
1496
1497
|
updateDocumentName(documentId, payload) {
|
|
1497
1498
|
let headers = new HttpHeaders({
|
|
1498
|
-
'Authorization': `Bearer
|
|
1499
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1499
1500
|
});
|
|
1500
1501
|
return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload, { headers }).pipe(catchError((error) => {
|
|
1501
1502
|
return throwError(() => new Error(error));
|
|
@@ -1508,7 +1509,7 @@ class DocumentHttpService {
|
|
|
1508
1509
|
*/
|
|
1509
1510
|
getUserListByContextId(contextId) {
|
|
1510
1511
|
let headers = new HttpHeaders({
|
|
1511
|
-
'Authorization': `Bearer
|
|
1512
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1512
1513
|
});
|
|
1513
1514
|
if (!contextId)
|
|
1514
1515
|
return EMPTY;
|
|
@@ -1529,7 +1530,7 @@ class DocumentHttpService {
|
|
|
1529
1530
|
if (!applicationId)
|
|
1530
1531
|
return EMPTY;
|
|
1531
1532
|
let headers = new HttpHeaders({
|
|
1532
|
-
'Authorization': `Bearer
|
|
1533
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1533
1534
|
});
|
|
1534
1535
|
let url = `${this.apiUrl}${URLS.STATUS_DOCUMENT_COUNT}${applicationId}`;
|
|
1535
1536
|
let params = new HttpParams();
|
|
@@ -1559,7 +1560,7 @@ class DocumentHttpService {
|
|
|
1559
1560
|
*/
|
|
1560
1561
|
getDocumentsBySelection(contextId, menuItem, userId, status, searchKey = null) {
|
|
1561
1562
|
let headers = new HttpHeaders({
|
|
1562
|
-
'Authorization': `Bearer
|
|
1563
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1563
1564
|
});
|
|
1564
1565
|
let params = new HttpParams();
|
|
1565
1566
|
if (userId) {
|
|
@@ -1581,7 +1582,7 @@ class DocumentHttpService {
|
|
|
1581
1582
|
}
|
|
1582
1583
|
getDocumentHistory(documentId) {
|
|
1583
1584
|
let headers = new HttpHeaders({
|
|
1584
|
-
'Authorization': `Bearer
|
|
1585
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1585
1586
|
});
|
|
1586
1587
|
if (!documentId) {
|
|
1587
1588
|
return of([]);
|
|
@@ -1599,7 +1600,7 @@ class DocumentHttpService {
|
|
|
1599
1600
|
if (!source)
|
|
1600
1601
|
return EMPTY;
|
|
1601
1602
|
let headers = new HttpHeaders({
|
|
1602
|
-
'Authorization': `Bearer
|
|
1603
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1603
1604
|
});
|
|
1604
1605
|
return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
|
|
1605
1606
|
return throwError(() => new Error(error));
|
|
@@ -1612,7 +1613,7 @@ class DocumentHttpService {
|
|
|
1612
1613
|
*/
|
|
1613
1614
|
getDocumentTypesByCategory(categoryId) {
|
|
1614
1615
|
let headers = new HttpHeaders({
|
|
1615
|
-
'Authorization': `Bearer
|
|
1616
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1616
1617
|
});
|
|
1617
1618
|
if (!categoryId)
|
|
1618
1619
|
return EMPTY;
|
|
@@ -1627,7 +1628,7 @@ class DocumentHttpService {
|
|
|
1627
1628
|
*/
|
|
1628
1629
|
uploadFile(formData) {
|
|
1629
1630
|
let headers = new HttpHeaders({
|
|
1630
|
-
'Authorization': `Bearer
|
|
1631
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1631
1632
|
});
|
|
1632
1633
|
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
|
|
1633
1634
|
return throwError(() => new Error(error));
|
|
@@ -1640,7 +1641,7 @@ class DocumentHttpService {
|
|
|
1640
1641
|
*/
|
|
1641
1642
|
saveDocumentUpload(payload) {
|
|
1642
1643
|
let headers = new HttpHeaders({
|
|
1643
|
-
'Authorization': `Bearer
|
|
1644
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1644
1645
|
});
|
|
1645
1646
|
return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
|
|
1646
1647
|
return throwError(() => new Error(error));
|
|
@@ -1655,7 +1656,7 @@ class DocumentHttpService {
|
|
|
1655
1656
|
*/
|
|
1656
1657
|
updateDocumentStatus(documentId, status, statusUpdateDescription) {
|
|
1657
1658
|
let headers = new HttpHeaders({
|
|
1658
|
-
'Authorization': `Bearer
|
|
1659
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1659
1660
|
});
|
|
1660
1661
|
const payload = {
|
|
1661
1662
|
statusUpdateDescription: statusUpdateDescription
|
|
@@ -1694,7 +1695,7 @@ class DocumentHttpService {
|
|
|
1694
1695
|
*/
|
|
1695
1696
|
deleteDocument(documentId, contextId) {
|
|
1696
1697
|
let headers = new HttpHeaders({
|
|
1697
|
-
'Authorization': `Bearer
|
|
1698
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1698
1699
|
});
|
|
1699
1700
|
return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
|
|
1700
1701
|
this.getDocumentCatagories(contextId).subscribe();
|
|
@@ -1713,7 +1714,7 @@ class DocumentHttpService {
|
|
|
1713
1714
|
*/
|
|
1714
1715
|
downloadExcelFile(documentUrl) {
|
|
1715
1716
|
let headers = new HttpHeaders({
|
|
1716
|
-
'Authorization': `Bearer
|
|
1717
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1717
1718
|
});
|
|
1718
1719
|
return this.http.get(documentUrl, { headers,
|
|
1719
1720
|
responseType: 'arraybuffer'
|
|
@@ -1729,7 +1730,7 @@ class DocumentHttpService {
|
|
|
1729
1730
|
*/
|
|
1730
1731
|
downloadCsvFile(documentUrl) {
|
|
1731
1732
|
let headers = new HttpHeaders({
|
|
1732
|
-
'Authorization': `Bearer
|
|
1733
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1733
1734
|
});
|
|
1734
1735
|
return this.http.get(documentUrl, { headers,
|
|
1735
1736
|
responseType: 'text'
|
|
@@ -1744,7 +1745,7 @@ class DocumentHttpService {
|
|
|
1744
1745
|
*/
|
|
1745
1746
|
downloadEmailFile(documentUrl) {
|
|
1746
1747
|
let headers = new HttpHeaders({
|
|
1747
|
-
'Authorization': `Bearer
|
|
1748
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1748
1749
|
});
|
|
1749
1750
|
const isAzureBlobStorage = documentUrl.includes('.blob.core.windows.net');
|
|
1750
1751
|
if (isAzureBlobStorage) {
|
|
@@ -1762,7 +1763,7 @@ class DocumentHttpService {
|
|
|
1762
1763
|
}
|
|
1763
1764
|
documentRequest(payload) {
|
|
1764
1765
|
let headers = new HttpHeaders({
|
|
1765
|
-
'Authorization': `Bearer
|
|
1766
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1766
1767
|
});
|
|
1767
1768
|
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_REQUEST}`, payload, { headers }).pipe(catchError((error) => {
|
|
1768
1769
|
return throwError(() => new Error(error));
|
|
@@ -1775,7 +1776,7 @@ class DocumentHttpService {
|
|
|
1775
1776
|
*/
|
|
1776
1777
|
getValuationReportByContextId(contextId) {
|
|
1777
1778
|
let headers = new HttpHeaders({
|
|
1778
|
-
'Authorization': `Bearer
|
|
1779
|
+
'Authorization': `Bearer 4fe17947-30bf-4079-b4ea-798ff73cd473`
|
|
1779
1780
|
});
|
|
1780
1781
|
if (!contextId)
|
|
1781
1782
|
return EMPTY;
|
|
@@ -3043,7 +3044,7 @@ class DocumentUploadBusinessService {
|
|
|
3043
3044
|
/**
|
|
3044
3045
|
* Helper method to validate form data and return validation result
|
|
3045
3046
|
*/
|
|
3046
|
-
validateFormData(assignmentType, selectedCategory, selectedDocumentType,
|
|
3047
|
+
validateFormData(assignmentType, selectedCategory, selectedDocumentType, selectedApplicants, uploadedFiles, categoryOptions, documentTypeOptions) {
|
|
3047
3048
|
// Check assignment type
|
|
3048
3049
|
if (!assignmentType) {
|
|
3049
3050
|
return { isValid: false, message: SHARED.VALIDATION_SELECT_ASSIGNMENT_TYPE };
|
|
@@ -3070,7 +3071,7 @@ class DocumentUploadBusinessService {
|
|
|
3070
3071
|
return { isValid: false, message: SHARED.VALIDATION_WAIT_FOR_UPLOAD };
|
|
3071
3072
|
}
|
|
3072
3073
|
// For Applicant type, check applicant selection
|
|
3073
|
-
if (assignmentType === SHARED.APPLICANT && !
|
|
3074
|
+
if (assignmentType === SHARED.APPLICANT && (!selectedApplicants || selectedApplicants.length === 0)) {
|
|
3074
3075
|
return { isValid: false, message: SHARED.VALIDATION_SELECT_APPLICANT };
|
|
3075
3076
|
}
|
|
3076
3077
|
return { isValid: true, message: SHARED.VALIDATION_ALL_FIELDS_COMPLETED };
|
|
@@ -3078,13 +3079,13 @@ class DocumentUploadBusinessService {
|
|
|
3078
3079
|
/**
|
|
3079
3080
|
* Validates form data
|
|
3080
3081
|
*/
|
|
3081
|
-
validateForm(assignmentType, selectedCategory, selectedDocumentType,
|
|
3082
|
-
return this.validateFormData(assignmentType, selectedCategory, selectedDocumentType,
|
|
3082
|
+
validateForm(assignmentType, selectedCategory, selectedDocumentType, selectedApplicants, uploadedFiles, categoryOptions, documentTypeOptions) {
|
|
3083
|
+
return this.validateFormData(assignmentType, selectedCategory, selectedDocumentType, selectedApplicants, uploadedFiles, categoryOptions, documentTypeOptions).isValid;
|
|
3083
3084
|
}
|
|
3084
3085
|
/**
|
|
3085
3086
|
* Checks if save button should be disabled
|
|
3086
3087
|
*/
|
|
3087
|
-
isSaveButtonDisabled(assignmentType, selectedCategory, selectedDocumentType,
|
|
3088
|
+
isSaveButtonDisabled(assignmentType, selectedCategory, selectedDocumentType, selectedApplicants, uploadedFiles, isSaving) {
|
|
3088
3089
|
if (isSaving) {
|
|
3089
3090
|
return true;
|
|
3090
3091
|
}
|
|
@@ -3108,7 +3109,7 @@ class DocumentUploadBusinessService {
|
|
|
3108
3109
|
return true;
|
|
3109
3110
|
}
|
|
3110
3111
|
// For Applicant type, check applicant selection
|
|
3111
|
-
if (assignmentType === SHARED.APPLICANT && !
|
|
3112
|
+
if (assignmentType === SHARED.APPLICANT && (!selectedApplicants || selectedApplicants.length === 0)) {
|
|
3112
3113
|
return true;
|
|
3113
3114
|
}
|
|
3114
3115
|
return false; // Button should be enabled
|
|
@@ -3116,7 +3117,7 @@ class DocumentUploadBusinessService {
|
|
|
3116
3117
|
/**
|
|
3117
3118
|
* Validates the complete payload before save
|
|
3118
3119
|
*/
|
|
3119
|
-
validatePayload(assignmentType, selectedCategory, selectedDocumentType,
|
|
3120
|
+
validatePayload(assignmentType, selectedCategory, selectedDocumentType, selectedApplicants, uploadedFiles) {
|
|
3120
3121
|
// Check assignment type
|
|
3121
3122
|
if (!assignmentType) {
|
|
3122
3123
|
return { isValid: false, message: SHARED.VALIDATION_SELECT_ASSIGNMENT_TYPE };
|
|
@@ -3139,7 +3140,7 @@ class DocumentUploadBusinessService {
|
|
|
3139
3140
|
return { isValid: false, message: SHARED.VALIDATION_WAIT_FOR_UPLOAD };
|
|
3140
3141
|
}
|
|
3141
3142
|
// For Applicant type, check applicant selection
|
|
3142
|
-
if (assignmentType === SHARED.APPLICANT && !
|
|
3143
|
+
if (assignmentType === SHARED.APPLICANT && (!selectedApplicants || selectedApplicants.length === 0)) {
|
|
3143
3144
|
return { isValid: false, message: SHARED.VALIDATION_SELECT_APPLICANT };
|
|
3144
3145
|
}
|
|
3145
3146
|
return { isValid: true, message: SHARED.VALIDATION_ALL_FIELDS_COMPLETED };
|
|
@@ -3147,24 +3148,26 @@ class DocumentUploadBusinessService {
|
|
|
3147
3148
|
/**
|
|
3148
3149
|
* Prepares upload payload
|
|
3149
3150
|
*/
|
|
3150
|
-
prepareUploadPayload(assignmentType, selectedCategory, selectedDocumentType,
|
|
3151
|
+
prepareUploadPayload(assignmentType, selectedCategory, selectedDocumentType, selectedApplicants, uploadedFiles, contextId) {
|
|
3151
3152
|
const payload = {
|
|
3152
3153
|
source: assignmentType,
|
|
3153
|
-
categoryId: selectedCategory,
|
|
3154
3154
|
documentTypeId: selectedDocumentType,
|
|
3155
|
-
contextId,
|
|
3156
3155
|
documents: uploadedFiles.map(file => ({
|
|
3157
3156
|
fileName: file.file.name,
|
|
3158
3157
|
fileSize: file.file.size,
|
|
3159
3158
|
url: file.url,
|
|
3160
3159
|
contentType: file.contentType,
|
|
3161
3160
|
size: file.size,
|
|
3162
|
-
uploadedFileId: file.uploadResponse?.id || file.uploadResponse?.fileName
|
|
3161
|
+
uploadedFileId: file.uploadResponse?.id || file.uploadResponse?.fileName || file.file.name
|
|
3163
3162
|
}))
|
|
3164
3163
|
};
|
|
3165
|
-
// For Applicant type, include the
|
|
3166
|
-
if (assignmentType === SHARED.APPLICANT &&
|
|
3167
|
-
payload.
|
|
3164
|
+
// For Applicant type, include the contextIds array
|
|
3165
|
+
if (assignmentType === SHARED.APPLICANT && selectedApplicants && selectedApplicants.length > 0) {
|
|
3166
|
+
payload.contextIds = selectedApplicants;
|
|
3167
|
+
}
|
|
3168
|
+
else {
|
|
3169
|
+
// For Application type, use contextId
|
|
3170
|
+
payload.contextId = contextId;
|
|
3168
3171
|
}
|
|
3169
3172
|
return payload;
|
|
3170
3173
|
}
|
|
@@ -3196,7 +3199,7 @@ class DocumentUploadBusinessService {
|
|
|
3196
3199
|
getInitialFormState() {
|
|
3197
3200
|
return {
|
|
3198
3201
|
selectedAssignmentType: null,
|
|
3199
|
-
|
|
3202
|
+
selectedApplicants: [],
|
|
3200
3203
|
selectedCategory: null,
|
|
3201
3204
|
selectedDocumentType: null,
|
|
3202
3205
|
uploadedFiles: [],
|
|
@@ -3258,8 +3261,8 @@ class DocumentUploadFormService {
|
|
|
3258
3261
|
/**
|
|
3259
3262
|
* Helper method to validate required fields and show appropriate messages
|
|
3260
3263
|
*/
|
|
3261
|
-
validateRequiredFieldsWithMessages(assignmentType,
|
|
3262
|
-
if (assignmentType === 'Applicant' && !
|
|
3264
|
+
validateRequiredFieldsWithMessages(assignmentType, selectedApplicants, selectedCategory, selectedDocumentType, uploadedFiles) {
|
|
3265
|
+
if (assignmentType === 'Applicant' && (!selectedApplicants || selectedApplicants.length === 0)) {
|
|
3263
3266
|
return { isValid: false, field: 'applicant' };
|
|
3264
3267
|
}
|
|
3265
3268
|
if (!selectedCategory) {
|
|
@@ -3276,8 +3279,8 @@ class DocumentUploadFormService {
|
|
|
3276
3279
|
/**
|
|
3277
3280
|
* Validates required fields for upload
|
|
3278
3281
|
*/
|
|
3279
|
-
validateRequiredFields(assignmentType,
|
|
3280
|
-
const validation = this.validateRequiredFieldsWithMessages(assignmentType,
|
|
3282
|
+
validateRequiredFields(assignmentType, selectedApplicants, selectedCategory, selectedDocumentType, uploadedFiles) {
|
|
3283
|
+
const validation = this.validateRequiredFieldsWithMessages(assignmentType, selectedApplicants, selectedCategory, selectedDocumentType, uploadedFiles);
|
|
3281
3284
|
if (!validation.isValid) {
|
|
3282
3285
|
this.showValidationMessage(validation.field);
|
|
3283
3286
|
}
|
|
@@ -3432,8 +3435,8 @@ class DocumentUploadComponent {
|
|
|
3432
3435
|
onFileRemoved = new EventEmitter();
|
|
3433
3436
|
/** Currently selected assignment type (Applicant or Application) */
|
|
3434
3437
|
selectedAssignmentType = null;
|
|
3435
|
-
/** Currently selected applicant
|
|
3436
|
-
|
|
3438
|
+
/** Currently selected applicant IDs (array for multiple selection) */
|
|
3439
|
+
selectedApplicants = [];
|
|
3437
3440
|
/** Currently selected document category */
|
|
3438
3441
|
selectedCategory = SHARED.EMPTY;
|
|
3439
3442
|
/** Currently selected document type */
|
|
@@ -3520,7 +3523,7 @@ class DocumentUploadComponent {
|
|
|
3520
3523
|
const hasFiles = Boolean(this.uploadedFiles && this.uploadedFiles.length > 0);
|
|
3521
3524
|
// Check if any form fields have been changed
|
|
3522
3525
|
const hasFormChanges = Boolean((this.selectedAssignmentType && this.selectedAssignmentType !== SHARED.EMPTY) ||
|
|
3523
|
-
(this.
|
|
3526
|
+
(this.selectedApplicants && this.selectedApplicants.length > 0) ||
|
|
3524
3527
|
(this.selectedCategory && this.selectedCategory !== SHARED.EMPTY) ||
|
|
3525
3528
|
(this.selectedDocumentType && this.selectedDocumentType !== SHARED.EMPTY));
|
|
3526
3529
|
// Set and return the combined result
|
|
@@ -3643,12 +3646,12 @@ class DocumentUploadComponent {
|
|
|
3643
3646
|
* Validates payload and required fields before proceeding with upload.
|
|
3644
3647
|
*/
|
|
3645
3648
|
saveDocumentUpload() {
|
|
3646
|
-
const payloadValidation = this.businessService.validatePayload(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.
|
|
3649
|
+
const payloadValidation = this.businessService.validatePayload(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.selectedApplicants, this.uploadedFiles);
|
|
3647
3650
|
if (!payloadValidation.isValid) {
|
|
3648
3651
|
this.formService.showWarningMessage('Incomplete Form', payloadValidation.message);
|
|
3649
3652
|
return;
|
|
3650
3653
|
}
|
|
3651
|
-
if (!this.formService.validateRequiredFields(this.selectedAssignmentType, this.
|
|
3654
|
+
if (!this.formService.validateRequiredFields(this.selectedAssignmentType, this.selectedApplicants, this.selectedCategory, this.selectedDocumentType, this.uploadedFiles))
|
|
3652
3655
|
return;
|
|
3653
3656
|
this.isSaving = true;
|
|
3654
3657
|
this.saveDocumentMetadata();
|
|
@@ -3686,7 +3689,7 @@ class DocumentUploadComponent {
|
|
|
3686
3689
|
* @returns True if the save button should be disabled, false otherwise
|
|
3687
3690
|
*/
|
|
3688
3691
|
getSaveButtonDisabled() {
|
|
3689
|
-
const isDisabled = this.businessService.isSaveButtonDisabled(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.
|
|
3692
|
+
const isDisabled = this.businessService.isSaveButtonDisabled(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.selectedApplicants, this.uploadedFiles, this.isSaving);
|
|
3690
3693
|
return isDisabled;
|
|
3691
3694
|
}
|
|
3692
3695
|
/**
|
|
@@ -3734,7 +3737,8 @@ class DocumentUploadComponent {
|
|
|
3734
3737
|
* Clears document type options.
|
|
3735
3738
|
*/
|
|
3736
3739
|
resetSelections() {
|
|
3737
|
-
this.
|
|
3740
|
+
this.selectedApplicants = [];
|
|
3741
|
+
this.selectedCategory = this.selectedDocumentType = SHARED.EMPTY;
|
|
3738
3742
|
this.documentTypeOptions = SHARED.EMPTY_ARRAY;
|
|
3739
3743
|
}
|
|
3740
3744
|
/**
|
|
@@ -3817,7 +3821,7 @@ class DocumentUploadComponent {
|
|
|
3817
3821
|
* Checks payload validation and emits form validation change if state changed.
|
|
3818
3822
|
*/
|
|
3819
3823
|
validateForm() {
|
|
3820
|
-
const payloadValidation = this.businessService.validatePayload(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.
|
|
3824
|
+
const payloadValidation = this.businessService.validatePayload(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.selectedApplicants, this.uploadedFiles);
|
|
3821
3825
|
const previousValidationState = this.isFormValid;
|
|
3822
3826
|
this.isFormValid = payloadValidation.isValid;
|
|
3823
3827
|
const hasUnsavedChanges = this.checkForUnsavedChanges();
|
|
@@ -3831,8 +3835,8 @@ class DocumentUploadComponent {
|
|
|
3831
3835
|
* Prepares upload payload and calls business service to save.
|
|
3832
3836
|
*/
|
|
3833
3837
|
saveDocumentMetadata() {
|
|
3834
|
-
const contextId = this.
|
|
3835
|
-
const payload = this.businessService.prepareUploadPayload(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.
|
|
3838
|
+
const contextId = this.contextId;
|
|
3839
|
+
const payload = this.businessService.prepareUploadPayload(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.selectedApplicants, this.uploadedFiles, contextId);
|
|
3836
3840
|
this.businessService.saveDocumentUpload(payload)
|
|
3837
3841
|
.pipe(takeUntil(this.destroy$))
|
|
3838
3842
|
.subscribe({
|
|
@@ -3934,11 +3938,11 @@ class DocumentUploadComponent {
|
|
|
3934
3938
|
this.dataService.destroy();
|
|
3935
3939
|
}
|
|
3936
3940
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadComponent, deps: [{ token: DocumentUploadService }, { token: DocumentService }, { token: i3.PrimeNGConfig }, { token: FileFormatService }, { token: i3.MessageService }, { token: i0.ChangeDetectorRef }, { token: DocumentUploadBusinessService }, { token: DocumentUploadFormService }, { token: DocumentUploadDataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3937
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentUploadComponent, isStandalone: false, selector: "lib-document-upload", inputs: { contextId: "contextId", isDocumentSaveBtnClicked: "isDocumentSaveBtnClicked", isDocumentSidebarClosed: "isDocumentSidebarClosed", isFormHide: "isFormHide", isMultiAttachmentHidden: "isMultiAttachmentHidden" }, outputs: { onFormValidationChange: "onFormValidationChange", onUploadSuccess: "onUploadSuccess", onFilesUploaded: "onFilesUploaded", hasUnsavedChangesChange: "hasUnsavedChangesChange", onFileRemoved: "onFileRemoved" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\" *ngIf=\"!isFormHide\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s) </label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"!isFormHide && selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"selectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\" *ngIf=\"!isFormHide\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\" *ngIf=\"!isFormHide\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents <span class=\"text-red-500\" *ngIf=\"!isFormHide\">*</span></h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n [accept]=\"getFileUploadAcceptString()\" \r\n maxFileSize=\"27262976\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button \r\n *ngIf=\"!isMultiAttachmentHidden\"\r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\"font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar \r\n [value]=\"uploadedFile.progress ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 100 }\"\r\n >\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}.document-upload-container{padding:1rem;max-height:90vh}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.category-section .p-dropdown,.document-type-section .p-dropdown{width:100%!important;min-width:100%!important}.category-section .p-dropdown-panel,.document-type-section .p-dropdown-panel{width:100%!important}:host ::ng-deep .p-dropdown{width:100%!important}:host ::ng-deep .p-dropdown-panel{width:100%!important}.applicant-list{display:none}\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: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i10.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: i11.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }, { kind: "component", type: i12.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i14.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3941
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentUploadComponent, isStandalone: false, selector: "lib-document-upload", inputs: { contextId: "contextId", isDocumentSaveBtnClicked: "isDocumentSaveBtnClicked", isDocumentSidebarClosed: "isDocumentSidebarClosed", isFormHide: "isFormHide", isMultiAttachmentHidden: "isMultiAttachmentHidden" }, outputs: { onFormValidationChange: "onFormValidationChange", onUploadSuccess: "onUploadSuccess", onFilesUploaded: "onFilesUploaded", hasUnsavedChangesChange: "hasUnsavedChangesChange", onFileRemoved: "onFileRemoved" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\" *ngIf=\"!isFormHide\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s) </label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"!isFormHide && selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-checkbox \r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicants\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onChange)=\"onApplicantSelectionChange()\"\r\n ></p-checkbox>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\" *ngIf=\"!isFormHide\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\" *ngIf=\"!isFormHide\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents <span class=\"text-red-500\" *ngIf=\"!isFormHide\">*</span></h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n [accept]=\"getFileUploadAcceptString()\" \r\n maxFileSize=\"27262976\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button \r\n *ngIf=\"!isMultiAttachmentHidden\"\r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\"font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar \r\n [value]=\"uploadedFile.progress ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 100 }\"\r\n >\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}.document-upload-container{padding:1rem;max-height:90vh}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.category-section .p-dropdown,.document-type-section .p-dropdown{width:100%!important;min-width:100%!important}.category-section .p-dropdown-panel,.document-type-section .p-dropdown-panel{width:100%!important}:host ::ng-deep .p-dropdown{width:100%!important}:host ::ng-deep .p-dropdown-panel{width:100%!important}.applicant-list{display:none}\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: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i10.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: i11.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }, { kind: "component", type: i12.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i13.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i15.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3938
3942
|
}
|
|
3939
3943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadComponent, decorators: [{
|
|
3940
3944
|
type: Component,
|
|
3941
|
-
args: [{ selector: 'lib-document-upload', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\" *ngIf=\"!isFormHide\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s) </label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"!isFormHide && selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"selectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\" *ngIf=\"!isFormHide\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\" *ngIf=\"!isFormHide\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents <span class=\"text-red-500\" *ngIf=\"!isFormHide\">*</span></h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n [accept]=\"getFileUploadAcceptString()\" \r\n maxFileSize=\"27262976\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button \r\n *ngIf=\"!isMultiAttachmentHidden\"\r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\"font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar \r\n [value]=\"uploadedFile.progress ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 100 }\"\r\n >\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}.document-upload-container{padding:1rem;max-height:90vh}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.category-section .p-dropdown,.document-type-section .p-dropdown{width:100%!important;min-width:100%!important}.category-section .p-dropdown-panel,.document-type-section .p-dropdown-panel{width:100%!important}:host ::ng-deep .p-dropdown{width:100%!important}:host ::ng-deep .p-dropdown-panel{width:100%!important}.applicant-list{display:none}\n"] }]
|
|
3945
|
+
args: [{ selector: 'lib-document-upload', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\" *ngIf=\"!isFormHide\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s) </label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"!isFormHide && selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-checkbox \r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicants\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onChange)=\"onApplicantSelectionChange()\"\r\n ></p-checkbox>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\" *ngIf=\"!isFormHide\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\" *ngIf=\"!isFormHide\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents <span class=\"text-red-500\" *ngIf=\"!isFormHide\">*</span></h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n [accept]=\"getFileUploadAcceptString()\" \r\n maxFileSize=\"27262976\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button \r\n *ngIf=\"!isMultiAttachmentHidden\"\r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\"font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar \r\n [value]=\"uploadedFile.progress ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 100 }\"\r\n >\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}.document-upload-container{padding:1rem;max-height:90vh}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.category-section .p-dropdown,.document-type-section .p-dropdown{width:100%!important;min-width:100%!important}.category-section .p-dropdown-panel,.document-type-section .p-dropdown-panel{width:100%!important}:host ::ng-deep .p-dropdown{width:100%!important}:host ::ng-deep .p-dropdown-panel{width:100%!important}.applicant-list{display:none}\n"] }]
|
|
3942
3946
|
}], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentService }, { type: i3.PrimeNGConfig }, { type: FileFormatService }, { type: i3.MessageService }, { type: i0.ChangeDetectorRef }, { type: DocumentUploadBusinessService }, { type: DocumentUploadFormService }, { type: DocumentUploadDataService }], propDecorators: { contextId: [{
|
|
3943
3947
|
type: Input
|
|
3944
3948
|
}], isDocumentSaveBtnClicked: [{
|
|
@@ -4257,7 +4261,7 @@ class RequestDocumentComponent {
|
|
|
4257
4261
|
this.destroy$.complete();
|
|
4258
4262
|
}
|
|
4259
4263
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RequestDocumentComponent, deps: [{ token: DocumentUploadService }, { token: DocumentUploadFormService }, { token: DocumentUploadDataService }, { token: i0.ChangeDetectorRef }, { token: DocumentHttpService }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4260
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: RequestDocumentComponent, isStandalone: false, selector: "lib-request-document", inputs: { contextId: "contextId", isRequestSaveBtnClicked: "isRequestSaveBtnClicked", isRequestSidebarClosed: "isRequestSidebarClosed" }, outputs: { onFormValidationChange: "onFormValidationChange", onRequestSuccess: "onRequestSuccess", onRequestError: "onRequestError", hasUnsavedChangesChange: "hasUnsavedChangesChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section (same structure as upload, without files) -->\r\n <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"reqSelectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'req-applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Description Field -->\r\n <div class=\"description-section\">\r\n <h6>Description <span class=\"text-red-500\">*</span></h6>\r\n <textarea pInputTextarea [(ngModel)]=\"description\" (ngModelChange)=\"onDescriptionChange()\" rows=\"4\" placeholder=\"Add description\" class=\"w-full\"></textarea>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
|
4264
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: RequestDocumentComponent, isStandalone: false, selector: "lib-request-document", inputs: { contextId: "contextId", isRequestSaveBtnClicked: "isRequestSaveBtnClicked", isRequestSidebarClosed: "isRequestSidebarClosed" }, outputs: { onFormValidationChange: "onFormValidationChange", onRequestSuccess: "onRequestSuccess", onRequestError: "onRequestError", hasUnsavedChangesChange: "hasUnsavedChangesChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section (same structure as upload, without files) -->\r\n <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"reqSelectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'req-applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Description Field -->\r\n <div class=\"description-section\">\r\n <h6>Description <span class=\"text-red-500\">*</span></h6>\r\n <textarea pInputTextarea [(ngModel)]=\"description\" (ngModelChange)=\"onDescriptionChange()\" rows=\"4\" placeholder=\"Add description\" class=\"w-full\"></textarea>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i13.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i8.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i9$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i15.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] });
|
|
4261
4265
|
}
|
|
4262
4266
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RequestDocumentComponent, decorators: [{
|
|
4263
4267
|
type: Component,
|
|
@@ -5216,7 +5220,7 @@ class FolderContainerComponent {
|
|
|
5216
5220
|
// Check if files are uploaded or form has changes
|
|
5217
5221
|
const hasFiles = Boolean(this.documentUploadComponent.uploadedFiles && this.documentUploadComponent.uploadedFiles.length > 0);
|
|
5218
5222
|
const hasFormChanges = Boolean((this.documentUploadComponent.selectedAssignmentType && this.documentUploadComponent.selectedAssignmentType !== SHARED.EMPTY) ||
|
|
5219
|
-
(this.documentUploadComponent.
|
|
5223
|
+
(this.documentUploadComponent.selectedApplicants && this.documentUploadComponent.selectedApplicants.length > 0) ||
|
|
5220
5224
|
(this.documentUploadComponent.selectedCategory && this.documentUploadComponent.selectedCategory !== SHARED.EMPTY) ||
|
|
5221
5225
|
(this.documentUploadComponent.selectedDocumentType && this.documentUploadComponent.selectedDocumentType !== SHARED.EMPTY));
|
|
5222
5226
|
this.hasUnsavedChanges = hasFiles || hasFormChanges;
|