+
+
+
diff --git a/src/app/domains/consumer/modules/customers/views/saleInvoices/single.component.ts b/src/app/domains/consumer/modules/customers/views/saleInvoices/single.component.ts
index 5bef7de..76980b3 100644
--- a/src/app/domains/consumer/modules/customers/views/saleInvoices/single.component.ts
+++ b/src/app/domains/consumer/modules/customers/views/saleInvoices/single.component.ts
@@ -3,6 +3,7 @@ import { AppCardComponent, KeyValueComponent } from '@/shared/components';
import pageParamsUtils from '@/utils/page-params.utils';
import { Component, computed, effect, inject, signal } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
+import { Badge } from 'primeng/badge';
import { Divider } from 'primeng/divider';
import { ConsumerCustomerStore } from '../../store/customer.store';
import { ConsumerCustomerSaleInvoiceStore } from '../../store/saleInvoice.store';
@@ -10,7 +11,7 @@ import { ConsumerCustomerSaleInvoiceStore } from '../../store/saleInvoice.store'
@Component({
selector: 'consumer-customer-saleInvoice',
templateUrl: './single.component.html',
- imports: [AppCardComponent, KeyValueComponent, Divider],
+ imports: [AppCardComponent, KeyValueComponent, Divider, Badge],
})
export class ConsumerCustomerSaleInvoiceComponent {
private readonly route = inject(ActivatedRoute);
diff --git a/src/app/domains/pos/layouts/layout.component.ts b/src/app/domains/pos/layouts/layout.component.ts
index 536aacf..ffcb6f1 100644
--- a/src/app/domains/pos/layouts/layout.component.ts
+++ b/src/app/domains/pos/layouts/layout.component.ts
@@ -26,7 +26,7 @@ export class PosLayoutComponent {
now = new Date();
getData() {
- this.store.getData();
+ this.store.getData().subscribe();
}
ngOnInit() {
diff --git a/src/app/domains/pos/pos.store.ts b/src/app/domains/pos/pos.store.ts
index 7257eff..a24ef80 100644
--- a/src/app/domains/pos/pos.store.ts
+++ b/src/app/domains/pos/pos.store.ts
@@ -1,7 +1,7 @@
import { EntityState, EntityStore } from '@/core/state';
import { computed, inject, Injectable } from '@angular/core';
import { CookieService } from 'ngx-cookie-service';
-import { catchError, finalize, throwError } from 'rxjs';
+import { finalize, map } from 'rxjs';
import { IPosInfoResponse } from './models/pos.io';
import { PosService } from './modules/landing/services/main.service';
@@ -30,22 +30,18 @@ export class PosStore extends EntityStore
{
getData() {
this.patchState({ loading: true });
- this.service
- .getInfo()
- .pipe(
- finalize(() => {
- this.patchState({ loading: false });
- }),
- catchError(() => {
- this.patchState({
- error: '',
- });
- return throwError('');
- }),
- )
- .subscribe((entity) => {
- this.patchState({ entity });
- });
+ return this.service.getInfo().pipe(
+ finalize(() => {
+ this.patchState({ loading: false });
+ }),
+
+ map((entity: IPosInfoResponse) => {
+ if (entity) {
+ this.patchState({ entity: entity });
+ }
+ return entity;
+ }),
+ );
}
override reset(): void {
diff --git a/src/app/domains/superAdmin/modules/consumers/components/accounts/form.component.html b/src/app/domains/superAdmin/modules/consumers/components/accounts/form.component.html
index babb102..dffb39e 100644
--- a/src/app/domains/superAdmin/modules/consumers/components/accounts/form.component.html
+++ b/src/app/domains/superAdmin/modules/consumers/components/accounts/form.component.html
@@ -8,7 +8,7 @@
>