This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
admin-panel/src/features/QualificationsPage/constants.ts
2021-03-12 15:58:15 +01:00

35 lines
708 B
TypeScript

import { decodeSort } from 'libs/serialize-query-params/SortParam';
import { Column } from 'common/Table/types';
import { Qualification } from 'libs/graphql/types';
export const DEFAULT_SORT = decodeSort('id DESC');
export const COLUMNS: Column<Qualification>[] = [
{
field: 'id',
sortable: true,
label: 'ID',
},
{
field: 'formula',
sortable: true,
label: 'Formuła',
},
{
field: 'name',
sortable: true,
label: 'Nazwa',
valueFormatter: v => `${v.name} (${v.code})`,
},
{
field: 'createdAt',
sortable: true,
label: 'Data utworzenia',
type: 'datetime',
},
];
export enum DialogType {
Create = 'create',
Edit = 'edit',
None = '',
}