From 147d61d3b9d111a59c13dabfdb7f0af36b4b01e8 Mon Sep 17 00:00:00 2001 From: Mario Bielert Date: Fri, 25 Oct 2024 16:36:43 +0200 Subject: [PATCH] Add time range label to exported pdfs Also some tweaks to margins in the generated pdf and fixes it to one page. --- src/MetricTimestamp.js | 4 ++++ src/components/analyzeTable.vue | 9 --------- src/ui/analyze-popup.vue | 16 +++++++++++++++- src/ui/export-popup.vue | 14 ++++++++------ 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/MetricTimestamp.js b/src/MetricTimestamp.js index 6bd1256..90db1b3 100644 --- a/src/MetricTimestamp.js +++ b/src/MetricTimestamp.js @@ -52,4 +52,8 @@ export class MetricTimestamp { getValue () { return this.timeValue } + + getString () { + return new Date(this.getUnix()).toLocaleString() + } } diff --git a/src/components/analyzeTable.vue b/src/components/analyzeTable.vue index f7a39f1..c7dad3f 100644 --- a/src/components/analyzeTable.vue +++ b/src/components/analyzeTable.vue @@ -10,9 +10,6 @@ bordered caption-top > - - Zeitraum von {{ startTimeFormatted }} bis {{ endTimeFormatted }} ( {{ timeLenghtFormatted }} Sekunden ) - @@ -83,12 +80,6 @@ export default { } }, computed: { - startTimeFormatted () { - return moment(this.timestamp.start).format('DD.MM.YYYY, HH:mm:ss') - }, - endTimeFormatted () { - return moment(this.timestamp.end).format('DD.MM.YYYY, HH:mm:ss') - }, timeLenghtFormatted () { return moment(this.timestamp.end).diff(moment(this.timestamp.start), 'seconds') }, diff --git a/src/ui/analyze-popup.vue b/src/ui/analyze-popup.vue index f73cf15..05558c3 100644 --- a/src/ui/analyze-popup.vue +++ b/src/ui/analyze-popup.vue @@ -12,6 +12,9 @@ @@ -20,6 +23,7 @@