Skip to content
Snippets Groups Projects
Commit 23694644 authored by Tobias Kuhnert's avatar Tobias Kuhnert
Browse files

changed format of update information, now also displaying the time

parent 0cb80ef2
No related branches found
No related tags found
1 merge request!120Resolve "Switch to date time picker for mount & unmount actions"
......@@ -193,7 +193,7 @@ permissions and limitations under the Licence.
>
<v-list-item-content>
<v-list-item-title>
Update for {{ value.unpack().date | dateToString }}
Update for {{ value.unpack().date | dateToDateTimeStringHHMM }}
</v-list-item-title>
</v-list-item-content>
</v-list-item>
......@@ -203,7 +203,7 @@ permissions and limitations under the Licence.
>
<v-list-item-content>
<v-list-item-title>
Update for {{ selectedDate | dateToString }}
Update for {{ selectedDate | dateToDateTimeStringHHMM }}
</v-list-item-title>
</v-list-item-content>
</v-list-item>
......@@ -250,7 +250,7 @@ import { DeviceNode } from '@/viewmodels/DeviceNode'
import { IUnmountData } from '@/viewmodels/IUnmountData'
import { PlatformNode } from '@/viewmodels/PlatformNode'
import { dateToString } from '@/utils/dateHelper'
import { dateToDateTimeStringHHMM } from '@/utils/dateHelper'
/**
* A class component to display information about a selected tree node
......@@ -261,7 +261,7 @@ import { dateToString } from '@/utils/dateHelper'
ConfigurationsSelectedItemUnmountForm
},
filters: {
dateToString
dateToDateTimeStringHHMM
}
})
// @ts-ignore
......
......@@ -40,6 +40,13 @@ export const dateToString = (aDate: DateTime | null): string => {
return aDate.setZone('UTC').toFormat('yyyy-MM-dd')
}
export const dateToDateTimeStringHHMM = (aDate: DateTime | null): string => {
if (!aDate) {
return ''
}
return aDate.setZone('UTC').toFormat('yyyy-MM-dd HH:mm')
}
export const stringToDate = (aDate: string): DateTime => {
return DateTime.fromISO(aDate, { zone: 'UTC' })
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment