feat: refactor dialog components to use light-bottomsheet for improved UX

- Replaced SharedDialogComponent with SharedLightBottomsheetComponent in customer-dialog, order-submitted-dialog, payment form-dialog, and pre-invoice-dialog components.
- Updated styles and properties for light-bottomsheet to enhance responsiveness and usability.
- Modified payload form components to use measure units instead of unit types for better clarity.
- Adjusted form controls to use consistent naming conventions for amounts and percentages.
- Enhanced support for overlay options in select components to manage z-index dynamically.
- Improved support for RTL layouts in input groups and other components.
This commit is contained in:
2026-05-13 13:44:33 +03:30
parent dba960c454
commit 42b8476b96
39 changed files with 396 additions and 143 deletions
+22 -1
View File
@@ -1,5 +1,6 @@
import { UikitFieldComponent } from '@/uikit';
import { Component, computed, Input } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { Component, Inject, computed, Input } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { Select } from 'primeng/select';
import { Observable } from 'rxjs';
@@ -16,6 +17,10 @@ export class EnumSelectComponent extends AbstractSelectComponent<ISelectItem, IS
@Input() type!: TLocalEnum;
@Input() customLabel?: string;
constructor(@Inject(DOCUMENT) private readonly document: Document) {
super();
}
label = computed(() => this.customLabel ?? LOCAL_ENUMS[this.type].label);
override getDataService() {
@@ -27,4 +32,20 @@ export class EnumSelectComponent extends AbstractSelectComponent<ISelectItem, IS
ngOnInit() {
this.getData();
}
overlayOptions() {
return {
autoZIndex: true,
baseZIndex: this.overlayBaseZIndex(),
};
}
overlayBaseZIndex() {
const drawers = Array.from(this.document.body.querySelectorAll('.p-drawer,[data-pc-name="drawer"]')) as HTMLElement[];
const zIndexes = drawers
.map((drawer) => Number.parseInt(drawer.style.zIndex || '0', 10))
.filter((zIndex) => Number.isFinite(zIndex) && zIndex > 0);
return zIndexes.length ? Math.max(...zIndexes) + 2 : 1000;
}
}