feat: enhance input component to support price type and add new payment method components
- Updated InputComponent to handle 'price' type with appropriate formatting and validation. - Introduced new API routes for purchase receipt payments. - Created constants for purchase receipts and invoices. - Developed SupplierInvoicePayFormComponent for processing invoice payments. - Implemented SupplierLedgerComponent to display supplier transactions. - Added services and stores for managing supplier invoices and payments. - Created components for selecting payment methods and displaying payment type tags. - Enhanced UI with new templates for invoices and payment forms. - Added utility functions for handling payment method types and statuses.
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
<uikit-field [label]="label" [name]="name" [control]="control" [showLabel]="!!label" [showErrors]="showErrors">
|
||||
@if (type === "switch") {
|
||||
<p-toggleSwitch [formControl]="control" />
|
||||
} @else if (type === "price") {
|
||||
<p-inputgroup>
|
||||
<p-inputnumber
|
||||
[attr.id]="name"
|
||||
[formControl]="control"
|
||||
[attr.name]="name"
|
||||
[attr.placeholder]="placeholder"
|
||||
[attr.inputmode]="inputMode"
|
||||
[attr.maxlength]="maxLength || null"
|
||||
[attr.type]="htmlType"
|
||||
[attr.autocomplete]="autocomplete"
|
||||
[class]="` w-full ${size === 'large' ? 'p-inputtext-lg' : size === 'small' ? 'p-inputtext-sm' : ''}`"
|
||||
[required]="isRequired"
|
||||
[invalid]="control.invalid && (control.touched || control.dirty)"
|
||||
(input)="onInput($event)"
|
||||
/>
|
||||
<p-inputgroup-addon>ریال</p-inputgroup-addon>
|
||||
</p-inputgroup>
|
||||
} @else {
|
||||
<input
|
||||
pInputText
|
||||
@@ -18,4 +36,7 @@
|
||||
(input)="onInput($event)"
|
||||
/>
|
||||
}
|
||||
@if (hint) {
|
||||
<small [attr.id]="name + '-help'">{{ hint }}</small>
|
||||
}
|
||||
</uikit-field>
|
||||
|
||||
Reference in New Issue
Block a user