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.
Files changed (51) 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 +33 -9
  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-Resource-Learning-Prompt.md +119 -0
  6. api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/Admin-App-js-Learning-Prompt.md +71 -0
  7. 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
  8. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/package.json +3 -0
  9. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/Config.js +527 -0
  10. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/app_loader.js +24 -0
  11. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/.eslintrc +5 -0
  12. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/.yarnrc.yml +4 -0
  13. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/default-settings.js +25 -0
  14. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/default-settings.ts +25 -0
  15. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/errors.js +116 -0
  16. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/errors.ts +116 -0
  17. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/index.test.tsx +7 -0
  18. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/index.tsx +11 -0
  19. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/ra-jsonapi-client.js +577 -0
  20. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/ra-jsonapi-client.ts +577 -0
  21. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/resourceLookup.js +124 -0
  22. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/resourceLookup.ts +124 -0
  23. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/rav4-jsonapi-client/styles.module.css +9 -0
  24. api_logic_server_cli/prototypes/nw/.DS_Store +0 -0
  25. api_logic_server_cli/prototypes/nw/ui/.DS_Store +0 -0
  26. api_logic_server_cli/prototypes/nw/ui/react_admin/.DS_Store +0 -0
  27. api_logic_server_cli/prototypes/nw/ui/react_admin/src/App.js +30 -31
  28. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Category.js +62 -62
  29. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Customer.js +143 -48
  30. api_logic_server_cli/prototypes/nw/ui/react_admin/src/CustomerDemographic.js +20 -37
  31. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Department.js +38 -39
  32. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Employee.js +85 -134
  33. api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeAudit.js +89 -77
  34. api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeTerritory.js +59 -59
  35. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Location.js +45 -49
  36. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Order.js +42 -60
  37. api_logic_server_cli/prototypes/nw/ui/react_admin/src/OrderDetail.js +97 -106
  38. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Product.js +60 -62
  39. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Region.js +36 -41
  40. api_logic_server_cli/prototypes/nw/ui/react_admin/src/SampleDBVersion.js +73 -0
  41. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Shipper.js +57 -54
  42. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Supplier.js +71 -87
  43. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Territory.js +47 -41
  44. api_logic_server_cli/prototypes/nw/ui/react_admin/src/Union.js +18 -34
  45. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/METADATA +1 -1
  46. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/RECORD +50 -31
  47. api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/dataProvider.js +0 -110
  48. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/WHEEL +0 -0
  49. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/entry_points.txt +0 -0
  50. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/licenses/LICENSE +0 -0
  51. {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.22.dist-info}/top_level.txt +0 -0
