update: inquiry toast errors
This commit is contained in:
@@ -78,7 +78,7 @@ interface InquiryFarmResponse {
|
||||
const VeterinaryTransfer: React.FC = () => {
|
||||
const [trIDCode, setTrIDCode] = useState("");
|
||||
const [transferData, setTransferData] = useState<VeterinaryTransferItem[]>(
|
||||
[]
|
||||
[],
|
||||
);
|
||||
const [farmInfoByPartId, setFarmInfoByPartId] = useState<
|
||||
Record<string, InquiryFarmResponse | null>
|
||||
@@ -117,11 +117,7 @@ const VeterinaryTransfer: React.FC = () => {
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error("Veterinary transfer error:", error);
|
||||
showToast(
|
||||
error?.response?.data?.message ||
|
||||
"خطا در دریافت اطلاعات گواهی بهداشتی حمل",
|
||||
"error"
|
||||
);
|
||||
showToast("خطا در دریافت اطلاعات گواهی بهداشتی حمل", "error");
|
||||
setTransferData([]);
|
||||
}
|
||||
};
|
||||
@@ -145,10 +141,7 @@ const VeterinaryTransfer: React.FC = () => {
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error("Inquiry farm error:", error);
|
||||
showToast(
|
||||
error?.response?.data?.message || "خطا در استعلام واحد کشاورزی",
|
||||
"error"
|
||||
);
|
||||
showToast("خطا در استعلام واحد کشاورزی", "error");
|
||||
setFarmInfoByPartId((prev) => ({ ...prev, [code]: null }));
|
||||
} finally {
|
||||
setFarmLoadingByPartId((prev) => ({ ...prev, [code]: false }));
|
||||
|
||||
Reference in New Issue
Block a user