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
|
@@ -2,73 +2,56 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
List,
|
|
4
4
|
Datagrid,
|
|
5
|
-
TextField,
|
|
5
|
+
TextField,
|
|
6
6
|
Show,
|
|
7
7
|
SimpleShowLayout,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Edit,
|
|
9
|
+
SimpleForm,
|
|
10
10
|
TextInput,
|
|
11
11
|
Create,
|
|
12
|
-
SimpleForm,
|
|
13
|
-
Edit,
|
|
14
|
-
NumberField,
|
|
15
12
|
Filter,
|
|
16
|
-
Pagination
|
|
13
|
+
Pagination,
|
|
17
14
|
} from 'react-admin';
|
|
18
15
|
|
|
19
|
-
/**
|
|
20
|
-
* Filters for searching CustomerDemographic entities by Id.
|
|
21
|
-
*/
|
|
22
16
|
const CustomerDemographicFilter = (props) => (
|
|
23
17
|
<Filter {...props}>
|
|
24
|
-
<TextInput label="Search
|
|
18
|
+
<TextInput label="Search" source="q" alwaysOn />
|
|
19
|
+
<TextInput label="Customer Description" source="CustomerDesc" />
|
|
25
20
|
</Filter>
|
|
26
21
|
);
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<Datagrid rowClick="show" isRowSelectable={() => false}>
|
|
34
|
-
<TextField label="Id" source="Id" />
|
|
35
|
-
<TextField source="CustomerDesc" />
|
|
23
|
+
export const CustomerDemographicList = (props) => (
|
|
24
|
+
<List filters={<CustomerDemographicFilter />} pagination={<Pagination perPage={7} />} {...props}>
|
|
25
|
+
<Datagrid rowClick="show">
|
|
26
|
+
<TextField source="Id" label="ID" />
|
|
27
|
+
<TextField source="CustomerDesc" label="Customer Description" />
|
|
36
28
|
</Datagrid>
|
|
37
29
|
</List>
|
|
38
30
|
);
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
* Show view for CustomerDemographic.
|
|
42
|
-
*/
|
|
43
|
-
export const CustomerDemographicShow = props => (
|
|
32
|
+
export const CustomerDemographicShow = (props) => (
|
|
44
33
|
<Show {...props}>
|
|
45
34
|
<SimpleShowLayout>
|
|
46
|
-
<
|
|
47
|
-
<TextField source="CustomerDesc" />
|
|
35
|
+
<TextField source="Id" label="ID" />
|
|
36
|
+
<TextField source="CustomerDesc" label="Customer Description" />
|
|
48
37
|
</SimpleShowLayout>
|
|
49
38
|
</Show>
|
|
50
39
|
);
|
|
51
40
|
|
|
52
|
-
|
|
53
|
-
* Form for creating a new CustomerDemographic.
|
|
54
|
-
*/
|
|
55
|
-
export const CustomerDemographicCreate = props => (
|
|
41
|
+
export const CustomerDemographicCreate = (props) => (
|
|
56
42
|
<Create {...props}>
|
|
57
43
|
<SimpleForm>
|
|
58
|
-
<TextInput
|
|
59
|
-
<TextInput source="CustomerDesc" />
|
|
44
|
+
<TextInput source="Id" label="ID" />
|
|
45
|
+
<TextInput source="CustomerDesc" label="Customer Description" />
|
|
60
46
|
</SimpleForm>
|
|
61
47
|
</Create>
|
|
62
48
|
);
|
|
63
49
|
|
|
64
|
-
|
|
65
|
-
* Form for editing an existing CustomerDemographic.
|
|
66
|
-
*/
|
|
67
|
-
export const CustomerDemographicEdit = props => (
|
|
50
|
+
export const CustomerDemographicEdit = (props) => (
|
|
68
51
|
<Edit {...props}>
|
|
69
52
|
<SimpleForm>
|
|
70
|
-
<TextInput
|
|
71
|
-
<TextInput source="CustomerDesc" />
|
|
53
|
+
<TextInput source="Id" label="ID" disabled />
|
|
54
|
+
<TextInput source="CustomerDesc" label="Customer Description" />
|
|
72
55
|
</SimpleForm>
|
|
73
56
|
</Edit>
|
|
74
57
|
);
|
|
@@ -6,70 +6,61 @@ import {
|
|
|
6
6
|
NumberField,
|
|
7
7
|
ReferenceField,
|
|
8
8
|
Show,
|
|
9
|
+
SimpleShowLayout,
|
|
9
10
|
TabbedShowLayout,
|
|
10
11
|
Tab,
|
|
11
|
-
|
|
12
|
+
ReferenceManyField,
|
|
13
|
+
Edit,
|
|
14
|
+
SimpleForm,
|
|
12
15
|
TextInput,
|
|
13
16
|
NumberInput,
|
|
14
|
-
|
|
17
|
+
ReferenceInput,
|
|
15
18
|
Create,
|
|
16
|
-
|
|
17
|
-
Edit,
|
|
18
|
-
Filter,
|
|
19
|
+
SelectInput, Pagination
|
|
19
20
|
} from 'react-admin';
|
|
20
21
|
|
|
21
|
-
// Define Filters for the List
|
|
22
|
-
// FIXEDME - deleted bogus code: detailed;
|
|
23
|
-
|
|
24
|
-
const DepartmentFilter = (props) => (
|
|
25
|
-
<Filter {...props}>
|
|
26
|
-
<TextInput label="Search by Department Name" source="DepartmentName" alwaysOn />
|
|
27
|
-
<NumberInput label="Security Level" source="SecurityLevel" />
|
|
28
|
-
</Filter>
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
// List Component
|
|
32
22
|
export const DepartmentList = (props) => (
|
|
33
|
-
<List filters={<DepartmentFilter />} {
|
|
23
|
+
<List {...props} filters={<DepartmentFilter />} pagination={<DepartmentPagination />}>
|
|
34
24
|
<Datagrid rowClick="show">
|
|
35
25
|
<TextField source="DepartmentName" label="Department Name" />
|
|
36
26
|
<NumberField source="SecurityLevel" label="Security Level" />
|
|
27
|
+
<NumberField source="Id" label="ID" />
|
|
37
28
|
</Datagrid>
|
|
38
29
|
</List>
|
|
39
30
|
);
|
|
40
31
|
|
|
41
|
-
// Show Component
|
|
42
32
|
export const DepartmentShow = (props) => (
|
|
43
33
|
<Show {...props}>
|
|
44
34
|
<SimpleShowLayout>
|
|
45
35
|
<TextField source="DepartmentName" label="Department Name" />
|
|
46
36
|
<NumberField source="SecurityLevel" label="Security Level" />
|
|
47
|
-
<
|
|
37
|
+
<NumberField source="Id" label="ID" />
|
|
48
38
|
</SimpleShowLayout>
|
|
49
39
|
<TabbedShowLayout>
|
|
40
|
+
<Tab label="Departments">
|
|
41
|
+
<ReferenceManyField reference="Department" target="DepartmentId" label="" perPage={5} sort={{ field: 'Id', order: 'ASC' }}>
|
|
42
|
+
<Datagrid>
|
|
43
|
+
<ReferenceField source="DepartmentId" reference="Department"><TextField source="DepartmentName" /></ReferenceField>
|
|
44
|
+
<NumberField source="SecurityLevel" label="Security Level" />
|
|
45
|
+
<NumberField source="Id" label="ID" />
|
|
46
|
+
</Datagrid>
|
|
47
|
+
</ReferenceManyField>
|
|
48
|
+
</Tab>
|
|
50
49
|
<Tab label="On Loan Employees">
|
|
51
|
-
<ReferenceManyField
|
|
52
|
-
reference="Employee"
|
|
53
|
-
target="OnLoanDepartmentId"
|
|
54
|
-
label="On Loan Employees"
|
|
55
|
-
>
|
|
50
|
+
<ReferenceManyField reference="Employee" target="OnLoanDepartmentId" label="" perPage={5} sort={{ field: 'Id', order: 'ASC' }}>
|
|
56
51
|
<Datagrid>
|
|
57
|
-
<TextField source="LastName" label="
|
|
58
|
-
<TextField source="FirstName" label="
|
|
59
|
-
<
|
|
52
|
+
<TextField source="LastName" label="Last Name" />
|
|
53
|
+
<TextField source="FirstName" label="First Name" />
|
|
54
|
+
<NumberField source="Id" label="Employee ID" />
|
|
60
55
|
</Datagrid>
|
|
61
56
|
</ReferenceManyField>
|
|
62
57
|
</Tab>
|
|
63
58
|
<Tab label="Works For Employees">
|
|
64
|
-
<ReferenceManyField
|
|
65
|
-
reference="Employee"
|
|
66
|
-
target="WorksForDepartmentId"
|
|
67
|
-
label="Works For Employees"
|
|
68
|
-
>
|
|
59
|
+
<ReferenceManyField reference="Employee" target="WorksForDepartmentId" label="" perPage={5} sort={{ field: 'Id', order: 'ASC' }}>
|
|
69
60
|
<Datagrid>
|
|
70
|
-
<TextField source="LastName" label="
|
|
71
|
-
<TextField source="FirstName" label="
|
|
72
|
-
<
|
|
61
|
+
<TextField source="LastName" label="Last Name" />
|
|
62
|
+
<TextField source="FirstName" label="First Name" />
|
|
63
|
+
<NumberField source="Id" label="Employee ID" />
|
|
73
64
|
</Datagrid>
|
|
74
65
|
</ReferenceManyField>
|
|
75
66
|
</Tab>
|
|
@@ -77,7 +68,6 @@ export const DepartmentShow = (props) => (
|
|
|
77
68
|
</Show>
|
|
78
69
|
);
|
|
79
70
|
|
|
80
|
-
// Create Component
|
|
81
71
|
export const DepartmentCreate = (props) => (
|
|
82
72
|
<Create {...props}>
|
|
83
73
|
<SimpleForm>
|
|
@@ -87,13 +77,22 @@ export const DepartmentCreate = (props) => (
|
|
|
87
77
|
</Create>
|
|
88
78
|
);
|
|
89
79
|
|
|
90
|
-
// Edit Component
|
|
91
80
|
export const DepartmentEdit = (props) => (
|
|
92
81
|
<Edit {...props}>
|
|
93
82
|
<SimpleForm>
|
|
94
83
|
<TextInput source="DepartmentName" label="Department Name" />
|
|
95
84
|
<NumberInput source="SecurityLevel" label="Security Level" />
|
|
96
|
-
<NumberInput source="Id" label="ID"
|
|
85
|
+
<NumberInput source="Id" label="ID" />
|
|
97
86
|
</SimpleForm>
|
|
98
87
|
</Edit>
|
|
99
|
-
);
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
const DepartmentFilter = (props) => (
|
|
91
|
+
<div>
|
|
92
|
+
<TextInput label="Search By Name" source="DepartmentName" alwaysOn {...props} />
|
|
93
|
+
</div>
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
const DepartmentPagination = () => (
|
|
97
|
+
<Pagination rowsPerPageOptions={[5, 10, 25]} />
|
|
98
|
+
);
|
|
@@ -1,149 +1,100 @@
|
|
|
1
|
-
```javascript
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ReferenceField,
|
|
9
|
-
Show,
|
|
10
|
-
SimpleShowLayout,
|
|
11
|
-
TabbedShowLayout,
|
|
12
|
-
Tab,
|
|
13
|
-
TextInput,
|
|
14
|
-
NumberInput,
|
|
15
|
-
ReferenceInput,
|
|
16
|
-
SelectInput,
|
|
17
|
-
Create,
|
|
18
|
-
SimpleForm,
|
|
19
|
-
Edit,
|
|
20
|
-
Filter,
|
|
21
|
-
DateField,
|
|
22
|
-
ReferenceManyField,
|
|
23
|
-
BooleanField,
|
|
24
|
-
BooleanInput,
|
|
25
|
-
ImageField
|
|
3
|
+
List, Show, Edit, Create, Datagrid, TextField, NumberField, DateField,
|
|
4
|
+
SimpleShowLayout, TabbedShowLayout, Tab, SimpleForm, TextInput, NumberInput, DateTimeInput,
|
|
5
|
+
ReferenceField, ReferenceManyField, ReferenceInput, SelectInput, BooleanField, BooleanInput,
|
|
6
|
+
FunctionField, Pagination, Filter
|
|
26
7
|
} from 'react-admin';
|
|
27
8
|
|
|
9
|
+
// Filter for Employee
|
|
28
10
|
const EmployeeFilter = (props) => (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
11
|
+
<Filter {...props}>
|
|
12
|
+
<TextInput label="Search by Last Name" source="LastName" alwaysOn />
|
|
13
|
+
<TextInput label="First Name" source="FirstName" />
|
|
14
|
+
<ReferenceInput label="Department" source="WorksForDepartmentId" reference="Department">
|
|
15
|
+
<SelectInput optionText="DepartmentName" />
|
|
16
|
+
</ReferenceInput>
|
|
17
|
+
</Filter>
|
|
36
18
|
);
|
|
37
19
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<TextField source="Email" />
|
|
45
|
-
<NumberField source="Salary" label="Salary" options={{ style: 'currency', currency: 'USD' }} />
|
|
46
|
-
<TextField source="EmployeeType" label="Employee Type" />
|
|
47
|
-
<ImageField source="PhotoPath" label="Photo" />
|
|
48
|
-
<NumberField source="ProperSalary" label="Proper Salary" options={{ style: 'currency', currency: 'USD' }}/>
|
|
49
|
-
<DateField source="HireDate" label="Hire Date" />
|
|
50
|
-
</Datagrid>
|
|
51
|
-
</List>
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
const EmployeeShow = (props) => (
|
|
55
|
-
<Show {...props}>
|
|
56
|
-
<SimpleShowLayout>
|
|
57
|
-
<TextField source="LastName" label="Last Name" />
|
|
58
|
-
<TextField source="FirstName" label="First Name" />
|
|
59
|
-
<TextField source="Title" />
|
|
60
|
-
<TextField source="Email" />
|
|
61
|
-
<NumberField source="Salary" label="Salary" options={{ style: 'currency', currency: 'USD' }} />
|
|
62
|
-
<TextField source="EmployeeType" label="Employee Type" />
|
|
63
|
-
<ImageField source="PhotoPath" label="Photo" />
|
|
64
|
-
<NumberField source="ProperSalary" label="Proper Salary" options={{ style: 'currency', currency: 'USD' }}/>
|
|
65
|
-
<DateField source="HireDate" label="Hire Date" />
|
|
66
|
-
<TextField source="Notes" label="Notes" />
|
|
67
|
-
</SimpleShowLayout>
|
|
68
|
-
<TabbedShowLayout>
|
|
69
|
-
<Tab label="Audits">
|
|
70
|
-
<ReferenceManyField reference="EmployeeAudit" target="EmployeeId" label="Employee Audits">
|
|
71
|
-
<Datagrid>
|
|
20
|
+
// Employee List
|
|
21
|
+
export const EmployeeList = (props) => (
|
|
22
|
+
<List {...props} filters={<EmployeeFilter />} pagination={<Pagination rowsPerPageOptions={[7, 14, 28]} />} perPage={7}>
|
|
23
|
+
<Datagrid rowClick="show">
|
|
24
|
+
<TextField source="LastName" label="Last Name" />
|
|
25
|
+
<TextField source="FirstName" label="First Name" />
|
|
72
26
|
<TextField source="Title" />
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
<Tab label="Territories">
|
|
78
|
-
<ReferenceManyField reference="EmployeeTerritory" target="EmployeeId" label="Territories">
|
|
79
|
-
<Datagrid>
|
|
80
|
-
<ReferenceField label="Territory Description" source="TerritoryId" reference="Territory">
|
|
81
|
-
<TextField source="TerritoryDescription" />
|
|
27
|
+
<DateField source="BirthDate" label="Birth Date" />
|
|
28
|
+
<TextField source="City" />
|
|
29
|
+
<ReferenceField label="Department" source="WorksForDepartmentId" reference="Department">
|
|
30
|
+
<TextField source="DepartmentName" />
|
|
82
31
|
</ReferenceField>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<ReferenceManyField reference="Order" target="EmployeeId" label="Orders">
|
|
88
|
-
<Datagrid>
|
|
89
|
-
<TextField source="ShipName" />
|
|
90
|
-
<DateField source="OrderDate" />
|
|
91
|
-
<NumberField source="AmountTotal" options={{ style: 'currency', currency: 'USD' }} />
|
|
92
|
-
</Datagrid>
|
|
93
|
-
</ReferenceManyField>
|
|
94
|
-
</Tab>
|
|
95
|
-
</TabbedShowLayout>
|
|
96
|
-
</Show>
|
|
32
|
+
<NumberField source="Salary" options={{ style: 'currency', currency: 'USD' }} />
|
|
33
|
+
<NumberField source="Id" /> {/* Showing primary key at the end */}
|
|
34
|
+
</Datagrid>
|
|
35
|
+
</List>
|
|
97
36
|
);
|
|
98
37
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
38
|
+
// Employee Show
|
|
39
|
+
export const EmployeeShow = (props) => (
|
|
40
|
+
<Show {...props}>
|
|
41
|
+
<SimpleShowLayout>
|
|
42
|
+
<TextField source="LastName" label="Last Name" />
|
|
43
|
+
<TextField source="FirstName" label="First Name" />
|
|
44
|
+
<TextField source="Title" />
|
|
45
|
+
<DateField source="BirthDate" label="Birth Date" />
|
|
46
|
+
<TextField source="City" />
|
|
47
|
+
<NumberField source="Salary" options={{ style: 'currency', currency: 'USD' }} />
|
|
48
|
+
<NumberField source="Id" /> // Primary Key field
|
|
49
|
+
</SimpleShowLayout>
|
|
50
|
+
<TabbedShowLayout>
|
|
51
|
+
<Tab label="Audit">
|
|
52
|
+
<ReferenceManyField reference="EmployeeAudit" target="EmployeeId" addLabel={false}>
|
|
53
|
+
<Datagrid rowClick="show">
|
|
54
|
+
<TextField source="LastName" />
|
|
55
|
+
<TextField source="Title" />
|
|
56
|
+
<DateField source="CreatedOn" label="Created On" />
|
|
57
|
+
</Datagrid>
|
|
58
|
+
</ReferenceManyField>
|
|
59
|
+
</Tab>
|
|
60
|
+
<Tab label="Territories">
|
|
61
|
+
<ReferenceManyField reference="EmployeeTerritory" target="EmployeeId" addLabel={false}>
|
|
62
|
+
<Datagrid rowClick="show">
|
|
63
|
+
<TextField source="TerritoryDescription" label="Description" />
|
|
64
|
+
</Datagrid>
|
|
65
|
+
</ReferenceManyField>
|
|
66
|
+
</Tab>
|
|
67
|
+
</TabbedShowLayout>
|
|
68
|
+
</Show>
|
|
122
69
|
);
|
|
123
70
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<DateField source="HireDate" label="Hire Date" />
|
|
137
|
-
<TextInput multiline source="Notes" label="Notes" />
|
|
138
|
-
<ReferenceInput label="On Loan Department" source="OnLoanDepartmentId" reference="Department">
|
|
139
|
-
<SelectInput optionText="DepartmentName" />
|
|
140
|
-
</ReferenceInput>
|
|
141
|
-
<ReferenceInput label="Works For Department" source="WorksForDepartmentId" reference="Department">
|
|
142
|
-
<SelectInput optionText="DepartmentName" />
|
|
143
|
-
</ReferenceInput>
|
|
144
|
-
</SimpleForm>
|
|
145
|
-
</Create>
|
|
71
|
+
// Employee Create
|
|
72
|
+
export const EmployeeCreate = (props) => (
|
|
73
|
+
<Create {...props}>
|
|
74
|
+
<SimpleForm>
|
|
75
|
+
<TextInput source="LastName" />
|
|
76
|
+
<TextInput source="FirstName" />
|
|
77
|
+
<TextInput source="Title" />
|
|
78
|
+
<DateTimeInput source="BirthDate" label="Birth Date" />
|
|
79
|
+
<TextInput source="City" />
|
|
80
|
+
<NumberInput source="Salary" label="Salary" />
|
|
81
|
+
</SimpleForm>
|
|
82
|
+
</Create>
|
|
146
83
|
);
|
|
147
84
|
|
|
148
|
-
|
|
149
|
-
|
|
85
|
+
// Employee Edit
|
|
86
|
+
export const EmployeeEdit = (props) => (
|
|
87
|
+
<Edit {...props}>
|
|
88
|
+
<SimpleForm>
|
|
89
|
+
<TextInput source="LastName" />
|
|
90
|
+
<TextInput source="FirstName" />
|
|
91
|
+
<TextInput source="Title" />
|
|
92
|
+
<DateTimeInput source="BirthDate" label="Birth Date" />
|
|
93
|
+
<TextInput source="City" />
|
|
94
|
+
<NumberInput source="Salary" label="Salary" />
|
|
95
|
+
<ReferenceInput label="Department" source="WorksForDepartmentId" reference="Department">
|
|
96
|
+
<SelectInput optionText="DepartmentName" />
|
|
97
|
+
</ReferenceInput>
|
|
98
|
+
</SimpleForm>
|
|
99
|
+
</Edit>
|
|
100
|
+
);
|
|
@@ -1,94 +1,106 @@
|
|
|
1
|
-
```jsx
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
List,
|
|
4
|
+
Datagrid,
|
|
5
|
+
TextField,
|
|
6
|
+
DateField,
|
|
7
|
+
ReferenceField,
|
|
8
|
+
Show,
|
|
9
|
+
TabbedShowLayout,
|
|
10
|
+
Tab,
|
|
11
|
+
SimpleShowLayout,
|
|
12
|
+
Filter,
|
|
13
|
+
TextInput,
|
|
14
|
+
Create,
|
|
15
|
+
SimpleForm,
|
|
16
|
+
Edit,
|
|
17
|
+
NumberField,
|
|
18
|
+
DateTimeInput,
|
|
19
|
+
ReferenceInput,
|
|
20
|
+
SelectInput,
|
|
21
|
+
NumberInput
|
|
8
22
|
} from 'react-admin';
|
|
9
23
|
|
|
24
|
+
// Filters for EmployeeAudit List
|
|
25
|
+
const EmployeeAuditFilter = props => (
|
|
26
|
+
<Filter {...props}>
|
|
27
|
+
<TextInput label="Search by Last Name" source="LastName" alwaysOn />
|
|
28
|
+
<ReferenceInput label="Employee" source="EmployeeId" reference="Employee" allowEmpty>
|
|
29
|
+
<SelectInput optionText="LastName" />
|
|
30
|
+
</ReferenceInput>
|
|
31
|
+
</Filter>
|
|
32
|
+
);
|
|
33
|
+
|
|
10
34
|
// EmployeeAudit List Component
|
|
11
|
-
export const EmployeeAuditList =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
export const EmployeeAuditList = props => (
|
|
36
|
+
<List filters={<EmployeeAuditFilter />} {...props} perPage={7} sort={{ field: 'LastName', order: 'ASC' }}>
|
|
37
|
+
<Datagrid rowClick="show">
|
|
38
|
+
<TextField source="LastName" label="Last Name" />
|
|
39
|
+
<TextField source="FirstName" label="First Name" />
|
|
40
|
+
<TextField source="Title" />
|
|
41
|
+
<NumberField source="Salary" options={{ style: 'currency', currency: 'USD' }} />
|
|
42
|
+
<DateField source="CreatedOn" label="Created On" />
|
|
43
|
+
<ReferenceField label="Employee" source="EmployeeId" reference="Employee">
|
|
44
|
+
<TextField source="LastName" />
|
|
45
|
+
</ReferenceField>
|
|
46
|
+
</Datagrid>
|
|
47
|
+
</List>
|
|
23
48
|
);
|
|
24
49
|
|
|
25
50
|
// EmployeeAudit Show Component
|
|
26
|
-
export const EmployeeAuditShow =
|
|
27
|
-
|
|
28
|
-
<TabbedShowLayout>
|
|
29
|
-
<Tab label="Summary">
|
|
51
|
+
export const EmployeeAuditShow = props => (
|
|
52
|
+
<Show {...props}>
|
|
30
53
|
<SimpleShowLayout>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<NumberField source="Salary" options={{ style: 'currency', currency: 'USD' }} />
|
|
34
|
-
<TextField source="FirstName" />
|
|
35
|
-
<TextField source="CreatedBy" />
|
|
36
|
-
<DateField source="CreatedOn" showTime />
|
|
37
|
-
<TextField source="UpdatedBy" />
|
|
38
|
-
<DateField source="UpdatedOn" showTime />
|
|
39
|
-
</SimpleShowLayout>
|
|
40
|
-
</Tab>
|
|
41
|
-
<Tab label="Employee">
|
|
42
|
-
<ReferenceManyField reference="Employee" target="EmployeeId" addLabel={false}>
|
|
43
|
-
<Datagrid rowClick="show">
|
|
44
|
-
<TextField source="LastName" />
|
|
45
|
-
<TextField source="FirstName" />
|
|
54
|
+
<TextField source="LastName" label="Last Name" />
|
|
55
|
+
<TextField source="FirstName" label="First Name" />
|
|
46
56
|
<TextField source="Title" />
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
);
|
|
57
|
+
<NumberField source="Salary" options={{ style: 'currency', currency: 'USD' }} label="Salary" />
|
|
58
|
+
<DateField source="CreatedOn" label="Created On" />
|
|
59
|
+
<DateField source="UpdatedOn" label="Updated On" />
|
|
60
|
+
<TextField source="CreatedBy" label="Created By" />
|
|
61
|
+
<TextField source="UpdatedBy" label="Updated By" />
|
|
53
62
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
<TabbedShowLayout>
|
|
64
|
+
<Tab label="Related Employee">
|
|
65
|
+
<ReferenceField label="Employee" source="EmployeeId" reference="Employee">
|
|
66
|
+
<TextField source="LastName" />
|
|
67
|
+
</ReferenceField>
|
|
68
|
+
</Tab>
|
|
69
|
+
</TabbedShowLayout>
|
|
70
|
+
</SimpleShowLayout>
|
|
71
|
+
</Show>
|
|
61
72
|
);
|
|
62
73
|
|
|
63
74
|
// EmployeeAudit Create Component
|
|
64
|
-
export const EmployeeAuditCreate =
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</
|
|
76
|
-
</Create>
|
|
75
|
+
export const EmployeeAuditCreate = props => (
|
|
76
|
+
<Create {...props}>
|
|
77
|
+
<SimpleForm>
|
|
78
|
+
<TextInput source="LastName" label="Last Name" />
|
|
79
|
+
<TextInput source="FirstName" label="First Name" />
|
|
80
|
+
<TextInput source="Title" />
|
|
81
|
+
<NumberInput source="Salary" label="Salary" />
|
|
82
|
+
<ReferenceInput label="Employee" source="EmployeeId" reference="Employee">
|
|
83
|
+
<SelectInput optionText="LastName" />
|
|
84
|
+
</ReferenceInput>
|
|
85
|
+
</SimpleForm>
|
|
86
|
+
</Create>
|
|
77
87
|
);
|
|
78
88
|
|
|
79
89
|
// EmployeeAudit Edit Component
|
|
80
|
-
export const EmployeeAuditEdit =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
export const EmployeeAuditEdit = props => (
|
|
91
|
+
<Edit {...props}>
|
|
92
|
+
<SimpleForm>
|
|
93
|
+
<TextInput source="LastName" label="Last Name" />
|
|
94
|
+
<TextInput source="FirstName" label="First Name" />
|
|
95
|
+
<TextInput source="Title" />
|
|
96
|
+
<NumberInput source="Salary" label="Salary" />
|
|
97
|
+
<DateTimeInput source="CreatedOn" label="Created On" />
|
|
98
|
+
<DateTimeInput source="UpdatedOn" label="Updated On" />
|
|
99
|
+
<TextInput source="CreatedBy" label="Created By" />
|
|
100
|
+
<TextInput source="UpdatedBy" label="Updated By" />
|
|
101
|
+
<ReferenceInput label="Employee" source="EmployeeId" reference="Employee">
|
|
102
|
+
<SelectInput optionText="LastName" />
|
|
103
|
+
</ReferenceInput>
|
|
104
|
+
</SimpleForm>
|
|
105
|
+
</Edit>
|
|
106
|
+
);
|