@solidstarters/solid-core-ui 1.1.54 → 1.1.56
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.
- package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
- package/dist/components/common/SolidFormStepper.js +0 -4
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +7 -2
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/form/SolidFormUserViewLayout.d.ts +2 -0
- package/dist/components/core/form/SolidFormUserViewLayout.d.ts.map +1 -0
- package/dist/components/core/form/SolidFormUserViewLayout.js +112 -0
- package/dist/components/core/form/SolidFormUserViewLayout.js.map +1 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +29 -22
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js +12 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +4 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +9 -7
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js +1 -0
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/KanbanUserViewLayout.d.ts +2 -0
- package/dist/components/core/kanban/KanbanUserViewLayout.d.ts.map +1 -0
- package/dist/components/core/kanban/KanbanUserViewLayout.js +112 -0
- package/dist/components/core/kanban/KanbanUserViewLayout.js.map +1 -0
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +41 -35
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js +2 -2
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListColumnSelector.d.ts +2 -0
- package/dist/components/core/list/SolidListColumnSelector.d.ts.map +1 -0
- package/dist/components/core/list/SolidListColumnSelector.js +182 -0
- package/dist/components/core/list/SolidListColumnSelector.js.map +1 -0
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +48 -45
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.d.ts +1 -1
- package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js +7 -49
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/redux/api/solidEntityApi.d.ts +1 -0
- package/dist/redux/api/solidEntityApi.d.ts.map +1 -1
- package/dist/redux/api/solidEntityApi.js +7 -0
- package/dist/redux/api/solidEntityApi.js.map +1 -1
- package/dist/resources/globals.css +1 -0
- package/package.json +1 -1
- package/src/components/common/SolidFormStepper.tsx +0 -4
- package/src/components/core/common/SolidGlobalSearchElement.tsx +14 -3
- package/src/components/core/form/SolidFormUserViewLayout.tsx +87 -0
- package/src/components/core/form/SolidFormView.tsx +30 -5
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +16 -14
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +16 -14
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +12 -4
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +5 -2
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +4 -2
- package/src/components/core/kanban/KanbanBoard.tsx +1 -0
- package/src/components/core/kanban/KanbanUserViewLayout.tsx +87 -0
- package/src/components/core/kanban/SolidKanbanView.tsx +18 -3
- package/src/components/core/kanban/SolidKanbanViewConfigure.tsx +3 -3
- package/src/components/core/list/SolidListColumnSelector.tsx +170 -0
- package/src/components/core/list/SolidListView.tsx +16 -12
- package/src/components/core/list/SolidListViewConfigure.tsx +2 -77
- package/src/redux/api/solidEntityApi.tsx +7 -0
- package/src/resources/globals.css +1 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { useFormik } from 'formik';
|
|
3
|
+
import { Button } from 'primereact/button';
|
|
4
|
+
import { Checkbox, CheckboxChangeEvent } from 'primereact/checkbox';
|
|
5
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
6
|
+
import qs from "qs";
|
|
7
|
+
import { useSelector } from 'react-redux';
|
|
8
|
+
import { createSolidEntityApi } from '@/redux/api/solidEntityApi';
|
|
9
|
+
import { Toast } from "primereact/toast";
|
|
10
|
+
|
|
11
|
+
interface FieldMetadata {
|
|
12
|
+
displayName: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface FilterColumns {
|
|
16
|
+
name: string;
|
|
17
|
+
key: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const SolidListColumnSelector = ({ listViewMetaData }: any) => {
|
|
21
|
+
const toast = useRef<Toast>(null);
|
|
22
|
+
|
|
23
|
+
const { user } = useSelector((state: any) => state.auth);
|
|
24
|
+
const entityApi = createSolidEntityApi('userViewMetadata');
|
|
25
|
+
const {
|
|
26
|
+
useUpsertSolidEntityMutation
|
|
27
|
+
} = entityApi;
|
|
28
|
+
|
|
29
|
+
const [upsertUserView, { isLoading, error: viewCreateError, isSuccess, data: data }] = useUpsertSolidEntityMutation();
|
|
30
|
+
const showToast = (severity: "success" | "error", summary: string, detail: string) => {
|
|
31
|
+
toast.current?.show({
|
|
32
|
+
severity,
|
|
33
|
+
summary,
|
|
34
|
+
detail,
|
|
35
|
+
life: 3000,
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
if (!listViewMetaData) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (!listViewMetaData.data) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const solidView = listViewMetaData?.data?.solidView;
|
|
47
|
+
|
|
48
|
+
// This is a key value map of field name vs field metadata.
|
|
49
|
+
const solidFieldsMetadata = listViewMetaData?.data?.solidFieldsMetadata as Record<string, FieldMetadata>;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if (!solidView || !solidFieldsMetadata) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const checkedFieldNames = new Set(solidView.layout.children.map((col: { attrs: { name: string } }) => col.attrs.name));
|
|
57
|
+
|
|
58
|
+
const solidListColumns: FilterColumns[] = Object.entries(solidFieldsMetadata).map(([key, field]) => ({
|
|
59
|
+
name: field.displayName,
|
|
60
|
+
key,
|
|
61
|
+
}));
|
|
62
|
+
|
|
63
|
+
const formik = useFormik({
|
|
64
|
+
initialValues: {
|
|
65
|
+
selectedColumns: solidListColumns.filter(col => checkedFieldNames.has(col.key)),
|
|
66
|
+
},
|
|
67
|
+
onSubmit: async (values) => {
|
|
68
|
+
const selectedKeys = values.selectedColumns.map(col => col.key);
|
|
69
|
+
|
|
70
|
+
// Step 1: Extract current children
|
|
71
|
+
const currentChildren = solidView.layout.children;
|
|
72
|
+
|
|
73
|
+
// Step 2: Create a map of all available metadata
|
|
74
|
+
const allFieldMeta = solidFieldsMetadata;
|
|
75
|
+
|
|
76
|
+
// Step 3: Filter children to include only selected keys
|
|
77
|
+
const newChildren = selectedKeys.map((key) => {
|
|
78
|
+
const existingChild = currentChildren.find((child: any) => child.attrs.name === key);
|
|
79
|
+
if (existingChild) {
|
|
80
|
+
return existingChild; // keep original config
|
|
81
|
+
} else {
|
|
82
|
+
// construct a new one if it wasn't in the original
|
|
83
|
+
return {
|
|
84
|
+
type: 'field',
|
|
85
|
+
attrs: {
|
|
86
|
+
name: key,
|
|
87
|
+
label: allFieldMeta[key]?.displayName || key,
|
|
88
|
+
sortable: true,
|
|
89
|
+
filterable: true,
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// Now build updated solidView
|
|
96
|
+
const updatedView = {
|
|
97
|
+
layout: {
|
|
98
|
+
...solidView.layout,
|
|
99
|
+
children: newChildren
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
try {
|
|
104
|
+
if (listViewMetaData?.data?.solidView?.id) {
|
|
105
|
+
// Update existing user view
|
|
106
|
+
const response = await upsertUserView({
|
|
107
|
+
userId: user?.user?.id,
|
|
108
|
+
viewMetadataId: listViewMetaData?.data?.solidView?.id,
|
|
109
|
+
layout: JSON.stringify(updatedView.layout),
|
|
110
|
+
}).unwrap();
|
|
111
|
+
if (response.statusCode === 200) {
|
|
112
|
+
showToast("success", "Layout", "Form Layout Updated successfully!");
|
|
113
|
+
window.location.reload();
|
|
114
|
+
}
|
|
115
|
+
console.log("Successfully updated:", response);
|
|
116
|
+
} else {
|
|
117
|
+
// Create new user view
|
|
118
|
+
console.log("Error:");
|
|
119
|
+
}
|
|
120
|
+
} catch (error) {
|
|
121
|
+
console.error("Error updating user view:", error);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
console.log("Updated solidView", updatedView);
|
|
125
|
+
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<>
|
|
131
|
+
<Toast ref={toast} />
|
|
132
|
+
<form onSubmit={formik.handleSubmit} className="flex flex-column gap-1 p-1">
|
|
133
|
+
<div className="flex flex-column gap-3 px-3 cogwheel-column-filter" style={{ maxHeight: 400, overflowY: 'auto' }}>
|
|
134
|
+
{solidListColumns.map((column) => {
|
|
135
|
+
return (
|
|
136
|
+
<div key={column.key} className="flex align-items-center gap-1">
|
|
137
|
+
<Checkbox
|
|
138
|
+
inputId={column.key}
|
|
139
|
+
name="selectedColumns"
|
|
140
|
+
value={column}
|
|
141
|
+
onChange={(e) => {
|
|
142
|
+
const isChecked = formik.values.selectedColumns.some(item => item.key === column.key);
|
|
143
|
+
formik.setFieldValue(
|
|
144
|
+
"selectedColumns",
|
|
145
|
+
isChecked
|
|
146
|
+
? formik.values.selectedColumns.filter(item => item.key !== column.key)
|
|
147
|
+
: [...formik.values.selectedColumns, column]
|
|
148
|
+
);
|
|
149
|
+
}}
|
|
150
|
+
checked={formik.values.selectedColumns.some(item => item.key === column.key)}
|
|
151
|
+
className="text-base"
|
|
152
|
+
/>
|
|
153
|
+
<label htmlFor={column.key} className="ml-2 text-base">
|
|
154
|
+
{column.name}
|
|
155
|
+
</label>
|
|
156
|
+
</div>
|
|
157
|
+
);
|
|
158
|
+
})}
|
|
159
|
+
</div>
|
|
160
|
+
<div className="p-3 flex gap-2">
|
|
161
|
+
<Button type='submit' label="Apply" size="small" />
|
|
162
|
+
<Button type='button' outlined label="Cancel" size="small"
|
|
163
|
+
// @ts-ignore
|
|
164
|
+
onClick={(e) => op.current.hide(e)}
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
</form>
|
|
168
|
+
</>
|
|
169
|
+
)
|
|
170
|
+
}
|
|
@@ -43,6 +43,7 @@ import Download from "yet-another-react-lightbox/plugins/download";
|
|
|
43
43
|
import "yet-another-react-lightbox/styles.css";
|
|
44
44
|
import "yet-another-react-lightbox/plugins/counter.css";
|
|
45
45
|
import { SolidListViewConfigure } from "./SolidListViewConfigure";
|
|
46
|
+
import { useSelector } from "react-redux";
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
const getRandomInt = (min: number, max: number) => {
|
|
@@ -91,6 +92,7 @@ type SolidListViewParams = {
|
|
|
91
92
|
export const SolidListView = (params: SolidListViewParams) => {
|
|
92
93
|
|
|
93
94
|
const solidGlobalSearchElementRef = useRef();
|
|
95
|
+
const { user } = useSelector((state: any) => state.auth);
|
|
94
96
|
|
|
95
97
|
|
|
96
98
|
const router = useRouter()
|
|
@@ -148,7 +150,7 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
148
150
|
} = entityApi;
|
|
149
151
|
|
|
150
152
|
// Get the list view layout & metadata first.
|
|
151
|
-
const listViewMetaDataQs = qs.stringify({ modelName: params.modelName, moduleName: params.moduleName, viewType: 'list' }, {
|
|
153
|
+
const listViewMetaDataQs = qs.stringify({ modelName: params.modelName, moduleName: params.moduleName, viewType: 'list', userId: user?.user?.id }, {
|
|
152
154
|
encodeValuesOnly: true,
|
|
153
155
|
});
|
|
154
156
|
const [listViewMetaData, setListViewMetaData] = useState({});
|
|
@@ -722,23 +724,25 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
722
724
|
{actionsAllowed.includes(`${createPermission(params.modelName)}`) && solidListViewMetaData?.data?.solidView?.layout?.attrs?.create !== false && params.embeded !== true &&
|
|
723
725
|
<SolidCreateButton url={createButtonUrl} />
|
|
724
726
|
}
|
|
725
|
-
{actionsAllowed.includes(`${createPermission(params.modelName)}`) && solidListViewMetaData?.data?.solidView?.layout?.attrs?.create !== false && params.embeded == true && params.inlineCreate == true &&
|
|
727
|
+
{actionsAllowed.includes(`${createPermission(params.modelName)}`) && solidListViewMetaData?.data?.solidView?.layout?.attrs?.create !== false && params.embeded == true && params.inlineCreate == true && params.id !== 'new' &&
|
|
726
728
|
// < SolidCreateButton url={createButtonUrl} />
|
|
727
729
|
<Button type="button" icon="pi pi-plus" label="Add" size='small'
|
|
728
730
|
onClick={() => params.handlePopUpOpen("new")}
|
|
729
731
|
></Button>
|
|
730
732
|
}
|
|
731
733
|
{/* Button For Manual Refresh */}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
734
|
+
{params.embeded !== true &&
|
|
735
|
+
<Button
|
|
736
|
+
type="button"
|
|
737
|
+
size="small"
|
|
738
|
+
icon="pi pi-refresh"
|
|
739
|
+
severity="secondary"
|
|
740
|
+
outlined
|
|
741
|
+
onClick={() => {
|
|
742
|
+
setQueryString(first, rows, sortField, sortOrder, filters, showArchived);
|
|
743
|
+
}}
|
|
744
|
+
/>
|
|
745
|
+
}
|
|
742
746
|
{showArchived && <Button type="button" icon="pi pi-refresh" label="Recover" size='small' severity="secondary"
|
|
743
747
|
onClick={() => setRecoverDialogVisible(true)}
|
|
744
748
|
></Button>}
|
|
@@ -9,29 +9,9 @@ import { Divider } from "primereact/divider";
|
|
|
9
9
|
import { OverlayPanel } from "primereact/overlaypanel";
|
|
10
10
|
import { RadioButton } from "primereact/radiobutton";
|
|
11
11
|
import { useEffect, useRef, useState } from "react";
|
|
12
|
+
import { SolidListColumnSelector } from "./SolidListColumnSelector";
|
|
12
13
|
|
|
13
|
-
interface FieldMetadata {
|
|
14
|
-
displayName: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface FilterColumns {
|
|
18
|
-
name: string;
|
|
19
|
-
key: string;
|
|
20
|
-
isChecked: boolean;
|
|
21
|
-
}
|
|
22
14
|
export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, showArchived, viewData, sizeOptions, setSize, size, viewModes, params, actionsAllowed, selectedRecords, setDialogVisible }: any) => {
|
|
23
|
-
if (!listViewMetaData) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (!listViewMetaData.data) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const solidView = listViewMetaData?.data?.solidView;
|
|
31
|
-
|
|
32
|
-
// This is a key value map of field name vs field metadata.
|
|
33
|
-
const solidFieldsMetadata = listViewMetaData?.data?.solidFieldsMetadata as Record<string, FieldMetadata>;
|
|
34
|
-
|
|
35
15
|
// const [visible, setVisible] = useState<boolean>(false);
|
|
36
16
|
const op = useRef(null);
|
|
37
17
|
const customizeLayout = useRef<OverlayPanel | null>(null);
|
|
@@ -77,32 +57,6 @@ export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, show
|
|
|
77
57
|
return () => document.removeEventListener("click", handleClickOutside);
|
|
78
58
|
}, [isOverlayOpen])
|
|
79
59
|
|
|
80
|
-
if (!solidView || !solidFieldsMetadata) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const checkedFieldNames = new Set(solidView.layout.children.map((col: { attrs: { name: string } }) => col.attrs.name));
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const solidListColumns: FilterColumns[] = Object.entries(solidFieldsMetadata).map(([key, field]) => ({
|
|
88
|
-
name: field.displayName,
|
|
89
|
-
key,
|
|
90
|
-
isChecked: checkedFieldNames.has(key),
|
|
91
|
-
}));
|
|
92
|
-
|
|
93
|
-
const [selectedColumns, setSelectedColumns] = useState<FilterColumns[]>(solidListColumns.filter(col => col.isChecked));
|
|
94
|
-
|
|
95
|
-
const onCategoryChange = (e: CheckboxChangeEvent) => {
|
|
96
|
-
let _selectedColumns = [...selectedColumns];
|
|
97
|
-
|
|
98
|
-
if (e.checked)
|
|
99
|
-
_selectedColumns.push(e.value);
|
|
100
|
-
else
|
|
101
|
-
_selectedColumns = _selectedColumns.filter(column => column.key !== e.value.key);
|
|
102
|
-
|
|
103
|
-
setSelectedColumns(_selectedColumns);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
60
|
return (
|
|
107
61
|
<div className="position-relative">
|
|
108
62
|
<Button
|
|
@@ -147,8 +101,6 @@ export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, show
|
|
|
147
101
|
</label>
|
|
148
102
|
</div>
|
|
149
103
|
)}
|
|
150
|
-
|
|
151
|
-
|
|
152
104
|
</div>
|
|
153
105
|
</div>
|
|
154
106
|
<Divider className="m-0" />
|
|
@@ -233,34 +185,7 @@ export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, show
|
|
|
233
185
|
</div>
|
|
234
186
|
</AccordionTab>
|
|
235
187
|
<AccordionTab header="Column Selector">
|
|
236
|
-
<
|
|
237
|
-
<div className="flex flex-column gap-3 px-3 cogwheel-column-filter" style={{maxHeight: 400, overflowY:'auto'}}>
|
|
238
|
-
{solidListColumns.map((column) => {
|
|
239
|
-
return (
|
|
240
|
-
<div key={column.key} className="flex align-items-center gap-1">
|
|
241
|
-
<Checkbox
|
|
242
|
-
inputId={column.key}
|
|
243
|
-
name="column"
|
|
244
|
-
value={column}
|
|
245
|
-
onChange={onCategoryChange}
|
|
246
|
-
checked={selectedColumns.some((item) => item.key === column.key)}
|
|
247
|
-
className="text-base"
|
|
248
|
-
/>
|
|
249
|
-
<label htmlFor={column.key} className="ml-2 text-base">
|
|
250
|
-
{column.name}
|
|
251
|
-
</label>
|
|
252
|
-
</div>
|
|
253
|
-
);
|
|
254
|
-
})}
|
|
255
|
-
</div>
|
|
256
|
-
<div className="p-3 flex gap-2">
|
|
257
|
-
<Button label="Apply" size="small" />
|
|
258
|
-
<Button outlined label="Cancel" size="small"
|
|
259
|
-
// @ts-ignore
|
|
260
|
-
onClick={(e) => op.current.hide(e)}
|
|
261
|
-
/>
|
|
262
|
-
</div>
|
|
263
|
-
</div>
|
|
188
|
+
<SolidListColumnSelector listViewMetaData={listViewMetaData} />
|
|
264
189
|
</AccordionTab>
|
|
265
190
|
</Accordion>
|
|
266
191
|
</div>
|
|
@@ -49,6 +49,13 @@ export const createSolidEntityApi = (entityName: string) => {
|
|
|
49
49
|
body: entity
|
|
50
50
|
}),
|
|
51
51
|
}),
|
|
52
|
+
upsertSolidEntity: builder.mutation({
|
|
53
|
+
query: (entity) => ({
|
|
54
|
+
url: `/${kebabEntityName}/upsert`,
|
|
55
|
+
method: 'POST',
|
|
56
|
+
body: entity
|
|
57
|
+
}),
|
|
58
|
+
}),
|
|
52
59
|
updateSolidEntity: builder.mutation({
|
|
53
60
|
query: ({ id, data }) => ({
|
|
54
61
|
url: `/${kebabEntityName}/${id}`,
|