ApiLogicServer 15.0.12__py3-none-any.whl → 15.0.19__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 +2 -1
- api_logic_server_cli/api_logic_server_info.yaml +2 -2
- api_logic_server_cli/cli.py +44 -1
- api_logic_server_cli/create_from_model/__pycache__/api_logic_server_utils.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/api_logic_server_utils.py +14 -0
- api_logic_server_cli/genai/genai_admin_app copy.py +150 -0
- api_logic_server_cli/genai/genai_admin_app.py +155 -0
- api_logic_server_cli/genai/genai_svcs.py +49 -10
- api_logic_server_cli/logging.yml +5 -0
- api_logic_server_cli/prototypes/base/config/config.py +9 -15
- api_logic_server_cli/prototypes/base/docs/training/admin_app_1_context.prompt.md +3 -0
- api_logic_server_cli/prototypes/base/docs/training/admin_app_2_functionality.prompt.md +69 -0
- api_logic_server_cli/prototypes/base/docs/training/admin_app_3_architecture.prompt.md +29 -0
- api_logic_server_cli/prototypes/base/docs/training/admin_app_unused.md +156 -0
- api_logic_server_cli/prototypes/base/integration/mcp/mcp_client_executor.py +15 -12
- api_logic_server_cli/prototypes/basic_demo/customizations/docs/mcp_learning/mcp_discovery.json +108 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/Admin-App-Learning-Prompt.md +154 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/notes.md +7 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/README.md +17 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/README_create_react_app.md +70 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/package-lock.json +18469 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/package.json +44 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/public/favicon.ico +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/public/index.html +43 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/public/logo192.png +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/public/logo512.png +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/public/manifest.json +25 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/public/robots.txt +3 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/App.css +38 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/App.js +25 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/App.test.js +8 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/dataProvider.js +110 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/index.css +13 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/index.js +17 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/logo.svg +1 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/reportWebVitals.js +13 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/react-admin-template/src/setupTests.js +5 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/.DS_Store +0 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/README.md +19 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/README_create_react_app.md +70 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/package-lock.json +18469 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/package.json +44 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/public/favicon.ico +0 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/public/index.html +43 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/public/logo192.png +0 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/public/logo512.png +0 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/public/manifest.json +25 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/public/robots.txt +3 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/App.css +38 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/App.js +59 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/App.test.js +8 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Category.js +82 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Customer.js +116 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/CustomerDemographic.js +74 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Department.js +99 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Employee.js +149 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeAudit.js +94 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/EmployeeTerritory.js +98 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Location.js +91 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Order.js +116 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/OrderDetail.js +121 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Product.js +105 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Region.js +70 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Shipper.js +64 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Supplier.js +103 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Territory.js +84 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/Union.js +77 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/dataProvider.js +110 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/index.css +13 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/index.js +17 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/logo.svg +1 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/reportWebVitals.js +13 -0
- api_logic_server_cli/prototypes/nw/ui/react_admin/src/setupTests.js +5 -0
- {apilogicserver-15.0.12.dist-info → apilogicserver-15.0.19.dist-info}/METADATA +1 -1
- {apilogicserver-15.0.12.dist-info → apilogicserver-15.0.19.dist-info}/RECORD +80 -15
- {apilogicserver-15.0.12.dist-info → apilogicserver-15.0.19.dist-info}/WHEEL +0 -0
- {apilogicserver-15.0.12.dist-info → apilogicserver-15.0.19.dist-info}/entry_points.txt +0 -0
- {apilogicserver-15.0.12.dist-info → apilogicserver-15.0.19.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-15.0.12.dist-info → apilogicserver-15.0.19.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-admin-template",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@emotion/react": "^11.14.0",
|
|
7
|
+
"@emotion/styled": "^11.14.0",
|
|
8
|
+
"@mui/material": "^7.1.1",
|
|
9
|
+
"@testing-library/dom": "^10.4.0",
|
|
10
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
11
|
+
"@testing-library/react": "^16.3.0",
|
|
12
|
+
"@testing-library/user-event": "^13.5.0",
|
|
13
|
+
"react": "^19.1.0",
|
|
14
|
+
"react-admin": "^5.8.3",
|
|
15
|
+
"react-dom": "^19.1.0",
|
|
16
|
+
"react-router-dom": "^7.6.2",
|
|
17
|
+
"react-scripts": "5.0.1",
|
|
18
|
+
"web-vitals": "^2.1.4"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"start": "react-scripts start",
|
|
22
|
+
"build": "react-scripts build",
|
|
23
|
+
"test": "react-scripts test",
|
|
24
|
+
"eject": "react-scripts eject"
|
|
25
|
+
},
|
|
26
|
+
"eslintConfig": {
|
|
27
|
+
"extends": [
|
|
28
|
+
"react-app",
|
|
29
|
+
"react-app/jest"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"browserslist": {
|
|
33
|
+
"production": [
|
|
34
|
+
">0.2%",
|
|
35
|
+
"not dead",
|
|
36
|
+
"not op_mini all"
|
|
37
|
+
],
|
|
38
|
+
"development": [
|
|
39
|
+
"last 1 chrome version",
|
|
40
|
+
"last 1 firefox version",
|
|
41
|
+
"last 1 safari version"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<meta name="theme-color" content="#000000" />
|
|
8
|
+
<meta
|
|
9
|
+
name="description"
|
|
10
|
+
content="Web site created using create-react-app"
|
|
11
|
+
/>
|
|
12
|
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
+
<!--
|
|
14
|
+
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
+
-->
|
|
17
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
+
<!--
|
|
19
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
+
|
|
23
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
+
-->
|
|
27
|
+
<title>React App</title>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
31
|
+
<div id="root"></div>
|
|
32
|
+
<!--
|
|
33
|
+
This HTML file is a template.
|
|
34
|
+
If you open it directly in the browser, you will see an empty page.
|
|
35
|
+
|
|
36
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
37
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
38
|
+
|
|
39
|
+
To begin the development, run `npm start` or `yarn start`.
|
|
40
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
|
41
|
+
-->
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"short_name": "React App",
|
|
3
|
+
"name": "Create React App Sample",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
+
"type": "image/x-icon"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "logo192.png",
|
|
12
|
+
"type": "image/png",
|
|
13
|
+
"sizes": "192x192"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "logo512.png",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"sizes": "512x512"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"start_url": ".",
|
|
22
|
+
"display": "standalone",
|
|
23
|
+
"theme_color": "#000000",
|
|
24
|
+
"background_color": "#ffffff"
|
|
25
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.App {
|
|
2
|
+
text-align: center;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.App-logo {
|
|
6
|
+
height: 40vmin;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11
|
+
.App-logo {
|
|
12
|
+
animation: App-logo-spin infinite 20s linear;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.App-header {
|
|
17
|
+
background-color: #282c34;
|
|
18
|
+
min-height: 100vh;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
font-size: calc(10px + 2vmin);
|
|
24
|
+
color: white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.App-link {
|
|
28
|
+
color: #61dafb;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes App-logo-spin {
|
|
32
|
+
from {
|
|
33
|
+
transform: rotate(0deg);
|
|
34
|
+
}
|
|
35
|
+
to {
|
|
36
|
+
transform: rotate(360deg);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Admin, Resource } from 'react-admin';
|
|
3
|
+
import { createTheme } from '@mui/material/styles';
|
|
4
|
+
|
|
5
|
+
// Import DataProvider
|
|
6
|
+
import { dataProvider } from './dataProvider';
|
|
7
|
+
|
|
8
|
+
// Import resource components
|
|
9
|
+
import { CustomerList, CustomerShow, CustomerCreate, CustomerEdit } from './Customer';
|
|
10
|
+
import { CategoryList, CategoryShow, CategoryCreate, CategoryEdit } from './Category';
|
|
11
|
+
import { OrderList, OrderShow, OrderCreate, OrderEdit } from './Order';
|
|
12
|
+
import { ProductList, ProductShow, ProductCreate, ProductEdit } from './Product';
|
|
13
|
+
import { EmployeeList, EmployeeShow, EmployeeCreate, EmployeeEdit } from './Employee';
|
|
14
|
+
import { SupplierList, SupplierShow, SupplierCreate, SupplierEdit } from './Supplier';
|
|
15
|
+
import { ShipperList, ShipperShow, ShipperCreate, ShipperEdit } from './Shipper';
|
|
16
|
+
import { RegionList, RegionShow, RegionCreate, RegionEdit } from './Region';
|
|
17
|
+
import { TerritoryList, TerritoryShow, TerritoryCreate, TerritoryEdit } from './Territory';
|
|
18
|
+
import { CustomerDemographicList, CustomerDemographicShow, CustomerDemographicCreate, CustomerDemographicEdit } from './CustomerDemographic';
|
|
19
|
+
import { EmployeeAuditList, EmployeeAuditShow, EmployeeAuditCreate, EmployeeAuditEdit } from './EmployeeAudit';
|
|
20
|
+
import { EmployeeTerritoryList, EmployeeTerritoryShow, EmployeeTerritoryCreate, EmployeeTerritoryEdit } from './EmployeeTerritory';
|
|
21
|
+
import { DepartmentList, DepartmentShow, DepartmentCreate, DepartmentEdit } from './Department';
|
|
22
|
+
import { UnionList, UnionShow, UnionCreate, UnionEdit } from './Union';
|
|
23
|
+
import { LocationList, LocationShow, LocationCreate, LocationEdit } from './Location';
|
|
24
|
+
import { OrderDetailList, OrderDetailShow, OrderDetailCreate, OrderDetailEdit } from './OrderDetail';
|
|
25
|
+
|
|
26
|
+
// Define Material-UI Theme
|
|
27
|
+
const theme = createTheme({
|
|
28
|
+
palette: {
|
|
29
|
+
primary: { main: '#1976d2' }, // Material-UI default blue
|
|
30
|
+
secondary: { main: '#1565c0' }, // A darker blue, or choose another color
|
|
31
|
+
},
|
|
32
|
+
typography: { fontSize: 14 },
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const App = () => {
|
|
36
|
+
return (
|
|
37
|
+
<Admin dataProvider={dataProvider} theme={theme}>
|
|
38
|
+
{/* Register each resource with their components */}
|
|
39
|
+
<Resource name="Customer" list={CustomerList} show={CustomerShow} edit={CustomerEdit} create={CustomerCreate} />
|
|
40
|
+
<Resource name="Category" list={CategoryList} show={CategoryShow} edit={CategoryEdit} create={CategoryCreate} />
|
|
41
|
+
<Resource name="Order" list={OrderList} show={OrderShow} edit={OrderEdit} create={OrderCreate} />
|
|
42
|
+
<Resource name="Product" list={ProductList} show={ProductShow} edit={ProductEdit} create={ProductCreate} />
|
|
43
|
+
<Resource name="Employee" list={EmployeeList} show={EmployeeShow} edit={EmployeeEdit} create={EmployeeCreate} />
|
|
44
|
+
<Resource name="Supplier" list={SupplierList} show={SupplierShow} edit={SupplierEdit} create={SupplierCreate} />
|
|
45
|
+
<Resource name="Shipper" list={ShipperList} show={ShipperShow} edit={ShipperEdit} create={ShipperCreate} />
|
|
46
|
+
<Resource name="Region" list={RegionList} show={RegionShow} edit={RegionEdit} create={RegionCreate} />
|
|
47
|
+
<Resource name="Territory" list={TerritoryList} show={TerritoryShow} edit={TerritoryEdit} create={TerritoryCreate} />
|
|
48
|
+
<Resource name="CustomerDemographic" list={CustomerDemographicList} show={CustomerDemographicShow} edit={CustomerDemographicEdit} create={CustomerDemographicCreate} />
|
|
49
|
+
<Resource name="EmployeeAudit" list={EmployeeAuditList} show={EmployeeAuditShow} edit={EmployeeAuditEdit} create={EmployeeAuditCreate} />
|
|
50
|
+
<Resource name="EmployeeTerritory" list={EmployeeTerritoryList} show={EmployeeTerritoryShow} edit={EmployeeTerritoryEdit} create={EmployeeTerritoryCreate} />
|
|
51
|
+
<Resource name="Department" list={DepartmentList} show={DepartmentShow} edit={DepartmentEdit} create={DepartmentCreate} />
|
|
52
|
+
<Resource name="Union" list={UnionList} show={UnionShow} edit={UnionEdit} create={UnionCreate} />
|
|
53
|
+
<Resource name="Location" list={LocationList} show={LocationShow} edit={LocationEdit} create={LocationCreate} />
|
|
54
|
+
<Resource name="OrderDetail" list={OrderDetailList} show={OrderDetailShow} edit={OrderDetailEdit} create={OrderDetailCreate} />
|
|
55
|
+
</Admin>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default App;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
```jsx
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {
|
|
4
|
+
List, Datagrid, TextField, ReferenceField,
|
|
5
|
+
Show, TabbedShowLayout, Tab, SimpleShowLayout,
|
|
6
|
+
TextInput, ReferenceManyField, Pagination,
|
|
7
|
+
Filter, Create, Edit, SimpleForm, SelectInput, ReferenceInput
|
|
8
|
+
} from 'react-admin';
|
|
9
|
+
|
|
10
|
+
// Define the filters for the Category List
|
|
11
|
+
const CategoryFilter = (props) => (
|
|
12
|
+
<Filter {...props}>
|
|
13
|
+
<TextInput label="Search" source="q" alwaysOn />
|
|
14
|
+
<TextInput label="Category Name" source="CategoryName" />
|
|
15
|
+
<TextInput label="Description" source="Description" />
|
|
16
|
+
</Filter>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
// Pagination configuration
|
|
20
|
+
const CategoryPagination = props => <Pagination rowsPerPageOptions={[7]} {...props} />;
|
|
21
|
+
|
|
22
|
+
// List view for Categories
|
|
23
|
+
export const CategoryList = (props) => (
|
|
24
|
+
<List {...props} filters={<CategoryFilter />} pagination={<CategoryPagination />}>
|
|
25
|
+
<Datagrid rowClick="show">
|
|
26
|
+
<TextField source="CategoryName" label="Category Name" />
|
|
27
|
+
<TextField source="Description" label="Description" />
|
|
28
|
+
<TextField source="Client_id" label="Client" />
|
|
29
|
+
</Datagrid>
|
|
30
|
+
</List>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
// Show view for a single Category
|
|
34
|
+
export const CategoryShow = (props) => (
|
|
35
|
+
<Show {...props}>
|
|
36
|
+
<SimpleShowLayout>
|
|
37
|
+
<TextField source="CategoryName" label="Category Name" />
|
|
38
|
+
<TextField source="Description" label="Description" />
|
|
39
|
+
<TextField source="Client_id" label="Client" />
|
|
40
|
+
</SimpleShowLayout>
|
|
41
|
+
<TabbedShowLayout>
|
|
42
|
+
<Tab label="Related Resources">
|
|
43
|
+
<ReferenceManyField
|
|
44
|
+
label="Products"
|
|
45
|
+
reference="Product"
|
|
46
|
+
target="CategoryId"
|
|
47
|
+
>
|
|
48
|
+
<Datagrid rowClick="show">
|
|
49
|
+
<TextField source="ProductName" label="Product Name" />
|
|
50
|
+
</Datagrid>
|
|
51
|
+
</ReferenceManyField>
|
|
52
|
+
</Tab>
|
|
53
|
+
</TabbedShowLayout>
|
|
54
|
+
</Show>
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
// Create view for a Category
|
|
58
|
+
export const CategoryCreate = (props) => (
|
|
59
|
+
<Create {...props}>
|
|
60
|
+
<SimpleForm>
|
|
61
|
+
<TextInput source="CategoryName" label="Category Name" />
|
|
62
|
+
<TextInput source="Description" label="Description" />
|
|
63
|
+
<ReferenceInput label="Client" source="Client_id" reference="Client">
|
|
64
|
+
<SelectInput optionText="name" />
|
|
65
|
+
</ReferenceInput>
|
|
66
|
+
</SimpleForm>
|
|
67
|
+
</Create>
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
// Edit view for a Category
|
|
71
|
+
export const CategoryEdit = (props) => (
|
|
72
|
+
<Edit {...props}>
|
|
73
|
+
<SimpleForm>
|
|
74
|
+
<TextInput source="CategoryName" label="Category Name" />
|
|
75
|
+
<TextInput source="Description" label="Description" />
|
|
76
|
+
<ReferenceInput label="Client" source="Client_id" reference="Client">
|
|
77
|
+
<SelectInput optionText="name" />
|
|
78
|
+
</ReferenceInput>
|
|
79
|
+
</SimpleForm>
|
|
80
|
+
</Edit>
|
|
81
|
+
);
|
|
82
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
List,
|
|
4
|
+
Datagrid,
|
|
5
|
+
TextField,
|
|
6
|
+
NumberField,
|
|
7
|
+
Show,
|
|
8
|
+
SimpleShowLayout,
|
|
9
|
+
TabbedShowLayout,
|
|
10
|
+
Tab,
|
|
11
|
+
ReferenceManyField,
|
|
12
|
+
TextInput,
|
|
13
|
+
Edit,
|
|
14
|
+
SimpleForm,
|
|
15
|
+
Create,
|
|
16
|
+
NumberInput,
|
|
17
|
+
Pagination,
|
|
18
|
+
Filter,
|
|
19
|
+
ReferenceField,
|
|
20
|
+
FunctionField
|
|
21
|
+
} from 'react-admin';
|
|
22
|
+
import { Grid, Box } from '@mui/material';
|
|
23
|
+
|
|
24
|
+
// Filters for the Customer list
|
|
25
|
+
const CustomerFilter = (props) => (
|
|
26
|
+
<Filter {...props}>
|
|
27
|
+
<TextInput label="Search by Company" source="CompanyName" alwaysOn />
|
|
28
|
+
<TextInput label="Search by Contact" source="ContactName" />
|
|
29
|
+
</Filter>
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
// Customer List
|
|
33
|
+
export const CustomerList = (props) => (
|
|
34
|
+
<List filters={<CustomerFilter />} pagination={<Pagination />} {...props}>
|
|
35
|
+
<Datagrid rowClick="show">
|
|
36
|
+
<TextField source="CompanyName" label="Company Name" />
|
|
37
|
+
<TextField source="ContactName" label="Contact Name" />
|
|
38
|
+
<NumberField source="Balance" label="Balance" />
|
|
39
|
+
<NumberField source="CreditLimit" label="Credit Limit" />
|
|
40
|
+
<NumberField source="OrderCount" label="Order Count" />
|
|
41
|
+
<NumberField source="UnpaidOrderCount" label="Unpaid Orders" />
|
|
42
|
+
<TextField source="Phone" label="Phone" />
|
|
43
|
+
<NumberField source="Id" label="ID" />
|
|
44
|
+
</Datagrid>
|
|
45
|
+
</List>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
// Customer Show
|
|
49
|
+
export const CustomerShow = (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
|
+
|
|
63
|
+
<TabbedShowLayout>
|
|
64
|
+
<Tab label="Placed Order List">
|
|
65
|
+
<ReferenceManyField
|
|
66
|
+
reference="Order"
|
|
67
|
+
target="CustomerId"
|
|
68
|
+
label="Placed Orders"
|
|
69
|
+
>
|
|
70
|
+
<Datagrid rowClick="show">
|
|
71
|
+
<TextField source="Id" label="Order ID" />
|
|
72
|
+
<TextField source="OrderDate" label="Order Date" />
|
|
73
|
+
<TextField source="AmountTotal" label="Total Amount" />
|
|
74
|
+
</Datagrid>
|
|
75
|
+
</ReferenceManyField>
|
|
76
|
+
</Tab>
|
|
77
|
+
</TabbedShowLayout>
|
|
78
|
+
</SimpleShowLayout>
|
|
79
|
+
</Show>
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
// Customer Create
|
|
83
|
+
export const CustomerCreate = (props) => (
|
|
84
|
+
<Create {...props}>
|
|
85
|
+
<SimpleForm>
|
|
86
|
+
<TextInput source="CompanyName" label="Company Name" />
|
|
87
|
+
<TextInput source="ContactName" label="Contact Name" />
|
|
88
|
+
<TextInput source="ContactTitle" label="Contact Title" />
|
|
89
|
+
<TextInput source="Address" label="Address" />
|
|
90
|
+
<TextInput source="City" label="City" />
|
|
91
|
+
<TextInput source="Region" label="Region" />
|
|
92
|
+
<TextInput source="PostalCode" label="Postal Code" />
|
|
93
|
+
<TextInput source="Country" label="Country" />
|
|
94
|
+
<TextInput source="Phone" label="Phone" />
|
|
95
|
+
<TextInput source="Fax" label="Fax" />
|
|
96
|
+
</SimpleForm>
|
|
97
|
+
</Create>
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
// Customer Edit
|
|
101
|
+
export const CustomerEdit = (props) => (
|
|
102
|
+
<Edit {...props}>
|
|
103
|
+
<SimpleForm>
|
|
104
|
+
<TextInput source="CompanyName" label="Company Name" />
|
|
105
|
+
<TextInput source="ContactName" label="Contact Name" />
|
|
106
|
+
<TextInput source="ContactTitle" label="Contact Title" />
|
|
107
|
+
<TextInput source="Address" label="Address" />
|
|
108
|
+
<TextInput source="City" label="City" />
|
|
109
|
+
<TextInput source="Region" label="Region" />
|
|
110
|
+
<TextInput source="PostalCode" label="Postal Code" />
|
|
111
|
+
<TextInput source="Country" label="Country" />
|
|
112
|
+
<TextInput source="Phone" label="Phone" />
|
|
113
|
+
<TextInput source="Fax" label="Fax" />
|
|
114
|
+
</SimpleForm>
|
|
115
|
+
</Edit>
|
|
116
|
+
);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
List,
|
|
4
|
+
Datagrid,
|
|
5
|
+
TextField,
|
|
6
|
+
Show,
|
|
7
|
+
SimpleShowLayout,
|
|
8
|
+
TabbedShowLayout,
|
|
9
|
+
Tab,
|
|
10
|
+
TextInput,
|
|
11
|
+
Create,
|
|
12
|
+
SimpleForm,
|
|
13
|
+
Edit,
|
|
14
|
+
NumberField,
|
|
15
|
+
Filter,
|
|
16
|
+
Pagination
|
|
17
|
+
} from 'react-admin';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Filters for searching CustomerDemographic entities by Id.
|
|
21
|
+
*/
|
|
22
|
+
const CustomerDemographicFilter = (props) => (
|
|
23
|
+
<Filter {...props}>
|
|
24
|
+
<TextInput label="Search by Id" source="Id" alwaysOn />
|
|
25
|
+
</Filter>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* List view for CustomerDemographic.
|
|
30
|
+
*/
|
|
31
|
+
export const CustomerDemographicList = props => (
|
|
32
|
+
<List filters={<CustomerDemographicFilter />} {...props} perPage={7} pagination={<Pagination />}>
|
|
33
|
+
<Datagrid rowClick="show" isRowSelectable={() => false}>
|
|
34
|
+
<TextField label="Id" source="Id" />
|
|
35
|
+
<TextField source="CustomerDesc" />
|
|
36
|
+
</Datagrid>
|
|
37
|
+
</List>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Show view for CustomerDemographic.
|
|
42
|
+
*/
|
|
43
|
+
export const CustomerDemographicShow = props => (
|
|
44
|
+
<Show {...props}>
|
|
45
|
+
<SimpleShowLayout>
|
|
46
|
+
<NumberField source="Id" />
|
|
47
|
+
<TextField source="CustomerDesc" />
|
|
48
|
+
</SimpleShowLayout>
|
|
49
|
+
</Show>
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Form for creating a new CustomerDemographic.
|
|
54
|
+
*/
|
|
55
|
+
export const CustomerDemographicCreate = props => (
|
|
56
|
+
<Create {...props}>
|
|
57
|
+
<SimpleForm>
|
|
58
|
+
<TextInput label="Id (auto-generated)" source="Id" disabled />
|
|
59
|
+
<TextInput source="CustomerDesc" />
|
|
60
|
+
</SimpleForm>
|
|
61
|
+
</Create>
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Form for editing an existing CustomerDemographic.
|
|
66
|
+
*/
|
|
67
|
+
export const CustomerDemographicEdit = props => (
|
|
68
|
+
<Edit {...props}>
|
|
69
|
+
<SimpleForm>
|
|
70
|
+
<TextInput label="Id" source="Id" disabled />
|
|
71
|
+
<TextInput source="CustomerDesc" />
|
|
72
|
+
</SimpleForm>
|
|
73
|
+
</Edit>
|
|
74
|
+
);
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
List,
|
|
4
|
+
Datagrid,
|
|
5
|
+
TextField,
|
|
6
|
+
NumberField,
|
|
7
|
+
ReferenceField,
|
|
8
|
+
Show,
|
|
9
|
+
TabbedShowLayout,
|
|
10
|
+
Tab,
|
|
11
|
+
SimpleShowLayout,
|
|
12
|
+
TextInput,
|
|
13
|
+
NumberInput,
|
|
14
|
+
ReferenceManyField,
|
|
15
|
+
Create,
|
|
16
|
+
SimpleForm,
|
|
17
|
+
Edit,
|
|
18
|
+
Filter,
|
|
19
|
+
} from 'react-admin';
|
|
20
|
+
|
|
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
|
+
export const DepartmentList = (props) => (
|
|
33
|
+
<List filters={<DepartmentFilter />} {...props}>
|
|
34
|
+
<Datagrid rowClick="show">
|
|
35
|
+
<TextField source="DepartmentName" label="Department Name" />
|
|
36
|
+
<NumberField source="SecurityLevel" label="Security Level" />
|
|
37
|
+
</Datagrid>
|
|
38
|
+
</List>
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
// Show Component
|
|
42
|
+
export const DepartmentShow = (props) => (
|
|
43
|
+
<Show {...props}>
|
|
44
|
+
<SimpleShowLayout>
|
|
45
|
+
<TextField source="DepartmentName" label="Department Name" />
|
|
46
|
+
<NumberField source="SecurityLevel" label="Security Level" />
|
|
47
|
+
<TextField source="Id" label="ID" />
|
|
48
|
+
</SimpleShowLayout>
|
|
49
|
+
<TabbedShowLayout>
|
|
50
|
+
<Tab label="On Loan Employees">
|
|
51
|
+
<ReferenceManyField
|
|
52
|
+
reference="Employee"
|
|
53
|
+
target="OnLoanDepartmentId"
|
|
54
|
+
label="On Loan Employees"
|
|
55
|
+
>
|
|
56
|
+
<Datagrid>
|
|
57
|
+
<TextField source="LastName" label="Employee Last Name" />
|
|
58
|
+
<TextField source="FirstName" label="Employee First Name" />
|
|
59
|
+
<TextField source="Title" label="Title" />
|
|
60
|
+
</Datagrid>
|
|
61
|
+
</ReferenceManyField>
|
|
62
|
+
</Tab>
|
|
63
|
+
<Tab label="Works For Employees">
|
|
64
|
+
<ReferenceManyField
|
|
65
|
+
reference="Employee"
|
|
66
|
+
target="WorksForDepartmentId"
|
|
67
|
+
label="Works For Employees"
|
|
68
|
+
>
|
|
69
|
+
<Datagrid>
|
|
70
|
+
<TextField source="LastName" label="Employee Last Name" />
|
|
71
|
+
<TextField source="FirstName" label="Employee First Name" />
|
|
72
|
+
<TextField source="Title" label="Title" />
|
|
73
|
+
</Datagrid>
|
|
74
|
+
</ReferenceManyField>
|
|
75
|
+
</Tab>
|
|
76
|
+
</TabbedShowLayout>
|
|
77
|
+
</Show>
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
// Create Component
|
|
81
|
+
export const DepartmentCreate = (props) => (
|
|
82
|
+
<Create {...props}>
|
|
83
|
+
<SimpleForm>
|
|
84
|
+
<TextInput source="DepartmentName" label="Department Name" />
|
|
85
|
+
<NumberInput source="SecurityLevel" label="Security Level" />
|
|
86
|
+
</SimpleForm>
|
|
87
|
+
</Create>
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
// Edit Component
|
|
91
|
+
export const DepartmentEdit = (props) => (
|
|
92
|
+
<Edit {...props}>
|
|
93
|
+
<SimpleForm>
|
|
94
|
+
<TextInput source="DepartmentName" label="Department Name" />
|
|
95
|
+
<NumberInput source="SecurityLevel" label="Security Level" />
|
|
96
|
+
<NumberInput source="Id" label="ID" disabled />
|
|
97
|
+
</SimpleForm>
|
|
98
|
+
</Edit>
|
|
99
|
+
);
|