cat-documents-ng 1.0.2 → 1.0.4
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 +298 -35
- 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/Shared/constant/URLS.d.ts +123 -0
- package/Shared/services/app-config.service.d.ts +51 -0
- package/{projects/cat-document-lib/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 +11392 -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/{projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.ts → lib/document/components/folder-block/folder-block.component.d.ts} +12 -26
- 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/lib/document/models/document-alert.model.d.ts +38 -0
- 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/{projects/cat-document-lib/src/lib/document/models/folder.model.ts → lib/document/models/folder.model.d.ts} +7 -13
- 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/{projects/cat-document-lib/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 +19 -57
- package/public-api.d.ts +27 -0
- package/src/assets/images/Document interface.png +0 -0
- package/src/assets/images/Document upload.png +0 -0
- package/src/assets/images/Pdf viewer dialog.png +0 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -32
- package/.husky/pre-commit +0 -4
- package/angular.json +0 -119
- package/eslint.config.cjs +0 -148
- package/projects/cat-document-lib/README.md +0 -63
- package/projects/cat-document-lib/ng-package.json +0 -11
- package/projects/cat-document-lib/package.json +0 -16
- package/projects/cat-document-lib/setup-jest.ts +0 -1
- package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.html +0 -6
- package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.scss +0 -0
- package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.spec.ts +0 -0
- package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.ts +0 -82
- package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.html +0 -35
- package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.scss +0 -12
- package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.spec.ts +0 -0
- package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.ts +0 -73
- package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.html +0 -33
- package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.scss +0 -22
- package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +0 -23
- package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.ts +0 -40
- package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.html +0 -56
- package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.scss +0 -26
- package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.spec.ts +0 -24
- package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.ts +0 -184
- package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.html +0 -244
- package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.scss +0 -36
- package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +0 -21
- package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.ts +0 -125
- package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.html +0 -46
- package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.scss +0 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.spec.ts +0 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.html +0 -2
- package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.scss +0 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.spec.ts +0 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.ts +0 -29
- package/projects/cat-document-lib/src/lib/document/document.module.ts +0 -187
- package/projects/cat-document-lib/src/lib/document/models/document.model.ts +0 -39
- package/projects/cat-document-lib/src/lib/document/services/file-format.service.spec.ts +0 -16
- package/projects/cat-document-lib/src/lib/document/services/file-format.service.ts +0 -41
- package/projects/cat-document-lib/src/lib/document/state/document.query.ts +0 -23
- package/projects/cat-document-lib/src/lib/document/state/document.state.ts +0 -39
- package/projects/cat-document-lib/src/lib/document/state/document.store.ts +0 -23
- package/projects/cat-document-lib/src/public-api.ts +0 -8
- package/projects/cat-document-lib/src/shared/constant/SHARED.ts +0 -232
- package/projects/cat-document-lib/src/shared/constant/URLS.ts +0 -31
- package/projects/cat-document-lib/src/shared/services/app-config.service.spec.ts +0 -16
- package/projects/cat-document-lib/src/shared/services/app-config.service.ts +0 -73
- package/projects/cat-document-lib/tsconfig.lib.json +0 -15
- package/projects/cat-document-lib/tsconfig.lib.prod.json +0 -11
- package/projects/cat-document-lib/tsconfig.spec.json +0 -15
- package/public/favicon.ico +0 -0
- package/src/app/app.component.html +0 -1
- package/src/app/app.component.scss +0 -0
- package/src/app/app.component.spec.ts +0 -29
- package/src/app/app.component.ts +0 -15
- package/src/app/app.module.ts +0 -60
- package/src/app/app.routing.module.ts +0 -19
- package/src/index.html +0 -13
- package/src/main.ts +0 -5
- package/src/styles.scss +0 -39
- package/tsconfig.app.json +0 -15
- package/tsconfig.json +0 -32
- /package/{projects/cat-document-lib/src → src}/assets/images/FolderImg.png +0 -0
- /package/{projects/cat-document-lib/src → src}/assets/images/Frame.png +0 -0
- /package/{projects/cat-document-lib/src → src}/assets/images/document.png +0 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { AppConfigService } from '../../../Shared/services/app-config.service';
|
|
3
|
+
import { DocumentStore } from '../state/document.store';
|
|
4
|
+
import { HttpClient } from '@angular/common/http';
|
|
5
|
+
import { DocumentTypeModel } from '../models/document-type.model';
|
|
6
|
+
import { DocumentAlertModel } from '../models/document-alert.model';
|
|
7
|
+
import { DocumentModel } from '../models/document.model';
|
|
8
|
+
import { FolderBlockModel } from '../models/folder.model';
|
|
9
|
+
import { DocumentCategory } from '../models/document-category.model';
|
|
10
|
+
import { UserListModel } from '../models/user-list.model';
|
|
11
|
+
import { StatusDataModel } from '../models/status-data.model';
|
|
12
|
+
import { DocumentHistorySection } from '../models/document-history.model';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
/**
|
|
15
|
+
* Service for making HTTP requests related to documents.
|
|
16
|
+
* Authentication is handled automatically by the HTTP interceptor in the main project.
|
|
17
|
+
* @class DocumentHttpService
|
|
18
|
+
* @typedef {DocumentHttpService}
|
|
19
|
+
*/
|
|
20
|
+
export declare class DocumentHttpService {
|
|
21
|
+
documentStore: DocumentStore;
|
|
22
|
+
private http;
|
|
23
|
+
appConfigService: AppConfigService;
|
|
24
|
+
/**
|
|
25
|
+
* Creates an instance of DocumentService.
|
|
26
|
+
* @param {DocumentStore} documentStore - Store managing the state of documents.
|
|
27
|
+
* @param {HttpClient} http - Angular HTTP client for making API requests.
|
|
28
|
+
* @param {AppConfigService} appConfigService - Service for retrieving application configuration, such as API base URL.
|
|
29
|
+
*/
|
|
30
|
+
constructor(documentStore: DocumentStore, http: HttpClient, appConfigService: AppConfigService);
|
|
31
|
+
/**
|
|
32
|
+
* Get api url from appConfigService.
|
|
33
|
+
* @readonly
|
|
34
|
+
* @type {string}
|
|
35
|
+
*/
|
|
36
|
+
get apiUrl(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Fetches a document by its path name and transforms the response for dropdown options.
|
|
39
|
+
* Includes error handling for failed API requests.
|
|
40
|
+
* @param {string} contextId - The context ID to fetch the document.
|
|
41
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
42
|
+
*/
|
|
43
|
+
getFoldersData(contextId: string | undefined): Observable<FolderBlockModel[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Fetches a document catagories by its path name.
|
|
46
|
+
* Includes error handling for failed API requests.
|
|
47
|
+
* @param {string} contextId - The context ID to fetch the document.
|
|
48
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
49
|
+
*/
|
|
50
|
+
getDocumentCatagories(contextId: string): Observable<any>;
|
|
51
|
+
/**
|
|
52
|
+
* Fetches a document by its path name and transforms the response for dropdown options.
|
|
53
|
+
* Includes error handling for failed API requests.
|
|
54
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* Fetches a document by its path name and transforms the response for dropdown options.
|
|
58
|
+
* @param {string} documentId - The document ID to fetch the document.
|
|
59
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
60
|
+
*/
|
|
61
|
+
getAlertsByDocumentID(documentId: string): Observable<DocumentAlertModel>;
|
|
62
|
+
/**
|
|
63
|
+
* Fetches a document by its folder ID and transforms the response for dropdown options.
|
|
64
|
+
* @param {string} folderId - The folder ID to fetch the document.
|
|
65
|
+
* @param {string} contextId - The context ID to fetch the document.
|
|
66
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
67
|
+
*/
|
|
68
|
+
getDocumentByFolderID(folderId: string, contextId: string): Observable<DocumentModel[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Updates the name of a document.
|
|
71
|
+
* This method sends an HTTP PUT request to update the document's file name using the provided document ID and payload.
|
|
72
|
+
* In case of an error, it will return an observable that throws an Error.
|
|
73
|
+
* @param {string} documentId - The unique identifier of the document to update.
|
|
74
|
+
* @param {any} payload - The payload containing the updated document data (e.g., fileName).
|
|
75
|
+
* @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
|
|
76
|
+
*/
|
|
77
|
+
updateDocumentName(documentId: string, payload: any): Observable<DocumentModel>;
|
|
78
|
+
/**
|
|
79
|
+
* Fetches a userlist by its path name.
|
|
80
|
+
* @param {string} contextId - The document ID to fetch the document.
|
|
81
|
+
* @returns {Observable<UserListModel[]>} Observable that emits the user list data.
|
|
82
|
+
*/
|
|
83
|
+
getUserListByContextId(contextId: string): Observable<UserListModel[]>;
|
|
84
|
+
/**
|
|
85
|
+
* Fetches document status count data by application ID with optional context ID and category parameters.
|
|
86
|
+
* @param {string} applicationId - The application ID to fetch status data.
|
|
87
|
+
* @param {string | null} contextId - The context ID (applicant ID) to filter by. If null, uses applicationId.
|
|
88
|
+
* @param {string | null} categoryId - The category ID to filter by.
|
|
89
|
+
* @returns {Observable<StatusDataModel[]>} Observable that emits the status data.
|
|
90
|
+
*/
|
|
91
|
+
getStatusDocumentCount(applicationId: string, contextId?: string | null, categoryId?: string | null): Observable<StatusDataModel[]>;
|
|
92
|
+
/**
|
|
93
|
+
* Fetches documents based on selection criteria (user ID, status, and search key).
|
|
94
|
+
* This method sends an HTTP GET request with query parameters for the selected filters.
|
|
95
|
+
* Note: Menu item filtering has been removed - menu items are now used for navigation only.
|
|
96
|
+
* @param {string} contextId - The context ID (applicationId or applicantId).
|
|
97
|
+
* @param {string | null} menuItem - Reserved parameter (no longer used for filtering).
|
|
98
|
+
* @param {string | null} userId - The selected user ID filter.
|
|
99
|
+
* @param {string | null} status - The selected status filter.
|
|
100
|
+
* @param {string | null} searchKey - The search key filter.
|
|
101
|
+
* @returns {Observable<any>} An observable that emits the filtered document data.
|
|
102
|
+
*/
|
|
103
|
+
getDocumentsBySelection(contextId: string, menuItem: string | null, userId: string | null, status: string | null, searchKey?: string | null): Observable<any>;
|
|
104
|
+
getDocumentHistory(documentId: string): Observable<DocumentHistorySection[]>;
|
|
105
|
+
/**
|
|
106
|
+
* Fetches document categories by source (Applicant/Application).
|
|
107
|
+
* @param {string} source - The source type (Applicant or Application).
|
|
108
|
+
* @returns {Observable<DocumentCategory[]>} Observable that emits the categories.
|
|
109
|
+
*/
|
|
110
|
+
getCategoriesBySource(source: string): Observable<DocumentCategory[]>;
|
|
111
|
+
/**
|
|
112
|
+
* Fetches document types by category ID.
|
|
113
|
+
* @param {string} categoryId - The category ID to fetch document types for.
|
|
114
|
+
* @returns {Observable<DocumentTypeModel[]>} Observable that emits the document types.
|
|
115
|
+
*/
|
|
116
|
+
getDocumentTypesByCategory(categoryId: string): Observable<DocumentTypeModel[]>;
|
|
117
|
+
/**
|
|
118
|
+
* Uploads a single file using the uploadFile API.
|
|
119
|
+
* @param {FormData} formData - The form data containing the file and metadata.
|
|
120
|
+
* @returns {Observable<any>} Observable that emits the upload response.
|
|
121
|
+
*/
|
|
122
|
+
uploadFile(formData: FormData): Observable<any>;
|
|
123
|
+
/**
|
|
124
|
+
* Saves the complete document upload data.
|
|
125
|
+
* @param {any} payload - The document upload payload containing all necessary data.
|
|
126
|
+
* @returns {Observable<any>} Observable that emits the save response.
|
|
127
|
+
*/
|
|
128
|
+
saveDocumentUpload(payload: any): Observable<any>;
|
|
129
|
+
/**
|
|
130
|
+
* Updates the status of a document by document ID
|
|
131
|
+
* @param {string} documentId - The ID of the document to update
|
|
132
|
+
* @param {string} status - The new status (Approved, Rejected, etc.)
|
|
133
|
+
* @param {string} statusUpdateDescription - The description/note for the status update
|
|
134
|
+
* @returns {Observable<any>} Observable that emits the updated document data with normalized status
|
|
135
|
+
*/
|
|
136
|
+
updateDocumentStatus(documentId: string, status: string, statusUpdateDescription: string): Observable<any>;
|
|
137
|
+
/**
|
|
138
|
+
* Normalizes the status from API response to match component expectations
|
|
139
|
+
* @param {string} status - The status from API response (Approved, Rejected, etc.)
|
|
140
|
+
* @returns {string} Normalized status value
|
|
141
|
+
*/
|
|
142
|
+
private normalizeStatus;
|
|
143
|
+
/**
|
|
144
|
+
* Deletes a document by its ID and refreshes all data (categories, userlist, status, and document list)
|
|
145
|
+
* @param {string} documentId - The ID of the document to delete
|
|
146
|
+
* @param {string} contextId - The context ID to refresh all data
|
|
147
|
+
* @returns {Observable<any>} Observable that emits the delete response
|
|
148
|
+
*/
|
|
149
|
+
deleteDocument(documentId: string, contextId: string): Observable<any>;
|
|
150
|
+
/**
|
|
151
|
+
* Downloads an Excel file with proper authentication headers
|
|
152
|
+
* Authentication is handled automatically by the HTTP interceptor
|
|
153
|
+
* @param {string} documentUrl - The URL of the Excel file to download
|
|
154
|
+
* @returns {Observable<ArrayBuffer>} Observable that emits the file data as ArrayBuffer
|
|
155
|
+
*/
|
|
156
|
+
downloadExcelFile(documentUrl: string): Observable<ArrayBuffer>;
|
|
157
|
+
/**
|
|
158
|
+
* Downloads a CSV file with proper authentication headers
|
|
159
|
+
* Authentication is handled automatically by the HTTP interceptor
|
|
160
|
+
* @param {string} documentUrl - The URL of the CSV file to download
|
|
161
|
+
* @returns {Observable<string>} Observable that emits the file data as string
|
|
162
|
+
*/
|
|
163
|
+
downloadCsvFile(documentUrl: string): Observable<string>;
|
|
164
|
+
/**
|
|
165
|
+
* Downloads an email file (EML) with appropriate handling for different storage types
|
|
166
|
+
* @param documentUrl - URL of the email file
|
|
167
|
+
* @returns Observable of file content as text
|
|
168
|
+
*/
|
|
169
|
+
downloadEmailFile(documentUrl: string): Observable<string>;
|
|
170
|
+
documentRequest(payload: any): Observable<any>;
|
|
171
|
+
/**
|
|
172
|
+
* Checks if valuation report data exists for the given context ID
|
|
173
|
+
* @param {string} contextId - The context ID to check for valuation report data
|
|
174
|
+
* @returns {Observable<any>} Observable that emits the valuation report data or empty object
|
|
175
|
+
*/
|
|
176
|
+
getValuationReportByContextId(contextId: string): Observable<any>;
|
|
177
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHttpService, never>;
|
|
178
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHttpService>;
|
|
179
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { DocumentUploadService } from './document-upload.service';
|
|
3
|
+
import { DocumentHttpService } from './document-http.service';
|
|
4
|
+
import { DocumentQuery } from '../state/document.query';
|
|
5
|
+
import { DocumentStore } from '../state/document.store';
|
|
6
|
+
import { DocumentTableBuilderService } from './document-table-builder.service';
|
|
7
|
+
import { DocumentHelperService } from './document.service';
|
|
8
|
+
import { DocumentListItem, DocumentListResponse } from '../models/document-list-response.model';
|
|
9
|
+
import { TableData } from '../../../Shared/components/table-primary/table-primary.model';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class DocumentListService {
|
|
12
|
+
private documentUploadService;
|
|
13
|
+
private documentHttpService;
|
|
14
|
+
private documentQuery;
|
|
15
|
+
private documentStore;
|
|
16
|
+
private documentTableBuilder;
|
|
17
|
+
private documentHelperService;
|
|
18
|
+
constructor(documentUploadService: DocumentUploadService, documentHttpService: DocumentHttpService, documentQuery: DocumentQuery, documentStore: DocumentStore, documentTableBuilder: DocumentTableBuilderService, documentHelperService: DocumentHelperService);
|
|
19
|
+
/**
|
|
20
|
+
* Handle file upload click event
|
|
21
|
+
*/
|
|
22
|
+
handleFileUploadClick(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Handle save click to update document name
|
|
25
|
+
*/
|
|
26
|
+
handleSaveClick(fileName: string, selectedDocument: DocumentListItem): Observable<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Get completion count for a category
|
|
29
|
+
*/
|
|
30
|
+
getCompletionCount(category: DocumentListResponse): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get pending document count for a category
|
|
33
|
+
*/
|
|
34
|
+
getPendingDocumentCount(category: DocumentListResponse): number;
|
|
35
|
+
/**
|
|
36
|
+
* Get approved document count for a category
|
|
37
|
+
*/
|
|
38
|
+
getApprovedDocumentCount(category: DocumentListResponse): number;
|
|
39
|
+
/**
|
|
40
|
+
* Build document categories from API response
|
|
41
|
+
*/
|
|
42
|
+
buildDocumentCategories(documentListResponse: DocumentListResponse[] | null): {
|
|
43
|
+
documentCategories: DocumentListResponse[];
|
|
44
|
+
categoryTables: TableData[];
|
|
45
|
+
categoryCompletionCounts: string[];
|
|
46
|
+
categorySeverities: ('success' | 'info' | 'warning' | 'danger')[];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Handle table row click
|
|
50
|
+
*/
|
|
51
|
+
handleTableRowClick(rowData: any): DocumentListItem;
|
|
52
|
+
/**
|
|
53
|
+
* Handle delete action
|
|
54
|
+
*/
|
|
55
|
+
handleDeleteAction(rowData: any, contextId: string): Observable<any>;
|
|
56
|
+
/**
|
|
57
|
+
* Refresh document list for new context
|
|
58
|
+
*/
|
|
59
|
+
refreshDocumentListForNewContext(contextId: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* Refresh document list after status update
|
|
62
|
+
*/
|
|
63
|
+
refreshDocumentList(contextId: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Setup subscription to document list response
|
|
66
|
+
*/
|
|
67
|
+
setupDocumentListSubscription(): Observable<DocumentListResponse[] | null>;
|
|
68
|
+
/**
|
|
69
|
+
* Refresh all data with current filters
|
|
70
|
+
*/
|
|
71
|
+
refreshAllDataWithCurrentFilters(contextId: string): void;
|
|
72
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListService, never>;
|
|
73
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentListService>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { DocumentCategory, DocumentCategoryItem } from '../models/document-category.model';
|
|
2
|
+
import { DocumentStore } from '../state/document.store';
|
|
3
|
+
import { DocumentListResponse } from '../models/document-list-response.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DocumentMenuService {
|
|
6
|
+
private documentStore;
|
|
7
|
+
constructor(documentStore: DocumentStore);
|
|
8
|
+
/**
|
|
9
|
+
* Sorts categories alphabetically by label
|
|
10
|
+
* @param categories - The list of document categories to sort
|
|
11
|
+
* @returns Sorted categories array
|
|
12
|
+
*/
|
|
13
|
+
sortCategoriesAlphabetically(categories: DocumentCategory[]): DocumentCategory[];
|
|
14
|
+
/**
|
|
15
|
+
* Sorts menu items within each category alphabetically by label
|
|
16
|
+
* @param categories - The list of document categories to sort
|
|
17
|
+
* @returns Categories with sorted menu items
|
|
18
|
+
*/
|
|
19
|
+
sortMenuItemsAlphabetically(categories: DocumentCategory[]): DocumentCategory[];
|
|
20
|
+
/**
|
|
21
|
+
* Sorts both categories and their menu items alphabetically
|
|
22
|
+
* @param categories - The list of document categories to sort
|
|
23
|
+
* @returns Fully sorted categories array
|
|
24
|
+
*/
|
|
25
|
+
sortCategoriesAndMenuItems(categories: DocumentCategory[]): DocumentCategory[];
|
|
26
|
+
/**
|
|
27
|
+
* Gets the category name for a given menu item _id
|
|
28
|
+
* @param menuItemId - The _id of the menu item
|
|
29
|
+
* @param categories - The list of document categories
|
|
30
|
+
* @returns The category name or null if not found
|
|
31
|
+
*/
|
|
32
|
+
getMenuItemCategory(menuItemId: string, categories: DocumentCategory[]): string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Gets the menu item by its _id
|
|
35
|
+
* @param menuItemId - The _id of the menu item
|
|
36
|
+
* @param categories - The list of document categories
|
|
37
|
+
* @returns The menu item or null if not found
|
|
38
|
+
*/
|
|
39
|
+
getMenuItemById(menuItemId: string, categories: DocumentCategory[]): DocumentCategoryItem | null;
|
|
40
|
+
/**
|
|
41
|
+
* Handles user list visibility based on menu item category
|
|
42
|
+
* @param menuItemId - The _id of the menu item
|
|
43
|
+
* @param categories - The list of document categories
|
|
44
|
+
*/
|
|
45
|
+
handleUserListVisibility(menuItemId: string, categories: DocumentCategory[]): void;
|
|
46
|
+
/**
|
|
47
|
+
* Calculates total documents for a menu item
|
|
48
|
+
* @param item - The menu item
|
|
49
|
+
* @returns Total number of documents
|
|
50
|
+
*/
|
|
51
|
+
getTotalDocuments(item: DocumentCategoryItem): number;
|
|
52
|
+
/**
|
|
53
|
+
* Gets badge value for a menu item
|
|
54
|
+
* @param item - The menu item
|
|
55
|
+
* @returns Badge value string (e.g., "2/3")
|
|
56
|
+
*/
|
|
57
|
+
getBadgeValue(item: DocumentCategoryItem): string;
|
|
58
|
+
/**
|
|
59
|
+
* Gets badge severity based on status
|
|
60
|
+
* @param item - The menu item
|
|
61
|
+
* @returns Badge severity for PrimeNG
|
|
62
|
+
*/
|
|
63
|
+
getBadgeSeverity(item: DocumentCategoryItem): 'success' | 'info' | 'warning' | 'danger';
|
|
64
|
+
/**
|
|
65
|
+
* Checks if badge should be shown for a menu item
|
|
66
|
+
* @param item - The menu item
|
|
67
|
+
* @returns True if badge should be shown
|
|
68
|
+
*/
|
|
69
|
+
shouldShowBadge(item: DocumentCategoryItem): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Calculates approved documents for a menu item
|
|
72
|
+
* @param item - The menu item
|
|
73
|
+
* @returns Number of approved documents
|
|
74
|
+
*/
|
|
75
|
+
getApprovedDocuments(item: DocumentCategoryItem): number;
|
|
76
|
+
/**
|
|
77
|
+
* Checks if a menu item's section is visible in the filtered document list
|
|
78
|
+
* @param menuItemId - The ID of the menu item to check
|
|
79
|
+
* @param documentListResponse - The filtered document list response
|
|
80
|
+
* @returns True if the section is visible, false otherwise
|
|
81
|
+
*/
|
|
82
|
+
isMenuItemSectionVisible(menuItemId: string, documentListResponse: DocumentListResponse[] | null, menuItemLabel?: string): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Performs smart partial matching to prevent substring conflicts
|
|
85
|
+
* @param menuLabel - The menu item label to match
|
|
86
|
+
* @param categoryLabel - The category label to match against
|
|
87
|
+
* @returns True if it's a valid partial match, false otherwise
|
|
88
|
+
*/
|
|
89
|
+
private isSmartPartialMatch;
|
|
90
|
+
/**
|
|
91
|
+
* Deselects a menu item if its section is not visible in the filtered document list
|
|
92
|
+
* @param menuItemId - The ID of the menu item to check
|
|
93
|
+
* @param documentListResponse - The filtered document list response
|
|
94
|
+
* @param menuItemLabel - The label of the menu item (optional)
|
|
95
|
+
* @returns True if the menu item was deselected, false otherwise
|
|
96
|
+
*/
|
|
97
|
+
deselectMenuItemIfSectionNotVisible(menuItemId: string, documentListResponse: DocumentListResponse[] | null, menuItemLabel?: string): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Checks if a menu item should be selectable based on the filtered document list
|
|
100
|
+
* @param menuItemId - The ID of the menu item to check
|
|
101
|
+
* @param documentListResponse - The filtered document list response
|
|
102
|
+
* @param menuItemLabel - The label of the menu item (optional)
|
|
103
|
+
* @returns True if the menu item should be selectable, false otherwise
|
|
104
|
+
*/
|
|
105
|
+
isMenuItemSelectable(menuItemId: string, documentListResponse: DocumentListResponse[] | null, menuItemLabel?: string): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Gets the selectability status for all menu items in categories
|
|
108
|
+
* @param categories - The document categories containing menu items
|
|
109
|
+
* @param documentListResponse - The filtered document list response
|
|
110
|
+
* @returns Map of menu item IDs to their selectability status
|
|
111
|
+
*/
|
|
112
|
+
getMenuItemsSelectabilityStatus(categories: DocumentCategory[], documentListResponse: DocumentListResponse[] | null): Map<string, boolean>;
|
|
113
|
+
/**
|
|
114
|
+
* Updates menu items with selectability status
|
|
115
|
+
* @param categories - The document categories containing menu items
|
|
116
|
+
* @param documentListResponse - The filtered document list response
|
|
117
|
+
* @returns Updated categories with selectability information
|
|
118
|
+
*/
|
|
119
|
+
updateMenuItemsWithSelectabilityStatus(categories: DocumentCategory[], documentListResponse: DocumentListResponse[] | null): DocumentCategory[];
|
|
120
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentMenuService, never>;
|
|
121
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentMenuService>;
|
|
122
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { DocumentStore } from '../state/document.store';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface ScrollTarget {
|
|
5
|
+
element: Element;
|
|
6
|
+
menuItemId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class DocumentScrollService implements OnDestroy {
|
|
9
|
+
private documentStore;
|
|
10
|
+
private sectionObserver;
|
|
11
|
+
private currentObservedSection;
|
|
12
|
+
private isScrolling;
|
|
13
|
+
private scrollHandler;
|
|
14
|
+
private scrollTimeout;
|
|
15
|
+
constructor(documentStore: DocumentStore);
|
|
16
|
+
/**
|
|
17
|
+
* Sets up scroll event listeners to track scrolling state
|
|
18
|
+
* @param containerElement - The container element to monitor for scroll events
|
|
19
|
+
*/
|
|
20
|
+
setupScrollListeners(containerElement: HTMLElement): void;
|
|
21
|
+
/**
|
|
22
|
+
* Sets up intersection observer to detect when the selected section scrolls out of view
|
|
23
|
+
* @param sectionElement - The section element to observe
|
|
24
|
+
* @param menuItemId - The ID of the selected menu item
|
|
25
|
+
*/
|
|
26
|
+
setupSectionObserver(sectionElement: Element, menuItemId: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Disconnects the section observer
|
|
29
|
+
*/
|
|
30
|
+
disconnectSectionObserver(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Sets the scrolling flag to true (called when starting a scroll operation)
|
|
33
|
+
*/
|
|
34
|
+
setScrolling(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Resets the scrolling flag after a specified delay
|
|
37
|
+
* @param delay - Delay in milliseconds before resetting the flag
|
|
38
|
+
*/
|
|
39
|
+
resetScrollingAfterDelay(delay?: number): void;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the current scrolling state
|
|
42
|
+
*/
|
|
43
|
+
get isCurrentlyScrolling(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Cleans up all resources
|
|
46
|
+
*/
|
|
47
|
+
ngOnDestroy(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Removes scroll event listeners
|
|
50
|
+
* @param containerElement - The container element to remove listeners from
|
|
51
|
+
*/
|
|
52
|
+
cleanupScrollListeners(containerElement?: HTMLElement): void;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentScrollService, never>;
|
|
54
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentScrollService>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DocumentListResponse, DocumentListItem } from '../models/document-list-response.model';
|
|
2
|
+
import { TableData } from '../../../Shared/components/table-primary/table-primary.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DocumentTableBuilderService {
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* Builds a single table from document list items
|
|
8
|
+
* @param documents Array of document list items
|
|
9
|
+
* @returns TableData object
|
|
10
|
+
*/
|
|
11
|
+
buildDocumentTable(documents: DocumentListItem[]): TableData;
|
|
12
|
+
/**
|
|
13
|
+
* Gets completion count for a category
|
|
14
|
+
* @param category Document category
|
|
15
|
+
* @returns Completion string (e.g., "2/4")
|
|
16
|
+
*/
|
|
17
|
+
getCompletionCount(category: DocumentListResponse): string;
|
|
18
|
+
/**
|
|
19
|
+
* Gets pending document count for a category
|
|
20
|
+
* @param category Document category
|
|
21
|
+
* @returns Number of pending documents
|
|
22
|
+
*/
|
|
23
|
+
getPendingDocumentCount(category: DocumentListResponse): number;
|
|
24
|
+
/**
|
|
25
|
+
* Gets approved document count for a category
|
|
26
|
+
* @param category Document category
|
|
27
|
+
* @returns Number of approved documents
|
|
28
|
+
*/
|
|
29
|
+
getApprovedDocumentCount(category: DocumentListResponse): number;
|
|
30
|
+
/**
|
|
31
|
+
* Transforms document model to document list item
|
|
32
|
+
* @param documents Array of DocumentModel
|
|
33
|
+
* @returns Array of DocumentListItem
|
|
34
|
+
*/
|
|
35
|
+
transformDocumentModelToListItem(documents: any[]): DocumentListItem[];
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentTableBuilderService, never>;
|
|
37
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentTableBuilderService>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { DocumentHttpService } from './document-http.service';
|
|
3
|
+
import { FileFormatService } from './file-format.service';
|
|
4
|
+
import { UserListModel } from '../models/user-list.model';
|
|
5
|
+
import { DocumentCategory } from '../models/document-category.model';
|
|
6
|
+
import { DocumentTypeModel } from '../models/document-type.model';
|
|
7
|
+
import { UploadedFileResponse } from '../models/uploaded-file-response.model';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export interface UploadedFile {
|
|
10
|
+
file: File;
|
|
11
|
+
formattedSize?: string;
|
|
12
|
+
progress?: number;
|
|
13
|
+
uploadResponse?: UploadedFileResponse;
|
|
14
|
+
url?: string;
|
|
15
|
+
contentType?: string;
|
|
16
|
+
fileName?: string;
|
|
17
|
+
size?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface DocumentUploadPayload {
|
|
20
|
+
source: 'Applicant' | 'Application';
|
|
21
|
+
categoryId: string;
|
|
22
|
+
documentTypeId: string;
|
|
23
|
+
applicantId?: string;
|
|
24
|
+
contextId: string;
|
|
25
|
+
documents: {
|
|
26
|
+
fileName: string;
|
|
27
|
+
fileSize: number;
|
|
28
|
+
uploadedFileId?: string;
|
|
29
|
+
url?: string;
|
|
30
|
+
contentType?: string;
|
|
31
|
+
size?: string;
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
34
|
+
export declare class DocumentUploadBusinessService {
|
|
35
|
+
private documentHttpService;
|
|
36
|
+
private fileFormatService;
|
|
37
|
+
private destroy$;
|
|
38
|
+
constructor(documentHttpService: DocumentHttpService, fileFormatService: FileFormatService);
|
|
39
|
+
/**
|
|
40
|
+
* Loads applicants for a given context ID
|
|
41
|
+
*/
|
|
42
|
+
loadApplicants(contextId: string): Observable<UserListModel[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Loads categories based on assignment type
|
|
45
|
+
*/
|
|
46
|
+
loadCategories(assignmentType: string): Observable<DocumentCategory[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Loads document types based on category
|
|
49
|
+
*/
|
|
50
|
+
loadDocumentTypes(categoryId: string): Observable<DocumentTypeModel[]>;
|
|
51
|
+
/**
|
|
52
|
+
* Filters applicants based on assignment type
|
|
53
|
+
*/
|
|
54
|
+
filterApplicants(applicantList: UserListModel[], assignmentType: 'Applicant' | 'Application'): UserListModel[];
|
|
55
|
+
/**
|
|
56
|
+
* Helper method to validate form data and return validation result
|
|
57
|
+
*/
|
|
58
|
+
private validateFormData;
|
|
59
|
+
/**
|
|
60
|
+
* Validates form data
|
|
61
|
+
*/
|
|
62
|
+
validateForm(assignmentType: 'Applicant' | 'Application' | null, selectedCategory: string, selectedDocumentType: string, selectedApplicant: string, uploadedFiles: UploadedFile[], categoryOptions: DocumentCategory[], documentTypeOptions: DocumentTypeModel[]): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Checks if save button should be disabled
|
|
65
|
+
*/
|
|
66
|
+
isSaveButtonDisabled(assignmentType: 'Applicant' | 'Application' | null, selectedCategory: string, selectedDocumentType: string, selectedApplicant: string, uploadedFiles: UploadedFile[], isSaving: boolean): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Validates the complete payload before save
|
|
69
|
+
*/
|
|
70
|
+
validatePayload(assignmentType: 'Applicant' | 'Application' | null, selectedCategory: string, selectedDocumentType: string, selectedApplicant: string, uploadedFiles: UploadedFile[]): {
|
|
71
|
+
isValid: boolean;
|
|
72
|
+
message: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Prepares upload payload
|
|
76
|
+
*/
|
|
77
|
+
prepareUploadPayload(assignmentType: 'Applicant' | 'Application', selectedCategory: string, selectedDocumentType: string, selectedApplicant: string, uploadedFiles: UploadedFile[], contextId: string): DocumentUploadPayload;
|
|
78
|
+
/**
|
|
79
|
+
* Saves document upload
|
|
80
|
+
*/
|
|
81
|
+
saveDocumentUpload(payload: DocumentUploadPayload): Observable<any>;
|
|
82
|
+
/**
|
|
83
|
+
* Formats file size
|
|
84
|
+
*/
|
|
85
|
+
formatFileSize(fileSize: number, config: any): string;
|
|
86
|
+
/**
|
|
87
|
+
* Creates uploaded file object
|
|
88
|
+
*/
|
|
89
|
+
createUploadedFile(file: File, formattedSize: string): UploadedFile;
|
|
90
|
+
/**
|
|
91
|
+
* Resets form data to initial state
|
|
92
|
+
*/
|
|
93
|
+
getInitialFormState(): {
|
|
94
|
+
selectedAssignmentType: null;
|
|
95
|
+
selectedApplicant: null;
|
|
96
|
+
selectedCategory: null;
|
|
97
|
+
selectedDocumentType: null;
|
|
98
|
+
uploadedFiles: UploadedFile[];
|
|
99
|
+
isFormValid: boolean;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Destroys the service
|
|
103
|
+
*/
|
|
104
|
+
destroy(): void;
|
|
105
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadBusinessService, never>;
|
|
106
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentUploadBusinessService>;
|
|
107
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { DocumentUploadBusinessService } from './document-upload-business.service';
|
|
3
|
+
import { DocumentUploadFormService } from './document-upload-form.service';
|
|
4
|
+
import { UserListModel } from '../models/user-list.model';
|
|
5
|
+
import { DocumentCategory } from '../models/document-category.model';
|
|
6
|
+
import { DocumentTypeModel } from '../models/document-type.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export interface DataLoadingState {
|
|
9
|
+
isLoadingApplicants: boolean;
|
|
10
|
+
isLoadingCategories: boolean;
|
|
11
|
+
isLoadingDocumentTypes: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class DocumentUploadDataService {
|
|
14
|
+
private businessService;
|
|
15
|
+
private formService;
|
|
16
|
+
private destroy$;
|
|
17
|
+
constructor(businessService: DocumentUploadBusinessService, formService: DocumentUploadFormService);
|
|
18
|
+
/**
|
|
19
|
+
* Loads applicants and handles the response
|
|
20
|
+
*/
|
|
21
|
+
loadApplicants(contextId: string, onSuccess: (applicants: UserListModel[]) => void, onError: (error: any) => void): Observable<UserListModel[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Loads categories and handles the response
|
|
24
|
+
*/
|
|
25
|
+
loadCategories(assignmentType: string, onSuccess: (categories: DocumentCategory[]) => void, onError: (error: any) => void): Observable<DocumentCategory[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Loads document types and handles the response
|
|
28
|
+
*/
|
|
29
|
+
loadDocumentTypes(categoryId: string, onSuccess: (documentTypes: DocumentTypeModel[]) => void, onError: (error: any) => void): Observable<DocumentTypeModel[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Handles applicants loaded successfully
|
|
32
|
+
*/
|
|
33
|
+
handleApplicantsLoaded(applicants: UserListModel[], assignmentType: 'Applicant' | 'Application' | null): UserListModel[];
|
|
34
|
+
/**
|
|
35
|
+
* Destroys the service
|
|
36
|
+
*/
|
|
37
|
+
destroy(): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadDataService, never>;
|
|
39
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentUploadDataService>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { MessageService } from 'primeng/api';
|
|
2
|
+
import { UploadedFile } from './document-upload-business.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DocumentUploadFormService {
|
|
5
|
+
private messageService;
|
|
6
|
+
constructor(messageService: MessageService);
|
|
7
|
+
/**
|
|
8
|
+
* Shows error message
|
|
9
|
+
*/
|
|
10
|
+
showErrorMessage(summary: string, detail: string): void;
|
|
11
|
+
/**
|
|
12
|
+
* Shows warning message
|
|
13
|
+
*/
|
|
14
|
+
showWarningMessage(summary: string, detail: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Shows success message
|
|
17
|
+
*/
|
|
18
|
+
showSuccessMessage(summary: string, detail: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Helper method to validate required fields and show appropriate messages
|
|
21
|
+
*/
|
|
22
|
+
private validateRequiredFieldsWithMessages;
|
|
23
|
+
/**
|
|
24
|
+
* Validates required fields for upload
|
|
25
|
+
*/
|
|
26
|
+
validateRequiredFields(assignmentType: 'Applicant' | 'Application' | null, selectedApplicant: string, selectedCategory: string, selectedDocumentType: string, uploadedFiles: UploadedFile[]): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Shows appropriate validation message based on the field that failed
|
|
29
|
+
*/
|
|
30
|
+
private showValidationMessage;
|
|
31
|
+
/**
|
|
32
|
+
* Validates form completeness
|
|
33
|
+
*/
|
|
34
|
+
validateFormCompleteness(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Validates context ID presence
|
|
37
|
+
*/
|
|
38
|
+
validateContextId(contextId: string, message: string): boolean;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadFormService, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentUploadFormService>;
|
|
41
|
+
}
|