This commit is contained in:
2021-06-09 15:42:29 +00:00
parent fd64cb9b94
commit e36144ce2c
2 changed files with 43 additions and 15 deletions

View File

@@ -182,11 +182,12 @@ export default {
let theHours = 0;
let theMinutes = 0;
let theSeconds = 0;
let ret = "";
if (value == null) {
return "";
return ret;
} else {
let work = vm.value.split(":");
let work = value.split(":");
//has days?
if (work[0].includes(".")) {
let dh = work[0].split(".");
@@ -203,8 +204,30 @@ export default {
} else {
theSeconds = Number(work[2]);
}
if (theDays != 0) {
ret += theDays + " " + window.$gz.translation.get("TimeSpanDays") + " ";
}
if (theHours != 0) {
ret +=
theHours + " " + window.$gz.translation.get("TimeSpanHours") + " ";
}
if (theMinutes != 0) {
ret +=
theMinutes +
" " +
window.$gz.translation.get("TimeSpanMinutes") +
" ";
}
if (theSeconds != 0) {
ret +=
theSeconds +
" " +
window.$gz.translation.get("TimeSpanSeconds") +
" ";
}
return ret;
}
todo: finish this then move on to the UI part and jam this in
},
///////////////////////////////////////////////
// Convert a utc date to local time zone

View File

@@ -22,19 +22,23 @@
:color="i.fetched ? 'grey lighten-2' : 'primary'"
>
<v-card :outlined="$store.state.darkMode">
<v-card-title>{{ i.name }}</v-card-title>
<v-card-title
>{{ i.name
}}<span v-if="i.ageValueViz.length" class="ml-1">
({{ i.ageValueViz }})</span
></v-card-title
>
<v-card-subtitle
>{{ i.uicreated }} - {{ i.uievent }}</v-card-subtitle
>
<v-card-text
><template v-if="i.ayaType != 0"
><v-icon large class="mr-2">{{ i.icon }}</v-icon
>{{ i.uiayatype }}</template
>
><template v-if="i.ayaType != 0">
<v-btn large color="primary" text @click="openItem(i)"
><v-icon large left>{{ i.icon }}</v-icon
>{{ i.uiayatype }}</v-btn
>
</template>
<div class="mt-4" v-if="i.message">{{ i.message }}</div>
<div class="mt-4" v-if="i.ageValue != '00:00:00'">
{{ i.ageValue }}
</div>
</v-card-text>
<v-card-actions>
@@ -43,11 +47,8 @@
text
@click="openSubscription(i)"
v-if="i.eventType != 27"
>{{ $ay.t("NotifySubscription") }}</v-btn
>{{ $ay.t("Open") }}</v-btn
>
<v-btn text @click="openItem(i)" v-if="i.objectId != 0">{{
$ay.t("Open")
}}</v-btn>
</v-card-actions>
</v-card>
</v-timeline-item>
@@ -200,6 +201,10 @@ export default {
if (temp[i].name == "~SERVER~") {
temp[i].name = vm.$ay.t("Server");
}
temp[i].ageValueViz = window.$gz.locale.durationLocalized(
temp[i].ageValue
);
}
vm.obj = [...temp];