fix : time error
This commit is contained in:
@@ -243,7 +243,11 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
|
||||
formattedNumber
|
||||
placeholder={
|
||||
distributionType === "group"
|
||||
? `تعداد (${batch.label})`
|
||||
? `تعداد ${
|
||||
speciesOptions().find(
|
||||
(s: any) => s.key === batch.species_code
|
||||
)?.value
|
||||
} (${batch.label}) `
|
||||
: `تعداد ${
|
||||
speciesOptions().find(
|
||||
(s: any) => s.key === batch.species_code
|
||||
|
||||
@@ -63,9 +63,11 @@ export default function TagActiveDistributions() {
|
||||
? index + 1
|
||||
: index + tableInfo.page_size * (tableInfo.page - 1) + 1,
|
||||
item?.dist_batch_identity,
|
||||
`${formatJustDate(item?.create_date)} (${formatJustTime(
|
||||
item?.create_date
|
||||
)})`,
|
||||
`${formatJustDate(item?.create_date)} (${
|
||||
formatJustDate(item?.create_date)
|
||||
? formatJustTime(item?.create_date)
|
||||
: "-"
|
||||
})`,
|
||||
item?.assigner_org?.name,
|
||||
item?.assigned_org?.name,
|
||||
item?.total_tag_count,
|
||||
|
||||
@@ -63,9 +63,11 @@ export default function TagCanceledDistributions() {
|
||||
? index + 1
|
||||
: index + tableInfo.page_size * (tableInfo.page - 1) + 1,
|
||||
item?.dist_batch_identity,
|
||||
`${formatJustDate(item?.create_date)} (${formatJustTime(
|
||||
item?.create_date
|
||||
)})`,
|
||||
`${formatJustDate(item?.create_date)} (${
|
||||
formatJustDate(item?.create_date)
|
||||
? formatJustTime(item?.create_date)
|
||||
: "-"
|
||||
})`,
|
||||
item?.assigner_org?.name,
|
||||
item?.assigned_org?.name,
|
||||
item?.total_tag_count,
|
||||
|
||||
@@ -35,7 +35,9 @@ export const formatJustDate = (time: any) => {
|
||||
};
|
||||
|
||||
export const formatJustTime = (time: any) => {
|
||||
return format(new Date(time), "HH:mm");
|
||||
if (time) {
|
||||
return format(new Date(time), "HH:mm");
|
||||
} else return "";
|
||||
};
|
||||
|
||||
export function formatStampDate(timestamp: number) {
|
||||
|
||||
Reference in New Issue
Block a user