IO-3183-Dependency-Updates-and-maintenance - Cleaning dashboard-grid.component.jsx
This commit is contained in:
@@ -59,6 +59,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
|||||||
layout: { ...state, layout, layouts }
|
layout: { ...state, layout, layouts }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!isEmpty(result?.errors)) {
|
if (!isEmpty(result?.errors)) {
|
||||||
notification.error({
|
notification.error({
|
||||||
message: t("dashboard.errors.updatinglayout", {
|
message: t("dashboard.errors.updatinglayout", {
|
||||||
@@ -67,6 +68,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleRemoveComponent = (key) => {
|
const handleRemoveComponent = (key) => {
|
||||||
logImEXEvent("dashboard_remove_component", { name: key });
|
logImEXEvent("dashboard_remove_component", { name: key });
|
||||||
const idxToRemove = state.items.findIndex((i) => i.i === key);
|
const idxToRemove = state.items.findIndex((i) => i.i === key);
|
||||||
@@ -95,6 +97,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const dashboardData = useMemo(() => GenerateDashboardData(data), [data]);
|
const dashboardData = useMemo(() => GenerateDashboardData(data), [data]);
|
||||||
|
|
||||||
const existingLayoutKeys = state.items.map((i) => i.i);
|
const existingLayoutKeys = state.items.map((i) => i.i);
|
||||||
|
|
||||||
const menuItems = Object.keys(componentList).map((key) => ({
|
const menuItems = Object.keys(componentList).map((key) => ({
|
||||||
@@ -130,7 +133,6 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
|
|||||||
width="100%"
|
width="100%"
|
||||||
layouts={state.layouts}
|
layouts={state.layouts}
|
||||||
onLayoutChange={handleLayoutChange}
|
onLayoutChange={handleLayoutChange}
|
||||||
// onBreakpointChange={onBreakpointChange}
|
|
||||||
>
|
>
|
||||||
{state.items.map((item, index) => {
|
{state.items.map((item, index) => {
|
||||||
const TheComponent = componentList[item.i].component;
|
const TheComponent = componentList[item.i].component;
|
||||||
|
|||||||
Reference in New Issue
Block a user