From 2642fd858c4757f0f858095b84869184714cc8d7 Mon Sep 17 00:00:00 2001 From: Saeid Date: Thu, 3 Oct 2019 21:16:59 +0330 Subject: [PATCH 1/6] work in office --- package-lock.json | 5 +++++ package.json | 1 + public/mix-manifest.json | 10 +++++----- resources/js/Global/plugins/auth.js | 2 +- resources/js/Global/services/storage.services.js | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6143cb..b173289 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11431,6 +11431,11 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "dev": true }, + "vue-the-mask": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/vue-the-mask/-/vue-the-mask-0.11.1.tgz", + "integrity": "sha512-UquSfnSWejD0zAfcD+3jJ1chUAkOAyoxya9Lxh9acCRtrlmGcAIvd0cQYraWqKenbuZJUdum+S174atv2AuEHQ==" + }, "vue-tinymce-editor": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/vue-tinymce-editor/-/vue-tinymce-editor-1.6.2.tgz", diff --git a/package.json b/package.json index 5d471d5..04f7597 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "vue-moment": "^4.0.0", "vue-router": "^3.0.2", "vue-scroll-reveal": "^1.0.11", + "vue-the-mask": "^0.11.1", "vue-tinymce-editor": "^1.6.2", "vuetify": "^2.0.19" }, diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 92b9f6c..bb64330 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,7 +1,7 @@ { - "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=dc072ea26c92af6777a0", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=db8af10412509ee0586b", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=76afa0e5e8d8410f111f", - "/js/vue/Modules/Reservation/app.js": "/js/vue/Modules/Reservation/app.js?id=8058a4ba779b6aaf4121", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=7e0e6ca7915af5a841bc" + "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=14083efcda55bc46c26b", + "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=2dd1c98b1ceea1da6989", + "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=82839dc8a42d40626004", + "/js/vue/Modules/Reservation/app.js": "/js/vue/Modules/Reservation/app.js?id=3b8ef5f0a685c7a4ec8b", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=832c04a781cf0db77dd0" } diff --git a/resources/js/Global/plugins/auth.js b/resources/js/Global/plugins/auth.js index 37f8b0d..f740619 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()){ +} else if (TokenService.getToken() && UserService.get() && UserService.get().is_owner == false) { store.dispatch('auth/loadAuthPermissions'); } diff --git a/resources/js/Global/services/storage.services.js b/resources/js/Global/services/storage.services.js index ffd195e..124ae90 100644 --- a/resources/js/Global/services/storage.services.js +++ b/resources/js/Global/services/storage.services.js @@ -68,7 +68,7 @@ const VirtualActivityService = { }, save(virtualActivity = null) { - virtualActivity = qs.stringify(virtualActivity); + virtualActivity = qs.stringify(virtualActivity); localStorage.setItem(VIRTUALACTIVITY, virtualActivity) }, From def0f99a5db8025dca1f58c9ff11835a73839421 Mon Sep 17 00:00:00 2001 From: Saeid Date: Sat, 5 Oct 2019 12:29:14 +0330 Subject: [PATCH 2/6] veevalidate --- public/mix-manifest.json | 9 ++++----- resources/js/Global/utils/vee-validate/locale/fa.js | 5 +++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/public/mix-manifest.json b/public/mix-manifest.json index bb64330..90327ca 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,7 +1,6 @@ { - "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=14083efcda55bc46c26b", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=2dd1c98b1ceea1da6989", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=82839dc8a42d40626004", - "/js/vue/Modules/Reservation/app.js": "/js/vue/Modules/Reservation/app.js?id=3b8ef5f0a685c7a4ec8b", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=832c04a781cf0db77dd0" + "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=a878538a5545b5423e4f", + "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=b672efce07733e208b1f", + "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=37180dd4f6648d18fee3", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=5e8f4e04137a76425f85" } diff --git a/resources/js/Global/utils/vee-validate/locale/fa.js b/resources/js/Global/utils/vee-validate/locale/fa.js index 41ae668..1dc5b2d 100644 --- a/resources/js/Global/utils/vee-validate/locale/fa.js +++ b/resources/js/Global/utils/vee-validate/locale/fa.js @@ -132,6 +132,11 @@ email: "ایمیل", name: "نام", phone: "شماره ی تلفن", + task_receiver_user : "مسئول وظیفه", + begin_date : " تاریخ شروع ", + end_date : " تاریخ پایان ", + title : " عنوان ", + description : " توضیحات ", duplicatephone0: "شماره ی تلفن", duplicatephone1: "شماره ی تلفن", duplicatephone2: "شماره ی تلفن", From a8fb03780193f24567de2cb2e828edb62c272c36 Mon Sep 17 00:00:00 2001 From: Saeid Date: Sun, 6 Oct 2019 21:06:22 +0330 Subject: [PATCH 3/6] work in office --- public/mix-manifest.json | 8 ++++---- resources/js/Global/utils/vee-validate/locale/fa.js | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 90327ca..dd5d08c 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=a878538a5545b5423e4f", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=b672efce07733e208b1f", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=37180dd4f6648d18fee3", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=5e8f4e04137a76425f85" + "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=4e1138be816530f577d5", + "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=b8e64c2942be6c592773", + "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=4218966e0973ed476a20", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=9ed81924230ae712a57c" } diff --git a/resources/js/Global/utils/vee-validate/locale/fa.js b/resources/js/Global/utils/vee-validate/locale/fa.js index 1dc5b2d..f125503 100644 --- a/resources/js/Global/utils/vee-validate/locale/fa.js +++ b/resources/js/Global/utils/vee-validate/locale/fa.js @@ -130,13 +130,17 @@ attributes: { name_en: "نام انگلیسی", email: "ایمیل", + website: "آدرس سایت", name: "نام", + text: "متن", + client_type: "نوع مشتری", phone: "شماره ی تلفن", task_receiver_user : "مسئول وظیفه", begin_date : " تاریخ شروع ", end_date : " تاریخ پایان ", title : " عنوان ", description : " توضیحات ", + national_code : " کد ملی ", duplicatephone0: "شماره ی تلفن", duplicatephone1: "شماره ی تلفن", duplicatephone2: "شماره ی تلفن", From b5705400a64b7649b7e31258d4392ee27c09747f Mon Sep 17 00:00:00 2001 From: Farid Saravi Date: Sun, 6 Oct 2019 22:11:53 +0330 Subject: [PATCH 4/6] add update migrations --- .../2019_08_23_152615_create_module_user.php | 37 -------------- .../2019_10_06_173827_temp_update_columns.php | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 37 deletions(-) delete mode 100644 database/migrations/2019_08_23_152615_create_module_user.php create mode 100644 database/migrations/2019_10_06_173827_temp_update_columns.php diff --git a/database/migrations/2019_08_23_152615_create_module_user.php b/database/migrations/2019_08_23_152615_create_module_user.php deleted file mode 100644 index 5cd4a85..0000000 --- a/database/migrations/2019_08_23_152615_create_module_user.php +++ /dev/null @@ -1,37 +0,0 @@ -unsignedInteger('module_id'); - $table->unsignedInteger('user_id'); - $table->unique(['module_id', 'user_id']); - $table->index('module_id'); - $table->index('user_id'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - $dbName = config('core.db_name'); - Schema::dropIfExists("$dbName.module_user"); - } -} diff --git a/database/migrations/2019_10_06_173827_temp_update_columns.php b/database/migrations/2019_10_06_173827_temp_update_columns.php new file mode 100644 index 0000000..ad4a96d --- /dev/null +++ b/database/migrations/2019_10_06_173827_temp_update_columns.php @@ -0,0 +1,50 @@ +string('father_name', 255)->nullable(); + $table->string('telegram', 255)->nullable(); + $table->string('website', 255)->nullable(); + $table->text('description')->nullable(); + $table->unsignedInteger('client_title_id')->nullable(); + $table->foreign('client_title_id')->references('id')->on('client_titles'); + $table->dropColumn('client_category_id'); + }); + + Schema::table("$dbName.client_statuses", function (Blueprint $table) { + $table->string('color', 255)->nullable(); + $table->string('icon', 255)->nullable(); + }); + + $dbName = config('common.db_name'); + + Schema::table("$dbName.task_statuses", function (Blueprint $table) { + $table->string('color', 255)->nullable(); + $table->string('icon', 255)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + + } +} From 7ca796a8982a78ce620ccbadd131c78bf2507fdd Mon Sep 17 00:00:00 2001 From: saeid_01 Date: Mon, 7 Oct 2019 02:16:32 +0330 Subject: [PATCH 5/6] work in home --- public/mix-manifest.json | 8 ++++---- resources/js/Global/utils/vee-validate/locale/fa.js | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/mix-manifest.json b/public/mix-manifest.json index dd5d08c..4a624ab 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=4e1138be816530f577d5", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=b8e64c2942be6c592773", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=4218966e0973ed476a20", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=9ed81924230ae712a57c" + "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=77424533bf54f95aa524", + "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=86d48e06c5b13724f430", + "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=ef74880b09765a4cb21b", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=e9283a676a9e344b0a5e" } diff --git a/resources/js/Global/utils/vee-validate/locale/fa.js b/resources/js/Global/utils/vee-validate/locale/fa.js index f125503..0116fe9 100644 --- a/resources/js/Global/utils/vee-validate/locale/fa.js +++ b/resources/js/Global/utils/vee-validate/locale/fa.js @@ -134,6 +134,10 @@ name: "نام", text: "متن", client_type: "نوع مشتری", + cell_number: " شماره همراه ", + password: " کلمه عبور ", + confirm_password: " تکرار کلمه عبور ", + department: "دپارتمان", phone: "شماره ی تلفن", task_receiver_user : "مسئول وظیفه", begin_date : " تاریخ شروع ", From 51d533cdf5fbbf107e5b004576ea24ee329815bd Mon Sep 17 00:00:00 2001 From: saeid_01 Date: Tue, 8 Oct 2019 11:34:45 +0330 Subject: [PATCH 6/6] filter --- public/mix-manifest.json | 6 ++-- resources/js/Global/mixins/commingSoon.js | 4 +-- .../Global/utils/common/CreateFilterObject.js | 31 +++++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 resources/js/Global/utils/common/CreateFilterObject.js diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 4a624ab..2ecf4fb 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=77424533bf54f95aa524", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=86d48e06c5b13724f430", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=ef74880b09765a4cb21b", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=e9283a676a9e344b0a5e" + "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=e358b4b5c55ea487c673", + "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=fa665e31799839141fe6", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=a5bb957404874e203544" } diff --git a/resources/js/Global/mixins/commingSoon.js b/resources/js/Global/mixins/commingSoon.js index a57d6d0..43097ce 100644 --- a/resources/js/Global/mixins/commingSoon.js +++ b/resources/js/Global/mixins/commingSoon.js @@ -7,9 +7,9 @@ var CommingSoonArray = [ "crm-setting", - "crm-client-filter", + // "crm-client-filter", "crm-statistics", - "user-list-filter", + // "user-list-filter", ]; const commingSoon = { methods: { diff --git a/resources/js/Global/utils/common/CreateFilterObject.js b/resources/js/Global/utils/common/CreateFilterObject.js new file mode 100644 index 0000000..27a3133 --- /dev/null +++ b/resources/js/Global/utils/common/CreateFilterObject.js @@ -0,0 +1,31 @@ +const createFilterObject = filters => { + let filterObject = {}; + for (const key in filters) { + if (filters.hasOwnProperty(key)) { + if (filters[key]["type"]) { + let filterValue = window[filters[key]["type"]](filters[key]); + if (filterValue) { + filterObject[key] = filterValue; + } + } + } + } + return filterObject; +}; +window['between'] = function (filter) { + var value = null; + if (filter.val1 || filter.val2) { + value = `<${filter.val1},${filter.val2}>`; + } + return value; +} + +window['like'] = function(filter) { + var value = null; + if (filter.val) { + value = `%${filter.val}%`; + } + return value; +} + +export default createFilterObject;