@acontplus/ng-customer 2.0.3 → 2.1.0

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 CHANGED
@@ -28,33 +28,28 @@ pnpm add @acontplus/ng-customer
28
28
  ### 1. Import Components
29
29
 
30
30
  ```typescript
31
- import { CustomerCard, CustomerAddEditComponent } from '@acontplus/ng-customer';
31
+ import {
32
+ CompanyCustomerList,
33
+ CompanyCustomerForm,
34
+ CustomerAddEditComponent,
35
+ CompanyCustomerAddEditDialog,
36
+ CompanyCustomerAddEditDirective,
37
+ } from '@acontplus/ng-customer';
32
38
 
33
39
  @Component({
34
40
  selector: 'app-customers',
35
- imports: [CustomerCard],
41
+ imports: [CompanyCustomerList],
36
42
  template: `
37
- <acp-customer-card
38
- [customer]="customer"
39
- (editCustomer)="onEdit($event)"
40
- (deleteCustomer)="onDelete($event)"
41
- >
42
- </acp-customer-card>
43
+ <acp-company-customer-list (editCustomer)="onEdit($event)" (deleteCustomer)="onDelete($event)">
44
+ </acp-company-customer-list>
43
45
  `,
44
46
  })
45
47
  export class CustomersComponent {
46
- customer: CustomerListItemDto = {
47
- idCliente: 1,
48
- businessName: 'Acme Corp',
49
- email: 'contact@acme.com',
50
- phone: '123-456-7890',
51
- };
52
-
53
- onEdit(customer: CustomerListItemDto) {
48
+ onEdit(customer: any) {
54
49
  // Handle edit action
55
50
  }
56
51
 
57
- onDelete(customer: CustomerListItemDto) {
52
+ onDelete(customer: any) {
58
53
  // Handle delete action
59
54
  }
60
55
  }
@@ -64,14 +59,14 @@ export class CustomersComponent {
64
59
 
65
60
  ```typescript
66
61
  import { MatDialog } from '@angular/material/dialog';
67
- import { CustomerAddEditComponent } from '@acontplus/ng-customer';
62
+ import { CompanyCustomerAddEditDialog } from '@acontplus/ng-customer';
68
63
 
69
64
  @Component({...})
70
65
  export class CustomerListComponent {
71
66
  constructor(private dialog: MatDialog) {}
72
67
 
73
68
  openCustomerDialog(customer?: any) {
74
- const dialogRef = this.dialog.open(CustomerAddEditComponent, {
69
+ const dialogRef = this.dialog.open(CompanyCustomerAddEditDialog, {
75
70
  width: '800px',
76
71
  data: {
77
72
  id: customer?.id || 0,