Skip to content

Commit b961b79

Browse files
committed
Cleanup
1 parent 9e2b234 commit b961b79

File tree

2 files changed

+18
-24
lines changed

2 files changed

+18
-24
lines changed

dist/js/card.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,9 @@ __webpack_require__.r(__webpack_exports__);
8181
_this.copied = false;
8282
}, 2000);
8383
}
84-
},
85-
navigateToMetricLink: function navigateToMetricLink(e) {
86-
Nova.visit(this.link);
8784
}
8885
},
8986
computed: {
90-
link: function link() {
91-
return JSON.parse(this.url);
92-
},
9387
growthPercentage: function growthPercentage() {
9488
return Math.abs(this.increaseOrDecrease);
9589
},
@@ -386,6 +380,7 @@ var _hoisted_19 = {
386380
function render(_ctx, _cache, $props, $setup, $data, $options) {
387381
var _this = this;
388382
var _component_HelpTextTooltip = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("HelpTextTooltip");
383+
var _component_SelectControl = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("SelectControl");
389384
var _component_Icon = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Icon");
390385
var _component_Link = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Link");
391386
var _component_LoadingCard = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("LoadingCard");
@@ -398,7 +393,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
398393
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", _hoisted_2, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.title), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_HelpTextTooltip, {
399394
text: $props.helpText,
400395
width: $props.helpWidth
401-
}, null, 8 /* PROPS */, ["text", "width"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <SelectControl\n v-if=\"ranges.length > 0\"\n class=\"ml-auto w-[6rem] flex-shrink-0\"\n size=\"xxs\"\n :options=\"ranges\"\n v-model:selected=\"selectedRangeKey\"\n @change=\"handleChange\"\n :aria-label=\"__('Select Ranges')\"\n /> ")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Icon, {
396+
}, null, 8 /* PROPS */, ["text", "width"]), $props.ranges.length > 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_SelectControl, {
397+
key: 0,
398+
"class": "ml-auto w-[6rem] flex-shrink-0",
399+
size: "xxs",
400+
options: $props.ranges,
401+
onChange: $options.handleChange,
402+
"aria-label": _ctx.__('Select Ranges')
403+
}, null, 8 /* PROPS */, ["options", "onChange", "aria-label"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Icon, {
402404
type: $props.icon,
403405
width: "24",
404406
height: "24"
@@ -408,7 +410,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
408410
rounded: false
409411
}, {
410412
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
411-
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" <a @click.stop.prevent=\"navigateToMetricLink\"> "), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Link, {
413+
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Link, {
412414
href: _this.url,
413415
title: $props.title,
414416
"class": "link-default font-normal"
@@ -417,7 +419,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
417419
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($options.formattedValue), 1 /* TEXT */)])), [[_directive_tooltip, "".concat($options.tooltipFormattedValue)]])];
418420
}),
419421
_: 1 /* STABLE */
420-
}, 8 /* PROPS */, ["href", "title"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(" </a> "), $props.suffix ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($options.formattedSuffix), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
422+
}, 8 /* PROPS */, ["href", "title"]), $props.suffix ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($options.formattedSuffix), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
421423
}),
422424
_: 1 /* STABLE */
423425
}, 8 /* PROPS */, ["onClick"])), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_6, [$options.increaseOrDecreaseLabel == 'Decrease' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("svg", _hoisted_7, _hoisted_9)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $options.increaseOrDecreaseLabel == 'Increase' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("svg", _hoisted_10, _hoisted_12)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $options.increaseOrDecrease != 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_13, [$options.growthPercentage !== 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_14, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($options.growthPercentage) + "% " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__($options.increaseOrDecreaseLabel)), 1 /* TEXT */)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_15, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('No Increase')), 1 /* TEXT */))])) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_16, [$props.previous == '0' && $props.value != '0' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_17, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('No Prior Data')), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.value == '0' && $props.previous != '0' && !$props.zeroResult ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_18, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('No Current Data')), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.value == '0' && $props.previous == '0' && !$props.zeroResult ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_19, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('No Data')), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]))])])])])];

resources/js/components/Base/BaseValueMetric.vue

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
<HelpTextTooltip :text="helpText" :width="helpWidth" />
77

8-
<!-- <SelectControl
8+
<SelectControl
99
v-if="ranges.length > 0"
1010
class="ml-auto w-[6rem] flex-shrink-0"
1111
size="xxs"
1212
:options="ranges"
1313
v-model:selected="selectedRangeKey"
1414
@change="handleChange"
1515
:aria-label="__('Select Ranges')"
16-
/> -->
16+
/>
1717
</div>
1818

1919
<div class="flex items-center mb-4 space-x-4">
@@ -31,13 +31,11 @@
3131
class="flex items-center text-4xl"
3232
:rounded="false"
3333
>
34-
<!-- <a @click.stop.prevent="navigateToMetricLink"> -->
35-
<Link :href="this.url" :title="title" class="link-default font-normal">
36-
<span v-tooltip="`${tooltipFormattedValue}`">
37-
{{ formattedValue }}
38-
</span>
39-
</Link>
40-
<!-- </a> -->
34+
<Link :href="this.url" :title="title" class="link-default font-normal">
35+
<span v-tooltip="`${tooltipFormattedValue}`">
36+
{{ formattedValue }}
37+
</span>
38+
</Link>
4139
<span v-if="suffix" class="ml-2 text-sm font-bold">
4240
{{ formattedSuffix }}
4341
</span>
@@ -160,15 +158,9 @@
160158
}
161159
},
162160
163-
navigateToMetricLink(e) {
164-
Nova.visit(this.link)
165-
},
166161
},
167162
168163
computed: {
169-
link() {
170-
return JSON.parse(this.url);
171-
},
172164
173165
growthPercentage() {
174166
return Math.abs(this.increaseOrDecrease)

0 commit comments

Comments
 (0)