26 lines
889 B
TypeScript
26 lines
889 B
TypeScript
|
|
import { AbstractDialog } from '@/shared/abstractClasses/abstract-dialog';
|
||
|
|
import { UikitFlatpickrJalaliComponent } from '@/uikit';
|
||
|
|
import { Component, inject } from '@angular/core';
|
||
|
|
import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
|
||
|
|
import { Dialog } from 'primeng/dialog';
|
||
|
|
import { PosLandingStore } from '../store/main.store';
|
||
|
|
|
||
|
|
@Component({
|
||
|
|
selector: 'pos-pre-invoice-dialog',
|
||
|
|
templateUrl: './pre-invoice-dialog.component.html',
|
||
|
|
imports: [Dialog, UikitFlatpickrJalaliComponent, ReactiveFormsModule],
|
||
|
|
})
|
||
|
|
export class PosPreInvoiceDialogComponent extends AbstractDialog {
|
||
|
|
private readonly store = inject(PosLandingStore);
|
||
|
|
private readonly fb = inject(FormBuilder);
|
||
|
|
|
||
|
|
private initForm() {
|
||
|
|
const form = this.fb.group({
|
||
|
|
invoiceDate: [this.store.invoiceDate(), [Validators.required]],
|
||
|
|
});
|
||
|
|
return form;
|
||
|
|
}
|
||
|
|
|
||
|
|
form = this.initForm();
|
||
|
|
}
|