mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 02:14:36 -04:00
Minor fixes for admin email templates
This commit is contained in:
parent
bc065e2132
commit
88d5d14de3
@ -463,7 +463,10 @@ class CompanySettings extends BaseSettings
|
|||||||
|
|
||||||
public $accept_client_input_quote_approval = false;
|
public $accept_client_input_quote_approval = false;
|
||||||
|
|
||||||
|
public $allow_billable_task_items = false;
|
||||||
|
|
||||||
public static $casts = [
|
public static $casts = [
|
||||||
|
'allow_billable_task_items' => 'bool',
|
||||||
'accept_client_input_quote_approval' => 'bool',
|
'accept_client_input_quote_approval' => 'bool',
|
||||||
'custom_sending_email' => 'string',
|
'custom_sending_email' => 'string',
|
||||||
'show_paid_stamp' => 'bool',
|
'show_paid_stamp' => 'bool',
|
||||||
|
@ -42,6 +42,7 @@ class Scheduler extends BaseModel
|
|||||||
'template',
|
'template',
|
||||||
'is_paused',
|
'is_paused',
|
||||||
'parameters',
|
'parameters',
|
||||||
|
'remaining_cycles',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
@ -71,44 +72,21 @@ class Scheduler extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->belongsTo(Company::class);
|
return $this->belongsTo(Company::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function nextScheduledDate(): ?Carbon
|
/**
|
||||||
// {
|
* remainingCycles
|
||||||
// $offset = 0;
|
*
|
||||||
|
* @return int
|
||||||
// $entity_send_time = $this->company->settings->entity_send_time;
|
*/
|
||||||
|
public function remainingCycles() : int
|
||||||
// if ($entity_send_time != 0) {
|
{
|
||||||
// $timezone = $this->company->timezone();
|
if ($this->remaining_cycles == 0) {
|
||||||
|
return 0;
|
||||||
// $offset -= $timezone->utc_offset;
|
} elseif ($this->remaining_cycles == -1) {
|
||||||
// $offset += ($entity_send_time * 3600);
|
return -1;
|
||||||
// }
|
} else {
|
||||||
|
return $this->remaining_cycles - 1;
|
||||||
// /*
|
}
|
||||||
// As we are firing at UTC+0 if our offset is negative it is technically firing the day before so we always need
|
}
|
||||||
// to add ON a day - a day = 86400 seconds
|
|
||||||
// */
|
|
||||||
|
|
||||||
// if ($offset < 0) {
|
|
||||||
// $offset += 86400;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// switch ($this->repeat_every) {
|
|
||||||
// case self::DAILY:
|
|
||||||
// return Carbon::parse($this->scheduled_run)->startOfDay()->addDay()->addSeconds($offset);
|
|
||||||
// case self::WEEKLY:
|
|
||||||
// return Carbon::parse($this->scheduled_run)->startOfDay()->addWeek()->addSeconds($offset);
|
|
||||||
// case self::BIWEEKLY:
|
|
||||||
// return Carbon::parse($this->scheduled_run)->startOfDay()->addWeeks(2)->addSeconds($offset);
|
|
||||||
// case self::MONTHLY:
|
|
||||||
// return Carbon::parse($this->scheduled_run)->startOfDay()->addMonthNoOverflow()->addSeconds($offset);
|
|
||||||
// case self::QUARTERLY:
|
|
||||||
// return Carbon::parse($this->scheduled_run)->startOfDay()->addMonthsNoOverflow(3)->addSeconds($offset);
|
|
||||||
// case self::ANNUALLY:
|
|
||||||
// return Carbon::parse($this->scheduled_run)->startOfDay()->addYearNoOverflow()->addSeconds($offset);
|
|
||||||
// default:
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,8 @@ class MailCssInlinerServiceProvider extends ServiceProvider
|
|||||||
// return new CssInlinerPlugin([]);
|
// return new CssInlinerPlugin([]);
|
||||||
// });
|
// });
|
||||||
|
|
||||||
$this->app->bind(CssInlinerPlugin::class, function ($app) {
|
// $this->app->bind(CssInlinerPlugin::class, function ($app) {
|
||||||
return new CssInlinerPlugin([]);
|
// return new CssInlinerPlugin([]);
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration {
|
||||||
@ -12,10 +11,14 @@ return new class extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('company_user', function (Blueprint $table) {
|
Schema::table('company_user', function (Illuminate\Database\Schema\Blueprint $table) {
|
||||||
$table->mediumText('react_settings')->nullable();
|
$table->mediumText('react_settings')->nullable();
|
||||||
|
});
|
||||||
|
|
||||||
\Illuminate\Support\Facades\Artisan::call('ninja:design-update');
|
\Illuminate\Support\Facades\Artisan::call('ninja:design-update');
|
||||||
|
|
||||||
|
Schema::table('schedulers', function (Illuminate\Database\Schema\Blueprint $table) {
|
||||||
|
$table->integer('remaining_cycles')->nullable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,19 +3,26 @@
|
|||||||
<h1>{{ ctrans('texts.credits_backup_subject') }}</h1>
|
<h1>{{ ctrans('texts.credits_backup_subject') }}</h1>
|
||||||
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
||||||
|
|
||||||
<!-- <a target="_blank" class="button" href="{{ $url }}">
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
{{ ctrans('texts.download') }}
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
</a> -->
|
<tr>
|
||||||
|
<td align="center" valign="top">
|
||||||
<table border="0" cellspacing="0" cellpadding="0" align="center">
|
<![endif]-->
|
||||||
<tr style="border: 0 !important; ">
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
<tbody><tr>
|
||||||
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: {{ $settings->primary_color }}">
|
||||||
<a href="{{ $url }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block; "> {{ ctrans('texts.download') }}</a>
|
<a href="{{ $url }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid {{ settings->primary_color }}; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
|
||||||
|
<singleline label="cta button"> {{ ctrans('texts.download') }}</singleline>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -3,19 +3,25 @@
|
|||||||
<h1>{{ ctrans('texts.document_download_subject') }}</h1>
|
<h1>{{ ctrans('texts.document_download_subject') }}</h1>
|
||||||
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
||||||
|
|
||||||
<!-- <a target="_blank" class="button" href="{{ $url }}">
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
{{ ctrans('texts.download') }}
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
</a> -->
|
<tr>
|
||||||
|
<td align="center" valign="top">
|
||||||
|
<![endif]-->
|
||||||
<table border="0" cellspacing="0" cellpadding="0" align="center">
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
<tr style="border: 0 !important; ">
|
<tbody><tr>
|
||||||
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: {{ $settings->primary_color }}">
|
||||||
|
<a href="{{ $url }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid {{ settings->primary_color }}; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
|
||||||
<a href="{{ $url }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block; "> {{ ctrans('texts.download') }}</a>
|
<singleline label="cta button"> {{ ctrans('texts.download') }}</singleline>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<![endif]-->
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -3,15 +3,26 @@
|
|||||||
<h1>{{ ctrans('texts.download_backup_subject') }}</h1>
|
<h1>{{ ctrans('texts.download_backup_subject') }}</h1>
|
||||||
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
||||||
|
|
||||||
<table border="0" cellspacing="0" cellpadding="0" align="center">
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
<tr style="border: 0 !important; ">
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
<tr>
|
||||||
|
<td align="center" valign="top">
|
||||||
<a href="{{ $url }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block; ">{{ ctrans('texts.download') }}</a>
|
<![endif]-->
|
||||||
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
|
<tbody><tr>
|
||||||
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: {{ $settings->primary_color }}">
|
||||||
|
<a href="{{ $url }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid {{ settings->primary_color }}; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
|
||||||
|
<singleline label="cta button"> {{ ctrans('texts.download') }}</singleline>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -3,19 +3,25 @@
|
|||||||
<h1>{{ ctrans('texts.invoices_backup_subject') }}</h1>
|
<h1>{{ ctrans('texts.invoices_backup_subject') }}</h1>
|
||||||
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
||||||
|
|
||||||
<!-- <a target="_blank" class="button" href="{{ $url }}">
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
{{ ctrans('texts.download') }}
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
</a> -->
|
<tr>
|
||||||
|
<td align="center" valign="top">
|
||||||
|
<![endif]-->
|
||||||
<table border="0" cellspacing="0" cellpadding="0" align="center">
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
<tr style="border: 0 !important; ">
|
<tbody><tr>
|
||||||
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: {{ $settings->primary_color }}">
|
||||||
|
<a href="{{ $url }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid {{ settings->primary_color }}; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
|
||||||
<a href="{{ $url }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block; "> {{ ctrans('texts.download') }}</a>
|
<singleline label="cta button"> {{ ctrans('texts.download') }}</singleline>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<![endif]-->
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -3,19 +3,25 @@
|
|||||||
<h1>{{ ctrans('texts.purchase_orders_backup_subject') }}</h1>
|
<h1>{{ ctrans('texts.purchase_orders_backup_subject') }}</h1>
|
||||||
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
||||||
|
|
||||||
<!-- <a target="_blank" class="button" href="{{ $url }}">
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
{{ ctrans('texts.download') }}
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
</a> -->
|
<tr>
|
||||||
|
<td align="center" valign="top">
|
||||||
|
<![endif]-->
|
||||||
<table border="0" cellspacing="0" cellpadding="0" align="center">
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
<tr style="border: 0 !important; ">
|
<tbody><tr>
|
||||||
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: {{ $settings->primary_color }}">
|
||||||
|
<a href="{{ $url }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid {{ settings->primary_color }}; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
|
||||||
<a href="{{ $url }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block; "> {{ ctrans('texts.download') }}</a>
|
<singleline label="cta button"> {{ ctrans('texts.download') }}</singleline>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<![endif]-->
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -2,20 +2,27 @@
|
|||||||
<div class="center">
|
<div class="center">
|
||||||
<h1>{{ ctrans('texts.quotes_backup_subject') }}</h1>
|
<h1>{{ ctrans('texts.quotes_backup_subject') }}</h1>
|
||||||
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
||||||
<!--
|
|
||||||
<a target="_blank" class="button" href="{{ $url }}">
|
|
||||||
{{ ctrans('texts.download') }}
|
|
||||||
</a> -->
|
|
||||||
|
|
||||||
<table border="0" cellspacing="0" cellpadding="0" align="center">
|
|
||||||
<tr style="border: 0 !important; ">
|
|
||||||
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
|
||||||
|
|
||||||
<a href="{{ $url }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block; "> {{ ctrans('texts.download') }}</a>
|
|
||||||
|
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top">
|
||||||
|
<![endif]-->
|
||||||
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
|
<tbody><tr>
|
||||||
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: {{ $settings->primary_color }}">
|
||||||
|
<a href="{{ $url }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid {{ settings->primary_color }}; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
|
||||||
|
<singleline label="cta button"> {{ ctrans('texts.download') }}</singleline>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@component('email.template.admin', ['logo' => $logo, 'settings' => $settings])
|
@component('email.template.admin', ['logo' => $logo, 'settings' => $settings])
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<h1>{{ ctrans('texts.download_files') }}</h1>
|
<h1>{{ ctrans('texts.reports') }}</h1>
|
||||||
<p>{{ ctrans('texts.download_report_description') }}</p>
|
<p>{{ ctrans('texts.download_report_description') }}</p>
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -6,13 +6,26 @@
|
|||||||
|
|
||||||
@isset($view_link)
|
@isset($view_link)
|
||||||
|
|
||||||
<table border="0" cellspacing="0" cellpadding="0" align="center">
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
<tr style="border: 0 !important; ">
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
<tr>
|
||||||
<a href="{{ $view_link }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block; ">{{ $view_text }}</a>
|
<td align="center" valign="top">
|
||||||
</td>
|
<![endif]-->
|
||||||
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
|
<tbody><tr>
|
||||||
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: {{ $settings->primary_color }}">
|
||||||
|
<a href="{{ $view_link }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid {{ settings->primary_color }}; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
|
||||||
|
<singleline label="cta button">{{ $view_text }}</singleline>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
@endisset
|
@endisset
|
||||||
|
|
||||||
|
@ -220,6 +220,16 @@ class TaskApiTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testTimeLogChecker12()
|
||||||
|
{
|
||||||
|
$log = [
|
||||||
|
[1,2,'a',true],
|
||||||
|
[3,4,'d',false],
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->assertTrue($this->checkTimeLog($log));
|
||||||
|
}
|
||||||
|
|
||||||
public function testTaskListClientStatus()
|
public function testTaskListClientStatus()
|
||||||
{
|
{
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user