ApiLogicServer 15.0.19__py3-none-any.whl → 15.0.20__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- api_logic_server_cli/api_logic_server.py +4 -4
- api_logic_server_cli/api_logic_server_info.yaml +2 -2
- api_logic_server_cli/genai/genai_admin_app.py +12 -5
- api_logic_server_cli/prototypes/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/Admin-App-Learning-Prompt.md +33 -17
- api_logic_server_cli/prototypes/nw/.DS_Store +0 -0
- api_logic_server_cli/prototypes/nw/ui/.DS_Store +0 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/.DS_Store +0 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/App.js +30 -31
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Category.js +62 -62
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Customer.js +143 -48
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/CustomerDemographic.js +20 -37
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Department.js +38 -39
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Employee.js +85 -134
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeAudit.js +89 -77
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeTerritory.js +59 -59
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Location.js +45 -49
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Order.js +42 -60
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/OrderDetail.js +97 -106
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Product.js +60 -62
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Region.js +36 -41
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/SampleDBVersion.js +73 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Shipper.js +57 -54
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Supplier.js +71 -87
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Territory.js +47 -41
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Union.js +18 -34
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/METADATA +1 -1
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/RECORD +32 -29
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/WHEEL +0 -0
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/entry_points.txt +0 -0
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-15.0.19.dist-info → apilogicserver-15.0.20.dist-info}/top_level.txt +0 -0
|
@@ -1,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
|
+
);
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
```jsx
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import {
|
|
4
3
|
List,
|
|
5
|
-
Datagrid,
|
|
6
|
-
TextField,
|
|
7
|
-
ReferenceField,
|
|
8
4
|
Show,
|
|
9
5
|
SimpleShowLayout,
|
|
10
6
|
TabbedShowLayout,
|
|
11
7
|
Tab,
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
Datagrid,
|
|
9
|
+
TextField,
|
|
10
|
+
ReferenceField,
|
|
11
|
+
NumberField,
|
|
12
|
+
ReferenceManyField,
|
|
13
|
+
TextInput,
|
|
14
14
|
ReferenceInput,
|
|
15
15
|
SelectInput,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Create,
|
|
17
|
+
SimpleForm,
|
|
18
|
+
Edit,
|
|
19
|
+
Filter
|
|
18
20
|
} from 'react-admin';
|
|
19
|
-
import { Card, CardContent } from '@mui/material';
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const EmployeeTerritoryFilter = (props) => (
|
|
23
|
+
<Filter {...props}>
|
|
24
|
+
<TextInput label="Employee" source="EmployeeId" alwaysOn />
|
|
25
|
+
<TextInput label="Territory" source="TerritoryId" alwaysOn />
|
|
26
|
+
</Filter>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const EmployeeTerritoryList = props => (
|
|
30
|
+
<List filters={<EmployeeTerritoryFilter />} {...props} perPage={25} sort={{ field: 'Id', order: 'ASC' }}>
|
|
24
31
|
<Datagrid rowClick="show">
|
|
25
32
|
<TextField source="Id" label="ID" />
|
|
26
|
-
<ReferenceField source="
|
|
27
|
-
<TextField source="TerritoryDescription" />
|
|
28
|
-
</ReferenceField>
|
|
29
|
-
<ReferenceField source="EmployeeId" reference="Employee" label="Employee Last Name">
|
|
33
|
+
<ReferenceField source="EmployeeId" reference="Employee" label="Employee">
|
|
30
34
|
<TextField source="LastName" />
|
|
31
35
|
</ReferenceField>
|
|
36
|
+
<ReferenceField source="TerritoryId" reference="Territory" label="Territory">
|
|
37
|
+
<TextField source="TerritoryDescription" />
|
|
38
|
+
</ReferenceField>
|
|
32
39
|
</Datagrid>
|
|
33
40
|
</List>
|
|
34
41
|
);
|
|
35
42
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<Show {...props} title="Employee Territory">
|
|
43
|
+
export const EmployeeTerritoryShow = props => (
|
|
44
|
+
<Show {...props}>
|
|
39
45
|
<SimpleShowLayout>
|
|
40
46
|
<TextField source="Id" label="ID" />
|
|
41
|
-
<ReferenceField source="
|
|
42
|
-
<TextField source="TerritoryDescription" />
|
|
43
|
-
</ReferenceField>
|
|
44
|
-
<ReferenceField source="EmployeeId" reference="Employee" label="Employee Last Name">
|
|
47
|
+
<ReferenceField source="EmployeeId" reference="Employee" label="Employee">
|
|
45
48
|
<TextField source="LastName" />
|
|
46
49
|
</ReferenceField>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
</
|
|
62
|
-
</
|
|
63
|
-
</
|
|
64
|
-
</
|
|
50
|
+
<ReferenceField source="TerritoryId" reference="Territory" label="Territory">
|
|
51
|
+
<TextField source="TerritoryDescription" />
|
|
52
|
+
</ReferenceField>
|
|
53
|
+
<TabbedShowLayout>
|
|
54
|
+
<Tab label="Details">
|
|
55
|
+
<ReferenceManyField label="Employee" reference="Employee" target="EmployeeId">
|
|
56
|
+
<Datagrid>
|
|
57
|
+
<TextField source="FirstName" label="First Name"/>
|
|
58
|
+
<TextField source="LastName" label="Last Name"/>
|
|
59
|
+
</Datagrid>
|
|
60
|
+
</ReferenceManyField>
|
|
61
|
+
<ReferenceManyField label="Territory" reference="Territory" target="TerritoryId">
|
|
62
|
+
<Datagrid>
|
|
63
|
+
<TextField source="TerritoryDescription" label="Description"/>
|
|
64
|
+
</Datagrid>
|
|
65
|
+
</ReferenceManyField>
|
|
66
|
+
</Tab>
|
|
67
|
+
</TabbedShowLayout>
|
|
65
68
|
</SimpleShowLayout>
|
|
66
69
|
</Show>
|
|
67
70
|
);
|
|
68
71
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<Create {...props} title="Create a new Employee Territory">
|
|
72
|
+
export const EmployeeTerritoryCreate = props => (
|
|
73
|
+
<Create {...props}>
|
|
72
74
|
<SimpleForm>
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
</ReferenceInput>
|
|
76
|
-
<ReferenceInput source="EmployeeId" reference="Employee" label="Employee Last Name">
|
|
75
|
+
<TextInput source="Id" />
|
|
76
|
+
<ReferenceInput label="Employee" source="EmployeeId" reference="Employee">
|
|
77
77
|
<SelectInput optionText="LastName" />
|
|
78
78
|
</ReferenceInput>
|
|
79
|
-
<
|
|
79
|
+
<ReferenceInput label="Territory" source="TerritoryId" reference="Territory">
|
|
80
|
+
<SelectInput optionText="TerritoryDescription" />
|
|
81
|
+
</ReferenceInput>
|
|
80
82
|
</SimpleForm>
|
|
81
83
|
</Create>
|
|
82
84
|
);
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<Edit {...props} title="Edit Employee Territory">
|
|
86
|
+
export const EmployeeTerritoryEdit = props => (
|
|
87
|
+
<Edit {...props}>
|
|
87
88
|
<SimpleForm>
|
|
88
|
-
<TextInput source="Id"
|
|
89
|
-
<ReferenceInput
|
|
90
|
-
<SelectInput optionText="TerritoryDescription" />
|
|
91
|
-
</ReferenceInput>
|
|
92
|
-
<ReferenceInput source="EmployeeId" reference="Employee" label="Employee Last Name">
|
|
89
|
+
<TextInput source="Id" />
|
|
90
|
+
<ReferenceInput label="Employee" source="EmployeeId" reference="Employee">
|
|
93
91
|
<SelectInput optionText="LastName" />
|
|
94
92
|
</ReferenceInput>
|
|
93
|
+
<ReferenceInput label="Territory" source="TerritoryId" reference="Territory">
|
|
94
|
+
<SelectInput optionText="TerritoryDescription" />
|
|
95
|
+
</ReferenceInput>
|
|
95
96
|
</SimpleForm>
|
|
96
97
|
</Edit>
|
|
97
|
-
);
|
|
98
|
-
```
|
|
98
|
+
);
|