@acontplus/ng-customer 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -1
- package/fesm2022/acontplus-ng-customer.mjs +27 -32
- package/fesm2022/acontplus-ng-customer.mjs.map +1 -1
- package/index.d.ts +4 -2
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -1,9 +1,51 @@
|
|
|
1
1
|
# @acontplus/ng-customer
|
|
2
2
|
|
|
3
|
-
Angular components for customer
|
|
3
|
+
Angular customer management library for AcontPlus applications, providing components and services for customer CRUD operations following clean architecture principles.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install @acontplus/ng-customer
|
|
9
9
|
```
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Customer Components**: Customer card and add/edit components built with Angular Material
|
|
14
|
+
- **Clean Architecture**: Organized in domain, application, infrastructure, and presentation layers
|
|
15
|
+
- **Domain Models**: Customer entities and value objects
|
|
16
|
+
- **Use Cases**: Business logic for customer operations (create, read, update, delete)
|
|
17
|
+
- **Repositories**: Data access abstractions with concrete implementations
|
|
18
|
+
- **DTOs and Mappers**: Data transfer objects and mapping utilities
|
|
19
|
+
- **TypeScript Support**: Full type safety with comprehensive TypeScript definitions
|
|
20
|
+
- **Angular Material Integration**: Consistent UI components
|
|
21
|
+
|
|
22
|
+
## Components
|
|
23
|
+
|
|
24
|
+
### Customer Card
|
|
25
|
+
|
|
26
|
+
Display component for showing customer information in a card format.
|
|
27
|
+
|
|
28
|
+
### Customer Add/Edit
|
|
29
|
+
|
|
30
|
+
Form component for creating and editing customer details.
|
|
31
|
+
|
|
32
|
+
## Architecture
|
|
33
|
+
|
|
34
|
+
The library follows Clean Architecture principles:
|
|
35
|
+
|
|
36
|
+
- **Domain**: Core business logic, entities, and repository interfaces
|
|
37
|
+
- **Application**: Use cases and application services
|
|
38
|
+
- **Infrastructure**: Repository implementations, DTOs, mappers, and external integrations
|
|
39
|
+
- **UI**: Angular components and presentation logic
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
Import the components and services you need:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { CustomerCardComponent, CustomerAddEditComponent } from '@acontplus/ng-customer';
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Running unit tests
|
|
50
|
+
|
|
51
|
+
Run `nx test ng-customer` to execute the unit tests.
|
|
@@ -5,25 +5,24 @@ import { inject, signal, ChangeDetectionStrategy, Component, input, output, comp
|
|
|
5
5
|
import { from, forkJoin } from 'rxjs';
|
|
6
6
|
import { NotificationService } from '@acontplus/ng-notifications';
|
|
7
7
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogContent, MatDialogActions } from '@angular/material/dialog';
|
|
8
|
-
import {
|
|
9
|
-
import * as i1 from '@angular/material/button';
|
|
8
|
+
import { InputChipComponent, ToUpperCaseDirective, ButtonComponent, DynamicCardComponent } from '@acontplus/ng-components';
|
|
10
9
|
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
-
import * as
|
|
10
|
+
import * as i1 from '@angular/forms';
|
|
12
11
|
import { FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
13
|
-
import * as
|
|
12
|
+
import * as i2 from '@angular/material/tabs';
|
|
14
13
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
15
|
-
import * as
|
|
14
|
+
import * as i3 from '@angular/material/form-field';
|
|
16
15
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
17
|
-
import * as
|
|
16
|
+
import * as i4 from '@angular/material/input';
|
|
18
17
|
import { MatInputModule } from '@angular/material/input';
|
|
19
|
-
import * as
|
|
18
|
+
import * as i5 from '@angular/material/select';
|
|
20
19
|
import { MatSelectModule } from '@angular/material/select';
|
|
21
|
-
import * as
|
|
20
|
+
import * as i6 from '@angular/material/slide-toggle';
|
|
22
21
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
23
22
|
import { MatCheckbox } from '@angular/material/checkbox';
|
|
24
23
|
import { MatIcon } from '@angular/material/icon';
|
|
25
24
|
import { MatTooltip } from '@angular/material/tooltip';
|
|
26
|
-
import * as
|
|
25
|
+
import * as i7 from '@angular/material/datepicker';
|
|
27
26
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
28
27
|
import { provideNativeDateAdapter } from '@angular/material/core';
|
|
29
28
|
import * as i1$1 from '@angular/material/card';
|
|
@@ -75,7 +74,7 @@ class CustomerExternalUseCase {
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
const CUSTOMER_API = {
|
|
78
|
-
BILLING: '
|
|
77
|
+
BILLING: 'customers',
|
|
79
78
|
};
|
|
80
79
|
|
|
81
80
|
class CompanySearchMapper {
|
|
@@ -283,7 +282,11 @@ class ListCustomerMapper {
|
|
|
283
282
|
};
|
|
284
283
|
// Parse payload (backend sends JSON string in payload)
|
|
285
284
|
const parsed = typeof response?.payload === 'string' ? JSON.parse(response.payload) : response?.payload;
|
|
286
|
-
const dataArray = Array.isArray(parsed)
|
|
285
|
+
const dataArray = Array.isArray(parsed)
|
|
286
|
+
? (parsed[0] ?? [])
|
|
287
|
+
: Array.isArray(parsed?.items)
|
|
288
|
+
? parsed.items
|
|
289
|
+
: [];
|
|
287
290
|
// Map each item to UI-friendly fields, preserving source values
|
|
288
291
|
result.items = dataArray.map((item, index) => ({
|
|
289
292
|
index: index + 1,
|
|
@@ -409,9 +412,7 @@ class CustomerHttpRepository {
|
|
|
409
412
|
}
|
|
410
413
|
getAll(obj) {
|
|
411
414
|
const json = ListCustomerMapper.toJson(obj);
|
|
412
|
-
return this.http
|
|
413
|
-
.get(`${this.url}?json=${json}`)
|
|
414
|
-
.then((response) => {
|
|
415
|
+
return this.http.get(`${this.url}?json=${json}`).then((response) => {
|
|
415
416
|
const data = ListCustomerMapper.fromJson(response);
|
|
416
417
|
return {
|
|
417
418
|
status: 'success',
|
|
@@ -462,9 +463,7 @@ class CustomerHttpRepository {
|
|
|
462
463
|
});
|
|
463
464
|
}
|
|
464
465
|
getById(id) {
|
|
465
|
-
return this.http
|
|
466
|
-
.get(`${this.url}GetId/${id}`)
|
|
467
|
-
.then(response => {
|
|
466
|
+
return this.http.get(`${this.url}GetId/${id}`).then(response => {
|
|
468
467
|
const data = CustomerGetByIdMapper.fromJson(response);
|
|
469
468
|
return {
|
|
470
469
|
status: response.code === '1' ? 'success' : 'warning',
|
|
@@ -531,7 +530,9 @@ class CustomerAddEditComponent {
|
|
|
531
530
|
idEmpresa: new FormControl(0),
|
|
532
531
|
idFormaPagoSri: new FormControl(0),
|
|
533
532
|
idTipoClienteProveedor: new FormControl(0),
|
|
534
|
-
|
|
533
|
+
idTipoIdentificacion: new FormControl(0, Validators.required),
|
|
534
|
+
idSubContribuyente: new FormControl(0),
|
|
535
|
+
idTiempoCredito: new FormControl(0),
|
|
535
536
|
idCiudad: new FormControl(0),
|
|
536
537
|
idEmpleado: new FormControl(0),
|
|
537
538
|
nombreFiscal: new FormControl('', Validators.required),
|
|
@@ -690,7 +691,7 @@ class CustomerAddEditComponent {
|
|
|
690
691
|
}
|
|
691
692
|
});
|
|
692
693
|
}
|
|
693
|
-
catch
|
|
694
|
+
catch {
|
|
694
695
|
// Handle error appropriately
|
|
695
696
|
}
|
|
696
697
|
}
|
|
@@ -818,7 +819,7 @@ class CustomerAddEditComponent {
|
|
|
818
819
|
provide: CustomerExternalUseCase,
|
|
819
820
|
useFactory: () => new CustomerExternalUseCase(new CustomerExternalHttpRepository()),
|
|
820
821
|
},
|
|
821
|
-
], ngImport: i0, template: "<mat-dialog-content>\n <form\n (ngSubmit)=\"onSave()\"\n id=\"formCompanyCustomer\"\n [formGroup]=\"customerForm\"\n autocomplete=\"off\"\n >\n <mat-tab-group>\n <mat-tab label=\"DATOS PRINCIPALES\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Identificaci\u00F3n: </mat-label>\n <mat-select\n formControlName=\"idTipoIdentificacion\"\n (selectionChange)=\"identificationTypeChange($event)\"\n >\n @for (item of tiposIdentificacion(); track $index) {\n <mat-option [value]=\"item.idTipoIdentificacion\">{{\n item.descripcion\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>N\u00FAmero de Identificaci\u00F3n</mat-label>\n <input\n type=\"text\"\n matInput\n (keydown.enter)=\"onKeyDownGovernmentId($event)\"\n formControlName=\"numeroIdentificacion\"\n />\n @if (\n numeroIdentificacionControl?.invalid &&\n (numeroIdentificacionControl?.dirty || numeroIdentificacionControl?.touched)\n ) {\n @if (numeroIdentificacionControl?.hasError('required')) {\n <mat-error> El n\u00FAmero de identificaci\u00F3n es obligatorio. </mat-error>\n }\n\n @if (numeroIdentificacionControl?.hasError('minlength')) {\n <mat-error>\n Debe tener al menos\n {{ numeroIdentificacionControl?.errors?.['minlength'].requiredLength }}\n d\u00EDgitos.\n </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('maxlength')) {\n <mat-error>\n No puede tener m\u00E1s de\n {{ numeroIdentificacionControl?.errors?.['maxlength'].requiredLength }}\n d\u00EDgitos.\n </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('pattern')) {\n <mat-error> Solo se permiten caracteres num\u00E9ricos. </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('endsWith001')) {\n <mat-error> Los \u00FAltimos tres d\u00EDgitos deben ser 001. </mat-error>\n }\n }\n\n @if (showRefresh()) {\n <ng-container matSuffix>\n <button type=\"button\" mat-icon-button (click)=\"onKeyDownGovernmentId($event)\">\n <mat-icon>refresh</mat-icon>\n </button>\n </ng-container>\n }\n </mat-form-field>\n </div>\n </div>\n\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Nombre Fiscal:</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n formControlName=\"nombreFiscal\"\n id=\"nombreComercial\"\n placeholder=\"Ej: TECNOMEGA\"\n acpToUpperCase\n />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Nombre Comercial:</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n formControlName=\"nombreComercial\"\n placeholder=\"Ej: TECNOMEGA\"\n acpToUpperCase\n type=\"text\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>Direcci\u00F3n:</mat-label>\n <input\n matInput\n formControlName=\"direccion\"\n placeholder=\"AV. 09 DE OCTUBRE...\"\n acpToUpperCase\n />\n </mat-form-field>\n </div>\n\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-mat-input-chip [chips]=\"emails\" [labelText]=\"'Correo'\" />\n </div>\n <div class=\"col\">\n <acp-mat-input-chip [chips]=\"telephones\" [labelText]=\"'Tel\u00E9fono'\" />\n </div>\n </div>\n\n @if (isUpdate()) {\n <div class=\"vstack gap-2 mt-2\">\n <span>Estado</span>\n <mat-slide-toggle formControlName=\"estado\">\n {{ customerForm.value.estado ? 'Activo' : 'Inactivo' }}\n </mat-slide-toggle>\n </div>\n }\n </div>\n </mat-tab>\n <mat-tab label=\"DATOS ADICIONALES\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Informaci\u00F3n B\u00E1sica\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Contribuyente: </mat-label>\n <mat-select formControlName=\"idSubContribuyente\">\n @for (item of tipoContribuyentes(); track $index) {\n <mat-option [value]=\"item.idSubContribuyente\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tiempo Cr\u00E9dito: </mat-label>\n <mat-select formControlName=\"idTiempoCredito\">\n @for (item of tiemposCredito(); track $index) {\n <mat-option [value]=\"item.idTiempoCredito\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Ciudad</mat-label>\n <mat-select formControlName=\"idCiudad\">\n <mat-option [value]=\"0\">-- Ninguno --</mat-option>\n @for (group of ciudades(); track $index) {\n <mat-optgroup [label]=\"group.nombre\">\n @for (item of group.ciudades; track $index) {\n <mat-option [value]=\"item.idCiudad\">{{ item.nombre }}</mat-option>\n }\n </mat-optgroup>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Cliente: </mat-label>\n <mat-select formControlName=\"idTipoClienteProveedor\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n @for (item of tiposCliente(); track $index) {\n <mat-option [value]=\"item.idTipoClienteProveedor\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Empresa: </mat-label>\n <mat-select formControlName=\"idEmpresa\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of empresas(); track $index) {\n <mat-option [value]=\"item.idEmpresa\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Fecha Nacimiento</mat-label>\n <input matInput [matDatepicker]=\"birthDate\" formControlName=\"birthDate\" />\n <mat-hint>MM/DD/YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix\n [for]=\"birthDate\"\n />\n <mat-datepicker #birthDate />\n @if (birthDateCtrl?.invalid && birthDateCtrl?.touched) {\n <mat-error> Fecha inv\u00E1lida </mat-error>\n }\n </mat-form-field>\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Informaci\u00F3n Laboral\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Empleado: </mat-label>\n <mat-select formControlName=\"idEmpleado\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of employees(); track $index) {\n <mat-option [value]=\"item.idEmpleado\">\n {{ item.nombreCompleto }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Cargo: </mat-label>\n <mat-select formControlName=\"idCargo\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of cargos(); track $index) {\n <mat-option [value]=\"item.idCargo\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Observaci\u00F3n</mat-label>\n <textarea matInput placeholder=\"...\" formControlName=\"nota\"></textarea>\n </mat-form-field>\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n </div>\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Configuraci\u00F3n Financiera\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-1 row-cols-xl-1 row-cols-lg-1 row-cols-md-1 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Forma de pago: </mat-label>\n <mat-select formControlName=\"idFormaPagoSri\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of formasPagoSri(); track $index) {\n <mat-option [value]=\"item.idFormaPagoSri\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <acp-mat-input-chip labelText=\"Placa\" [chips]=\"placas()\" />\n </div>\n\n <div class=\"col w-100\">\n <mat-checkbox formControlName=\"configValorBruto\"\n >Activar configuraci\u00F3n de valor bruto\n <mat-icon\n matTooltip=\"valor total de un bien o servicio sin incluir impuestos, deducciones o descuentos (uso dentro del reporte)\"\n >info</mat-icon\n ></mat-checkbox\n >\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n <div class=\"col\"></div>\n </div>\n </div>\n </mat-tab>\n <mat-tab label=\"INFORMACI\u00D3N CREDITICIA\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Informaci\u00F3n Personal\" [isHeaderVisible]=\"true\">\n <div\n formGroupName=\"dataInfoCred\"\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Estado Civil: </mat-label>\n <mat-select formControlName=\"maritalStatusId\">\n <mat-option [value]=\"0\">Seleccionar...</mat-option>\n\n @for (item of maritalStatuses(); track $index) {\n <mat-option [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Esposo(a):</mat-label>\n <input\n matInput\n formControlName=\"conyugeNombre\"\n placeholder=\"Nombre del c\u00F3nyuge\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tel\u00E9fono Personal:</mat-label>\n <input matInput formControlName=\"conyugeTel\" placeholder=\"09xxxxxxxx\" />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tel\u00E9fono Referencia:</mat-label>\n <input matInput formControlName=\"refFamTel\" placeholder=\"09xxxxxxxx\" />\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Referencia Familiar:</mat-label>\n <input\n matInput\n formControlName=\"refFamNombre\"\n placeholder=\"Nombre de referencia familiar\"\n />\n </mat-form-field>\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Informaci\u00F3n de Vivienda\" [isHeaderVisible]=\"true\">\n <div\n formGroupName=\"dataInfoCred\"\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo de Vivienda: </mat-label>\n <mat-select formControlName=\"housingTypeId\">\n <mat-option [value]=\"0\">Seleccionar...</mat-option>\n\n @for (item of housingTypes(); track $index) {\n <mat-option [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Sector:</mat-label>\n <input matInput formControlName=\"sector\" placeholder=\"Nombre del sector\" />\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Barrio:</mat-label>\n <input matInput formControlName=\"barrio\" placeholder=\"Nombre del barrio\" />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Calle:</mat-label>\n <input matInput formControlName=\"calle\" placeholder=\"Nombre de la calle\" />\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Direcci\u00F3n Completa</mat-label>\n <textarea\n matInput\n formControlName=\"dirVivienda\"\n placeholder=\"Direcci\u00F3n completa de la vivienda (Sector, Barrio y Calle)\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Descripci\u00F3n del Punto de Referencia:</mat-label>\n <textarea\n matInput\n formControlName=\"refDomicilio\"\n placeholder=\"Descripci\u00F3n detallada del punto de referencia\"\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n </div>\n </div>\n </mat-tab>\n </mat-tab-group>\n </form>\n</mat-dialog-content>\n<mat-dialog-actions>\n <acp-mat-theme-button type=\"submit\" form=\"formCompanyCustomer\" [text]=\"btnText()\" />\n<<<<<<<< HEAD:projects/acontplus-ui-components/src/lib/customers-ui/client/client-add-edit/client-add-edit.component.html\n <acp-mat-theme-button type=\"button\" variant=\"dark\" text=\"Cerrar\" (handleClick)=\"close()\" />\n========\n>>>>>>>> e8b4dd251833a4e8d200bdc036806a3191730767:packages/ng-customer/src/lib/ui/components/customer-add-edit/customer-add-edit.component.html\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: MatSelectModule }, { 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: "component", type: i6.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i7.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "component", type: MatInputChipComponent, selector: "acp-mat-input-chip", inputs: ["chips", "labelText", "placelholder"] }, { kind: "directive", type: ToUpperCaseDirective, selector: "[acpToUpperCase]" }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i8.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i8.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i8.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: MatThemeButtonComponent, selector: "acp-mat-theme-button", inputs: ["variant", "text", "icon", "outlined", "disabled", "useThemeColor", "type", "matStyle", "title", "ariaLabel", "name", "id", "form", "tabIndex", "testId"], outputs: ["handleClick"] }, { kind: "component", type: MatDynamicCardComponent, selector: "acp-mat-dynamic-card", inputs: ["cardTitle", "cardSubtitle", "avatarImageUrl", "isHeaderVisible", "contentPadding", "hasDivider", "areActionsVisible", "primaryButtonText", "secondaryButtonText", "primaryButtonIcon", "secondaryButtonIcon", "buttonsPosition"], outputs: ["primaryButtonClicked", "secondaryButtonClicked", "cardClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
822
|
+
], ngImport: i0, template: "<mat-dialog-content>\n <form\n (ngSubmit)=\"onSave()\"\n id=\"formCompanyCustomer\"\n [formGroup]=\"customerForm\"\n autocomplete=\"off\"\n >\n <mat-tab-group>\n <mat-tab label=\"DATOS PRINCIPALES\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Identificaci\u00F3n: </mat-label>\n <mat-select\n formControlName=\"idTipoIdentificacion\"\n (selectionChange)=\"identificationTypeChange($event)\"\n >\n @for (item of tiposIdentificacion(); track $index) {\n <mat-option [value]=\"item.idTipoIdentificacion\">{{\n item.descripcion\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>N\u00FAmero de Identificaci\u00F3n</mat-label>\n <input\n type=\"text\"\n matInput\n (keydown.enter)=\"onKeyDownGovernmentId($event)\"\n formControlName=\"numeroIdentificacion\"\n />\n @if (\n numeroIdentificacionControl?.invalid &&\n (numeroIdentificacionControl?.dirty || numeroIdentificacionControl?.touched)\n ) {\n @if (numeroIdentificacionControl?.hasError('required')) {\n <mat-error> El n\u00FAmero de identificaci\u00F3n es obligatorio. </mat-error>\n }\n\n @if (numeroIdentificacionControl?.hasError('minlength')) {\n <mat-error>\n Debe tener al menos\n {{ numeroIdentificacionControl?.errors?.['minlength'].requiredLength }}\n d\u00EDgitos.\n </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('maxlength')) {\n <mat-error>\n No puede tener m\u00E1s de\n {{ numeroIdentificacionControl?.errors?.['maxlength'].requiredLength }}\n d\u00EDgitos.\n </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('pattern')) {\n <mat-error> Solo se permiten caracteres num\u00E9ricos. </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('endsWith001')) {\n <mat-error> Los \u00FAltimos tres d\u00EDgitos deben ser 001. </mat-error>\n }\n }\n\n @if (showRefresh()) {\n <ng-container matSuffix>\n <acp-button\n type=\"button\"\n matStyle=\"icon\"\n icon=\"refresh\"\n (handleClick)=\"onKeyDownGovernmentId($event)\"\n />\n </ng-container>\n }\n </mat-form-field>\n </div>\n </div>\n\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Nombre Fiscal:</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n formControlName=\"nombreFiscal\"\n id=\"nombreComercial\"\n placeholder=\"Ej: TECNOMEGA\"\n acpToUpperCase\n />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Nombre Comercial:</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n formControlName=\"nombreComercial\"\n placeholder=\"Ej: TECNOMEGA\"\n acpToUpperCase\n type=\"text\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>Direcci\u00F3n:</mat-label>\n <input\n matInput\n formControlName=\"direccion\"\n placeholder=\"AV. 09 DE OCTUBRE...\"\n acpToUpperCase\n />\n </mat-form-field>\n </div>\n\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-input-chip [chips]=\"emails\" [labelText]=\"'Correo'\" />\n </div>\n <div class=\"col\">\n <acp-input-chip [chips]=\"telephones\" [labelText]=\"'Tel\u00E9fono'\" />\n </div>\n </div>\n\n @if (isUpdate()) {\n <div class=\"vstack gap-2 mt-2\">\n <span>Estado</span>\n <mat-slide-toggle formControlName=\"estado\">\n {{ customerForm.value.estado ? 'Activo' : 'Inactivo' }}\n </mat-slide-toggle>\n </div>\n }\n </div>\n </mat-tab>\n <mat-tab label=\"DATOS ADICIONALES\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-dynamic-card title=\"Informaci\u00F3n B\u00E1sica\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Contribuyente: </mat-label>\n <mat-select formControlName=\"idSubContribuyente\">\n @for (item of tipoContribuyentes(); track $index) {\n <mat-option [value]=\"item.idSubContribuyente\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tiempo Cr\u00E9dito: </mat-label>\n <mat-select formControlName=\"idTiempoCredito\">\n @for (item of tiemposCredito(); track $index) {\n <mat-option [value]=\"item.idTiempoCredito\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Ciudad</mat-label>\n <mat-select formControlName=\"idCiudad\">\n <mat-option [value]=\"0\">-- Ninguno --</mat-option>\n @for (group of ciudades(); track $index) {\n <mat-optgroup [label]=\"group.nombre\">\n @for (item of group.ciudades; track $index) {\n <mat-option [value]=\"item.idCiudad\">{{ item.nombre }}</mat-option>\n }\n </mat-optgroup>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Cliente: </mat-label>\n <mat-select formControlName=\"idTipoClienteProveedor\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n @for (item of tiposCliente(); track $index) {\n <mat-option [value]=\"item.idTipoClienteProveedor\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Empresa: </mat-label>\n <mat-select formControlName=\"idEmpresa\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of empresas(); track $index) {\n <mat-option [value]=\"item.idEmpresa\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Fecha Nacimiento</mat-label>\n <input matInput [matDatepicker]=\"birthDate\" formControlName=\"birthDate\" />\n <mat-hint>MM/DD/YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix [for]=\"birthDate\" />\n <mat-datepicker #birthDate />\n @if (birthDateCtrl?.invalid && birthDateCtrl?.touched) {\n <mat-error> Fecha inv\u00E1lida </mat-error>\n }\n </mat-form-field>\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n <div class=\"col\">\n <acp-dynamic-card title=\"Informaci\u00F3n Laboral\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Empleado: </mat-label>\n <mat-select formControlName=\"idEmpleado\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of employees(); track $index) {\n <mat-option [value]=\"item.idEmpleado\">\n {{ item.nombreCompleto }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Cargo: </mat-label>\n <mat-select formControlName=\"idCargo\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of cargos(); track $index) {\n <mat-option [value]=\"item.idCargo\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Observaci\u00F3n</mat-label>\n <textarea matInput placeholder=\"...\" formControlName=\"nota\"></textarea>\n </mat-form-field>\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n </div>\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-dynamic-card title=\"Configuraci\u00F3n Financiera\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-1 row-cols-xl-1 row-cols-lg-1 row-cols-md-1 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Forma de pago: </mat-label>\n <mat-select formControlName=\"idFormaPagoSri\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of formasPagoSri(); track $index) {\n <mat-option [value]=\"item.idFormaPagoSri\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <acp-input-chip labelText=\"Placa\" [chips]=\"placas()\" />\n </div>\n\n <div class=\"col w-100\">\n <mat-checkbox formControlName=\"configValorBruto\"\n >Activar configuraci\u00F3n de valor bruto\n <mat-icon\n matTooltip=\"valor total de un bien o servicio sin incluir impuestos, deducciones o descuentos (uso dentro del reporte)\"\n >info</mat-icon\n ></mat-checkbox\n >\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n <div class=\"col\"></div>\n </div>\n </div>\n </mat-tab>\n <mat-tab label=\"INFORMACI\u00D3N CREDITICIA\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-dynamic-card title=\"Informaci\u00F3n Personal\" [isHeaderVisible]=\"true\">\n <div\n formGroupName=\"dataInfoCred\"\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Estado Civil: </mat-label>\n <mat-select formControlName=\"maritalStatusId\">\n <mat-option [value]=\"0\">Seleccionar...</mat-option>\n\n @for (item of maritalStatuses(); track $index) {\n <mat-option [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Esposo(a):</mat-label>\n <input\n matInput\n formControlName=\"conyugeNombre\"\n placeholder=\"Nombre del c\u00F3nyuge\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tel\u00E9fono Personal:</mat-label>\n <input matInput formControlName=\"conyugeTel\" placeholder=\"09xxxxxxxx\" />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tel\u00E9fono Referencia:</mat-label>\n <input matInput formControlName=\"refFamTel\" placeholder=\"09xxxxxxxx\" />\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Referencia Familiar:</mat-label>\n <input\n matInput\n formControlName=\"refFamNombre\"\n placeholder=\"Nombre de referencia familiar\"\n />\n </mat-form-field>\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n <div class=\"col\">\n <acp-dynamic-card title=\"Informaci\u00F3n de Vivienda\" [isHeaderVisible]=\"true\">\n <div\n formGroupName=\"dataInfoCred\"\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo de Vivienda: </mat-label>\n <mat-select formControlName=\"housingTypeId\">\n <mat-option [value]=\"0\">Seleccionar...</mat-option>\n\n @for (item of housingTypes(); track $index) {\n <mat-option [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Sector:</mat-label>\n <input matInput formControlName=\"sector\" placeholder=\"Nombre del sector\" />\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Barrio:</mat-label>\n <input matInput formControlName=\"barrio\" placeholder=\"Nombre del barrio\" />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Calle:</mat-label>\n <input matInput formControlName=\"calle\" placeholder=\"Nombre de la calle\" />\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Direcci\u00F3n Completa</mat-label>\n <textarea\n matInput\n formControlName=\"dirVivienda\"\n placeholder=\"Direcci\u00F3n completa de la vivienda (Sector, Barrio y Calle)\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Descripci\u00F3n del Punto de Referencia:</mat-label>\n <textarea\n matInput\n formControlName=\"refDomicilio\"\n placeholder=\"Descripci\u00F3n detallada del punto de referencia\"\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n </div>\n </div>\n </mat-tab>\n </mat-tab-group>\n </form>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div class=\"hstack gap-2\">\n <acp-button type=\"submit\" variant=\"success\" form=\"formCompanyCustomer\" [text]=\"btnText()\" />\n <acp-button type=\"button\" variant=\"dark\" text=\"Cerrar\" (handleClick)=\"close()\" />\n </div>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.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: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5.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: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i6.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "component", type: InputChipComponent, selector: "acp-input-chip", inputs: ["chips", "labelText", "placelholder"] }, { kind: "directive", type: ToUpperCaseDirective, selector: "[acpToUpperCase]" }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: ButtonComponent, selector: "acp-button", inputs: ["variant", "text", "icon", "disabled", "type", "matStyle", "customClass", "extended", "title", "ariaLabel", "name", "id", "form", "tabIndex", "testId"], outputs: ["handleClick"] }, { kind: "component", type: DynamicCardComponent, selector: "acp-dynamic-card", inputs: ["cardTitle", "cardSubtitle", "avatarImageUrl", "isHeaderVisible", "contentPadding", "hasDivider", "areActionsVisible", "primaryButtonText", "secondaryButtonText", "primaryButtonIcon", "secondaryButtonIcon", "buttonsPosition"], outputs: ["primaryButtonClicked", "secondaryButtonClicked", "cardClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
822
823
|
}
|
|
823
824
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: CustomerAddEditComponent, decorators: [{
|
|
824
825
|
type: Component,
|
|
@@ -832,14 +833,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
832
833
|
MatInputModule,
|
|
833
834
|
MatSelectModule,
|
|
834
835
|
MatSlideToggleModule,
|
|
835
|
-
|
|
836
|
+
InputChipComponent,
|
|
836
837
|
ToUpperCaseDirective,
|
|
837
838
|
MatCheckbox,
|
|
838
839
|
MatIcon,
|
|
839
840
|
MatTooltip,
|
|
840
841
|
MatDatepickerModule,
|
|
841
|
-
|
|
842
|
-
|
|
842
|
+
ButtonComponent,
|
|
843
|
+
DynamicCardComponent,
|
|
843
844
|
], providers: [
|
|
844
845
|
provideNativeDateAdapter(),
|
|
845
846
|
{
|
|
@@ -850,7 +851,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
850
851
|
provide: CustomerExternalUseCase,
|
|
851
852
|
useFactory: () => new CustomerExternalUseCase(new CustomerExternalHttpRepository()),
|
|
852
853
|
},
|
|
853
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-dialog-content>\n <form\n (ngSubmit)=\"onSave()\"\n id=\"formCompanyCustomer\"\n [formGroup]=\"customerForm\"\n autocomplete=\"off\"\n >\n <mat-tab-group>\n <mat-tab label=\"DATOS PRINCIPALES\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Identificaci\u00F3n: </mat-label>\n <mat-select\n formControlName=\"idTipoIdentificacion\"\n (selectionChange)=\"identificationTypeChange($event)\"\n >\n @for (item of tiposIdentificacion(); track $index) {\n <mat-option [value]=\"item.idTipoIdentificacion\">{{\n item.descripcion\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>N\u00FAmero de Identificaci\u00F3n</mat-label>\n <input\n type=\"text\"\n matInput\n (keydown.enter)=\"onKeyDownGovernmentId($event)\"\n formControlName=\"numeroIdentificacion\"\n />\n @if (\n numeroIdentificacionControl?.invalid &&\n (numeroIdentificacionControl?.dirty || numeroIdentificacionControl?.touched)\n ) {\n @if (numeroIdentificacionControl?.hasError('required')) {\n <mat-error> El n\u00FAmero de identificaci\u00F3n es obligatorio. </mat-error>\n }\n\n @if (numeroIdentificacionControl?.hasError('minlength')) {\n <mat-error>\n Debe tener al menos\n {{ numeroIdentificacionControl?.errors?.['minlength'].requiredLength }}\n d\u00EDgitos.\n </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('maxlength')) {\n <mat-error>\n No puede tener m\u00E1s de\n {{ numeroIdentificacionControl?.errors?.['maxlength'].requiredLength }}\n d\u00EDgitos.\n </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('pattern')) {\n <mat-error> Solo se permiten caracteres num\u00E9ricos. </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('endsWith001')) {\n <mat-error> Los \u00FAltimos tres d\u00EDgitos deben ser 001. </mat-error>\n }\n }\n\n @if (showRefresh()) {\n <ng-container matSuffix>\n <button type=\"button\" mat-icon-button (click)=\"onKeyDownGovernmentId($event)\">\n <mat-icon>refresh</mat-icon>\n </button>\n </ng-container>\n }\n </mat-form-field>\n </div>\n </div>\n\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Nombre Fiscal:</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n formControlName=\"nombreFiscal\"\n id=\"nombreComercial\"\n placeholder=\"Ej: TECNOMEGA\"\n acpToUpperCase\n />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Nombre Comercial:</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n formControlName=\"nombreComercial\"\n placeholder=\"Ej: TECNOMEGA\"\n acpToUpperCase\n type=\"text\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>Direcci\u00F3n:</mat-label>\n <input\n matInput\n formControlName=\"direccion\"\n placeholder=\"AV. 09 DE OCTUBRE...\"\n acpToUpperCase\n />\n </mat-form-field>\n </div>\n\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-mat-input-chip [chips]=\"emails\" [labelText]=\"'Correo'\" />\n </div>\n <div class=\"col\">\n <acp-mat-input-chip [chips]=\"telephones\" [labelText]=\"'Tel\u00E9fono'\" />\n </div>\n </div>\n\n @if (isUpdate()) {\n <div class=\"vstack gap-2 mt-2\">\n <span>Estado</span>\n <mat-slide-toggle formControlName=\"estado\">\n {{ customerForm.value.estado ? 'Activo' : 'Inactivo' }}\n </mat-slide-toggle>\n </div>\n }\n </div>\n </mat-tab>\n <mat-tab label=\"DATOS ADICIONALES\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Informaci\u00F3n B\u00E1sica\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Contribuyente: </mat-label>\n <mat-select formControlName=\"idSubContribuyente\">\n @for (item of tipoContribuyentes(); track $index) {\n <mat-option [value]=\"item.idSubContribuyente\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tiempo Cr\u00E9dito: </mat-label>\n <mat-select formControlName=\"idTiempoCredito\">\n @for (item of tiemposCredito(); track $index) {\n <mat-option [value]=\"item.idTiempoCredito\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Ciudad</mat-label>\n <mat-select formControlName=\"idCiudad\">\n <mat-option [value]=\"0\">-- Ninguno --</mat-option>\n @for (group of ciudades(); track $index) {\n <mat-optgroup [label]=\"group.nombre\">\n @for (item of group.ciudades; track $index) {\n <mat-option [value]=\"item.idCiudad\">{{ item.nombre }}</mat-option>\n }\n </mat-optgroup>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Cliente: </mat-label>\n <mat-select formControlName=\"idTipoClienteProveedor\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n @for (item of tiposCliente(); track $index) {\n <mat-option [value]=\"item.idTipoClienteProveedor\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Empresa: </mat-label>\n <mat-select formControlName=\"idEmpresa\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of empresas(); track $index) {\n <mat-option [value]=\"item.idEmpresa\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Fecha Nacimiento</mat-label>\n <input matInput [matDatepicker]=\"birthDate\" formControlName=\"birthDate\" />\n <mat-hint>MM/DD/YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix\n [for]=\"birthDate\"\n />\n <mat-datepicker #birthDate />\n @if (birthDateCtrl?.invalid && birthDateCtrl?.touched) {\n <mat-error> Fecha inv\u00E1lida </mat-error>\n }\n </mat-form-field>\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Informaci\u00F3n Laboral\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Empleado: </mat-label>\n <mat-select formControlName=\"idEmpleado\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of employees(); track $index) {\n <mat-option [value]=\"item.idEmpleado\">\n {{ item.nombreCompleto }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Cargo: </mat-label>\n <mat-select formControlName=\"idCargo\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of cargos(); track $index) {\n <mat-option [value]=\"item.idCargo\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Observaci\u00F3n</mat-label>\n <textarea matInput placeholder=\"...\" formControlName=\"nota\"></textarea>\n </mat-form-field>\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n </div>\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Configuraci\u00F3n Financiera\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-1 row-cols-xl-1 row-cols-lg-1 row-cols-md-1 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Forma de pago: </mat-label>\n <mat-select formControlName=\"idFormaPagoSri\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of formasPagoSri(); track $index) {\n <mat-option [value]=\"item.idFormaPagoSri\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <acp-mat-input-chip labelText=\"Placa\" [chips]=\"placas()\" />\n </div>\n\n <div class=\"col w-100\">\n <mat-checkbox formControlName=\"configValorBruto\"\n >Activar configuraci\u00F3n de valor bruto\n <mat-icon\n matTooltip=\"valor total de un bien o servicio sin incluir impuestos, deducciones o descuentos (uso dentro del reporte)\"\n >info</mat-icon\n ></mat-checkbox\n >\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n <div class=\"col\"></div>\n </div>\n </div>\n </mat-tab>\n <mat-tab label=\"INFORMACI\u00D3N CREDITICIA\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Informaci\u00F3n Personal\" [isHeaderVisible]=\"true\">\n <div\n formGroupName=\"dataInfoCred\"\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Estado Civil: </mat-label>\n <mat-select formControlName=\"maritalStatusId\">\n <mat-option [value]=\"0\">Seleccionar...</mat-option>\n\n @for (item of maritalStatuses(); track $index) {\n <mat-option [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Esposo(a):</mat-label>\n <input\n matInput\n formControlName=\"conyugeNombre\"\n placeholder=\"Nombre del c\u00F3nyuge\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tel\u00E9fono Personal:</mat-label>\n <input matInput formControlName=\"conyugeTel\" placeholder=\"09xxxxxxxx\" />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tel\u00E9fono Referencia:</mat-label>\n <input matInput formControlName=\"refFamTel\" placeholder=\"09xxxxxxxx\" />\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Referencia Familiar:</mat-label>\n <input\n matInput\n formControlName=\"refFamNombre\"\n placeholder=\"Nombre de referencia familiar\"\n />\n </mat-form-field>\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n <div class=\"col\">\n <acp-mat-dynamic-card title=\"Informaci\u00F3n de Vivienda\" [isHeaderVisible]=\"true\">\n <div\n formGroupName=\"dataInfoCred\"\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo de Vivienda: </mat-label>\n <mat-select formControlName=\"housingTypeId\">\n <mat-option [value]=\"0\">Seleccionar...</mat-option>\n\n @for (item of housingTypes(); track $index) {\n <mat-option [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Sector:</mat-label>\n <input matInput formControlName=\"sector\" placeholder=\"Nombre del sector\" />\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Barrio:</mat-label>\n <input matInput formControlName=\"barrio\" placeholder=\"Nombre del barrio\" />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Calle:</mat-label>\n <input matInput formControlName=\"calle\" placeholder=\"Nombre de la calle\" />\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Direcci\u00F3n Completa</mat-label>\n <textarea\n matInput\n formControlName=\"dirVivienda\"\n placeholder=\"Direcci\u00F3n completa de la vivienda (Sector, Barrio y Calle)\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Descripci\u00F3n del Punto de Referencia:</mat-label>\n <textarea\n matInput\n formControlName=\"refDomicilio\"\n placeholder=\"Descripci\u00F3n detallada del punto de referencia\"\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n </acp-mat-dynamic-card>\n </div>\n </div>\n </div>\n </mat-tab>\n </mat-tab-group>\n </form>\n</mat-dialog-content>\n<mat-dialog-actions>\n <acp-mat-theme-button type=\"submit\" form=\"formCompanyCustomer\" [text]=\"btnText()\" />\n<<<<<<<< HEAD:projects/acontplus-ui-components/src/lib/customers-ui/client/client-add-edit/client-add-edit.component.html\n <acp-mat-theme-button type=\"button\" variant=\"dark\" text=\"Cerrar\" (handleClick)=\"close()\" />\n========\n>>>>>>>> e8b4dd251833a4e8d200bdc036806a3191730767:packages/ng-customer/src/lib/ui/components/customer-add-edit/customer-add-edit.component.html\n</mat-dialog-actions>\n" }]
|
|
854
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-dialog-content>\n <form\n (ngSubmit)=\"onSave()\"\n id=\"formCompanyCustomer\"\n [formGroup]=\"customerForm\"\n autocomplete=\"off\"\n >\n <mat-tab-group>\n <mat-tab label=\"DATOS PRINCIPALES\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Identificaci\u00F3n: </mat-label>\n <mat-select\n formControlName=\"idTipoIdentificacion\"\n (selectionChange)=\"identificationTypeChange($event)\"\n >\n @for (item of tiposIdentificacion(); track $index) {\n <mat-option [value]=\"item.idTipoIdentificacion\">{{\n item.descripcion\n }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>N\u00FAmero de Identificaci\u00F3n</mat-label>\n <input\n type=\"text\"\n matInput\n (keydown.enter)=\"onKeyDownGovernmentId($event)\"\n formControlName=\"numeroIdentificacion\"\n />\n @if (\n numeroIdentificacionControl?.invalid &&\n (numeroIdentificacionControl?.dirty || numeroIdentificacionControl?.touched)\n ) {\n @if (numeroIdentificacionControl?.hasError('required')) {\n <mat-error> El n\u00FAmero de identificaci\u00F3n es obligatorio. </mat-error>\n }\n\n @if (numeroIdentificacionControl?.hasError('minlength')) {\n <mat-error>\n Debe tener al menos\n {{ numeroIdentificacionControl?.errors?.['minlength'].requiredLength }}\n d\u00EDgitos.\n </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('maxlength')) {\n <mat-error>\n No puede tener m\u00E1s de\n {{ numeroIdentificacionControl?.errors?.['maxlength'].requiredLength }}\n d\u00EDgitos.\n </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('pattern')) {\n <mat-error> Solo se permiten caracteres num\u00E9ricos. </mat-error>\n }\n @if (numeroIdentificacionControl?.hasError('endsWith001')) {\n <mat-error> Los \u00FAltimos tres d\u00EDgitos deben ser 001. </mat-error>\n }\n }\n\n @if (showRefresh()) {\n <ng-container matSuffix>\n <acp-button\n type=\"button\"\n matStyle=\"icon\"\n icon=\"refresh\"\n (handleClick)=\"onKeyDownGovernmentId($event)\"\n />\n </ng-container>\n }\n </mat-form-field>\n </div>\n </div>\n\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Nombre Fiscal:</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n formControlName=\"nombreFiscal\"\n id=\"nombreComercial\"\n placeholder=\"Ej: TECNOMEGA\"\n acpToUpperCase\n />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Nombre Comercial:</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n formControlName=\"nombreComercial\"\n placeholder=\"Ej: TECNOMEGA\"\n acpToUpperCase\n type=\"text\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>Direcci\u00F3n:</mat-label>\n <input\n matInput\n formControlName=\"direccion\"\n placeholder=\"AV. 09 DE OCTUBRE...\"\n acpToUpperCase\n />\n </mat-form-field>\n </div>\n\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-input-chip [chips]=\"emails\" [labelText]=\"'Correo'\" />\n </div>\n <div class=\"col\">\n <acp-input-chip [chips]=\"telephones\" [labelText]=\"'Tel\u00E9fono'\" />\n </div>\n </div>\n\n @if (isUpdate()) {\n <div class=\"vstack gap-2 mt-2\">\n <span>Estado</span>\n <mat-slide-toggle formControlName=\"estado\">\n {{ customerForm.value.estado ? 'Activo' : 'Inactivo' }}\n </mat-slide-toggle>\n </div>\n }\n </div>\n </mat-tab>\n <mat-tab label=\"DATOS ADICIONALES\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-dynamic-card title=\"Informaci\u00F3n B\u00E1sica\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Contribuyente: </mat-label>\n <mat-select formControlName=\"idSubContribuyente\">\n @for (item of tipoContribuyentes(); track $index) {\n <mat-option [value]=\"item.idSubContribuyente\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tiempo Cr\u00E9dito: </mat-label>\n <mat-select formControlName=\"idTiempoCredito\">\n @for (item of tiemposCredito(); track $index) {\n <mat-option [value]=\"item.idTiempoCredito\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Ciudad</mat-label>\n <mat-select formControlName=\"idCiudad\">\n <mat-option [value]=\"0\">-- Ninguno --</mat-option>\n @for (group of ciudades(); track $index) {\n <mat-optgroup [label]=\"group.nombre\">\n @for (item of group.ciudades; track $index) {\n <mat-option [value]=\"item.idCiudad\">{{ item.nombre }}</mat-option>\n }\n </mat-optgroup>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo Cliente: </mat-label>\n <mat-select formControlName=\"idTipoClienteProveedor\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n @for (item of tiposCliente(); track $index) {\n <mat-option [value]=\"item.idTipoClienteProveedor\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Empresa: </mat-label>\n <mat-select formControlName=\"idEmpresa\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of empresas(); track $index) {\n <mat-option [value]=\"item.idEmpresa\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Fecha Nacimiento</mat-label>\n <input matInput [matDatepicker]=\"birthDate\" formControlName=\"birthDate\" />\n <mat-hint>MM/DD/YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix [for]=\"birthDate\" />\n <mat-datepicker #birthDate />\n @if (birthDateCtrl?.invalid && birthDateCtrl?.touched) {\n <mat-error> Fecha inv\u00E1lida </mat-error>\n }\n </mat-form-field>\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n <div class=\"col\">\n <acp-dynamic-card title=\"Informaci\u00F3n Laboral\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Empleado: </mat-label>\n <mat-select formControlName=\"idEmpleado\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of employees(); track $index) {\n <mat-option [value]=\"item.idEmpleado\">\n {{ item.nombreCompleto }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Cargo: </mat-label>\n <mat-select formControlName=\"idCargo\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of cargos(); track $index) {\n <mat-option [value]=\"item.idCargo\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Observaci\u00F3n</mat-label>\n <textarea matInput placeholder=\"...\" formControlName=\"nota\"></textarea>\n </mat-form-field>\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n </div>\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-dynamic-card title=\"Configuraci\u00F3n Financiera\" [isHeaderVisible]=\"true\">\n <div\n class=\"row row-cols-xxl-1 row-cols-xl-1 row-cols-lg-1 row-cols-md-1 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Forma de pago: </mat-label>\n <mat-select formControlName=\"idFormaPagoSri\">\n <mat-option [value]=\"0\">--Ninguno--</mat-option>\n\n @for (item of formasPagoSri(); track $index) {\n <mat-option [value]=\"item.idFormaPagoSri\">\n {{ item.descripcion }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <acp-input-chip labelText=\"Placa\" [chips]=\"placas()\" />\n </div>\n\n <div class=\"col w-100\">\n <mat-checkbox formControlName=\"configValorBruto\"\n >Activar configuraci\u00F3n de valor bruto\n <mat-icon\n matTooltip=\"valor total de un bien o servicio sin incluir impuestos, deducciones o descuentos (uso dentro del reporte)\"\n >info</mat-icon\n ></mat-checkbox\n >\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n <div class=\"col\"></div>\n </div>\n </div>\n </mat-tab>\n <mat-tab label=\"INFORMACI\u00D3N CREDITICIA\">\n <div class=\"d-grid gap-2 mx-3 mt-2\">\n <div\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-2 row-cols-1 g-1\"\n >\n <div class=\"col\">\n <acp-dynamic-card title=\"Informaci\u00F3n Personal\" [isHeaderVisible]=\"true\">\n <div\n formGroupName=\"dataInfoCred\"\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Estado Civil: </mat-label>\n <mat-select formControlName=\"maritalStatusId\">\n <mat-option [value]=\"0\">Seleccionar...</mat-option>\n\n @for (item of maritalStatuses(); track $index) {\n <mat-option [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Esposo(a):</mat-label>\n <input\n matInput\n formControlName=\"conyugeNombre\"\n placeholder=\"Nombre del c\u00F3nyuge\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tel\u00E9fono Personal:</mat-label>\n <input matInput formControlName=\"conyugeTel\" placeholder=\"09xxxxxxxx\" />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tel\u00E9fono Referencia:</mat-label>\n <input matInput formControlName=\"refFamTel\" placeholder=\"09xxxxxxxx\" />\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Referencia Familiar:</mat-label>\n <input\n matInput\n formControlName=\"refFamNombre\"\n placeholder=\"Nombre de referencia familiar\"\n />\n </mat-form-field>\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n <div class=\"col\">\n <acp-dynamic-card title=\"Informaci\u00F3n de Vivienda\" [isHeaderVisible]=\"true\">\n <div\n formGroupName=\"dataInfoCred\"\n class=\"row row-cols-xxl-2 row-cols-xl-2 row-cols-lg-2 row-cols-md-2 row-cols-sm-1 row-cols-1 g-2 mt-2\"\n >\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Tipo de Vivienda: </mat-label>\n <mat-select formControlName=\"housingTypeId\">\n <mat-option [value]=\"0\">Seleccionar...</mat-option>\n\n @for (item of housingTypes(); track $index) {\n <mat-option [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Sector:</mat-label>\n <input matInput formControlName=\"sector\" placeholder=\"Nombre del sector\" />\n </mat-form-field>\n </div>\n\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Barrio:</mat-label>\n <input matInput formControlName=\"barrio\" placeholder=\"Nombre del barrio\" />\n </mat-form-field>\n </div>\n <div class=\"col\">\n <mat-form-field class=\"w-100\">\n <mat-label>Calle:</mat-label>\n <input matInput formControlName=\"calle\" placeholder=\"Nombre de la calle\" />\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Direcci\u00F3n Completa</mat-label>\n <textarea\n matInput\n formControlName=\"dirVivienda\"\n placeholder=\"Direcci\u00F3n completa de la vivienda (Sector, Barrio y Calle)\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"col w-100\">\n <mat-form-field class=\"w-100\">\n <mat-label>Descripci\u00F3n del Punto de Referencia:</mat-label>\n <textarea\n matInput\n formControlName=\"refDomicilio\"\n placeholder=\"Descripci\u00F3n detallada del punto de referencia\"\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n </acp-dynamic-card>\n </div>\n </div>\n </div>\n </mat-tab>\n </mat-tab-group>\n </form>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div class=\"hstack gap-2\">\n <acp-button type=\"submit\" variant=\"success\" form=\"formCompanyCustomer\" [text]=\"btnText()\" />\n <acp-button type=\"button\" variant=\"dark\" text=\"Cerrar\" (handleClick)=\"close()\" />\n </div>\n</mat-dialog-actions>\n" }]
|
|
854
855
|
}] });
|
|
855
856
|
|
|
856
857
|
class CustomerCardComponent {
|
|
@@ -870,17 +871,11 @@ class CustomerCardComponent {
|
|
|
870
871
|
this.deleteCustomer.emit(this.customer());
|
|
871
872
|
}
|
|
872
873
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: CustomerCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
873
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: CustomerCardComponent, isStandalone: true, selector: "acp-customer-card", inputs: { customer: { classPropertyName: "customer", publicName: "customer", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { editCustomer: "editCustomer", deleteCustomer: "deleteCustomer" }, ngImport: i0, template: "<mat-card class=\"customer-card\">\n
|
|
874
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: CustomerCardComponent, isStandalone: true, selector: "acp-customer-card", inputs: { customer: { classPropertyName: "customer", publicName: "customer", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { editCustomer: "editCustomer", deleteCustomer: "deleteCustomer" }, ngImport: i0, template: "<div class=\"acp-customer-card\">\n <mat-card class=\"acp-customer-card-content\">\n <!-- Header -->\n <div class=\"acp-card-header\">\n <div class=\"acp-avatar\" aria-label=\"Logo de cliente\">{{ getLogoSliceBusinessName() }}</div>\n <h5 class=\"acp-business-name\">{{ customer().businessName }}</h5>\n <p class=\"acp-trade-name\">{{ customer().tradeName }}</p>\n </div>\n\n <!-- Card content -->\n <mat-card-content>\n <div class=\"acp-info\">\n <p><strong>ID:</strong> 1234567890 (RUC)</p>\n <p><strong>Email:</strong> {{ customer().email }}</p>\n <p><strong>Tel\u00E9fono:</strong> {{ customer().phone }}</p>\n <p><strong>Direcci\u00F3n:</strong>{{ customer().address }}</p>\n\n <div class=\"acp-chips\">\n <mat-chip-set>\n <mat-chip color=\"primary\">{{ customer().statusName }}</mat-chip>\n </mat-chip-set>\n </div>\n </div>\n </mat-card-content>\n\n <!-- Card actions -->\n @if (!customer().isFinalConsumer) {\n <mat-card-actions class=\"acp-actions gap-2\">\n <acp-button matStyle=\"icon\" icon=\"edit\" (handleClick)=\"onEditClick()\" />\n <acp-button\n matStyle=\"icon\"\n icon=\"delete\"\n variant=\"danger\"\n (handleClick)=\"onDeleteClick()\"\n />\n </mat-card-actions>\n }\n </mat-card>\n</div>\n", styles: [".acp-customer-card{display:block}.acp-customer-card .acp-customer-card-content{width:345px;border-radius:16px}.acp-customer-card .acp-card-header{display:flex;flex-direction:column;align-items:center;padding:16px;background-color:var(--mat-sys-primary-container, #e3f2fd);border-top-left-radius:16px;border-top-right-radius:16px}.acp-customer-card .acp-card-header .acp-business-name{text-align:center;font-size:14px;font-weight:500}.acp-customer-card .acp-card-header .acp-trade-name{text-align:center;font-size:12px;color:var(--mat-sys-on-surface-variant, #6c757d)}.acp-customer-card .acp-avatar{width:80px;height:80px;border-radius:50%;background-color:var(--mat-sys-primary, #1976d2);display:flex;justify-content:center;align-items:center;font-size:32px;color:var(--mat-sys-on-primary, white);margin-bottom:12px}.acp-customer-card .acp-info p{margin:4px 0}.acp-customer-card .acp-chips{margin-top:12px;display:flex;gap:8px}.acp-customer-card .acp-actions{justify-content:flex-end;padding:16px}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i1$1.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatDividerModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i2$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i2$1.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: ButtonComponent, selector: "acp-button", inputs: ["variant", "text", "icon", "disabled", "type", "matStyle", "customClass", "extended", "title", "ariaLabel", "name", "id", "form", "tabIndex", "testId"], outputs: ["handleClick"] }] });
|
|
874
875
|
}
|
|
875
876
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: CustomerCardComponent, decorators: [{
|
|
876
877
|
type: Component,
|
|
877
|
-
args: [{ selector: 'acp-customer-card', imports: [
|
|
878
|
-
MatCardModule,
|
|
879
|
-
MatDividerModule,
|
|
880
|
-
MatChipsModule,
|
|
881
|
-
MatButtonModule,
|
|
882
|
-
MatThemeButtonComponent,
|
|
883
|
-
], template: "<mat-card class=\"customer-card\">\n <!-- Header -->\n <div class=\"card-header\">\n <div class=\"avatar\" aria-label=\"Logo de cliente\">{{ getLogoSliceBusinessName() }}</div>\n <h5 class=\"businessName\">{{ customer().businessName }}</h5>\n <p class=\"tradeName\">{{ customer().tradeName }}</p>\n </div>\n\n <!-- Card content -->\n <mat-card-content>\n <div class=\"info\">\n <p><strong>ID:</strong> 1234567890 (RUC)</p>\n <p><strong>Email:</strong> {{ customer().email }}</p>\n <p><strong>Tel\u00E9fono:</strong> {{ customer().phone }}</p>\n <p><strong>Direcci\u00F3n:</strong>{{ customer().address }}</p>\n\n <div class=\"chips\">\n <mat-chip-set>\n <mat-chip color=\"primary\">{{ customer().statusName }}</mat-chip>\n </mat-chip-set>\n </div>\n </div>\n </mat-card-content>\n\n <!-- Card actions -->\n @if (!customer().isFinalConsumer) {\n <mat-card-actions class=\"actions gap-2\">\n <acp-mat-theme-button matStyle=\"icon\" icon=\"edit\" (handleClick)=\"onEditClick()\" />\n <acp-mat-theme-button\n matStyle=\"icon\"\n icon=\"delete\"\n variant=\"danger\"\n (handleClick)=\"onDeleteClick()\"\n />\n </mat-card-actions>\n }\n</mat-card>\n", styles: [".customer-card{width:345px;border-radius:16px}.card-header{display:flex;flex-direction:column;align-items:center;padding:16px;background-color:#e3f2fd;border-top-left-radius:16px;border-top-right-radius:16px}.card-header .businessName{text-align:center;font-size:14px;font-weight:500}.card-header .tradeName{text-align:center;font-size:12px;color:#6c757d}.avatar{width:80px;height:80px;border-radius:50%;background-color:#1976d2;display:flex;justify-content:center;align-items:center;font-size:32px;color:#fff;margin-bottom:12px}.info p{margin:4px 0}.chips{margin-top:12px;display:flex;gap:8px}.actions{justify-content:flex-end;padding:16px}\n"] }]
|
|
878
|
+
args: [{ selector: 'acp-customer-card', imports: [MatCardModule, MatDividerModule, MatChipsModule, MatButtonModule, ButtonComponent], template: "<div class=\"acp-customer-card\">\n <mat-card class=\"acp-customer-card-content\">\n <!-- Header -->\n <div class=\"acp-card-header\">\n <div class=\"acp-avatar\" aria-label=\"Logo de cliente\">{{ getLogoSliceBusinessName() }}</div>\n <h5 class=\"acp-business-name\">{{ customer().businessName }}</h5>\n <p class=\"acp-trade-name\">{{ customer().tradeName }}</p>\n </div>\n\n <!-- Card content -->\n <mat-card-content>\n <div class=\"acp-info\">\n <p><strong>ID:</strong> 1234567890 (RUC)</p>\n <p><strong>Email:</strong> {{ customer().email }}</p>\n <p><strong>Tel\u00E9fono:</strong> {{ customer().phone }}</p>\n <p><strong>Direcci\u00F3n:</strong>{{ customer().address }}</p>\n\n <div class=\"acp-chips\">\n <mat-chip-set>\n <mat-chip color=\"primary\">{{ customer().statusName }}</mat-chip>\n </mat-chip-set>\n </div>\n </div>\n </mat-card-content>\n\n <!-- Card actions -->\n @if (!customer().isFinalConsumer) {\n <mat-card-actions class=\"acp-actions gap-2\">\n <acp-button matStyle=\"icon\" icon=\"edit\" (handleClick)=\"onEditClick()\" />\n <acp-button\n matStyle=\"icon\"\n icon=\"delete\"\n variant=\"danger\"\n (handleClick)=\"onDeleteClick()\"\n />\n </mat-card-actions>\n }\n </mat-card>\n</div>\n", styles: [".acp-customer-card{display:block}.acp-customer-card .acp-customer-card-content{width:345px;border-radius:16px}.acp-customer-card .acp-card-header{display:flex;flex-direction:column;align-items:center;padding:16px;background-color:var(--mat-sys-primary-container, #e3f2fd);border-top-left-radius:16px;border-top-right-radius:16px}.acp-customer-card .acp-card-header .acp-business-name{text-align:center;font-size:14px;font-weight:500}.acp-customer-card .acp-card-header .acp-trade-name{text-align:center;font-size:12px;color:var(--mat-sys-on-surface-variant, #6c757d)}.acp-customer-card .acp-avatar{width:80px;height:80px;border-radius:50%;background-color:var(--mat-sys-primary, #1976d2);display:flex;justify-content:center;align-items:center;font-size:32px;color:var(--mat-sys-on-primary, white);margin-bottom:12px}.acp-customer-card .acp-info p{margin:4px 0}.acp-customer-card .acp-chips{margin-top:12px;display:flex;gap:8px}.acp-customer-card .acp-actions{justify-content:flex-end;padding:16px}\n"] }]
|
|
884
879
|
}] });
|
|
885
880
|
|
|
886
881
|
/**
|