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