@fad-producto-portal/ng-fad-signature-fea 1.0.0-alpha.1 → 1.0.0-alpha.11
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/esm2022/lib/components/document-approval-list/document-approval-list.component.mjs +23 -3
- package/esm2022/lib/components/pdf-viewer-fea/pdf-viewer-fea.component.mjs +5 -5
- package/esm2022/lib/components/signature-summary/signature-summary.component.mjs +2 -2
- package/esm2022/lib/components/upload-e-signature/upload-e-signature.component.mjs +68 -58
- package/esm2022/lib/components/validate-rfc/validate-rfc.component.mjs +6 -15
- package/esm2022/lib/components/validate-signature/validate-signature.component.mjs +7 -13
- package/esm2022/lib/constants/errors/upload-e-signature/upload-e-signature-error-code.mjs +2 -1
- package/esm2022/lib/constants/errors/upload-e-signature/upload-e-signature-error-description.mjs +3 -1
- package/esm2022/lib/constants/errors/validate-rfc/validate-rfc-error-code.mjs +2 -1
- package/esm2022/lib/constants/errors/validate-rfc/validate-rfc-error-description.mjs +3 -1
- package/esm2022/lib/constants/errors/validate-signature/validate-signature-error-code.mjs +2 -1
- package/esm2022/lib/constants/errors/validate-signature/validate-signature-error-description.mjs +4 -2
- package/esm2022/lib/models/configuration/upload-e-signature/upload-e-signature-configuration.interface.mjs +1 -1
- package/fesm2022/fad-producto-portal-ng-fad-signature-fea.mjs +119 -95
- package/fesm2022/fad-producto-portal-ng-fad-signature-fea.mjs.map +1 -1
- package/lib/components/document-approval-list/document-approval-list.component.d.ts +1 -0
- package/lib/components/upload-e-signature/upload-e-signature.component.d.ts +3 -3
- package/lib/components/validate-rfc/validate-rfc.component.d.ts +2 -3
- package/lib/components/validate-signature/validate-signature.component.d.ts +2 -3
- package/lib/constants/errors/upload-e-signature/upload-e-signature-error-code.d.ts +2 -1
- package/lib/constants/errors/upload-e-signature/upload-e-signature-error-description.d.ts +1 -1
- package/lib/constants/errors/validate-rfc/validate-rfc-error-code.d.ts +2 -1
- package/lib/constants/errors/validate-rfc/validate-rfc-error-description.d.ts +1 -1
- package/lib/constants/errors/validate-signature/validate-signature-error-code.d.ts +2 -1
- package/lib/constants/errors/validate-signature/validate-signature-error-description.d.ts +1 -1
- package/lib/models/configuration/upload-e-signature/upload-e-signature-configuration.interface.d.ts +2 -0
- package/package.json +3 -3
|
@@ -4,9 +4,9 @@ import * as i3 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@angular/forms';
|
|
6
6
|
import { Validators, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i4 from '@fad-producto-portal/ng-fad-shared';
|
|
8
8
|
import { ResponseError, SharedUtils, NgFadSharedModule } from '@fad-producto-portal/ng-fad-shared';
|
|
9
|
-
import * as i4 from '@fad-producto/ng-fad-image-inline';
|
|
9
|
+
import * as i4$1 from '@fad-producto/ng-fad-image-inline';
|
|
10
10
|
import { NgFadImageInlineModule } from '@fad-producto/ng-fad-image-inline';
|
|
11
11
|
import * as i2 from '@fad-producto-portal/ng-fad-viewer';
|
|
12
12
|
import { GeneralPdfViewerComponent, NgFadViewerModule } from '@fad-producto-portal/ng-fad-viewer';
|
|
@@ -236,6 +236,7 @@ var UploadESignatureErrorCode;
|
|
|
236
236
|
UploadESignatureErrorCode[UploadESignatureErrorCode["ERROR_BASE_64"] = -7] = "ERROR_BASE_64";
|
|
237
237
|
UploadESignatureErrorCode[UploadESignatureErrorCode["NO_SIGNER_ID"] = -8] = "NO_SIGNER_ID";
|
|
238
238
|
UploadESignatureErrorCode[UploadESignatureErrorCode["NO_RFC"] = -9] = "NO_RFC";
|
|
239
|
+
UploadESignatureErrorCode[UploadESignatureErrorCode["PASSWORD_ERROR"] = -10] = "PASSWORD_ERROR";
|
|
239
240
|
})(UploadESignatureErrorCode || (UploadESignatureErrorCode = {}));
|
|
240
241
|
|
|
241
242
|
const getUploadESignatureErrorDescription = (code) => {
|
|
@@ -258,6 +259,8 @@ const getUploadESignatureErrorDescription = (code) => {
|
|
|
258
259
|
return "El ID del firmante es requerido";
|
|
259
260
|
case -9:
|
|
260
261
|
return "El RFC del firmante es requerido";
|
|
262
|
+
case -10:
|
|
263
|
+
return "La contraseña es incorrecta";
|
|
261
264
|
default:
|
|
262
265
|
return 'Unknown error';
|
|
263
266
|
}
|
|
@@ -269,6 +272,7 @@ var ValidateRFCErrorCode;
|
|
|
269
272
|
ValidateRFCErrorCode[ValidateRFCErrorCode["HTTP"] = -2] = "HTTP";
|
|
270
273
|
ValidateRFCErrorCode[ValidateRFCErrorCode["REQUISITION_ID"] = -3] = "REQUISITION_ID";
|
|
271
274
|
ValidateRFCErrorCode[ValidateRFCErrorCode["SIGNER_ID"] = -4] = "SIGNER_ID";
|
|
275
|
+
ValidateRFCErrorCode[ValidateRFCErrorCode["TICKET"] = -5] = "TICKET";
|
|
272
276
|
})(ValidateRFCErrorCode || (ValidateRFCErrorCode = {}));
|
|
273
277
|
|
|
274
278
|
const getValidateRFCErrorDescription = (code) => {
|
|
@@ -281,6 +285,8 @@ const getValidateRFCErrorDescription = (code) => {
|
|
|
281
285
|
return "There is not requisitionId";
|
|
282
286
|
case -4:
|
|
283
287
|
return "There is not signerId";
|
|
288
|
+
case -5:
|
|
289
|
+
return "There is not Ticket";
|
|
284
290
|
default:
|
|
285
291
|
return 'Unknown error';
|
|
286
292
|
}
|
|
@@ -292,6 +298,7 @@ var ValidateSignatureErrorCode;
|
|
|
292
298
|
ValidateSignatureErrorCode[ValidateSignatureErrorCode["HTTP"] = -2] = "HTTP";
|
|
293
299
|
ValidateSignatureErrorCode[ValidateSignatureErrorCode["NO_REQUISITION_ID"] = -3] = "NO_REQUISITION_ID";
|
|
294
300
|
ValidateSignatureErrorCode[ValidateSignatureErrorCode["NO_SIGNER_ID"] = -4] = "NO_SIGNER_ID";
|
|
301
|
+
ValidateSignatureErrorCode[ValidateSignatureErrorCode["NO_TICKET"] = -5] = "NO_TICKET";
|
|
295
302
|
})(ValidateSignatureErrorCode || (ValidateSignatureErrorCode = {}));
|
|
296
303
|
|
|
297
304
|
const getValidateSignatureErrorDescription = (code) => {
|
|
@@ -302,8 +309,10 @@ const getValidateSignatureErrorDescription = (code) => {
|
|
|
302
309
|
return "HTTP error";
|
|
303
310
|
case -2:
|
|
304
311
|
return "Requisition ID is required";
|
|
305
|
-
case -
|
|
312
|
+
case -4:
|
|
306
313
|
return "Signer ID is required";
|
|
314
|
+
case -5:
|
|
315
|
+
return "Ticket is required";
|
|
307
316
|
default:
|
|
308
317
|
return 'Unknown error';
|
|
309
318
|
}
|
|
@@ -344,10 +353,10 @@ class PdfViewerFeaComponent {
|
|
|
344
353
|
return;
|
|
345
354
|
}
|
|
346
355
|
const observer = new MutationObserver(() => {
|
|
347
|
-
const viewerElement = containerElement.querySelector(`#fad-viewer-page-v1-1`);
|
|
356
|
+
const viewerElement = containerElement.querySelector(`#fad-viewer-page-v1-${data.id}-1`);
|
|
348
357
|
if (viewerElement) {
|
|
349
358
|
observer.disconnect();
|
|
350
|
-
const newHeight = viewerElement.clientHeight;
|
|
359
|
+
const newHeight = viewerElement.clientHeight + 30;
|
|
351
360
|
if (this.height !== newHeight) {
|
|
352
361
|
this.height = newHeight;
|
|
353
362
|
this.cdr.detectChanges();
|
|
@@ -361,11 +370,11 @@ class PdfViewerFeaComponent {
|
|
|
361
370
|
this.configuration = Utils.mergeConfiguration(new Configuration(), PDF_VIEWER_FEA_DEFAULT, this.configuration);
|
|
362
371
|
}
|
|
363
372
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PdfViewerFeaComponent, deps: [{ token: i1.NgFadPdfReaderService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
364
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PdfViewerFeaComponent, selector: "ng-fad-signature-fea-pdf-viewer-fea", inputs: { configuration: "configuration", file: "file", index: "index", id: "id" }, providers: [NgFadPdfReaderService], viewQueries: [{ propertyName: "generalPdfViewerComponent", first: true, predicate: GeneralPdfViewerComponent, descendants: true }], ngImport: i0, template: "<div class=\"pdf-viewer\" [id]=\"id\" [style.height.px]=\"height\">\r\n <ng-fad-viewer-general-pdf-viewer\r\n [pages]=\"pages\"\r\n (onpagechange)=\"onPageChange($event)\"\r\n (onloadpage)=\"onLoadPage($event)\">\r\n \r\n <ng-fad-viewer-pdf-mini-view\r\n miniView\r\n [configuration]=\"miniViewConfig\"\r\n [pages]=\"pages\"\r\n [page]=\"page\"\r\n (onpagechange)=\"scrollToPage($event)\"\r\n >\r\n </ng-fad-viewer-pdf-mini-view>\r\n \r\n </ng-fad-viewer-general-pdf-viewer>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: i2.GeneralPdfViewerComponent, selector: "ng-fad-viewer-general-pdf-viewer", inputs: ["configuration", "onerror", "pages"], outputs: ["onpagechange", "onloadpage"] }, { kind: "component", type: i2.PdfMiniViewComponent, selector: "ng-fad-viewer-pdf-mini-view", inputs: ["configuration", "pages", "page"], outputs: ["onpagechange"] }] }); }
|
|
373
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PdfViewerFeaComponent, selector: "ng-fad-signature-fea-pdf-viewer-fea", inputs: { configuration: "configuration", file: "file", index: "index", id: "id" }, providers: [NgFadPdfReaderService], viewQueries: [{ propertyName: "generalPdfViewerComponent", first: true, predicate: GeneralPdfViewerComponent, descendants: true }], ngImport: i0, template: "<div class=\"pdf-viewer\" [id]=\"id\" [style.height.px]=\"height\">\r\n <ng-fad-viewer-general-pdf-viewer\r\n [pages]=\"pages\"\r\n (onpagechange)=\"onPageChange($event)\"\r\n (onloadpage)=\"onLoadPage($event)\">\r\n \r\n <ng-fad-viewer-pdf-mini-view\r\n miniView\r\n [configuration]=\"miniViewConfig\"\r\n [pages]=\"pages\"\r\n [page]=\"page\"\r\n (onpagechange)=\"scrollToPage($event)\"\r\n >\r\n </ng-fad-viewer-pdf-mini-view>\r\n \r\n </ng-fad-viewer-general-pdf-viewer>\r\n</div>", styles: ["ng-fad-viewer-general-pdf-viewer{padding:var(--fad-portal-common-separation-md);box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: i2.GeneralPdfViewerComponent, selector: "ng-fad-viewer-general-pdf-viewer", inputs: ["configuration", "onerror", "pages"], outputs: ["onpagechange", "onloadpage"] }, { kind: "component", type: i2.PdfMiniViewComponent, selector: "ng-fad-viewer-pdf-mini-view", inputs: ["configuration", "pages", "page"], outputs: ["onpagechange"] }] }); }
|
|
365
374
|
}
|
|
366
375
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PdfViewerFeaComponent, decorators: [{
|
|
367
376
|
type: Component,
|
|
368
|
-
args: [{ selector: 'ng-fad-signature-fea-pdf-viewer-fea', providers: [NgFadPdfReaderService], template: "<div class=\"pdf-viewer\" [id]=\"id\" [style.height.px]=\"height\">\r\n <ng-fad-viewer-general-pdf-viewer\r\n [pages]=\"pages\"\r\n (onpagechange)=\"onPageChange($event)\"\r\n (onloadpage)=\"onLoadPage($event)\">\r\n \r\n <ng-fad-viewer-pdf-mini-view\r\n miniView\r\n [configuration]=\"miniViewConfig\"\r\n [pages]=\"pages\"\r\n [page]=\"page\"\r\n (onpagechange)=\"scrollToPage($event)\"\r\n >\r\n </ng-fad-viewer-pdf-mini-view>\r\n \r\n </ng-fad-viewer-general-pdf-viewer>\r\n</div>" }]
|
|
377
|
+
args: [{ selector: 'ng-fad-signature-fea-pdf-viewer-fea', providers: [NgFadPdfReaderService], template: "<div class=\"pdf-viewer\" [id]=\"id\" [style.height.px]=\"height\">\r\n <ng-fad-viewer-general-pdf-viewer\r\n [pages]=\"pages\"\r\n (onpagechange)=\"onPageChange($event)\"\r\n (onloadpage)=\"onLoadPage($event)\">\r\n \r\n <ng-fad-viewer-pdf-mini-view\r\n miniView\r\n [configuration]=\"miniViewConfig\"\r\n [pages]=\"pages\"\r\n [page]=\"page\"\r\n (onpagechange)=\"scrollToPage($event)\"\r\n >\r\n </ng-fad-viewer-pdf-mini-view>\r\n \r\n </ng-fad-viewer-general-pdf-viewer>\r\n</div>", styles: ["ng-fad-viewer-general-pdf-viewer{padding:var(--fad-portal-common-separation-md);box-sizing:border-box}\n"] }]
|
|
369
378
|
}], ctorParameters: function () { return [{ type: i1.NgFadPdfReaderService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { configuration: [{
|
|
370
379
|
type: Input
|
|
371
380
|
}], file: [{
|
|
@@ -385,8 +394,6 @@ class ValidateRfcComponent {
|
|
|
385
394
|
this.hostContext = hostContext;
|
|
386
395
|
this.route = route;
|
|
387
396
|
this.fadService = fadService;
|
|
388
|
-
this.requisitionId = '';
|
|
389
|
-
this.signerId = '';
|
|
390
397
|
this.onerror = new EventEmitter();
|
|
391
398
|
this.oncomplete = new EventEmitter();
|
|
392
399
|
this.onloader = new EventEmitter();
|
|
@@ -416,22 +423,17 @@ class ValidateRfcComponent {
|
|
|
416
423
|
this.configuration = Utils.mergeConfiguration(new Configuration(), SIGNATURE_FEA_CONFIGURATION_DEFAULT, this.configuration);
|
|
417
424
|
}
|
|
418
425
|
validateData() {
|
|
419
|
-
if (!this.
|
|
426
|
+
if (!this.ticket) {
|
|
420
427
|
this.onerror.emit(new ResponseError(ValidateRFCErrorCode.REQUISITION_ID, getValidateRFCErrorDescription(ValidateRFCErrorCode.REQUISITION_ID), 'ng-fad-portal-signature-fea-validate-rfc'));
|
|
421
428
|
return false;
|
|
422
429
|
}
|
|
423
|
-
if (!this.signerId) {
|
|
424
|
-
this.onerror.emit(new ResponseError(ValidateRFCErrorCode.SIGNER_ID, getValidateRFCErrorDescription(ValidateRFCErrorCode.SIGNER_ID), 'ng-fad-portal-signature-fea-validate-rfc'));
|
|
425
|
-
return false;
|
|
426
|
-
}
|
|
427
430
|
return true;
|
|
428
431
|
}
|
|
429
432
|
validateRFC() {
|
|
430
433
|
if (this.validationForm.valid) {
|
|
431
434
|
console.error("Validar rfc ");
|
|
432
435
|
const validateReq = {
|
|
433
|
-
|
|
434
|
-
signerId: this.signerId,
|
|
436
|
+
ticket: this.ticket,
|
|
435
437
|
rfc: this.codeControl?.value
|
|
436
438
|
};
|
|
437
439
|
this.fadService.validateRfc(validateReq)
|
|
@@ -459,16 +461,14 @@ class ValidateRfcComponent {
|
|
|
459
461
|
return this.validationForm.get('code') ?? null;
|
|
460
462
|
}
|
|
461
463
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidateRfcComponent, deps: [{ token: i1$1.FormBuilder }, { token: i0.ElementRef }, { token: i2$1.ActivatedRoute }, { token: i2$2.FadService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
462
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ValidateRfcComponent, selector: "ng-fad-signature-fea-validate-rfc", inputs: {
|
|
464
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ValidateRfcComponent, selector: "ng-fad-signature-fea-validate-rfc", inputs: { configuration: "configuration", ticket: "ticket" }, outputs: { onerror: "onerror", oncomplete: "oncomplete", onloader: "onloader" }, ngImport: i0, template: "\r\n <div class=\"validation-container fad-container\" *ngIf=\"showComponent\">\r\n <div class=\"title\">{{ configuration.customization?.moduleCustomization?.legends?.title }}</div>\r\n <div class=\"fad-portal-subtitle\">{{ configuration.customization?.moduleCustomization?.legends?.description }}</div>\r\n <form [formGroup]=\"validationForm\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"fad-portal-container-input\">\r\n <input id=\"code\" type=\"text\" formControlName=\"code\" (input)=\"onInputChange($event)\" maxlength=\"{{ configuration.maxCharacters || 13 }}\" />\r\n </div>\r\n <ng-fad-portal-shared-form-errors \r\n [formData]=\"codeControl!\" \r\n [configuration]=\"configuration.formErrors?.configuration!\">\r\n </ng-fad-portal-shared-form-errors>\r\n \r\n <button type=\"submit\" class=\"fad-portal-primary\" [disabled]=\"validationForm.invalid\">\r\n {{ configuration.customization?.moduleCustomization?.legends?.buttonLegend }}\r\n </button>\r\n </form>\r\n </div>\r\n\r\n\r\n", styles: [".validation-container{width:100%;display:flex;flex-direction:column;align-items:start;row-gap:var(--fad-portal-common-separation-md)}@media (max-width: 992px){.validation-container{width:100%;align-items:center}}.validation-container .title{font-family:var(--fad-portal-common-title-font-family);font-size:var(--fad-portal-common-title-font-size)}.validation-container form{display:flex;flex-direction:column;width:100%}.validation-container form .fad-portal-container-input{display:flex;flex-direction:column;row-gap:var(--fad-portal-common-separation-xs)}.validation-container form .error-message{color:var(--fad-portal-common-error-color)}.validation-container form button{margin-top:var(--fad-portal-common-separation-md);cursor:pointer}.validation-container form button:disabled{cursor:auto}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.FormErrorsComponent, selector: "ng-fad-portal-shared-form-errors", inputs: ["configuration", "formData"], outputs: ["onerror"] }] }); }
|
|
463
465
|
}
|
|
464
466
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidateRfcComponent, decorators: [{
|
|
465
467
|
type: Component,
|
|
466
468
|
args: [{ selector: 'ng-fad-signature-fea-validate-rfc', template: "\r\n <div class=\"validation-container fad-container\" *ngIf=\"showComponent\">\r\n <div class=\"title\">{{ configuration.customization?.moduleCustomization?.legends?.title }}</div>\r\n <div class=\"fad-portal-subtitle\">{{ configuration.customization?.moduleCustomization?.legends?.description }}</div>\r\n <form [formGroup]=\"validationForm\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"fad-portal-container-input\">\r\n <input id=\"code\" type=\"text\" formControlName=\"code\" (input)=\"onInputChange($event)\" maxlength=\"{{ configuration.maxCharacters || 13 }}\" />\r\n </div>\r\n <ng-fad-portal-shared-form-errors \r\n [formData]=\"codeControl!\" \r\n [configuration]=\"configuration.formErrors?.configuration!\">\r\n </ng-fad-portal-shared-form-errors>\r\n \r\n <button type=\"submit\" class=\"fad-portal-primary\" [disabled]=\"validationForm.invalid\">\r\n {{ configuration.customization?.moduleCustomization?.legends?.buttonLegend }}\r\n </button>\r\n </form>\r\n </div>\r\n\r\n\r\n", styles: [".validation-container{width:100%;display:flex;flex-direction:column;align-items:start;row-gap:var(--fad-portal-common-separation-md)}@media (max-width: 992px){.validation-container{width:100%;align-items:center}}.validation-container .title{font-family:var(--fad-portal-common-title-font-family);font-size:var(--fad-portal-common-title-font-size)}.validation-container form{display:flex;flex-direction:column;width:100%}.validation-container form .fad-portal-container-input{display:flex;flex-direction:column;row-gap:var(--fad-portal-common-separation-xs)}.validation-container form .error-message{color:var(--fad-portal-common-error-color)}.validation-container form button{margin-top:var(--fad-portal-common-separation-md);cursor:pointer}.validation-container form button:disabled{cursor:auto}\n"] }]
|
|
467
|
-
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: i0.ElementRef }, { type: i2$1.ActivatedRoute }, { type: i2$2.FadService }]; }, propDecorators: {
|
|
469
|
+
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: i0.ElementRef }, { type: i2$1.ActivatedRoute }, { type: i2$2.FadService }]; }, propDecorators: { configuration: [{
|
|
468
470
|
type: Input
|
|
469
|
-
}],
|
|
470
|
-
type: Input
|
|
471
|
-
}], configuration: [{
|
|
471
|
+
}], ticket: [{
|
|
472
472
|
type: Input
|
|
473
473
|
}], onerror: [{
|
|
474
474
|
type: Output
|
|
@@ -529,6 +529,10 @@ class DocumentApprovalListComponent {
|
|
|
529
529
|
approved: undefined,
|
|
530
530
|
isVisible: false
|
|
531
531
|
})));
|
|
532
|
+
if (this.documentsApprovalList.length === 1) {
|
|
533
|
+
this.loadSingleDocument(this.documentsApprovalList[0]);
|
|
534
|
+
}
|
|
535
|
+
this.cdr.detectChanges();
|
|
532
536
|
}
|
|
533
537
|
else {
|
|
534
538
|
this.onerror.emit(new ResponseError(DocumentApprovalListErrorCode.SERVICE, getDocumentApprovalListErrorDescription(DocumentApprovalListErrorCode.SERVICE), 'ng-fad-portal-signature-fea-document-approval-list'));
|
|
@@ -539,6 +543,22 @@ class DocumentApprovalListComponent {
|
|
|
539
543
|
}
|
|
540
544
|
});
|
|
541
545
|
}
|
|
546
|
+
loadSingleDocument(singleDocument) {
|
|
547
|
+
singleDocument.isVisible = true;
|
|
548
|
+
this.fad.getDocumentFea(singleDocument.id, { loader: true, error: true })
|
|
549
|
+
.pipe(finalize(() => this.onloader.emit(false)))
|
|
550
|
+
.subscribe({
|
|
551
|
+
next: (res) => {
|
|
552
|
+
if (singleDocument.doc) {
|
|
553
|
+
singleDocument.doc.file = "data:application/pdf;base64," + res.data.file;
|
|
554
|
+
this.cdr.detectChanges();
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
error: () => {
|
|
558
|
+
this.onerror.emit(new ResponseError(DocumentApprovalListErrorCode.ERROR_PDF, getDocumentApprovalListErrorDescription(DocumentApprovalListErrorCode.ERROR_PDF), 'ng-fad-portal-signature-fea-document-approval-list'));
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
}
|
|
542
562
|
toggleApproval(document) {
|
|
543
563
|
document.approved = document.approved === true ? undefined : true;
|
|
544
564
|
this.updateApproveAllState();
|
|
@@ -618,11 +638,11 @@ class DocumentApprovalListComponent {
|
|
|
618
638
|
this.configuration = Utils.mergeConfiguration(new Configuration(), DOCUMENT_APPROVAL_LIST_DEFAULT, this.configuration);
|
|
619
639
|
}
|
|
620
640
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DocumentApprovalListComponent, deps: [{ token: i0.ElementRef }, { token: i2$2.FadService }, { token: i0.ChangeDetectorRef }, { token: i1.NgFadPdfReaderService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
621
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DocumentApprovalListComponent, selector: "ng-fad-signature-fea-document-approval-list", inputs: { configuration: "configuration", rfc: "rfc" }, outputs: { onloader: "onloader", onevent: "onevent", onerror: "onerror" }, providers: [NgFadPdfReaderService], ngImport: i0, template: "\n <ng-container *ngFor=\"let requisition of requisitionsFea\">\n <div class=\"fad-portal-content\" >\n <div class=\"header\" >\n <div>\n <div class=\"fad-portal-title\">\n {{ requisition.name }} ({{requisition.documents.length}})\n </div>\n <div class=\"info\">\n {{configuration.customization?.moduleCustomization?.legends?.sendTo}} Alfredo Villanueva {{ requisition.sendBy }}\n </div>\n <div class=\"info\">\n {{ requisition.sendByEmail }}\n </div>\n </div>\n <div class=\"requisition-id\">\n <div class=\"fad-portal-content-bold\">ID {{ requisition.requisitionId }}</div>\n </div>\n </div>\n <div class=\"documents-container\">\n <ng-container *ngFor=\"let document of documentsApprovalList; let i = index\">\n <ng-container *ngIf=\"document.idRequisition === requisition.requisitionId\" >\n <div class=\"document\" >\n <div class=\"information\" >\n <div class=\"document-name fad-portal-content-bold\" >\n {{ document.doc?.name }}\n </div>\n <div class=\"validate\">\n \n <ng-fad-image-inline \n [src]=\"document.approved === false ? images.active.reject : images.inactive.reject\"\n (click)=\"toggleRejection(document)\">\n </ng-fad-image-inline>\n \n \n <ng-fad-image-inline \n [src]=\"document.approved === true ? images.active.approve : images.inactive.approve\"\n (click)=\"toggleApproval(document)\">\n </ng-fad-image-inline>\n </div>\n \n </div>\n <div class=\"actions\">\n <div>\n <div class=\"fad-portal-content-bold\" (click)=\"seeDocumentFea(document)\">\n {{ document.isVisible ? 'Ocultar documento' : 'Ver documento' }}\n </div>\n <div class=\"fad-portal-content-bold\" (click)=\"downloadDocumentFea(document)\">{{configuration.customization?.moduleCustomization?.legends?.download}}</div>\n </div>\n <div>\n {{ document.doc?.pages }} {{configuration.customization?.moduleCustomization?.legends?.pages}}\n </div>\n </div>\n\n <ng-fad-signature-fea-pdf-viewer-fea\n *ngIf=\"document.isVisible && document.doc?.file\"\n [file]=\"document.doc?.file\"\n [index]=\"i\"\n [id]=\"getDocumentId(document.id!)\"\n >\n </ng-fad-signature-fea-pdf-viewer-fea>\n \n </div>\n </ng-container>\n </ng-container>\n \n </div>\n \n </div>\n </ng-container>\n <div class=\"fad-portal-content selector-document\">\n <div class=\"document-status-bar\">\n \n <div *ngIf=\"getApprovedCount() === 0 && getRejectedCount() === 0\" class=\"document-status-message \">\n Aprueba los documentos para firmarlos con tu e.firma\n </div>\n \n \n <div *ngIf=\"getApprovedCount() > 0 || getRejectedCount() > 0\" class=\"document-status-content\">\n <div class=\"approve-all\">\n <ng-fad-image-inline \n [src]=\"approveAll ? images.active.approve : images.inactive.approve\"\n (click)=\"approveAllDocuments()\">\n </ng-fad-image-inline>\n <span (click)=\"approveAllDocuments()\">Aprobar todos los documentos ({{ documentsApprovalList.length }})</span>\n </div>\n \n \n <div class=\"document-counts\">\n <span *ngIf=\"getApprovedCount() > 0 && getRejectedCount() === 0\" class=\"fad-portal-informative-bold\">\n {{ getApprovedCount() }} documentos aprobados\n </span>\n <span *ngIf=\"getRejectedCount() > 0 && getApprovedCount() === 0\" class=\"fad-portal-informative-bold\">\n {{ getRejectedCount() }} documentos rechazados\n </span>\n \n <ng-container *ngIf=\"getApprovedCount() > 0 && getRejectedCount() > 0\" >\n <span class=\"fad-portal-informative-bold\">\n {{ getApprovedCount() }} documentos aprobados\n </span>\n <span class=\"fad-portal-informative-bold\">\n {{ getRejectedCount() }} documentos rechazados\n </span>\n </ng-container>\n </div>\n \n \n <button class=\"fad-portal-primary\" (click)=\"emitApprovedDocuments()\">Continuar</button>\n </div>\n </div>\n </div>\n \n\n", styles: [":host{box-sizing:border-box}:host .fad-portal-content{display:flex;flex-direction:column;justify-content:center;width:100%;box-sizing:border-box;margin-top:var(--fad-portal-common-separation-lg)}:host .fad-portal-content .header{display:flex;align-items:center;justify-content:space-between;width:100%;background-color:#f5f5f5;border-radius:var(--fad-portal-common-input-border-radius);padding:var(--fad-portal-common-separation-md);overflow:hidden;box-sizing:border-box}:host .fad-portal-content .header div:nth-child(1){display:flex;flex-direction:column;row-gap:var(--fad-portal-common-separation-xs)}:host .fad-portal-content .header .info{color:var(--fad-portal-common-tertiary-color)}@media (max-width: 992px){:host .fad-portal-content .header{flex-direction:column;align-items:start;justify-content:center;row-gap:var(--fad-portal-common-separation-xs);margin-bottom:var(--fad-portal-common-separation-md)}}:host .fad-portal-content .documents-container{box-sizing:border-box}:host .fad-portal-content .documents-container .document{display:flex;align-items:center;flex-direction:column;width:100%;margin-top:var(--fad-portal-common-separation-md);border-radius:var(--fad-portal-common-input-border-radius);border:1px solid #f5f5f5}:host .fad-portal-content .documents-container .document .information{padding:var(--fad-portal-common-separation-md);display:flex;align-items:center;justify-content:space-between;width:100%}:host .fad-portal-content .documents-container .document .information .validate{padding-left:var(--fad-portal-common-separation-md);padding-right:var(--fad-portal-common-separation-md);display:flex;column-gap:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .information .document-name{padding-left:var(--fad-portal-common-separation-md);padding-right:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .actions{display:flex;align-items:center;justify-content:space-between;width:100%;background-color:#f5f5f5;padding:var(--fad-portal-common-separation-md);box-sizing:border-box;border-radius:var(--fad-portal-common-input-border-radius);border-top-left-radius:0;border-top-right-radius:0}:host .fad-portal-content .documents-container .document .actions div:nth-child(1){display:flex;align-items:center;gap:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .actions div:nth-child(1) div{color:var(--fad-portal-common-primary-color)!important;cursor:pointer}:host .selector-document{width:100%;background-color:#262626;color:#fff;padding:var(--fad-portal-common-separation-md);margin-top:var(--fad-portal-common-separation-md);display:flex;align-items:center;justify-content:space-between;border-radius:var(--fad-portal-common-input-border-radius);box-sizing:border-box}:host .selector-document .document-status-message{display:flex;align-items:center;justify-content:center;width:100%;gap:var(--fad-portal-common-separation-md)}:host .selector-document .document-status-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;font-size:14px;box-sizing:border-box}:host .selector-document .document-status-bar .document-status-content{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;font-size:14px;box-sizing:border-box}:host .selector-document .document-status-bar .approve-all{display:flex;align-items:center;gap:10px;cursor:pointer;box-sizing:border-box}:host .selector-document .document-status-bar .approve-all span{cursor:pointer;-webkit-user-select:none;user-select:none}:host .selector-document .document-status-bar .document-counts{display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-xs);box-sizing:border-box}:host .selector-document .document-status-bar .document-counts span{color:#fff}:host .selector-document .document-status-bar .fad-portal-primary{min-width:0px;width:50%}@media (max-width: 992px){:host .selector-document .document-status-bar .fad-portal-primary{width:100%;margin-top:var(--fad-portal-common-separation-md)}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.NgFadImageInlineComponent, selector: "ng-fad-image-inline", inputs: ["src"] }, { kind: "component", type: PdfViewerFeaComponent, selector: "ng-fad-signature-fea-pdf-viewer-fea", inputs: ["configuration", "file", "index", "id"] }] }); }
|
|
641
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DocumentApprovalListComponent, selector: "ng-fad-signature-fea-document-approval-list", inputs: { configuration: "configuration", rfc: "rfc" }, outputs: { onloader: "onloader", onevent: "onevent", onerror: "onerror" }, providers: [NgFadPdfReaderService], ngImport: i0, template: "<ng-container *ngIf=\"requisitionsFea && requisitionsFea.length > 0\">\r\n <ng-container *ngFor=\"let requisition of requisitionsFea\">\r\n <div class=\"fad-portal-content\" >\r\n <div class=\"header\" >\r\n <div>\r\n <div class=\"fad-portal-title\">\r\n {{ requisition.name }} ({{requisition.documents.length}})\r\n </div>\r\n <div class=\"info\">\r\n {{configuration.customization?.moduleCustomization?.legends?.sendTo}} Alfredo Villanueva {{ requisition.sendBy }}\r\n </div>\r\n <div class=\"info\">\r\n {{ requisition.sendByEmail }}\r\n </div>\r\n </div>\r\n <div class=\"requisition-id\">\r\n <div class=\"fad-portal-content-bold\">ID {{ requisition.requisitionId }}</div>\r\n </div>\r\n </div>\r\n <div class=\"documents-container\">\r\n <ng-container *ngFor=\"let document of documentsApprovalList; let i = index\">\r\n <ng-container *ngIf=\"document.idRequisition === requisition.requisitionId\" >\r\n <div class=\"document\" >\r\n <div class=\"information\" >\r\n <div class=\"document-name fad-portal-content-bold\" >\r\n {{ document.doc?.name }}\r\n </div>\r\n <div class=\"validate\">\r\n \r\n <ng-fad-image-inline\r\n [src]=\"document.approved === false ? images.active.reject : images.inactive.reject\"\r\n (click)=\"toggleRejection(document)\">\r\n </ng-fad-image-inline>\r\n \r\n \r\n <ng-fad-image-inline\r\n [src]=\"document.approved === true ? images.active.approve : images.inactive.approve\"\r\n (click)=\"toggleApproval(document)\">\r\n </ng-fad-image-inline>\r\n </div>\r\n \r\n </div>\r\n <div class=\"actions\">\r\n <div>\r\n <div class=\"fad-portal-content-bold\" (click)=\"seeDocumentFea(document)\">\r\n {{ document.isVisible ? 'Ocultar documento' : 'Ver documento' }}\r\n </div>\r\n <div class=\"fad-portal-content-bold\" (click)=\"downloadDocumentFea(document)\">{{configuration.customization?.moduleCustomization?.legends?.download}}</div>\r\n </div>\r\n <div>\r\n {{ document.doc?.pages }} {{configuration.customization?.moduleCustomization?.legends?.pages}}\r\n </div>\r\n </div>\r\n \r\n <ng-fad-signature-fea-pdf-viewer-fea\r\n *ngIf=\"document.isVisible && document.doc?.file\"\r\n [file]=\"document.doc?.file\"\r\n [index]=\"i\"\r\n [id]=\"getDocumentId(document.id!)\"\r\n >\r\n </ng-fad-signature-fea-pdf-viewer-fea>\r\n \r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n \r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <div class=\"fad-portal-content selector-document\">\r\n <div class=\"document-status-bar\">\r\n \r\n <div *ngIf=\"getApprovedCount() === 0 && getRejectedCount() === 0\" class=\"document-status-message \">\r\n Aprueba los documentos para firmarlos con tu e.firma\r\n </div>\r\n \r\n \r\n <div *ngIf=\"getApprovedCount() > 0 || getRejectedCount() > 0\" class=\"document-status-content\">\r\n <div class=\"approve-all\">\r\n <ng-fad-image-inline\r\n [src]=\"approveAll ? images.active.approve : images.inactive.approve\"\r\n (click)=\"approveAllDocuments()\">\r\n </ng-fad-image-inline>\r\n <span (click)=\"approveAllDocuments()\">Aprobar todos los documentos ({{ documentsApprovalList.length }})</span>\r\n </div>\r\n \r\n \r\n <div class=\"document-counts\">\r\n <span *ngIf=\"getApprovedCount() > 0 && getRejectedCount() === 0\" class=\"fad-portal-informative-bold\">\r\n {{ getApprovedCount() }} documentos aprobados\r\n </span>\r\n <span *ngIf=\"getRejectedCount() > 0 && getApprovedCount() === 0\" class=\"fad-portal-informative-bold\">\r\n {{ getRejectedCount() }} documentos rechazados\r\n </span>\r\n \r\n <ng-container *ngIf=\"getApprovedCount() > 0 && getRejectedCount() > 0\" >\r\n <span class=\"fad-portal-informative-bold\">\r\n {{ getApprovedCount() }} documentos aprobados\r\n </span>\r\n <span class=\"fad-portal-informative-bold\">\r\n {{ getRejectedCount() }} documentos rechazados\r\n </span>\r\n </ng-container>\r\n </div>\r\n \r\n \r\n <button class=\"fad-portal-primary\" (click)=\"emitApprovedDocuments()\">Continuar</button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </ng-container>\r\n ", styles: [":host{box-sizing:border-box}:host .fad-portal-content{display:flex;flex-direction:column;justify-content:center;width:100%;box-sizing:border-box;margin-top:var(--fad-portal-common-separation-lg)}:host .fad-portal-content .header{display:flex;align-items:center;justify-content:space-between;width:100%;background-color:#f5f5f5;border-radius:var(--fad-portal-common-input-border-radius);padding:var(--fad-portal-common-separation-md);overflow:hidden;box-sizing:border-box}:host .fad-portal-content .header div:nth-child(1){display:flex;flex-direction:column;row-gap:var(--fad-portal-common-separation-xs)}:host .fad-portal-content .header .info{color:var(--fad-portal-common-tertiary-color)}@media (max-width: 992px){:host .fad-portal-content .header{flex-direction:column;align-items:start;justify-content:center;row-gap:var(--fad-portal-common-separation-xs);margin-bottom:var(--fad-portal-common-separation-md)}}:host .fad-portal-content .documents-container{box-sizing:border-box}:host .fad-portal-content .documents-container .document{display:flex;align-items:center;flex-direction:column;width:100%;margin-top:var(--fad-portal-common-separation-md);border-radius:var(--fad-portal-common-input-border-radius);border:1px solid #f5f5f5}:host .fad-portal-content .documents-container .document .information{padding:var(--fad-portal-common-separation-md);display:flex;align-items:center;justify-content:space-between;width:100%}:host .fad-portal-content .documents-container .document .information .validate{padding-left:var(--fad-portal-common-separation-md);padding-right:var(--fad-portal-common-separation-md);display:flex;column-gap:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .information .document-name{padding-left:var(--fad-portal-common-separation-md);padding-right:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .actions{display:flex;align-items:center;justify-content:space-between;width:100%;background-color:#f5f5f5;padding:var(--fad-portal-common-separation-md);box-sizing:border-box;border-radius:var(--fad-portal-common-input-border-radius);border-top-left-radius:0;border-top-right-radius:0}:host .fad-portal-content .documents-container .document .actions div:nth-child(1){display:flex;align-items:center;gap:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .actions div:nth-child(1) div{color:var(--fad-portal-common-primary-color)!important;cursor:pointer}:host .selector-document{width:100%;background-color:var(--fad-portal-common-tertiary-color);color:#fff;padding:var(--fad-portal-common-separation-md);margin-top:var(--fad-portal-common-separation-md);display:flex;align-items:center;justify-content:space-between;border-radius:var(--fad-portal-common-input-border-radius);box-sizing:border-box}:host .selector-document .document-status-message{display:flex;align-items:center;justify-content:center;width:100%;gap:var(--fad-portal-common-separation-md)}:host .selector-document .document-status-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;font-size:14px;box-sizing:border-box}:host .selector-document .document-status-bar .document-status-content{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;font-size:14px;box-sizing:border-box}:host .selector-document .document-status-bar .approve-all{display:flex;align-items:center;gap:10px;cursor:pointer;box-sizing:border-box}:host .selector-document .document-status-bar .approve-all span{cursor:pointer;-webkit-user-select:none;user-select:none}:host .selector-document .document-status-bar .document-counts{display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-xs);box-sizing:border-box}:host .selector-document .document-status-bar .document-counts span{color:#fff}:host .selector-document .document-status-bar .fad-portal-primary{min-width:0px;width:50%}@media (max-width: 992px){:host .selector-document .document-status-bar .fad-portal-primary{width:100%;margin-top:var(--fad-portal-common-separation-md)}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.NgFadImageInlineComponent, selector: "ng-fad-image-inline", inputs: ["src"] }, { kind: "component", type: PdfViewerFeaComponent, selector: "ng-fad-signature-fea-pdf-viewer-fea", inputs: ["configuration", "file", "index", "id"] }] }); }
|
|
622
642
|
}
|
|
623
643
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DocumentApprovalListComponent, decorators: [{
|
|
624
644
|
type: Component,
|
|
625
|
-
args: [{ selector: 'ng-fad-signature-fea-document-approval-list', providers: [NgFadPdfReaderService], template: "\n <ng-container *ngFor=\"let requisition of requisitionsFea\">\n <div class=\"fad-portal-content\" >\n <div class=\"header\" >\n <div>\n <div class=\"fad-portal-title\">\n {{ requisition.name }} ({{requisition.documents.length}})\n </div>\n <div class=\"info\">\n {{configuration.customization?.moduleCustomization?.legends?.sendTo}} Alfredo Villanueva {{ requisition.sendBy }}\n </div>\n <div class=\"info\">\n {{ requisition.sendByEmail }}\n </div>\n </div>\n <div class=\"requisition-id\">\n <div class=\"fad-portal-content-bold\">ID {{ requisition.requisitionId }}</div>\n </div>\n </div>\n <div class=\"documents-container\">\n <ng-container *ngFor=\"let document of documentsApprovalList; let i = index\">\n <ng-container *ngIf=\"document.idRequisition === requisition.requisitionId\" >\n <div class=\"document\" >\n <div class=\"information\" >\n <div class=\"document-name fad-portal-content-bold\" >\n {{ document.doc?.name }}\n </div>\n <div class=\"validate\">\n \n <ng-fad-image-inline \n [src]=\"document.approved === false ? images.active.reject : images.inactive.reject\"\n (click)=\"toggleRejection(document)\">\n </ng-fad-image-inline>\n \n \n <ng-fad-image-inline \n [src]=\"document.approved === true ? images.active.approve : images.inactive.approve\"\n (click)=\"toggleApproval(document)\">\n </ng-fad-image-inline>\n </div>\n \n </div>\n <div class=\"actions\">\n <div>\n <div class=\"fad-portal-content-bold\" (click)=\"seeDocumentFea(document)\">\n {{ document.isVisible ? 'Ocultar documento' : 'Ver documento' }}\n </div>\n <div class=\"fad-portal-content-bold\" (click)=\"downloadDocumentFea(document)\">{{configuration.customization?.moduleCustomization?.legends?.download}}</div>\n </div>\n <div>\n {{ document.doc?.pages }} {{configuration.customization?.moduleCustomization?.legends?.pages}}\n </div>\n </div>\n\n <ng-fad-signature-fea-pdf-viewer-fea\n *ngIf=\"document.isVisible && document.doc?.file\"\n [file]=\"document.doc?.file\"\n [index]=\"i\"\n [id]=\"getDocumentId(document.id!)\"\n >\n </ng-fad-signature-fea-pdf-viewer-fea>\n \n </div>\n </ng-container>\n </ng-container>\n \n </div>\n \n </div>\n </ng-container>\n <div class=\"fad-portal-content selector-document\">\n <div class=\"document-status-bar\">\n \n <div *ngIf=\"getApprovedCount() === 0 && getRejectedCount() === 0\" class=\"document-status-message \">\n Aprueba los documentos para firmarlos con tu e.firma\n </div>\n \n \n <div *ngIf=\"getApprovedCount() > 0 || getRejectedCount() > 0\" class=\"document-status-content\">\n <div class=\"approve-all\">\n <ng-fad-image-inline \n [src]=\"approveAll ? images.active.approve : images.inactive.approve\"\n (click)=\"approveAllDocuments()\">\n </ng-fad-image-inline>\n <span (click)=\"approveAllDocuments()\">Aprobar todos los documentos ({{ documentsApprovalList.length }})</span>\n </div>\n \n \n <div class=\"document-counts\">\n <span *ngIf=\"getApprovedCount() > 0 && getRejectedCount() === 0\" class=\"fad-portal-informative-bold\">\n {{ getApprovedCount() }} documentos aprobados\n </span>\n <span *ngIf=\"getRejectedCount() > 0 && getApprovedCount() === 0\" class=\"fad-portal-informative-bold\">\n {{ getRejectedCount() }} documentos rechazados\n </span>\n \n <ng-container *ngIf=\"getApprovedCount() > 0 && getRejectedCount() > 0\" >\n <span class=\"fad-portal-informative-bold\">\n {{ getApprovedCount() }} documentos aprobados\n </span>\n <span class=\"fad-portal-informative-bold\">\n {{ getRejectedCount() }} documentos rechazados\n </span>\n </ng-container>\n </div>\n \n \n <button class=\"fad-portal-primary\" (click)=\"emitApprovedDocuments()\">Continuar</button>\n </div>\n </div>\n </div>\n \n\n", styles: [":host{box-sizing:border-box}:host .fad-portal-content{display:flex;flex-direction:column;justify-content:center;width:100%;box-sizing:border-box;margin-top:var(--fad-portal-common-separation-lg)}:host .fad-portal-content .header{display:flex;align-items:center;justify-content:space-between;width:100%;background-color:#f5f5f5;border-radius:var(--fad-portal-common-input-border-radius);padding:var(--fad-portal-common-separation-md);overflow:hidden;box-sizing:border-box}:host .fad-portal-content .header div:nth-child(1){display:flex;flex-direction:column;row-gap:var(--fad-portal-common-separation-xs)}:host .fad-portal-content .header .info{color:var(--fad-portal-common-tertiary-color)}@media (max-width: 992px){:host .fad-portal-content .header{flex-direction:column;align-items:start;justify-content:center;row-gap:var(--fad-portal-common-separation-xs);margin-bottom:var(--fad-portal-common-separation-md)}}:host .fad-portal-content .documents-container{box-sizing:border-box}:host .fad-portal-content .documents-container .document{display:flex;align-items:center;flex-direction:column;width:100%;margin-top:var(--fad-portal-common-separation-md);border-radius:var(--fad-portal-common-input-border-radius);border:1px solid #f5f5f5}:host .fad-portal-content .documents-container .document .information{padding:var(--fad-portal-common-separation-md);display:flex;align-items:center;justify-content:space-between;width:100%}:host .fad-portal-content .documents-container .document .information .validate{padding-left:var(--fad-portal-common-separation-md);padding-right:var(--fad-portal-common-separation-md);display:flex;column-gap:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .information .document-name{padding-left:var(--fad-portal-common-separation-md);padding-right:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .actions{display:flex;align-items:center;justify-content:space-between;width:100%;background-color:#f5f5f5;padding:var(--fad-portal-common-separation-md);box-sizing:border-box;border-radius:var(--fad-portal-common-input-border-radius);border-top-left-radius:0;border-top-right-radius:0}:host .fad-portal-content .documents-container .document .actions div:nth-child(1){display:flex;align-items:center;gap:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .actions div:nth-child(1) div{color:var(--fad-portal-common-primary-color)!important;cursor:pointer}:host .selector-document{width:100%;background-color:#262626;color:#fff;padding:var(--fad-portal-common-separation-md);margin-top:var(--fad-portal-common-separation-md);display:flex;align-items:center;justify-content:space-between;border-radius:var(--fad-portal-common-input-border-radius);box-sizing:border-box}:host .selector-document .document-status-message{display:flex;align-items:center;justify-content:center;width:100%;gap:var(--fad-portal-common-separation-md)}:host .selector-document .document-status-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;font-size:14px;box-sizing:border-box}:host .selector-document .document-status-bar .document-status-content{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;font-size:14px;box-sizing:border-box}:host .selector-document .document-status-bar .approve-all{display:flex;align-items:center;gap:10px;cursor:pointer;box-sizing:border-box}:host .selector-document .document-status-bar .approve-all span{cursor:pointer;-webkit-user-select:none;user-select:none}:host .selector-document .document-status-bar .document-counts{display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-xs);box-sizing:border-box}:host .selector-document .document-status-bar .document-counts span{color:#fff}:host .selector-document .document-status-bar .fad-portal-primary{min-width:0px;width:50%}@media (max-width: 992px){:host .selector-document .document-status-bar .fad-portal-primary{width:100%;margin-top:var(--fad-portal-common-separation-md)}}\n"] }]
|
|
645
|
+
args: [{ selector: 'ng-fad-signature-fea-document-approval-list', providers: [NgFadPdfReaderService], template: "<ng-container *ngIf=\"requisitionsFea && requisitionsFea.length > 0\">\r\n <ng-container *ngFor=\"let requisition of requisitionsFea\">\r\n <div class=\"fad-portal-content\" >\r\n <div class=\"header\" >\r\n <div>\r\n <div class=\"fad-portal-title\">\r\n {{ requisition.name }} ({{requisition.documents.length}})\r\n </div>\r\n <div class=\"info\">\r\n {{configuration.customization?.moduleCustomization?.legends?.sendTo}} Alfredo Villanueva {{ requisition.sendBy }}\r\n </div>\r\n <div class=\"info\">\r\n {{ requisition.sendByEmail }}\r\n </div>\r\n </div>\r\n <div class=\"requisition-id\">\r\n <div class=\"fad-portal-content-bold\">ID {{ requisition.requisitionId }}</div>\r\n </div>\r\n </div>\r\n <div class=\"documents-container\">\r\n <ng-container *ngFor=\"let document of documentsApprovalList; let i = index\">\r\n <ng-container *ngIf=\"document.idRequisition === requisition.requisitionId\" >\r\n <div class=\"document\" >\r\n <div class=\"information\" >\r\n <div class=\"document-name fad-portal-content-bold\" >\r\n {{ document.doc?.name }}\r\n </div>\r\n <div class=\"validate\">\r\n \r\n <ng-fad-image-inline\r\n [src]=\"document.approved === false ? images.active.reject : images.inactive.reject\"\r\n (click)=\"toggleRejection(document)\">\r\n </ng-fad-image-inline>\r\n \r\n \r\n <ng-fad-image-inline\r\n [src]=\"document.approved === true ? images.active.approve : images.inactive.approve\"\r\n (click)=\"toggleApproval(document)\">\r\n </ng-fad-image-inline>\r\n </div>\r\n \r\n </div>\r\n <div class=\"actions\">\r\n <div>\r\n <div class=\"fad-portal-content-bold\" (click)=\"seeDocumentFea(document)\">\r\n {{ document.isVisible ? 'Ocultar documento' : 'Ver documento' }}\r\n </div>\r\n <div class=\"fad-portal-content-bold\" (click)=\"downloadDocumentFea(document)\">{{configuration.customization?.moduleCustomization?.legends?.download}}</div>\r\n </div>\r\n <div>\r\n {{ document.doc?.pages }} {{configuration.customization?.moduleCustomization?.legends?.pages}}\r\n </div>\r\n </div>\r\n \r\n <ng-fad-signature-fea-pdf-viewer-fea\r\n *ngIf=\"document.isVisible && document.doc?.file\"\r\n [file]=\"document.doc?.file\"\r\n [index]=\"i\"\r\n [id]=\"getDocumentId(document.id!)\"\r\n >\r\n </ng-fad-signature-fea-pdf-viewer-fea>\r\n \r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n \r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n <div class=\"fad-portal-content selector-document\">\r\n <div class=\"document-status-bar\">\r\n \r\n <div *ngIf=\"getApprovedCount() === 0 && getRejectedCount() === 0\" class=\"document-status-message \">\r\n Aprueba los documentos para firmarlos con tu e.firma\r\n </div>\r\n \r\n \r\n <div *ngIf=\"getApprovedCount() > 0 || getRejectedCount() > 0\" class=\"document-status-content\">\r\n <div class=\"approve-all\">\r\n <ng-fad-image-inline\r\n [src]=\"approveAll ? images.active.approve : images.inactive.approve\"\r\n (click)=\"approveAllDocuments()\">\r\n </ng-fad-image-inline>\r\n <span (click)=\"approveAllDocuments()\">Aprobar todos los documentos ({{ documentsApprovalList.length }})</span>\r\n </div>\r\n \r\n \r\n <div class=\"document-counts\">\r\n <span *ngIf=\"getApprovedCount() > 0 && getRejectedCount() === 0\" class=\"fad-portal-informative-bold\">\r\n {{ getApprovedCount() }} documentos aprobados\r\n </span>\r\n <span *ngIf=\"getRejectedCount() > 0 && getApprovedCount() === 0\" class=\"fad-portal-informative-bold\">\r\n {{ getRejectedCount() }} documentos rechazados\r\n </span>\r\n \r\n <ng-container *ngIf=\"getApprovedCount() > 0 && getRejectedCount() > 0\" >\r\n <span class=\"fad-portal-informative-bold\">\r\n {{ getApprovedCount() }} documentos aprobados\r\n </span>\r\n <span class=\"fad-portal-informative-bold\">\r\n {{ getRejectedCount() }} documentos rechazados\r\n </span>\r\n </ng-container>\r\n </div>\r\n \r\n \r\n <button class=\"fad-portal-primary\" (click)=\"emitApprovedDocuments()\">Continuar</button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </ng-container>\r\n ", styles: [":host{box-sizing:border-box}:host .fad-portal-content{display:flex;flex-direction:column;justify-content:center;width:100%;box-sizing:border-box;margin-top:var(--fad-portal-common-separation-lg)}:host .fad-portal-content .header{display:flex;align-items:center;justify-content:space-between;width:100%;background-color:#f5f5f5;border-radius:var(--fad-portal-common-input-border-radius);padding:var(--fad-portal-common-separation-md);overflow:hidden;box-sizing:border-box}:host .fad-portal-content .header div:nth-child(1){display:flex;flex-direction:column;row-gap:var(--fad-portal-common-separation-xs)}:host .fad-portal-content .header .info{color:var(--fad-portal-common-tertiary-color)}@media (max-width: 992px){:host .fad-portal-content .header{flex-direction:column;align-items:start;justify-content:center;row-gap:var(--fad-portal-common-separation-xs);margin-bottom:var(--fad-portal-common-separation-md)}}:host .fad-portal-content .documents-container{box-sizing:border-box}:host .fad-portal-content .documents-container .document{display:flex;align-items:center;flex-direction:column;width:100%;margin-top:var(--fad-portal-common-separation-md);border-radius:var(--fad-portal-common-input-border-radius);border:1px solid #f5f5f5}:host .fad-portal-content .documents-container .document .information{padding:var(--fad-portal-common-separation-md);display:flex;align-items:center;justify-content:space-between;width:100%}:host .fad-portal-content .documents-container .document .information .validate{padding-left:var(--fad-portal-common-separation-md);padding-right:var(--fad-portal-common-separation-md);display:flex;column-gap:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .information .document-name{padding-left:var(--fad-portal-common-separation-md);padding-right:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .actions{display:flex;align-items:center;justify-content:space-between;width:100%;background-color:#f5f5f5;padding:var(--fad-portal-common-separation-md);box-sizing:border-box;border-radius:var(--fad-portal-common-input-border-radius);border-top-left-radius:0;border-top-right-radius:0}:host .fad-portal-content .documents-container .document .actions div:nth-child(1){display:flex;align-items:center;gap:var(--fad-portal-common-separation-md)}:host .fad-portal-content .documents-container .document .actions div:nth-child(1) div{color:var(--fad-portal-common-primary-color)!important;cursor:pointer}:host .selector-document{width:100%;background-color:var(--fad-portal-common-tertiary-color);color:#fff;padding:var(--fad-portal-common-separation-md);margin-top:var(--fad-portal-common-separation-md);display:flex;align-items:center;justify-content:space-between;border-radius:var(--fad-portal-common-input-border-radius);box-sizing:border-box}:host .selector-document .document-status-message{display:flex;align-items:center;justify-content:center;width:100%;gap:var(--fad-portal-common-separation-md)}:host .selector-document .document-status-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;font-size:14px;box-sizing:border-box}:host .selector-document .document-status-bar .document-status-content{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;font-size:14px;box-sizing:border-box}:host .selector-document .document-status-bar .approve-all{display:flex;align-items:center;gap:10px;cursor:pointer;box-sizing:border-box}:host .selector-document .document-status-bar .approve-all span{cursor:pointer;-webkit-user-select:none;user-select:none}:host .selector-document .document-status-bar .document-counts{display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-xs);box-sizing:border-box}:host .selector-document .document-status-bar .document-counts span{color:#fff}:host .selector-document .document-status-bar .fad-portal-primary{min-width:0px;width:50%}@media (max-width: 992px){:host .selector-document .document-status-bar .fad-portal-primary{width:100%;margin-top:var(--fad-portal-common-separation-md)}}\n"] }]
|
|
626
646
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$2.FadService }, { type: i0.ChangeDetectorRef }, { type: i1.NgFadPdfReaderService }]; }, propDecorators: { configuration: [{
|
|
627
647
|
type: Input
|
|
628
648
|
}], rfc: [{
|
|
@@ -672,10 +692,6 @@ class UploadESignatureComponent {
|
|
|
672
692
|
this.onerror.emit(new ResponseError(UploadESignatureErrorCode.NO_DOCUMENTS, getUploadESignatureErrorDescription(UploadESignatureErrorCode.NO_DOCUMENTS), 'ng-fad-signature-fea-upload-e-signature'));
|
|
673
693
|
return false;
|
|
674
694
|
}
|
|
675
|
-
if (!this.signerId) {
|
|
676
|
-
this.onerror.emit(new ResponseError(UploadESignatureErrorCode.NO_SIGNER_ID, getUploadESignatureErrorDescription(UploadESignatureErrorCode.NO_SIGNER_ID), 'ng-fad-signature-fea-upload-e-signature'));
|
|
677
|
-
return false;
|
|
678
|
-
}
|
|
679
695
|
if (!this.rfc) {
|
|
680
696
|
this.onerror.emit(new ResponseError(UploadESignatureErrorCode.NO_RFC, getUploadESignatureErrorDescription(UploadESignatureErrorCode.NO_RFC), 'ng-fad-signature-fea-upload-e-signature'));
|
|
681
697
|
return false;
|
|
@@ -741,56 +757,75 @@ class UploadESignatureComponent {
|
|
|
741
757
|
allIsRejected() {
|
|
742
758
|
return this.documents.every(doc => doc.approved === false);
|
|
743
759
|
}
|
|
744
|
-
async
|
|
745
|
-
|
|
760
|
+
async onSignDocuments() {
|
|
761
|
+
const aprovedDocuments = this.documents.filter((doc) => doc.approved);
|
|
746
762
|
const rejectedDocuments = this.documents.filter((doc) => !doc.approved);
|
|
763
|
+
let cer = null;
|
|
764
|
+
if (aprovedDocuments.length > 0) {
|
|
765
|
+
const response = await this.signDocuments();
|
|
766
|
+
if (!response)
|
|
767
|
+
return;
|
|
768
|
+
cer = response;
|
|
769
|
+
}
|
|
747
770
|
if (rejectedDocuments.length > 0) {
|
|
748
|
-
|
|
771
|
+
const response = await this.rejectDocuments();
|
|
772
|
+
if (!response)
|
|
773
|
+
return;
|
|
749
774
|
}
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
return;
|
|
757
|
-
this.onloader.emit(true);
|
|
758
|
-
const key = await this.getBase64File(this.key?.value);
|
|
759
|
-
this.onloader.emit(false);
|
|
760
|
-
if (!key)
|
|
761
|
-
return;
|
|
762
|
-
const aprrovedDocuments = this.documents.filter((doc) => doc.approved);
|
|
763
|
-
const body = {
|
|
764
|
-
cer: cer.split(',')[1],
|
|
765
|
-
key: key.split(',')[1],
|
|
766
|
-
password: this.password?.value,
|
|
767
|
-
documents: aprrovedDocuments,
|
|
768
|
-
signerId: this.rfc
|
|
769
|
-
};
|
|
770
|
-
this.onloader.emit(true);
|
|
771
|
-
this.fad.signFea(body, this.configuration.credentials?.key, this.configuration.credentials?.iv, this.configuration.services?.reject).pipe(finalize(() => {
|
|
775
|
+
this.oncomplete.emit(cer);
|
|
776
|
+
}
|
|
777
|
+
async signDocuments() {
|
|
778
|
+
return new Promise(async (resolve, reject) => {
|
|
779
|
+
this.onloader.emit(true);
|
|
780
|
+
const cer = await this.getBase64File(this.cer?.value);
|
|
772
781
|
this.onloader.emit(false);
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
782
|
+
if (!cer)
|
|
783
|
+
reject(null);
|
|
784
|
+
this.onloader.emit(true);
|
|
785
|
+
const key = await this.getBase64File(this.key?.value);
|
|
786
|
+
this.onloader.emit(false);
|
|
787
|
+
if (!key)
|
|
788
|
+
reject(null);
|
|
789
|
+
const aprrovedDocuments = this.documents.filter((doc) => doc.approved);
|
|
790
|
+
const data = {
|
|
791
|
+
cer: cer.split(',')[1],
|
|
792
|
+
key: key.split(',')[1],
|
|
793
|
+
password: this.password?.value,
|
|
794
|
+
documents: aprrovedDocuments,
|
|
795
|
+
signerId: this.rfc
|
|
796
|
+
};
|
|
797
|
+
this.onloader.emit(true);
|
|
798
|
+
const body = await this.mifiel.getSignBody(data);
|
|
799
|
+
this.onloader.emit(false);
|
|
800
|
+
if (!body) {
|
|
801
|
+
this.onerror.emit(new ResponseError(UploadESignatureErrorCode.PASSWORD_ERROR, getUploadESignatureErrorDescription(UploadESignatureErrorCode.PASSWORD_ERROR), 'ng-fad-signature-fea-upload-e-signature'));
|
|
802
|
+
return;
|
|
803
|
+
}
|
|
804
|
+
this.onloader.emit(true);
|
|
805
|
+
this.fad.signFea(body, this.configuration.credentials?.key, this.configuration.credentials?.iv, this.configuration.services?.sign).pipe(finalize(() => {
|
|
806
|
+
this.onloader.emit(false);
|
|
807
|
+
})).subscribe({
|
|
808
|
+
next: (res) => {
|
|
809
|
+
if (res.success) {
|
|
810
|
+
const certificate = this.mifiel.parseCertificate(data.cer);
|
|
811
|
+
const cer = {
|
|
812
|
+
cer: certificate
|
|
813
|
+
};
|
|
814
|
+
resolve(cer);
|
|
815
|
+
}
|
|
816
|
+
else {
|
|
817
|
+
this.onerror.emit(new ResponseError(UploadESignatureErrorCode.SERVICE, res.error, 'ng-fad-signature-fea-upload-e-signature'));
|
|
818
|
+
reject(null);
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
error: (error) => {
|
|
822
|
+
this.onerror.emit(new ResponseError(UploadESignatureErrorCode.HTTP, error.error, 'ng-fad-signature-fea-upload-e-signature'));
|
|
823
|
+
reject(null);
|
|
824
|
+
},
|
|
825
|
+
});
|
|
791
826
|
});
|
|
792
827
|
}
|
|
793
|
-
rejectDocuments(
|
|
828
|
+
rejectDocuments() {
|
|
794
829
|
return new Promise((resolve, reject) => {
|
|
795
830
|
const rejectedDocuments = this.documents.filter((doc) => !doc.approved);
|
|
796
831
|
const body = {
|
|
@@ -811,25 +846,20 @@ class UploadESignatureComponent {
|
|
|
811
846
|
})).subscribe({
|
|
812
847
|
next: (res) => {
|
|
813
848
|
if (res.success) {
|
|
814
|
-
if (!fromSign)
|
|
815
|
-
this.oncomplete.emit(null);
|
|
816
849
|
resolve(true);
|
|
817
850
|
}
|
|
818
851
|
else {
|
|
819
852
|
this.onerror.emit(new ResponseError(UploadESignatureErrorCode.SERVICE, res.error, 'ng-fad-signature-fea-upload-e-signature'));
|
|
820
|
-
reject(
|
|
853
|
+
reject(false);
|
|
821
854
|
}
|
|
822
855
|
},
|
|
823
856
|
error: (error) => {
|
|
824
857
|
this.onerror.emit(new ResponseError(UploadESignatureErrorCode.HTTP, error.error, 'ng-fad-signature-fea-upload-e-signature'));
|
|
825
|
-
reject(
|
|
858
|
+
reject(false);
|
|
826
859
|
},
|
|
827
860
|
});
|
|
828
861
|
});
|
|
829
862
|
}
|
|
830
|
-
async onRejectDocument() {
|
|
831
|
-
await this.rejectDocuments();
|
|
832
|
-
}
|
|
833
863
|
async getBase64File(file) {
|
|
834
864
|
const data = await SharedUtils.fileToBase64(file).then(base64 => base64).catch(error => null);
|
|
835
865
|
if (data)
|
|
@@ -853,11 +883,11 @@ class UploadESignatureComponent {
|
|
|
853
883
|
Utils.setVariableCss('--fad-signature-fea-e-signature-file-img-background-color', this.configuration.customization?.moduleCustomization?.style?.file?.img?.backgroundColor, { targetElement });
|
|
854
884
|
}
|
|
855
885
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UploadESignatureComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FormBuilder }, { token: i2$2.FadService }, { token: i2$2.MifielService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
856
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UploadESignatureComponent, selector: "ng-fad-signature-fea-upload-e-signature", inputs: { configuration: "configuration", documents: "documents", signerId: "signerId", rfc: "rfc" }, outputs: { onerror: "onerror", onloader: "onloader", oncomplete: "oncomplete" }, ngImport: i0, template: "<ng-container *ngIf=\"showComponent\">\r\n <div>\r\n <div *ngIf=\"documents.length > 1\" class=\"fad-portal-title-bold\">{{ documentPluralTitle }}</div>\r\n <div *ngIf=\"documents.length === 1\" class=\"fad-portal-title-bold\">{{ documentSingularTitle }}</div>\r\n\r\n <div class=\"container-document fad-portal-content\">\r\n <div *ngFor=\"let i of documents\" class=\"document\">\r\n <div>{{ i.doc.name }}</div>\r\n <div class=\"status fad-portal-content-bold\">{{ i.approved ? configuration.customization?.moduleCustomization?.legends?.documents?.status?.approved : configuration.customization?.moduleCustomization?.legends?.documents?.status?.rejected }}</div>\r\n <div class=\"pages\">{{ i.doc.pages }} {{ i.doc.pages > 1 ? configuration.customization?.moduleCustomization?.legends?.documents?.pages?.plural : configuration.customization?.moduleCustomization?.legends?.documents?.pages?.singular }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!allIsRejected()\">\r\n <div class=\"fad-portal-title-bold\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.title }}</div>\r\n\r\n <div>\r\n <div class=\"container-instruction-file\">\r\n <div class=\"fad-portal-content\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.label }}</div>\r\n <div *ngIf=\"cer?.value\" class=\"fad-portal-content select-file\" (click)=\"openFilePicker(fileCerInput)\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.upload }}</div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"!cer?.value\"\r\n class=\"container-upload\"\r\n (click)=\"openFilePicker(fileCerInput)\"\r\n dragDropDocument\r\n [formatList]=\"formatCerList\"\r\n [acceptMultipleFiles]=\"false\"\r\n (onfiledropped)=\"onfiledropped($event, 'cer')\"\r\n (onerror)=\"onerrorDirective($event, 'cer')\">\r\n <div class=\"fad-portal-content instruction\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.instruction }}</div>\r\n <div class=\"fad-portal-content-bold upload-btn\">\r\n <ng-fad-image-inline [src]=\"uploadImg\"></ng-fad-image-inline>\r\n <span>{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.upload }}</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"cer?.value\" class=\"container-file\">\r\n <div class=\"document-img\">\r\n <img [src]=\"fileImg\" alt=\"\">\r\n </div>\r\n <div class=\"fad-portal-content\">{{ cer?.value.name }}</div>\r\n </div>\r\n\r\n <input type=\"file\" accept=\".cer\" #fileCerInput style=\"display: none\" (change)=\"onFileChange($event, 'cer')\">\r\n </div>\r\n\r\n <div>\r\n <div class=\"container-instruction-file\">\r\n <div class=\"fad-portal-content\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.label }}</div>\r\n <div *ngIf=\"key?.value\" class=\"fad-portal-content select-file\" (click)=\"openFilePicker(fileKeyInput)\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.upload }}</div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"!key?.value\"\r\n class=\"container-upload\"\r\n (click)=\"openFilePicker(fileKeyInput)\"\r\n dragDropDocument\r\n [formatList]=\"formatKeyList\"\r\n [acceptMultipleFiles]=\"false\"\r\n (onfiledropped)=\"onfiledropped($event, 'key')\"\r\n (onerror)=\"onerrorDirective($event, 'key')\">\r\n\r\n <div class=\"fad-portal-content instruction\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.instruction }}</div>\r\n <div class=\"fad-portal-content-bold upload-btn\">\r\n <ng-fad-image-inline [src]=\"uploadImg\"></ng-fad-image-inline>\r\n <span>{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.upload }}</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"key?.value\" class=\"container-file\">\r\n <div class=\"document-img\">\r\n <img [src]=\"fileImg\" alt=\"\">\r\n </div>\r\n <div class=\"fad-portal-content\">{{ key?.value.name }}</div>\r\n </div>\r\n\r\n <input type=\"file\" accept=\".key\" #fileKeyInput style=\"display: none\" (change)=\"onFileChange($event, 'key')\">\r\n </div>\r\n\r\n <div class=\"fad-portal-container-input\">\r\n <label class=\"fad-portal-content\" for=\"\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.label }}</label>\r\n <div class=\"input-password\">\r\n <input [type]=\"passwordInputType\" (input)=\"savePassword($event)\">\r\n <div class=\"fad-portal-content-bold password-show\">\r\n <div *ngIf=\"passwordInputType === 'text'\" (click)=\"changePaswordInputType()\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.hide }}</div>\r\n <div *ngIf=\"passwordInputType === 'password'\" (click)=\"changePaswordInputType()\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.show }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n\r\n <div></div>\r\n\r\n <div class=\"fad-portal-content container-confirm\">\r\n <div *ngIf=\"!allIsRejected()\" (click)=\"isValidated = !isValidated\">\r\n <div>\r\n <ng-fad-image-inline *ngIf=\"isValidated\" [src]=\"checkOnImg\"></ng-fad-image-inline>\r\n <ng-fad-image-inline *ngIf=\"!isValidated\" [src]=\"checkOffImg\"></ng-fad-image-inline>\r\n </div>\r\n <div *ngIf=\"documents.length === 1\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.validate?.singular }}</div>\r\n <div *ngIf=\"documents.length > 1\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.validate?.plural }}</div>\r\n </div>\r\n\r\n <div></div>\r\n\r\n <div class=\"action\">\r\n <button type=\"button\" *ngIf=\"documents.length === 1 && !allIsRejected()\" class=\"fad-portal-primary\" [disabled]=\"!form.valid || !isValidated\" (click)=\"signDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.sign?.singular }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length > 1 && !allIsRejected()\" class=\"fad-portal-primary\" [disabled]=\"!form.valid || !isValidated\" (click)=\"signDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.sign?.plural }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length === 1 && allIsRejected()\" class=\"fad-portal-primary\" (click)=\"onRejectDocument()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.reject?.singular }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length > 1 && allIsRejected()\" class=\"fad-portal-primary\" (click)=\"onRejectDocument()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.reject?.plural }}</button>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-md)}:host .container-document{display:flex;flex-direction:column;width:100%;background-color:var(--fad-signature-fea-e-signature-documents-background-color);border-radius:var(--fad-signature-fea-e-signature-documents-border-radius);padding:var(--fad-portal-common-separation-md);box-sizing:border-box;margin-top:var(--fad-portal-common-separation-xs)}:host .container-document .document{display:flex;gap:var(--fad-portal-common-separation-md);justify-content:space-between;border-bottom:1px solid var(--fad-portal-common-border-color);padding:var(--fad-portal-common-separation-md) 0}:host .container-document .document>div{flex:1}:host .container-document .document .status{text-align:center}:host .container-document .document .pages{text-align:end;color:var(--fad-portal-common-legends-secondary)}:host .document:only-child{border-bottom:none!important}:host .container-instruction-file{display:flex;gap:var(--fad-portal-common-separation-md);justify-content:space-between}:host .container-instruction-file .select-file{color:var(--fad-portal-common-primary-color);cursor:pointer}:host .container-upload{width:100%;box-sizing:border-box;border-radius:var(--fad-signature-fea-e-signature-upload-border-radius);border:var(--fad-signature-fea-e-signature-upload-border);padding:var(--fad-portal-common-separation-md);margin-top:var(--fad-portal-common-separation-xs);display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-xs);align-items:center;justify-content:center;text-align:center;background-color:var(--fad-signature-fea-e-signature-upload-background-color)}:host .container-upload .instruction{color:var(--fad-portal-common-legends-secondary)}:host .container-upload .upload-btn{max-width:90%;width:300px;box-sizing:border-box;background-color:var(--fad-signature-fea-e-signature-upload-button-background-color);border-radius:var(--fad-signature-fea-e-signature-upload-button-border-radius);color:var(--fad-portal-common-legends-tertiary);padding:var(--fad-portal-common-separation-xs);cursor:pointer;transition:all .2s ease-out;display:flex;align-items:center;justify-content:center;text-align:center;gap:var(--fad-portal-common-separation-xs)}:host .container-upload .upload-btn:hover{background-color:var(--fad-signature-fea-e-signature-upload-button-hover)}:host .container-file{display:flex;gap:var(--fad-portal-common-separation-md);align-items:center;padding:var(--fad-portal-common-separation-md);border:2px solid var(--fad-portal-common-successful-color);height:71px;border-radius:var(--fad-signature-fea-e-signature-file-border-radius);margin-top:var(--fad-portal-common-separation-xs)}:host .container-file .document-img{background-color:var(--fad-signature-fea-e-signature-file-img-background-color);width:40px;height:40px;border-radius:100%;display:flex;align-items:center;justify-content:center}:host .container-file .document-img img{width:60%;max-width:100%;max-height:100%}:host .fad-portal-container-input .input-password{position:relative}:host .fad-portal-container-input .input-password input{padding-right:100px}:host .fad-portal-container-input .input-password .password-show{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:var(--fad-portal-common-legends-secondary);cursor:pointer}:host .container-confirm{display:flex;justify-content:space-between;align-items:center;gap:var(--fad-portal-common-separation-xs)}:host .container-confirm>div:first-child{display:flex;gap:var(--fad-portal-common-separation-xs)}:host .container-confirm>div:first-child>div:first-child{width:25px;height:25px}:host .container-confirm .action{max-width:80%;width:400px}:host .container-confirm ng-fad-image-inline{cursor:pointer}@media (max-width: 992px){:host .container-document .document{flex-direction:column;gap:var(--fad-portal-common-separation-xs)}:host .container-document .document .status,:host .container-document .document .pages{text-align:start!important}:host .container-confirm{flex-direction:column}:host .container-confirm .action{max-width:100%;width:100%!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DragDropDocumentDirective, selector: "[dragDropDocument]", inputs: ["formatList", "acceptMultipleFiles"], outputs: ["onfiledropped", "onerror"] }, { kind: "component", type: i4.NgFadImageInlineComponent, selector: "ng-fad-image-inline", inputs: ["src"] }] }); }
|
|
886
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UploadESignatureComponent, selector: "ng-fad-signature-fea-upload-e-signature", inputs: { configuration: "configuration", documents: "documents", signerId: "signerId", rfc: "rfc" }, outputs: { onerror: "onerror", onloader: "onloader", oncomplete: "oncomplete" }, ngImport: i0, template: "<ng-container *ngIf=\"showComponent\">\r\n <div>\r\n <div *ngIf=\"documents.length > 1\" class=\"fad-portal-title-bold\">{{ documentPluralTitle }}</div>\r\n <div *ngIf=\"documents.length === 1\" class=\"fad-portal-title-bold\">{{ documentSingularTitle }}</div>\r\n\r\n <div class=\"container-document fad-portal-content\">\r\n <div *ngFor=\"let i of documents\" class=\"document\">\r\n <div>{{ i.doc.name }}</div>\r\n <div class=\"status fad-portal-content-bold\">{{ i.approved ? configuration.customization?.moduleCustomization?.legends?.documents?.status?.approved : configuration.customization?.moduleCustomization?.legends?.documents?.status?.rejected }}</div>\r\n <div class=\"pages\">{{ i.doc.pages }} {{ i.doc.pages > 1 ? configuration.customization?.moduleCustomization?.legends?.documents?.pages?.plural : configuration.customization?.moduleCustomization?.legends?.documents?.pages?.singular }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!allIsRejected()\">\r\n <div class=\"fad-portal-title-bold\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.title }}</div>\r\n\r\n <div>\r\n <div class=\"container-instruction-file\">\r\n <div class=\"fad-portal-content\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.label }}</div>\r\n <div *ngIf=\"cer?.value\" class=\"fad-portal-content select-file\" (click)=\"openFilePicker(fileCerInput)\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.upload }}</div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"!cer?.value\"\r\n class=\"container-upload\"\r\n (click)=\"openFilePicker(fileCerInput)\"\r\n dragDropDocument\r\n [formatList]=\"formatCerList\"\r\n [acceptMultipleFiles]=\"false\"\r\n (onfiledropped)=\"onfiledropped($event, 'cer')\"\r\n (onerror)=\"onerrorDirective($event, 'cer')\">\r\n <div class=\"fad-portal-content instruction\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.instruction }}</div>\r\n <div class=\"fad-portal-content-bold upload-btn\">\r\n <ng-fad-image-inline [src]=\"uploadImg\"></ng-fad-image-inline>\r\n <span>{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.upload }}</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"cer?.value\" class=\"container-file\">\r\n <div class=\"document-img\">\r\n <img [src]=\"fileImg\" alt=\"\">\r\n </div>\r\n <div class=\"fad-portal-content\">{{ cer?.value.name }}</div>\r\n </div>\r\n\r\n <input type=\"file\" accept=\".cer\" #fileCerInput style=\"display: none\" (change)=\"onFileChange($event, 'cer')\">\r\n </div>\r\n\r\n <div>\r\n <div class=\"container-instruction-file\">\r\n <div class=\"fad-portal-content\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.label }}</div>\r\n <div *ngIf=\"key?.value\" class=\"fad-portal-content select-file\" (click)=\"openFilePicker(fileKeyInput)\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.upload }}</div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"!key?.value\"\r\n class=\"container-upload\"\r\n (click)=\"openFilePicker(fileKeyInput)\"\r\n dragDropDocument\r\n [formatList]=\"formatKeyList\"\r\n [acceptMultipleFiles]=\"false\"\r\n (onfiledropped)=\"onfiledropped($event, 'key')\"\r\n (onerror)=\"onerrorDirective($event, 'key')\">\r\n\r\n <div class=\"fad-portal-content instruction\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.instruction }}</div>\r\n <div class=\"fad-portal-content-bold upload-btn\">\r\n <ng-fad-image-inline [src]=\"uploadImg\"></ng-fad-image-inline>\r\n <span>{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.upload }}</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"key?.value\" class=\"container-file\">\r\n <div class=\"document-img\">\r\n <img [src]=\"fileImg\" alt=\"\">\r\n </div>\r\n <div class=\"fad-portal-content\">{{ key?.value.name }}</div>\r\n </div>\r\n\r\n <input type=\"file\" accept=\".key\" #fileKeyInput style=\"display: none\" (change)=\"onFileChange($event, 'key')\">\r\n </div>\r\n\r\n <div class=\"fad-portal-container-input\" [formGroup]=\"form\">\r\n <label class=\"fad-portal-content\" for=\"\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.label }}</label>\r\n <div class=\"input-password\">\r\n <input [type]=\"passwordInputType\" (input)=\"savePassword($event)\" formControlName=\"password\"/>\r\n <div class=\"fad-portal-content-bold password-show\">\r\n <div *ngIf=\"passwordInputType === 'text'\" (click)=\"changePaswordInputType()\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.hide }}</div>\r\n <div *ngIf=\"passwordInputType === 'password'\" (click)=\"changePaswordInputType()\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.show }}</div>\r\n </div>\r\n <ng-fad-portal-shared-form-errors [formData]=\"password!\" [configuration]=\"configuration.formErrors?.configuration!\"></ng-fad-portal-shared-form-errors>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n\r\n <div></div>\r\n\r\n <div class=\"fad-portal-content container-confirm\">\r\n <div *ngIf=\"!allIsRejected()\" (click)=\"isValidated = !isValidated\">\r\n <div>\r\n <ng-fad-image-inline *ngIf=\"isValidated\" [src]=\"checkOnImg\"></ng-fad-image-inline>\r\n <ng-fad-image-inline *ngIf=\"!isValidated\" [src]=\"checkOffImg\"></ng-fad-image-inline>\r\n </div>\r\n <div *ngIf=\"documents.length === 1\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.validate?.singular }}</div>\r\n <div *ngIf=\"documents.length > 1\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.validate?.plural }}</div>\r\n </div>\r\n\r\n <div></div>\r\n\r\n <div class=\"action\">\r\n <button type=\"button\" *ngIf=\"documents.length === 1 && !allIsRejected()\" class=\"fad-portal-primary\" [disabled]=\"!form.valid || !isValidated\" (click)=\"onSignDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.sign?.singular }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length > 1 && !allIsRejected()\" class=\"fad-portal-primary\" [disabled]=\"!form.valid || !isValidated\" (click)=\"onSignDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.sign?.plural }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length === 1 && allIsRejected()\" class=\"fad-portal-primary\" (click)=\"onSignDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.reject?.singular }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length > 1 && allIsRejected()\" class=\"fad-portal-primary\" (click)=\"onSignDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.reject?.plural }}</button>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-md)}:host .container-document{display:flex;flex-direction:column;width:100%;background-color:var(--fad-signature-fea-e-signature-documents-background-color);border-radius:var(--fad-signature-fea-e-signature-documents-border-radius);padding:var(--fad-portal-common-separation-md);box-sizing:border-box;margin-top:var(--fad-portal-common-separation-xs)}:host .container-document .document{display:flex;gap:var(--fad-portal-common-separation-md);justify-content:space-between;border-bottom:1px solid var(--fad-portal-common-border-color);padding:var(--fad-portal-common-separation-md) 0}:host .container-document .document>div{flex:1}:host .container-document .document .status{text-align:center}:host .container-document .document .pages{text-align:end;color:var(--fad-portal-common-legends-secondary)}:host .document:only-child{border-bottom:none!important}:host .container-instruction-file{display:flex;gap:var(--fad-portal-common-separation-md);justify-content:space-between}:host .container-instruction-file .select-file{color:var(--fad-portal-common-primary-color);cursor:pointer}:host .container-upload{width:100%;box-sizing:border-box;border-radius:var(--fad-signature-fea-e-signature-upload-border-radius);border:var(--fad-signature-fea-e-signature-upload-border);padding:var(--fad-portal-common-separation-md);margin-top:var(--fad-portal-common-separation-xs);display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-xs);align-items:center;justify-content:center;text-align:center;background-color:var(--fad-signature-fea-e-signature-upload-background-color)}:host .container-upload .instruction{color:var(--fad-portal-common-legends-secondary)}:host .container-upload .upload-btn{max-width:90%;width:300px;box-sizing:border-box;background-color:var(--fad-signature-fea-e-signature-upload-button-background-color);border-radius:var(--fad-signature-fea-e-signature-upload-button-border-radius);color:var(--fad-portal-common-legends-tertiary);padding:var(--fad-portal-common-separation-xs);cursor:pointer;transition:all .2s ease-out;display:flex;align-items:center;justify-content:center;text-align:center;gap:var(--fad-portal-common-separation-xs)}:host .container-upload .upload-btn:hover{background-color:var(--fad-signature-fea-e-signature-upload-button-hover)}:host .container-file{display:flex;gap:var(--fad-portal-common-separation-md);align-items:center;padding:var(--fad-portal-common-separation-md);border:2px solid var(--fad-portal-common-successful-color);height:71px;border-radius:var(--fad-signature-fea-e-signature-file-border-radius);margin-top:var(--fad-portal-common-separation-xs)}:host .container-file .fad-portal-content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .container-file .document-img{background-color:var(--fad-signature-fea-e-signature-file-img-background-color);width:40px;height:40px;border-radius:100%;display:flex;align-items:center;justify-content:center}:host .container-file .document-img img{width:60%;max-width:100%;max-height:100%}:host .fad-portal-container-input .input-password{position:relative}:host .fad-portal-container-input .input-password input{padding-right:100px}:host .fad-portal-container-input .input-password .password-show{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:var(--fad-portal-common-legends-secondary);cursor:pointer}:host .container-confirm{display:flex;justify-content:space-between;align-items:center;gap:var(--fad-portal-common-separation-xs)}:host .container-confirm>div:first-child{display:flex;gap:var(--fad-portal-common-separation-xs)}:host .container-confirm>div:first-child>div:first-child{width:25px;height:25px}:host .container-confirm .action{max-width:80%;width:400px}:host .container-confirm ng-fad-image-inline{cursor:pointer}@media (max-width: 992px){:host .container-document .document{flex-direction:column;gap:var(--fad-portal-common-separation-xs)}:host .container-document .document .status,:host .container-document .document .pages{text-align:start!important}:host .container-confirm{flex-direction:column}:host .container-confirm .action{max-width:100%;width:100%!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.DragDropDocumentDirective, selector: "[dragDropDocument]", inputs: ["formatList", "acceptMultipleFiles"], outputs: ["onfiledropped", "onerror"] }, { kind: "component", type: i4.FormErrorsComponent, selector: "ng-fad-portal-shared-form-errors", inputs: ["configuration", "formData"], outputs: ["onerror"] }, { kind: "component", type: i4$1.NgFadImageInlineComponent, selector: "ng-fad-image-inline", inputs: ["src"] }] }); }
|
|
857
887
|
}
|
|
858
888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UploadESignatureComponent, decorators: [{
|
|
859
889
|
type: Component,
|
|
860
|
-
args: [{ selector: 'ng-fad-signature-fea-upload-e-signature', template: "<ng-container *ngIf=\"showComponent\">\r\n <div>\r\n <div *ngIf=\"documents.length > 1\" class=\"fad-portal-title-bold\">{{ documentPluralTitle }}</div>\r\n <div *ngIf=\"documents.length === 1\" class=\"fad-portal-title-bold\">{{ documentSingularTitle }}</div>\r\n\r\n <div class=\"container-document fad-portal-content\">\r\n <div *ngFor=\"let i of documents\" class=\"document\">\r\n <div>{{ i.doc.name }}</div>\r\n <div class=\"status fad-portal-content-bold\">{{ i.approved ? configuration.customization?.moduleCustomization?.legends?.documents?.status?.approved : configuration.customization?.moduleCustomization?.legends?.documents?.status?.rejected }}</div>\r\n <div class=\"pages\">{{ i.doc.pages }} {{ i.doc.pages > 1 ? configuration.customization?.moduleCustomization?.legends?.documents?.pages?.plural : configuration.customization?.moduleCustomization?.legends?.documents?.pages?.singular }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!allIsRejected()\">\r\n <div class=\"fad-portal-title-bold\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.title }}</div>\r\n\r\n <div>\r\n <div class=\"container-instruction-file\">\r\n <div class=\"fad-portal-content\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.label }}</div>\r\n <div *ngIf=\"cer?.value\" class=\"fad-portal-content select-file\" (click)=\"openFilePicker(fileCerInput)\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.upload }}</div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"!cer?.value\"\r\n class=\"container-upload\"\r\n (click)=\"openFilePicker(fileCerInput)\"\r\n dragDropDocument\r\n [formatList]=\"formatCerList\"\r\n [acceptMultipleFiles]=\"false\"\r\n (onfiledropped)=\"onfiledropped($event, 'cer')\"\r\n (onerror)=\"onerrorDirective($event, 'cer')\">\r\n <div class=\"fad-portal-content instruction\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.instruction }}</div>\r\n <div class=\"fad-portal-content-bold upload-btn\">\r\n <ng-fad-image-inline [src]=\"uploadImg\"></ng-fad-image-inline>\r\n <span>{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.upload }}</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"cer?.value\" class=\"container-file\">\r\n <div class=\"document-img\">\r\n <img [src]=\"fileImg\" alt=\"\">\r\n </div>\r\n <div class=\"fad-portal-content\">{{ cer?.value.name }}</div>\r\n </div>\r\n\r\n <input type=\"file\" accept=\".cer\" #fileCerInput style=\"display: none\" (change)=\"onFileChange($event, 'cer')\">\r\n </div>\r\n\r\n <div>\r\n <div class=\"container-instruction-file\">\r\n <div class=\"fad-portal-content\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.label }}</div>\r\n <div *ngIf=\"key?.value\" class=\"fad-portal-content select-file\" (click)=\"openFilePicker(fileKeyInput)\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.upload }}</div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"!key?.value\"\r\n class=\"container-upload\"\r\n (click)=\"openFilePicker(fileKeyInput)\"\r\n dragDropDocument\r\n [formatList]=\"formatKeyList\"\r\n [acceptMultipleFiles]=\"false\"\r\n (onfiledropped)=\"onfiledropped($event, 'key')\"\r\n (onerror)=\"onerrorDirective($event, 'key')\">\r\n\r\n <div class=\"fad-portal-content instruction\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.instruction }}</div>\r\n <div class=\"fad-portal-content-bold upload-btn\">\r\n <ng-fad-image-inline [src]=\"uploadImg\"></ng-fad-image-inline>\r\n <span>{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.upload }}</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"key?.value\" class=\"container-file\">\r\n <div class=\"document-img\">\r\n <img [src]=\"fileImg\" alt=\"\">\r\n </div>\r\n <div class=\"fad-portal-content\">{{ key?.value.name }}</div>\r\n </div>\r\n\r\n <input type=\"file\" accept=\".key\" #fileKeyInput style=\"display: none\" (change)=\"onFileChange($event, 'key')\">\r\n </div>\r\n\r\n <div class=\"fad-portal-container-input\">\r\n <label class=\"fad-portal-content\" for=\"\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.label }}</label>\r\n <div class=\"input-password\">\r\n <input [type]=\"passwordInputType\" (input)=\"savePassword($event)\">\r\n <div class=\"fad-portal-content-bold password-show\">\r\n <div *ngIf=\"passwordInputType === 'text'\" (click)=\"changePaswordInputType()\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.hide }}</div>\r\n <div *ngIf=\"passwordInputType === 'password'\" (click)=\"changePaswordInputType()\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.show }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n\r\n <div></div>\r\n\r\n <div class=\"fad-portal-content container-confirm\">\r\n <div *ngIf=\"!allIsRejected()\" (click)=\"isValidated = !isValidated\">\r\n <div>\r\n <ng-fad-image-inline *ngIf=\"isValidated\" [src]=\"checkOnImg\"></ng-fad-image-inline>\r\n <ng-fad-image-inline *ngIf=\"!isValidated\" [src]=\"checkOffImg\"></ng-fad-image-inline>\r\n </div>\r\n <div *ngIf=\"documents.length === 1\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.validate?.singular }}</div>\r\n <div *ngIf=\"documents.length > 1\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.validate?.plural }}</div>\r\n </div>\r\n\r\n <div></div>\r\n\r\n <div class=\"action\">\r\n <button type=\"button\" *ngIf=\"documents.length === 1 && !allIsRejected()\" class=\"fad-portal-primary\" [disabled]=\"!form.valid || !isValidated\" (click)=\"signDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.sign?.singular }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length > 1 && !allIsRejected()\" class=\"fad-portal-primary\" [disabled]=\"!form.valid || !isValidated\" (click)=\"signDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.sign?.plural }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length === 1 && allIsRejected()\" class=\"fad-portal-primary\" (click)=\"onRejectDocument()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.reject?.singular }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length > 1 && allIsRejected()\" class=\"fad-portal-primary\" (click)=\"onRejectDocument()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.reject?.plural }}</button>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-md)}:host .container-document{display:flex;flex-direction:column;width:100%;background-color:var(--fad-signature-fea-e-signature-documents-background-color);border-radius:var(--fad-signature-fea-e-signature-documents-border-radius);padding:var(--fad-portal-common-separation-md);box-sizing:border-box;margin-top:var(--fad-portal-common-separation-xs)}:host .container-document .document{display:flex;gap:var(--fad-portal-common-separation-md);justify-content:space-between;border-bottom:1px solid var(--fad-portal-common-border-color);padding:var(--fad-portal-common-separation-md) 0}:host .container-document .document>div{flex:1}:host .container-document .document .status{text-align:center}:host .container-document .document .pages{text-align:end;color:var(--fad-portal-common-legends-secondary)}:host .document:only-child{border-bottom:none!important}:host .container-instruction-file{display:flex;gap:var(--fad-portal-common-separation-md);justify-content:space-between}:host .container-instruction-file .select-file{color:var(--fad-portal-common-primary-color);cursor:pointer}:host .container-upload{width:100%;box-sizing:border-box;border-radius:var(--fad-signature-fea-e-signature-upload-border-radius);border:var(--fad-signature-fea-e-signature-upload-border);padding:var(--fad-portal-common-separation-md);margin-top:var(--fad-portal-common-separation-xs);display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-xs);align-items:center;justify-content:center;text-align:center;background-color:var(--fad-signature-fea-e-signature-upload-background-color)}:host .container-upload .instruction{color:var(--fad-portal-common-legends-secondary)}:host .container-upload .upload-btn{max-width:90%;width:300px;box-sizing:border-box;background-color:var(--fad-signature-fea-e-signature-upload-button-background-color);border-radius:var(--fad-signature-fea-e-signature-upload-button-border-radius);color:var(--fad-portal-common-legends-tertiary);padding:var(--fad-portal-common-separation-xs);cursor:pointer;transition:all .2s ease-out;display:flex;align-items:center;justify-content:center;text-align:center;gap:var(--fad-portal-common-separation-xs)}:host .container-upload .upload-btn:hover{background-color:var(--fad-signature-fea-e-signature-upload-button-hover)}:host .container-file{display:flex;gap:var(--fad-portal-common-separation-md);align-items:center;padding:var(--fad-portal-common-separation-md);border:2px solid var(--fad-portal-common-successful-color);height:71px;border-radius:var(--fad-signature-fea-e-signature-file-border-radius);margin-top:var(--fad-portal-common-separation-xs)}:host .container-file .document-img{background-color:var(--fad-signature-fea-e-signature-file-img-background-color);width:40px;height:40px;border-radius:100%;display:flex;align-items:center;justify-content:center}:host .container-file .document-img img{width:60%;max-width:100%;max-height:100%}:host .fad-portal-container-input .input-password{position:relative}:host .fad-portal-container-input .input-password input{padding-right:100px}:host .fad-portal-container-input .input-password .password-show{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:var(--fad-portal-common-legends-secondary);cursor:pointer}:host .container-confirm{display:flex;justify-content:space-between;align-items:center;gap:var(--fad-portal-common-separation-xs)}:host .container-confirm>div:first-child{display:flex;gap:var(--fad-portal-common-separation-xs)}:host .container-confirm>div:first-child>div:first-child{width:25px;height:25px}:host .container-confirm .action{max-width:80%;width:400px}:host .container-confirm ng-fad-image-inline{cursor:pointer}@media (max-width: 992px){:host .container-document .document{flex-direction:column;gap:var(--fad-portal-common-separation-xs)}:host .container-document .document .status,:host .container-document .document .pages{text-align:start!important}:host .container-confirm{flex-direction:column}:host .container-confirm .action{max-width:100%;width:100%!important}}\n"] }]
|
|
890
|
+
args: [{ selector: 'ng-fad-signature-fea-upload-e-signature', template: "<ng-container *ngIf=\"showComponent\">\r\n <div>\r\n <div *ngIf=\"documents.length > 1\" class=\"fad-portal-title-bold\">{{ documentPluralTitle }}</div>\r\n <div *ngIf=\"documents.length === 1\" class=\"fad-portal-title-bold\">{{ documentSingularTitle }}</div>\r\n\r\n <div class=\"container-document fad-portal-content\">\r\n <div *ngFor=\"let i of documents\" class=\"document\">\r\n <div>{{ i.doc.name }}</div>\r\n <div class=\"status fad-portal-content-bold\">{{ i.approved ? configuration.customization?.moduleCustomization?.legends?.documents?.status?.approved : configuration.customization?.moduleCustomization?.legends?.documents?.status?.rejected }}</div>\r\n <div class=\"pages\">{{ i.doc.pages }} {{ i.doc.pages > 1 ? configuration.customization?.moduleCustomization?.legends?.documents?.pages?.plural : configuration.customization?.moduleCustomization?.legends?.documents?.pages?.singular }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!allIsRejected()\">\r\n <div class=\"fad-portal-title-bold\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.title }}</div>\r\n\r\n <div>\r\n <div class=\"container-instruction-file\">\r\n <div class=\"fad-portal-content\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.label }}</div>\r\n <div *ngIf=\"cer?.value\" class=\"fad-portal-content select-file\" (click)=\"openFilePicker(fileCerInput)\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.upload }}</div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"!cer?.value\"\r\n class=\"container-upload\"\r\n (click)=\"openFilePicker(fileCerInput)\"\r\n dragDropDocument\r\n [formatList]=\"formatCerList\"\r\n [acceptMultipleFiles]=\"false\"\r\n (onfiledropped)=\"onfiledropped($event, 'cer')\"\r\n (onerror)=\"onerrorDirective($event, 'cer')\">\r\n <div class=\"fad-portal-content instruction\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.instruction }}</div>\r\n <div class=\"fad-portal-content-bold upload-btn\">\r\n <ng-fad-image-inline [src]=\"uploadImg\"></ng-fad-image-inline>\r\n <span>{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.cer?.upload }}</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"cer?.value\" class=\"container-file\">\r\n <div class=\"document-img\">\r\n <img [src]=\"fileImg\" alt=\"\">\r\n </div>\r\n <div class=\"fad-portal-content\">{{ cer?.value.name }}</div>\r\n </div>\r\n\r\n <input type=\"file\" accept=\".cer\" #fileCerInput style=\"display: none\" (change)=\"onFileChange($event, 'cer')\">\r\n </div>\r\n\r\n <div>\r\n <div class=\"container-instruction-file\">\r\n <div class=\"fad-portal-content\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.label }}</div>\r\n <div *ngIf=\"key?.value\" class=\"fad-portal-content select-file\" (click)=\"openFilePicker(fileKeyInput)\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.upload }}</div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"!key?.value\"\r\n class=\"container-upload\"\r\n (click)=\"openFilePicker(fileKeyInput)\"\r\n dragDropDocument\r\n [formatList]=\"formatKeyList\"\r\n [acceptMultipleFiles]=\"false\"\r\n (onfiledropped)=\"onfiledropped($event, 'key')\"\r\n (onerror)=\"onerrorDirective($event, 'key')\">\r\n\r\n <div class=\"fad-portal-content instruction\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.instruction }}</div>\r\n <div class=\"fad-portal-content-bold upload-btn\">\r\n <ng-fad-image-inline [src]=\"uploadImg\"></ng-fad-image-inline>\r\n <span>{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.key?.upload }}</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"key?.value\" class=\"container-file\">\r\n <div class=\"document-img\">\r\n <img [src]=\"fileImg\" alt=\"\">\r\n </div>\r\n <div class=\"fad-portal-content\">{{ key?.value.name }}</div>\r\n </div>\r\n\r\n <input type=\"file\" accept=\".key\" #fileKeyInput style=\"display: none\" (change)=\"onFileChange($event, 'key')\">\r\n </div>\r\n\r\n <div class=\"fad-portal-container-input\" [formGroup]=\"form\">\r\n <label class=\"fad-portal-content\" for=\"\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.label }}</label>\r\n <div class=\"input-password\">\r\n <input [type]=\"passwordInputType\" (input)=\"savePassword($event)\" formControlName=\"password\"/>\r\n <div class=\"fad-portal-content-bold password-show\">\r\n <div *ngIf=\"passwordInputType === 'text'\" (click)=\"changePaswordInputType()\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.hide }}</div>\r\n <div *ngIf=\"passwordInputType === 'password'\" (click)=\"changePaswordInputType()\">{{ configuration.customization?.moduleCustomization?.legends?.eSignature?.password?.show }}</div>\r\n </div>\r\n <ng-fad-portal-shared-form-errors [formData]=\"password!\" [configuration]=\"configuration.formErrors?.configuration!\"></ng-fad-portal-shared-form-errors>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n\r\n <div></div>\r\n\r\n <div class=\"fad-portal-content container-confirm\">\r\n <div *ngIf=\"!allIsRejected()\" (click)=\"isValidated = !isValidated\">\r\n <div>\r\n <ng-fad-image-inline *ngIf=\"isValidated\" [src]=\"checkOnImg\"></ng-fad-image-inline>\r\n <ng-fad-image-inline *ngIf=\"!isValidated\" [src]=\"checkOffImg\"></ng-fad-image-inline>\r\n </div>\r\n <div *ngIf=\"documents.length === 1\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.validate?.singular }}</div>\r\n <div *ngIf=\"documents.length > 1\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.validate?.plural }}</div>\r\n </div>\r\n\r\n <div></div>\r\n\r\n <div class=\"action\">\r\n <button type=\"button\" *ngIf=\"documents.length === 1 && !allIsRejected()\" class=\"fad-portal-primary\" [disabled]=\"!form.valid || !isValidated\" (click)=\"onSignDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.sign?.singular }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length > 1 && !allIsRejected()\" class=\"fad-portal-primary\" [disabled]=\"!form.valid || !isValidated\" (click)=\"onSignDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.sign?.plural }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length === 1 && allIsRejected()\" class=\"fad-portal-primary\" (click)=\"onSignDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.reject?.singular }}</button>\r\n <button type=\"button\" *ngIf=\"documents.length > 1 && allIsRejected()\" class=\"fad-portal-primary\" (click)=\"onSignDocuments()\">{{ configuration.customization?.moduleCustomization?.legends?.sign?.button?.reject?.plural }}</button>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-md)}:host .container-document{display:flex;flex-direction:column;width:100%;background-color:var(--fad-signature-fea-e-signature-documents-background-color);border-radius:var(--fad-signature-fea-e-signature-documents-border-radius);padding:var(--fad-portal-common-separation-md);box-sizing:border-box;margin-top:var(--fad-portal-common-separation-xs)}:host .container-document .document{display:flex;gap:var(--fad-portal-common-separation-md);justify-content:space-between;border-bottom:1px solid var(--fad-portal-common-border-color);padding:var(--fad-portal-common-separation-md) 0}:host .container-document .document>div{flex:1}:host .container-document .document .status{text-align:center}:host .container-document .document .pages{text-align:end;color:var(--fad-portal-common-legends-secondary)}:host .document:only-child{border-bottom:none!important}:host .container-instruction-file{display:flex;gap:var(--fad-portal-common-separation-md);justify-content:space-between}:host .container-instruction-file .select-file{color:var(--fad-portal-common-primary-color);cursor:pointer}:host .container-upload{width:100%;box-sizing:border-box;border-radius:var(--fad-signature-fea-e-signature-upload-border-radius);border:var(--fad-signature-fea-e-signature-upload-border);padding:var(--fad-portal-common-separation-md);margin-top:var(--fad-portal-common-separation-xs);display:flex;flex-direction:column;gap:var(--fad-portal-common-separation-xs);align-items:center;justify-content:center;text-align:center;background-color:var(--fad-signature-fea-e-signature-upload-background-color)}:host .container-upload .instruction{color:var(--fad-portal-common-legends-secondary)}:host .container-upload .upload-btn{max-width:90%;width:300px;box-sizing:border-box;background-color:var(--fad-signature-fea-e-signature-upload-button-background-color);border-radius:var(--fad-signature-fea-e-signature-upload-button-border-radius);color:var(--fad-portal-common-legends-tertiary);padding:var(--fad-portal-common-separation-xs);cursor:pointer;transition:all .2s ease-out;display:flex;align-items:center;justify-content:center;text-align:center;gap:var(--fad-portal-common-separation-xs)}:host .container-upload .upload-btn:hover{background-color:var(--fad-signature-fea-e-signature-upload-button-hover)}:host .container-file{display:flex;gap:var(--fad-portal-common-separation-md);align-items:center;padding:var(--fad-portal-common-separation-md);border:2px solid var(--fad-portal-common-successful-color);height:71px;border-radius:var(--fad-signature-fea-e-signature-file-border-radius);margin-top:var(--fad-portal-common-separation-xs)}:host .container-file .fad-portal-content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .container-file .document-img{background-color:var(--fad-signature-fea-e-signature-file-img-background-color);width:40px;height:40px;border-radius:100%;display:flex;align-items:center;justify-content:center}:host .container-file .document-img img{width:60%;max-width:100%;max-height:100%}:host .fad-portal-container-input .input-password{position:relative}:host .fad-portal-container-input .input-password input{padding-right:100px}:host .fad-portal-container-input .input-password .password-show{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:var(--fad-portal-common-legends-secondary);cursor:pointer}:host .container-confirm{display:flex;justify-content:space-between;align-items:center;gap:var(--fad-portal-common-separation-xs)}:host .container-confirm>div:first-child{display:flex;gap:var(--fad-portal-common-separation-xs)}:host .container-confirm>div:first-child>div:first-child{width:25px;height:25px}:host .container-confirm .action{max-width:80%;width:400px}:host .container-confirm ng-fad-image-inline{cursor:pointer}@media (max-width: 992px){:host .container-document .document{flex-direction:column;gap:var(--fad-portal-common-separation-xs)}:host .container-document .document .status,:host .container-document .document .pages{text-align:start!important}:host .container-confirm{flex-direction:column}:host .container-confirm .action{max-width:100%;width:100%!important}}\n"] }]
|
|
861
891
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FormBuilder }, { type: i2$2.FadService }, { type: i2$2.MifielService }]; }, propDecorators: { configuration: [{
|
|
862
892
|
type: Input
|
|
863
893
|
}], documents: [{
|
|
@@ -883,7 +913,7 @@ class GenericErrorFeaComponent {
|
|
|
883
913
|
this.configuration = Utils.mergeConfiguration(new Configuration(), GENERIC_ERROR_FEA_CONFIGURATION_DEFAULT, this.configuration);
|
|
884
914
|
}
|
|
885
915
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GenericErrorFeaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
886
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GenericErrorFeaComponent, selector: "ng-fad-signature-fea-generic-error-fea", inputs: { configuration: "configuration", title: "title", instruction: "instruction" }, ngImport: i0, template: "<ng-fad-image-inline [src]=\"errorIgm\"></ng-fad-image-inline>\r\n<div class=\"fad-portal-title-bold\">{{ title ? title : configuration.customization?.moduleCustomization?.legends?.title }}</div>\r\n<div class=\"fad-portal-content\">{{ instruction ? instruction : configuration.customization?.moduleCustomization?.legends?.instruction }}</div>\r\n", styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:var(--fad-portal-common-separation-md)}\n"], dependencies: [{ kind: "component", type: i4.NgFadImageInlineComponent, selector: "ng-fad-image-inline", inputs: ["src"] }] }); }
|
|
916
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GenericErrorFeaComponent, selector: "ng-fad-signature-fea-generic-error-fea", inputs: { configuration: "configuration", title: "title", instruction: "instruction" }, ngImport: i0, template: "<ng-fad-image-inline [src]=\"errorIgm\"></ng-fad-image-inline>\r\n<div class=\"fad-portal-title-bold\">{{ title ? title : configuration.customization?.moduleCustomization?.legends?.title }}</div>\r\n<div class=\"fad-portal-content\">{{ instruction ? instruction : configuration.customization?.moduleCustomization?.legends?.instruction }}</div>\r\n", styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:var(--fad-portal-common-separation-md)}\n"], dependencies: [{ kind: "component", type: i4$1.NgFadImageInlineComponent, selector: "ng-fad-image-inline", inputs: ["src"] }] }); }
|
|
887
917
|
}
|
|
888
918
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GenericErrorFeaComponent, decorators: [{
|
|
889
919
|
type: Component,
|
|
@@ -911,24 +941,20 @@ class ValidateSignatureComponent {
|
|
|
911
941
|
this.getSignerStatusFea();
|
|
912
942
|
}
|
|
913
943
|
validateData() {
|
|
914
|
-
if (!this.
|
|
915
|
-
this.onerror.emit(new ResponseError(ValidateSignatureErrorCode.
|
|
916
|
-
return false;
|
|
917
|
-
}
|
|
918
|
-
if (!this.signerId) {
|
|
919
|
-
this.onerror.emit(new ResponseError(ValidateSignatureErrorCode.NO_SIGNER_ID, getValidateSignatureErrorDescription(ValidateSignatureErrorCode.NO_SIGNER_ID), 'ng-fad-signature-fea-validate-signature'));
|
|
944
|
+
if (!this.ticket) {
|
|
945
|
+
this.onerror.emit(new ResponseError(ValidateSignatureErrorCode.NO_TICKET, getValidateSignatureErrorDescription(ValidateSignatureErrorCode.NO_TICKET), 'ng-fad-signature-fea-validate-signature'));
|
|
920
946
|
return false;
|
|
921
947
|
}
|
|
922
948
|
return true;
|
|
923
949
|
}
|
|
924
950
|
getSignerStatusFea() {
|
|
925
951
|
this.onloader.emit(true);
|
|
926
|
-
this.fad.
|
|
952
|
+
this.fad.getSignerStatusByTicket(this.ticket, this.configuration.services?.signerStatusFea)
|
|
927
953
|
.pipe(finalize(() => this.onloader.emit(false)))
|
|
928
954
|
.subscribe({
|
|
929
955
|
next: (res) => {
|
|
930
956
|
if (res.success) {
|
|
931
|
-
res.data === '
|
|
957
|
+
res.data === 'IN_PROGRESS' ? this.oncomplete.emit(res.data) : this.onsigned.emit(res.data);
|
|
932
958
|
}
|
|
933
959
|
else {
|
|
934
960
|
this.onerror.emit(new ResponseError(ValidateSignatureErrorCode.SERVICE, res.error, 'ng-fad-signature-fea-validate-signature'));
|
|
@@ -943,16 +969,14 @@ class ValidateSignatureComponent {
|
|
|
943
969
|
this.configuration = Utils.mergeConfiguration(new Configuration(), VALIDATE_SIGNATURE_CONFIGURATION_DEFAULT, this.configuration);
|
|
944
970
|
}
|
|
945
971
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidateSignatureComponent, deps: [{ token: i2$2.FadService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
946
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ValidateSignatureComponent, selector: "ng-fad-signature-fea-validate-signature", inputs: { configuration: "configuration",
|
|
972
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ValidateSignatureComponent, selector: "ng-fad-signature-fea-validate-signature", inputs: { configuration: "configuration", ticket: "ticket" }, outputs: { onloader: "onloader", onerror: "onerror", oncomplete: "oncomplete", onsigned: "onsigned" }, ngImport: i0, template: "", styles: [""] }); }
|
|
947
973
|
}
|
|
948
974
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ValidateSignatureComponent, decorators: [{
|
|
949
975
|
type: Component,
|
|
950
976
|
args: [{ selector: 'ng-fad-signature-fea-validate-signature', template: "" }]
|
|
951
977
|
}], ctorParameters: function () { return [{ type: i2$2.FadService }]; }, propDecorators: { configuration: [{
|
|
952
978
|
type: Input
|
|
953
|
-
}],
|
|
954
|
-
type: Input
|
|
955
|
-
}], requisitionId: [{
|
|
979
|
+
}], ticket: [{
|
|
956
980
|
type: Input
|
|
957
981
|
}], onloader: [{
|
|
958
982
|
type: Output
|
|
@@ -1057,11 +1081,11 @@ class SignatureSummaryComponent {
|
|
|
1057
1081
|
this.configuration = Utils.mergeConfiguration(new Configuration(), SIGNATURE_SUMMARY_DEFAULT, this.configuration);
|
|
1058
1082
|
}
|
|
1059
1083
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SignatureSummaryComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1060
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SignatureSummaryComponent, selector: "ng-fad-signature-fea-signature-summary", inputs: { documentRequest: "documentRequest", configuration: "configuration" }, outputs: { oncomplete: "oncomplete" }, ngImport: i0, template: "<div class=\"fad-portal-content\">\n \n <ng-container *ngIf=\"!isAllDocumentsRejected\" >\n <ng-fad-image-inline\n [src]=\"images.send\"\n >\n </ng-fad-image-inline>\n <div class=\"fad-portal-title-bold\">\n {{pdfsName}}\n </div>\n <div class=\"fad-portal-content-bold date\">{{ currentDate }}</div>\n <div class=\"summary\">\n <div class=\"fad-portal-content-bold signeds\">\n <div>{{configuration.customization?.moduleCustomization?.legends?.signed}}</div>\n <div>{{signedCount}}</div>\n </div>\n <div class=\"line\">\n\n </div>\n <div class=\"fad-portal-content-bold rejecteds\">\n <div>{{configuration.customization?.moduleCustomization?.legends?.rejected}}</div>\n <div>{{rejectedCount}}</div>\n </div>\n </div>\n <div class=\"legends\">\n {{configuration.customization?.moduleCustomization?.legends?.legend}}\n </div>\n </ng-container>\n <ng-container *ngIf=\"isAllDocumentsRejected\" >\n <ng-fad-image-inline\n [src]=\"images.reject\"\n >\n </ng-fad-image-inline>\n <div class=\"document-rejected\"> {{configuration.customization?.moduleCustomization?.legends?.documentRejected}} </div>\n <div class=\"fad-portal-title-bold title-document\">\n {{pdfsName}}\n </div>\n <div class=\"id-requisition\">\n ID {{id}} | {{ currentDate }}\n </div>\n </ng-container>\n \n</div>", styles: [".fad-portal-content{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100
|
|
1084
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SignatureSummaryComponent, selector: "ng-fad-signature-fea-signature-summary", inputs: { documentRequest: "documentRequest", configuration: "configuration" }, outputs: { oncomplete: "oncomplete" }, ngImport: i0, template: "<div class=\"fad-portal-content\">\n \n <ng-container *ngIf=\"!isAllDocumentsRejected\" >\n <ng-fad-image-inline\n [src]=\"images.send\"\n >\n </ng-fad-image-inline>\n <div class=\"fad-portal-title-bold\">\n {{pdfsName}}\n </div>\n <div class=\"fad-portal-content-bold date\">{{ currentDate }}</div>\n <div class=\"summary\">\n <div class=\"fad-portal-content-bold signeds\">\n <div>{{configuration.customization?.moduleCustomization?.legends?.signed}}</div>\n <div>{{signedCount}}</div>\n </div>\n <div class=\"line\">\n\n </div>\n <div class=\"fad-portal-content-bold rejecteds\">\n <div>{{configuration.customization?.moduleCustomization?.legends?.rejected}}</div>\n <div>{{rejectedCount}}</div>\n </div>\n </div>\n <div class=\"legends\">\n {{configuration.customization?.moduleCustomization?.legends?.legend}}\n </div>\n </ng-container>\n <ng-container *ngIf=\"isAllDocumentsRejected\" >\n <ng-fad-image-inline\n [src]=\"images.reject\"\n >\n </ng-fad-image-inline>\n <div class=\"document-rejected\"> {{configuration.customization?.moduleCustomization?.legends?.documentRejected}} </div>\n <div class=\"fad-portal-title-bold title-document\">\n {{pdfsName}}\n </div>\n <div class=\"id-requisition\">\n ID {{id}} | {{ currentDate }}\n </div>\n </ng-container>\n \n</div>", styles: [".fad-portal-content{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;row-gap:var(--fad-portal-common-separation-sm)}.fad-portal-content .fad-portal-title{margin-top:var(--fad-portal-common-separation-sm);margin-bottom:var(--fad-portal-common-separation-sm)}.fad-portal-content .date{color:#aaa}.fad-portal-content .summary{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;row-gap:var(--fad-portal-common-separation-sm);margin-bottom:var(--fad-portal-common-separation-xs)}.fad-portal-content .summary .signeds,.fad-portal-content .summary .rejecteds{width:100%;display:flex;justify-content:space-between}.fad-portal-content .summary .line{width:100%;border:1px solid var(--fad-portal-common-border-color)}.fad-portal-content .legends{text-align:center}.fad-portal-content .document-rejected{color:#aaa;margin-bottom:var(--fad-portal-common-separation-sm)}.fad-portal-content .id-requisition{color:#aaa;margin-top:var(--fad-portal-common-separation-sm)}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.NgFadImageInlineComponent, selector: "ng-fad-image-inline", inputs: ["src"] }] }); }
|
|
1061
1085
|
}
|
|
1062
1086
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SignatureSummaryComponent, decorators: [{
|
|
1063
1087
|
type: Component,
|
|
1064
|
-
args: [{ selector: 'ng-fad-signature-fea-signature-summary', template: "<div class=\"fad-portal-content\">\n \n <ng-container *ngIf=\"!isAllDocumentsRejected\" >\n <ng-fad-image-inline\n [src]=\"images.send\"\n >\n </ng-fad-image-inline>\n <div class=\"fad-portal-title-bold\">\n {{pdfsName}}\n </div>\n <div class=\"fad-portal-content-bold date\">{{ currentDate }}</div>\n <div class=\"summary\">\n <div class=\"fad-portal-content-bold signeds\">\n <div>{{configuration.customization?.moduleCustomization?.legends?.signed}}</div>\n <div>{{signedCount}}</div>\n </div>\n <div class=\"line\">\n\n </div>\n <div class=\"fad-portal-content-bold rejecteds\">\n <div>{{configuration.customization?.moduleCustomization?.legends?.rejected}}</div>\n <div>{{rejectedCount}}</div>\n </div>\n </div>\n <div class=\"legends\">\n {{configuration.customization?.moduleCustomization?.legends?.legend}}\n </div>\n </ng-container>\n <ng-container *ngIf=\"isAllDocumentsRejected\" >\n <ng-fad-image-inline\n [src]=\"images.reject\"\n >\n </ng-fad-image-inline>\n <div class=\"document-rejected\"> {{configuration.customization?.moduleCustomization?.legends?.documentRejected}} </div>\n <div class=\"fad-portal-title-bold title-document\">\n {{pdfsName}}\n </div>\n <div class=\"id-requisition\">\n ID {{id}} | {{ currentDate }}\n </div>\n </ng-container>\n \n</div>", styles: [".fad-portal-content{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100
|
|
1088
|
+
args: [{ selector: 'ng-fad-signature-fea-signature-summary', template: "<div class=\"fad-portal-content\">\n \n <ng-container *ngIf=\"!isAllDocumentsRejected\" >\n <ng-fad-image-inline\n [src]=\"images.send\"\n >\n </ng-fad-image-inline>\n <div class=\"fad-portal-title-bold\">\n {{pdfsName}}\n </div>\n <div class=\"fad-portal-content-bold date\">{{ currentDate }}</div>\n <div class=\"summary\">\n <div class=\"fad-portal-content-bold signeds\">\n <div>{{configuration.customization?.moduleCustomization?.legends?.signed}}</div>\n <div>{{signedCount}}</div>\n </div>\n <div class=\"line\">\n\n </div>\n <div class=\"fad-portal-content-bold rejecteds\">\n <div>{{configuration.customization?.moduleCustomization?.legends?.rejected}}</div>\n <div>{{rejectedCount}}</div>\n </div>\n </div>\n <div class=\"legends\">\n {{configuration.customization?.moduleCustomization?.legends?.legend}}\n </div>\n </ng-container>\n <ng-container *ngIf=\"isAllDocumentsRejected\" >\n <ng-fad-image-inline\n [src]=\"images.reject\"\n >\n </ng-fad-image-inline>\n <div class=\"document-rejected\"> {{configuration.customization?.moduleCustomization?.legends?.documentRejected}} </div>\n <div class=\"fad-portal-title-bold title-document\">\n {{pdfsName}}\n </div>\n <div class=\"id-requisition\">\n ID {{id}} | {{ currentDate }}\n </div>\n </ng-container>\n \n</div>", styles: [".fad-portal-content{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;row-gap:var(--fad-portal-common-separation-sm)}.fad-portal-content .fad-portal-title{margin-top:var(--fad-portal-common-separation-sm);margin-bottom:var(--fad-portal-common-separation-sm)}.fad-portal-content .date{color:#aaa}.fad-portal-content .summary{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;row-gap:var(--fad-portal-common-separation-sm);margin-bottom:var(--fad-portal-common-separation-xs)}.fad-portal-content .summary .signeds,.fad-portal-content .summary .rejecteds{width:100%;display:flex;justify-content:space-between}.fad-portal-content .summary .line{width:100%;border:1px solid var(--fad-portal-common-border-color)}.fad-portal-content .legends{text-align:center}.fad-portal-content .document-rejected{color:#aaa;margin-bottom:var(--fad-portal-common-separation-sm)}.fad-portal-content .id-requisition{color:#aaa;margin-top:var(--fad-portal-common-separation-sm)}\n"] }]
|
|
1065
1089
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { documentRequest: [{
|
|
1066
1090
|
type: Input
|
|
1067
1091
|
}], configuration: [{
|