aliqasemi 4 years ago
commit 5ed1a24764

@ -3,6 +3,7 @@
namespace App\Providers;
use App\Services\MorphModelFinder;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@ -15,6 +16,7 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
app(MorphModelFinder::class)->map();
Schema::defaultStringLength(191);
}
/**

@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class TempBussinessAddIsVirtualColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('businesses', function (Blueprint $table) {
$table->enum('is_virtual', ['yes', 'no'])->default('yes');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
if (Schema::hasColumn('businesses', 'is_virtual')) {
Schema::table('businesses', function (Blueprint $table) {
$table->dropColumn('is_virtual');
});
}
}
}

@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class TempAppendRoleNameEnColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('tbl_roles', function (Blueprint $table) {
$table->string('name_en');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
if (Schema::hasColumn('tbl_roles', 'name_en')) {
Schema::table('tbl_roles', function (Blueprint $table) {
$table->dropColumn('name_en');
});
}
}
}

@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class TempAppendPermissionNameEnModuleIdColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('tbl_permissions', function (Blueprint $table) {
$table->string('name_en');
$table->unsignedInteger('module_id')->nullable();
$table->index('module_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
if (Schema::hasColumn('tbl_permissions', 'name_en')) {
Schema::table('tbl_roles', function (Blueprint $table) {
$table->dropColumn('name_en');
});
}
}
}

@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class TempModuleBusinessColumnExpiresAt extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$dbName = config('core.db_name');
Schema::table($dbName . '.module_business', function (Blueprint $table) {
$table->timestamp('expires_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$dbName = config('core.db_name');
if (Schema::hasColumn($dbName . '.module_business', 'expires_at')) {
Schema::table($dbName . '.module_business', function (Blueprint $table) {
$table->dropColumn('expires_at');
});
}
}
}

@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddLoadInHomeColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$dbName = config('core.db_name');
Schema::table($dbName . '.modules', function (Blueprint $table) {
$table->enum('load_in_home', ['yes', 'no'])->default('yes');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}

@ -1,50 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class TempUpdateColumns extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$dbName = config('crm.db_name');
Schema::table("$dbName.clients", function (Blueprint $table) {
$table->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()
{
}
}

@ -1,38 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFirstNameLastNameColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table("users", function (Blueprint $table) {
$table->string('first_name', 255)->nullable()->after('name');
$table->string('last_name', 255)->nullable()->after('first_name');
});
$dbName = config("crm.db_name");
Schema::table($dbName . ".clients", function (Blueprint $table) {
$table->string('first_name', 255)->nullable()->after('name');
$table->string('last_name', 255)->nullable()->after('first_name');
$table->string('file_code', 255)->nullable()->after('last_name');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

@ -1,45 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateTableUsers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('file_code')->nullable();
$table->enum('user_type', ['natural','juridical'])->default('natural');
$table->string('responsibility')->default('client');
$table->string('father_name')->nullable();
$table->string('website')->nullable();
$table->text('description')->nullable();
$table->unsignedInteger('user_status_id')->nullable();
$table->unsignedInteger('user_title_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('file_code');
$table->dropColumn('user_type');
$table->dropColumn('father_name');
$table->dropColumn('website');
$table->dropColumn('description');
$table->dropColumn('user_status_id');
$table->dropColumn('user_title_id');
});
}
}

@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class NewUpdateTableUsers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->date('marriage_date')->nullable();
$table->string('company_type', 50)->nullable();
$table->enum('sex', ['male','female'])->nullable();
$table->string('registration_number',50)->nullable();
$table->string('economic_code', 50)->nullable();
$table->timestamp('modified_at')->nullable()->default(\DB::raw('CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'));
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('marriage_date');
$table->dropColumn('company_type');
$table->dropColumn('sex');
$table->dropColumn('registration_number');
$table->dropColumn('economic_code');
$table->dropColumn('modified_at');
});
}
}

@ -1,18 +0,0 @@
<?php
use Illuminate\Database\Seeder;
class CrmCategoriesSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
factory(WM\CRM\Models\Category::class, 50)->create()->each(function ($category) {
});
}
}

@ -11,7 +11,15 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
// $this->call(ModuleSeeder::class);
$this->call(UserSeeder::class);
$this->call(BusinessSeeder::class);
$this->call(CategorySeeder::class);
$this->call(CitySeeder::class);
$this->call(DistrictSeeder::class);
$this->call(DomainSeeder::class);
$this->call(HelpSeeder::class);
$this->call(ModuleSeeder::class);
$this->call(PermissionCategorySeeder::class);
$this->call(RoleSeeder::class);
}
}

@ -81,6 +81,7 @@ export default {
titleFa: " مدیریت محصولات ",
icon: "dropbox",
permissionClass: "Product::index",
module: "core",
href: '/product/home',
tileClass: 'cyan-theme',
},
@ -216,4 +217,7 @@ export default {
.drawer.open {
left: 0px;
}
.v-application .caption {
font-family: iranyekan-regular!important;
}
</style>

@ -1,30 +1,24 @@
<template>
<v-dialog v-model="modal" :width="width" :transition="transition">
<component v-if="modal" :is="name" />
<v-dialog v-model="modal" :max-width="maxWidth" :width="width" :transition="transition">
<slot :modal="modal" :data="data" v-if="modal" ></slot>
</v-dialog>
</template>
<script>
import {mapGetters} from "vuex";
export default {
props: {
width:{default: '60%'},
name:{default: ''},
width:{default: null},
maxWidth:{default: null},
name:{default: null},
transition:{default: 'slide-x-transition'},
},
data:() => ({
}),
components:{
'modal_task_list': () => '@Common/components/Task/Timeline/Modal-Layout.vue',
'modal_task_add': () => '@Common/components/Task/AddEdit/Modal-Add.vue'
},
computed: {
...mapGetters("modal", ["isModal"]),
...mapGetters("modal", ["isModal", "getModal"]),
modal: {
get() {
return this.isModal(this.name);
return this.isModal(this.modalName);
},
set(value) {
if (!value) {
@ -32,6 +26,12 @@
}
}
},
modalName() {
return this.name ? this.name : this.$parent.$options.name;
},
data() {
return this.getModal(this.modalName);
}
},
}

@ -1,5 +1,5 @@
<template>
<v-dialog v-model="modal" width="40%" transition="slide-x-transition">
<basic-modal width="40%" transition="slide-x-transition">
<v-card class="RTL">
<v-card-title class="red lighten-5" primary-title>
<WM-PartTitle
@ -38,11 +38,11 @@
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</basic-modal>
</template>
<script>
import { mapActions, mapGetters } from "vuex";
import { mapGetters } from "vuex";
export default {
name: "modal_modal_dialog",
data: () => ({
@ -77,17 +77,7 @@ export default {
}
},
computed: {
...mapGetters("modal", ["isModal", "getModal", "getDialogType", "getDialogProperties"]),
modal: {
get() {
return this.isModal(this.$options.name);
},
set(value) {
if (!value) {
this.$_closeModal();
}
}
},
...mapGetters("modal", ["getDialogType", "getDialogProperties"]),
},
methods: {
async confirm() {

@ -1,5 +1,5 @@
<template>
<v-dialog v-model="modal" :width="properties.properties && properties.properties.width ? properties.properties.width : '60%'" transition="slide-x-transition">
<basic-modal :width="properties.properties && properties.properties.width ? properties.properties.width : '60%'" transition="slide-x-transition">
<v-card class="RTL">
<v-card-title :class="[properties.properties && properties.properties.color ? properties.properties.color : 'blue', 'lighten-5']" primary-title>
<WM-PartTitle
@ -28,12 +28,11 @@
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</basic-modal>
</template>
<script>
import { mapActions, mapGetters } from "vuex";
import axios from 'axios';
import { mapGetters } from "vuex";
import { url } from '@Common/mixins/urls';
export default {
name: "modal_modal_helper",
@ -41,26 +40,14 @@ export default {
properties: {}
}),
computed: {
...mapGetters("modal", ["isModal", "getModal"]),
modal: {
get() {
return this.isModal(this.$options.name);
},
set(value) {
if (!value) {
this.$_closeModal();
}
}
},
...mapGetters("modal", ["getModal"]),
},
methods: {
async getDate() {
if (this.modal) {
let response = await axios.get(url('help', {help: this.getModal(this.$options.name).slug}));
if (response && response.status == 200) {
this.properties = response.data.data;
this.properties.properties = (response.data.data.properties) ? JSON.parse(response.data.data.properties) : null;
}
let response = await this.$axios.get(url('help', {help: this.getModal(this.$options.name).slug}));
if (response && response.status === 200) {
this.properties = response.data.data;
this.properties.properties = (response.data.data.properties) ? JSON.parse(response.data.data.properties) : null;
}
}
},

@ -24,6 +24,9 @@ Vue.component("section-title", SectionTitle);
import SectionTitleVertical from "@Global/components/Dividers/SectionTitle-Vertical.vue";
Vue.component("section-title-vertical", SectionTitleVertical);
import BasicModal from "@Global/components/Modals/BasicModal";
Vue.component("basic-modal", BasicModal);
import Breadcrumbs from "@Global/components/Misc/Breadcrumbs";
import Dialog from "@Global/components/Modals/Dialog.vue";
import Helper from "@Global/components/Modals/Helper.vue";

@ -3,14 +3,14 @@
<div id="app" class="we-dark">
<wm-background C1="fff" C2="f1f1f1" C3="fff"/>
<app-menu/>
<v-content>
<v-main>
<v-container fluid class="Login">
<div class="Tile">
<router-view/>
<!-- <wm-tiles-layout></wm-tiles-layout> -->
</div>
</v-container>
</v-content>
</v-main>
</div>
</v-app>
</template>

@ -38,7 +38,7 @@
</v-dialog>
</template>
<script>
import { mapGetters, mapActions, mapMutations } from "vuex";
import { mapGetters, mapMutations } from "vuex";
export default {
name: "modal_rolePermission_paymentConfirm",
data() {
@ -60,20 +60,9 @@ export default {
}
},
computed: {
...mapGetters("modal", ["isModal", "getModal"]),
...mapGetters([
'getModuleState'
]),
modal: {
get() {
return this.isModal(this.$options.name);
},
set(value) {
if (!value) {
this.$_closeModal();
}
}
},
},
methods: {
...mapMutations([

@ -57,9 +57,9 @@ export default {
},
methods: {
async register() {
if (this.modal && this.getModal(this.$options.name).model) {
if (this.getModal(this.$options.name) && this.getModal(this.$options.name).model) {
let response = await this.actviveTrial(this.getModal(this.$options.name).model.id);
if (response.status == 200) {
if (response.status === 200) {
this.$_closeModal();
}
}
@ -67,17 +67,7 @@ export default {
...mapActions("rolePermission", ["actviveTrial"])
},
computed: {
...mapGetters("modal", ["isModal", "getModal"]),
modal: {
get() {
return this.isModal(this.$options.name);
},
set(value) {
if (!value) {
this.$_closeModal();
}
}
},
...mapGetters("modal", ["getModal"]),
expiredDate() {
var today = new Date();
return new Date(today.setDate(today.getDate() + 15));

Loading…
Cancel
Save