fix : time error

This commit is contained in:
2026-01-26 14:34:56 +03:30
parent b9f9e6cd06
commit 2a6d978dba
4 changed files with 18 additions and 8 deletions

View File

@@ -243,7 +243,11 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
formattedNumber formattedNumber
placeholder={ placeholder={
distributionType === "group" distributionType === "group"
? `تعداد (${batch.label})` ? `تعداد ${
speciesOptions().find(
(s: any) => s.key === batch.species_code
)?.value
} (${batch.label}) `
: `تعداد ${ : `تعداد ${
speciesOptions().find( speciesOptions().find(
(s: any) => s.key === batch.species_code (s: any) => s.key === batch.species_code

View File

@@ -63,9 +63,11 @@ export default function TagActiveDistributions() {
? index + 1 ? index + 1
: index + tableInfo.page_size * (tableInfo.page - 1) + 1, : index + tableInfo.page_size * (tableInfo.page - 1) + 1,
item?.dist_batch_identity, item?.dist_batch_identity,
`${formatJustDate(item?.create_date)} (${formatJustTime( `${formatJustDate(item?.create_date)} (${
item?.create_date formatJustDate(item?.create_date)
)})`, ? formatJustTime(item?.create_date)
: "-"
})`,
item?.assigner_org?.name, item?.assigner_org?.name,
item?.assigned_org?.name, item?.assigned_org?.name,
item?.total_tag_count, item?.total_tag_count,

View File

@@ -63,9 +63,11 @@ export default function TagCanceledDistributions() {
? index + 1 ? index + 1
: index + tableInfo.page_size * (tableInfo.page - 1) + 1, : index + tableInfo.page_size * (tableInfo.page - 1) + 1,
item?.dist_batch_identity, item?.dist_batch_identity,
`${formatJustDate(item?.create_date)} (${formatJustTime( `${formatJustDate(item?.create_date)} (${
item?.create_date formatJustDate(item?.create_date)
)})`, ? formatJustTime(item?.create_date)
: "-"
})`,
item?.assigner_org?.name, item?.assigner_org?.name,
item?.assigned_org?.name, item?.assigned_org?.name,
item?.total_tag_count, item?.total_tag_count,

View File

@@ -35,7 +35,9 @@ export const formatJustDate = (time: any) => {
}; };
export const formatJustTime = (time: any) => { export const formatJustTime = (time: any) => {
if (time) {
return format(new Date(time), "HH:mm"); return format(new Date(time), "HH:mm");
} else return "";
}; };
export function formatStampDate(timestamp: number) { export function formatStampDate(timestamp: number) {