remove => unnecessary console logs
This commit is contained in:
@@ -1157,31 +1157,29 @@ export const AvicultureFreeSaleNewRequest = () => {
|
||||
buyerType: formik.values.buyerType,
|
||||
},
|
||||
})
|
||||
)
|
||||
.then((r) => {
|
||||
dispatch(LOADING_END());
|
||||
if (r.payload.error) {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: r.payload.error,
|
||||
severity: "error",
|
||||
});
|
||||
} else {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "عملیات با موفقیت انجام شد.",
|
||||
severity: "success",
|
||||
});
|
||||
dispatch(avicultureGetRequests());
|
||||
dispatch(provinceGetFreeSalesRequestsService());
|
||||
dispatch(
|
||||
DRAWER({ right: false, bottom: false, content: null })
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch((e) => console.log(e));
|
||||
).then((r) => {
|
||||
dispatch(LOADING_END());
|
||||
if (r.payload.error) {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: r.payload.error,
|
||||
severity: "error",
|
||||
});
|
||||
} else {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "عملیات با موفقیت انجام شد.",
|
||||
severity: "success",
|
||||
});
|
||||
dispatch(avicultureGetRequests());
|
||||
dispatch(provinceGetFreeSalesRequestsService());
|
||||
dispatch(
|
||||
DRAWER({ right: false, bottom: false, content: null })
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}}
|
||||
size="large"
|
||||
|
||||
@@ -431,9 +431,6 @@ export const AvicultureNewRequest = () => {
|
||||
buyerType: "",
|
||||
},
|
||||
validationSchemaFreeSale,
|
||||
onSubmit: (values) => {
|
||||
// console.log(values);
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -1121,48 +1118,46 @@ export const AvicultureNewRequest = () => {
|
||||
kill_house_list: formik.values.selectedSlaughters,
|
||||
buyer: null,
|
||||
})
|
||||
)
|
||||
.then((r) => {
|
||||
dispatch(LOADING_END());
|
||||
if (r.payload.error) {
|
||||
).then((r) => {
|
||||
dispatch(LOADING_END());
|
||||
if (r.payload.error) {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: r.payload.error.response.data.result,
|
||||
severity: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (r.error) {
|
||||
if (r.error.message.includes("403")) {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: r.payload.error.response.data.result,
|
||||
msg: "تعداد مرغ برای کشتار از باقیمانده بیشتر است!",
|
||||
severity: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (r.error) {
|
||||
if (r.error.message.includes("403")) {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "تعداد مرغ برای کشتار از باقیمانده بیشتر است!",
|
||||
severity: "error",
|
||||
});
|
||||
} else {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "مشکلی پیش آمده است!",
|
||||
severity: "error",
|
||||
});
|
||||
}
|
||||
} else {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "عملیات با موفقیت انجام شد.",
|
||||
severity: "success",
|
||||
msg: "مشکلی پیش آمده است!",
|
||||
severity: "error",
|
||||
});
|
||||
dispatch(avicultureGetRequests());
|
||||
dispatch(
|
||||
DRAWER({ right: false, bottom: false, content: null })
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch((e) => console.log(e, "ooooo"));
|
||||
} else {
|
||||
openNotif({
|
||||
vertical: "top",
|
||||
horizontal: "center",
|
||||
msg: "عملیات با موفقیت انجام شد.",
|
||||
severity: "success",
|
||||
});
|
||||
dispatch(avicultureGetRequests());
|
||||
dispatch(
|
||||
DRAWER({ right: false, bottom: false, content: null })
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}}
|
||||
size="large"
|
||||
|
||||
@@ -100,7 +100,6 @@ export const DashboardPeriodicPerformance = () => {
|
||||
},
|
||||
];
|
||||
|
||||
console.log(data);
|
||||
const reportBarKilledOutProvince = [
|
||||
{
|
||||
title: "تعداد بارها",
|
||||
|
||||
@@ -42,15 +42,9 @@ export const GuildReceiveBarOperation = ({ item }) => {
|
||||
authCode: Yup.string().required("کداحراز اجباری است"),
|
||||
});
|
||||
|
||||
const onSubmit = () => {
|
||||
// Handle form submission here
|
||||
// console.log("Form submitted with values:", values);
|
||||
};
|
||||
|
||||
const formik = useFormik({
|
||||
initialValues,
|
||||
validationSchema,
|
||||
onSubmit,
|
||||
});
|
||||
|
||||
const [isChecked, setChecked] = useState(false);
|
||||
|
||||
@@ -259,7 +259,6 @@ export const StewardSegmentSubmitOperation = ({
|
||||
const fetchCalendarData = useCallback(async () => {
|
||||
try {
|
||||
const currentRole = getRoleFromUrl();
|
||||
console.log(getRoleFromUrl());
|
||||
let remainWeightEndpoint = "kill-house-remain-weight";
|
||||
if (currentRole === "Steward") {
|
||||
remainWeightEndpoint = "steward-remain-weight";
|
||||
|
||||
@@ -598,8 +598,6 @@ export const CreateGuilds = ({ guild, updateTable }) => {
|
||||
const shouldShowInquiryForm = !guild && !isInquiryDone;
|
||||
const shouldShowFormContent = guild || isInquiryDone;
|
||||
|
||||
console.log(formik.errors);
|
||||
|
||||
return (
|
||||
<form onSubmit={formik.handleSubmit}>
|
||||
<Grid
|
||||
|
||||
@@ -24,8 +24,6 @@ import {
|
||||
} from "../../../../lib/redux/slices/appSlice";
|
||||
|
||||
export const FailedTransactions = () => {
|
||||
const authToken = useSelector((state) => state.userSlice.authToken);
|
||||
console.log(authToken);
|
||||
const userInfo = useSelector((state) => state.userSlice);
|
||||
|
||||
const [, , selectedDate1, setSelectedDate1, selectedDate2, setSelectedDate2] =
|
||||
|
||||
@@ -100,7 +100,6 @@ export const ManageGuildsOperations = ({ item, updateTable, userType }) => {
|
||||
|
||||
dispatch(LOADING_END());
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
dispatch(LOADING_END());
|
||||
const errorMessage =
|
||||
error.response?.data?.result ||
|
||||
|
||||
@@ -75,7 +75,6 @@ export const ManageGuildsRequests = ({ userType }) => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
console.log(data);
|
||||
const d = data?.map((item, i) => {
|
||||
return [
|
||||
page === 1 ? i + 1 : i + perPage * (page - 1) + 1,
|
||||
|
||||
@@ -48,7 +48,6 @@ export const PoultriesDetails = () => {
|
||||
const [provinceOptions, setProvinceOptions] = useState([]);
|
||||
const [selectedProvince, setSelectedProvince] = useState("");
|
||||
const [isProvinceLoading, setIsProvinceLoading] = useState(false);
|
||||
console.log(from);
|
||||
const [, , selectedDate1, setSelectedDate1, selectedDate2, setSelectedDate2] =
|
||||
useContext(AppContext);
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@ export const ProvinceAddBuyerAutoAllocation = ({
|
||||
initialValues: {
|
||||
num: "",
|
||||
},
|
||||
onSubmit: (values) => {
|
||||
// console.log(values);
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -86,7 +83,7 @@ export const ProvinceAddBuyerAutoAllocation = ({
|
||||
});
|
||||
setDataTable((prevState) => {
|
||||
// let edited = Array.from(prevState);
|
||||
let edited = deepCopy(prevState);
|
||||
const edited = deepCopy(prevState);
|
||||
edited[poultryIndex].allocations.push({
|
||||
allocationKey: null,
|
||||
type: selectedCountry?.obj?.killer,
|
||||
@@ -116,8 +113,8 @@ export const ProvinceAddBuyerAutoAllocation = ({
|
||||
};
|
||||
|
||||
function deepCopy(obj) {
|
||||
let newObj = Array.isArray(obj) ? [] : {};
|
||||
for (let key in obj) {
|
||||
const newObj = Array.isArray(obj) ? [] : {};
|
||||
for (const key in obj) {
|
||||
if (typeof obj[key] === "object" && obj[key] !== null) {
|
||||
newObj[key] = deepCopy(obj[key]);
|
||||
} else {
|
||||
|
||||
@@ -371,10 +371,6 @@ const RealCarcassesInput = ({
|
||||
number2: item.realWeightOfCarcasses,
|
||||
},
|
||||
validationSchema: validationSchema,
|
||||
onSubmit: (values) => {
|
||||
// Handle form submission
|
||||
// console.log(values);
|
||||
},
|
||||
});
|
||||
// const [numberInput, setNumberInput] = useState(realNumberOfCarcasses);
|
||||
// const [textInput, setTextInput] = useState(realWeightOfCarcasses);
|
||||
@@ -485,8 +481,6 @@ const RegistrationInput = ({
|
||||
setTextInput(e.target.value);
|
||||
};
|
||||
|
||||
console.log(item.systemRegistrationCode, "zzzz");
|
||||
|
||||
return (
|
||||
<Grid
|
||||
container
|
||||
|
||||
@@ -50,7 +50,6 @@ export const ProvinceCreateKillhouse = () => {
|
||||
validationSchema,
|
||||
onSubmit: (values) => {
|
||||
// Handle form submission here
|
||||
// console.log(values);
|
||||
const {
|
||||
first_name,
|
||||
last_name,
|
||||
|
||||
@@ -22,9 +22,6 @@ export const ProvinceManageSlaughterhouseQuota = ({
|
||||
percent: percent,
|
||||
},
|
||||
validationSchema: validationSchema,
|
||||
onSubmit: (values) => {
|
||||
// console.log(values);
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -20,8 +20,6 @@ export const ProvinceSelectSlaughterForSlaughter = ({
|
||||
(state) => state.slaughterSlice
|
||||
);
|
||||
|
||||
// console.log(killHouseForKiller, "uuuuu");
|
||||
|
||||
// useEffect(() => {
|
||||
// setSelectedValue(killHouseForKiller?.key);
|
||||
// }, []);
|
||||
|
||||
@@ -146,8 +146,6 @@ export const SlaughterColdHouseBars = ({
|
||||
registrationCodeStatus = "-";
|
||||
}
|
||||
|
||||
console.log(item);
|
||||
|
||||
return [
|
||||
page === 1 ? i + 1 : i + perPage * (page - 1) + 1,
|
||||
formatJustDate(item?.date),
|
||||
|
||||
@@ -407,7 +407,6 @@ export const SlaughterManageDispensersForm = ({
|
||||
setUserFound(true);
|
||||
setUserInfo(userDataFromApi);
|
||||
|
||||
console.log(userDataFromApi);
|
||||
setUserData({
|
||||
national_id: userDataFromApi.nationalCode || nationalCode,
|
||||
first_name: userDataFromApi.firstName || "",
|
||||
|
||||
@@ -1068,14 +1068,6 @@ export const SlaughterSubmitFreeBuy = ({ edit, updateTable }) => {
|
||||
|
||||
{!edit && (
|
||||
<Button
|
||||
onClick={() => {
|
||||
formik.validateForm().then(() => {
|
||||
// console.log(
|
||||
// "Validation errors on submit:",
|
||||
// errors
|
||||
// );
|
||||
});
|
||||
}}
|
||||
type="submit"
|
||||
variant="contained"
|
||||
color="primary"
|
||||
|
||||
@@ -91,8 +91,7 @@ export const HatchingRemainPredictionStats = ({ province }) => {
|
||||
textInput: "45",
|
||||
},
|
||||
validationSchema: validationSchema,
|
||||
onSubmit: (values) => {
|
||||
// console.log(values);
|
||||
onSubmit: () => {
|
||||
fetchData();
|
||||
},
|
||||
});
|
||||
|
||||
@@ -143,7 +143,6 @@ export const handleSetFormDataFromTableDataForSlaughterAddBuyer = (
|
||||
tableData,
|
||||
formik
|
||||
) => {
|
||||
console.log(tableData);
|
||||
const formData = {
|
||||
mobile: tableData.mobile || "",
|
||||
firstName: tableData.firstName || "",
|
||||
|
||||
@@ -135,7 +135,6 @@ export const handleSetFormDataFromUserDataForStewardAddBuyer = (
|
||||
) => {
|
||||
const user = userData?.[0];
|
||||
if (user) {
|
||||
console.log(user);
|
||||
formik.setValues({
|
||||
mobile: user.mobile || "",
|
||||
firstName: user.firstName || "",
|
||||
|
||||
@@ -88,7 +88,6 @@ export const StewardShowAllocations = forwardRef(
|
||||
};
|
||||
|
||||
const updateTable = () => {
|
||||
console.log("--------------------------------------");
|
||||
fetchApiData(1);
|
||||
handleUpdate();
|
||||
};
|
||||
|
||||
@@ -129,9 +129,6 @@ export const CreateTicket = ({ id, getMessages, fetchMessages }) => {
|
||||
title: Yup.string().required("عنوان تیکت ضروری است"),
|
||||
text: Yup.string().required("متن تیکت ضروری است"),
|
||||
}),
|
||||
onSubmit: (values) => {
|
||||
// console.log(values);
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -146,7 +143,7 @@ export const CreateTicket = ({ id, getMessages, fetchMessages }) => {
|
||||
|
||||
const [profileImages, setProfileImages] = useState([]);
|
||||
|
||||
const factorPaymentHandler = (imageList, addUpdateIndex) => {
|
||||
const factorPaymentHandler = (imageList) => {
|
||||
if (imageList[0]) {
|
||||
formik.setFieldValue("image", fixBase64(imageList[0]?.data_url));
|
||||
}
|
||||
|
||||
@@ -38,9 +38,6 @@ export const SubmitRefferTicket = ({ fetchMessages, ticket }) => {
|
||||
validationSchema: Yup.object({
|
||||
users: Yup.array().required("حداقل یک کاربر انتخاب کنید!"),
|
||||
}),
|
||||
onSubmit: (values) => {
|
||||
// console.log(values);
|
||||
},
|
||||
});
|
||||
|
||||
const [permissionList, setPermissionList] = useState([]);
|
||||
|
||||
@@ -27,10 +27,6 @@ import { ProvinceNationalInfoFarm } from "../features/province/components/provin
|
||||
|
||||
const OperatorNewHatching = () => {
|
||||
const { pathname } = useLocation();
|
||||
// console.log(
|
||||
// "fdloklofd",
|
||||
// pathname.includes(ROUTE_CITY_VISOR_STATICSـHATCHINGS_DETAILS)
|
||||
// );
|
||||
return (
|
||||
<>
|
||||
<Box display={"flex"} justifyContent="center">
|
||||
|
||||
@@ -26,7 +26,6 @@ const Ticket = () => {
|
||||
try {
|
||||
// Simulate a submission
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
// console.log(values);
|
||||
} finally {
|
||||
setIsSubmitting(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user