feat: add bank accounts and branches management
- Implemented bank accounts management with form and list components. - Added bank branches management with form and list components. - Created services for bank accounts and branches to handle API interactions. - Updated routing to include bank accounts and branches. - Enhanced UI with new select fields for banks and branches. - Added necessary models and constants for bank accounts and branches. - Improved state management for banks using a store pattern. - Updated menu items to include links for bank accounts and branches.
This commit is contained in:
@@ -24,7 +24,8 @@ export interface IColumn<T = any> {
|
||||
width?: string;
|
||||
minWidth?: string;
|
||||
canCopy?: boolean;
|
||||
type?: 'text' | 'price' | 'boolean' | 'date';
|
||||
type?: 'text' | 'price' | 'boolean' | 'date' | 'nested';
|
||||
nestedPath?: string;
|
||||
customDataModel?: TemplateRef<any> | ((item: T) => string | number | boolean);
|
||||
}
|
||||
|
||||
@@ -130,6 +131,18 @@ export class PageDataListComponent<I> {
|
||||
return data ? 'بله' : 'خیر';
|
||||
case 'price':
|
||||
return formatWithCurrency(data, false, 'ریال');
|
||||
case 'nested': {
|
||||
const path = column.nestedPath;
|
||||
if (!path) return '-';
|
||||
const nestedData = path
|
||||
.split('.')
|
||||
.reduce(
|
||||
(obj, key) => (obj && obj[key] !== undefined ? obj[key] : null),
|
||||
item[String(field)],
|
||||
);
|
||||
|
||||
return nestedData || '-';
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user