brainloper-ui 20.0.5 → 20.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/brainloper-ui.mjs +131 -24
- package/fesm2022/brainloper-ui.mjs.map +1 -1
- package/index.d.ts +59 -44
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Inject, ViewEncapsulation, Component, Injectable, EventEmitter, Output, Input, ViewChild,
|
|
2
|
+
import { Inject, ViewEncapsulation, Component, Injectable, forwardRef, HostListener, Directive, EventEmitter, Output, Input, ViewChild, ContentChildren, NgModule } from '@angular/core';
|
|
3
3
|
import * as i7 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i4 from '@angular/material/button';
|
|
@@ -53,7 +53,7 @@ import { MatTableModule } from '@angular/material/table';
|
|
|
53
53
|
import * as i2$1 from '@ng-bootstrap/ng-bootstrap';
|
|
54
54
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|
55
55
|
import * as i1$2 from '@angular/forms';
|
|
56
|
-
import { UntypedFormGroup, UntypedFormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
56
|
+
import { NG_VALUE_ACCESSOR, UntypedFormGroup, UntypedFormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
57
57
|
import * as i1$1 from '@angular/common/http';
|
|
58
58
|
import { HttpParams, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
59
59
|
import { forkJoin } from 'rxjs';
|
|
@@ -61,7 +61,7 @@ import { map } from 'rxjs/operators';
|
|
|
61
61
|
import Swal from 'sweetalert2';
|
|
62
62
|
import { jsPDF } from 'jspdf';
|
|
63
63
|
import html2canvas from 'html2canvas';
|
|
64
|
-
import 'jspdf-autotable';
|
|
64
|
+
import autoTable from 'jspdf-autotable';
|
|
65
65
|
import * as i1$3 from '@angular/router';
|
|
66
66
|
import { RouterModule } from '@angular/router';
|
|
67
67
|
import { modulesByRol } from '@edgarzon93/brainloper-shared';
|
|
@@ -438,6 +438,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
438
438
|
type: Injectable
|
|
439
439
|
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: MessageService }] });
|
|
440
440
|
|
|
441
|
+
class ThousandSeparatorDirective {
|
|
442
|
+
el;
|
|
443
|
+
onChange = () => { };
|
|
444
|
+
onTouched = () => { };
|
|
445
|
+
constructor(el) {
|
|
446
|
+
this.el = el;
|
|
447
|
+
}
|
|
448
|
+
writeValue(value) {
|
|
449
|
+
if (value !== null && value !== undefined) {
|
|
450
|
+
const stringValue = value.toString();
|
|
451
|
+
let cleanValue = stringValue.replace(/[^\d]/g, '');
|
|
452
|
+
const parts = cleanValue.split('.');
|
|
453
|
+
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
454
|
+
this.el.nativeElement.value = parts.join('.');
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
this.el.nativeElement.value = '';
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
registerOnChange(fn) {
|
|
461
|
+
this.onChange = fn;
|
|
462
|
+
}
|
|
463
|
+
registerOnTouched(fn) {
|
|
464
|
+
this.onTouched = fn;
|
|
465
|
+
}
|
|
466
|
+
setDisabledState(isDisabled) {
|
|
467
|
+
this.el.nativeElement.disabled = isDisabled;
|
|
468
|
+
}
|
|
469
|
+
onInput(event) {
|
|
470
|
+
const input = event.target;
|
|
471
|
+
const originalValue = input.value;
|
|
472
|
+
const cursorStart = input.selectionStart ?? 0;
|
|
473
|
+
let digitsBeforeCursor = 0;
|
|
474
|
+
for (let i = 0; i < cursorStart; i++) {
|
|
475
|
+
if (/\d/.test(originalValue[i])) {
|
|
476
|
+
digitsBeforeCursor++;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
let value = originalValue.replace(/[^\d]/g, '');
|
|
480
|
+
let numericValue = value;
|
|
481
|
+
const parts = value.split('.');
|
|
482
|
+
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
483
|
+
value = parts.join('.');
|
|
484
|
+
if (value !== originalValue) {
|
|
485
|
+
input.value = value;
|
|
486
|
+
let newCursorPos = 0;
|
|
487
|
+
let digitsSeen = 0;
|
|
488
|
+
for (let i = 0; i < value.length; i++) {
|
|
489
|
+
if (digitsSeen >= digitsBeforeCursor) {
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
if (/\d/.test(value[i])) {
|
|
493
|
+
digitsSeen++;
|
|
494
|
+
}
|
|
495
|
+
newCursorPos++;
|
|
496
|
+
}
|
|
497
|
+
input.setSelectionRange(newCursorPos, newCursorPos);
|
|
498
|
+
}
|
|
499
|
+
if (numericValue === '') {
|
|
500
|
+
this.onChange(null);
|
|
501
|
+
}
|
|
502
|
+
else {
|
|
503
|
+
this.onChange(Number(numericValue));
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
onBlur() {
|
|
507
|
+
this.onTouched();
|
|
508
|
+
}
|
|
509
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThousandSeparatorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
510
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ThousandSeparatorDirective, isStandalone: false, selector: "[appThousandSeparator]", host: { listeners: { "input": "onInput($event)", "blur": "onBlur()" } }, providers: [{
|
|
511
|
+
provide: NG_VALUE_ACCESSOR,
|
|
512
|
+
useExisting: forwardRef(() => ThousandSeparatorDirective),
|
|
513
|
+
multi: true
|
|
514
|
+
}], ngImport: i0 });
|
|
515
|
+
}
|
|
516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThousandSeparatorDirective, decorators: [{
|
|
517
|
+
type: Directive,
|
|
518
|
+
args: [{
|
|
519
|
+
selector: '[appThousandSeparator]',
|
|
520
|
+
providers: [{
|
|
521
|
+
provide: NG_VALUE_ACCESSOR,
|
|
522
|
+
useExisting: forwardRef(() => ThousandSeparatorDirective),
|
|
523
|
+
multi: true
|
|
524
|
+
}],
|
|
525
|
+
standalone: false
|
|
526
|
+
}]
|
|
527
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onInput: [{
|
|
528
|
+
type: HostListener,
|
|
529
|
+
args: ['input', ['$event']]
|
|
530
|
+
}], onBlur: [{
|
|
531
|
+
type: HostListener,
|
|
532
|
+
args: ['blur']
|
|
533
|
+
}] } });
|
|
534
|
+
|
|
441
535
|
class TableModalComponent {
|
|
442
536
|
dialogRef;
|
|
443
537
|
data;
|
|
@@ -518,6 +612,9 @@ class TableModalComponent {
|
|
|
518
612
|
this.modalForm.addControl(element.ID + 'Combo', new UntypedFormControl(x));
|
|
519
613
|
}
|
|
520
614
|
}
|
|
615
|
+
if (element.type === 'thousandSeparator') {
|
|
616
|
+
this.modalForm.get(element.ID).setValue(this.modalForm.value[element.ID]?.toString().replace(/\./g, ''));
|
|
617
|
+
}
|
|
521
618
|
});
|
|
522
619
|
this.dialogRef.close(this.modalForm.value);
|
|
523
620
|
}
|
|
@@ -533,11 +630,11 @@ class TableModalComponent {
|
|
|
533
630
|
}
|
|
534
631
|
}
|
|
535
632
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableModalComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: HttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
536
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: TableModalComponent, isStandalone: false, selector: "app-table-modal", ngImport: i0, template: "<mat-dialog-content>\n <div style='display:flex; justify-content: space-between;'>\n <div>\n <strong>\n @if (data.action==\"edit\") {\n <h3> Editar </h3>\n }\n @if (data.action==\"add\") {\n <h3> Agregar </h3>\n }\n </strong>\n </div>\n <div mat-dialog-close>\n <i class=\"fa fa-times-circle\" style=\"font-size: 150%; position: relative;\"></i>\n </div>\n </div>\n\n <form [formGroup]=\"modalForm\">\n\n @for (input of data.columns; track input) {\n <div>\n @if (data.action==\"edit\") {\n <div>\n @if (!input.disregardForEdit) {\n <mat-form-field>\n <mat-label>{{input.label}}</mat-label>\n @if (input.type==\"combo\") {\n <div>\n <mat-select [value]=\"input.value\" (selectionChange)='onChange(input.ID,$event, input.type)'\n placeholder='{{input.label}}' [required]=\"input.required\">\n @for (data of dataCombo[input.identifierCombo]; track data) {\n <mat-option\n [value]='data[input.paramsCombo.selectionField]'>\n {{data[input.paramsCombo.visibleField]}}</mat-option>\n }\n </mat-select>\n </div>\n } @else {\n <input [type]='input.type' [name]='input.ID' [value]='input.value'\n (input)='onChange(input.ID,$event, input.type)' matInput [placeholder]='input.label'\n [required]=\"input.required\" />\n }\n <mat-error>Campo Obligatorio</mat-error>\n </mat-form-field>\n }\n </div>\n } @else {\n @if (!input.disregardForAdd) {\n <mat-form-field>\n <mat-label>{{input.label}}</mat-label>\n @if (input.type==\"combo\") {\n <div>\n <mat-select (selectionChange)='onChange(input.ID,$event, input.type)'\n placeholder='{{input.label}}' [required]=\"input.required\">\n @for (data of dataCombo[input.identifierCombo]; track data) {\n <mat-option\n [value]='data[input.paramsCombo.selectionField]'>\n {{data[input.paramsCombo.visibleField]}}</mat-option>\n }\n </mat-select>\n </div>\n } @else {\n <input [type]='input.type' [name]='input.ID' (input)='onChange(input.ID, $event, input.type)'\n matInput [placeholder]='input.label' [required]=\"input.required\" />\n }\n <mat-error>Campo Obligatorio</mat-error>\n </mat-form-field>\n }\n }\n </div>\n }\n\n @if (data.action==\"add\" || data.action==\"edit\") {\n <button (click)='onSubmit()' color='primary' mat-raised-button\n [disabled]=\"!modalForm.valid\">Guardar</button>\n }\n\n </form>\n</mat-dialog-content>", styles: ["button{width:100%}mat-form-field{width:100%}\n"], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
633
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: TableModalComponent, isStandalone: false, selector: "app-table-modal", ngImport: i0, template: "<mat-dialog-content>\n <div style='display:flex; justify-content: space-between;'>\n <div>\n <strong>\n @if (data.action==\"edit\") {\n <h3> Editar </h3>\n }\n @if (data.action==\"add\") {\n <h3> Agregar </h3>\n }\n </strong>\n </div>\n <div mat-dialog-close>\n <i class=\"fa fa-times-circle\" style=\"font-size: 150%; position: relative;\"></i>\n </div>\n </div>\n\n <form [formGroup]=\"modalForm\">\n\n @for (input of data.columns; track input) {\n <div>\n @if (data.action==\"edit\") {\n <div>\n @if (!input.disregardForEdit) {\n <mat-form-field>\n <mat-label>{{input.label}}</mat-label>\n @if (input.type==\"combo\") {\n <div>\n <mat-select [value]=\"input.value\" (selectionChange)='onChange(input.ID,$event, input.type)'\n placeholder='{{input.label}}' [required]=\"input.required\">\n @for (data of dataCombo[input.identifierCombo]; track data) {\n <mat-option\n [value]='data[input.paramsCombo.selectionField]'>\n {{data[input.paramsCombo.visibleField]}}</mat-option>\n }\n </mat-select>\n </div>\n } @else if (input.type == 'thousandSeparator') {\n <input type='text' appThousandSeparator [name]='input.ID' [value]='input.value'\n (input)='onChange(input.ID,$event, input.type)' matInput [placeholder]='input.label'\n [required]=\"input.required\" />\n } @else {\n <input [type]='input.type' [name]='input.ID' [value]='input.value'\n (input)='onChange(input.ID,$event, input.type)' matInput [placeholder]='input.label'\n [required]=\"input.required\" />\n }\n <mat-error>Campo Obligatorio</mat-error>\n </mat-form-field>\n }\n </div>\n } @else {\n @if (!input.disregardForAdd) {\n <mat-form-field>\n <mat-label>{{input.label}}</mat-label>\n @if (input.type==\"combo\") {\n <div>\n <mat-select (selectionChange)='onChange(input.ID,$event, input.type)'\n placeholder='{{input.label}}' [required]=\"input.required\">\n @for (data of dataCombo[input.identifierCombo]; track data) {\n <mat-option\n [value]='data[input.paramsCombo.selectionField]'>\n {{data[input.paramsCombo.visibleField]}}</mat-option>\n }\n </mat-select>\n </div>\n } @else if (input.type == 'thousandSeparator') {\n <input type='text' appThousandSeparator [name]='input.ID'\n (input)='onChange(input.ID, $event, input.type)'\n matInput [placeholder]='input.label' [required]=\"input.required\" />\n } @else {\n <input [type]='input.type' [name]='input.ID' (input)='onChange(input.ID, $event, input.type)'\n matInput [placeholder]='input.label' [required]=\"input.required\" />\n }\n <mat-error>Campo Obligatorio</mat-error>\n </mat-form-field>\n }\n }\n </div>\n }\n\n @if (data.action==\"add\" || data.action==\"edit\") {\n <button (click)='onSubmit()' color='primary' mat-raised-button\n [disabled]=\"!modalForm.valid\">Guardar</button>\n }\n\n </form>\n</mat-dialog-content>", styles: ["button{width:100%}mat-form-field{width:100%}\n"], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: ThousandSeparatorDirective, selector: "[appThousandSeparator]" }] });
|
|
537
634
|
}
|
|
538
635
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableModalComponent, decorators: [{
|
|
539
636
|
type: Component,
|
|
540
|
-
args: [{ selector: 'app-table-modal', standalone: false, template: "<mat-dialog-content>\n <div style='display:flex; justify-content: space-between;'>\n <div>\n <strong>\n @if (data.action==\"edit\") {\n <h3> Editar </h3>\n }\n @if (data.action==\"add\") {\n <h3> Agregar </h3>\n }\n </strong>\n </div>\n <div mat-dialog-close>\n <i class=\"fa fa-times-circle\" style=\"font-size: 150%; position: relative;\"></i>\n </div>\n </div>\n\n <form [formGroup]=\"modalForm\">\n\n @for (input of data.columns; track input) {\n <div>\n @if (data.action==\"edit\") {\n <div>\n @if (!input.disregardForEdit) {\n <mat-form-field>\n <mat-label>{{input.label}}</mat-label>\n @if (input.type==\"combo\") {\n <div>\n <mat-select [value]=\"input.value\" (selectionChange)='onChange(input.ID,$event, input.type)'\n placeholder='{{input.label}}' [required]=\"input.required\">\n @for (data of dataCombo[input.identifierCombo]; track data) {\n <mat-option\n [value]='data[input.paramsCombo.selectionField]'>\n {{data[input.paramsCombo.visibleField]}}</mat-option>\n }\n </mat-select>\n </div>\n } @else {\n <input [type]='input.type' [name]='input.ID' [value]='input.value'\n (input)='onChange(input.ID,$event, input.type)' matInput [placeholder]='input.label'\n [required]=\"input.required\" />\n }\n <mat-error>Campo Obligatorio</mat-error>\n </mat-form-field>\n }\n </div>\n } @else {\n @if (!input.disregardForAdd) {\n <mat-form-field>\n <mat-label>{{input.label}}</mat-label>\n @if (input.type==\"combo\") {\n <div>\n <mat-select (selectionChange)='onChange(input.ID,$event, input.type)'\n placeholder='{{input.label}}' [required]=\"input.required\">\n @for (data of dataCombo[input.identifierCombo]; track data) {\n <mat-option\n [value]='data[input.paramsCombo.selectionField]'>\n {{data[input.paramsCombo.visibleField]}}</mat-option>\n }\n </mat-select>\n </div>\n } @else {\n <input [type]='input.type' [name]='input.ID' (input)='onChange(input.ID, $event, input.type)'\n matInput [placeholder]='input.label' [required]=\"input.required\" />\n }\n <mat-error>Campo Obligatorio</mat-error>\n </mat-form-field>\n }\n }\n </div>\n }\n\n @if (data.action==\"add\" || data.action==\"edit\") {\n <button (click)='onSubmit()' color='primary' mat-raised-button\n [disabled]=\"!modalForm.valid\">Guardar</button>\n }\n\n </form>\n</mat-dialog-content>", styles: ["button{width:100%}mat-form-field{width:100%}\n"] }]
|
|
637
|
+
args: [{ selector: 'app-table-modal', standalone: false, template: "<mat-dialog-content>\n <div style='display:flex; justify-content: space-between;'>\n <div>\n <strong>\n @if (data.action==\"edit\") {\n <h3> Editar </h3>\n }\n @if (data.action==\"add\") {\n <h3> Agregar </h3>\n }\n </strong>\n </div>\n <div mat-dialog-close>\n <i class=\"fa fa-times-circle\" style=\"font-size: 150%; position: relative;\"></i>\n </div>\n </div>\n\n <form [formGroup]=\"modalForm\">\n\n @for (input of data.columns; track input) {\n <div>\n @if (data.action==\"edit\") {\n <div>\n @if (!input.disregardForEdit) {\n <mat-form-field>\n <mat-label>{{input.label}}</mat-label>\n @if (input.type==\"combo\") {\n <div>\n <mat-select [value]=\"input.value\" (selectionChange)='onChange(input.ID,$event, input.type)'\n placeholder='{{input.label}}' [required]=\"input.required\">\n @for (data of dataCombo[input.identifierCombo]; track data) {\n <mat-option\n [value]='data[input.paramsCombo.selectionField]'>\n {{data[input.paramsCombo.visibleField]}}</mat-option>\n }\n </mat-select>\n </div>\n } @else if (input.type == 'thousandSeparator') {\n <input type='text' appThousandSeparator [name]='input.ID' [value]='input.value'\n (input)='onChange(input.ID,$event, input.type)' matInput [placeholder]='input.label'\n [required]=\"input.required\" />\n } @else {\n <input [type]='input.type' [name]='input.ID' [value]='input.value'\n (input)='onChange(input.ID,$event, input.type)' matInput [placeholder]='input.label'\n [required]=\"input.required\" />\n }\n <mat-error>Campo Obligatorio</mat-error>\n </mat-form-field>\n }\n </div>\n } @else {\n @if (!input.disregardForAdd) {\n <mat-form-field>\n <mat-label>{{input.label}}</mat-label>\n @if (input.type==\"combo\") {\n <div>\n <mat-select (selectionChange)='onChange(input.ID,$event, input.type)'\n placeholder='{{input.label}}' [required]=\"input.required\">\n @for (data of dataCombo[input.identifierCombo]; track data) {\n <mat-option\n [value]='data[input.paramsCombo.selectionField]'>\n {{data[input.paramsCombo.visibleField]}}</mat-option>\n }\n </mat-select>\n </div>\n } @else if (input.type == 'thousandSeparator') {\n <input type='text' appThousandSeparator [name]='input.ID'\n (input)='onChange(input.ID, $event, input.type)'\n matInput [placeholder]='input.label' [required]=\"input.required\" />\n } @else {\n <input [type]='input.type' [name]='input.ID' (input)='onChange(input.ID, $event, input.type)'\n matInput [placeholder]='input.label' [required]=\"input.required\" />\n }\n <mat-error>Campo Obligatorio</mat-error>\n </mat-form-field>\n }\n }\n </div>\n }\n\n @if (data.action==\"add\" || data.action==\"edit\") {\n <button (click)='onSubmit()' color='primary' mat-raised-button\n [disabled]=\"!modalForm.valid\">Guardar</button>\n }\n\n </form>\n</mat-dialog-content>", styles: ["button{width:100%}mat-form-field{width:100%}\n"] }]
|
|
541
638
|
}], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
542
639
|
type: Inject,
|
|
543
640
|
args: [MAT_DIALOG_DATA]
|
|
@@ -986,7 +1083,7 @@ class WorkOrderPdfService {
|
|
|
986
1083
|
{ content: data.invoiceReference || '-', styles: {} }
|
|
987
1084
|
]
|
|
988
1085
|
];
|
|
989
|
-
|
|
1086
|
+
autoTable(doc, {
|
|
990
1087
|
startY: y,
|
|
991
1088
|
body: tableData,
|
|
992
1089
|
theme: 'grid',
|
|
@@ -1025,7 +1122,7 @@ class WorkOrderPdfService {
|
|
|
1025
1122
|
{ content: data.addressProvider || '', styles: {} }
|
|
1026
1123
|
]
|
|
1027
1124
|
];
|
|
1028
|
-
|
|
1125
|
+
autoTable(doc, {
|
|
1029
1126
|
startY: y + 20,
|
|
1030
1127
|
body: tableData,
|
|
1031
1128
|
theme: 'grid',
|
|
@@ -1140,7 +1237,7 @@ class WorkOrderPdfService {
|
|
|
1140
1237
|
{ content: data.approved_by || '', styles: { fontSize: 12 } }
|
|
1141
1238
|
]
|
|
1142
1239
|
];
|
|
1143
|
-
|
|
1240
|
+
autoTable(doc, {
|
|
1144
1241
|
startY: y,
|
|
1145
1242
|
body: tableData,
|
|
1146
1243
|
theme: 'grid',
|
|
@@ -1251,11 +1348,11 @@ class TemplateOtComponent {
|
|
|
1251
1348
|
});
|
|
1252
1349
|
}
|
|
1253
1350
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TemplateOtComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialog }, { token: MessageService }, { token: WorkOrderPdfService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1254
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: TemplateOtComponent, isStandalone: false, selector: "app-template-ot", ngImport: i0, template: "<mat-dialog-content id=\"templateOT\" #templateOT>\n <div class=\"d-flex flex-column w-100 white-background\">\n\n <!-- Encabezado -->\n <div class=\"borde w-100 d-flex flex-row align-items-center header-section\">\n <div class=\"d-flex flex-column align-items-center text-content\" style=\"width:80%\">\n <h2 class=\"text-header text-uppercase wrap-text\">{{data.name}}</h2>\n <h2 class=\"text-header wrap-text\">NIT: {{data.nit}}</h2>\n <div class=\"w-100 d-flex flex-row justify-content-evenly\">\n <h3 class=\"text-header wrap-text\">{{data.address}}</h3>\n <h3 class=\"text-header wrap-text\">TEL: {{data.telephone}}</h3>\n </div>\n </div>\n <div style=\"width:20%\">\n <div class=\"img w-100\" [style.background-image]=\"'url(' + data.image + ')'\">\n </div>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Orden de trabajo</h2>\n <h2 class=\"wrap-text\">N\u00B0: {{data.consecutive}}</h2>\n </div>\n\n <!-- Cuerpo -->\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">\u00C1rea:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.area}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">C\u00F3digo:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.code}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Fecha:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.date}}</h2>\n </div>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Operario:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.responsible}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Od\u00F3metro:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.odometer}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Referencia Factura:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.invoiceReference}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Datos del proveedor</h2>\n </div>\n\n <div class=\"borde flexible-row\">\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Nombre:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.nameProvider}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Direcci\u00F3n:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.addressProvider}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Detalles del servicio</h2>\n </div>\n\n <div class=\"borde w-100 description-section\">\n <h2 class=\"wrap-text text-start\">{{data.description}}</h2>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:35%\">\n <h2 class=\"fw-bold\">AUTORIZADA POR:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:65%\">\n <h2 class=\"wrap-text\">{{data.approved_by}}</h2>\n </div>\n </div>\n\n <!-- piso -->\n <div class=\"borde d-flex flex-column align-items-center justify-content-center w-100 footer-section\">\n <h2>Favor adjuntar la orden a la factura o cuenta de cobro</h2>\n <h2 class=\"wrap-text\">{{data.mail}}</h2>\n </div>\n\n </div>\n
|
|
1351
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: TemplateOtComponent, isStandalone: false, selector: "app-template-ot", ngImport: i0, template: "<mat-dialog-content id=\"templateOT\" #templateOT>\n <div class=\"d-flex flex-column w-100 white-background\">\n\n <!-- Encabezado -->\n <div class=\"borde w-100 d-flex flex-row align-items-center header-section\">\n <div class=\"d-flex flex-column align-items-center text-content\" style=\"width:80%\">\n <h2 class=\"text-header text-uppercase wrap-text\">{{data.name}}</h2>\n <h2 class=\"text-header wrap-text\">NIT: {{data.nit}}</h2>\n <div class=\"w-100 d-flex flex-row justify-content-evenly\">\n <h3 class=\"text-header wrap-text\">{{data.address}}</h3>\n <h3 class=\"text-header wrap-text\">TEL: {{data.telephone}}</h3>\n </div>\n </div>\n <div style=\"width:20%\">\n <div class=\"img w-100\" [style.background-image]=\"'url(' + data.image + ')'\">\n </div>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Orden de trabajo</h2>\n <h2 class=\"wrap-text\">N\u00B0: {{data.consecutive}}</h2>\n </div>\n\n <!-- Cuerpo -->\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">\u00C1rea:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.area}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">C\u00F3digo:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.code}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Fecha:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.date}}</h2>\n </div>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Operario:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.responsible}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Od\u00F3metro:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.odometer}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Referencia Factura:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.invoiceReference}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Datos del proveedor</h2>\n </div>\n\n <div class=\"borde flexible-row\">\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Nombre:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.nameProvider}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Direcci\u00F3n:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.addressProvider}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Detalles del servicio</h2>\n </div>\n\n <div class=\"borde w-100 description-section\">\n <h2 class=\"wrap-text text-start\">{{data.description}}</h2>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:35%\">\n <h2 class=\"fw-bold\">AUTORIZADA POR:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:65%\">\n <h2 class=\"wrap-text\">{{data.approved_by}}</h2>\n </div>\n </div>\n\n <!-- piso -->\n <div class=\"borde d-flex flex-column align-items-center justify-content-center w-100 footer-section\">\n <h2>Favor adjuntar la orden a la factura o cuenta de cobro</h2>\n <h2 class=\"wrap-text\">{{data.mail}}</h2>\n </div>\n\n </div>\n\n <div class=\"download-container\">\n <button (click)=\"generatePdfWithHtml2Canvas()\" color='primary' mat-raised-button style=\"margin-right: 10px;\">\n Generar PDF\n </button>\n</div>\n</mat-dialog-content>\n\n", styles: [".img{background-size:100%!important;background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important;height:22mm!important;margin:0!important;padding:0!important}h2{font-size:1rem!important;line-height:1.2!important;margin:0!important;padding:0!important;text-align:center!important}h3{line-height:1.2!important;margin:0!important;padding:0!important;text-align:center!important}.text-header{line-height:1.5!important;font-weight:700!important}.text-uppercase{text-transform:uppercase!important}.wrap-text{white-space:pre-wrap!important}.text-content{padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.borde{border:1px solid blue!important}.border-r{border-right:1px solid blue!important;min-height:100%!important;align-self:stretch!important}.container-text{display:flex!important;justify-content:center!important;align-items:center!important;min-height:inherit!important}.container-headers{display:flex!important;align-items:center!important;justify-content:space-evenly!important;width:100%!important;min-height:8mm!important;background:#f0f4ff9c!important;padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.container-headers h2{font-weight:700!important}.flexible-row{display:flex!important;flex-direction:row!important;align-items:stretch!important;min-height:11mm!important}.header-section{min-height:25mm!important}.footer-section{min-height:14mm!important;background:#f0f4ff59!important;padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.description-section{min-height:20mm!important;padding:10px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.w-100{width:100%!important}.text-start{text-align:start!important}.white-background{background-color:#fff!important}.download-container{display:flex!important;justify-content:center!important;margin-top:15px!important}\n"], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
|
|
1255
1352
|
}
|
|
1256
1353
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TemplateOtComponent, decorators: [{
|
|
1257
1354
|
type: Component,
|
|
1258
|
-
args: [{ selector: 'app-template-ot', standalone: false, template: "<mat-dialog-content id=\"templateOT\" #templateOT>\n <div class=\"d-flex flex-column w-100 white-background\">\n\n <!-- Encabezado -->\n <div class=\"borde w-100 d-flex flex-row align-items-center header-section\">\n <div class=\"d-flex flex-column align-items-center text-content\" style=\"width:80%\">\n <h2 class=\"text-header text-uppercase wrap-text\">{{data.name}}</h2>\n <h2 class=\"text-header wrap-text\">NIT: {{data.nit}}</h2>\n <div class=\"w-100 d-flex flex-row justify-content-evenly\">\n <h3 class=\"text-header wrap-text\">{{data.address}}</h3>\n <h3 class=\"text-header wrap-text\">TEL: {{data.telephone}}</h3>\n </div>\n </div>\n <div style=\"width:20%\">\n <div class=\"img w-100\" [style.background-image]=\"'url(' + data.image + ')'\">\n </div>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Orden de trabajo</h2>\n <h2 class=\"wrap-text\">N\u00B0: {{data.consecutive}}</h2>\n </div>\n\n <!-- Cuerpo -->\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">\u00C1rea:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.area}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">C\u00F3digo:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.code}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Fecha:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.date}}</h2>\n </div>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Operario:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.responsible}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Od\u00F3metro:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.odometer}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Referencia Factura:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.invoiceReference}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Datos del proveedor</h2>\n </div>\n\n <div class=\"borde flexible-row\">\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Nombre:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.nameProvider}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Direcci\u00F3n:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.addressProvider}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Detalles del servicio</h2>\n </div>\n\n <div class=\"borde w-100 description-section\">\n <h2 class=\"wrap-text text-start\">{{data.description}}</h2>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:35%\">\n <h2 class=\"fw-bold\">AUTORIZADA POR:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:65%\">\n <h2 class=\"wrap-text\">{{data.approved_by}}</h2>\n </div>\n </div>\n\n <!-- piso -->\n <div class=\"borde d-flex flex-column align-items-center justify-content-center w-100 footer-section\">\n <h2>Favor adjuntar la orden a la factura o cuenta de cobro</h2>\n <h2 class=\"wrap-text\">{{data.mail}}</h2>\n </div>\n\n </div>\n
|
|
1355
|
+
args: [{ selector: 'app-template-ot', standalone: false, template: "<mat-dialog-content id=\"templateOT\" #templateOT>\n <div class=\"d-flex flex-column w-100 white-background\">\n\n <!-- Encabezado -->\n <div class=\"borde w-100 d-flex flex-row align-items-center header-section\">\n <div class=\"d-flex flex-column align-items-center text-content\" style=\"width:80%\">\n <h2 class=\"text-header text-uppercase wrap-text\">{{data.name}}</h2>\n <h2 class=\"text-header wrap-text\">NIT: {{data.nit}}</h2>\n <div class=\"w-100 d-flex flex-row justify-content-evenly\">\n <h3 class=\"text-header wrap-text\">{{data.address}}</h3>\n <h3 class=\"text-header wrap-text\">TEL: {{data.telephone}}</h3>\n </div>\n </div>\n <div style=\"width:20%\">\n <div class=\"img w-100\" [style.background-image]=\"'url(' + data.image + ')'\">\n </div>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Orden de trabajo</h2>\n <h2 class=\"wrap-text\">N\u00B0: {{data.consecutive}}</h2>\n </div>\n\n <!-- Cuerpo -->\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">\u00C1rea:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.area}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">C\u00F3digo:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.code}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Fecha:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.date}}</h2>\n </div>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Operario:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.responsible}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Od\u00F3metro:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.odometer}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Referencia Factura:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.invoiceReference}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Datos del proveedor</h2>\n </div>\n\n <div class=\"borde flexible-row\">\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Nombre:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.nameProvider}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Direcci\u00F3n:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.addressProvider}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Detalles del servicio</h2>\n </div>\n\n <div class=\"borde w-100 description-section\">\n <h2 class=\"wrap-text text-start\">{{data.description}}</h2>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:35%\">\n <h2 class=\"fw-bold\">AUTORIZADA POR:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:65%\">\n <h2 class=\"wrap-text\">{{data.approved_by}}</h2>\n </div>\n </div>\n\n <!-- piso -->\n <div class=\"borde d-flex flex-column align-items-center justify-content-center w-100 footer-section\">\n <h2>Favor adjuntar la orden a la factura o cuenta de cobro</h2>\n <h2 class=\"wrap-text\">{{data.mail}}</h2>\n </div>\n\n </div>\n\n <div class=\"download-container\">\n <button (click)=\"generatePdfWithHtml2Canvas()\" color='primary' mat-raised-button style=\"margin-right: 10px;\">\n Generar PDF\n </button>\n</div>\n</mat-dialog-content>\n\n", styles: [".img{background-size:100%!important;background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important;height:22mm!important;margin:0!important;padding:0!important}h2{font-size:1rem!important;line-height:1.2!important;margin:0!important;padding:0!important;text-align:center!important}h3{line-height:1.2!important;margin:0!important;padding:0!important;text-align:center!important}.text-header{line-height:1.5!important;font-weight:700!important}.text-uppercase{text-transform:uppercase!important}.wrap-text{white-space:pre-wrap!important}.text-content{padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.borde{border:1px solid blue!important}.border-r{border-right:1px solid blue!important;min-height:100%!important;align-self:stretch!important}.container-text{display:flex!important;justify-content:center!important;align-items:center!important;min-height:inherit!important}.container-headers{display:flex!important;align-items:center!important;justify-content:space-evenly!important;width:100%!important;min-height:8mm!important;background:#f0f4ff9c!important;padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.container-headers h2{font-weight:700!important}.flexible-row{display:flex!important;flex-direction:row!important;align-items:stretch!important;min-height:11mm!important}.header-section{min-height:25mm!important}.footer-section{min-height:14mm!important;background:#f0f4ff59!important;padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.description-section{min-height:20mm!important;padding:10px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.w-100{width:100%!important}.text-start{text-align:start!important}.white-background{background-color:#fff!important}.download-container{display:flex!important;justify-content:center!important;margin-top:15px!important}\n"] }]
|
|
1259
1356
|
}], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
1260
1357
|
type: Inject,
|
|
1261
1358
|
args: [MAT_DIALOG_DATA]
|
|
@@ -1395,7 +1492,7 @@ class FuelOrderPdfService {
|
|
|
1395
1492
|
{ content: data.odometer, styles: {} }
|
|
1396
1493
|
]
|
|
1397
1494
|
];
|
|
1398
|
-
|
|
1495
|
+
autoTable(doc, {
|
|
1399
1496
|
startY: y,
|
|
1400
1497
|
body: tableData,
|
|
1401
1498
|
theme: 'grid',
|
|
@@ -1434,7 +1531,7 @@ class FuelOrderPdfService {
|
|
|
1434
1531
|
{ content: data.addressPlace, styles: {} }
|
|
1435
1532
|
]
|
|
1436
1533
|
];
|
|
1437
|
-
|
|
1534
|
+
autoTable(doc, {
|
|
1438
1535
|
startY: y + 20,
|
|
1439
1536
|
body: tableData,
|
|
1440
1537
|
theme: 'grid',
|
|
@@ -1559,7 +1656,7 @@ class FuelOrderPdfService {
|
|
|
1559
1656
|
{ content: data.approved_by, styles: { fontSize: 12 } }
|
|
1560
1657
|
]
|
|
1561
1658
|
];
|
|
1562
|
-
|
|
1659
|
+
autoTable(doc, {
|
|
1563
1660
|
startY: y,
|
|
1564
1661
|
body: tableData,
|
|
1565
1662
|
theme: 'grid',
|
|
@@ -1673,11 +1770,11 @@ class TemplateFuelComponent {
|
|
|
1673
1770
|
});
|
|
1674
1771
|
}
|
|
1675
1772
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TemplateFuelComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialog }, { token: MessageService }, { token: FuelOrderPdfService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1676
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: TemplateFuelComponent, isStandalone: false, selector: "app-template-fuel", ngImport: i0, template: "<mat-dialog-content id=\"templateFO\" #templateFO>\n <div class=\"d-flex flex-column w-100 white-background\">\n\n <!-- Encabezado -->\n <div class=\"borde w-100 d-flex flex-row align-items-center header-section\">\n <div class=\"d-flex flex-column align-items-center text-content\" style=\"width:80%\">\n <h2 class=\"text-header text-uppercase wrap-text\">{{data.name}}</h2>\n <h2 class=\"text-header wrap-text\">NIT: {{data.nit}}</h2>\n <div class=\"w-100 d-flex flex-row justify-content-evenly\">\n <h3 class=\"text-header wrap-text\">{{data.address}}</h3>\n <h3 class=\"text-header wrap-text\">TEL: {{data.telephone}}</h3>\n </div>\n </div>\n <div style=\"width:20%\">\n <div class=\"img w-100\" [style.background-image]=\"'url(' + data.image + ')'\">\n </div>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Orden de combustible</h2>\n <h2 class=\"wrap-text\">N\u00B0: {{data.consecutive}}</h2>\n </div>\n\n <!-- Cuerpo -->\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">\u00C1rea:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.area}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">C\u00F3digo:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.code}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Fecha:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.date}}</h2>\n </div>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Operario:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.responsible}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Od\u00F3metro:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:44%\">\n <h2 class=\"wrap-text\">{{data.odometer}}</h2>\n </div>\n <!-- <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Referencia Factura:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.invoiceReference}}</h2>\n </div> -->\n </div>\n\n <div class=\"borde container-headers\">\n <h3>Datos del proveedor</h3>\n </div>\n\n <div class=\"borde flexible-row\">\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Lugar:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.namePlace}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Direcci\u00F3n:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.addressPlace}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h3>Detalles del servicio</h3>\n </div>\n\n <div class=\"borde w-100 description-section\">\n <h3 class=\"wrap-text text-start\">{{data.detalle}}</h3>\n <h3 class=\"wrap-text text-start\">Descripci\u00F3n: {{data.description}}</h3>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:35%\">\n <h2 class=\"fw-bold\">AUTORIZADA POR:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:65%\">\n <h2 class=\"wrap-text\">{{data.approved_by}}</h2>\n </div>\n </div>\n\n <!-- piso -->\n <div class=\"borde d-flex flex-column align-items-center justify-content-center w-100 footer-section\">\n <h2>Favor adjuntar la orden de venta o factura</h2>\n <h2 class=\"wrap-text\">{{data.mail}}</h2>\n </div>\n\n </div>\n
|
|
1773
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: TemplateFuelComponent, isStandalone: false, selector: "app-template-fuel", ngImport: i0, template: "<mat-dialog-content id=\"templateFO\" #templateFO>\n <div class=\"d-flex flex-column w-100 white-background\">\n\n <!-- Encabezado -->\n <div class=\"borde w-100 d-flex flex-row align-items-center header-section\">\n <div class=\"d-flex flex-column align-items-center text-content\" style=\"width:80%\">\n <h2 class=\"text-header text-uppercase wrap-text\">{{data.name}}</h2>\n <h2 class=\"text-header wrap-text\">NIT: {{data.nit}}</h2>\n <div class=\"w-100 d-flex flex-row justify-content-evenly\">\n <h3 class=\"text-header wrap-text\">{{data.address}}</h3>\n <h3 class=\"text-header wrap-text\">TEL: {{data.telephone}}</h3>\n </div>\n </div>\n <div style=\"width:20%\">\n <div class=\"img w-100\" [style.background-image]=\"'url(' + data.image + ')'\">\n </div>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Orden de combustible</h2>\n <h2 class=\"wrap-text\">N\u00B0: {{data.consecutive}}</h2>\n </div>\n\n <!-- Cuerpo -->\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">\u00C1rea:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.area}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">C\u00F3digo:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.code}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Fecha:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.date}}</h2>\n </div>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Operario:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.responsible}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Od\u00F3metro:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:44%\">\n <h2 class=\"wrap-text\">{{data.odometer}}</h2>\n </div>\n <!-- <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Referencia Factura:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.invoiceReference}}</h2>\n </div> -->\n </div>\n\n <div class=\"borde container-headers\">\n <h3>Datos del proveedor</h3>\n </div>\n\n <div class=\"borde flexible-row\">\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Lugar:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.namePlace}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Direcci\u00F3n:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.addressPlace}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h3>Detalles del servicio</h3>\n </div>\n\n <div class=\"borde w-100 description-section\">\n <h3 class=\"wrap-text text-start\">{{data.detalle}}</h3>\n <h3 class=\"wrap-text text-start\">Descripci\u00F3n: {{data.description}}</h3>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:35%\">\n <h2 class=\"fw-bold\">AUTORIZADA POR:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:65%\">\n <h2 class=\"wrap-text\">{{data.approved_by}}</h2>\n </div>\n </div>\n\n <!-- piso -->\n <div class=\"borde d-flex flex-column align-items-center justify-content-center w-100 footer-section\">\n <h2>Favor adjuntar la orden de venta o factura</h2>\n <h2 class=\"wrap-text\">{{data.mail}}</h2>\n </div>\n\n </div>\n\n\n<div class=\"download-container\">\n <button (click)=\"generatePdfWithHtml2Canvas()\" color='primary' mat-raised-button style=\"margin-right: 10px;\">\n Generar PDF\n </button>\n</div>\n</mat-dialog-content>\n", styles: [".img{background-size:100%!important;background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important;height:22mm!important;margin:0!important;padding:0!important}h2{font-size:1rem!important;line-height:1.2!important;margin:0!important;padding:0!important;text-align:center!important}h3{line-height:1.2!important;margin:0!important;padding:0!important;text-align:center!important}.text-header{line-height:1.5!important;font-weight:700!important}.text-uppercase{text-transform:uppercase!important}.wrap-text{white-space:pre-wrap!important}.text-content{padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.borde{border:1px solid blue!important}.border-r{border-right:1px solid blue!important;min-height:100%!important;align-self:stretch!important}.container-text{display:flex!important;justify-content:center!important;align-items:center!important;min-height:inherit!important}.container-headers{display:flex!important;align-items:center!important;justify-content:space-evenly!important;width:100%!important;min-height:8mm!important;background:#f0f4ff9c!important;padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.container-headers h2,.container-headers h3{font-weight:700!important}.flexible-row{display:flex!important;flex-direction:row!important;align-items:stretch!important;min-height:11mm!important}.header-section{min-height:25mm!important}.footer-section{min-height:14mm!important;background:#f0f4ff59!important;padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.description-section{min-height:20mm!important;padding:10px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.w-100{width:100%!important}.text-start{text-align:start!important}.white-background{background-color:#fff!important}.download-container{display:flex!important;justify-content:center!important;margin-top:15px!important}\n"], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
|
|
1677
1774
|
}
|
|
1678
1775
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TemplateFuelComponent, decorators: [{
|
|
1679
1776
|
type: Component,
|
|
1680
|
-
args: [{ selector: 'app-template-fuel', standalone: false, template: "<mat-dialog-content id=\"templateFO\" #templateFO>\n <div class=\"d-flex flex-column w-100 white-background\">\n\n <!-- Encabezado -->\n <div class=\"borde w-100 d-flex flex-row align-items-center header-section\">\n <div class=\"d-flex flex-column align-items-center text-content\" style=\"width:80%\">\n <h2 class=\"text-header text-uppercase wrap-text\">{{data.name}}</h2>\n <h2 class=\"text-header wrap-text\">NIT: {{data.nit}}</h2>\n <div class=\"w-100 d-flex flex-row justify-content-evenly\">\n <h3 class=\"text-header wrap-text\">{{data.address}}</h3>\n <h3 class=\"text-header wrap-text\">TEL: {{data.telephone}}</h3>\n </div>\n </div>\n <div style=\"width:20%\">\n <div class=\"img w-100\" [style.background-image]=\"'url(' + data.image + ')'\">\n </div>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Orden de combustible</h2>\n <h2 class=\"wrap-text\">N\u00B0: {{data.consecutive}}</h2>\n </div>\n\n <!-- Cuerpo -->\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">\u00C1rea:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.area}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">C\u00F3digo:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.code}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Fecha:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.date}}</h2>\n </div>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Operario:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.responsible}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Od\u00F3metro:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:44%\">\n <h2 class=\"wrap-text\">{{data.odometer}}</h2>\n </div>\n <!-- <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Referencia Factura:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.invoiceReference}}</h2>\n </div> -->\n </div>\n\n <div class=\"borde container-headers\">\n <h3>Datos del proveedor</h3>\n </div>\n\n <div class=\"borde flexible-row\">\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Lugar:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.namePlace}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Direcci\u00F3n:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.addressPlace}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h3>Detalles del servicio</h3>\n </div>\n\n <div class=\"borde w-100 description-section\">\n <h3 class=\"wrap-text text-start\">{{data.detalle}}</h3>\n <h3 class=\"wrap-text text-start\">Descripci\u00F3n: {{data.description}}</h3>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:35%\">\n <h2 class=\"fw-bold\">AUTORIZADA POR:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:65%\">\n <h2 class=\"wrap-text\">{{data.approved_by}}</h2>\n </div>\n </div>\n\n <!-- piso -->\n <div class=\"borde d-flex flex-column align-items-center justify-content-center w-100 footer-section\">\n <h2>Favor adjuntar la orden de venta o factura</h2>\n <h2 class=\"wrap-text\">{{data.mail}}</h2>\n </div>\n\n </div>\n
|
|
1777
|
+
args: [{ selector: 'app-template-fuel', standalone: false, template: "<mat-dialog-content id=\"templateFO\" #templateFO>\n <div class=\"d-flex flex-column w-100 white-background\">\n\n <!-- Encabezado -->\n <div class=\"borde w-100 d-flex flex-row align-items-center header-section\">\n <div class=\"d-flex flex-column align-items-center text-content\" style=\"width:80%\">\n <h2 class=\"text-header text-uppercase wrap-text\">{{data.name}}</h2>\n <h2 class=\"text-header wrap-text\">NIT: {{data.nit}}</h2>\n <div class=\"w-100 d-flex flex-row justify-content-evenly\">\n <h3 class=\"text-header wrap-text\">{{data.address}}</h3>\n <h3 class=\"text-header wrap-text\">TEL: {{data.telephone}}</h3>\n </div>\n </div>\n <div style=\"width:20%\">\n <div class=\"img w-100\" [style.background-image]=\"'url(' + data.image + ')'\">\n </div>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h2>Orden de combustible</h2>\n <h2 class=\"wrap-text\">N\u00B0: {{data.consecutive}}</h2>\n </div>\n\n <!-- Cuerpo -->\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">\u00C1rea:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.area}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">C\u00F3digo:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.code}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Fecha:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.date}}</h2>\n </div>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Operario:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:32%\">\n <h2 class=\"wrap-text\">{{data.responsible}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Od\u00F3metro:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:44%\">\n <h2 class=\"wrap-text\">{{data.odometer}}</h2>\n </div>\n <!-- <div class=\"border-r container-text\" style=\"width:12%\">\n <h2 class=\"fw-bold\">Referencia Factura:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:16%\">\n <h2 class=\"wrap-text\">{{data.invoiceReference}}</h2>\n </div> -->\n </div>\n\n <div class=\"borde container-headers\">\n <h3>Datos del proveedor</h3>\n </div>\n\n <div class=\"borde flexible-row\">\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Lugar:</h2>\n </div>\n <div class=\"border-r container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.namePlace}}</h2>\n </div>\n <div class=\"border-r container-text\" style=\"width:15%\">\n <h2 class=\"fw-bold\">Direcci\u00F3n:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:35%\">\n <h2 class=\"wrap-text\">{{data.addressPlace}}</h2>\n </div>\n </div>\n\n <div class=\"borde container-headers\">\n <h3>Detalles del servicio</h3>\n </div>\n\n <div class=\"borde w-100 description-section\">\n <h3 class=\"wrap-text text-start\">{{data.detalle}}</h3>\n <h3 class=\"wrap-text text-start\">Descripci\u00F3n: {{data.description}}</h3>\n </div>\n\n <div class=\"borde w-100 flexible-row\">\n <div class=\"border-r container-text\" style=\"width:35%\">\n <h2 class=\"fw-bold\">AUTORIZADA POR:</h2>\n </div>\n <div class=\"container-text text-content\" style=\"width:65%\">\n <h2 class=\"wrap-text\">{{data.approved_by}}</h2>\n </div>\n </div>\n\n <!-- piso -->\n <div class=\"borde d-flex flex-column align-items-center justify-content-center w-100 footer-section\">\n <h2>Favor adjuntar la orden de venta o factura</h2>\n <h2 class=\"wrap-text\">{{data.mail}}</h2>\n </div>\n\n </div>\n\n\n<div class=\"download-container\">\n <button (click)=\"generatePdfWithHtml2Canvas()\" color='primary' mat-raised-button style=\"margin-right: 10px;\">\n Generar PDF\n </button>\n</div>\n</mat-dialog-content>\n", styles: [".img{background-size:100%!important;background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important;height:22mm!important;margin:0!important;padding:0!important}h2{font-size:1rem!important;line-height:1.2!important;margin:0!important;padding:0!important;text-align:center!important}h3{line-height:1.2!important;margin:0!important;padding:0!important;text-align:center!important}.text-header{line-height:1.5!important;font-weight:700!important}.text-uppercase{text-transform:uppercase!important}.wrap-text{white-space:pre-wrap!important}.text-content{padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.borde{border:1px solid blue!important}.border-r{border-right:1px solid blue!important;min-height:100%!important;align-self:stretch!important}.container-text{display:flex!important;justify-content:center!important;align-items:center!important;min-height:inherit!important}.container-headers{display:flex!important;align-items:center!important;justify-content:space-evenly!important;width:100%!important;min-height:8mm!important;background:#f0f4ff9c!important;padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.container-headers h2,.container-headers h3{font-weight:700!important}.flexible-row{display:flex!important;flex-direction:row!important;align-items:stretch!important;min-height:11mm!important}.header-section{min-height:25mm!important}.footer-section{min-height:14mm!important;background:#f0f4ff59!important;padding:5px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.description-section{min-height:20mm!important;padding:10px!important;word-wrap:break-word!important;overflow-wrap:break-word!important}.w-100{width:100%!important}.text-start{text-align:start!important}.white-background{background-color:#fff!important}.download-container{display:flex!important;justify-content:center!important;margin-top:15px!important}\n"] }]
|
|
1681
1778
|
}], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
1682
1779
|
type: Inject,
|
|
1683
1780
|
args: [MAT_DIALOG_DATA]
|
|
@@ -2582,7 +2679,7 @@ class DataTableComponent {
|
|
|
2582
2679
|
this.functionEter.dateIso(columnValue);
|
|
2583
2680
|
if (columns.type == 'dateWithTime')
|
|
2584
2681
|
this.data[indexData][columns.ID] = this.functionEter.dateWithTime(columnValue?.toString() ?? columnValue);
|
|
2585
|
-
if (columns.type == 'currency')
|
|
2682
|
+
if (columns.type == 'currency' || columns.type == 'thousandSeparator')
|
|
2586
2683
|
this.data[indexData][columns.ID] =
|
|
2587
2684
|
Intl.NumberFormat('es-CO').format(columnValue);
|
|
2588
2685
|
if (columns.type == 'boolean')
|
|
@@ -2694,7 +2791,13 @@ class DataTableComponent {
|
|
|
2694
2791
|
.afterClosed()
|
|
2695
2792
|
.subscribe((result) => {
|
|
2696
2793
|
if (result) {
|
|
2697
|
-
|
|
2794
|
+
const oldRow = { ...currentRow[0] };
|
|
2795
|
+
this.columns.forEach(col => {
|
|
2796
|
+
if (col.type === 'thousandSeparator' && oldRow[col.ID] != null) {
|
|
2797
|
+
oldRow[col.ID] = oldRow[col.ID].toString().replace(/\./g, '');
|
|
2798
|
+
}
|
|
2799
|
+
});
|
|
2800
|
+
this.edit.emit({ new: result, old: oldRow });
|
|
2698
2801
|
}
|
|
2699
2802
|
});
|
|
2700
2803
|
}
|
|
@@ -3311,7 +3414,8 @@ class BrainloperUiModule {
|
|
|
3311
3414
|
CarouselComponent,
|
|
3312
3415
|
FiltersComponent,
|
|
3313
3416
|
SelectFilterComponent,
|
|
3314
|
-
CarouselItemDirective
|
|
3417
|
+
CarouselItemDirective,
|
|
3418
|
+
ThousandSeparatorDirective], imports: [CommonModule,
|
|
3315
3419
|
MatButtonModule, MatSlideToggleModule,
|
|
3316
3420
|
MatProgressBarModule,
|
|
3317
3421
|
MatRippleModule,
|
|
@@ -3396,7 +3500,8 @@ class BrainloperUiModule {
|
|
|
3396
3500
|
CarouselComponent,
|
|
3397
3501
|
FiltersComponent,
|
|
3398
3502
|
SelectFilterComponent,
|
|
3399
|
-
CarouselItemDirective
|
|
3503
|
+
CarouselItemDirective,
|
|
3504
|
+
ThousandSeparatorDirective] });
|
|
3400
3505
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BrainloperUiModule, providers: [
|
|
3401
3506
|
HttpService,
|
|
3402
3507
|
provideHttpClient(withInterceptorsFromDi())
|
|
@@ -3466,7 +3571,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
3466
3571
|
CarouselComponent,
|
|
3467
3572
|
FiltersComponent,
|
|
3468
3573
|
SelectFilterComponent,
|
|
3469
|
-
CarouselItemDirective
|
|
3574
|
+
CarouselItemDirective,
|
|
3575
|
+
ThousandSeparatorDirective
|
|
3470
3576
|
],
|
|
3471
3577
|
exports: [
|
|
3472
3578
|
...Material,
|
|
@@ -3482,7 +3588,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
3482
3588
|
CarouselComponent,
|
|
3483
3589
|
FiltersComponent,
|
|
3484
3590
|
SelectFilterComponent,
|
|
3485
|
-
CarouselItemDirective
|
|
3591
|
+
CarouselItemDirective,
|
|
3592
|
+
ThousandSeparatorDirective
|
|
3486
3593
|
], imports: [
|
|
3487
3594
|
CommonModule,
|
|
3488
3595
|
MatButtonModule,
|
|
@@ -3697,7 +3804,7 @@ class PurchaseOrderPdfService {
|
|
|
3697
3804
|
{ content: `Autoriza: ${order.authorizeName}`, styles: { halign: 'right' } }
|
|
3698
3805
|
]);
|
|
3699
3806
|
}
|
|
3700
|
-
|
|
3807
|
+
autoTable(doc, {
|
|
3701
3808
|
startY: y,
|
|
3702
3809
|
body: rows,
|
|
3703
3810
|
theme: 'plain',
|
|
@@ -3714,7 +3821,7 @@ class PurchaseOrderPdfService {
|
|
|
3714
3821
|
item.amount,
|
|
3715
3822
|
item.description || ''
|
|
3716
3823
|
]);
|
|
3717
|
-
|
|
3824
|
+
autoTable(doc, {
|
|
3718
3825
|
startY: y,
|
|
3719
3826
|
head: head,
|
|
3720
3827
|
body: body,
|
|
@@ -3983,5 +4090,5 @@ var enumRules;
|
|
|
3983
4090
|
* Generated bundle index. Do not edit.
|
|
3984
4091
|
*/
|
|
3985
4092
|
|
|
3986
|
-
export { BrainloperUiModule, BreadCrumbComponent, ButtonIconComponent, ButtonLabelComponent, CarouselComponent, CarouselItemDirective, CombosComponent, CryptoService, DataTableComponent, ExportDataService, FileFormsService, FileInputComponent, FiltersComponent, FunctionsService, GeneratePdfService, HttpResponseType, HttpService, LoadingComponent, LocalStorageService, MenuBreadCrumb, MessageService, ScreenSizeUtil, SelectFilterComponent, SessionService, TableModalComponent, enumActions, enumRules };
|
|
4093
|
+
export { BrainloperUiModule, BreadCrumbComponent, ButtonIconComponent, ButtonLabelComponent, CarouselComponent, CarouselItemDirective, CombosComponent, CryptoService, DataTableComponent, ExportDataService, FileFormsService, FileInputComponent, FiltersComponent, FunctionsService, GeneratePdfService, HttpResponseType, HttpService, LoadingComponent, LocalStorageService, MenuBreadCrumb, MessageService, ScreenSizeUtil, SelectFilterComponent, SessionService, TableModalComponent, ThousandSeparatorDirective, enumActions, enumRules };
|
|
3987
4094
|
//# sourceMappingURL=brainloper-ui.mjs.map
|