fix => services for fetchSlaughterBroadcastAndProducts
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
ListItemIcon,
|
||||
} from "@mui/material";
|
||||
import { useState } from "react";
|
||||
import { useDispatch } from "react-redux";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { DRAWER, OPEN_MODAL } from "../../../../lib/redux/slices/appSlice";
|
||||
import { slaughterDeleteInventoryFreeBarService } from "../../services/slaughter-delete-inventory-free-bar";
|
||||
import { SlaughterSubmitFreeBar } from "../slaughter-submit-free-bar/SlaughterSubmitFreeBar";
|
||||
@@ -26,7 +26,9 @@ export const SlaughterFreeBarsOperations = ({
|
||||
type,
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const selectedSubUser = useSelector(
|
||||
(state) => state.userSlice.selectedSubUser
|
||||
);
|
||||
const [anchorEl, setAnchorEl] = useState(null);
|
||||
|
||||
const handleClick = (event) => {
|
||||
@@ -158,7 +160,11 @@ export const SlaughterFreeBarsOperations = ({
|
||||
slaughterDeleteInventoryFreeBarService(item.key)
|
||||
).then(() => {
|
||||
updateTable();
|
||||
dispatch(fetchSlaughterBroadcastAndProducts());
|
||||
dispatch(
|
||||
fetchSlaughterBroadcastAndProducts({
|
||||
role_key: selectedSubUser?.key || "",
|
||||
})
|
||||
);
|
||||
});
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user