commit
444eeb3efe
@ -1,37 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
|
|
||||||
class CreateModuleUser extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
$dbName = config('core.db_name');
|
|
||||||
Schema::create("$dbName.module_user", function (Blueprint $table) {
|
|
||||||
$table->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");
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,50 @@
|
|||||||
|
<?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,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=0da35ad1057d82e83419",
|
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=60b0a33dbb353c1d7edc",
|
||||||
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=28ad11b47b82000bb110",
|
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=9f533af650a307e880c0",
|
||||||
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=7fa03d7410899cabc276",
|
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=92214a4c3239559ded55",
|
||||||
"/js/vue/User/app.js": "/js/vue/User/app.js?id=8d80fa57638e29bc7263"
|
"/js/vue/User/app.js": "/js/vue/User/app.js?id=f3c9f37079c432adb37c"
|
||||||
}
|
}
|
||||||
|
@ -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;
|
Loading…
Reference in new issue