Document title and subheading feature some changes..
This commit is contained in:
parent
af8ba9726f
commit
09baf1991f
43
app/Listeners/Update/V30/Version3017.php
Normal file
43
app/Listeners/Update/V30/Version3017.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Listeners\Update\V30;
|
||||||
|
|
||||||
|
use App\Abstracts\Listeners\Update as Listener;
|
||||||
|
use App\Events\Install\UpdateFinished as Event;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
class Version3017 extends Listener
|
||||||
|
{
|
||||||
|
const ALIAS = 'core';
|
||||||
|
|
||||||
|
const VERSION = '3.0.17';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(Event $event)
|
||||||
|
{
|
||||||
|
if ($this->skipThisUpdate($event)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log::channel('stdout')->info('Updating to 3.0.17 version...');
|
||||||
|
|
||||||
|
$this->updateDatabase();
|
||||||
|
|
||||||
|
Log::channel('stdout')->info('Done!');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateDatabase(): void
|
||||||
|
{
|
||||||
|
Log::channel('stdout')->info('Updating database...');
|
||||||
|
|
||||||
|
Artisan::call('migrate', ['--force' => true]);
|
||||||
|
|
||||||
|
Log::channel('stdout')->info('Database updated.');
|
||||||
|
}
|
||||||
|
}
|
@ -53,10 +53,10 @@ class Document extends Model
|
|||||||
'contact_state',
|
'contact_state',
|
||||||
'contact_zip_code',
|
'contact_zip_code',
|
||||||
'contact_city',
|
'contact_city',
|
||||||
'notes',
|
|
||||||
'footer',
|
|
||||||
'title',
|
'title',
|
||||||
'subheading',
|
'subheading',
|
||||||
|
'notes',
|
||||||
|
'footer',
|
||||||
'parent_id',
|
'parent_id',
|
||||||
'created_from',
|
'created_from',
|
||||||
'created_by',
|
'created_by',
|
||||||
|
@ -25,6 +25,7 @@ class Event extends Provider
|
|||||||
'App\Listeners\Update\V30\Version3014',
|
'App\Listeners\Update\V30\Version3014',
|
||||||
'App\Listeners\Update\V30\Version3015',
|
'App\Listeners\Update\V30\Version3015',
|
||||||
'App\Listeners\Update\V30\Version3016',
|
'App\Listeners\Update\V30\Version3016',
|
||||||
|
'App\Listeners\Update\V30\Version3017',
|
||||||
],
|
],
|
||||||
'Illuminate\Auth\Events\Login' => [
|
'Illuminate\Auth\Events\Login' => [
|
||||||
'App\Listeners\Auth\Login',
|
'App\Listeners\Auth\Login',
|
||||||
|
@ -14,8 +14,8 @@ return new class extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('documents', function (Blueprint $table) {
|
Schema::table('documents', function (Blueprint $table) {
|
||||||
$table->string('title')->nullable()->default('');
|
$table->string('title')->nullable()->after('contact_country');
|
||||||
$table->string('subheading')->nullable()->default('');
|
$table->string('subheading')->nullable()->after('title');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -7,6 +7,30 @@
|
|||||||
</x-slot>
|
</x-slot>
|
||||||
|
|
||||||
<x-slot name="body">
|
<x-slot name="body">
|
||||||
|
<div class="sm:col-span-2 grid gap-x-8 gap-y-6">
|
||||||
|
@stack('title_start')
|
||||||
|
|
||||||
|
@if (! $hideDocumentTitle)
|
||||||
|
<x-form.group.text
|
||||||
|
name="title"
|
||||||
|
label="{{ trans('settings.invoice.title') }}"
|
||||||
|
value="{{ $title }}"
|
||||||
|
not-required
|
||||||
|
/>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@stack('subheading_start')
|
||||||
|
|
||||||
|
@if (! $hideDocumentSubheading)
|
||||||
|
<x-form.group.text
|
||||||
|
name="subheading"
|
||||||
|
label="{{ trans('settings.invoice.subheading') }}"
|
||||||
|
value="{{ $subheading }}"
|
||||||
|
not-required
|
||||||
|
/>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="sm:col-span-2">
|
<div class="sm:col-span-2">
|
||||||
@if (! $hideLogo)
|
@if (! $hideLogo)
|
||||||
<x-form.input.hidden name="company_logo" data-field="setting" />
|
<x-form.input.hidden name="company_logo" data-field="setting" />
|
||||||
|
@ -22,28 +22,6 @@
|
|||||||
<div class="sm:col-span-1"></div>
|
<div class="sm:col-span-1"></div>
|
||||||
|
|
||||||
<div class="sm:col-span-4 grid sm:grid-cols-4 gap-x-8 gap-y-6">
|
<div class="sm:col-span-4 grid sm:grid-cols-4 gap-x-8 gap-y-6">
|
||||||
@stack('title_start')
|
|
||||||
|
|
||||||
@if (! $hideDocumentTitle)
|
|
||||||
<x-form.group.text
|
|
||||||
name="title"
|
|
||||||
label="{{ trans('settings.invoice.title') }}"
|
|
||||||
value="{{ $title }}"
|
|
||||||
not-required
|
|
||||||
form-group-class="sm:col-span-2" />
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@stack('subheading_start')
|
|
||||||
|
|
||||||
@if (! $hideDocumentSubheading)
|
|
||||||
<x-form.group.text
|
|
||||||
name="subheading"
|
|
||||||
label="{{ trans('settings.invoice.subheading') }}"
|
|
||||||
value="{{ $subheading }}"
|
|
||||||
not-required
|
|
||||||
form-group-class="sm:col-span-2" />
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@stack('issue_start')
|
@stack('issue_start')
|
||||||
|
|
||||||
@if (! $hideIssuedAt)
|
@if (! $hideIssuedAt)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user