ApiLogicServer 15.0.19__py3-none-any.whl → 15.0.20__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 +12 -5
- api_logic_server_cli/prototypes/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/Admin-App-Learning-Prompt.md +33 -17
- 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.20.dist-info}/METADATA +1 -1
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/RECORD +32 -29
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/WHEEL +0 -0
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/entry_points.txt +0 -0
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/top_level.txt +0 -0
|
@@ -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
|
);
|
|
@@ -1,121 +1,112 @@
|
|
|
1
|
-
// `OrderDetail.js`
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Edit,
|
|
25
|
-
Filter,
|
|
26
|
-
Pagination,
|
|
27
|
-
BooleanField,
|
|
3
|
+
List,SelectInput,
|
|
4
|
+
FunctionField,
|
|
5
|
+
Datagrid,
|
|
6
|
+
TextField,
|
|
7
|
+
NumberField,
|
|
8
|
+
ReferenceField,
|
|
9
|
+
Show,
|
|
10
|
+
TabbedShowLayout,
|
|
11
|
+
Tab,
|
|
12
|
+
SimpleShowLayout,
|
|
13
|
+
TextInput,
|
|
14
|
+
NumberInput,
|
|
15
|
+
ReferenceInput,
|
|
16
|
+
Create,
|
|
17
|
+
SimpleForm,
|
|
18
|
+
Edit,
|
|
19
|
+
Filter,
|
|
20
|
+
Pagination,
|
|
21
|
+
BooleanField
|
|
28
22
|
} from 'react-admin';
|
|
29
23
|
|
|
30
|
-
//
|
|
24
|
+
// Filter component for OrderDetail
|
|
31
25
|
const OrderDetailFilter = (props) => (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
<Filter {...props}>
|
|
27
|
+
<TextInput label="Search by ID" source="Id" alwaysOn />
|
|
28
|
+
<ReferenceInput label="Order" source="OrderId" reference="Order" allowEmpty>
|
|
29
|
+
<NumberInput />
|
|
30
|
+
</ReferenceInput>
|
|
31
|
+
<ReferenceInput label="Product" source="ProductId" reference="Product" allowEmpty>
|
|
32
|
+
<NumberInput />
|
|
33
|
+
</ReferenceInput>
|
|
34
|
+
</Filter>
|
|
41
35
|
);
|
|
42
36
|
|
|
43
|
-
//
|
|
37
|
+
// List component for OrderDetail
|
|
44
38
|
export const OrderDetailList = (props) => (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
39
|
+
<List {...props} filters={<OrderDetailFilter />} perPage={7} pagination={Pagination} sort={{ field: 'Id', order: 'ASC' }}>
|
|
40
|
+
<Datagrid rowClick="show">
|
|
41
|
+
<TextField source="Id" />
|
|
42
|
+
<ReferenceField label="Order" source="OrderId" reference="Order">
|
|
43
|
+
<TextField source="ShipName" />
|
|
44
|
+
</ReferenceField>
|
|
45
|
+
<ReferenceField label="Product" source="ProductId" reference="Product">
|
|
46
|
+
<TextField source="ProductName" />
|
|
47
|
+
</ReferenceField>
|
|
48
|
+
<FunctionField label="Quantity" source="Quantity" render={record => `${record.Quantity}`} />
|
|
49
|
+
<FunctionField label="Unit Price" source="UnitPrice" render={record => `$${record.UnitPrice}`} />
|
|
50
|
+
<FunctionField label="Discount" source="Discount" render={record => `${record.Discount * 100}%`} />
|
|
51
|
+
<FunctionField label="Amount" source="Amount" render={record => `$${record.Amount}`} />
|
|
52
|
+
</Datagrid>
|
|
53
|
+
</List>
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
// Show component for OrderDetail
|
|
57
|
+
export const OrderDetailShow = (props) => (
|
|
58
|
+
<Show {...props}>
|
|
59
|
+
<TabbedShowLayout>
|
|
60
|
+
<Tab label="Details">
|
|
61
|
+
<SimpleShowLayout>
|
|
62
|
+
<TextField source="Id" />
|
|
63
|
+
<ReferenceField label="Order" source="OrderId" reference="Order">
|
|
64
|
+
<TextField source="ShipName" />
|
|
65
|
+
</ReferenceField>
|
|
66
|
+
<ReferenceField label="Product" source="ProductId" reference="Product">
|
|
67
|
+
<TextField source="ProductName" />
|
|
68
|
+
</ReferenceField>
|
|
69
|
+
<NumberField label="Quantity" source="Quantity" />
|
|
70
|
+
<NumberField label="Unit Price" source="UnitPrice" options={{ style: 'currency', currency: 'USD' }} />
|
|
71
|
+
<NumberField label="Discount" source="Discount" />
|
|
72
|
+
<NumberField label="Amount" source="Amount" options={{ style: 'currency', currency: 'USD' }} />
|
|
73
|
+
</SimpleShowLayout>
|
|
74
|
+
</Tab>
|
|
75
|
+
</TabbedShowLayout>
|
|
76
|
+
</Show>
|
|
67
77
|
);
|
|
68
78
|
|
|
69
|
-
//
|
|
79
|
+
// Create component for OrderDetail
|
|
70
80
|
export const OrderDetailCreate = (props) => (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</
|
|
81
|
+
<Create {...props}>
|
|
82
|
+
<SimpleForm>
|
|
83
|
+
<ReferenceInput label="Order" source="OrderId" reference="Order">
|
|
84
|
+
<SelectInput optionText="ShipName" />
|
|
85
|
+
</ReferenceInput>
|
|
86
|
+
<ReferenceInput label="Product" source="ProductId" reference="Product">
|
|
87
|
+
<SelectInput optionText="ProductName" />
|
|
88
|
+
</ReferenceInput>
|
|
89
|
+
<NumberInput source="Quantity" />
|
|
90
|
+
<NumberInput source="UnitPrice" />
|
|
91
|
+
<NumberInput source="Discount" />
|
|
92
|
+
</SimpleForm>
|
|
93
|
+
</Create>
|
|
83
94
|
);
|
|
84
95
|
|
|
85
|
-
//
|
|
96
|
+
// Edit component for OrderDetail
|
|
86
97
|
export const OrderDetailEdit = (props) => (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
<Edit {...props}>
|
|
99
|
+
<SimpleForm>
|
|
100
|
+
<ReferenceInput label="Order" source="OrderId" reference="Order">
|
|
101
|
+
<SelectInput optionText="ShipName" />
|
|
102
|
+
</ReferenceInput>
|
|
103
|
+
<ReferenceInput label="Product" source="ProductId" reference="Product">
|
|
104
|
+
<SelectInput optionText="ProductName" />
|
|
105
|
+
</ReferenceInput>
|
|
106
|
+
<NumberInput source="Quantity" />
|
|
107
|
+
<NumberInput source="UnitPrice" />
|
|
108
|
+
<NumberInput source="Discount" />
|
|
109
|
+
<NumberField source="Amount" disabled />
|
|
110
|
+
</SimpleForm>
|
|
111
|
+
</Edit>
|
|
101
112
|
);
|
|
102
|
-
|
|
103
|
-
// The Show view for detailed display of OrderDetail and related records.
|
|
104
|
-
export const OrderDetailShow = (props) => (
|
|
105
|
-
<Show {...props}>
|
|
106
|
-
<SimpleShowLayout>
|
|
107
|
-
<TextField source="Id" />
|
|
108
|
-
<ReferenceField label="Product" source="ProductId" reference="Product">
|
|
109
|
-
<TextField source="ProductName" />
|
|
110
|
-
</ReferenceField>
|
|
111
|
-
<ReferenceField label="Order" source="OrderId" reference="Order">
|
|
112
|
-
<TextField source="Id" />
|
|
113
|
-
</ReferenceField>
|
|
114
|
-
<NumberField source="UnitPrice" />
|
|
115
|
-
<NumberField source="Quantity" />
|
|
116
|
-
<NumberField source="Discount" />
|
|
117
|
-
<NumberField source="Amount" />
|
|
118
|
-
<DateField source="ShippedDate" />
|
|
119
|
-
</SimpleShowLayout>
|
|
120
|
-
</Show>
|
|
121
|
-
);
|