fix => services for fetchSlaughterBroadcastAndProducts
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
Tooltip,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import { useDispatch } from "react-redux";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { AppContext } from "../../../../contexts/AppContext";
|
||||
import { DRAWER } from "../../../../lib/redux/slices/appSlice";
|
||||
import { slaughterDeleteOutOfProvinceSell } from "../../services/slaughter-delete-out-province-sell";
|
||||
@@ -31,7 +31,9 @@ export const SlaughterOutProvinceSalesOperations = ({
|
||||
const dispatch = useDispatch();
|
||||
const [openNotif] = useContext(AppContext);
|
||||
const [anchorEl, setAnchorEl] = useState(null);
|
||||
|
||||
const selectedSubUser = useSelector(
|
||||
(state) => state.userSlice.selectedSubUser
|
||||
);
|
||||
const openPopover = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
@@ -70,7 +72,11 @@ export const SlaughterOutProvinceSalesOperations = ({
|
||||
});
|
||||
} else {
|
||||
updateTable();
|
||||
dispatch(fetchSlaughterBroadcastAndProducts());
|
||||
dispatch(
|
||||
fetchSlaughterBroadcastAndProducts({
|
||||
role_key: selectedSubUser?.key || "",
|
||||
})
|
||||
);
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
|
||||
Reference in New Issue
Block a user