From ad87ec9abaae197bf8c79de6ca9085489a5e35c0 Mon Sep 17 00:00:00 2001 From: Farid Saravi Date: Sun, 10 Nov 2019 18:44:38 +0330 Subject: [PATCH 1/9] change config of medialibrary --- config/medialibrary.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/medialibrary.php b/config/medialibrary.php index 7a1a092..a30da93 100644 --- a/config/medialibrary.php +++ b/config/medialibrary.php @@ -6,7 +6,7 @@ return [ * The disk on which to store added files and derived images by default. Choose * one or more of the disks you've configured in config/filesystems.php. */ - 'disk_name' => env('APP_DEBUG', true) ? 'media_dev' : 'media', + 'disk_name' => env('MEDIA_DISK', 'media'), /* * The maximum file size of an item in bytes. @@ -74,7 +74,7 @@ return [ * When urls to files get generated, this class will be called. Leave empty * if your files are stored locally above the site root or on s3. */ - 'url_generator' => env('APP_DEBUG', true) ? null : 'WM\Common\Services\Media\UrlGenerator\FtpUrlGenerator', + 'url_generator' => env('MEDIA_DISK', 'media') != 'media' ? null : 'WM\Common\Services\Media\UrlGenerator\FtpUrlGenerator', /* * Whether to activate versioning when urls to files get generated. From d1ee2e34494412a506d6559a681cf9061aa79e3b Mon Sep 17 00:00:00 2001 From: Saeid Date: Tue, 12 Nov 2019 18:30:42 +0330 Subject: [PATCH 2/9] work in homw --- public/mix-manifest.json | 8 ++--- .../js/Global/components/Inputs/Dropzone.vue | 3 +- resources/js/Global/utils/common/routes.js | 3 ++ .../Modules/PaymentConfirmation.vue | 13 ++++---- .../components/Modules/TrialConfirmation.vue | 26 ++++++++-------- resources/js/Home/views/AddModule.vue | 30 ++++++++----------- resources/js/Home/views/Home.vue | 5 ++-- 7 files changed, 42 insertions(+), 46 deletions(-) diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 209baf9..7b72a47 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,6 +1,6 @@ { - "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=7c4825c4679a1e4ed1e1", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=aca7fc409acbfefc01c8", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=66c0e1949570a888ac45", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=f1630a1732ec04e32100" + "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=0792ffd7217143c46a77", + "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=41b7adb225049bb18a64", + "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=827cddb7746c2a2510d1", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=c593ac79fc42fa89a05f" } diff --git a/resources/js/Global/components/Inputs/Dropzone.vue b/resources/js/Global/components/Inputs/Dropzone.vue index f1cd751..bcdcc21 100644 --- a/resources/js/Global/components/Inputs/Dropzone.vue +++ b/resources/js/Global/components/Inputs/Dropzone.vue @@ -8,6 +8,7 @@ import vue2Dropzone from 'vue2-dropzone' import { TokenService } from '@Global/services/storage.services' import commonState from '@Global/store/modules/common/state'; +import Routes from '@Global/utils/common/routes'; import { url } from '@Common/mixins/urls'; import axios from 'axios'; import 'vue2-dropzone/dist/vue2Dropzone.min.css' @@ -23,7 +24,7 @@ export default { data() { return { dropzoneOptions: { - url: url('storeFile'), + url: Routes.api() + url('storeFile'), thumbnailWidth: 200, headers: { "Authorization": `Bearer ${TokenService.getToken()}`, "Module": `${commonState.current_module}` }, addRemoveLinks: true, diff --git a/resources/js/Global/utils/common/routes.js b/resources/js/Global/utils/common/routes.js index d57aa81..729aed3 100644 --- a/resources/js/Global/utils/common/routes.js +++ b/resources/js/Global/utils/common/routes.js @@ -11,4 +11,7 @@ export default { originHostName() { return process.env.MIX_PUSHER_APP_ORIGIN_HOST_NAME || 'www.willaengine.ir'; }, + api() { + return process.env.MIX_PUSHER_APP_API || ''; + }, } diff --git a/resources/js/Home/components/Modules/PaymentConfirmation.vue b/resources/js/Home/components/Modules/PaymentConfirmation.vue index 9355f54..63006f1 100644 --- a/resources/js/Home/components/Modules/PaymentConfirmation.vue +++ b/resources/js/Home/components/Modules/PaymentConfirmation.vue @@ -56,20 +56,19 @@ diff --git a/resources/js/Home/components/Modules/TrialConfirmation.vue b/resources/js/Home/components/Modules/TrialConfirmation.vue index eea996f..7988dc7 100644 --- a/resources/js/Home/components/Modules/TrialConfirmation.vue +++ b/resources/js/Home/components/Modules/TrialConfirmation.vue @@ -24,7 +24,7 @@ 1 - {{ getCurrentModule.title_fa }} + {{ modal && getModal(this.$options.name).model ? getModal(this.$options.name).model.title_fa : '' }} {{ expiredDate | moment("jYYYY-jMM-jDD") }} 24:00 @@ -34,7 +34,7 @@ - + fas fa-timesانصراف @@ -47,27 +47,27 @@ From 6ae876cb0e3069d9302cbd1fb38608dd35edab38 Mon Sep 17 00:00:00 2001 From: saeid_01 Date: Wed, 13 Nov 2019 00:25:17 +0330 Subject: [PATCH 3/9] permission --- public/mix-manifest.json | 8 ++++---- resources/js/Global/mixins/global.js | 20 ++++++++++++++----- resources/js/Global/plugins/auth.js | 2 +- resources/js/Global/utils/Permissions/list.js | 5 +++++ 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 7b72a47..ae44050 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,6 +1,6 @@ { - "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=0792ffd7217143c46a77", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=41b7adb225049bb18a64", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=827cddb7746c2a2510d1", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=c593ac79fc42fa89a05f" + "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=4a97d3cd44ce20271b16", + "/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=2419a17ce1593f647b46", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=5032dd9ac7897eeb6f48" } diff --git a/resources/js/Global/mixins/global.js b/resources/js/Global/mixins/global.js index 426d8ac..3802b9b 100644 --- a/resources/js/Global/mixins/global.js +++ b/resources/js/Global/mixins/global.js @@ -5,26 +5,36 @@ import permissionList from "@Global/utils/Permissions/list"; import { UserService } from "@Global/services/storage.services"; const global = { methods: { - $_getPath(subPath = '') { - const path = process.env.MIX_PUSHER_APP_PUBLIC_PATH ? process.env.MIX_PUSHER_APP_PUBLIC_PATH : '/'; + $_getPath(subPath = "") { + const path = process.env.MIX_PUSHER_APP_PUBLIC_PATH + ? process.env.MIX_PUSHER_APP_PUBLIC_PATH + : "/"; return path + subPath; }, //Modal - ...mapActions("modal", ["$_openModal", "$_closeModal", "$_openModalCallback", "$_closeModalCallback", "$_dialog", "$_openModalStack", "$_closeModalStack"]), + ...mapActions("modal", [ + "$_openModal", + "$_closeModal", + "$_openModalCallback", + "$_closeModalCallback", + "$_dialog", + "$_openModalStack", + "$_closeModalStack" + ]), //Permission $_hasPermission(permission, owner = false) { let currentModule = globalStore.state.common.current_module; let permissions = authStore.state.auth.permissions; let multiPermission = permission.split("|"); - let siteOwner = !!UserService.get().is_owner; + let siteOwner = UserService.get().is_owner == "true"; for (const iterator of multiPermission) { if (iterator == "") { return true; } - permission = permissionList[iterator]; + permission = permissionList[iterator]; if ( siteOwner || owner || diff --git a/resources/js/Global/plugins/auth.js b/resources/js/Global/plugins/auth.js index f740619..c87549c 100644 --- a/resources/js/Global/plugins/auth.js +++ b/resources/js/Global/plugins/auth.js @@ -9,7 +9,7 @@ if (TokenService.getToken()) { if (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'); } diff --git a/resources/js/Global/utils/Permissions/list.js b/resources/js/Global/utils/Permissions/list.js index f15b104..cb160fa 100644 --- a/resources/js/Global/utils/Permissions/list.js +++ b/resources/js/Global/utils/Permissions/list.js @@ -41,6 +41,11 @@ export default { updateClientCategory: "update-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", storeClientStatus: "store-client-status", updateClientStatus: "update-client-status", From 9dabc00edab16ef75c86c07cbbf8b77398b5aaaf Mon Sep 17 00:00:00 2001 From: Saeid Date: Thu, 14 Nov 2019 21:11:08 +0330 Subject: [PATCH 4/9] work in ofiice --- public/mix-manifest.json | 8 ++++---- resources/js/Global/utils/date/jalali-date.js | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 resources/js/Global/utils/date/jalali-date.js diff --git a/public/mix-manifest.json b/public/mix-manifest.json index ae44050..717de42 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,6 +1,6 @@ { - "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=4a97d3cd44ce20271b16", - "/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=2419a17ce1593f647b46", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=5032dd9ac7897eeb6f48" + "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=2b4f3436fcb49f78c9c1", + "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=b862f7cc12c7a4ce6f0b", + "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=3c04f8df626054f9e154", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=0252a20649e51965e2e6" } diff --git a/resources/js/Global/utils/date/jalali-date.js b/resources/js/Global/utils/date/jalali-date.js new file mode 100644 index 0000000..9859ad1 --- /dev/null +++ b/resources/js/Global/utils/date/jalali-date.js @@ -0,0 +1,9 @@ +import moment from "jalali-moment"; + +const convertToJalali = function (date = null, format = "jYYYY/jMM/jDD", defaultDate = 'مشخص نشده است.' ) { + return date ? moment(date).format(format) : defaultDate ; +} +const convertNowToJalali = function (date = null, format = "jYYYY/jMM/jDD" ) { + return date ? moment(date).format(format) : moment(new Date()).format(format) ; +} +export { convertToJalali, convertNowToJalali }; \ No newline at end of file From c972983693bc4cee7da913f4cdb9c297efe5ae43 Mon Sep 17 00:00:00 2001 From: Saeid Date: Sat, 16 Nov 2019 19:05:25 +0330 Subject: [PATCH 5/9] work in office --- public/mix-manifest.json | 8 ++--- .../js/Global/components/Drawer/SideBar.vue | 14 ++------ resources/js/Global/mixins/global.js | 4 +-- .../Global/utils/common/ProcessTreeArray.js | 35 +++++++++++++++++++ 4 files changed, 44 insertions(+), 17 deletions(-) diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 717de42..66c57d5 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,6 +1,6 @@ { - "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=2b4f3436fcb49f78c9c1", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=b862f7cc12c7a4ce6f0b", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=3c04f8df626054f9e154", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=0252a20649e51965e2e6" + "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=223aee52028b1e49695f", + "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=467f28f4a10c9a5374d1", + "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=8294dc99fea9ac523715", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=bcf7df987a0272543aee" } diff --git a/resources/js/Global/components/Drawer/SideBar.vue b/resources/js/Global/components/Drawer/SideBar.vue index 27d1b41..35c9f16 100644 --- a/resources/js/Global/components/Drawer/SideBar.vue +++ b/resources/js/Global/components/Drawer/SideBar.vue @@ -38,21 +38,12 @@ - -