create consumer pos list page

This commit is contained in:
2026-04-14 15:56:32 +03:30
parent 9eb5c35285
commit 28575bd3d1
31 changed files with 502 additions and 32 deletions
@@ -0,0 +1,3 @@
import * as _pos from './pos/pos';
export const pos = _pos;
@@ -0,0 +1,3 @@
export interface IPosInitialValues {
name: string;
}
@@ -0,0 +1,26 @@
import { IColumn } from '@/shared/components/pageDataList/page-data-list.component';
import { FormBuilder, Validators } from '@angular/forms';
import { IPosInitialValues } from './pos.model';
export const columns: IColumn[] = [
// { field: 'id', header: 'شناسه', type: 'id' },
{ field: 'name', header: 'عنوان' },
{ field: 'serial', header: 'شماره سریال' },
{ field: 'pos_type', header: 'نوع دستگاه' },
{ field: 'device', header: 'دستگاه', type: 'nested', nestedPath: 'device.name' },
{ field: 'provider', header: 'ارایه‌دهنده', type: 'nested', nestedPath: 'provider.name' },
{ field: 'status', header: 'وضعیت' },
{
field: 'created_at',
header: 'تاریخ ایجاد',
type: 'date',
},
];
export const initForm = (fb: FormBuilder, initialValues?: IPosInitialValues) => {
const form = fb.group({
name: [initialValues?.name || '', [Validators.required]],
});
return form;
};