Files
psp_panel/src/app/shared/components/input/input.component.html
T
ahasani 8104f1b7a7 feat(layout): enhance topbar with customizable templates and full-page support
- Updated app.layout.component.html to include start, center, and end templates for the topbar.
- Modified app.layout.component.ts to manage new template references and added isFullPage getter.
- Refactored app.topbar.component.html to utilize new templates and improved layout structure.
- Enhanced app.topbar.component.ts to accept new input properties for templates.
- Updated layout.service.ts to manage full-page state and new topbar slots.
- Added new payment bridge services for POS functionality.
- Introduced greater validator for form validation.
- Improved dialog component to support mobile drawer and responsive design.
- Updated styles for better mobile support and layout adjustments.
- Added new main menu sidebar for POS with dynamic content.
2026-04-30 16:27:42 +03:30

75 lines
2.6 KiB
HTML

<uikit-field [label]="label" [name]="name" [control]="control" [showLabel]="!!label" [showErrors]="showErrors">
@if (labelSuffix) {
<ng-template #labelView>
<div class="flex gap-1 items-center">
<uikit-label [name]="name">
@if (labelTextView) {
<ng-container [ngTemplateOutlet]="labelTextView"></ng-container>
} @else {
{{ label }}
}
</uikit-label>
<ng-container [ngTemplateOutlet]="labelSuffix"></ng-container>
</div>
</ng-template>
}
@if (type === "switch") {
<p-toggleSwitch [attr.disabled]="disabled" [formControl]="control" />
} @else {
<p-inputgroup>
<!-- [minlength]="minlength || null" -->
@if (type === "price") {
<p-inputnumber
[attr.id]="name"
[formControl]="control"
[maxlength]="preparedMaxLength || null"
[attr.name]="name"
[attr.placeholder]="preparedPlaceholder"
[attr.type]="htmlType"
[attr.autocomplete]="autocomplete"
[attr.disabled]="disabled"
[class]="` w-full ${size === 'large' ? 'p-inputtext-lg' : size === 'small' ? 'p-inputtext-sm' : ''}`"
[required]="isRequired"
[invalid]="control.invalid && (control.touched || control.dirty)"
(onInput)="onPriceInput($event)"
(onBlur)="blur.emit()"
/>
<!-- (input)="onInput($event)" -->
} @else {
<input
pInputText
[attr.id]="name"
[formControl]="control"
[attr.name]="name"
[attr.placeholder]="preparedPlaceholder"
[attr.inputmode]="inputMode"
[attr.maxlength]="preparedMaxLength || null"
[attr.type]="htmlType"
[attr.disabled]="disabled"
[attr.autocomplete]="autocomplete"
[classList]="
[
inputClass,
'w-full',
`${size === 'large' ? 'p-inputtext-lg' : size === 'small' ? 'p-inputtext-sm' : ''}`,
suffixTemp || preparedSuffix() ? 'hasSuffix' : '',
].join(' ')
"
[required]="isRequired"
[invalid]="control.invalid && (control.touched || control.dirty)"
(onBlur)="blur.emit()"
(input)="onInput($event)"
/>
}
@if (suffixTemp) {
<ng-container [ngTemplateOutlet]="suffixTemp" />
} @else if (preparedSuffix()) {
<p-inputgroup-addon>{{ preparedSuffix() }}</p-inputgroup-addon>
}
</p-inputgroup>
}
@if (hint) {
<small [attr.id]="name + '-help'">{{ hint }}</small>
}
</uikit-field>