This commit is contained in:
2020-10-30 23:22:35 +00:00
parent 6534e2c107
commit 302c9f2d48
2 changed files with 7 additions and 17 deletions

View File

@@ -5,7 +5,7 @@
<v-toolbar flat dense>
<template v-if="hasUrl">
<v-btn text icon :to="moreUrl">
<template v-if="showCount && count > 0">
<template v-if="count > 0">
<v-badge overlap>
<template v-slot:badge>
{{ count }}
@@ -19,7 +19,7 @@
</v-btn>
</template>
<template v-else>
<template v-if="showCount && count > 0">
<template v-if="count > 0">
<v-badge overlap class="mr-4">
<template v-slot:badge>
{{ count }}
@@ -120,10 +120,9 @@ export default {
},
title: String,
moreUrl: String,
showCount: Boolean,
count: { type: Number, default: 0 },
updateFrequency: { type: Number, default: 60000 },
icon: String
icon: { type: String, default: "$ayiTachometer" }
},
computed: {
hasUrl: function() {

View File

@@ -53,7 +53,7 @@
:title="item.title"
:id="item.id"
:showCount="true"
:count="3"
:count="0"
moreUrl="/home-dashboard"
icon="$ayiRobot"
v-on:dash-remove="dashRemove"
@@ -66,22 +66,13 @@
</v-col>
</v-row>
</template>
Todo: intermediate actual types (try list first), how to instantiate them from here by id (dynamic)
todo: do we need a PLUS menu item to add one of that type to that widget, i.e. if it's showing workorders then a plus to make a new wokorder would be useful
<script>
const FORM_KEY = "home-dashboard";
import DashRegistry from "../api/dash-registry";
import GzDash from "../components/dash-base.vue";
/**
*
*
* <div>
MRU + depending on role: new workorder, new client, personal workorder
list if scheduleable, or if ops then whatever ops needs or admin whatever
they need etc
</div>
*
*
*/
export default {
components: {
GzDash