diff --git a/app/Console/Commands/BuildSwagger.php b/app/Console/Commands/BuildSwagger.php
new file mode 100755
index 0000000..ecc60b5
--- /dev/null
+++ b/app/Console/Commands/BuildSwagger.php
@@ -0,0 +1,43 @@
+command('inspire')
// ->hourly();
+ // $schedule->call(function () {
+ // \DB::table('wmuser_common.comments')->limit(1)->delete();
+ // })->cron('*/2 * * * *')->sendOutputTo(storage_path('task.txt'));
}
/**
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
index 6c64e52..ea8f56b 100644
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -18,6 +18,9 @@ class EventServiceProvider extends ServiceProvider
Registered::class => [
SendEmailVerificationNotification::class,
],
+ 'Illuminate\Notifications\Events\NotificationSent' => [
+ 'App\Listeners\LogNotification',
+ ],
];
/**
diff --git a/composer.json b/composer.json
index 3c59624..da43a80 100755
--- a/composer.json
+++ b/composer.json
@@ -9,8 +9,9 @@
"license": "MIT",
"require": {
"php": "^7.1.3",
+ "kalnoy/nestedset": "^5.0",
"fideloper/proxy": "^4.0",
- "laravel/framework": "5.8.*",
+ "laravel/framework": "6.*",
"laravel/passport": "^7.3",
"laravel/tinker": "^1.0",
"wm/common": "dev-master",
diff --git a/public/mix-manifest.json b/public/mix-manifest.json
index d9027ed..62a8d38 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=76568d2c558db0b483df",
- "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=c0280289836d237df34a",
- "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=d1f47ccae7e3c752e2cd",
- "/js/vue/User/app.js": "/js/vue/User/app.js?id=1a70a4db289a0cd1791c"
+ "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=dd02beb5a55225686934",
+ "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=a3421df14f4c8868afc0",
+ "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=d5c5768d6fa5b68ca971",
+ "/js/vue/User/app.js": "/js/vue/User/app.js?id=94b6e24df1d748e97e78"
}
diff --git a/resources/js/Global/components/Misc/Snackbar.vue b/resources/js/Global/components/Misc/Snackbar.vue
new file mode 100644
index 0000000..067a5f1
--- /dev/null
+++ b/resources/js/Global/components/Misc/Snackbar.vue
@@ -0,0 +1,115 @@
+
+
+
+ {{message.content || ''}}
+
+ {{ message.icon || "fas fa-times" }}
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/js/Global/mixins/commingSoon.js b/resources/js/Global/mixins/commingSoon.js
index 43097ce..f713f4d 100644
--- a/resources/js/Global/mixins/commingSoon.js
+++ b/resources/js/Global/mixins/commingSoon.js
@@ -3,9 +3,10 @@ var CommingSoonArray = [
"discount",
"transaction",
"email",
- "sms",
-
+ // "sms",
+ "prescription",
+ "user_sms",
"crm-setting",
// "crm-client-filter",
"crm-statistics",
diff --git a/resources/js/Global/plugins/globalComponent.js b/resources/js/Global/plugins/globalComponent.js
index 914a698..d9827eb 100644
--- a/resources/js/Global/plugins/globalComponent.js
+++ b/resources/js/Global/plugins/globalComponent.js
@@ -10,13 +10,14 @@ import PageTitle from "@Global/components/Dividers/PageTitle.vue";
import Checkbox from "@Global/components/Inputs/Checkbox.vue";
import InfoBlock from "@Global/components/Misc/InfoBlock.vue";
import Breadcrumbs from "@Global/components/Misc/Breadcrumbs";
+import Dialog from "@Global/components/Misc/Dialog.vue";
Vue.component("WM-PartTitle", PartTitle);
Vue.component("WM-PageTitle", PageTitle);
Vue.component("WM-Checkbox", Checkbox);
Vue.component("wm-info-block", InfoBlock);
Vue.component("wm-breadcrumbs", Breadcrumbs);
-
+Vue.component("wm-dialog", Dialog);
//jalali => 0.6MB
import jalaliMoment from "vue-jalali-moment"
diff --git a/resources/js/Global/scss/Modify.scss b/resources/js/Global/scss/Modify.scss
index 2f8b5e3..4462644 100644
--- a/resources/js/Global/scss/Modify.scss
+++ b/resources/js/Global/scss/Modify.scss
@@ -244,6 +244,14 @@ table.v-table tbody td {
.v-btn.M .v-icon {
font-size: 25px;
}
+.theme--dark.v-btn.v-btn--disabled:not(.v-btn--flat):not(.v-btn--text):not(.v-btn--outlined) {
+ background-color: rgba(0, 0, 0, 0.12) !important;
+ cursor: not-allowed;
+}
+.theme--dark.v-btn.v-btn--disabled, .theme--dark.v-btn.v-btn--disabled .v-btn__loading, .theme--dark.v-btn.v-btn--disabled .v-icon {
+ color: rgba(0, 0, 0, 0.26) !important;
+}
+
.v-tooltip .v-btn--outline:hover .v-icon,
.v-tooltip .v-btn--outline:focus .v-icon {
diff --git a/resources/js/Global/services/errorHandler.services.js b/resources/js/Global/services/errorHandler.services.js
index deac168..eed4df6 100644
--- a/resources/js/Global/services/errorHandler.services.js
+++ b/resources/js/Global/services/errorHandler.services.js
@@ -41,11 +41,11 @@ function errorResponseHandler(error) {
}
}
function successHandler(response) {
- // if(response.status == 200 || response.status == 201) {
- // if(typeof response.data.message !== 'undefined') {
- // toast.success(response.data.message, response.data.title);
- // }
- // }
+ if(response.status == 200 || response.status == 201) {
+ if(typeof response.data.message !== 'undefined' && typeof response.data.message.content !== 'undefined') {
+ toast.success(response.data.message.content, response.data.message.title || 'موفق');
+ }
+ }
return response;
}
diff --git a/resources/js/Global/store/modules/modal/actions.js b/resources/js/Global/store/modules/modal/actions.js
index c30f23f..0930912 100644
--- a/resources/js/Global/store/modules/modal/actions.js
+++ b/resources/js/Global/store/modules/modal/actions.js
@@ -22,5 +22,5 @@ export default {
state.modal.dialog = true;
commit('SET_DIALOG_TYPE', properties.type);
commit('SET_DIALOG_PROPERTIES', properties);
- }
+ },
};
diff --git a/resources/js/Global/store/modules/modal/mutations.js b/resources/js/Global/store/modules/modal/mutations.js
index 9d576e1..ea04150 100644
--- a/resources/js/Global/store/modules/modal/mutations.js
+++ b/resources/js/Global/store/modules/modal/mutations.js
@@ -13,5 +13,5 @@ export default {
},
SET_DIALOG_PROPERTIES(state, properties = {}) {
state.dialogProperties = properties;
- }
+ },
};
diff --git a/resources/js/Global/store/modules/modal/state.js b/resources/js/Global/store/modules/modal/state.js
index 63873ad..9c43d59 100644
--- a/resources/js/Global/store/modules/modal/state.js
+++ b/resources/js/Global/store/modules/modal/state.js
@@ -6,5 +6,5 @@ export default {
dialog: false,
},
dialogProperties: {},
- dialogType: {}
+ dialogType: {},
};
diff --git a/resources/js/Global/utils/common/CreateFilterObject.js b/resources/js/Global/utils/common/CreateFilterObject.js
index 27a3133..32c5be8 100644
--- a/resources/js/Global/utils/common/CreateFilterObject.js
+++ b/resources/js/Global/utils/common/CreateFilterObject.js
@@ -14,8 +14,28 @@ const createFilterObject = filters => {
};
window['between'] = function (filter) {
var value = null;
- if (filter.val1 || filter.val2) {
+ if (filter.val1 && filter.val2) {
value = `<${filter.val1},${filter.val2}>`;
+ } else if (filter.val1) {
+ filter.val = filter.val1;
+ value = greater(filter);
+ } else if(filter.val2) {
+ filter.val = filter.val2;
+ value = less(filter);
+ }
+ return value;
+}
+window['greater'] = function (filter) {
+ var value = null;
+ if (filter.val) {
+ value = `(ge)${filter.val1}`;
+ }
+ return value;
+}
+window['less'] = function (filter) {
+ var value = null;
+ if (filter.val) {
+ value = `(le)${filter.val1}`;
}
return value;
}
@@ -27,5 +47,16 @@ window['like'] = function(filter) {
}
return value;
}
+window['in'] = function(filter) {
+ var value = null;
+ if (filter.val) {
+ if (Array.isArray(filter.val)) {
+ value = filter.val.join(',');
+ } else {
+ value = `${filter.val}`;
+ }
+ }
+ return value;
+}
export default createFilterObject;
diff --git a/resources/js/Global/utils/common/ProcessTreeArray.js b/resources/js/Global/utils/common/ProcessTreeArray.js
index e62cd64..1c39266 100644
--- a/resources/js/Global/utils/common/ProcessTreeArray.js
+++ b/resources/js/Global/utils/common/ProcessTreeArray.js
@@ -178,19 +178,19 @@ const updateTreeArray = (treeArray, update, id, listArray = null) => {
let array = treeArray;
for (const key in hierarchy) {
if (hierarchy.hasOwnProperty(key)) {
- if (key == 0) {
+ if (key == 0) {
if (hierarchy.length - 1 == key) {
update["children"] = array[hierarchy[key]]["children"];
array[hierarchy[key]] = update;
} else {
- array = array[hierarchy[key]];
+ array = array[hierarchy[key]]['children'];
}
} else {
if (hierarchy.length - 1 == key) {
update["children"] = array[hierarchy[key]]["children"];
- array["children"][hierarchy[key]] = update;
+ array[hierarchy[key]] = update;
} else {
- array = array["children"][hierarchy[key]];
+ array = array[hierarchy[key]]['children'];
}
}
}
@@ -216,12 +216,18 @@ const insertTreeArray = (
if (hierarchy.hasOwnProperty(key)) {
if (key == 0) {
if (hierarchy.length - 1 == key) {
+ if (typeof array[hierarchy[key]]["children"] != 'array') {
+ array[hierarchy[key]]["children"] = [];
+ }
array[hierarchy[key]]["children"].push(store);
} else {
array = array[hierarchy[key]];
}
} else {
if (hierarchy.length - 1 == key) {
+ if (typeof array["children"][hierarchy[key]]["children"] != 'array') {
+ array["children"][hierarchy[key]]["children"] = [];
+ }
array["children"][hierarchy[key]]["children"].push(store);
} else {
array = array["children"][hierarchy[key]];
diff --git a/resources/js/Global/utils/common/routes.js b/resources/js/Global/utils/common/routes.js
index 78b87f6..d57aa81 100644
--- a/resources/js/Global/utils/common/routes.js
+++ b/resources/js/Global/utils/common/routes.js
@@ -8,4 +8,7 @@ export default {
user() {
return "/User/List";
},
+ originHostName() {
+ return process.env.MIX_PUSHER_APP_ORIGIN_HOST_NAME || 'www.willaengine.ir';
+ },
}
diff --git a/resources/js/Global/utils/vee-validate/locale/fa.js b/resources/js/Global/utils/vee-validate/locale/fa.js
index 0116fe9..e19c6a6 100644
--- a/resources/js/Global/utils/vee-validate/locale/fa.js
+++ b/resources/js/Global/utils/vee-validate/locale/fa.js
@@ -133,6 +133,7 @@
website: "آدرس سایت",
name: "نام",
text: "متن",
+ smsContent: "متن پیام",
client_type: "نوع مشتری",
cell_number: " شماره همراه ",
password: " کلمه عبور ",
diff --git a/resources/js/Home/views/AddModule.vue b/resources/js/Home/views/AddModule.vue
index db9dd4a..3fc89be 100644
--- a/resources/js/Home/views/AddModule.vue
+++ b/resources/js/Home/views/AddModule.vue
@@ -10,7 +10,7 @@
titleFa=" افزودن بخش جدید "
titleEn=" Add a New Section "
>
-
+
{{index+1}}
@@ -25,32 +25,37 @@
IRT
-
-
-
- fas fa-history
-
+
+
+
+
+ fas fa-history
+
+
فعالسازی نسخه ی 15 روزه، آزمایشی
-
+ -->
@@ -122,17 +127,34 @@ export default {
disabled: true
}
],
+ allModules: [],
};
},
computed: {
- ...mapGetters("role_permission", ["getAllModules"])
+ ...mapGetters("role_permission", ["getAllModules", "getModules"])
},
methods: {
- ...mapActions("role_permission", ["loadAllModules"]),
- ...mapMutations("role_permission", ["SET_CURRENT_MODULE"]),
+ ...mapActions("role_permission", ["loadAllModules", "loadModules"]),
+ ...mapMutations("role_permission", ["SET_CURRENT_MODULE"]),
+ async loadPage() {
+ await this.loadAllModules({ home_page: true });
+ let response = await this.loadModules({ home_page: true });
+ if (response && response.status == 200) {
+ for (const allModule of this.getAllModules) {
+ let module = this.getModules.find(x => x.id == allModule.id);
+ if (module) {
+ allModule['has_module'] = 'yes';
+ allModule['is_trial'] = module.is_trial;
+ } else {
+ allModule['has_module'] = 'no';
+ }
+ }
+ }
+ this.allModules = this.getAllModules;
+ }
},
- created() {
- this.loadAllModules({ home_page: true });
+ beforeMount() {
+ this.loadPage();
}
};
diff --git a/resources/js/Home/views/Home.vue b/resources/js/Home/views/Home.vue
index 63349c2..9ef85f7 100644
--- a/resources/js/Home/views/Home.vue
+++ b/resources/js/Home/views/Home.vue
@@ -18,7 +18,7 @@
>
-
+
fas fa-plus
@@ -37,10 +37,11 @@ export default {
"wm-tile": Tile,
},
computed: {
- ...mapGetters("role_permission", ["getModules"])
+ ...mapGetters("role_permission", ["getModules"]),
+ ...mapGetters("auth", ["getAuthUser"]),
},
methods: {
- ...mapActions("role_permission", ["loadModules"])
+ ...mapActions("role_permission", ["loadModules"]),
},
created() {
this.loadModules({ home_page: true });