Skip to content

Commit

Permalink
ACQUI-101: Format last_updated fields
Browse files Browse the repository at this point in the history
This commit adds a timestamp category to DataField.vue to get a substring of the updated_on timestamp
  • Loading branch information
mblenk committed Mar 8, 2024
1 parent 2b46fd4 commit 3a9bced
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Koha/Plugin/Acquire/installer/config/schemaToUI.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
},
"last_updated": {
"label": "Last updated",
"type": "string"
"type": "timestamp"
}
},
"ledger": {
Expand Down Expand Up @@ -132,7 +132,7 @@
},
"last_updated": {
"label": "Last updated",
"type": "string"
"type": "timestamp"
},
"currency": {
"label": "Currency",
Expand Down Expand Up @@ -222,7 +222,7 @@
},
"last_updated": {
"label": "Last updated",
"type": "string"
"type": "timestamp"
},
"currency": {
"label": "Currency",
Expand Down
12 changes: 12 additions & 0 deletions src/components/DataField.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<template>
<li v-if="item.type === 'string'">
<label>{{ item.label }}:</label>
<span>
{{ item.value }}
</span>
</li>
<li v-if="item.type === 'timestamp'">
<label>{{ item.label }}:</label>
<span>
{{ item.value.substring(0,10) }}
</span>
</li>
<li v-if="item.type === 'string'">
<label>{{ item.label }}:</label>
<span>
Expand Down

0 comments on commit 3a9bced

Please sign in to comment.