Add field on company table

This commit is contained in:
David Bomba 2021-08-25 19:41:03 +10:00
parent 611110c35a
commit 41faffb09f
4 changed files with 35 additions and 1 deletions

View File

@ -769,6 +769,8 @@ class BaseController extends Controller
return 'main.last.dart.js';
case 'next':
return 'main.next.dart.js';
case 'profile':
return 'main.profile.dart.js';
default:
return 'main.dart.js';
}

View File

@ -95,6 +95,7 @@ class Company extends BaseModel
'default_password_timeout',
'show_task_end_date',
'use_comma_as_decimal_place',
'report_include_drafts',
];
protected $hidden = [

View File

@ -161,6 +161,7 @@ class CompanyTransformer extends EntityTransformer
'show_task_end_date' => (bool) $company->show_task_end_date,
'markdown_enabled' => (bool) $company->markdown_enabled,
'use_comma_as_decimal_place' => (bool) $company->use_comma_as_decimal_place,
'report_include_drafts' => (bool) $company->report_include_drafts,
];
}

View File

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class ReportIncludeDraftsInCompaniesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('companies', function (Blueprint $table) {
$table->boolean('report_include_drafts')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}