You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/resources/js/Global/mixins/global.js

35 lines
896 B

import { mapActions } from "vuex";
5 years ago
import $_can from "@Global/policy/can";
import $_name from "@Global/utils/category-name/name";
const global = {
methods: {
$_getPath(subPath = "", is_complete_url = false) {
if (is_complete_url && process.env.MIX_PUSHER_APP_PRODUCT == 'true') {
return subPath;
} else {
subPath = subPath.startsWith("/") ? subPath.substr(1) : subPath;
const path = process.env.MIX_PUSHER_APP_PUBLIC_PATH
? process.env.MIX_PUSHER_APP_PUBLIC_PATH
: "/";
return path + subPath;
}
5 years ago
},
//Modal
5 years ago
...mapActions("modal", [
"$_dialog",
"$_helper",
5 years ago
"$_openModalStack",
"$_closeModalStack"
]),
5 years ago
5 years ago
$_can,
$_name,
5 years ago
}
};
export { global };