create consumer pos list page
This commit is contained in:
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user