parent
c972983693
commit
d245855104
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=223aee52028b1e49695f",
|
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=b5f905ff1ac688651a5b",
|
||||||
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=467f28f4a10c9a5374d1",
|
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=1a90d1e9fc805200faab",
|
||||||
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=8294dc99fea9ac523715",
|
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=05cf114c9b8d0aeeeb5c",
|
||||||
"/js/vue/User/app.js": "/js/vue/User/app.js?id=bcf7df987a0272543aee"
|
"/js/vue/User/app.js": "/js/vue/User/app.js?id=ffa76709d0a81fd79236"
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
<template>
|
||||||
|
<v-dialog v-model="modal" :width="properties.width || '40%'" transition="slide-x-transition">
|
||||||
|
<v-card class="RTL">
|
||||||
|
<v-card-title class="red lighten-5" primary-title>
|
||||||
|
<WM-PartTitle
|
||||||
|
class="WM-Margin-T-20"
|
||||||
|
:TitleFa="properties.title || 'عنوان'"
|
||||||
|
:TitleEn="properties.titleEn || 'title'"
|
||||||
|
:color="properties.color || 'orange'"
|
||||||
|
></WM-PartTitle>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text>
|
||||||
|
<div
|
||||||
|
class="WM-Align-R WM-Margin-T-10"
|
||||||
|
>{{ properties.message || 'پیام'}}</div>
|
||||||
|
</v-card-text>
|
||||||
|
|
||||||
|
<v-divider></v-divider>
|
||||||
|
<v-card-actions>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<v-btn
|
||||||
|
:color="properties.color || 'orange'"
|
||||||
|
depressed
|
||||||
|
dark
|
||||||
|
@click="$_closeModalStack()"
|
||||||
|
>
|
||||||
|
<v-icon dark right>fas fa-trash-alt</v-icon>
|
||||||
|
متوجه شدم!
|
||||||
|
</v-btn>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapActions, mapGetters } from "vuex";
|
||||||
|
import axios from 'axios';
|
||||||
|
import { url } from '@Common/mixins/urls';
|
||||||
|
export default {
|
||||||
|
name: "modal_modal_helper",
|
||||||
|
data: () => ({
|
||||||
|
properties: {}
|
||||||
|
}),
|
||||||
|
computed: {
|
||||||
|
...mapGetters("modal", ["isModalStack", "getModal"]),
|
||||||
|
modal: {
|
||||||
|
get() {
|
||||||
|
return this.isModalStack(this.$options.name);
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
if (!value) {
|
||||||
|
this.$_closeModalStack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
if (this.modal) {
|
||||||
|
let response = await axios.get(url('helpers', {helper: this.getModal(this.$options.name).slug}));
|
||||||
|
if (response && response.status == 200) {
|
||||||
|
this.properties = response.data.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,9 @@
|
|||||||
|
import { getTime } from "@Global/utils/date/time";
|
||||||
|
export default {
|
||||||
|
setCurrentTime:({ commit }) => {
|
||||||
|
commit('SET_CURRENT_TIME', getTime());
|
||||||
|
setInterval(function() {
|
||||||
|
commit('SET_CURRENT_TIME', getTime());
|
||||||
|
}, 2000);
|
||||||
|
},
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
getCurrentModule: state => state.current_module,
|
getCurrentModule: state => state.current_module,
|
||||||
getCurrentModuleInfo: state => state.current_module_info,
|
getCurrentModuleInfo: state => state.current_module_info,
|
||||||
|
getCurrentTime: state => state.time_now,
|
||||||
}
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
const getTime = (date = null) => {
|
||||||
|
|
||||||
|
date = date ? date : new Date();
|
||||||
|
let h = addZero(date.getHours());
|
||||||
|
let m = addZero(date.getMinutes());
|
||||||
|
return h + ":" + m;
|
||||||
|
};
|
||||||
|
const addZero= (i) => {
|
||||||
|
if (i < 10) {
|
||||||
|
i = "0" + i;
|
||||||
|
}
|
||||||
|
return i;
|
||||||
|
};
|
||||||
|
export { getTime };
|
Loading…
Reference in new issue