Handle time stamp formatting in selection dialog

This commit is contained in:
guerler
2024-04-16 17:48:48 +03:00
parent d2b718ed72
commit ea57bbabb6
2 changed files with 1 additions and 11 deletions
@@ -56,16 +56,6 @@ async function load() {
items.value = incoming.map((item: any) => {
let timeStamp = item[props.timeKey];
showTime.value = !!timeStamp;
if (timeStamp) {
const date = new Date(timeStamp);
timeStamp = date.toLocaleString("default", {
day: "numeric",
month: "short",
year: "numeric",
minute: "numeric",
hour: "numeric",
});
}
return {
id: item.id,
label: item[props.labelKey] || null,
@@ -189,7 +189,7 @@ watch(
<span v-else>-</span>
</template>
<template v-slot:cell(time)="data">
{{ data.value ? data.value : "-" }}
{{ formatTime(data.value) }}
</template>
<template v-slot:cell(update_time)="data">
{{ formatTime(data.value) }}