2026-03-10 13:36:45 +03:30
|
|
|
// import { ToastService } from '@/core/services/toast.service';
|
|
|
|
|
// import { SupplierInvoicePayFormComponent } from '@/modules/suppliers/components/invoices/pay-form.component';
|
|
|
|
|
// import { Component, EventEmitter, Input, Output, signal } from '@angular/core';
|
|
|
|
|
// import { IPurchaseReceiptResponse } from '../../../modules/purchases/models';
|
|
|
|
|
// import { ConfirmationDialogService } from '../confirmationDialog/confirmation-dialog.service';
|
2025-12-30 21:03:39 +03:30
|
|
|
|
2026-03-10 13:36:45 +03:30
|
|
|
// @Component({
|
|
|
|
|
// selector: 'app-purchase-receipt-payment-wrapper',
|
|
|
|
|
// templateUrl: './wrapper.component.html',
|
|
|
|
|
// imports: [SupplierInvoicePayFormComponent],
|
|
|
|
|
// })
|
|
|
|
|
// export class PurchaseReceiptPaymentWrapperComponent {
|
|
|
|
|
// @Input() purchaseReceipt!: IPurchaseReceiptResponse;
|
2025-12-30 21:03:39 +03:30
|
|
|
|
2026-03-10 13:36:45 +03:30
|
|
|
// @Output() onSubmit = new EventEmitter<void>();
|
2026-01-04 13:45:45 +03:30
|
|
|
|
2026-03-10 13:36:45 +03:30
|
|
|
// showPaymentForm = signal(false);
|
|
|
|
|
// constructor(
|
|
|
|
|
// private confirmService: ConfirmationDialogService,
|
|
|
|
|
// private toastService: ToastService,
|
|
|
|
|
// ) {
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// this.showConfirm();
|
|
|
|
|
// }, 1);
|
|
|
|
|
// }
|
2025-12-30 21:03:39 +03:30
|
|
|
|
2026-03-10 13:36:45 +03:30
|
|
|
// showConfirm() {
|
|
|
|
|
// this.confirmService.confirm({
|
2026-05-31 13:54:34 +03:30
|
|
|
// message: 'آیا پرداخت صورتحساب انجام شده است؟',
|
|
|
|
|
// header: 'وضعیت پرداخت صورتحساب',
|
2026-03-10 13:36:45 +03:30
|
|
|
// acceptLabel: 'بله',
|
|
|
|
|
// rejectLabel: 'خیر',
|
|
|
|
|
// accept: () => {
|
|
|
|
|
// this.toPaymentForm();
|
|
|
|
|
// },
|
|
|
|
|
// reject: () => {
|
|
|
|
|
// this.toastService.info({
|
2026-05-31 13:54:34 +03:30
|
|
|
// text: 'میتوانید از طریق منوی پرداخت صورتحساب، در آینده اقدام به پرداخت نمایید.',
|
|
|
|
|
// title: 'پرداخت صورتحساب انجام نشد',
|
2026-03-10 13:36:45 +03:30
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// });
|
|
|
|
|
// }
|
2025-12-30 21:03:39 +03:30
|
|
|
|
2026-03-10 13:36:45 +03:30
|
|
|
// submitted() {
|
|
|
|
|
// console.log('submitted');
|
2026-01-04 13:45:45 +03:30
|
|
|
|
2026-03-10 13:36:45 +03:30
|
|
|
// this.showPaymentForm.set(false);
|
|
|
|
|
// this.onSubmit.emit();
|
|
|
|
|
// }
|
2025-12-30 21:03:39 +03:30
|
|
|
|
2026-03-10 13:36:45 +03:30
|
|
|
// toPaymentForm() {
|
|
|
|
|
// this.showPaymentForm.set(true);
|
|
|
|
|
// }
|
|
|
|
|
// }
|