1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Add service worker back in

This commit is contained in:
David Bomba 2020-12-17 21:53:20 +11:00
parent 9b6ba5fa45
commit feb78a63f2
5 changed files with 38 additions and 2 deletions

View File

@ -80,6 +80,7 @@ class Company extends BaseModel
'auto_start_tasks',
'is_disabled',
'default_task_is_date_based',
'enable_product_discount',
];
protected $hidden = [

View File

@ -19,6 +19,8 @@ class Country extends StaticModel
'eea' => 'boolean',
'swap_postal_code' => 'boolean',
'swap_currency_symbol' => 'boolean',
'thousand_separator' => 'string',
'decimal_separator' => 'string',
'updated_at' => 'timestamp',
'created_at' => 'timestamp',
'deleted_at' => 'timestamp',

View File

@ -147,6 +147,7 @@ class CompanyTransformer extends EntityTransformer
'show_tasks_table' => (bool) $company->show_tasks_table,
'use_credits_payment' => 'always', //todo remove
'default_task_is_date_based' => (bool)$company->default_task_is_date_based,
'enable_product_discount' => (bool)$company->enable_product_discount,
];
}

View File

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

View File

@ -96,7 +96,7 @@
document.getElementById('loader').style.display = 'none';
});
/*
function invokeServiceWorkerUpdateFlow() {
// you have a better UI here, reloading is not a great user experince here.
const confirmed = confirm('New version of the app is available. Refresh now');
@ -143,7 +143,7 @@
}
handleServiceWorker();
*/
</script>
<script defer src="main.dart.js?v={{ config('ninja.app_version') }}" type="application/javascript"></script>