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
|
@@ -1,105 +1,103 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
List, Datagrid, TextField, ReferenceField,
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
List, Datagrid, TextField, ReferenceField, Show, SimpleShowLayout, TabbedShowLayout, Tab,
|
|
4
|
+
Create, SimpleForm, TextInput, NumberInput, NumberField, DateField, BooleanField, Edit,
|
|
5
|
+
ReferenceManyField, ReferenceInput, SelectInput, Filter, Pagination
|
|
6
6
|
} from 'react-admin';
|
|
7
7
|
|
|
8
|
+
// Filters for the Product List
|
|
8
9
|
const ProductFilter = (props) => (
|
|
9
10
|
<Filter {...props}>
|
|
10
11
|
<TextInput label="Search by Product Name" source="ProductName" alwaysOn />
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
<ReferenceInput label="Category" source="CategoryId" reference="Category" allowEmpty>
|
|
13
|
+
<SelectInput optionText="CategoryName_ColumnName" />
|
|
14
|
+
</ReferenceInput>
|
|
15
|
+
<ReferenceInput label="Supplier" source="SupplierId" reference="Supplier" allowEmpty>
|
|
16
|
+
<SelectInput optionText="CompanyName" />
|
|
17
|
+
</ReferenceInput>
|
|
14
18
|
</Filter>
|
|
15
19
|
);
|
|
16
20
|
|
|
17
|
-
// List
|
|
21
|
+
// List view of Products
|
|
18
22
|
export const ProductList = (props) => (
|
|
19
|
-
<List {...props} filters={<ProductFilter />} pagination={<Pagination rowsPerPageOptions={[
|
|
23
|
+
<List {...props} filters={<ProductFilter />} pagination={<Pagination rowsPerPageOptions={[5, 10, 25]} />}>
|
|
20
24
|
<Datagrid rowClick="show">
|
|
21
|
-
<TextField source="ProductName"
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
<NumberField source="UnitsInStock" label="Units In Stock" />
|
|
25
|
-
<BooleanField source="Discontinued" label="Discontinued" />
|
|
26
|
-
<TextField source="UnitsOnOrder" label="Units On Order" />
|
|
27
|
-
<ReferenceField label="Category" source="CategoryId" reference="Category">
|
|
28
|
-
<TextField source="CategoryName" />
|
|
29
|
-
</ReferenceField>
|
|
30
|
-
<ReferenceField label="Supplier" source="SupplierId" reference="Supplier">
|
|
31
|
-
<TextField source="CompanyName" />
|
|
25
|
+
<TextField source="ProductName" />
|
|
26
|
+
<ReferenceField source="CategoryId" reference="Category">
|
|
27
|
+
<TextField source="CategoryName_ColumnName" />
|
|
32
28
|
</ReferenceField>
|
|
29
|
+
<NumberField source="UnitPrice" options={{ style: 'currency', currency: 'USD' }} />
|
|
30
|
+
<NumberField source="UnitsInStock" />
|
|
31
|
+
<NumberField source="UnitsOnOrder" />
|
|
32
|
+
<NumberField source="ReorderLevel" />
|
|
33
|
+
<BooleanField source="Discontinued" />
|
|
34
|
+
<TextField source="Id" />
|
|
33
35
|
</Datagrid>
|
|
34
36
|
</List>
|
|
35
37
|
);
|
|
36
38
|
|
|
37
|
-
// Show
|
|
39
|
+
// Show view of Products
|
|
38
40
|
export const ProductShow = (props) => (
|
|
39
41
|
<Show {...props}>
|
|
40
42
|
<SimpleShowLayout>
|
|
41
|
-
<TextField source="ProductName"
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
<NumberField source="UnitsInStock" label="Units In Stock" />
|
|
45
|
-
<NumberField source="UnitsOnOrder" label="Units On Order" />
|
|
46
|
-
<NumberField source="ReorderLevel" label="Reorder Level" />
|
|
47
|
-
<BooleanField source="Discontinued" label="Discontinued" />
|
|
48
|
-
<ReferenceField label="Category" source="CategoryId" reference="Category">
|
|
49
|
-
<TextField source="CategoryName" />
|
|
50
|
-
</ReferenceField>
|
|
51
|
-
<ReferenceField label="Supplier" source="SupplierId" reference="Supplier">
|
|
52
|
-
<TextField source="CompanyName" />
|
|
43
|
+
<TextField source="ProductName" />
|
|
44
|
+
<ReferenceField source="CategoryId" reference="Category">
|
|
45
|
+
<TextField source="CategoryName_ColumnName" />
|
|
53
46
|
</ReferenceField>
|
|
47
|
+
<NumberField source="UnitPrice" options={{ style: 'currency', currency: 'USD' }} />
|
|
48
|
+
<NumberField source="UnitsInStock" />
|
|
49
|
+
<NumberField source="UnitsOnOrder" />
|
|
50
|
+
<NumberField source="ReorderLevel" />
|
|
51
|
+
<BooleanField source="Discontinued" />
|
|
52
|
+
<TextField source="Id" />
|
|
54
53
|
</SimpleShowLayout>
|
|
55
54
|
<TabbedShowLayout>
|
|
56
55
|
<Tab label="Order Details">
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
|
|
56
|
+
<ReferenceManyField reference="OrderDetail" target="ProductId" addLabel={false}>
|
|
57
|
+
<Datagrid>
|
|
58
|
+
<ReferenceField source="OrderId" reference="Order">
|
|
59
|
+
<TextField source="Id" />
|
|
60
|
+
</ReferenceField>
|
|
61
|
+
<NumberField source="Quantity" />
|
|
62
|
+
<NumberField source="UnitPrice" options={{ style: 'currency', currency: 'USD' }} />
|
|
63
|
+
<TextField source="Id" />
|
|
64
|
+
</Datagrid>
|
|
65
|
+
</ReferenceManyField>
|
|
60
66
|
</Tab>
|
|
61
67
|
</TabbedShowLayout>
|
|
62
68
|
</Show>
|
|
63
69
|
);
|
|
64
70
|
|
|
65
|
-
// Create
|
|
71
|
+
// Create view for Products
|
|
66
72
|
export const ProductCreate = (props) => (
|
|
67
73
|
<Create {...props}>
|
|
68
74
|
<SimpleForm>
|
|
69
|
-
<TextInput source="ProductName"
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
<NumberInput source="UnitsInStock" label="Units In Stock" />
|
|
73
|
-
<NumberInput source="UnitsOnOrder" label="Units On Order" />
|
|
74
|
-
<NumberInput source="ReorderLevel" label="Reorder Level" />
|
|
75
|
-
<BooleanField source="Discontinued" label="Discontinued" /> # FIXEDME - BooleanField
|
|
76
|
-
<ReferenceInput label="Category" source="CategoryId" reference="Category">
|
|
77
|
-
<SelectInput optionText="CategoryName" />
|
|
78
|
-
</ReferenceInput>
|
|
79
|
-
<ReferenceInput label="Supplier" source="SupplierId" reference="Supplier">
|
|
80
|
-
<SelectInput optionText="CompanyName" />
|
|
75
|
+
<TextInput source="ProductName" />
|
|
76
|
+
<ReferenceInput source="CategoryId" reference="Category">
|
|
77
|
+
<SelectInput optionText="CategoryName_ColumnName" />
|
|
81
78
|
</ReferenceInput>
|
|
79
|
+
<NumberInput source="UnitPrice" />
|
|
80
|
+
<NumberInput source="UnitsInStock" />
|
|
81
|
+
<NumberInput source="UnitsOnOrder" />
|
|
82
|
+
<NumberInput source="ReorderLevel" />
|
|
83
|
+
<BooleanField source="Discontinued" />
|
|
82
84
|
</SimpleForm>
|
|
83
85
|
</Create>
|
|
84
86
|
);
|
|
85
87
|
|
|
86
|
-
// Edit
|
|
88
|
+
// Edit view for Products
|
|
87
89
|
export const ProductEdit = (props) => (
|
|
88
90
|
<Edit {...props}>
|
|
89
91
|
<SimpleForm>
|
|
90
|
-
<TextInput source="ProductName"
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
<NumberInput source="UnitsInStock" label="Units In Stock" />
|
|
94
|
-
<NumberInput source="UnitsOnOrder" label="Units On Order" />
|
|
95
|
-
<NumberInput source="ReorderLevel" label="Reorder Level" />
|
|
96
|
-
<BooleanField source="Discontinued" label="Discontinued" /> # FIXEDME - BooleanField
|
|
97
|
-
<ReferenceInput label="Category" source="CategoryId" reference="Category">
|
|
98
|
-
<SelectInput optionText="CategoryName" />
|
|
99
|
-
</ReferenceInput>
|
|
100
|
-
<ReferenceInput label="Supplier" source="SupplierId" reference="Supplier">
|
|
101
|
-
<SelectInput optionText="CompanyName" />
|
|
92
|
+
<TextInput source="ProductName" />
|
|
93
|
+
<ReferenceInput source="CategoryId" reference="Category">
|
|
94
|
+
<SelectInput optionText="CategoryName_ColumnName" />
|
|
102
95
|
</ReferenceInput>
|
|
96
|
+
<NumberInput source="UnitPrice" />
|
|
97
|
+
<NumberInput source="UnitsInStock" />
|
|
98
|
+
<NumberInput source="UnitsOnOrder" />
|
|
99
|
+
<NumberInput source="ReorderLevel" />
|
|
100
|
+
<BooleanField source="Discontinued" />
|
|
103
101
|
</SimpleForm>
|
|
104
102
|
</Edit>
|
|
105
|
-
);
|
|
103
|
+
);
|
|
@@ -1,70 +1,65 @@
|
|
|
1
|
-
// Region.jsx - This file defines the React Admin components for the Region resource.
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import {
|
|
5
3
|
List,
|
|
6
4
|
Datagrid,
|
|
7
5
|
TextField,
|
|
6
|
+
ReferenceField,
|
|
8
7
|
Show,
|
|
9
8
|
SimpleShowLayout,
|
|
10
|
-
|
|
11
|
-
Tab,
|
|
12
|
-
Edit,
|
|
13
|
-
Create, Filter, // FIXEDME missing imports
|
|
9
|
+
Create,
|
|
14
10
|
SimpleForm,
|
|
15
11
|
TextInput,
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
Edit,
|
|
13
|
+
Pagination,
|
|
14
|
+
Filter,
|
|
15
|
+
} from 'react-admin';
|
|
16
|
+
|
|
17
|
+
// Filters for list screens
|
|
18
|
+
const RegionFilters = (props) => (
|
|
19
|
+
<Filter {...props}>
|
|
20
|
+
<TextInput label="Search" source="q" alwaysOn />
|
|
21
|
+
<TextInput label="Region Description" source="RegionDescription" alwaysOn />
|
|
22
|
+
</Filter>
|
|
23
|
+
);
|
|
18
24
|
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
// Custom pagination component
|
|
26
|
+
const RegionPagination = props => <Pagination rowsPerPageOptions={[5, 10, 25]} {...props} />;
|
|
27
|
+
|
|
28
|
+
// Region List Component
|
|
29
|
+
export const RegionList = props => (
|
|
30
|
+
<List {...props} filters={<RegionFilters />} pagination={<RegionPagination />} perPage={7}>
|
|
21
31
|
<Datagrid rowClick="show">
|
|
22
|
-
<TextField source="RegionDescription" label="Region Description" />
|
|
23
|
-
<TextField source="Id" label="ID" />
|
|
32
|
+
<TextField source="RegionDescription" label="Region Description" sortable />
|
|
33
|
+
<TextField source="Id" label="Region ID" sortable={false} />
|
|
24
34
|
</Datagrid>
|
|
25
35
|
</List>
|
|
26
36
|
);
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
// Region Show Component
|
|
39
|
+
export const RegionShow = props => (
|
|
29
40
|
<Show {...props}>
|
|
30
41
|
<SimpleShowLayout>
|
|
31
42
|
<TextField source="RegionDescription" label="Region Description" />
|
|
32
|
-
<TextField source="Id" label="ID" />
|
|
43
|
+
<TextField source="Id" label="Region ID" />
|
|
33
44
|
</SimpleShowLayout>
|
|
34
|
-
<TabbedShowLayout>
|
|
35
|
-
<Tab label="Related Territories">
|
|
36
|
-
<ReferenceManyField reference="EmployeeTerritory" target="RegionId" label="Employee Territories">
|
|
37
|
-
<Datagrid rowClick="show">
|
|
38
|
-
<TextField source="TerritoryDescription" label="Territory Description" />
|
|
39
|
-
<TextField source="Id" label="ID" />
|
|
40
|
-
</Datagrid>
|
|
41
|
-
</ReferenceManyField>
|
|
42
|
-
</Tab>
|
|
43
|
-
</TabbedShowLayout>
|
|
44
45
|
</Show>
|
|
45
46
|
);
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
// Region Create Component
|
|
49
|
+
export const RegionCreate = props => (
|
|
50
|
+
<Create {...props}>
|
|
49
51
|
<SimpleForm>
|
|
50
52
|
<TextInput source="RegionDescription" label="Region Description" />
|
|
51
53
|
</SimpleForm>
|
|
52
|
-
</
|
|
54
|
+
</Create>
|
|
53
55
|
);
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
<
|
|
57
|
+
// Region Edit Component
|
|
58
|
+
export const RegionEdit = props => (
|
|
59
|
+
<Edit {...props}>
|
|
58
60
|
<SimpleForm>
|
|
59
|
-
<TextInput source="RegionDescription" label="Region Description
|
|
61
|
+
<TextInput source="RegionDescription" label="Region Description" />
|
|
62
|
+
<TextField source="Id" label="Region ID" disabled />
|
|
60
63
|
</SimpleForm>
|
|
61
|
-
</
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
const RegionFilter = (props) => (
|
|
65
|
-
<Filter {...props}>
|
|
66
|
-
<TextInput label="Search by Description" source="RegionDescription" alwaysOn />
|
|
67
|
-
</Filter>
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
export { RegionList, RegionShow, RegionCreate, RegionEdit };
|
|
64
|
+
</Edit>
|
|
65
|
+
);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
List,Pagination,
|
|
4
|
+
Datagrid,
|
|
5
|
+
TextField,
|
|
6
|
+
Show,
|
|
7
|
+
TabbedShowLayout,
|
|
8
|
+
Tab,
|
|
9
|
+
SimpleShowLayout,
|
|
10
|
+
TextInput,
|
|
11
|
+
Create,
|
|
12
|
+
SimpleForm,
|
|
13
|
+
Edit,
|
|
14
|
+
Filter,
|
|
15
|
+
NumberField
|
|
16
|
+
} from 'react-admin';
|
|
17
|
+
|
|
18
|
+
// SampleDBVersion Filter
|
|
19
|
+
const SampleDBVersionFilter = (props) => (
|
|
20
|
+
<Filter {...props}>
|
|
21
|
+
<TextInput label="Search" source="q" alwaysOn />
|
|
22
|
+
</Filter>
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
// SampleDBVersion List
|
|
26
|
+
export const SampleDBVersionList = (props) => (
|
|
27
|
+
<List {...props} filters={<SampleDBVersionFilter />}
|
|
28
|
+
perPage={7}
|
|
29
|
+
sort={{ field: 'Id', order: 'ASC' }}
|
|
30
|
+
pagination={<Pagination rowsPerPageOptions={[7, 14, 28]} />}
|
|
31
|
+
>
|
|
32
|
+
<Datagrid rowClick="show">
|
|
33
|
+
<NumberField source="Id" label="ID" />
|
|
34
|
+
<TextField source="Notes" label="Notes" />
|
|
35
|
+
</Datagrid>
|
|
36
|
+
</List>
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
// SampleDBVersion Show
|
|
40
|
+
export const SampleDBVersionShow = (props) => (
|
|
41
|
+
<Show {...props}>
|
|
42
|
+
<TabbedShowLayout>
|
|
43
|
+
<Tab label="Details">
|
|
44
|
+
<SimpleShowLayout>
|
|
45
|
+
<NumberField source="Id" label="ID" />
|
|
46
|
+
<TextField source="Notes" label="Notes" />
|
|
47
|
+
</SimpleShowLayout>
|
|
48
|
+
</Tab>
|
|
49
|
+
{/* Add additional tabs for related resources if applicable */}
|
|
50
|
+
</TabbedShowLayout>
|
|
51
|
+
</Show>
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
// SampleDBVersion Create
|
|
55
|
+
export const SampleDBVersionCreate = (props) => (
|
|
56
|
+
<Create {...props}>
|
|
57
|
+
<SimpleForm>
|
|
58
|
+
<TextInput source="Notes" label="Notes" />
|
|
59
|
+
{/* Add fields as needed */}
|
|
60
|
+
</SimpleForm>
|
|
61
|
+
</Create>
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
// SampleDBVersion Edit
|
|
65
|
+
export const SampleDBVersionEdit = (props) => (
|
|
66
|
+
<Edit {...props}>
|
|
67
|
+
<SimpleForm>
|
|
68
|
+
<NumberField source="Id" label="ID" disabled />
|
|
69
|
+
<TextInput source="Notes" label="Notes" />
|
|
70
|
+
{/* Add additional fields or modify existing ones as needed */}
|
|
71
|
+
</SimpleForm>
|
|
72
|
+
</Edit>
|
|
73
|
+
);
|
|
@@ -1,64 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
List,
|
|
3
|
+
Datagrid,
|
|
4
|
+
TextField,
|
|
5
|
+
NumberField,
|
|
6
|
+
Show,
|
|
7
|
+
TabbedShowLayout,
|
|
8
|
+
Tab,
|
|
9
|
+
SimpleShowLayout,
|
|
10
|
+
TextInput,
|
|
11
|
+
Create,
|
|
12
|
+
SimpleForm,
|
|
13
|
+
Edit,
|
|
14
|
+
Filter,
|
|
15
|
+
Pagination
|
|
16
|
+
} from 'react-admin';
|
|
4
17
|
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<TextInput label="Search by Company Name" source="CompanyName" alwaysOn />
|
|
12
|
-
</Filter>
|
|
18
|
+
// Define a filter component for the Shipper resource
|
|
19
|
+
const ShipperFilter = (props) => (
|
|
20
|
+
<Filter {...props}>
|
|
21
|
+
<TextInput label="Search" source="q" alwaysOn />
|
|
22
|
+
<TextInput label="Company Name" source="CompanyName" />
|
|
23
|
+
</Filter>
|
|
13
24
|
);
|
|
14
25
|
|
|
15
|
-
// List view for Shipper resource
|
|
16
|
-
export const ShipperList = (props
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
// List view for Shipper resource
|
|
27
|
+
export const ShipperList = (props) => (
|
|
28
|
+
<List {...props} filters={<ShipperFilter />} pagination={<Pagination rowsPerPage={7} />}>
|
|
29
|
+
<Datagrid rowClick="show">
|
|
30
|
+
<TextField source="CompanyName" label="Company Name"/>
|
|
31
|
+
<TextField source="Phone" label="Phone"/>
|
|
32
|
+
<NumberField source="Id" label="ID"/>
|
|
33
|
+
</Datagrid>
|
|
34
|
+
</List>
|
|
24
35
|
);
|
|
25
36
|
|
|
26
|
-
// Show view for Shipper resource
|
|
27
|
-
export const ShipperShow = (props
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<Tab label="Related Resource Example">
|
|
36
|
-
<ReferenceField label="Custom Label" source="relationSource" reference="RelatedResource">
|
|
37
|
-
<TextField source="fieldName" />
|
|
38
|
-
</ReferenceField>
|
|
39
|
-
</Tab>
|
|
40
|
-
</TabbedShowLayout>*/}
|
|
41
|
-
</SimpleShowLayout>
|
|
42
|
-
</Show>
|
|
37
|
+
// Show view for Shipper resource
|
|
38
|
+
export const ShipperShow = (props) => (
|
|
39
|
+
<Show {...props}>
|
|
40
|
+
<SimpleShowLayout>
|
|
41
|
+
<TextField source="CompanyName" label="Company Name"/>
|
|
42
|
+
<TextField source="Phone" label="Phone"/>
|
|
43
|
+
<NumberField source="Id" label="ID"/>
|
|
44
|
+
</SimpleShowLayout>
|
|
45
|
+
</Show>
|
|
43
46
|
);
|
|
44
47
|
|
|
45
|
-
// Create view for
|
|
46
|
-
export const ShipperCreate = (props
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
// Create view for Shipper resource
|
|
49
|
+
export const ShipperCreate = (props) => (
|
|
50
|
+
<Create {...props}>
|
|
51
|
+
<SimpleForm>
|
|
52
|
+
<TextInput source="CompanyName" label="Company Name"/>
|
|
53
|
+
<TextInput source="Phone" label="Phone"/>
|
|
54
|
+
</SimpleForm>
|
|
55
|
+
</Create>
|
|
53
56
|
);
|
|
54
57
|
|
|
55
|
-
// Edit view for
|
|
56
|
-
export const ShipperEdit = (props
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
// Edit view for Shipper resource
|
|
59
|
+
export const ShipperEdit = (props) => (
|
|
60
|
+
<Edit {...props}>
|
|
61
|
+
<SimpleForm>
|
|
62
|
+
<TextInput source="CompanyName" label="Company Name"/>
|
|
63
|
+
<TextInput source="Phone" label="Phone"/>
|
|
64
|
+
<NumberField source="Id" label="ID"/>
|
|
65
|
+
</SimpleForm>
|
|
66
|
+
</Edit>
|
|
64
67
|
);
|
|
@@ -1,103 +1,87 @@
|
|
|
1
|
-
// Supplier.js
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
|
-
import {
|
|
5
|
-
List,
|
|
6
|
-
Datagrid,
|
|
7
|
-
TextField,
|
|
8
|
-
ReferenceField,
|
|
9
|
-
Show,
|
|
10
|
-
SimpleShowLayout,
|
|
11
|
-
TabbedShowLayout,
|
|
12
|
-
Tab,
|
|
13
|
-
Edit,
|
|
14
|
-
Create,
|
|
15
|
-
SimpleForm,
|
|
16
|
-
TextInput,
|
|
17
|
-
NumberInput,
|
|
18
|
-
SelectInput,
|
|
19
|
-
ReferenceInput,
|
|
20
|
-
Filter,
|
|
21
|
-
Pagination,
|
|
22
|
-
} from 'react-admin';
|
|
2
|
+
import { List, Show, SimpleShowLayout, Datagrid, TextField, NumberField, ReferenceField, Filter, TextInput, ShowController, Tab, TabbedShowLayout, NumberInput, Edit, SimpleForm, Create, ReferenceInput, SelectInput, EditButton, SimpleList } from 'react-admin';
|
|
23
3
|
|
|
24
|
-
// Filters
|
|
4
|
+
// Filters applied to the supplier list
|
|
25
5
|
const SupplierFilter = (props) => (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</Filter>
|
|
6
|
+
<Filter {...props}>
|
|
7
|
+
<TextInput label="Search by Company Name" source="CompanyName" alwaysOn />
|
|
8
|
+
<TextInput label="Search by Country" source="Country" />
|
|
9
|
+
</Filter>
|
|
31
10
|
);
|
|
32
11
|
|
|
33
|
-
//
|
|
12
|
+
// Listing Suppliers
|
|
34
13
|
export const SupplierList = (props) => (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
14
|
+
<List {...props} filters={<SupplierFilter />} pagination={false}>
|
|
15
|
+
<Datagrid rowClick="show">
|
|
16
|
+
<TextField source="id" label="ID" />
|
|
17
|
+
<TextField source="CompanyName" label="Company Name" />
|
|
18
|
+
<TextField source="ContactName" label="Contact Name" />
|
|
19
|
+
<TextField source="ContactTitle" label="Contact Title" />
|
|
20
|
+
<TextField source="City" label="City" />
|
|
21
|
+
<TextField source="Country" label="Country" />
|
|
22
|
+
<EditButton />
|
|
23
|
+
</Datagrid>
|
|
24
|
+
</List>
|
|
46
25
|
);
|
|
47
26
|
|
|
48
|
-
//
|
|
27
|
+
// Show Supplier
|
|
49
28
|
export const SupplierShow = (props) => (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
29
|
+
<ShowController {...props}>
|
|
30
|
+
{(controllerProps) => (
|
|
31
|
+
<Show {...controllerProps}>
|
|
32
|
+
<SimpleShowLayout>
|
|
33
|
+
<TextField source="CompanyName" label="Company Name" />
|
|
34
|
+
<TextField source="ContactName" label="Contact Name" />
|
|
35
|
+
<TextField source="ContactTitle" label="Contact Title" />
|
|
36
|
+
<TextField source="Address" label="Address" />
|
|
37
|
+
<TextField source="City" label="City" />
|
|
38
|
+
<TextField source="Region" label="Region" />
|
|
39
|
+
<TextField source="PostalCode" label="Postal Code" />
|
|
40
|
+
<TextField source="Country" label="Country" />
|
|
41
|
+
<TextField source="Phone" label="Phone" />
|
|
42
|
+
<TextField source="Fax" label="Fax" />
|
|
43
|
+
<TextField source="HomePage" label="Homepage" />
|
|
44
|
+
<TextField source="id" label="ID" />
|
|
45
|
+
</SimpleShowLayout>
|
|
46
|
+
</Show>
|
|
47
|
+
)}
|
|
48
|
+
</ShowController>
|
|
65
49
|
);
|
|
66
50
|
|
|
67
|
-
//
|
|
51
|
+
// Create a new Supplier
|
|
68
52
|
export const SupplierCreate = (props) => (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
53
|
+
<Create {...props}>
|
|
54
|
+
<SimpleForm>
|
|
55
|
+
<TextInput source="CompanyName" label="Company Name" />
|
|
56
|
+
<TextInput source="ContactName" label="Contact Name" />
|
|
57
|
+
<TextInput source="ContactTitle" label="Contact Title" />
|
|
58
|
+
<TextInput source="Address" label="Address" />
|
|
59
|
+
<TextInput source="City" label="City" />
|
|
60
|
+
<TextInput source="Region" label="Region" />
|
|
61
|
+
<TextInput source="PostalCode" label="Postal Code" />
|
|
62
|
+
<TextInput source="Country" label="Country" />
|
|
63
|
+
<TextInput source="Phone" label="Phone" />
|
|
64
|
+
<TextInput source="Fax" label="Fax" />
|
|
65
|
+
<TextInput source="HomePage" label="Homepage" />
|
|
66
|
+
</SimpleForm>
|
|
67
|
+
</Create>
|
|
84
68
|
);
|
|
85
69
|
|
|
86
|
-
//
|
|
70
|
+
// Edit an existing Supplier
|
|
87
71
|
export const SupplierEdit = (props) => (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
72
|
+
<Edit {...props}>
|
|
73
|
+
<SimpleForm>
|
|
74
|
+
<TextInput source="CompanyName" label="Company Name" />
|
|
75
|
+
<TextInput source="ContactName" label="Contact Name" />
|
|
76
|
+
<TextInput source="ContactTitle" label="Contact Title" />
|
|
77
|
+
<TextInput source="Address" label="Address" />
|
|
78
|
+
<TextInput source="City" label="City" />
|
|
79
|
+
<TextInput source="Region" label="Region" />
|
|
80
|
+
<TextInput source="PostalCode" label="Postal Code" />
|
|
81
|
+
<TextInput source="Country" label="Country" />
|
|
82
|
+
<TextInput source="Phone" label="Phone" />
|
|
83
|
+
<TextInput source="Fax" label="Fax" />
|
|
84
|
+
<TextInput source="HomePage" label="Homepage" />
|
|
85
|
+
</SimpleForm>
|
|
86
|
+
</Edit>
|
|
103
87
|
);
|