feat: implement invoice number sequence field and enhance tax provider status handling across components
This commit is contained in:
+1
-5
@@ -1,11 +1,7 @@
|
||||
<p-card class="border border-surface-border p-0! relative overflow-visible">
|
||||
<div class="flex items-center gap-4 justify-between w-full">
|
||||
<span> {{ saleInvoice.invoice_number }} - {{ saleInvoice.code }} </span>
|
||||
<p-tag
|
||||
[severity]="saleInvoice.status.value.toLowerCase() === 'not_send' ? 'warn' : 'success'"
|
||||
size="large"
|
||||
[value]="saleInvoice.status.translate"
|
||||
></p-tag>
|
||||
<catalog-tax-provider-status-tag [status]="saleInvoice.status.value" [translate]="saleInvoice.status.translate" />
|
||||
</div>
|
||||
<hr />
|
||||
<div class="grid grid-cols-1 gap-4">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { ToastService } from '@/core/services/toast.service';
|
||||
import { CatalogTaxProviderStatusTagComponent } from '@/shared/catalog/taxProviderStatus';
|
||||
import { KeyValueComponent } from '@/shared/components';
|
||||
import { Component, computed, EventEmitter, inject, Input, Output, signal } from '@angular/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
@@ -13,7 +14,15 @@ import { PosSaleInvoicesService } from '../services/main.service';
|
||||
@Component({
|
||||
selector: 'pos-saleInvoice-card',
|
||||
templateUrl: './sale-invoice-card.component.html',
|
||||
imports: [Button, KeyValueComponent, Tag, Card, RouterLink, ButtonDirective],
|
||||
imports: [
|
||||
Button,
|
||||
KeyValueComponent,
|
||||
Tag,
|
||||
Card,
|
||||
RouterLink,
|
||||
ButtonDirective,
|
||||
CatalogTaxProviderStatusTagComponent,
|
||||
],
|
||||
})
|
||||
export class SaleInvoiceCardComponent {
|
||||
private readonly service = inject(PosSaleInvoicesService);
|
||||
@@ -62,7 +71,7 @@ export class SaleInvoiceCardComponent {
|
||||
getStatus() {
|
||||
this.gettingStatusLoading.set(true);
|
||||
this.service
|
||||
.refreshFiscalStatus(this.saleInvoice.id)
|
||||
.getInquiry(this.saleInvoice.id)
|
||||
.pipe(finalize(() => this.gettingStatusLoading.set(false)))
|
||||
.subscribe((res) => {
|
||||
this.toastService.info({
|
||||
|
||||
Reference in New Issue
Block a user