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.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
|
||||
|
||||
/**
|
||||
* Strictly checks numeric value is greater than `minValue` (not equal).
|
||||
* Empty values are treated as valid; combine with `Validators.required` when needed.
|
||||
*/
|
||||
export function greaterThanValidator(minValue: number): ValidatorFn {
|
||||
return (control: AbstractControl): ValidationErrors | null => {
|
||||
const v = control.value;
|
||||
if (v === null || v === undefined || v === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const numericValue = typeof v === 'number' ? v : Number(v);
|
||||
if (Number.isNaN(numericValue)) {
|
||||
return { greaterThan: 'مقدار باید عددی باشد' };
|
||||
}
|
||||
|
||||
return numericValue > minValue
|
||||
? null
|
||||
: {
|
||||
greaterThan: `مقدار باید بیشتر از ${minValue} باشد`,
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from './fiscal-code.validator';
|
||||
export * from './greater.validator';
|
||||
export * from './iban.validator';
|
||||
export * from './mobile.validator';
|
||||
export * from './must-match.validator';
|
||||
|
||||
Reference in New Issue
Block a user