-
Notifications
You must be signed in to change notification settings - Fork 0
/
RentalItemMasterContext.js
44 lines (42 loc) · 1.26 KB
/
RentalItemMasterContext.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { RentalItem } from 'app/model/RentalItem';
import { ApiClientFactory } from 'app/model/api/ApiClientFactory';
import { RentalItemMasterDialogContent } from 'app/ui/panel/admin/RentalItemMasterDialogContent';
import { COMMON_GRID_COLUMNS } from 'core/mastermainte/CommonGridColumns';
import { tooltipedTextCellRender } from 'core/mastermainte/DataGridUtils';
const columns = () => {
return [
...COMMON_GRID_COLUMNS,
{
field: 'serialNo',
headerName: 'シリアル番号',
width: 160,
editable: false,
renderCell: tooltipedTextCellRender,
},
{
field: 'itemName',
headerName: 'レンタル品名',
width: 300,
editable: false,
renderCell: tooltipedTextCellRender,
},
];
};
const adminApiFacade = ApiClientFactory.instance.getAdminApiFacade();
export const rentalItemMasterContext = {
title: 'レンタル品管理',
dlFilename: 'rentalItem',
dialogContent: RentalItemMasterDialogContent,
columns,
entityClass: RentalItem,
disableShowAllColumnsSwitch: true,
layout: {
width: 700,
},
serverApi: {
getAll: adminApiFacade.findAllRentalItems,
add: adminApiFacade.addRentalItem,
update: adminApiFacade.updateRentalItem,
delete: adminApiFacade.deleteRentalItem,
},
};