pull/1/head
saeid_01 5 years ago
parent dfdefe50e3
commit 6ae876cb0e

@ -1,6 +1,6 @@
{ {
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=0792ffd7217143c46a77", "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=4a97d3cd44ce20271b16",
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=41b7adb225049bb18a64", "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=0fc1eb446e4231363537",
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=827cddb7746c2a2510d1", "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=2419a17ce1593f647b46",
"/js/vue/User/app.js": "/js/vue/User/app.js?id=c593ac79fc42fa89a05f" "/js/vue/User/app.js": "/js/vue/User/app.js?id=5032dd9ac7897eeb6f48"
} }

@ -5,21 +5,31 @@ import permissionList from "@Global/utils/Permissions/list";
import { UserService } from "@Global/services/storage.services"; import { UserService } from "@Global/services/storage.services";
const global = { const global = {
methods: { methods: {
$_getPath(subPath = '') { $_getPath(subPath = "") {
const path = process.env.MIX_PUSHER_APP_PUBLIC_PATH ? process.env.MIX_PUSHER_APP_PUBLIC_PATH : '/'; const path = process.env.MIX_PUSHER_APP_PUBLIC_PATH
? process.env.MIX_PUSHER_APP_PUBLIC_PATH
: "/";
return path + subPath; return path + subPath;
}, },
//Modal //Modal
...mapActions("modal", ["$_openModal", "$_closeModal", "$_openModalCallback", "$_closeModalCallback", "$_dialog", "$_openModalStack", "$_closeModalStack"]), ...mapActions("modal", [
"$_openModal",
"$_closeModal",
"$_openModalCallback",
"$_closeModalCallback",
"$_dialog",
"$_openModalStack",
"$_closeModalStack"
]),
//Permission //Permission
$_hasPermission(permission, owner = false) { $_hasPermission(permission, owner = false) {
let currentModule = globalStore.state.common.current_module; let currentModule = globalStore.state.common.current_module;
let permissions = authStore.state.auth.permissions; let permissions = authStore.state.auth.permissions;
let multiPermission = permission.split("|"); let multiPermission = permission.split("|");
let siteOwner = !!UserService.get().is_owner; let siteOwner = UserService.get().is_owner == "true";
for (const iterator of multiPermission) { for (const iterator of multiPermission) {
if (iterator == "") { if (iterator == "") {
return true; return true;

@ -9,7 +9,7 @@ if (TokenService.getToken()) {
if (PermissionService.get()) { if (PermissionService.get()) {
store.commit('auth/SET_AUTH_PERMISSIONS', PermissionService.get()) store.commit('auth/SET_AUTH_PERMISSIONS', PermissionService.get())
} else if (TokenService.getToken() && UserService.get() && UserService.get().is_owner == false) { } else if (TokenService.getToken() && UserService.get() && UserService.get().is_owner == 'false') {
store.dispatch('auth/loadAuthPermissions'); store.dispatch('auth/loadAuthPermissions');
} }

@ -41,6 +41,11 @@ export default {
updateClientCategory: "update-client-category", updateClientCategory: "update-client-category",
deleteClientCategory: "delete-client-category", deleteClientCategory: "delete-client-category",
indexClientTitle: "index-client-title",
storeClientTitle: "store-client-title",
updateClientTitle: "update-client-title",
deleteClientTitle: "delete-client-title",
indexClientStatus: "index-client-status", indexClientStatus: "index-client-status",
storeClientStatus: "store-client-status", storeClientStatus: "store-client-status",
updateClientStatus: "update-client-status", updateClientStatus: "update-client-status",

Loading…
Cancel
Save