cat-documents-ng 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Shared/constant/URLS.d.ts +13 -0
- package/fesm2022/cat-documents-ng.mjs +69 -41
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-container/document-container.component.d.ts +5 -4
- package/lib/document/components/folder-block/folder-block.component.d.ts +2 -2
- package/lib/document/components/folder-container/folder-container.component.d.ts +2 -12
- package/lib/document/models/document-type.model.d.ts +18 -55
- package/lib/document/models/document.model.d.ts +5 -0
- package/lib/document/models/folder.model.d.ts +3 -3
- package/lib/document/services/document-http.service.d.ts +17 -8
- package/lib/document/state/document.state.d.ts +2 -0
- package/lib/document/state/document.store.d.ts +1 -0
- package/package.json +1 -1
|
@@ -32,6 +32,12 @@ export declare class URLS {
|
|
|
32
32
|
* @type {string}
|
|
33
33
|
*/
|
|
34
34
|
static DOCUMENT_TYPES: string;
|
|
35
|
+
/**
|
|
36
|
+
* The query parameter to pass a context ID in API requests.
|
|
37
|
+
* @static
|
|
38
|
+
* @type {string}
|
|
39
|
+
*/
|
|
40
|
+
static FOLDERS: string;
|
|
35
41
|
/**
|
|
36
42
|
* The query parameter to pass a document ID in API requests.
|
|
37
43
|
* @static
|
|
@@ -44,4 +50,11 @@ export declare class URLS {
|
|
|
44
50
|
* @type {string}
|
|
45
51
|
*/
|
|
46
52
|
static PARENT_DOCUMENT_TYPE_ID: string;
|
|
53
|
+
/**
|
|
54
|
+
* The query parameter to pass a context ID in API requests.
|
|
55
|
+
* Used to specify the context for certain API calls, such as filtering or scoping the request.
|
|
56
|
+
* @static
|
|
57
|
+
* @type {string}
|
|
58
|
+
*/
|
|
59
|
+
static CONTEXT_ID: string;
|
|
47
60
|
}
|
|
@@ -379,6 +379,12 @@ class URLS {
|
|
|
379
379
|
* @type {string}
|
|
380
380
|
*/
|
|
381
381
|
static DOCUMENT_TYPES = "documentTypes";
|
|
382
|
+
/**
|
|
383
|
+
* The query parameter to pass a context ID in API requests.
|
|
384
|
+
* @static
|
|
385
|
+
* @type {string}
|
|
386
|
+
*/
|
|
387
|
+
static FOLDERS = "/folders?contextId=";
|
|
382
388
|
/**
|
|
383
389
|
* The query parameter to pass a document ID in API requests.
|
|
384
390
|
* @static
|
|
@@ -391,6 +397,13 @@ class URLS {
|
|
|
391
397
|
* @type {string}
|
|
392
398
|
*/
|
|
393
399
|
static PARENT_DOCUMENT_TYPE_ID = "parentDocumentType?parentDocumentTypeId=";
|
|
400
|
+
/**
|
|
401
|
+
* The query parameter to pass a context ID in API requests.
|
|
402
|
+
* Used to specify the context for certain API calls, such as filtering or scoping the request.
|
|
403
|
+
* @static
|
|
404
|
+
* @type {string}
|
|
405
|
+
*/
|
|
406
|
+
static CONTEXT_ID = "&contextId=";
|
|
394
407
|
}
|
|
395
408
|
|
|
396
409
|
/**
|
|
@@ -408,7 +421,8 @@ function createInitialState() {
|
|
|
408
421
|
dropdownOptions: [],
|
|
409
422
|
uploadedDocumentFiles: [],
|
|
410
423
|
parentDocumentTypeId: null,
|
|
411
|
-
documentAlert: { _id: '' }
|
|
424
|
+
documentAlert: { _id: '' },
|
|
425
|
+
folders: []
|
|
412
426
|
};
|
|
413
427
|
}
|
|
414
428
|
|
|
@@ -429,6 +443,9 @@ let DocumentStore = class DocumentStore extends EntityStore {
|
|
|
429
443
|
setUploadedDocumentFiles(files) {
|
|
430
444
|
this.update({ uploadedDocumentFiles: files });
|
|
431
445
|
}
|
|
446
|
+
setFolders(folders) {
|
|
447
|
+
this.update({ folders: folders });
|
|
448
|
+
}
|
|
432
449
|
setDocumentTypes(documentType) {
|
|
433
450
|
this.update({ uploadedDocumentFiles: documentType });
|
|
434
451
|
}
|
|
@@ -492,7 +509,7 @@ class AppConfigService {
|
|
|
492
509
|
* @type {*}
|
|
493
510
|
*/
|
|
494
511
|
get apiBaseUrl() {
|
|
495
|
-
return this.appConfig?.
|
|
512
|
+
return this.appConfig?.documentApiUrl;
|
|
496
513
|
}
|
|
497
514
|
/**
|
|
498
515
|
* Returns the local server API URL from the loaded configuration.
|
|
@@ -662,6 +679,19 @@ class DocumentHttpService {
|
|
|
662
679
|
get apiUrl() {
|
|
663
680
|
return this.appConfigService.apiBaseUrl;
|
|
664
681
|
}
|
|
682
|
+
/**
|
|
683
|
+
* Fetches a document by its path name and transforms the response for dropdown options.
|
|
684
|
+
* Includes error handling for failed API requests.
|
|
685
|
+
* @param {string} contextId - The context ID to fetch the document.
|
|
686
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
687
|
+
*/
|
|
688
|
+
getFoldersData(contextId) {
|
|
689
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}${URLS.FOLDERS}${contextId}`).pipe(tap((folders) => {
|
|
690
|
+
this.documentStore.setFolders(folders);
|
|
691
|
+
}), catchError((error) => {
|
|
692
|
+
return throwError(() => new Error(error));
|
|
693
|
+
}));
|
|
694
|
+
}
|
|
665
695
|
/**
|
|
666
696
|
* Fetches a document by its path name and transforms the response for dropdown options.
|
|
667
697
|
* Includes error handling for failed API requests.
|
|
@@ -675,10 +705,10 @@ class DocumentHttpService {
|
|
|
675
705
|
}));
|
|
676
706
|
}
|
|
677
707
|
/**
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
708
|
+
* Fetches a document by its path name and transforms the response for dropdown options.
|
|
709
|
+
* @param {string} documentId - The document ID to fetch the document.
|
|
710
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
711
|
+
*/
|
|
682
712
|
getAlertsByDocumentID(documentId) {
|
|
683
713
|
return this.http.get(`${this.apiUrl}${URLS.ALERT_BY_DOCUMENT_ID}${documentId}`).pipe(tap((documentAlert) => {
|
|
684
714
|
this.documentStore.setDocumentAlert(documentAlert);
|
|
@@ -688,11 +718,12 @@ class DocumentHttpService {
|
|
|
688
718
|
}
|
|
689
719
|
/**
|
|
690
720
|
* Fetches a document by its folder ID and transforms the response for dropdown options.
|
|
691
|
-
* @param folderId - The folder ID to fetch the document.
|
|
692
|
-
* @
|
|
721
|
+
* @param {string} folderId - The folder ID to fetch the document.
|
|
722
|
+
* @param {string} contextId - The context ID to fetch the document.
|
|
723
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
693
724
|
*/
|
|
694
|
-
getDocumentByFolderID(folderId) {
|
|
695
|
-
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}`).pipe(tap((records) => {
|
|
725
|
+
getDocumentByFolderID(folderId, contextId) {
|
|
726
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`).pipe(tap((records) => {
|
|
696
727
|
this.documentStore.set(records);
|
|
697
728
|
}), catchError((error) => {
|
|
698
729
|
return throwError(() => new Error(error));
|
|
@@ -748,11 +779,11 @@ class FolderBlockComponent {
|
|
|
748
779
|
return folderBlockId;
|
|
749
780
|
}
|
|
750
781
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FolderBlockComponent, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
751
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FolderBlockComponent, isStandalone: false, selector: "lib-folder-block", inputs: { folderList: "folderList" }, ngImport: i0, template: "<div class=\"card folder-info my-4\">\r\n <div class=\"text-900 text-xl font-semibold mb-3\">Folders</div>\r\n <div class=\"grid\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between
|
|
782
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FolderBlockComponent, isStandalone: false, selector: "lib-folder-block", inputs: { folderList: "folderList" }, ngImport: i0, template: "<div class=\"card folder-info my-4\">\r\n <div class=\"text-900 text-xl font-semibold mb-3\">Folders</div>\r\n <div class=\"grid\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between hover:surface-100 cursor-pointer border-round\"\r\n (click)=\"handleClickForFilter(folder._id)\"\r\n >\r\n <div class=\"icon\">\r\n <img src=\"../../../../assets/images/FolderImg.png\" alt=\"\" />\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span class=\"text-600 mt-2\"> {{ folder.documentCount }} Files </span>\r\n <span class=\"text-900 text-lg mt-2 mb-2 font-semibold font-medium\">\r\n {{ folder.folderName }}\r\n </span>\r\n </div>\r\n <hr />\r\n <div class=\"flex justify-content-between\">\r\n <div class=\"flex flex-column\">\r\n <span>Missing</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-pink-500': missingFileCount > 0,\r\n 'text-green-500': missingFileCount === 0\r\n }\"\r\n >\r\n {{ missingFileCount }}\r\n </span>\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span>Pending</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-yellow-500': pendingFileCount > 0,\r\n 'text-green-500': pendingFileCount === 0\r\n }\"\r\n >\r\n {{ pendingFileCount }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
752
783
|
}
|
|
753
784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FolderBlockComponent, decorators: [{
|
|
754
785
|
type: Component,
|
|
755
|
-
args: [{ selector: 'lib-folder-block', standalone: false, template: "<div class=\"card folder-info my-4\">\r\n <div class=\"text-900 text-xl font-semibold mb-3\">Folders</div>\r\n <div class=\"grid\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between
|
|
786
|
+
args: [{ selector: 'lib-folder-block', standalone: false, template: "<div class=\"card folder-info my-4\">\r\n <div class=\"text-900 text-xl font-semibold mb-3\">Folders</div>\r\n <div class=\"grid\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between hover:surface-100 cursor-pointer border-round\"\r\n (click)=\"handleClickForFilter(folder._id)\"\r\n >\r\n <div class=\"icon\">\r\n <img src=\"../../../../assets/images/FolderImg.png\" alt=\"\" />\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span class=\"text-600 mt-2\"> {{ folder.documentCount }} Files </span>\r\n <span class=\"text-900 text-lg mt-2 mb-2 font-semibold font-medium\">\r\n {{ folder.folderName }}\r\n </span>\r\n </div>\r\n <hr />\r\n <div class=\"flex justify-content-between\">\r\n <div class=\"flex flex-column\">\r\n <span>Missing</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-pink-500': missingFileCount > 0,\r\n 'text-green-500': missingFileCount === 0\r\n }\"\r\n >\r\n {{ missingFileCount }}\r\n </span>\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span>Pending</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-yellow-500': pendingFileCount > 0,\r\n 'text-green-500': pendingFileCount === 0\r\n }\"\r\n >\r\n {{ pendingFileCount }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
756
787
|
}], ctorParameters: () => [{ type: DocumentStore }], propDecorators: { folderList: [{
|
|
757
788
|
type: Input
|
|
758
789
|
}] } });
|
|
@@ -780,10 +811,6 @@ class FolderContainerComponent {
|
|
|
780
811
|
* @type {string}
|
|
781
812
|
*/
|
|
782
813
|
contextId = SHARED.EMPTY;
|
|
783
|
-
/**
|
|
784
|
-
* Folder blocks data, sourced from the `SHARED` constants.
|
|
785
|
-
*/
|
|
786
|
-
folderBlocks = FOLDERPANEL;
|
|
787
814
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FolderContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
788
815
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FolderContainerComponent, isStandalone: false, selector: "lib-folder-container", inputs: { documentList: "documentList", folderList: "folderList", contextId: "contextId" }, ngImport: i0, template: "\r\n<lib-folder-block [folderList]=\"folderList\"></lib-folder-block>", styles: [""], dependencies: [{ kind: "component", type: FolderBlockComponent, selector: "lib-folder-block", inputs: ["folderList"] }] });
|
|
789
816
|
}
|
|
@@ -952,11 +979,11 @@ class DocumentListItemComponent {
|
|
|
952
979
|
this.documentClick.emit(document);
|
|
953
980
|
}
|
|
954
981
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
955
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentListItemComponent, isStandalone: false, selector: "lib-document-list-item", inputs: { document: "document" }, outputs: { documentClick: "documentClick" }, ngImport: i0, template: "<div class=\"grid\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-6 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1 \"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === '
|
|
982
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentListItemComponent, isStandalone: false, selector: "lib-document-list-item", inputs: { document: "document" }, outputs: { documentClick: "documentClick" }, ngImport: i0, template: "<div class=\"grid\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-6 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"document-type\">\r\n {{document.documentTypeName}}\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1 \"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
956
983
|
}
|
|
957
984
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListItemComponent, decorators: [{
|
|
958
985
|
type: Component,
|
|
959
|
-
args: [{ selector: 'lib-document-list-item', standalone: false, template: "<div class=\"grid\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-6 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1 \"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === '
|
|
986
|
+
args: [{ selector: 'lib-document-list-item', standalone: false, template: "<div class=\"grid\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-6 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"document-type\">\r\n {{document.documentTypeName}}\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1 \"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}\n"] }]
|
|
960
987
|
}], propDecorators: { documentClick: [{
|
|
961
988
|
type: Output
|
|
962
989
|
}], document: [{
|
|
@@ -1376,13 +1403,13 @@ class DocumentListComponent {
|
|
|
1376
1403
|
getDocumentTypeList() {
|
|
1377
1404
|
this.documentHttpService.getDocumentTypes().subscribe({
|
|
1378
1405
|
/**
|
|
1379
|
-
*
|
|
1380
|
-
* @param documentTypes - The list of document types returned by the
|
|
1406
|
+
* Handles the successful API response.
|
|
1407
|
+
* @param {DocumentTypeModel[]} documentTypes - The list of document types returned by the API.
|
|
1381
1408
|
*/
|
|
1382
1409
|
next: (documentTypes) => {
|
|
1383
|
-
if (documentTypes
|
|
1384
|
-
this.options = documentTypes.
|
|
1385
|
-
label: doc.
|
|
1410
|
+
if (documentTypes) {
|
|
1411
|
+
this.options = documentTypes.map((doc) => ({
|
|
1412
|
+
label: doc.label,
|
|
1386
1413
|
value: doc._id
|
|
1387
1414
|
}));
|
|
1388
1415
|
}
|
|
@@ -1392,7 +1419,7 @@ class DocumentListComponent {
|
|
|
1392
1419
|
},
|
|
1393
1420
|
/**
|
|
1394
1421
|
* Handles errors if the request fails.
|
|
1395
|
-
* @param err - The error object returned by the server.
|
|
1422
|
+
* @param {any} err - The error object returned by the server.
|
|
1396
1423
|
*/
|
|
1397
1424
|
error: (err) => {
|
|
1398
1425
|
console.error(ERRORS.ERROR_DOCUMENT_TYPES, err);
|
|
@@ -1400,11 +1427,11 @@ class DocumentListComponent {
|
|
|
1400
1427
|
});
|
|
1401
1428
|
}
|
|
1402
1429
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentUploadService }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1403
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentList: "documentList" }, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModel()\" [style]=\"{ width: '100vw' }\"\r\n [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\"></document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 document-list-wrapper\">\r\n <p-accordion>\r\n <p-accordionTab [selected]=\"true\" class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2\">\r\n Documents\r\n </span>\r\n <button pButton pRipple class=\"p-button-raised\" type=\"button\" label=\"Upload File\"\r\n style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <p-sidebar
|
|
1430
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentList: "documentList" }, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModel()\" [style]=\"{ width: '100vw' }\"\r\n [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\"></document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 document-list-wrapper\">\r\n <p-accordion>\r\n <p-accordionTab [selected]=\"true\" class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2\">\r\n Documents\r\n </span>\r\n <button pButton pRipple class=\"p-button-raised\" type=\"button\" label=\"Upload File\"\r\n style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative sidebar-panel-wrapper\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"username\">Document Name</label>\r\n <input type=\"text\" pInputText [(ngModel)]=\"documentName\" placeholder=\"Proof of Identity\" />\r\n </div>\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}::ng-deep .custom-sidebar-overlay{z-index:0!important}::ng-deep .sidebar-panel-wrapper .p-sidebar-header{padding:1.4rem 1rem}::ng-deep .sidebar-panel-wrapper .p-sidebar-content{padding:0}::ng-deep .sidebar-panel-wrapper .p-sidebar-right{width:35%!important}::ng-deep .sidebar-devider .p-divider{margin:0}::ng-deep .p-component-overlay{background-color:#f4f4f7!important}\n"], dependencies: [{ kind: "component", type: i3$1.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i3$1.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i5.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: i6$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i7$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i7$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: i7$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i10.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"] }, { kind: "directive", type: i11.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: DocumentListItemComponent, selector: "lib-document-list-item", inputs: ["document"], outputs: ["documentClick"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1404
1431
|
}
|
|
1405
1432
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListComponent, decorators: [{
|
|
1406
1433
|
type: Component,
|
|
1407
|
-
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModel()\" [style]=\"{ width: '100vw' }\"\r\n [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\"></document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 document-list-wrapper\">\r\n <p-accordion>\r\n <p-accordionTab [selected]=\"true\" class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2\">\r\n Documents\r\n </span>\r\n <button pButton pRipple class=\"p-button-raised\" type=\"button\" label=\"Upload File\"\r\n style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <p-sidebar
|
|
1434
|
+
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModel()\" [style]=\"{ width: '100vw' }\"\r\n [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\"></document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 document-list-wrapper\">\r\n <p-accordion>\r\n <p-accordionTab [selected]=\"true\" class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2\">\r\n Documents\r\n </span>\r\n <button pButton pRipple class=\"p-button-raised\" type=\"button\" label=\"Upload File\"\r\n style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative sidebar-panel-wrapper\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"username\">Document Name</label>\r\n <input type=\"text\" pInputText [(ngModel)]=\"documentName\" placeholder=\"Proof of Identity\" />\r\n </div>\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}::ng-deep .custom-sidebar-overlay{z-index:0!important}::ng-deep .sidebar-panel-wrapper .p-sidebar-header{padding:1.4rem 1rem}::ng-deep .sidebar-panel-wrapper .p-sidebar-content{padding:0}::ng-deep .sidebar-panel-wrapper .p-sidebar-right{width:35%!important}::ng-deep .sidebar-devider .p-divider{margin:0}::ng-deep .p-component-overlay{background-color:#f4f4f7!important}\n"] }]
|
|
1408
1435
|
}], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }], propDecorators: { contextId: [{
|
|
1409
1436
|
type: Input
|
|
1410
1437
|
}], documentList: [{
|
|
@@ -1422,8 +1449,9 @@ class DocumentContainerComponent {
|
|
|
1422
1449
|
documentHttpService;
|
|
1423
1450
|
/**
|
|
1424
1451
|
* Creates an instance of DocumentContainerComponent.
|
|
1425
|
-
* @class
|
|
1426
1452
|
* @param {DocumentService} documentService - Service to manage document-related operations.
|
|
1453
|
+
* @param {DocumentQuery} documentQuery - Query service to manage document-related state.
|
|
1454
|
+
* @param {DocumentHttpService} documentHttpService - Service to make HTTP requests related to documents.
|
|
1427
1455
|
*/
|
|
1428
1456
|
constructor(documentService, documentQuery, documentHttpService) {
|
|
1429
1457
|
this.documentService = documentService;
|
|
@@ -1444,7 +1472,7 @@ class DocumentContainerComponent {
|
|
|
1444
1472
|
* The list of folders.
|
|
1445
1473
|
* @type {Array}
|
|
1446
1474
|
*/
|
|
1447
|
-
folderList =
|
|
1475
|
+
folderList = SHARED.EMPTY_ARRAY;
|
|
1448
1476
|
/**
|
|
1449
1477
|
* Holds the subscription to manage observable cleanup.
|
|
1450
1478
|
* @private
|
|
@@ -1460,7 +1488,7 @@ class DocumentContainerComponent {
|
|
|
1460
1488
|
const folderSubscription = this.documentQuery
|
|
1461
1489
|
.selectParentDocumentTypeId()
|
|
1462
1490
|
.subscribe((folderBlockId) => {
|
|
1463
|
-
const idToFetch = folderBlockId ?? this.folderList
|
|
1491
|
+
const idToFetch = folderBlockId ?? this.folderList[0]?._id;
|
|
1464
1492
|
if (idToFetch) {
|
|
1465
1493
|
this.fetchDocuments(idToFetch);
|
|
1466
1494
|
}
|
|
@@ -1472,23 +1500,23 @@ class DocumentContainerComponent {
|
|
|
1472
1500
|
* @returns {void}
|
|
1473
1501
|
*/
|
|
1474
1502
|
fetchFolder() {
|
|
1475
|
-
const folderSubscription = this.documentHttpService.
|
|
1503
|
+
const folderSubscription = this.documentHttpService.getFoldersData(this.contextId).subscribe({
|
|
1476
1504
|
/**
|
|
1477
1505
|
* Handles the successful API response.
|
|
1478
|
-
* @param
|
|
1506
|
+
* @param {FolderBlockModel[]} folder - The list of folders returned by the API.
|
|
1479
1507
|
*/
|
|
1480
|
-
next: (
|
|
1481
|
-
if (
|
|
1482
|
-
this.folderList =
|
|
1508
|
+
next: (folder) => {
|
|
1509
|
+
if (folder && folder.length > 0) {
|
|
1510
|
+
this.folderList = folder;
|
|
1483
1511
|
this.fetchDocuments(this.folderList[0]._id);
|
|
1484
1512
|
}
|
|
1485
1513
|
else {
|
|
1486
|
-
console.error(ERRORS.ERROR_ALLDOCUMENT_MISSING
|
|
1514
|
+
console.error(ERRORS.ERROR_ALLDOCUMENT_MISSING);
|
|
1487
1515
|
}
|
|
1488
1516
|
},
|
|
1489
1517
|
/**
|
|
1490
1518
|
* Handles errors if the request fails.
|
|
1491
|
-
* @param err - The error object returned by the server.
|
|
1519
|
+
* @param {any} err - The error object returned by the server.
|
|
1492
1520
|
*/
|
|
1493
1521
|
error: (err) => {
|
|
1494
1522
|
console.error(ERRORS.ERROR_DOCUMENT_TYPES, err);
|
|
@@ -1498,26 +1526,26 @@ class DocumentContainerComponent {
|
|
|
1498
1526
|
}
|
|
1499
1527
|
/**
|
|
1500
1528
|
* Fetches the document data from the API.
|
|
1501
|
-
* @param folderBlockId - The folder ID to fetch the document.
|
|
1529
|
+
* @param {string} folderBlockId - The folder ID to fetch the document.
|
|
1502
1530
|
* @returns {void}
|
|
1503
1531
|
*/
|
|
1504
1532
|
fetchDocuments(folderBlockId) {
|
|
1505
|
-
const documentSubscription = this.documentHttpService.getDocumentByFolderID(folderBlockId).subscribe({
|
|
1533
|
+
const documentSubscription = this.documentHttpService.getDocumentByFolderID(folderBlockId, this.contextId).subscribe({
|
|
1506
1534
|
/**
|
|
1507
1535
|
* Handles the successful API response.
|
|
1508
|
-
* @param documentList - The list of documents returned by the API.
|
|
1536
|
+
* @param {DocumentModel[]} documentList - The list of documents returned by the API.
|
|
1509
1537
|
*/
|
|
1510
1538
|
next: (documentList) => {
|
|
1511
1539
|
if (documentList) {
|
|
1512
1540
|
this.documentList = documentList;
|
|
1513
1541
|
}
|
|
1514
1542
|
else {
|
|
1515
|
-
console.error(ERRORS.ERROR_FETCHING_DOCUMENTS
|
|
1543
|
+
console.error(ERRORS.ERROR_FETCHING_DOCUMENTS);
|
|
1516
1544
|
}
|
|
1517
1545
|
},
|
|
1518
1546
|
/**
|
|
1519
1547
|
* Handles errors if the request fails.
|
|
1520
|
-
* @param err - The error object returned by the server.
|
|
1548
|
+
* @param {any} err - The error object returned by the server.
|
|
1521
1549
|
*/
|
|
1522
1550
|
error: (err) => {
|
|
1523
1551
|
console.error(ERRORS.ERROR_FETCHING_DOCUMENTS, err);
|