@@ -1,64 +1,67 @@
1
- // Importing necessary components and modules from react-admin and material-ui
2
- import React from 'react';
3
- import { List, Datagrid, TextField, NumberField, Show, SimpleShowLayout, Create, SimpleForm, Edit, TextInput, ReferenceField, TabbedShowLayout, Tab, ReferenceInput, SelectInput, Pagination, Filter } from 'react-admin';
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
- // Filter component for the Shipper resource
6
- type FilterProps = {
7
- [key: string]: any,
8
- };
9
- const ShipperFilter = (props: FilterProps) => (
10
- <Filter {...props}>
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 with pagination, sorting, and filtering
16
- export const ShipperList = (props: any) => (
17
- <List {...props} filters={<ShipperFilter />} perPage={7} pagination={<Pagination />}>
18
- <Datagrid rowClick="show">
19
- <TextField source="CompanyName" label="Company Name" sortable={true} />
20
- <TextField source="Phone" label="Phone" />
21
- <NumberField source="Id" label="ID" />
22
- </Datagrid>
23
- </List>
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 with fields organized in a simple layout
27
- export const ShipperShow = (props: any) => (
28
- <Show {...props} title="Shipper Details">
29
- <SimpleShowLayout>
30
- <TextField source="CompanyName" label="Company Name" />
31
- <TextField source="Phone" label="Phone" />
32
- <NumberField source="Id" label="ID" />
33
- {/* Example for future tabbed relation */}
34
- {/*<TabbedShowLayout>
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 adding a new Shipper
46
- export const ShipperCreate = (props: any) => (
47
- <Create {...props} title="Create a new Shipper">
48
- <SimpleForm>
49
- <TextInput source="CompanyName" label="Company Name" />
50
- <TextInput source="Phone" label="Phone" />
51
- </SimpleForm>
52
- </Create>
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 editing a Shipper
56
- export const ShipperEdit = (props: any) => (
57
- <Edit {...props} title="Edit Shipper">
58
- <SimpleForm>
59
- <TextInput source="CompanyName" label="Company Name" />
60
- <TextInput source="Phone" label="Phone" />
61
- <NumberField source="Id" label="ID" />
62
- </SimpleForm>
63
- </Edit>
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 for the Supplier List
4
+ // Filters applied to the supplier list
25
5
  const SupplierFilter = (props) => (
26
- <Filter {...props}>
27
- <TextInput label="Search by Company Name" source="CompanyName" alwaysOn />
28
- <TextInput label="Search by Contact Name" source="ContactName" />
29
- <TextInput label="Search by City" source="City" />
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
- // Supplier List Component
12
+ // Listing Suppliers
34
13
  export const SupplierList = (props) => (
35
- <List filters={<SupplierFilter />} pagination={<Pagination />} {...props}>
36
- <Datagrid rowClick="show">
37
- <TextField source="CompanyName" label="Company Name" />
38
- <TextField source="ContactName" label="Contact Name" />
39
- <TextField source="ContactTitle" label="Contact Title" />
40
- <TextField source="Address" label="Address" />
41
- <TextField source="City" label="City" />
42
- <TextField source="Country" label="Country" />
43
- <TextField source="Phone" label="Phone" />
44
- </Datagrid>
45
- </List>
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
- // Supplier Show Component
27
+ // Show Supplier
49
28
  export const SupplierShow = (props) => (
50
- <Show {...props}>
51
- <SimpleShowLayout>
52
- <TextField source="CompanyName" label="Company Name" />
53
- <TextField source="ContactName" label="Contact Name" />
54
- <TextField source="ContactTitle" label="Contact Title" />
55
- <TextField source="Address" label="Address" />
56
- <TextField source="City" label="City" />
57
- <TextField source="Region" label="Region" />
58
- <TextField source="PostalCode" label="Postal Code" />
59
- <TextField source="Country" label="Country" />
60
- <TextField source="Phone" label="Phone" />
61
- <TextField source="Fax" label="Fax" />
62
- <TextField source="HomePage" label="Home Page" />
63
- </SimpleShowLayout>
64
- </Show>
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
- // Supplier Create Component
51
+ // Create a new Supplier
68
52
  export const SupplierCreate = (props) => (
69
- <Create {...props}>
70
- <SimpleForm>
71
- <TextInput source="CompanyName" label="Company Name" />
72
- <TextInput source="ContactName" label="Contact Name" />
73
- <TextInput source="ContactTitle" label="Contact Title" />
74
- <TextInput source="Address" label="Address" />
75
- <TextInput source="City" label="City" />
76
- <TextInput source="Region" label="Region" />
77
- <TextInput source="PostalCode" label="Postal Code" />
78
- <TextInput source="Country" label="Country" />
79
- <TextInput source="Phone" label="Phone" />
80
- <TextInput source="Fax" label="Fax" />
81
- <TextInput source="HomePage" label="Home Page" />
82
- </SimpleForm>
83
- </Create>
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
- // Supplier Edit Component
70
+ // Edit an existing Supplier
87
71
  export const SupplierEdit = (props) => (
88
- <Edit {...props}>
89
- <SimpleForm>
90
- <TextInput source="CompanyName" label="Company Name" />
91
- <TextInput source="ContactName" label="Contact Name" />
92
- <TextInput source="ContactTitle" label="Contact Title" />
93
- <TextInput source="Address" label="Address" />
94
- <TextInput source="City" label="City" />
95
- <TextInput source="Region" label="Region" />
96
- <TextInput source="PostalCode" label="Postal Code" />
97
- <TextInput source="Country" label="Country" />
98
- <TextInput source="Phone" label="Phone" />
99
- <TextInput source="Fax" label="Fax" />
100
- <TextInput source="HomePage" label="Home Page" />
101
- </SimpleForm>
102
- </Edit>
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
  );
@@ -1,84 +1,90 @@
1
+ // src/Territory.js
1
2
  import React from 'react';
2
3
  import {
3
4
  List,
5
+ Show,SelectInput,
4
6
  Datagrid,
5
- TextField,
6
- NumberField,
7
- NumberInput,
8
- TextInput,
9
- Show,
10
7
  SimpleShowLayout,
11
8
  TabbedShowLayout,
12
9
  Tab,
10
+ TextField,
11
+ ReferenceField,
12
+ FunctionField,
13
+ TextInput,
14
+ ReferenceInput,
13
15
  Create,
14
- SimpleForm,
15
16
  Edit,
16
- ReferenceManyField,
17
- ReferenceInput,
18
- SelectInput,
17
+ SimpleForm,
19
18
  Filter,
20
- Pagination
19
+ NumberField,
20
+ BooleanField,
21
+ ReferenceManyField,
21
22
  } from 'react-admin';
22
23
 
23
- // Define filters for Territories list which include search capabilities
24
+ // Filter component for the Territory list view
24
25
  const TerritoryFilter = (props) => (
25
26
  <Filter {...props}>
26
- <TextInput label="Search" source="TerritoryDescription" alwaysOn />
27
- <TextInput label="Region" source="RegionId" />
27
+ <TextInput label="Search by Description" source="q" alwaysOn />
28
28
  </Filter>
29
29
  );
30
30
 
31
- // List component to display Territories
32
- export const TerritoryList = props => (
33
- <List {...props} filters={<TerritoryFilter />} pagination={<Pagination />}
34
- sort={{ field: 'TerritoryDescription', order: 'ASC' }}>
31
+ // TerritoryList component for displaying a list of territories
32
+ export const TerritoryList = (props) => (
33
+ <List {...props} filters={<TerritoryFilter />}>
35
34
  <Datagrid rowClick="show">
36
35
  <TextField source="TerritoryDescription" label="Territory Description" />
37
- <NumberField source="Id" label="ID" />
38
- <NumberField source="RegionId" label="Region ID" />
36
+ <TextField source="Id" label="ID" />
37
+ <ReferenceField label="Region" source="RegionId" reference="Region">
38
+ <TextField source="RegionDescription" />
39
+ </ReferenceField>
39
40
  </Datagrid>
40
41
  </List>
41
42
  );
42
43
 
43
- // Show component to display details of a specific Territory
44
- export const TerritoryShow = props => (
44
+ // TerritoryShow component for displaying territory details
45
+ export const TerritoryShow = (props) => (
45
46
  <Show {...props}>
46
47
  <SimpleShowLayout>
47
48
  <TextField source="TerritoryDescription" label="Territory Description" />
48
- <NumberField source="Id" label="ID" />
49
- <NumberField source="RegionId" label="Region ID" />
50
-
51
- {/* Related Employee Territories shown in a tabbed layout */}
52
- <TabbedShowLayout>
53
- <Tab label="Employee Territories List">
54
- <ReferenceManyField reference="EmployeeTerritory" target="TerritoryId" label="Employee Territories">
55
- <Datagrid rowClick="show">
56
- <TextField source="Id" label="ID" />
57
- <NumberField source="EmployeeId" label="Employee ID" />
58
- </Datagrid>
59
- </ReferenceManyField>
60
- </Tab>
61
- </TabbedShowLayout>
49
+ <TextField source="Id" label="ID" />
50
+ <ReferenceField label="Region" source="RegionId" reference="Region">
51
+ <TextField source="RegionDescription" />
52
+ </ReferenceField>
53
+ <ReferenceManyField
54
+ label="Employees in Territory"
55
+ reference="EmployeeTerritory"
56
+ target="TerritoryId"
57
+ >
58
+ <Datagrid rowClick="show">
59
+ <ReferenceField label="Employee" source="EmployeeId" reference="Employee">
60
+ <FunctionField render={(record) => `${record.FirstName} ${record.LastName}`} />
61
+ </ReferenceField>
62
+ </Datagrid>
63
+ </ReferenceManyField>
62
64
  </SimpleShowLayout>
63
65
  </Show>
64
66
  );
65
67
 
66
- // Create component for adding a new territory
67
- export const TerritoryCreate = props => (
68
+ // TerritoryCreate component for creating new territories
69
+ export const TerritoryCreate = (props) => (
68
70
  <Create {...props}>
69
71
  <SimpleForm>
70
72
  <TextInput source="TerritoryDescription" label="Territory Description" />
71
- <NumberInput source="RegionId" label="Region ID" />
73
+ <ReferenceInput label="Region" source="RegionId" reference="Region">
74
+ <SelectInput optionText="RegionDescription" />
75
+ </ReferenceInput>
72
76
  </SimpleForm>
73
77
  </Create>
74
78
  );
75
79
 
76
- // Edit component for modifying existing territory data
77
- export const TerritoryEdit = props => (
80
+ // TerritoryEdit component for editing existing territories
81
+ export const TerritoryEdit = (props) => (
78
82
  <Edit {...props}>
79
83
  <SimpleForm>
80
84
  <TextInput source="TerritoryDescription" label="Territory Description" />
81
- <NumberInput source="RegionId" label="Region ID" />
85
+ <ReferenceInput label="Region" source="RegionId" reference="Region">
86
+ <SelectInput optionText="RegionDescription" />
87
+ </ReferenceInput>
82
88
  </SimpleForm>
83
89
  </Edit>
84
90
  );
@@ -1,57 +1,38 @@
1
- // Union.js - React Admin resource definitions and components for the Union entity.
2
1
  import React from 'react';
3
- import {
4
- List,
5
- Datagrid,
6
- TextField,
7
- NumberField,
8
- Show,
9
- SimpleShowLayout,
10
- TabbedShowLayout,
11
- Tab,
12
- TextInput,
13
- Create,
14
- SimpleForm,
15
- Edit,
16
- ReferenceManyField,
17
- EditButton,
18
- ShowButton,
19
- Pagination,
20
- Filter,
21
- } from 'react-admin';
2
+ import { List, Datagrid, TextField, NumberField, Show, SimpleShowLayout, ReferenceManyField, TabbedShowLayout, Tab, TextInput, Create, SimpleForm, Edit, ReferenceField, ReferenceInput, SelectInput, Filter, Pagination } from 'react-admin';
22
3
 
4
+ // Filter component to be used in List view
23
5
  const UnionFilter = (props) => (
24
6
  <Filter {...props}>
25
- <TextInput label="Search by Name" source="Name" alwaysOn />
7
+ <TextInput label="Search by Name" source="q" alwaysOn />
26
8
  </Filter>
27
9
  );
28
10
 
11
+ // List view for Unions
29
12
  export const UnionList = (props) => (
30
- <List
31
- {...props}
32
- filters={<UnionFilter />}
33
- pagination={<Pagination rowsPerPageOptions={[10, 25, 50]} />}
34
- sort={{ field: 'Name', order: 'ASC' }}
35
- >
13
+ <List {...props} filters={<UnionFilter />} pagination={<Pagination rowsPerPageOptions={[7, 14, 28]} />} perPage={7}>
36
14
  <Datagrid rowClick="show">
37
15
  <TextField source="Name" label="Union Name" />
38
- <NumberField source="Id" label="ID" />
39
- <ShowButton />
16
+ <NumberField source="Id" label="Union ID" />
40
17
  </Datagrid>
41
18
  </List>
42
19
  );
43
20
 
21
+ // Show view for a Union
44
22
  export const UnionShow = (props) => (
45
23
  <Show {...props}>
46
24
  <SimpleShowLayout>
47
25
  <TextField source="Name" label="Union Name" />
26
+ <NumberField source="Id" label="Union ID" />
48
27
  <TabbedShowLayout>
49
- <Tab label="Members">
50
- <ReferenceManyField reference="Employee" target="UnionId" label="Union Employees">
28
+ <Tab label="Employees">
29
+ <ReferenceManyField reference="Employee" target="UnionId" addLabel={false}>
51
30
  <Datagrid>
52
- <TextField source="LastName" label="Last Name" />
53
- <TextField source="FirstName" label="First Name" />
54
- <ShowButton />
31
+ <TextField source="LastName" />
32
+ <TextField source="FirstName" />
33
+ <ReferenceField source="WorksForDepartmentId" reference="Department">
34
+ <TextField source="DepartmentName" />
35
+ </ReferenceField>
55
36
  </Datagrid>
56
37
  </ReferenceManyField>
57
38
  </Tab>
@@ -60,6 +41,7 @@ export const UnionShow = (props) => (
60
41
  </Show>
61
42
  );
62
43
 
44
+ // Create view for a new Union
63
45
  export const UnionCreate = (props) => (
64
46
  <Create {...props}>
65
47
  <SimpleForm>
@@ -68,10 +50,12 @@ export const UnionCreate = (props) => (
68
50
  </Create>
69
51
  );
70
52
 
53
+ // Edit view for an existing Union
71
54
  export const UnionEdit = (props) => (
72
55
  <Edit {...props}>
73
56
  <SimpleForm>
74
57
  <TextInput source="Name" label="Union Name" />
58
+ <NumberField source="Id" label="Union ID" />
75
59
  </SimpleForm>
76
60
  </Edit>
77
61
  );
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ApiLogicServer
3
- Version: 15.0.19
3
+ Version: 15.0.22
4
4
  Author-email: Val Huber <apilogicserver@gmail.com>
5
5
  License: BSD-3-Clause
6
6
  Project-URL: Homepage, https://www.genai-logic.com