fix code style
This commit is contained in:
@@ -140,7 +140,7 @@
|
||||
|
||||
<template #modal-footer="{ cancel }">
|
||||
<b-button size="sm" variant="danger" @click="cancel()">
|
||||
{{ $t("ID_CLOSE")}}
|
||||
{{ $t("ID_CLOSE") }}
|
||||
</b-button>
|
||||
</template>
|
||||
</b-modal>
|
||||
|
||||
@@ -4,14 +4,11 @@
|
||||
@mouseover="hoverHandler"
|
||||
:title="labelTooltip"
|
||||
>
|
||||
{{ data.title }}
|
||||
<b-tooltip
|
||||
:target="`label-${data.id}`"
|
||||
:ref="`tooltip-${data.id}`"
|
||||
>
|
||||
{{ labelTooltip }}
|
||||
</b-tooltip>
|
||||
</span>
|
||||
{{ data.title }}
|
||||
<b-tooltip :target="`label-${data.id}`" :ref="`tooltip-${data.id}`">
|
||||
{{ labelTooltip }}
|
||||
</b-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -25,9 +22,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
labelTooltip: "",
|
||||
hovering: "",
|
||||
show: false,
|
||||
disabled: true,
|
||||
menuMap: {
|
||||
CASES_INBOX: "inbox",
|
||||
CASES_DRAFT: "draft",
|
||||
@@ -36,43 +30,36 @@ export default {
|
||||
todo: "inbox",
|
||||
draft: "draft",
|
||||
paused: "paused",
|
||||
unassigned: "unassigned"
|
||||
}
|
||||
}
|
||||
unassigned: "unassigned",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Delay the hover event
|
||||
*/
|
||||
hoverHandler() {
|
||||
// this.hovering = setTimeout(() => { this.setTooltip() }, 3000);
|
||||
this.setTooltip();
|
||||
},
|
||||
/**
|
||||
* Reset the delay and hide the tooltip
|
||||
*/
|
||||
unhoverHandler() {
|
||||
let key =`tooltip-${this.data.id}`;
|
||||
let key = `tooltip-${this.data.id}`;
|
||||
this.labelTooltip = "";
|
||||
// this.show = false;
|
||||
this.disabled = true;
|
||||
this.$refs[key].$emit('close');
|
||||
clearTimeout(this.hovering);
|
||||
this.$refs[key].$emit("close");
|
||||
},
|
||||
/**
|
||||
* Set the label to show in the tooltip
|
||||
*/
|
||||
*/
|
||||
setTooltip() {
|
||||
let that = this;
|
||||
api.menu
|
||||
.getTooltip(that.menuMap[that.data.id])
|
||||
.then((response) => {
|
||||
let key =`tooltip-${that.data.id}`;
|
||||
that.disabled = false;
|
||||
that.labelTooltip = response.data.label;
|
||||
that.$refs[key].$emit('open');
|
||||
});
|
||||
api.menu.getTooltip(that.menuMap[that.data.id]).then((response) => {
|
||||
let key = `tooltip-${that.data.id}`;
|
||||
that.labelTooltip = response.data.label;
|
||||
that.$refs[key].$emit("open");
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -53,7 +53,7 @@ class UserConfig extends Model
|
||||
$model = new UserConfig();
|
||||
$model->USR_ID = $id;
|
||||
$model->USC_NAME = $name;
|
||||
$model->USC_SETTING = json_encode($setting, JSON_FORCE_OBJECT);
|
||||
$model->USC_SETTING = json_encode($setting);
|
||||
$model->save();
|
||||
$userConfig = UserConfig::getSetting($id, $name);
|
||||
return $userConfig;
|
||||
|
||||
Reference in New Issue
Block a user