Compare commits

...

3 Commits

Author SHA1 Message Date
9b74be078f version changed to 02.62 2026-02-02 11:03:09 +03:30
5fd55c4b10 fix: filter error 2026-02-02 11:03:01 +03:30
6b5276ce36 add: new tagging key 2026-02-02 08:40:06 +03:30
3 changed files with 26 additions and 23 deletions

View File

@@ -62,14 +62,14 @@ export default function Tagging() {
item?.species_code === 1
? "گاو"
: item?.species_code === 2
? "گاومیش"
: item?.species_code === 3
? "شتر"
: item?.species_code === 4
? "گوسفند"
: item?.species_code === 5
? "بز"
: "نامشخص",
? "گاومیش"
: item?.species_code === 3
? "شتر"
: item?.species_code === 4
? "گوسفند"
: item?.species_code === 5
? "بز"
: "نامشخص",
item?.serial_from || "-",
item?.serial_to || "-",
item?.total_distributed_tags || 0,
@@ -167,6 +167,7 @@ export default function Tagging() {
columns={[
"تعداد گروه پلاک",
"پلاک‌های تولیدشده",
"گروه پلاک های دارای توزیع",
"پلاک توزیع شده",
"پلاک باقی‌مانده",
"جزئیات گونه ها",
@@ -176,6 +177,8 @@ export default function Tagging() {
tagDashboardData?.batch_count?.toLocaleString() || 0,
tagDashboardData?.tag_count_created_by_batch?.toLocaleString() ||
0,
tagDashboardData?.has_distributed_batches_number?.toLocaleString() ||
0,
tagDashboardData?.total_distributed_tags?.toLocaleString() || 0,
tagDashboardData?.total_remaining_tags?.toLocaleString() || 0,
<TableButton

View File

@@ -42,7 +42,7 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
? item?.distribution_type === "random"
? "random"
: "group"
: "group"
: "group",
);
const [batches, setBatches] = useState<BatchItem[]>([]);
@@ -116,25 +116,25 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
showToast(
isEdit ? "ویرایش با موفقیت انجام شد" : "ثبت با موفقیت انجام شد",
"success"
"success",
);
getData();
closeModal();
} catch (error: any) {
showToast(
error?.response?.data?.message || "خطا در ثبت اطلاعات!",
"error"
"error",
);
}
};
const speciesOptions = () => {
return speciesData?.results?.map((opt: any) => {
return {
return (
speciesData?.results?.map((opt: any) => ({
key: opt?.value,
value: opt?.name,
};
});
})) ?? []
);
};
return (
@@ -195,14 +195,14 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
items?.map((r: any) => {
const existing = batches.find(
(b) =>
b.batch_identity === r.key1 && b.species_code === r.key2
b.batch_identity === r.key1 && b.species_code === r.key2,
);
return {
batch_identity: r.key1,
species_code: r.key2,
count: existing?.count ?? "",
};
}) || []
}) || [],
);
}}
onChangeValue={(labels) => {
@@ -210,7 +210,7 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
prev.map((item, index) => ({
...item,
label: labels[index],
}))
})),
);
}}
/>
@@ -229,7 +229,7 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
species_code: k as number,
count: prev?.count ?? "",
};
})
}),
);
}}
title="گونه"
@@ -245,12 +245,12 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
distributionType === "group"
? `تعداد ${
speciesOptions().find(
(s: any) => s.key === batch.species_code
(s: any) => s.key === batch.species_code,
)?.value
} (${batch.label}) `
: `تعداد ${
speciesOptions().find(
(s: any) => s.key === batch.species_code
(s: any) => s.key === batch.species_code,
)?.value
}`
}
@@ -271,7 +271,7 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
b.count === "" ||
b.count === undefined ||
b.count === null ||
Number(b.count) <= 0
Number(b.count) <= 0,
)
}
type="submit"

View File

@@ -1 +1 @@
02.61
02.62