50bc9a4632
- Added `ProductPurchaseComponent` to handle product purchases. - Created `PurchaseReceiptTemplateComponent` for displaying purchase receipt details. - Developed `PurchaseFormComponent` for managing purchase form inputs and submission. - Introduced `ProductChargeRowFormComponent` and `ProductChargeRowFormFieldsComponent` for handling product charge rows in the form. - Implemented `PurchaseReceiptProductRowComponent` for displaying individual product rows in the receipt. - Established API routes for purchase operations in `apiRoutes`. - Integrated suppliers and inventories selection components. - Added utility functions for converting prices to Persian alphabet. - Created a utility for generating full names from name parts. - Enhanced form validation and submission handling in the purchase form. - Updated styles and templates for improved UI/UX.
22 lines
773 B
HTML
22 lines
773 B
HTML
<uikit-field [label]="label" [name]="name" [control]="control" [showLabel]="!!label" [showErrors]="showErrors">
|
|
@if (type === "switch") {
|
|
<p-toggleSwitch [formControl]="control" />
|
|
} @else {
|
|
<input
|
|
pInputText
|
|
[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]="`${inputClass} w-full ${size === 'large' ? 'p-inputtext-lg' : size === 'small' ? 'p-inputtext-sm' : ''}`"
|
|
[required]="isRequired"
|
|
[invalid]="control.invalid && (control.touched || control.dirty)"
|
|
(input)="onInput($event)"
|
|
/>
|
|
}
|
|
</uikit-field>
|