mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Text email stubs
This commit is contained in:
parent
98c70b34bd
commit
bed77a2710
@ -12,6 +12,7 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\Util\VersionCheck;
|
||||
use App\Utils\Ninja;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
@ -59,7 +60,12 @@ class PostUpdate extends Command
|
||||
info("finished running composer install ");
|
||||
|
||||
try {
|
||||
Artisan::call('optimize');
|
||||
|
||||
if(Ninja::isHosted())
|
||||
Artisan::call('optimize');
|
||||
else
|
||||
Artisan::call('config:clear');
|
||||
|
||||
} catch (\Exception $e) {
|
||||
info("I wasn't able to optimize.");
|
||||
}
|
||||
|
@ -169,7 +169,8 @@ class SetupController extends Controller
|
||||
|
||||
/* Run migrations */
|
||||
if (!config('ninja.disable_auto_update')) {
|
||||
Artisan::call('optimize');
|
||||
Artisan::call('config:clear');
|
||||
// Artisan::call('optimize');
|
||||
}
|
||||
|
||||
Artisan::call('migrate', ['--force' => true]);
|
||||
|
@ -111,7 +111,7 @@ class ZipInvoices implements ShouldQueue
|
||||
|
||||
}
|
||||
catch(\PhpZip\Exception\ZipException $e){
|
||||
// handle exception
|
||||
nlog("could not make zip => ". $e->getMessage());
|
||||
}
|
||||
finally{
|
||||
$zipFile->close();
|
||||
|
@ -39,6 +39,10 @@ class UnlinkFile implements ShouldQueue
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
/* Do not delete files if we are on the sync queue*/
|
||||
if(config('queue.default') == 'sync')
|
||||
return;
|
||||
|
||||
Storage::disk($this->disk)->delete($this->file_path);
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,9 @@ class DownloadBackup extends Mailable
|
||||
|
||||
return $this->from(config('mail.from.address'), config('mail.from.name'))
|
||||
->subject(ctrans('texts.download_backup_subject', ['company' => $company->present()->name()]))
|
||||
->text('email.admin.download_files_text',[
|
||||
'url' => $this->file_path,
|
||||
])
|
||||
->view('email.admin.download_files', [
|
||||
'url' => $this->file_path,
|
||||
'logo' => $company->present()->logo,
|
||||
|
@ -42,6 +42,9 @@ class DownloadCredits extends Mailable
|
||||
|
||||
return $this->from(config('mail.from.address'), config('mail.from.name'))
|
||||
->subject(ctrans('texts.download_files'))
|
||||
->text('email.admin.download_credits_text', [
|
||||
'url' => $this->file_path,
|
||||
])
|
||||
->view('email.admin.download_credits', [
|
||||
'url' => $this->file_path,
|
||||
'logo' => $this->company->present()->logo,
|
||||
|
@ -42,6 +42,9 @@ class DownloadInvoices extends Mailable
|
||||
|
||||
return $this->from(config('mail.from.address'), config('mail.from.name'))
|
||||
->subject(ctrans('texts.download_files'))
|
||||
->text('email.admin.download_invoices_text', [
|
||||
'url' => $this->file_path,
|
||||
])
|
||||
->view('email.admin.download_invoices', [
|
||||
'url' => $this->file_path,
|
||||
'logo' => $this->company->present()->logo,
|
||||
|
@ -42,6 +42,9 @@ class DownloadQuotes extends Mailable
|
||||
|
||||
return $this->from(config('mail.from.address'), config('mail.from.name'))
|
||||
->subject(ctrans('texts.download_files'))
|
||||
->text('email.admin.download_quotes_text', [
|
||||
'url' => $this->file_path,
|
||||
])
|
||||
->view('email.admin.download_quotes', [
|
||||
'url' => $this->file_path,
|
||||
'logo' => $this->company->present()->logo,
|
||||
|
@ -44,6 +44,7 @@ class ExistingMigration extends Mailable
|
||||
|
||||
return $this
|
||||
->from(config('mail.from.address'), config('mail.from.name'))
|
||||
->text('email.migration.existing_text')
|
||||
->view('email.migration.existing');
|
||||
}
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ class MigrationCompleted extends Mailable
|
||||
$data['logo'] = $this->company->present()->logo();
|
||||
|
||||
$result = $this->from(config('mail.from.address'), config('mail.from.name'))
|
||||
->text('email.import.completed_text', $data)
|
||||
->view('email.import.completed', $data);
|
||||
|
||||
return $result;
|
||||
|
@ -0,0 +1,5 @@
|
||||
{!! ctrans('texts.credits_backup_subject') !!}
|
||||
|
||||
{!! ctrans('texts.download_timeframe') !!}
|
||||
|
||||
{!! $url !!}
|
@ -0,0 +1,5 @@
|
||||
{!! ctrans('texts.download_backup_subject') !!}
|
||||
|
||||
{!! ctrans('texts.download_timeframe') !!}
|
||||
|
||||
{!! $url !!}
|
@ -0,0 +1,5 @@
|
||||
{!! ctrans('texts.invoices_backup_subject') !!}
|
||||
|
||||
{!! ctrans('texts.download_timeframe') !!}
|
||||
|
||||
{!! $url !!}
|
@ -0,0 +1,5 @@
|
||||
{!! ctrans('texts.quotes_backup_subject') !!}
|
||||
|
||||
{!! ctrans('texts.download_timeframe') !!}
|
||||
|
||||
{!! $url !!}
|
73
resources/views/email/import/completed_text.blade.php
Normal file
73
resources/views/email/import/completed_text.blade.php
Normal file
@ -0,0 +1,73 @@
|
||||
Hello, here is the output of your recent import job.
|
||||
|
||||
If your logo imported correctly it will available display below. If it didn't import, you'll need to reupload your logo
|
||||
|
||||
{!! $company->present()->logo() !!}
|
||||
|
||||
@if(isset($company) && $company->clients->count() >=1)
|
||||
{!! ctrans('texts.clients') !!}: {!! $company->clients->count() !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->products) >=1)
|
||||
{!! ctrans('texts.products') !!}: {!! count($company->products) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->invoices) >=1)
|
||||
{!! ctrans('texts.invoices') !!}: {!! count($company->invoices) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->payments) >=1)
|
||||
{!! ctrans('texts.payments') !!}: {!! count($company->payments) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->recurring_invoices) >=1)
|
||||
{!! ctrans('texts.recurring_invoices') !!}: {!! count($company->recurring_invoices) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->quotes) >=1)
|
||||
{!! ctrans('texts.quotes') !!}: {!! count($company->quotes) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->credits) >=1)
|
||||
{!! ctrans('texts.credits') !!}: {!! count($company->credits) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->projects) >=1)
|
||||
{!! ctrans('texts.projects') !!}: {!! count($company->projects) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->tasks) >=1)
|
||||
{!! ctrans('texts.tasks') !!}: {!! count($company->tasks) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->vendors) >=1)
|
||||
{!! ctrans('texts.vendors') !!}: {!! count($company->vendors) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->expenses) >=1)
|
||||
{!! ctrans('texts.expenses') !!}: {!! count($company->expenses) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->company_gateways) >=1)
|
||||
{!! ctrans('texts.gateways') !!}: {!! count($company->company_gateways) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->client_gateway_tokens) >=1)
|
||||
{!! ctrans('texts.tokens') !!}: {!! count($company->client_gateway_tokens) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->tax_rates) >=1)
|
||||
{!! ctrans('texts.tax_rates') !!}: {!! count($company->tax_rates) !!}
|
||||
@endif
|
||||
|
||||
@if(isset($company) && count($company->documents) >=1)
|
||||
{!! ctrans('texts.documents') !!}: {!! count($company->documents) !!}
|
||||
@endif
|
||||
|
||||
{!! url('/') !!}
|
||||
|
||||
{!! ctrans('texts.email_signature') !!}
|
||||
|
||||
{!! ctrans('texts.email_from') !!}
|
||||
|
||||
|
3
resources/views/email/migration/existing_text.blade.php
Normal file
3
resources/views/email/migration/existing_text.blade.php
Normal file
@ -0,0 +1,3 @@
|
||||
{!! ctrans('texts.migration_already_completed') !!}
|
||||
|
||||
{!! ctrans('texts.migration_already_completed_desc', ['company_name' => $company_name]) !!}
|
Loading…
x
Reference in New Issue
Block a user