oasis setup script

This commit is contained in:
Peter Papp
2021-05-03 08:12:37 +02:00
parent fe0ed38157
commit 434c45299c
10 changed files with 1189 additions and 1743 deletions

View File

@@ -149,5 +149,45 @@ class SetupOasisEnvironment extends Command
], [
'value' => '#ae5fec',
]);
// Get system images
collect(['logo.png', 'logo-horizontal.png', 'favicon.png', 'oasis-og-image.jpg'])
->each(function ($file) {
Storage::putFileAs('system', storage_path("demo/oasis/$file"), $file, 'private');
});
collect([
[
'name' => 'app_title',
'value' => 'Oasis',
],
[
'name' => 'app_description',
'value' => 'Chytrý, bezpečný, pohodlný šanon vždy s Vámi.',
],
[
'name' => 'app_logo',
'value' => 'system/logo.png',
],
[
'name' => 'app_logo_horizontal',
'value' => 'system/logo-horizontal.png',
],
[
'name' => 'app_favicon',
'value' => 'system/favicon.png',
],
[
'name' => 'app_og_image',
'value' => 'system/oasis-og-image.jpg',
],
])->each(function ($option) {
Setting::updateOrCreate([
'name' => $option['name'],
], [
'value' => $option['value'],
]);
});
}
}

View File

@@ -1,6 +1,7 @@
<?php
namespace App\Models;
use App\Notifications\ResetPassword;
use App\Traits\Oasis;
use ByteUnits\Metric;
use Illuminate\Support\Str;

1915
composer.lock generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -10,14 +10,6 @@
<PageTabGroup>
<FormLabel icon="tool">Invoice Properties</FormLabel>
<!--<div class="block-wrapper">
<label>Invoice Type:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="invoice_type" rules="required" v-slot="{ errors }">
<SelectInput v-model="invoice.invoice_type" :default="invoice.invoice_type" :options="invoiceTypeList" placeholder="" :isError="errors[0]" />
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>-->
<div class="block-wrapper">
<label>Invoice Number:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="invoice_number" rules="required" v-slot="{ errors }">

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
storage/demo/oasis/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

View File

@@ -231,7 +231,7 @@ class OasisInvoiceTest extends TestCase
'invoice_type' => 'regular-invoice',
'invoice_number' => '2120001',
'variable_number' => '2120001',
'items' => $this->items,
'items' => json_encode($this->items),
'discount_type' => 'percent',
'discount_rate' => 10,
'delivery_at' => Carbon::now()->addWeek(),
@@ -295,7 +295,7 @@ class OasisInvoiceTest extends TestCase
'invoice_type' => 'regular-invoice',
'invoice_number' => '2120001',
'variable_number' => '2120001',
'items' => $this->items,
'items' => json_encode($this->items),
'discount_type' => 'percent',
'discount_rate' => 10,
'delivery_at' => Carbon::now()->addWeek(),
@@ -352,7 +352,7 @@ class OasisInvoiceTest extends TestCase
'invoice_type' => 'regular-invoice',
'invoice_number' => '2120001',
'variable_number' => '2120001',
'items' => $this->items,
'items' => json_encode($this->items),
'discount_type' => 'percent',
'discount_rate' => 10,
'delivery_at' => Carbon::now()->addWeek(),
@@ -410,7 +410,7 @@ class OasisInvoiceTest extends TestCase
'invoice_type' => 'regular-invoice',
'invoice_number' => '2120001',
'variable_number' => '2120001',
'items' => $this->items,
'items' => json_encode($this->items),
'discount_type' => 'percent',
'discount_rate' => 10,
'delivery_at' => Carbon::now()->addWeek(),
@@ -475,7 +475,7 @@ class OasisInvoiceTest extends TestCase
'invoice_number' => '2120001',
'variable_number' => '2120001',
'client' => $client->id,
'items' => $this->items,
'items' => json_encode($this->items),
'discount_type' => 'percent',
'discount_rate' => 10,
'delivery_at' => Carbon::now()->addWeek(),
@@ -566,7 +566,7 @@ class OasisInvoiceTest extends TestCase
'invoice_number' => '2120001',
'variable_number' => '2120001',
'client' => $client->id,
'items' => $this->items,
'items' => json_encode($this->items),
'discount_type' => 'percent',
'discount_rate' => 10,
'delivery_at' => Carbon::now()->addWeek(),