diff --git a/bookie/angular.json b/bookie/angular.json index a0eaf39..3094272 100644 --- a/bookie/angular.json +++ b/bookie/angular.json @@ -32,7 +32,9 @@ "input": "public" } ], - "styles": ["src/styles.sass"], + "styles": [ + "src/styles.sass" + ], "allowedCommonJsDependencies": [ "typed-function", "javascript-natural-sort", @@ -46,8 +48,8 @@ "budgets": [ { "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumWarning": "1000kb", + "maximumError": "2mb" }, { "type": "anyComponentStyle", @@ -86,14 +88,19 @@ "lint": { "builder": "@angular-eslint/builder:lint", "options": { - "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"] + "lintFilePatterns": [ + "src/**/*.ts", + "src/**/*.html" + ] } } } } }, "cli": { - "schematicCollections": ["@angular-eslint/schematics"], + "schematicCollections": [ + "@angular-eslint/schematics" + ], "analytics": false }, "schematics": { diff --git a/bookie/src/app/sales/choose-customer/choose-customer.component.html b/bookie/src/app/sales/choose-customer/choose-customer.component.html index 0e359cb..4598dee 100644 --- a/bookie/src/app/sales/choose-customer/choose-customer.component.html +++ b/bookie/src/app/sales/choose-customer/choose-customer.component.html @@ -1,63 +1,57 @@ -@if (customersResource.isLoading()) { - -} @else if (customersResource.error()) { - -} @else { -

Customer

- -
-
- - Phone - - - - @for (customer of customers(); track customer) { - {{ customer.name }} - {{ customer.phone }} +

Customer

+ + +
+ + Phone + + + + @for (customer of customers(); track customer) { + {{ customer.name }} - {{ customer.phone }} + } + +
+
+ + Name + + +
+
+ + Address + + +
+
+ Print in Bill? +
+

+
+
    + @for (r of formModel().discounts; track r.id) { + @if (r.discount > 0) { +
  • {{ r.name }} - {{ r.discount | percent: '1.2-2' }}
  • } - -
-
- - Name - - -
-
- - Address - - -
-
- Print in Bill? -
-

-
-
    - @for (r of formModel().discounts; track r.id) { - @if (r.discount > 0) { -
  • {{ r.name }} - {{ r.discount | percent: '1.2-2' }}
  • - } - } -
-
- -
- - - - -} + } + +
+ +
+ + + + diff --git a/bookie/src/app/sales/choose-customer/choose-customer.component.ts b/bookie/src/app/sales/choose-customer/choose-customer.component.ts index b81ae50..796d3aa 100644 --- a/bookie/src/app/sales/choose-customer/choose-customer.component.ts +++ b/bookie/src/app/sales/choose-customer/choose-customer.component.ts @@ -13,8 +13,6 @@ import { MatInputModule } from '@angular/material/input'; import { Customer } from '../../core/customer'; import { CustomerDiscount } from '../../core/customer-discount'; import { CustomerService } from '../../customers/customer.service'; -import { ErrorStateComponent } from '../../shared/error-state/error-state.component'; -import { SkeletonLoaderComponent } from '../../shared/skeleton-loader/skeleton-loader.component'; export interface ChooseCustomerFormData { id: string; @@ -40,8 +38,6 @@ export interface ChooseCustomerFormData { MatOptionModule, PercentPipe, FormField, - ErrorStateComponent, - SkeletonLoaderComponent, ], }) export class ChooseCustomerComponent { @@ -66,7 +62,8 @@ export class ChooseCustomerComponent { form = form(this.formModel); phoneSignal = computed(() => { - return this.formModel().phone; + const p = this.formModel().phone; + return typeof p === 'string' ? p.trim() : null; }); debouncedPhone = debounced(this.phoneSignal, 150);