Add: add colhouse fields to waiting bars
This commit is contained in:
@@ -977,6 +977,30 @@ export const CityNewKillRequest = ({
|
||||
<Typography>اطلاعات کشتار</Typography>
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
container
|
||||
gap={SPACING.TINY}
|
||||
justifyContent="start"
|
||||
alignItems="center"
|
||||
sx={{
|
||||
border: "1px solid black",
|
||||
borderRadius: 1,
|
||||
p: 1.5,
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
color={(prop) => prop.palette.grey["A700"]}
|
||||
variant="caption"
|
||||
>
|
||||
سن (روز):
|
||||
</Typography>
|
||||
<Typography variant="button">
|
||||
{hatchingSelected?.age != null && hatchingSelected?.age !== ""
|
||||
? Number(hatchingSelected.age).toLocaleString()
|
||||
: "-"}
|
||||
</Typography>
|
||||
</Grid>
|
||||
|
||||
{/* <Grid>
|
||||
<NumberInput
|
||||
allowLeadingZeros
|
||||
@@ -2027,7 +2051,6 @@ export const CityNewKillRequest = ({
|
||||
},
|
||||
},
|
||||
}}
|
||||
disabled={freezing}
|
||||
/>
|
||||
{!data?.approved &&
|
||||
formik.values.avicultureSellType !== "goverment" && (
|
||||
|
||||
@@ -8,7 +8,7 @@ import ResponsiveTable from "../../../../components/responsive-table/ResponsiveT
|
||||
import {
|
||||
LOADING_END,
|
||||
LOADING_START,
|
||||
OPEN_MODAL
|
||||
OPEN_MODAL,
|
||||
} from "../../../../lib/redux/slices/appSlice";
|
||||
import { getRoleFromUrl } from "../../../../utils/getRoleFromUrl";
|
||||
import { formatJustDate } from "../../../../utils/formatTime";
|
||||
@@ -30,7 +30,7 @@ export const SlaughterInventoryFreeBuyBarsAlives = ({
|
||||
withDate,
|
||||
selectedDate1,
|
||||
selectedDate2,
|
||||
searchValue
|
||||
searchValue,
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
const [openNotif] = useContext(AppContext);
|
||||
@@ -43,7 +43,7 @@ export const SlaughterInventoryFreeBuyBarsAlives = ({
|
||||
slaughterGetProfile({
|
||||
role_key: checkPathStartsWith("slaughter")
|
||||
? selectedSubUser?.key || ""
|
||||
: ""
|
||||
: "",
|
||||
})
|
||||
);
|
||||
}, [selectedSubUser?.key]);
|
||||
@@ -93,7 +93,7 @@ export const SlaughterInventoryFreeBuyBarsAlives = ({
|
||||
fetchSlaughterBroadcastAndProducts({
|
||||
role_key: checkPathStartsWith("slaughter")
|
||||
? selectedSubUser?.key || ""
|
||||
: ""
|
||||
: "",
|
||||
})
|
||||
);
|
||||
};
|
||||
@@ -106,11 +106,11 @@ export const SlaughterInventoryFreeBuyBarsAlives = ({
|
||||
selectedDate1,
|
||||
selectedDate2,
|
||||
searchValue,
|
||||
selectedSubUser?.key
|
||||
selectedSubUser?.key,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
if (refreshTrigger != null && refreshTrigger > 0) {
|
||||
if (refreshTrigger !== null && refreshTrigger > 0) {
|
||||
setPage(1);
|
||||
fetchApiData(1);
|
||||
}
|
||||
@@ -161,7 +161,7 @@ export const SlaughterInventoryFreeBuyBarsAlives = ({
|
||||
item={item}
|
||||
updateTable={updateTable}
|
||||
/>
|
||||
)
|
||||
),
|
||||
})
|
||||
);
|
||||
}}
|
||||
@@ -169,7 +169,7 @@ export const SlaughterInventoryFreeBuyBarsAlives = ({
|
||||
تایید / رد
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
</>,
|
||||
];
|
||||
});
|
||||
|
||||
@@ -198,7 +198,7 @@ export const SlaughterInventoryFreeBuyBarsAlives = ({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "فایل اکسل در حال دانلود می باشد، این علمیات ممکن است زمان بر باشد لطفا صبر کنید.",
|
||||
severity: "success"
|
||||
severity: "success",
|
||||
});
|
||||
const link = `${
|
||||
axios.defaults.baseURL
|
||||
@@ -238,7 +238,7 @@ export const SlaughterInventoryFreeBuyBarsAlives = ({
|
||||
"وزن لاشه (کیلوگرم)",
|
||||
"درصد افت",
|
||||
"بارنامه",
|
||||
"عملیات"
|
||||
"عملیات",
|
||||
]}
|
||||
handlePageChange={handlePageChange}
|
||||
totalRows={totalRows}
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
MenuItem,
|
||||
Select,
|
||||
TextField,
|
||||
Tooltip
|
||||
Tooltip,
|
||||
} from "@mui/material";
|
||||
import { DatePicker } from "@mui/x-date-pickers";
|
||||
import moment from "moment";
|
||||
@@ -18,7 +18,7 @@ import axios from "axios";
|
||||
import {
|
||||
LOADING_END,
|
||||
LOADING_START,
|
||||
OPEN_MODAL
|
||||
OPEN_MODAL,
|
||||
} from "../../../../lib/redux/slices/appSlice";
|
||||
import { getRoleFromUrl } from "../../../../utils/getRoleFromUrl";
|
||||
import ResponsiveTable from "../../../../components/responsive-table/ResponsiveTable";
|
||||
@@ -34,7 +34,7 @@ export const SlaughterInventoryInProvinceBars = ({
|
||||
useExternalFilters = false,
|
||||
filterValues = {},
|
||||
onAfterUpdate,
|
||||
refreshTrigger
|
||||
refreshTrigger,
|
||||
}) => {
|
||||
const [selectedDate1, setSelectedDate1] = useState(
|
||||
moment(new Date()).format("YYYY-MM-DD")
|
||||
@@ -65,14 +65,14 @@ export const SlaughterInventoryInProvinceBars = ({
|
||||
selectedDate2: filterValues.selectedDate2 ?? selectedDate2,
|
||||
withDate: filterValues.withDate ?? withDate,
|
||||
textValue: filterValues.textValue ?? textValue,
|
||||
quota: filterValues.quota ?? quota
|
||||
quota: filterValues.quota ?? quota,
|
||||
}
|
||||
: {
|
||||
selectedDate1,
|
||||
selectedDate2,
|
||||
withDate,
|
||||
textValue,
|
||||
quota
|
||||
quota,
|
||||
};
|
||||
|
||||
const fetchApiData = useCallback(
|
||||
@@ -106,7 +106,9 @@ export const SlaughterInventoryInProvinceBars = ({
|
||||
perPage,
|
||||
type,
|
||||
dispatch,
|
||||
selectedSubUser?.key
|
||||
selectedSubUser?.key,
|
||||
setData,
|
||||
setTotalRows,
|
||||
]
|
||||
);
|
||||
|
||||
@@ -151,7 +153,11 @@ export const SlaughterInventoryInProvinceBars = ({
|
||||
item?.killhouseUser?.name
|
||||
} (${item?.killhouseUser?.killHouseOperator?.user?.mobile})`,
|
||||
item?.poultryRequest?.poultryReqOrderCode,
|
||||
item?.freezing ? "انجماد" : item?.export ? "صادرات" : "عادی",
|
||||
item?.poultryRequest?.freezing
|
||||
? "انجماد"
|
||||
: item?.poultryRequest?.export
|
||||
? "صادرات"
|
||||
: "عادی",
|
||||
item?.killer
|
||||
? `${item?.killer?.name} (${item?.killer?.killHouseOperator?.user?.mobile})`
|
||||
: "-",
|
||||
@@ -187,14 +193,14 @@ export const SlaughterInventoryInProvinceBars = ({
|
||||
updateTable={updateTable}
|
||||
item={item}
|
||||
/>
|
||||
)
|
||||
),
|
||||
})
|
||||
);
|
||||
}}
|
||||
>
|
||||
<SettingsIcon fontSize="small" />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</Tooltip>,
|
||||
];
|
||||
});
|
||||
|
||||
@@ -241,7 +247,7 @@ export const SlaughterInventoryInProvinceBars = ({
|
||||
padding: "10px",
|
||||
borderRadius: "15px",
|
||||
borderColor: "gray",
|
||||
justifyContent: "left"
|
||||
justifyContent: "left",
|
||||
}}
|
||||
>
|
||||
{type === "notentered" && (
|
||||
@@ -356,7 +362,7 @@ export const SlaughterInventoryInProvinceBars = ({
|
||||
"درصد افت در لحظه",
|
||||
"درصد افت ورود به انبار",
|
||||
"تاریخ ورود به انبار",
|
||||
"عملیات"
|
||||
"عملیات",
|
||||
]}
|
||||
handlePageChange={handlePageChange}
|
||||
totalRows={totalRows}
|
||||
|
||||
@@ -6,8 +6,11 @@ import {
|
||||
Button,
|
||||
FormControl,
|
||||
FormControlLabel,
|
||||
InputLabel,
|
||||
MenuItem,
|
||||
Radio,
|
||||
RadioGroup,
|
||||
Select,
|
||||
TextField,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
@@ -19,6 +22,7 @@ import { AppContext } from "../../../../contexts/AppContext";
|
||||
import { provincePolicyGetDropLimitService } from "../../../province/services/province-policy-drop-limit";
|
||||
import { fetchSlaughterBroadcastAndProducts } from "../../services/handle-fetch-slaughter-products";
|
||||
import { checkPathStartsWith } from "../../../../utils/checkPathStartsWith";
|
||||
import { liveStockGetInventoryData } from "../../../live-stock-support/services/live-stock-get-inventory-data";
|
||||
|
||||
export const SlaughterSubmitRealInventory = ({ item, updateTable }) => {
|
||||
const [value, setValue] = useState("weight");
|
||||
@@ -33,6 +37,7 @@ export const SlaughterSubmitRealInventory = ({ item, updateTable }) => {
|
||||
const [inputWarehouse, setInputWarehouse] = useState(
|
||||
item?.killer ? "killer" : "self"
|
||||
);
|
||||
const [coldHouses, setColdHouses] = useState([]);
|
||||
|
||||
const handleChangeInputWarehouse = (event) => {
|
||||
setInputWarehouse(event.target.value);
|
||||
@@ -52,6 +57,15 @@ export const SlaughterSubmitRealInventory = ({ item, updateTable }) => {
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (item?.poultryRequest?.freezing || item?.freezing) {
|
||||
dispatch(liveStockGetInventoryData()).then((r) => {
|
||||
const list = r.payload?.data ?? [];
|
||||
setColdHouses(Array.isArray(list) ? list : list?.results ?? []);
|
||||
});
|
||||
}
|
||||
}, [item?.poultryRequest?.freezing, item?.freezing, dispatch]);
|
||||
|
||||
const formik = useFormik({
|
||||
initialValues: {
|
||||
realNumber: item?.acceptedRealQuantity ? item?.acceptedRealQuantity : "",
|
||||
@@ -90,6 +104,52 @@ export const SlaughterSubmitRealInventory = ({ item, updateTable }) => {
|
||||
}),
|
||||
});
|
||||
|
||||
const maxWeightForColdHouse =
|
||||
value === "weight"
|
||||
? formik.values.realWeight
|
||||
? parseFloat(formik.values.realWeight)
|
||||
: 0
|
||||
: parseFloat(loss) || 0;
|
||||
|
||||
const formik3 = useFormik({
|
||||
initialValues: {
|
||||
coldHouseKey: "",
|
||||
coldHouseTransferWeight: "",
|
||||
},
|
||||
validate: (values) => {
|
||||
const errors = {};
|
||||
if (!item?.poultryRequest?.freezing && !item?.freezing) return errors;
|
||||
const w = values.coldHouseTransferWeight;
|
||||
const hasFreezingWeight =
|
||||
w !== "" && w !== undefined && w !== null && String(w).trim() !== "";
|
||||
if (hasFreezingWeight) {
|
||||
if (!values.coldHouseKey) {
|
||||
errors.coldHouseKey =
|
||||
"با وارد کردن وزن انتقالی، انتخاب سردخانه اجباری است!";
|
||||
}
|
||||
const num = Number(w);
|
||||
if (Number.isNaN(num)) {
|
||||
errors.coldHouseTransferWeight = "لطفا فیلد را به درستی وارد کنید!";
|
||||
} else if (num < 0) {
|
||||
errors.coldHouseTransferWeight = "مقدار نمیتواند منفی باشد";
|
||||
} else if (num > maxWeightForColdHouse) {
|
||||
errors.coldHouseTransferWeight =
|
||||
"وزن انتقالی نباید بیشتر از وزن لاشه باشد!";
|
||||
}
|
||||
}
|
||||
return errors;
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
(item?.poultryRequest?.freezing || item?.freezing) &&
|
||||
formik3.values.coldHouseTransferWeight
|
||||
) {
|
||||
formik3.validateForm();
|
||||
}
|
||||
}, [maxWeightForColdHouse]);
|
||||
|
||||
useEffect(() => {
|
||||
if (value === "weight") {
|
||||
if (item?.acceptedRealWeight && formik.values.realWeight) {
|
||||
@@ -119,11 +179,20 @@ export const SlaughterSubmitRealInventory = ({ item, updateTable }) => {
|
||||
};
|
||||
|
||||
const isFormValid = () => {
|
||||
let base = false;
|
||||
if (value === "weight") {
|
||||
return formik.isValid && isLossInRange();
|
||||
base = formik.isValid && isLossInRange();
|
||||
} else {
|
||||
return formik2.isValid;
|
||||
base = formik2.isValid;
|
||||
}
|
||||
if (item?.poultryRequest?.freezing || item?.freezing) {
|
||||
const hasFreezingWeight =
|
||||
formik3.values.coldHouseTransferWeight !== "" &&
|
||||
formik3.values.coldHouseTransferWeight !== null &&
|
||||
String(formik3.values.coldHouseTransferWeight).trim() !== "";
|
||||
return base && (!hasFreezingWeight || formik3.isValid);
|
||||
}
|
||||
return base;
|
||||
};
|
||||
|
||||
const handleSubmit = () => {
|
||||
@@ -146,12 +215,19 @@ export const SlaughterSubmitRealInventory = ({ item, updateTable }) => {
|
||||
kill_house_request_key: item?.key,
|
||||
};
|
||||
|
||||
dispatch(
|
||||
killhouseSubmitRealInventoryService({
|
||||
const submitPayload = {
|
||||
...payload,
|
||||
...(item?.killer ? { input_warehouse: inputWarehouse } : {}),
|
||||
})
|
||||
).then((r) => {
|
||||
...((item?.poultryRequest?.freezing || item?.freezing) &&
|
||||
formik3.values.coldHouseTransferWeight
|
||||
? {
|
||||
cold_house_key: formik3.values.coldHouseKey,
|
||||
freezing_weight: parseFloat(formik3.values.coldHouseTransferWeight),
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
dispatch(killhouseSubmitRealInventoryService(submitPayload)).then((r) => {
|
||||
if (r.payload.error) {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
@@ -381,6 +457,69 @@ export const SlaughterSubmitRealInventory = ({ item, updateTable }) => {
|
||||
</Typography>
|
||||
)}
|
||||
</Grid>
|
||||
{(item?.poultryRequest?.freezing || item?.freezing) && (
|
||||
<Grid xs={12} container gap={2} alignItems="center" flexWrap="wrap">
|
||||
<TextField
|
||||
fullWidth
|
||||
id="coldHouseTransferWeight"
|
||||
size="small"
|
||||
label="وزن انتقالی به سردخانه (کیلوگرم)"
|
||||
variant="outlined"
|
||||
value={formik3.values.coldHouseTransferWeight}
|
||||
error={
|
||||
formik3.touched.coldHouseTransferWeight
|
||||
? Boolean(formik3.errors.coldHouseTransferWeight)
|
||||
: null
|
||||
}
|
||||
onChange={formik3.handleChange}
|
||||
onBlur={formik3.handleBlur}
|
||||
helperText={
|
||||
formik3.touched.coldHouseTransferWeight &&
|
||||
Boolean(formik3.errors.coldHouseTransferWeight)
|
||||
? formik3.errors.coldHouseTransferWeight
|
||||
: null
|
||||
}
|
||||
/>
|
||||
<FormControl fullWidth size="small">
|
||||
<InputLabel id="cold-house-select-label">
|
||||
انتخاب سردخانه
|
||||
</InputLabel>
|
||||
<Select
|
||||
labelId="cold-house-select-label"
|
||||
id="coldHouseKey"
|
||||
name="coldHouseKey"
|
||||
value={formik3.values.coldHouseKey}
|
||||
label="انتخاب سردخانه"
|
||||
onChange={formik3.handleChange}
|
||||
onBlur={formik3.handleBlur}
|
||||
error={
|
||||
formik3.touched.coldHouseKey
|
||||
? Boolean(formik3.errors.coldHouseKey)
|
||||
: null
|
||||
}
|
||||
>
|
||||
<MenuItem value="">
|
||||
<em>انتخاب کنید</em>
|
||||
</MenuItem>
|
||||
{coldHouses?.map((ch, i) => (
|
||||
<MenuItem key={ch?.key ?? i} value={ch?.key}>
|
||||
سردخانه {ch?.name}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Select>
|
||||
{formik3.touched.coldHouseKey &&
|
||||
formik3.errors.coldHouseKey && (
|
||||
<Typography
|
||||
variant="caption"
|
||||
color="error"
|
||||
sx={{ mt: 0.5, display: "block" }}
|
||||
>
|
||||
{formik3.errors.coldHouseKey}
|
||||
</Typography>
|
||||
)}
|
||||
</FormControl>
|
||||
</Grid>
|
||||
)}
|
||||
<Grid>
|
||||
<Button
|
||||
disabled={!isFormValid()}
|
||||
|
||||
@@ -433,6 +433,7 @@ export const AdminAddBuyerForm = ({
|
||||
value={formik.values.nationalId}
|
||||
onChange={formik.handleChange}
|
||||
onBlur={formik.handleBlur}
|
||||
error={formik.errors.nationalId}
|
||||
helperText={formik.touched.nationalId && formik.errors.nationalId}
|
||||
/>
|
||||
<Autocomplete
|
||||
@@ -561,11 +562,7 @@ export const AdminAddBuyerForm = ({
|
||||
<TextField {...params} label="استان را انتخاب کنید" />
|
||||
)}
|
||||
/>
|
||||
{!notFound && (
|
||||
<Typography variant="caption" color="error">
|
||||
استان: {formik.values.province}
|
||||
</Typography>
|
||||
)}
|
||||
|
||||
{cityData && formik.values.province && (
|
||||
<>
|
||||
<Autocomplete
|
||||
@@ -592,12 +589,6 @@ export const AdminAddBuyerForm = ({
|
||||
<TextField {...params} label="شهر را انتخاب کنید" />
|
||||
)}
|
||||
/>
|
||||
|
||||
{!notFound && (
|
||||
<Typography variant="caption" color="error">
|
||||
شهر: {formik.values.city}
|
||||
</Typography>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</Grid>
|
||||
|
||||
@@ -6,19 +6,19 @@ import {
|
||||
Button,
|
||||
IconButton,
|
||||
TextField,
|
||||
Typography
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import SearchIcon from "@mui/icons-material/Search";
|
||||
import { Yup } from "../../../../lib/yup/yup";
|
||||
import {
|
||||
slaughterGetCitiesService,
|
||||
slaughterGetProvinceService
|
||||
slaughterGetProvinceService,
|
||||
} from "../../../slaughter-house/services/slaughter-get-provinces";
|
||||
import { Grid } from "../../../../components/grid/Grid";
|
||||
import { SPACING } from "../../../../data/spacing";
|
||||
import {
|
||||
stewardSellOutGetBuyers,
|
||||
stewatdSubmitBuyerDataService
|
||||
stewatdSubmitBuyerDataService,
|
||||
} from "../../../guild/services/steward-sell-out-get-buyers";
|
||||
import { DRAWER, LOADING_END } from "../../../../lib/redux/slices/appSlice";
|
||||
import { slaughterEditBuyerDataService } from "../../../slaughter-house/services/slaughter-house-submit-buyer";
|
||||
@@ -29,7 +29,7 @@ import { checkPathStartsWith } from "../../../../utils/checkPathStartsWith";
|
||||
export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
updateTable,
|
||||
isEdit,
|
||||
data
|
||||
data,
|
||||
}) => {
|
||||
const [openNotif] = useContext(AppContext);
|
||||
const [userData, setUserData] = useState(null);
|
||||
@@ -48,7 +48,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
lastName: "",
|
||||
unitName: "",
|
||||
province: "",
|
||||
city: ""
|
||||
city: "",
|
||||
},
|
||||
validationSchema: Yup.object({
|
||||
mobile: Yup.string()
|
||||
@@ -70,22 +70,22 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
.typeError("لطفا فیلد را به درستی وارد کنید!"),
|
||||
city: Yup.string()
|
||||
.required("این فیلد اجباری است!")
|
||||
.typeError("لطفا فیلد را به درستی وارد کنید!")
|
||||
})
|
||||
.typeError("لطفا فیلد را به درستی وارد کنید!"),
|
||||
}),
|
||||
});
|
||||
|
||||
const formik2 = useFormik({
|
||||
initialValues: {
|
||||
userInfoCheck: ""
|
||||
userInfoCheck: "",
|
||||
},
|
||||
validationSchema: Yup.object({
|
||||
userInfoCheck: Yup.string()
|
||||
.required("این فیلد اجباری است!")
|
||||
.min(11, "شماره موبایل باید 11 رقم باشد")
|
||||
.max(11, "شماره موبایل باید 11 رقم باشد")
|
||||
.matches(/^09\d{9}$/, "شماره موبایل باید با 09 شروع شود و 11 رقم باشد")
|
||||
.matches(/^09\d{9}$/, "شماره موبایل باید با 09 شروع شود و 11 رقم باشد"),
|
||||
}),
|
||||
validateOnMount: true
|
||||
validateOnMount: true,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -100,7 +100,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
lastName: userData.lastName || "",
|
||||
unitName: userData.unitName || "",
|
||||
province: userData.province || "",
|
||||
city: userData.city || ""
|
||||
city: userData.city || "",
|
||||
});
|
||||
setTimeout(() => {
|
||||
formik.validateForm();
|
||||
@@ -116,7 +116,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
lastName: data.lastName || "",
|
||||
unitName: data.unitName || "",
|
||||
province: data.province || "",
|
||||
city: data.city || ""
|
||||
city: data.city || "",
|
||||
});
|
||||
setTimeout(() => {
|
||||
formik.validateForm();
|
||||
@@ -194,7 +194,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
mobile: formik2.values.userInfoCheck,
|
||||
role_key: checkPathStartsWith("steward")
|
||||
? selectedSubUser?.key || ""
|
||||
: ""
|
||||
: "",
|
||||
})
|
||||
).then((r) => {
|
||||
dispatch(LOADING_END());
|
||||
@@ -205,7 +205,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "خریدار یافت نشد، یک خریدار جدید ثبت کنید!",
|
||||
severity: "error"
|
||||
severity: "error",
|
||||
});
|
||||
} else {
|
||||
const responseData = r.payload?.data;
|
||||
@@ -351,7 +351,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
last_name: formik.values.lastName,
|
||||
unit_name: formik.values.unitName,
|
||||
city: formik.values.city,
|
||||
province: formik.values.province
|
||||
province: formik.values.province,
|
||||
})
|
||||
).then((r) => {
|
||||
updateTable();
|
||||
@@ -360,7 +360,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: r.payload.error,
|
||||
severity: "error"
|
||||
severity: "error",
|
||||
});
|
||||
} else {
|
||||
dispatch(
|
||||
@@ -371,7 +371,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "عملیات با موفقیت انجام شد.",
|
||||
severity: "success"
|
||||
severity: "success",
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -384,7 +384,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
last_name: formik.values.lastName,
|
||||
unit_name: formik.values.unitName,
|
||||
city: formik.values.city,
|
||||
province: formik.values.province
|
||||
province: formik.values.province,
|
||||
})
|
||||
).then((r) => {
|
||||
updateTable();
|
||||
@@ -393,7 +393,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: r.payload.error,
|
||||
severity: "error"
|
||||
severity: "error",
|
||||
});
|
||||
} else {
|
||||
dispatch(
|
||||
@@ -404,7 +404,7 @@ export const StewardSellOutOfProvinceAddBuyer = ({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "عملیات با موفقیت انجام شد.",
|
||||
severity: "success"
|
||||
severity: "success",
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user