ApiLogicServer 15.0.25__py3-none-any.whl → 15.0.27__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 -2
- api_logic_server_cli/api_logic_server_info.yaml +3 -3
- api_logic_server_cli/genai/genai_admin_app.py +29 -19
- api_logic_server_cli/prototypes/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/admin/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/README.md +17 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/README_create_react_app.md +70 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/package-lock.json +18469 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/package.json +47 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/favicon.ico +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/index.html +43 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/logo192.png +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/logo512.png +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/manifest.json +25 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/public/robots.txt +3 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/App.css +38 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/App.js +61 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/App.test.js +8 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Config-reference.js +527 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Config.js +527 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Customer-reference.js +216 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Customer.js +230 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Item.js +170 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Order.js +207 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/Product.js +140 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/SysEmail.js +157 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/SysMcp.js +110 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/app_loader.js +24 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/index.css +13 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/index.js +17 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/logo.svg +1 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/.eslintrc +5 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/.yarnrc.yml +4 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/default-settings.js +25 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/default-settings.ts +25 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/errors.js +116 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/errors.ts +116 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/index.test.tsx +7 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/index.tsx +11 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/ra-jsonapi-client.js +577 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/ra-jsonapi-client.ts +577 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/resourceLookup.js +124 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/resourceLookup.ts +124 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/rav4-jsonapi-client/styles.module.css +9 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/reportWebVitals.js +13 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/basic_demo_app/src/setupTests.js +5 -0
- api_logic_server_cli/prototypes/manager/system/genai/app_templates/app_learning/Admin-App-Resource-Learning-Prompt.md +37 -3
- {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/METADATA +1 -1
- {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/RECORD +57 -11
- {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/WHEEL +0 -0
- {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/entry_points.txt +0 -0
- {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-15.0.25.dist-info → apilogicserver-15.0.27.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
// begin MANDATORY imports (always generated EXACTLY)
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { List, FunctionField, Datagrid, TextField, DateField, NumberField } from 'react-admin';
|
|
4
|
+
import { ReferenceField, ReferenceManyField } from 'react-admin';
|
|
5
|
+
import { TabbedShowLayout, Tab, SimpleShowLayout, TextInput, NumberInput, DateTimeInput } from 'react-admin';
|
|
6
|
+
import { ReferenceInput, SelectInput, SimpleForm, Show, Edit, Create } from 'react-admin';
|
|
7
|
+
import { Filter, Pagination, BooleanField, BooleanInput, Labeled } from 'react-admin';
|
|
8
|
+
import { EditButton, DeleteButton, CreateButton } from 'react-admin';
|
|
9
|
+
import { Grid, Typography, Box, Divider, Button } from '@mui/material';
|
|
10
|
+
import { useRecordContext, useRedirect, Link, required } from 'react-admin';
|
|
11
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
12
|
+
// end mandatory imports
|
|
13
|
+
|
|
14
|
+
const OrderFilter = (props) => (
|
|
15
|
+
<Filter {...props}>
|
|
16
|
+
<TextInput label="Search by ID" source="id" alwaysOn />
|
|
17
|
+
<TextInput label="Customer ID" source="customer_id" />
|
|
18
|
+
</Filter>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
// Order List
|
|
22
|
+
export const OrderList = (props) => {
|
|
23
|
+
return (
|
|
24
|
+
<List filters={<OrderFilter />} {...props} sort={{ field: 'id', order: 'ASC' }} pagination={<Pagination rowsPerPageOptions={[5, 10, 25]} showFirstLastButtons />}>
|
|
25
|
+
<Datagrid rowClick="show">
|
|
26
|
+
<TextField source="id" label="Order ID" />
|
|
27
|
+
<TextField source="notes" label="Notes" />
|
|
28
|
+
<ReferenceField label="Customer" source="customer_id" reference="Customer">
|
|
29
|
+
<TextField source="name" />
|
|
30
|
+
</ReferenceField>
|
|
31
|
+
<DateField source="CreatedOn" label="Created On" />
|
|
32
|
+
<NumberField source="amount_total" label="Amount Total" options={{ style: 'currency', currency: 'USD' }} />
|
|
33
|
+
<DateField source="date_shipped" label="Date Shipped" />
|
|
34
|
+
<EditButton />
|
|
35
|
+
<DeleteButton />
|
|
36
|
+
</Datagrid>
|
|
37
|
+
</List>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Order Show
|
|
42
|
+
export const OrderShow = (props) => {
|
|
43
|
+
return (
|
|
44
|
+
<Show {...props}>
|
|
45
|
+
<SimpleShowLayout>
|
|
46
|
+
<Box sx={{ mb: 3 }}>
|
|
47
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
48
|
+
Order Details
|
|
49
|
+
</Typography>
|
|
50
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
51
|
+
<Grid item xs={12} sm={6} md={3}>
|
|
52
|
+
<Box sx={{ p: 1 }}>
|
|
53
|
+
<Labeled label="Order ID">
|
|
54
|
+
<TextField source="id" />
|
|
55
|
+
</Labeled>
|
|
56
|
+
</Box>
|
|
57
|
+
</Grid>
|
|
58
|
+
<Grid item xs={12} sm={6} md={3}>
|
|
59
|
+
<Box sx={{ p: 1 }}>
|
|
60
|
+
<Labeled label="Customer">
|
|
61
|
+
<ReferenceField source="customer_id" reference="Customer">
|
|
62
|
+
<TextField source="name" />
|
|
63
|
+
</ReferenceField>
|
|
64
|
+
</Labeled>
|
|
65
|
+
</Box>
|
|
66
|
+
</Grid>
|
|
67
|
+
<Grid item xs={12} sm={6} md={3}>
|
|
68
|
+
<Box sx={{ p: 1 }}>
|
|
69
|
+
<Labeled label="Created On">
|
|
70
|
+
<DateField source="CreatedOn" />
|
|
71
|
+
</Labeled>
|
|
72
|
+
</Box>
|
|
73
|
+
</Grid>
|
|
74
|
+
<Grid item xs={12} sm={6} md={3}>
|
|
75
|
+
<Box sx={{ p: 1 }}>
|
|
76
|
+
<Labeled label="Amount Total">
|
|
77
|
+
<NumberField source="amount_total" options={{ style: 'currency', currency: 'USD' }} />
|
|
78
|
+
</Labeled>
|
|
79
|
+
</Box>
|
|
80
|
+
</Grid>
|
|
81
|
+
</Grid>
|
|
82
|
+
<Divider sx={{ my: 2 }} />
|
|
83
|
+
</Box>
|
|
84
|
+
</SimpleShowLayout>
|
|
85
|
+
<TabbedShowLayout>
|
|
86
|
+
<Tab label="Items">
|
|
87
|
+
<ReferenceManyField reference="Item" target="order_id" addLabel={false} pagination={<Pagination />}>
|
|
88
|
+
<Datagrid rowClick="show">
|
|
89
|
+
<TextField source="id" label="Item ID" />
|
|
90
|
+
<ReferenceField label="Product" source="product_id" reference="Product">
|
|
91
|
+
<TextField source="name" />
|
|
92
|
+
</ReferenceField>
|
|
93
|
+
<NumberField source="quantity" label="Quantity" />
|
|
94
|
+
<NumberField source="amount" label="Amount" options={{ style: 'currency', currency: 'USD' }} />
|
|
95
|
+
<EditButton />
|
|
96
|
+
<DeleteButton />
|
|
97
|
+
</Datagrid>
|
|
98
|
+
</ReferenceManyField>
|
|
99
|
+
<AddItemButton />
|
|
100
|
+
</Tab>
|
|
101
|
+
<Tab label="General">
|
|
102
|
+
<SimpleShowLayout>
|
|
103
|
+
<TextField source="notes" label="Notes" />
|
|
104
|
+
<DateField source="date_shipped" label="Date Shipped" />
|
|
105
|
+
</SimpleShowLayout>
|
|
106
|
+
</Tab>
|
|
107
|
+
</TabbedShowLayout>
|
|
108
|
+
</Show>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// Custom Add Item Button
|
|
113
|
+
const AddItemButton = () => {
|
|
114
|
+
const record = useRecordContext();
|
|
115
|
+
const redirect = useRedirect();
|
|
116
|
+
|
|
117
|
+
const handleClick = () => {
|
|
118
|
+
redirect(`/Item/create?source=${encodeURIComponent(JSON.stringify({ order_id: record?.id }))}`);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
<Button
|
|
123
|
+
variant="contained"
|
|
124
|
+
color="primary"
|
|
125
|
+
startIcon={<AddIcon />}
|
|
126
|
+
onClick={handleClick}
|
|
127
|
+
sx={{ mt: 2 }}
|
|
128
|
+
>
|
|
129
|
+
Add New Item
|
|
130
|
+
</Button>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// Order Create
|
|
135
|
+
export const OrderCreate = (props) => {
|
|
136
|
+
return (
|
|
137
|
+
<Create {...props}>
|
|
138
|
+
<SimpleForm>
|
|
139
|
+
<Box sx={{ mb: 3 }}>
|
|
140
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
141
|
+
Create New Order
|
|
142
|
+
</Typography>
|
|
143
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
144
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
145
|
+
<Box sx={{ p: 1 }}>
|
|
146
|
+
<ReferenceInput source="customer_id" reference="Customer" fullWidth>
|
|
147
|
+
<SelectInput optionText="name" validate={required()} />
|
|
148
|
+
</ReferenceInput>
|
|
149
|
+
</Box>
|
|
150
|
+
</Grid>
|
|
151
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
152
|
+
<Box sx={{ p: 1 }}>
|
|
153
|
+
<TextInput source="notes" label="Notes" fullWidth />
|
|
154
|
+
</Box>
|
|
155
|
+
</Grid>
|
|
156
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
157
|
+
<Box sx={{ p: 1 }}>
|
|
158
|
+
<DateTimeInput source="CreatedOn" label="Created On" fullWidth />
|
|
159
|
+
</Box>
|
|
160
|
+
</Grid>
|
|
161
|
+
</Grid>
|
|
162
|
+
</Box>
|
|
163
|
+
</SimpleForm>
|
|
164
|
+
</Create>
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// Order Edit
|
|
169
|
+
export const OrderEdit = (props) => {
|
|
170
|
+
return (
|
|
171
|
+
<Edit {...props} redirect={false}>
|
|
172
|
+
<SimpleForm>
|
|
173
|
+
<Box sx={{ mb: 3 }}>
|
|
174
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
175
|
+
Edit Order
|
|
176
|
+
</Typography>
|
|
177
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
178
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
179
|
+
<Box sx={{ p: 1 }}>
|
|
180
|
+
<ReferenceInput source="customer_id" reference="Customer" fullWidth>
|
|
181
|
+
<SelectInput optionText="name" validate={required()} />
|
|
182
|
+
</ReferenceInput>
|
|
183
|
+
</Box>
|
|
184
|
+
</Grid>
|
|
185
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
186
|
+
<Box sx={{ p: 1 }}>
|
|
187
|
+
<TextInput source="notes" label="Notes" fullWidth />
|
|
188
|
+
</Box>
|
|
189
|
+
</Grid>
|
|
190
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
191
|
+
<Box sx={{ p: 1 }}>
|
|
192
|
+
<DateTimeInput source="CreatedOn" label="Created On" fullWidth />
|
|
193
|
+
</Box>
|
|
194
|
+
</Grid>
|
|
195
|
+
</Grid>
|
|
196
|
+
</Box>
|
|
197
|
+
</SimpleForm>
|
|
198
|
+
</Edit>
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export default {
|
|
203
|
+
list: OrderList,
|
|
204
|
+
show: OrderShow,
|
|
205
|
+
create: OrderCreate,
|
|
206
|
+
edit: OrderEdit,
|
|
207
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// begin MANDATORY imports (always generated EXACTLY)
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { List, FunctionField, Datagrid, TextField, DateField, NumberField } from 'react-admin';
|
|
4
|
+
import { ReferenceField, ReferenceManyField } from 'react-admin';
|
|
5
|
+
import { TabbedShowLayout, Tab, SimpleShowLayout, TextInput, NumberInput, DateTimeInput } from 'react-admin';
|
|
6
|
+
import { ReferenceInput, SelectInput, SimpleForm, Show, Edit, Create } from 'react-admin';
|
|
7
|
+
import { Filter, Pagination, BooleanField, BooleanInput, Labeled } from 'react-admin';
|
|
8
|
+
import { EditButton, DeleteButton, CreateButton } from 'react-admin';
|
|
9
|
+
import { Grid, Typography, Box, Divider, Button } from '@mui/material';
|
|
10
|
+
import { useRecordContext, useRedirect, Link, required } from 'react-admin';
|
|
11
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
12
|
+
// end mandatory imports
|
|
13
|
+
|
|
14
|
+
export const ProductList = (props) => (
|
|
15
|
+
<List {...props} sort={{ field: 'name', order: 'ASC' }} pagination={<Pagination rowsPerPageOptions={[5, 10, 25]} showFirstLastButtons />}>
|
|
16
|
+
<Datagrid rowClick="show">
|
|
17
|
+
<TextField source="name" label="Name" />
|
|
18
|
+
<NumberField source="unit_price" label="Unit Price" options={{ style: 'currency', currency: 'USD' }} />
|
|
19
|
+
</Datagrid>
|
|
20
|
+
</List>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// Product Show
|
|
24
|
+
export const ProductShow = (props) => (
|
|
25
|
+
<Show {...props}>
|
|
26
|
+
<SimpleShowLayout>
|
|
27
|
+
<Box sx={{ mb: 3 }}>
|
|
28
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
29
|
+
Product Information
|
|
30
|
+
</Typography>
|
|
31
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
32
|
+
<Grid item xs={12} sm={6} md={3}>
|
|
33
|
+
<Box sx={{ p: 1 }}>
|
|
34
|
+
<Labeled label="Name">
|
|
35
|
+
<TextField source="name" />
|
|
36
|
+
</Labeled>
|
|
37
|
+
</Box>
|
|
38
|
+
</Grid>
|
|
39
|
+
<Grid item xs={12} sm={6} md={3}>
|
|
40
|
+
<Box sx={{ p: 1 }}>
|
|
41
|
+
<Labeled label="Unit Price">
|
|
42
|
+
<NumberField source="unit_price" options={{ style: 'currency', currency: 'USD' }} />
|
|
43
|
+
</Labeled>
|
|
44
|
+
</Box>
|
|
45
|
+
</Grid>
|
|
46
|
+
</Grid>
|
|
47
|
+
<Divider sx={{ my: 2 }} />
|
|
48
|
+
</Box>
|
|
49
|
+
<ReferenceManyField reference="Item" target="product_id" addLabel={false} pagination={<Pagination />}>
|
|
50
|
+
<Datagrid rowClick="show">
|
|
51
|
+
<TextField source="id" label="Item ID" />
|
|
52
|
+
<NumberField source="quantity" label="Quantity" />
|
|
53
|
+
<NumberField source="amount" label="Amount" options={{ style: 'currency', currency: 'USD' }} />
|
|
54
|
+
<EditButton />
|
|
55
|
+
<DeleteButton />
|
|
56
|
+
</Datagrid>
|
|
57
|
+
</ReferenceManyField>
|
|
58
|
+
<AddItemButton />
|
|
59
|
+
</SimpleShowLayout>
|
|
60
|
+
</Show>
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
// Custom Add Item Button
|
|
64
|
+
const AddItemButton = () => {
|
|
65
|
+
const record = useRecordContext();
|
|
66
|
+
const redirect = useRedirect();
|
|
67
|
+
|
|
68
|
+
const handleClick = () => {
|
|
69
|
+
redirect(`/Item/create?source=${encodeURIComponent(JSON.stringify({ product_id: record?.id }))}`);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<Button
|
|
74
|
+
variant="contained"
|
|
75
|
+
color="primary"
|
|
76
|
+
startIcon={<AddIcon />}
|
|
77
|
+
onClick={handleClick}
|
|
78
|
+
sx={{ mt: 2 }}
|
|
79
|
+
>
|
|
80
|
+
Add New Item
|
|
81
|
+
</Button>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Product Create
|
|
86
|
+
export const ProductCreate = (props) => (
|
|
87
|
+
<Create {...props}>
|
|
88
|
+
<SimpleForm>
|
|
89
|
+
<Box sx={{ mb: 3 }}>
|
|
90
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
91
|
+
Create New Product
|
|
92
|
+
</Typography>
|
|
93
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
94
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
95
|
+
<Box sx={{ p: 1 }}>
|
|
96
|
+
<TextInput source="name" label="Name" fullWidth />
|
|
97
|
+
</Box>
|
|
98
|
+
</Grid>
|
|
99
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
100
|
+
<Box sx={{ p: 1 }}>
|
|
101
|
+
<NumberInput source="unit_price" label="Unit Price" fullWidth />
|
|
102
|
+
</Box>
|
|
103
|
+
</Grid>
|
|
104
|
+
</Grid>
|
|
105
|
+
</Box>
|
|
106
|
+
</SimpleForm>
|
|
107
|
+
</Create>
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
// Product Edit
|
|
111
|
+
export const ProductEdit = (props) => (
|
|
112
|
+
<Edit {...props} redirect={false}>
|
|
113
|
+
<SimpleForm>
|
|
114
|
+
<Box sx={{ mb: 3 }}>
|
|
115
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
116
|
+
Edit Product
|
|
117
|
+
</Typography>
|
|
118
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
119
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
120
|
+
<Box sx={{ p: 1 }}>
|
|
121
|
+
<TextInput source="name" label="Name" fullWidth />
|
|
122
|
+
</Box>
|
|
123
|
+
</Grid>
|
|
124
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
125
|
+
<Box sx={{ p: 1 }}>
|
|
126
|
+
<NumberInput source="unit_price" label="Unit Price" fullWidth />
|
|
127
|
+
</Box>
|
|
128
|
+
</Grid>
|
|
129
|
+
</Grid>
|
|
130
|
+
</Box>
|
|
131
|
+
</SimpleForm>
|
|
132
|
+
</Edit>
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
export default {
|
|
136
|
+
list: ProductList,
|
|
137
|
+
show: ProductShow,
|
|
138
|
+
create: ProductCreate,
|
|
139
|
+
edit: ProductEdit,
|
|
140
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// begin MANDATORY imports (always generated EXACTLY)
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { List, FunctionField, Datagrid, TextField, DateField, NumberField } from 'react-admin';
|
|
4
|
+
import { ReferenceField, ReferenceManyField } from 'react-admin';
|
|
5
|
+
import { TabbedShowLayout, Tab, SimpleShowLayout, TextInput, NumberInput, DateTimeInput } from 'react-admin';
|
|
6
|
+
import { ReferenceInput, SelectInput, SimpleForm, Show, Edit, Create } from 'react-admin';
|
|
7
|
+
import { Filter, Pagination, BooleanField, BooleanInput, Labeled } from 'react-admin';
|
|
8
|
+
import { EditButton, DeleteButton, CreateButton } from 'react-admin';
|
|
9
|
+
import { Grid, Typography, Box, Divider, Button } from '@mui/material';
|
|
10
|
+
import { useRecordContext, useRedirect, Link, required } from 'react-admin';
|
|
11
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
12
|
+
// end mandatory imports
|
|
13
|
+
|
|
14
|
+
const SysEmailFilter = (props) => (
|
|
15
|
+
<Filter {...props}>
|
|
16
|
+
<TextInput label="Search" source="subject" alwaysOn />
|
|
17
|
+
</Filter>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
// SysEmail List
|
|
21
|
+
export const SysEmailList = (props) => {
|
|
22
|
+
return (
|
|
23
|
+
<List filters={<SysEmailFilter />} {...props} sort={{ field: 'id', order: 'ASC' }} pagination={<Pagination rowsPerPageOptions={[5, 10, 25]} showFirstLastButtons />}>
|
|
24
|
+
<Datagrid rowClick="show">
|
|
25
|
+
<TextField source="id" label="Email ID" />
|
|
26
|
+
<ReferenceField label="Customer" source="customer_id" reference="Customer">
|
|
27
|
+
<TextField source="name" />
|
|
28
|
+
</ReferenceField>
|
|
29
|
+
<TextField source="subject" label="Subject" />
|
|
30
|
+
<DateField source="CreatedOn" label="Created On" />
|
|
31
|
+
<EditButton />
|
|
32
|
+
<DeleteButton />
|
|
33
|
+
</Datagrid>
|
|
34
|
+
</List>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// SysEmail Show
|
|
39
|
+
export const SysEmailShow = (props) => {
|
|
40
|
+
return (
|
|
41
|
+
<Show {...props}>
|
|
42
|
+
<SimpleShowLayout>
|
|
43
|
+
<Box sx={{ mb: 3 }}>
|
|
44
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
45
|
+
Email Details
|
|
46
|
+
</Typography>
|
|
47
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
48
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
49
|
+
<Box sx={{ p: 1 }}>
|
|
50
|
+
<Labeled label="Email ID">
|
|
51
|
+
<TextField source="id" />
|
|
52
|
+
</Labeled>
|
|
53
|
+
</Box>
|
|
54
|
+
</Grid>
|
|
55
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
56
|
+
<Box sx={{ p: 1 }}>
|
|
57
|
+
<Labeled label="Customer">
|
|
58
|
+
<ReferenceField source="customer_id" reference="Customer">
|
|
59
|
+
<TextField source="name" />
|
|
60
|
+
</ReferenceField>
|
|
61
|
+
</Labeled>
|
|
62
|
+
</Box>
|
|
63
|
+
</Grid>
|
|
64
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
65
|
+
<Box sx={{ p: 1 }}>
|
|
66
|
+
<Labeled label="Subject">
|
|
67
|
+
<TextField source="subject" />
|
|
68
|
+
</Labeled>
|
|
69
|
+
</Box>
|
|
70
|
+
</Grid>
|
|
71
|
+
<Grid item xs={12}>
|
|
72
|
+
<Divider sx={{ my: 2 }} />
|
|
73
|
+
<Labeled label="Message">
|
|
74
|
+
<TextField source="message" />
|
|
75
|
+
</Labeled>
|
|
76
|
+
</Grid>
|
|
77
|
+
</Grid>
|
|
78
|
+
</Box>
|
|
79
|
+
</SimpleShowLayout>
|
|
80
|
+
</Show>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// SysEmail Create
|
|
85
|
+
export const SysEmailCreate = (props) => {
|
|
86
|
+
return (
|
|
87
|
+
<Create {...props}>
|
|
88
|
+
<SimpleForm>
|
|
89
|
+
<Box sx={{ mb: 3 }}>
|
|
90
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
91
|
+
Create New Email
|
|
92
|
+
</Typography>
|
|
93
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
94
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
95
|
+
<Box sx={{ p: 1 }}>
|
|
96
|
+
<ReferenceInput source="customer_id" reference="Customer" fullWidth>
|
|
97
|
+
<SelectInput optionText="name" validate={required()} />
|
|
98
|
+
</ReferenceInput>
|
|
99
|
+
</Box>
|
|
100
|
+
</Grid>
|
|
101
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
102
|
+
<Box sx={{ p: 1 }}>
|
|
103
|
+
<TextInput source="subject" label="Subject" fullWidth validate={required()} />
|
|
104
|
+
</Box>
|
|
105
|
+
</Grid>
|
|
106
|
+
<Grid item xs={12}>
|
|
107
|
+
<Box sx={{ p: 1 }}>
|
|
108
|
+
<TextInput multiline source="message" label="Message" fullWidth />
|
|
109
|
+
</Box>
|
|
110
|
+
</Grid>
|
|
111
|
+
</Grid>
|
|
112
|
+
</Box>
|
|
113
|
+
</SimpleForm>
|
|
114
|
+
</Create>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// SysEmail Edit
|
|
119
|
+
export const SysEmailEdit = (props) => {
|
|
120
|
+
return (
|
|
121
|
+
<Edit {...props} redirect={false}>
|
|
122
|
+
<SimpleForm>
|
|
123
|
+
<Box sx={{ mb: 3 }}>
|
|
124
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
125
|
+
Edit Email
|
|
126
|
+
</Typography>
|
|
127
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
128
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
129
|
+
<Box sx={{ p: 1 }}>
|
|
130
|
+
<ReferenceInput source="customer_id" reference="Customer" fullWidth>
|
|
131
|
+
<SelectInput optionText="name" validate={required()} />
|
|
132
|
+
</ReferenceInput>
|
|
133
|
+
</Box>
|
|
134
|
+
</Grid>
|
|
135
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
136
|
+
<Box sx={{ p: 1 }}>
|
|
137
|
+
<TextInput source="subject" label="Subject" fullWidth validate={required()} />
|
|
138
|
+
</Box>
|
|
139
|
+
</Grid>
|
|
140
|
+
<Grid item xs={12}>
|
|
141
|
+
<Box sx={{ p: 1 }}>
|
|
142
|
+
<TextInput multiline source="message" label="Message" fullWidth />
|
|
143
|
+
</Box>
|
|
144
|
+
</Grid>
|
|
145
|
+
</Grid>
|
|
146
|
+
</Box>
|
|
147
|
+
</SimpleForm>
|
|
148
|
+
</Edit>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export default {
|
|
153
|
+
list: SysEmailList,
|
|
154
|
+
show: SysEmailShow,
|
|
155
|
+
create: SysEmailCreate,
|
|
156
|
+
edit: SysEmailEdit,
|
|
157
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// begin MANDATORY imports (always generated EXACTLY)
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { List, FunctionField, Datagrid, TextField, DateField, NumberField } from 'react-admin';
|
|
4
|
+
import { ReferenceField, ReferenceManyField } from 'react-admin';
|
|
5
|
+
import { TabbedShowLayout, Tab, SimpleShowLayout, TextInput, NumberInput, DateTimeInput } from 'react-admin';
|
|
6
|
+
import { ReferenceInput, SelectInput, SimpleForm, Show, Edit, Create } from 'react-admin';
|
|
7
|
+
import { Filter, Pagination, BooleanField, BooleanInput, Labeled } from 'react-admin';
|
|
8
|
+
import { EditButton, DeleteButton, CreateButton } from 'react-admin';
|
|
9
|
+
import { Grid, Typography, Box, Divider, Button } from '@mui/material';
|
|
10
|
+
import { useRecordContext, useRedirect, Link, required } from 'react-admin';
|
|
11
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
12
|
+
// end mandatory imports
|
|
13
|
+
|
|
14
|
+
const SysMcpFilter = (props) => (
|
|
15
|
+
<TextInput label="Search" source="id" alwaysOn />
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
// SysMcp List
|
|
19
|
+
export const SysMcpList = (props) => {
|
|
20
|
+
return (
|
|
21
|
+
<List filters={<SysMcpFilter />} {...props} sort={{ field: 'id', order: 'ASC' }}>
|
|
22
|
+
<Datagrid rowClick="show">
|
|
23
|
+
<TextField source="id" label="ID" />
|
|
24
|
+
<TextField source="request" label="Request" />
|
|
25
|
+
</Datagrid>
|
|
26
|
+
</List>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// SysMcp Show
|
|
31
|
+
export const SysMcpShow = (props) => {
|
|
32
|
+
return (
|
|
33
|
+
<Show {...props}>
|
|
34
|
+
<SimpleShowLayout>
|
|
35
|
+
<Box sx={{ mb: 3 }}>
|
|
36
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
37
|
+
SysMcp Details
|
|
38
|
+
</Typography>
|
|
39
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
40
|
+
<Grid item xs={12} sm={6} md={4}>
|
|
41
|
+
<Box sx={{ p: 1 }}>
|
|
42
|
+
<Labeled label="ID">
|
|
43
|
+
<TextField source="id" />
|
|
44
|
+
</Labeled>
|
|
45
|
+
</Box>
|
|
46
|
+
</Grid>
|
|
47
|
+
<Grid item xs={12} sm={6} md={8}>
|
|
48
|
+
<Box sx={{ p: 1 }}>
|
|
49
|
+
<Labeled label="Request">
|
|
50
|
+
<TextField source="request" />
|
|
51
|
+
</Labeled>
|
|
52
|
+
</Box>
|
|
53
|
+
</Grid>
|
|
54
|
+
</Grid>
|
|
55
|
+
</Box>
|
|
56
|
+
</SimpleShowLayout>
|
|
57
|
+
</Show>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// SysMcp Create
|
|
62
|
+
export const SysMcpCreate = (props) => {
|
|
63
|
+
return (
|
|
64
|
+
<Create {...props}>
|
|
65
|
+
<SimpleForm>
|
|
66
|
+
<Box sx={{ mb: 3 }}>
|
|
67
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
68
|
+
Create SysMcp
|
|
69
|
+
</Typography>
|
|
70
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
71
|
+
<Grid item xs={12} sm={12} md={12}>
|
|
72
|
+
<Box sx={{ p: 1 }}>
|
|
73
|
+
<TextInput source="request" label="Request" multiline fullWidth />
|
|
74
|
+
</Box>
|
|
75
|
+
</Grid>
|
|
76
|
+
</Grid>
|
|
77
|
+
</Box>
|
|
78
|
+
</SimpleForm>
|
|
79
|
+
</Create>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// SysMcp Edit
|
|
84
|
+
export const SysMcpEdit = (props) => {
|
|
85
|
+
return (
|
|
86
|
+
<Edit {...props} redirect={false}>
|
|
87
|
+
<SimpleForm>
|
|
88
|
+
<Box sx={{ mb: 3 }}>
|
|
89
|
+
<Typography variant="h5" component="h2" sx={{ mb: 2, fontWeight: 'bold' }}>
|
|
90
|
+
Edit SysMcp
|
|
91
|
+
</Typography>
|
|
92
|
+
<Grid container spacing={3} sx={{ mb: 2 }}>
|
|
93
|
+
<Grid item xs={12} sm={12} md={12}>
|
|
94
|
+
<Box sx={{ p: 1 }}>
|
|
95
|
+
<TextInput source="request" label="Request" multiline fullWidth />
|
|
96
|
+
</Box>
|
|
97
|
+
</Grid>
|
|
98
|
+
</Grid>
|
|
99
|
+
</Box>
|
|
100
|
+
</SimpleForm>
|
|
101
|
+
</Edit>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export default {
|
|
106
|
+
list: SysMcpList,
|
|
107
|
+
show: SysMcpShow,
|
|
108
|
+
create: SysMcpCreate,
|
|
109
|
+
edit: SysMcpEdit,
|
|
110
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const [loading, setLoading] = React.useState(true);
|
|
2
|
+
const [conf, setConf] = React.useState({});
|
|
3
|
+
|
|
4
|
+
React.useEffect(() => {
|
|
5
|
+
const fetchData = async () => {
|
|
6
|
+
try {
|
|
7
|
+
console.log('loading HomeConf-1')
|
|
8
|
+
const conf = await loadHomeConf()
|
|
9
|
+
setConf(conf)
|
|
10
|
+
setLoading(false);
|
|
11
|
+
console.log('AppConf0: ', conf);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
console.error('Error fetching data:', error);
|
|
14
|
+
sessionStorage.removeItem("raSpa");
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
fetchData();
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
if (loading) {
|
|
21
|
+
return <Loading loadingPrimary="Loading..." loadingSecondary="Please wait" />;
|
|
22
|
+
}
|
|
23
|
+
//conf = useConf();
|
|
24
|
+
const dataProvider = jsonapiClient(conf.api_root, { conf: {} }, null);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
body {
|
|
2
|
+
margin: 0;
|
|
3
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
|
+
sans-serif;
|
|
6
|
+
-webkit-font-smoothing: antialiased;
|
|
7
|
+
-moz-osx-font-smoothing: grayscale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
code {
|
|
11
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
12
|
+
monospace;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import App from './App';
|
|
5
|
+
import reportWebVitals from './reportWebVitals';
|
|
6
|
+
|
|
7
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
8
|
+
root.render(
|
|
9
|
+
<React.StrictMode>
|
|
10
|
+
<App />
|
|
11
|
+
</React.StrictMode>
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
// If you want to start measuring performance in your app, pass a function
|
|
15
|
+
// to log results (for example: reportWebVitals(console.log))
|
|
16
|
+
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
17
|
+
reportWebVitals();
|