|
|
@ -133,13 +133,27 @@ import { useToast } from "vue-toastification";
|
|
|
|
import Tag from "../components/Tag.vue";
|
|
|
|
import Tag from "../components/Tag.vue";
|
|
|
|
const toast = useToast();
|
|
|
|
const toast = useToast();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @typedef Tag
|
|
|
|
|
|
|
|
* @type {object}
|
|
|
|
|
|
|
|
* @property {number | undefined} id
|
|
|
|
|
|
|
|
* @property {number | undefined} monitor_id
|
|
|
|
|
|
|
|
* @property {number | undefined} tag_id
|
|
|
|
|
|
|
|
* @property {string} value
|
|
|
|
|
|
|
|
* @property {string} name
|
|
|
|
|
|
|
|
* @property {string} color
|
|
|
|
|
|
|
|
* @property {boolean | undefined} new
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
Tag,
|
|
|
|
Tag,
|
|
|
|
VueMultiselect,
|
|
|
|
VueMultiselect,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
/** Array of tags to be pre-selected */
|
|
|
|
/** Array of tags to be pre-selected
|
|
|
|
|
|
|
|
* @type {Tag[]}
|
|
|
|
|
|
|
|
*/
|
|
|
|
preSelectedTags: {
|
|
|
|
preSelectedTags: {
|
|
|
|
type: Array,
|
|
|
|
type: Array,
|
|
|
|
default: () => [],
|
|
|
|
default: () => [],
|
|
|
@ -147,10 +161,14 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
/** @type {Modal | null} */
|
|
|
|
modal: null,
|
|
|
|
modal: null,
|
|
|
|
|
|
|
|
/** @type {Tag[]} */
|
|
|
|
existingTags: [],
|
|
|
|
existingTags: [],
|
|
|
|
processing: false,
|
|
|
|
processing: false,
|
|
|
|
|
|
|
|
/** @type {Tag[]} */
|
|
|
|
newTags: [],
|
|
|
|
newTags: [],
|
|
|
|
|
|
|
|
/** @type {Tag[]} */
|
|
|
|
deleteTags: [],
|
|
|
|
deleteTags: [],
|
|
|
|
newDraftTag: {
|
|
|
|
newDraftTag: {
|
|
|
|
name: null,
|
|
|
|
name: null,
|
|
|
|