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.
Files changed (32) hide show
  1. api_logic_server_cli/api_logic_server.py +4 -4
  2. api_logic_server_cli/api_logic_server_info.yaml +2 -2
  3. api_logic_server_cli/genai/genai_admin_app.py +12 -5
  4. api_logic_server_cli/prototypes/.DS_Store +0 -0
  5. api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/Admin-App-Learning-Prompt.md +33 -17
  6. api_logic_server_cli/prototypes/nw/.DS_Store +0 -0
  7. api_logic_server_cli/prototypes/nw/ui/.DS_Store +0 -0
  8. api_logic_server_cli/prototypes/nw/ui/react_admin/.DS_Store +0 -0
  9. api_logic_server_cli/prototypes/nw/ui/react_admin/src/App.js +30 -31
  10. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Category.js +62 -62
  11. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Customer.js +143 -48
  12. api_logic_server_cli/prototypes/nw/ui/react_admin/src/CustomerDemographic.js +20 -37
  13. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Department.js +38 -39
  14. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Employee.js +85 -134
  15. api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeAudit.js +89 -77
  16. api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeTerritory.js +59 -59
  17. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Location.js +45 -49
  18. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Order.js +42 -60
  19. api_logic_server_cli/prototypes/nw/ui/react_admin/src/OrderDetail.js +97 -106
  20. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Product.js +60 -62
  21. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Region.js +36 -41
  22. api_logic_server_cli/prototypes/nw/ui/react_admin/src/SampleDBVersion.js +73 -0
  23. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Shipper.js +57 -54
  24. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Supplier.js +71 -87
  25. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Territory.js +47 -41
  26. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Union.js +18 -34
  27. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/METADATA +1 -1
  28. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/RECORD +32 -29
  29. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/WHEEL +0 -0
  30. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/entry_points.txt +0 -0
  31. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/licenses/LICENSE +0 -0
  32. {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
- EditButton,
7
- ShowButton,
6
+ ReferenceManyField,
7
+ Show,
8
8
  SimpleShowLayout,
9
9
  TabbedShowLayout,
10
10
  Tab,
11
- Show,
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
- export const LocationList = props => (
33
- <List filters={<LocationFilter />} pagination={<Pagination rowsPerPageOptions={[5, 10, 25, 50]} />} {...props}>
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" sortable={true} />
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
- export const LocationShow = props => (
45
- <Show {...props}>
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="Details">
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="Location"
58
- label="Orders in this Location"
59
- pagination={<Pagination rowsPerPageOptions={[5, 10, 25, 50]} />}
53
+ target="City"
54
+ source="City"
55
+ label="Orders in City"
60
56
  >
61
- <Datagrid>
62
- <TextField source="id" label="Order ID" />
63
- <TextField source="shipName" label="Ship Name" />
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
- export const LocationCreate = props => (
74
- <Create {...props}>
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" validate={required()} />
77
- <TextInput source="city" label="City" validate={required()} />
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
- export const LocationEdit = props => (
84
- <Edit {...props}>
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" validate={required()} />
87
- <TextInput source="city" label="City" validate={required()} />
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
- // src/Order.js
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 Ship Name" source="ShipName" alwaysOn />
31
- <TextInput label="Country" source="Country" />
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
- export const OrderList = (props) => (
37
- <List {...props} filters={<OrderFilter />} perPage={7} pagination={<Pagination />}>
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="Id" />
17
+ <TextField source="ShipName" label="Ship Name" />
40
18
  <DateField source="OrderDate" />
41
- <TextField source="ShipName" />
42
- <TextField source="ShipAddress" />
43
- <TextField source="ShipCity" />
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
- <ReferenceField label="Customer" source="CustomerId" reference="Customer">
47
- <FunctionField render={record => record ? `${record.CompanyName}` : ''} />
48
- </ReferenceField>
23
+ <NumberField source="Id" />
49
24
  </Datagrid>
50
25
  </List>
51
26
  );
52
27
 
53
- export const OrderShow = (props) => (
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" label="Order Detail List">
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" options={{ style: 'percent' }} />
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
- export const OrderCreate = (props) => (
58
+ // Order Create
59
+ export const OrderCreate = props => (
87
60
  <Create {...props}>
88
61
  <SimpleForm>
89
- <ReferenceInput source="CustomerId" reference="Customer" required>
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
- <DateTimeInput source="OrderDate" />
93
- <TextInput source="ShipName" />
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
- <BooleanField source="Ready" /> # FIXEDME - BooleanField
74
+ <BooleanInput source="Ready" />
98
75
  </SimpleForm>
99
76
  </Create>
100
77
  );
101
78
 
102
- export const OrderEdit = (props) => (
79
+ // Order Edit
80
+ export const OrderEdit = props => (
103
81
  <Edit {...props}>
104
82
  <SimpleForm>
105
- <ReferenceInput source="CustomerId" reference="Customer" required>
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
- <DateTimeInput source="OrderDate" />
109
- <TextInput source="ShipName" />
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
- <BooleanField source="Ready" /> # FIXEDME - BooleanField
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
- List,
6
- Datagrid,
7
- TextField,
8
- NumberField,
9
- DateField,
10
- FunctionField,
11
- Show,
12
- SimpleShowLayout,
13
- TabbedShowLayout,
14
- Tab,
15
- ReferenceField,
16
- TextInput,
17
- NumberInput,
18
- ReferenceInput,
19
- SelectInput,
20
- DateTimeInput,
21
- BooleanInput,
22
- SimpleForm,
23
- Create,
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
- // Filters for the OrderDetail list, allowing users to search and sort.
24
+ // Filter component for OrderDetail
31
25
  const OrderDetailFilter = (props) => (
32
- <Filter {...props}>
33
- <TextInput label="Search" source="q" alwaysOn />
34
- <ReferenceInput label="Product" source="ProductId" reference="Product" allowEmpty>
35
- <SelectInput optionText="ProductName" />
36
- </ReferenceInput>
37
- <ReferenceInput label="Order" source="OrderId" reference="Order" allowEmpty>
38
- <SelectInput optionText="Id" />
39
- </ReferenceInput>
40
- </Filter>
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
- // Main list view with sorting, filtering, and pagination.
37
+ // List component for OrderDetail
44
38
  export const OrderDetailList = (props) => (
45
- <List
46
- {...props}
47
- filters={<OrderDetailFilter />}
48
- perPage={7} // Shows 7 per page as specified
49
- sort={{ field: 'Id', order: 'ASC' }}
50
- pagination={<Pagination />}
51
- >
52
- <Datagrid rowClick="show">
53
- <TextField source="Id" />
54
- <ReferenceField label="Product" source="ProductId" reference="Product">
55
- <TextField source="ProductName" />
56
- </ReferenceField>
57
- <ReferenceField label="Order" source="OrderId" reference="Order">
58
- <TextField source="Id" />
59
- </ReferenceField>
60
- <NumberField source="UnitPrice" />
61
- <NumberField source="Quantity" />
62
- <NumberField source="Discount" />
63
- <NumberField source="Amount" />
64
- <DateField source="ShippedDate" />
65
- </Datagrid>
66
- </List>
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
- // The Create view for OrderDetail with inline validation and auto-complete dropdowns for related references.
79
+ // Create component for OrderDetail
70
80
  export const OrderDetailCreate = (props) => (
71
- <Create {...props}>
72
- <SimpleForm>
73
- <ReferenceInput source="ProductId" reference="Product">
74
- <SelectInput optionText="ProductName" />
75
- </ReferenceInput>
76
- <ReferenceInput source="OrderId" reference="Order" disabled>
77
- <SelectInput optionText="Id" />
78
- </ReferenceInput>
79
- <NumberInput source="Quantity" />
80
- <NumberInput source="Discount" />
81
- </SimpleForm>
82
- </Create>
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
- // The Edit view for OrderDetail with form fields for updating exiting records.
96
+ // Edit component for OrderDetail
86
97
  export const OrderDetailEdit = (props) => (
87
- <Edit {...props}>
88
- <SimpleForm>
89
- <TextField source="Id" />
90
- <ReferenceInput source="ProductId" reference="Product">
91
- <SelectInput optionText="ProductName" />
92
- </ReferenceInput>
93
- <ReferenceInput source="OrderId" reference="Order" disabled>
94
- <SelectInput optionText="Id" />
95
- </ReferenceInput>
96
- <NumberInput source="Quantity" />
97
- <NumberInput source="Discount" />
98
- <DateTimeInput source="ShippedDate" disabled />
99
- </SimpleForm>
100
- </Edit>
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
- );