diff --git a/resources/js/Global/mixins/global.js b/resources/js/Global/mixins/global.js index 8178ffe..f647ae7 100644 --- a/resources/js/Global/mixins/global.js +++ b/resources/js/Global/mixins/global.js @@ -1,6 +1,7 @@ import { mapActions } from "vuex"; import $_can from "@Global/policy/can"; import $_name from "@Global/utils/category-name/name"; +import $_color from "@Global/utils/module-color"; const global = { methods: { $_getPath(subPath = "", is_complete_url = false) { @@ -27,6 +28,7 @@ const global = { $_can, $_name, + $_color, } }; diff --git a/resources/js/Global/utils/module-color/index.js b/resources/js/Global/utils/module-color/index.js new file mode 100644 index 0000000..ae72abe --- /dev/null +++ b/resources/js/Global/utils/module-color/index.js @@ -0,0 +1,7 @@ +import moduleColor from "./moduleColor"; + +export default (moduleName = null) => { + if (moduleName && moduleColor[moduleName]) { + return moduleColor[moduleName]; + } +} \ No newline at end of file diff --git a/resources/js/Global/utils/module-color/moduleColor.js b/resources/js/Global/utils/module-color/moduleColor.js new file mode 100644 index 0000000..c55923d --- /dev/null +++ b/resources/js/Global/utils/module-color/moduleColor.js @@ -0,0 +1,6 @@ +export default { + Task: 'cyan', + CRM: 'cyan', + Portfolio: 'cyan', + Portfolio: 'cyan', +} \ No newline at end of file