feat: enhance inner pages header with back button functionality and emit event on back click
fix: update total price info handling in correction form and ensure accurate calculations refactor: streamline sale invoice single view component by extracting info card into a separate component style: adjust button sizes in payment forms for better UI consistency feat: implement season picker navigation controls to prevent out-of-bounds selection fix: improve price formatting utility to handle undefined values gracefully chore: update environment configuration for API base URL feat: add navigation service to manage routing history and back navigation
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import { SharedSaleInvoiceSingleViewComponent } from '@/shared/components/invoices/sale-invoice-single-view.component';
|
||||
import { SaleInvoiceSingleInfoCardComponent } from '@/shared/components/invoices/sale-invoice-single-info-card.component';
|
||||
import pageParamsUtils from '@/utils/page-params.utils';
|
||||
import { Component, computed, inject, signal } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ButtonDirective } from 'primeng/button';
|
||||
import { Card } from 'primeng/card';
|
||||
import { PublicSaleInvoiceStore } from '../store/main.store';
|
||||
|
||||
@Component({
|
||||
selector: 'public-saleInvoice',
|
||||
templateUrl: './single.component.html',
|
||||
imports: [SharedSaleInvoiceSingleViewComponent],
|
||||
imports: [SaleInvoiceSingleInfoCardComponent, Card, ButtonDirective],
|
||||
})
|
||||
export class PublicSaleInvoiceComponent {
|
||||
private readonly route = inject(ActivatedRoute);
|
||||
@@ -22,4 +24,14 @@ export class PublicSaleInvoiceComponent {
|
||||
ngOnInit() {
|
||||
this.store.getData(this.invoiceId());
|
||||
}
|
||||
|
||||
async share() {
|
||||
if (navigator.share) {
|
||||
await navigator.share({
|
||||
title: window.document.title,
|
||||
text: 'برای مشاهده صورتحساب اینجا کلیک کنید.',
|
||||
url: window.location.href,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user