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,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
|
-
);
|
|
@@ -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
|
+
);
|