Skip to content

Commit

Permalink
Handle time stamp formatting in selection dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Apr 16, 2024
1 parent 85ec01a commit 964b63f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions client/src/components/SelectionDialog/BasicSelectionDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ async function load() {
items.value = incoming.map((item: any) => {
let timeStamp = item[props.timeKey];

Check failure on line 57 in client/src/components/SelectionDialog/BasicSelectionDialog.vue

View workflow job for this annotation

GitHub Actions / client-unit-test (18)

'timeStamp' is never reassigned. Use 'const' instead
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,
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/SelectionDialog/SelectionDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down

0 comments on commit 964b63f

Please sign in to comment.