fix => services for fetchSlaughterBroadcastAndProducts

This commit is contained in:
2026-01-28 14:43:26 +03:30
parent 6ad291867e
commit fa3543f43e
19 changed files with 317 additions and 54 deletions

View File

@@ -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",