ApiLogicServer 15.0.19__py3-none-any.whl → 15.0.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- api_logic_server_cli/api_logic_server.py +4 -4
- api_logic_server_cli/api_logic_server_info.yaml +2 -2
- api_logic_server_cli/genai/genai_admin_app.py +33 -9
- api_logic_server_cli/prototypes/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/Admin-App-Resource-Learning-Prompt.md +119 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/Admin-App-js-Learning-Prompt.md +71 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/{Admin-App-Learning-Prompt.md → z-unused-Admin-App-Learning-Prompt.md} +60 -35
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/package.json +3 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/Config.js +527 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/app_loader.js +24 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/.eslintrc +5 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/.yarnrc.yml +4 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/default-settings.js +25 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/default-settings.ts +25 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/errors.js +116 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/errors.ts +116 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/index.test.tsx +7 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/index.tsx +11 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/ra-jsonapi-client.js +577 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/ra-jsonapi-client.ts +577 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/resourceLookup.js +124 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/resourceLookup.ts +124 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/styles.module.css +9 -0
- api_logic_server_cli/prototypes/nw/.DS_Store +0 -0
- api_logic_server_cli/prototypes/nw/ui/.DS_Store +0 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/.DS_Store +0 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/App.js +30 -31
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Category.js +62 -62
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Customer.js +143 -48
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/CustomerDemographic.js +20 -37
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Department.js +38 -39
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Employee.js +85 -134
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeAudit.js +89 -77
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeTerritory.js +59 -59
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Location.js +45 -49
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Order.js +42 -60
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/OrderDetail.js +97 -106
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Product.js +60 -62
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Region.js +36 -41
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/SampleDBVersion.js +73 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Shipper.js +57 -54
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Supplier.js +71 -87
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Territory.js +47 -41
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Union.js +18 -34
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/METADATA +1 -1
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/RECORD +50 -31
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/dataProvider.js +0 -110
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/WHEEL +0 -0
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/entry_points.txt +0 -0
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/top_level.txt +0 -0
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
```jsx
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import {
|
|
4
3
|
List,
|
|
5
|
-
Datagrid,
|
|
6
|
-
TextField,
|
|
7
|
-
ReferenceField,
|
|
8
4
|
Show,
|
|
9
5
|
SimpleShowLayout,
|
|
10
6
|
TabbedShowLayout,
|
|
11
7
|
Tab,
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
Datagrid,
|
|
9
|
+
TextField,
|
|
10
|
+
ReferenceField,
|
|
11
|
+
NumberField,
|
|
12
|
+
ReferenceManyField,
|
|
13
|
+
TextInput,
|
|
14
14
|
ReferenceInput,
|
|
15
15
|
SelectInput,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Create,
|
|
17
|
+
SimpleForm,
|
|
18
|
+
Edit,
|
|
19
|
+
Filter
|
|
18
20
|
} from 'react-admin';
|
|
19
|
-
import { Card, CardContent } from '@mui/material';
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const EmployeeTerritoryFilter = (props) => (
|
|
23
|
+
<Filter {...props}>
|
|
24
|
+
<TextInput label="Employee" source="EmployeeId" alwaysOn />
|
|
25
|
+
<TextInput label="Territory" source="TerritoryId" alwaysOn />
|
|
26
|
+
</Filter>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const EmployeeTerritoryList = props => (
|
|
30
|
+
<List filters={<EmployeeTerritoryFilter />} {...props} perPage={25} sort={{ field: 'Id', order: 'ASC' }}>
|
|
24
31
|
<Datagrid rowClick="show">
|
|
25
32
|
<TextField source="Id" label="ID" />
|
|
26
|
-
<ReferenceField source="
|
|
27
|
-
<TextField source="TerritoryDescription" />
|
|
28
|
-
</ReferenceField>
|
|
29
|
-
<ReferenceField source="EmployeeId" reference="Employee" label="Employee Last Name">
|
|
33
|
+
<ReferenceField source="EmployeeId" reference="Employee" label="Employee">
|
|
30
34
|
<TextField source="LastName" />
|
|
31
35
|
</ReferenceField>
|
|
36
|
+
<ReferenceField source="TerritoryId" reference="Territory" label="Territory">
|
|
37
|
+
<TextField source="TerritoryDescription" />
|
|
38
|
+
</ReferenceField>
|
|
32
39
|
</Datagrid>
|
|
33
40
|
</List>
|
|
34
41
|
);
|
|
35
42
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<Show {...props} title="Employee Territory">
|
|
43
|
+
export const EmployeeTerritoryShow = props => (
|
|
44
|
+
<Show {...props}>
|
|
39
45
|
<SimpleShowLayout>
|
|
40
46
|
<TextField source="Id" label="ID" />
|
|
41
|
-
<ReferenceField source="
|
|
42
|
-
<TextField source="TerritoryDescription" />
|
|
43
|
-
</ReferenceField>
|
|
44
|
-
<ReferenceField source="EmployeeId" reference="Employee" label="Employee Last Name">
|
|
47
|
+
<ReferenceField source="EmployeeId" reference="Employee" label="Employee">
|
|
45
48
|
<TextField source="LastName" />
|
|
46
49
|
</ReferenceField>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
</
|
|
62
|
-
</
|
|
63
|
-
</
|
|
64
|
-
</
|
|
50
|
+
<ReferenceField source="TerritoryId" reference="Territory" label="Territory">
|
|
51
|
+
<TextField source="TerritoryDescription" />
|
|
52
|
+
</ReferenceField>
|
|
53
|
+
<TabbedShowLayout>
|
|
54
|
+
<Tab label="Details">
|
|
55
|
+
<ReferenceManyField label="Employee" reference="Employee" target="EmployeeId">
|
|
56
|
+
<Datagrid>
|
|
57
|
+
<TextField source="FirstName" label="First Name"/>
|
|
58
|
+
<TextField source="LastName" label="Last Name"/>
|
|
59
|
+
</Datagrid>
|
|
60
|
+
</ReferenceManyField>
|
|
61
|
+
<ReferenceManyField label="Territory" reference="Territory" target="TerritoryId">
|
|
62
|
+
<Datagrid>
|
|
63
|
+
<TextField source="TerritoryDescription" label="Description"/>
|
|
64
|
+
</Datagrid>
|
|
65
|
+
</ReferenceManyField>
|
|
66
|
+
</Tab>
|
|
67
|
+
</TabbedShowLayout>
|
|
65
68
|
</SimpleShowLayout>
|
|
66
69
|
</Show>
|
|
67
70
|
);
|
|
68
71
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<Create {...props} title="Create a new Employee Territory">
|
|
72
|
+
export const EmployeeTerritoryCreate = props => (
|
|
73
|
+
<Create {...props}>
|
|
72
74
|
<SimpleForm>
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
</ReferenceInput>
|
|
76
|
-
<ReferenceInput source="EmployeeId" reference="Employee" label="Employee Last Name">
|
|
75
|
+
<TextInput source="Id" />
|
|
76
|
+
<ReferenceInput label="Employee" source="EmployeeId" reference="Employee">
|
|
77
77
|
<SelectInput optionText="LastName" />
|
|
78
78
|
</ReferenceInput>
|
|
79
|
-
<
|
|
79
|
+
<ReferenceInput label="Territory" source="TerritoryId" reference="Territory">
|
|
80
|
+
<SelectInput optionText="TerritoryDescription" />
|
|
81
|
+
</ReferenceInput>
|
|
80
82
|
</SimpleForm>
|
|
81
83
|
</Create>
|
|
82
84
|
);
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<Edit {...props} title="Edit Employee Territory">
|
|
86
|
+
export const EmployeeTerritoryEdit = props => (
|
|
87
|
+
<Edit {...props}>
|
|
87
88
|
<SimpleForm>
|
|
88
|
-
<TextInput source="Id"
|
|
89
|
-
<ReferenceInput
|
|
90
|
-
<SelectInput optionText="TerritoryDescription" />
|
|
91
|
-
</ReferenceInput>
|
|
92
|
-
<ReferenceInput source="EmployeeId" reference="Employee" label="Employee Last Name">
|
|
89
|
+
<TextInput source="Id" />
|
|
90
|
+
<ReferenceInput label="Employee" source="EmployeeId" reference="Employee">
|
|
93
91
|
<SelectInput optionText="LastName" />
|
|
94
92
|
</ReferenceInput>
|
|
93
|
+
<ReferenceInput label="Territory" source="TerritoryId" reference="Territory">
|
|
94
|
+
<SelectInput optionText="TerritoryDescription" />
|
|
95
|
+
</ReferenceInput>
|
|
95
96
|
</SimpleForm>
|
|
96
97
|
</Edit>
|
|
97
|
-
);
|
|
98
|
-
```
|
|
98
|
+
);
|
|
@@ -3,66 +3,60 @@ import {
|
|
|
3
3
|
List,
|
|
4
4
|
Datagrid,
|
|
5
5
|
TextField,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
ReferenceManyField,
|
|
7
|
+
Show,
|
|
8
8
|
SimpleShowLayout,
|
|
9
9
|
TabbedShowLayout,
|
|
10
10
|
Tab,
|
|
11
|
-
|
|
11
|
+
createFilter,
|
|
12
12
|
Create,
|
|
13
13
|
Edit,
|
|
14
14
|
SimpleForm,
|
|
15
15
|
TextInput,
|
|
16
|
-
ReferenceManyField,
|
|
17
|
-
ReferenceInput,
|
|
18
|
-
SelectInput,
|
|
19
|
-
required,
|
|
20
|
-
Filter,
|
|
21
|
-
Pagination,
|
|
22
16
|
} from 'react-admin';
|
|
23
|
-
import { Box } from '@mui/material';
|
|
24
|
-
|
|
25
|
-
const LocationFilter = (props) => (
|
|
26
|
-
<Filter {...props}>
|
|
27
|
-
<TextInput label="Search" source="q" alwaysOn />
|
|
28
|
-
<TextInput label="Country" source="country" defaultValue="" />
|
|
29
|
-
</Filter>
|
|
30
|
-
);
|
|
31
17
|
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
// List Component for Location
|
|
19
|
+
export const LocationList = () => (
|
|
20
|
+
<List
|
|
21
|
+
filters={<LocationFilter />}
|
|
22
|
+
perPage={7}
|
|
23
|
+
title="Location List"
|
|
24
|
+
>
|
|
34
25
|
<Datagrid rowClick="show">
|
|
35
|
-
<TextField source="country" label="Country"
|
|
26
|
+
<TextField source="country" label="Country" />
|
|
36
27
|
<TextField source="city" label="City" />
|
|
37
28
|
<TextField source="notes" label="Notes" />
|
|
38
|
-
<EditButton />
|
|
39
|
-
<ShowButton />
|
|
40
29
|
</Datagrid>
|
|
41
30
|
</List>
|
|
42
31
|
);
|
|
43
32
|
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
// Filter Component for Location
|
|
34
|
+
const LocationFilter = () => (
|
|
35
|
+
<createFilter>
|
|
36
|
+
<TextInput label="Country" source="country" alwaysOn />
|
|
37
|
+
<TextInput label="City" source="city" />
|
|
38
|
+
</createFilter>
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
// Show Component for Location
|
|
42
|
+
export const LocationShow = (props) => (
|
|
43
|
+
<Show {...props} title="Location Details">
|
|
44
|
+
<SimpleShowLayout>
|
|
45
|
+
<TextField source="country" label="Country" />
|
|
46
|
+
<TextField source="city" label="City" />
|
|
47
|
+
<TextField source="notes" label="Notes" />
|
|
48
|
+
</SimpleShowLayout>
|
|
46
49
|
<TabbedShowLayout>
|
|
47
|
-
<Tab label="
|
|
48
|
-
<SimpleShowLayout>
|
|
49
|
-
<TextField source="country" label="Country" />
|
|
50
|
-
<TextField source="city" label="City" />
|
|
51
|
-
<TextField source="notes" label="Notes" />
|
|
52
|
-
</SimpleShowLayout>
|
|
53
|
-
</Tab>
|
|
54
|
-
<Tab label="Orders">
|
|
50
|
+
<Tab label="Order List">
|
|
55
51
|
<ReferenceManyField
|
|
56
52
|
reference="Order"
|
|
57
|
-
target="
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
target="City"
|
|
54
|
+
source="City"
|
|
55
|
+
label="Orders in City"
|
|
60
56
|
>
|
|
61
|
-
<Datagrid>
|
|
62
|
-
<TextField source="
|
|
63
|
-
<TextField source="
|
|
64
|
-
<TextField source="orderDate" label="Order Date" />
|
|
65
|
-
<ShowButton />
|
|
57
|
+
<Datagrid rowClick="show">
|
|
58
|
+
<TextField source="ShipName" label="Ship Name" />
|
|
59
|
+
<TextField source="OrderDate" label="Order Date" />
|
|
66
60
|
</Datagrid>
|
|
67
61
|
</ReferenceManyField>
|
|
68
62
|
</Tab>
|
|
@@ -70,22 +64,24 @@ export const LocationShow = props => (
|
|
|
70
64
|
</Show>
|
|
71
65
|
);
|
|
72
66
|
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
// Create Component for Location
|
|
68
|
+
export const LocationCreate = (props) => (
|
|
69
|
+
<Create {...props} title="Create a Location">
|
|
75
70
|
<SimpleForm>
|
|
76
|
-
<TextInput source="country" label="Country"
|
|
77
|
-
<TextInput source="city" label="City"
|
|
71
|
+
<TextInput source="country" label="Country" />
|
|
72
|
+
<TextInput source="city" label="City" />
|
|
78
73
|
<TextInput source="notes" label="Notes" />
|
|
79
74
|
</SimpleForm>
|
|
80
75
|
</Create>
|
|
81
76
|
);
|
|
82
77
|
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
// Edit Component for Location
|
|
79
|
+
export const LocationEdit = (props) => (
|
|
80
|
+
<Edit {...props} title="Edit Location">
|
|
85
81
|
<SimpleForm>
|
|
86
|
-
<TextInput source="country" label="Country"
|
|
87
|
-
<TextInput source="city" label="City"
|
|
82
|
+
<TextInput source="country" label="Country" />
|
|
83
|
+
<TextInput source="city" label="City" />
|
|
88
84
|
<TextInput source="notes" label="Notes" />
|
|
89
85
|
</SimpleForm>
|
|
90
86
|
</Edit>
|
|
91
|
-
);
|
|
87
|
+
);
|
|
@@ -1,80 +1,52 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Order.js
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
List,
|
|
5
|
-
Datagrid,
|
|
6
|
-
TextField,
|
|
7
|
-
DateField,
|
|
8
|
-
NumberField,
|
|
9
|
-
BooleanField,
|
|
10
|
-
ReferenceField,
|
|
11
|
-
ReferenceManyField,
|
|
12
|
-
Show,
|
|
13
|
-
TabbedShowLayout,
|
|
14
|
-
Tab,
|
|
15
|
-
SimpleShowLayout,
|
|
16
|
-
SimpleForm,
|
|
17
|
-
TextInput,
|
|
18
|
-
DateTimeInput,
|
|
19
|
-
ReferenceInput,
|
|
20
|
-
SelectInput,
|
|
21
|
-
Create,
|
|
22
|
-
Edit,
|
|
23
|
-
FunctionField,
|
|
24
|
-
Pagination,
|
|
25
|
-
Filter
|
|
26
|
-
} from 'react-admin';
|
|
3
|
+
import { List, Datagrid, TextField, DateField, NumberField, ReferenceField, ReferenceManyField, Show, TabbedShowLayout, Tab, SimpleShowLayout, TextInput, NumberInput, DateTimeInput, ReferenceInput, SelectInput, Create, SimpleForm, Edit, Filter, Pagination, BooleanField, BooleanInput } from 'react-admin';
|
|
27
4
|
|
|
5
|
+
// Order Filter
|
|
28
6
|
const OrderFilter = (props) => (
|
|
29
7
|
<Filter {...props}>
|
|
30
|
-
<TextInput label="Search
|
|
31
|
-
<TextInput
|
|
32
|
-
<DateTimeInput label="Order Date" source="OrderDate" />
|
|
8
|
+
<TextInput label="Search" source="q" alwaysOn />
|
|
9
|
+
<TextInput source="ShipName" />
|
|
33
10
|
</Filter>
|
|
34
11
|
);
|
|
35
12
|
|
|
36
|
-
|
|
37
|
-
|
|
13
|
+
// Order List
|
|
14
|
+
export const OrderList = props => (
|
|
15
|
+
<List {...props} filters={<OrderFilter />} pagination={<Pagination rowsPerPageOptions={[5, 10, 25]} />}>
|
|
38
16
|
<Datagrid rowClick="show">
|
|
39
|
-
<TextField source="
|
|
17
|
+
<TextField source="ShipName" label="Ship Name" />
|
|
40
18
|
<DateField source="OrderDate" />
|
|
41
|
-
<TextField source="
|
|
42
|
-
<TextField source="
|
|
43
|
-
<
|
|
44
|
-
<TextField source="ShipCountry" />
|
|
19
|
+
<ReferenceField source="CustomerId" reference="Customer"><TextField source="CompanyName" /></ReferenceField>
|
|
20
|
+
<ReferenceField source="EmployeeId" reference="Employee"><TextField source="LastName" /></ReferenceField>
|
|
21
|
+
<NumberField source="Freight" options={{ style: 'currency', currency: 'USD' }} />
|
|
45
22
|
<BooleanField source="Ready" />
|
|
46
|
-
<
|
|
47
|
-
<FunctionField render={record => record ? `${record.CompanyName}` : ''} />
|
|
48
|
-
</ReferenceField>
|
|
23
|
+
<NumberField source="Id" />
|
|
49
24
|
</Datagrid>
|
|
50
25
|
</List>
|
|
51
26
|
);
|
|
52
27
|
|
|
53
|
-
|
|
28
|
+
// Order Show
|
|
29
|
+
export const OrderShow = props => (
|
|
54
30
|
<Show {...props}>
|
|
55
31
|
<SimpleShowLayout>
|
|
56
|
-
<TextField source="Id" />
|
|
57
|
-
<DateField source="OrderDate" />
|
|
58
32
|
<TextField source="ShipName" />
|
|
33
|
+
<DateField source="OrderDate" />
|
|
34
|
+
<ReferenceField source="CustomerId" reference="Customer"><TextField source="CompanyName" /></ReferenceField>
|
|
35
|
+
<ReferenceField source="EmployeeId" reference="Employee"><TextField source="LastName" /></ReferenceField>
|
|
36
|
+
<NumberField source="AmountTotal" label="Total Amount" options={{ style: 'currency', currency: 'USD' }} />
|
|
59
37
|
<TextField source="ShipAddress" />
|
|
60
38
|
<TextField source="ShipCity" />
|
|
61
39
|
<TextField source="ShipCountry" />
|
|
62
40
|
<BooleanField source="Ready" />
|
|
63
|
-
<NumberField source="AmountTotal" options={{ style: 'currency', currency: 'USD' }} />
|
|
64
|
-
<ReferenceField label="Customer" source="CustomerId" reference="Customer">
|
|
65
|
-
<FunctionField render={record => record ? `${record.CompanyName}` : ''} />
|
|
66
|
-
</ReferenceField>
|
|
67
41
|
</SimpleShowLayout>
|
|
68
42
|
<TabbedShowLayout>
|
|
69
43
|
<Tab label="Order Details">
|
|
70
|
-
<ReferenceManyField reference="OrderDetail" target="OrderId"
|
|
44
|
+
<ReferenceManyField reference="OrderDetail" target="OrderId">
|
|
71
45
|
<Datagrid>
|
|
72
|
-
<ReferenceField source="ProductId" reference="Product">
|
|
73
|
-
<FunctionField render={record => record ? `${record.ProductName}` : ''} />
|
|
74
|
-
</ReferenceField>
|
|
46
|
+
<ReferenceField source="ProductId" reference="Product"><TextField source="ProductName" /></ReferenceField>
|
|
75
47
|
<NumberField source="UnitPrice" options={{ style: 'currency', currency: 'USD' }} />
|
|
76
48
|
<NumberField source="Quantity" />
|
|
77
|
-
<NumberField source="Discount"
|
|
49
|
+
<NumberField source="Discount" />
|
|
78
50
|
<NumberField source="Amount" options={{ style: 'currency', currency: 'USD' }} />
|
|
79
51
|
</Datagrid>
|
|
80
52
|
</ReferenceManyField>
|
|
@@ -83,34 +55,44 @@ export const OrderShow = (props) => (
|
|
|
83
55
|
</Show>
|
|
84
56
|
);
|
|
85
57
|
|
|
86
|
-
|
|
58
|
+
// Order Create
|
|
59
|
+
export const OrderCreate = props => (
|
|
87
60
|
<Create {...props}>
|
|
88
61
|
<SimpleForm>
|
|
89
|
-
<
|
|
62
|
+
<TextInput source="ShipName" />
|
|
63
|
+
<DateTimeInput source="OrderDate" />
|
|
64
|
+
<ReferenceInput label="Customer" source="CustomerId" reference="Customer">
|
|
90
65
|
<SelectInput optionText="CompanyName" />
|
|
91
66
|
</ReferenceInput>
|
|
92
|
-
<
|
|
93
|
-
|
|
67
|
+
<ReferenceInput label="Employee" source="EmployeeId" reference="Employee">
|
|
68
|
+
<SelectInput optionText="LastName" />
|
|
69
|
+
</ReferenceInput>
|
|
70
|
+
<NumberInput source="AmountTotal" />
|
|
94
71
|
<TextInput source="ShipAddress" />
|
|
95
72
|
<TextInput source="ShipCity" />
|
|
96
73
|
<TextInput source="ShipCountry" />
|
|
97
|
-
<
|
|
74
|
+
<BooleanInput source="Ready" />
|
|
98
75
|
</SimpleForm>
|
|
99
76
|
</Create>
|
|
100
77
|
);
|
|
101
78
|
|
|
102
|
-
|
|
79
|
+
// Order Edit
|
|
80
|
+
export const OrderEdit = props => (
|
|
103
81
|
<Edit {...props}>
|
|
104
82
|
<SimpleForm>
|
|
105
|
-
<
|
|
83
|
+
<TextInput source="ShipName" />
|
|
84
|
+
<DateTimeInput source="OrderDate" />
|
|
85
|
+
<ReferenceInput label="Customer" source="CustomerId" reference="Customer">
|
|
106
86
|
<SelectInput optionText="CompanyName" />
|
|
107
87
|
</ReferenceInput>
|
|
108
|
-
<
|
|
109
|
-
|
|
88
|
+
<ReferenceInput label="Employee" source="EmployeeId" reference="Employee">
|
|
89
|
+
<SelectInput optionText="LastName" />
|
|
90
|
+
</ReferenceInput>
|
|
91
|
+
<NumberInput source="AmountTotal" />
|
|
110
92
|
<TextInput source="ShipAddress" />
|
|
111
93
|
<TextInput source="ShipCity" />
|
|
112
94
|
<TextInput source="ShipCountry" />
|
|
113
|
-
<
|
|
95
|
+
<BooleanInput source="Ready" />
|
|
114
96
|
</SimpleForm>
|
|
115
97
|
</Edit>
|
|
116
98
|
);
|