merge selected Item

pull/1/head
alireza hassani 5 years ago
commit eec09d2ce8

@ -0,0 +1,43 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class BuildSwagger extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'swagger:build';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Build swagger api list.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$basePath = base_path();
exec("$basePath/vendor/bin/openapi --bootstrap $basePath/development/swagger-constants.php --output $basePath/public/swagger/swagger.json $basePath/development/swagger-v1.php $basePath/app/Http/Controllers $basePath/modules --format json");
}
}

@ -26,6 +26,9 @@ class Kernel extends ConsoleKernel
{
// $schedule->command('inspire')
// ->hourly();
// $schedule->call(function () {
// \DB::table('wmuser_common.comments')->limit(1)->delete();
// })->cron('*/2 * * * *')->sendOutputTo(storage_path('task.txt'));
}
/**

@ -18,6 +18,9 @@ class EventServiceProvider extends ServiceProvider
Registered::class => [
SendEmailVerificationNotification::class,
],
'Illuminate\Notifications\Events\NotificationSent' => [
'App\Listeners\LogNotification',
],
];
/**

@ -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",

@ -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"
}

@ -0,0 +1,115 @@
<template>
<div>
<v-snackbar
v-for="(message, key) in messages"
:key="key"
:color="message.color || 'black'"
:timeout="message.timeout || 3000"
v-model="message.snackbar"
:bottom="message.y === 'bottom'"
:left="message.x === 'left'"
:right="message.x === 'right'"
:top="message.y === 'top'"
>
{{message.content || ''}}
<v-btn :color="message.color_icon || 'white'" text @click="message.snackbar = false" fab>
<v-icon :color="message.color_icon || 'white'">{{ message.icon || "fas fa-times" }}</v-icon>
</v-btn>
</v-snackbar>
</div>
</template>
<script>
import { mapActions, mapGetters } from "vuex";
import axios from "axios";
import { TokenService } from "@Global/services/storage.services";
import ApiService from "@Global/services/api.services";
import store from "@Core/store/index";
import commonRoute from "@Global/utils/common/routes";
var default_message = {
snackbar: true,
content: "",
timeout: 3000,
color: "red",
icon: "fas fa-times",
color_icon: "white",
y: "",
x: ""
};
export default {
data: () => ({
messages: [{
snackbar: true,
content: "dsada",
timeout: 3000,
color: "red",
icon: "fas fa-times",
color_icon: "white"
},{
snackbar: true,
content: "wersdcasd",
timeout: 3000,
color: "red",
icon: "fas fa-times",
color_icon: "white"
}]
}),
methods: {
errorResponseHandler(error) {
// check for errorHandle config
if (
error.config.hasOwnProperty("errorHandle") &&
error.config.errorHandle === false
) {
return Promise.reject(error);
}
// if has response show the error
if (error.response) {
if (error.response.status == 401) {
TokenService.removeToken();
ApiService.removeAuthHeader();
store.commit("auth/logout", {}, { root: true });
if (commonRoute.login() != window.location.pathname) {
window.location.href = commonRoute.login();
}
let new_message = { ...default_message };
new_message.content = "نام کاربری یا رمز عبور اشتباه است";
this.messages.push(new_message);
} else if (error.response.status == 422) {
if (typeof error.response.data.errors !== "undefined") {
for (const key in error.response.data.errors) {
if (
error.response.data.errors.hasOwnProperty(key)
) {
let new_message = { ...default_message };
new_message.content =
"نام کاربری یا رمز عبور اشتباه است";
this.messages.push(new_message);
}
}
}
} else if (error.response.status == 500) {
let new_message = { ...default_message };
new_message.content = "مشکل از سمت سرور";
this.messages.push(new_message);
}
}
},
successHandler(response) {
// if(response.status == 200 || response.status == 201) {
// if(typeof response.data.message !== 'undefined') {
// toast.success(response.data.message, response.data.title);
// }
// }
return response;
}
},
created() {
axios.interceptors.response.use(
this.successHandler,
this.errorResponseHandler
);
}
};
</script>

@ -3,9 +3,10 @@ var CommingSoonArray = [
"discount",
"transaction",
"email",
"sms",
// "sms",
"prescription",
"user_sms",
"crm-setting",
// "crm-client-filter",
"crm-statistics",

@ -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"

@ -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 {

@ -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;
}

@ -22,5 +22,5 @@ export default {
state.modal.dialog = true;
commit('SET_DIALOG_TYPE', properties.type);
commit('SET_DIALOG_PROPERTIES', properties);
}
},
};

@ -13,5 +13,5 @@ export default {
},
SET_DIALOG_PROPERTIES(state, properties = {}) {
state.dialogProperties = properties;
}
},
};

@ -6,5 +6,5 @@ export default {
dialog: false,
},
dialogProperties: {},
dialogType: {}
dialogType: {},
};

@ -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;

@ -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]];

@ -8,4 +8,7 @@ export default {
user() {
return "/User/List";
},
originHostName() {
return process.env.MIX_PUSHER_APP_ORIGIN_HOST_NAME || 'www.willaengine.ir';
},
}

@ -133,6 +133,7 @@
website: "آدرس سایت",
name: "نام",
text: "متن",
smsContent: "متن پیام",
client_type: "نوع مشتری",
cell_number: " شماره همراه ",
password: " کلمه عبور ",

@ -10,7 +10,7 @@
titleFa=" افزودن بخش جدید "
titleEn=" Add a New Section "
></WM-PageTitle>
<div v-for="(module, index) in getAllModules" :key="index">
<div v-for="(module, index) in allModules" :key="index">
<div :class="'ModuleItem '+module.color_class+'Border'">
<div :class="'itrator En '+module.color_class+'--text'">{{index+1}}</div>
<v-layout row wrap class="WM-Margin-0">
@ -25,32 +25,37 @@
<span class="Unit">IRT</span>
</div>
</v-flex>
<v-flex lg4 class="WM-Align-L">
<v-tooltip top color="black">
<v-btn
small
outline
@click.native="$_openModal('role_permission/trial_confirmation'), SET_CURRENT_MODULE(module)"
slot="activator"
fab
:color="module.color_class"
>
<v-icon dark>fas fa-history</v-icon>
</v-btn>
<v-flex lg4 class="WM-Align-L" >
<v-tooltip top transition="slide-x-transition" color="black" v-if="module.has_module == 'no'" >
<template v-slot:activator="{ on }">
<v-btn
v-on="on"
small
@click.native="$_openModal('role_permission/trial_confirmation'), SET_CURRENT_MODULE(module)"
slot="activator"
fab
:color="module.color_class"
>
<v-icon dark>fas fa-history</v-icon>
</v-btn>
</template>
<span>فعالسازی نسخه ی 15 روزه، آزمایشی</span>
</v-tooltip>
<!-- <v-tooltip top color="black">
<v-btn
@click.native="$_openModal('role_permission/payment_confirmation'), SET_CURRENT_ALL_MODULE(module)"
slot="activator"
fab
:color="module.color_class"
dark
>
<v-icon dark> fas fa-plus </v-icon>
</v-btn>
<!-- <v-tooltip top transition="slide-x-transition" color="black" v-if="module.has_module == 'no' || module.is_trial == 'yes'">
<template v-slot:activator="{ on }">
<v-btn
@click.native="$_openModal('role_permission/payment_confirmation'), SET_CURRENT_ALL_MODULE(module)"
slot="activator"
fab
:color="module.color_class"
dark
v-on="on"
>
<v-icon dark> fas fa-plus </v-icon>
</v-btn>
</template>
<span> خرید </span>
</v-tooltip>-->
</v-tooltip> -->
</v-flex>
<v-flex lg12 class="description RTL" v-if="module.description_title">
<v-expansion-panel popout style="margin-bottom:0px;">
@ -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();
}
};
</script>

@ -18,7 +18,7 @@
></wm-tile>
</a>
</v-layout>
<router-link :to="{name: 'AddModule'}">
<router-link v-if="getAuthUser.is_owner == 'true'" :to="{name: 'AddModule'}">
<v-btn large fab color="cyan" fixed bottom left dark style="left:5%">
<v-icon dark>fas fa-plus</v-icon>
</v-btn>
@ -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 });

Loading…
Cancel
Save