mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -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 $allow_billable_task_items = false;
|
||||
|
||||
public static $casts = [
|
||||
'allow_billable_task_items' => 'bool',
|
||||
'accept_client_input_quote_approval' => 'bool',
|
||||
'custom_sending_email' => 'string',
|
||||
'show_paid_stamp' => 'bool',
|
||||
|
@ -42,6 +42,7 @@ class Scheduler extends BaseModel
|
||||
'template',
|
||||
'is_paused',
|
||||
'parameters',
|
||||
'remaining_cycles',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
@ -71,44 +72,21 @@ class Scheduler extends BaseModel
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
}
|
||||
|
||||
// public function nextScheduledDate(): ?Carbon
|
||||
// {
|
||||
// $offset = 0;
|
||||
|
||||
// $entity_send_time = $this->company->settings->entity_send_time;
|
||||
|
||||
// if ($entity_send_time != 0) {
|
||||
// $timezone = $this->company->timezone();
|
||||
|
||||
// $offset -= $timezone->utc_offset;
|
||||
// $offset += ($entity_send_time * 3600);
|
||||
// }
|
||||
|
||||
// /*
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* remainingCycles
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function remainingCycles() : int
|
||||
{
|
||||
if ($this->remaining_cycles == 0) {
|
||||
return 0;
|
||||
} elseif ($this->remaining_cycles == -1) {
|
||||
return -1;
|
||||
} else {
|
||||
return $this->remaining_cycles - 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -45,8 +45,8 @@ class MailCssInlinerServiceProvider extends ServiceProvider
|
||||
// return new CssInlinerPlugin([]);
|
||||
// });
|
||||
|
||||
$this->app->bind(CssInlinerPlugin::class, function ($app) {
|
||||
return new CssInlinerPlugin([]);
|
||||
});
|
||||
// $this->app->bind(CssInlinerPlugin::class, function ($app) {
|
||||
// return new CssInlinerPlugin([]);
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
@ -12,10 +11,14 @@ return new class extends Migration {
|
||||
*/
|
||||
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();
|
||||
});
|
||||
|
||||
\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>
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
|
||||
</div>
|
||||
@endcomponent
|
||||
|
@ -3,19 +3,25 @@
|
||||
<h1>{{ ctrans('texts.document_download_subject') }}</h1>
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</div>
|
||||
@endcomponent
|
||||
|
@ -3,15 +3,26 @@
|
||||
<h1>{{ ctrans('texts.download_backup_subject') }}</h1>
|
||||
<p>{{ ctrans('texts.download_timeframe') }}</p>
|
||||
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
|
||||
</div>
|
||||
@endcomponent
|
||||
|
@ -3,19 +3,25 @@
|
||||
<h1>{{ ctrans('texts.invoices_backup_subject') }}</h1>
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</div>
|
||||
@endcomponent
|
||||
|
@ -3,19 +3,25 @@
|
||||
<h1>{{ ctrans('texts.purchase_orders_backup_subject') }}</h1>
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</div>
|
||||
@endcomponent
|
||||
|
@ -2,20 +2,27 @@
|
||||
<div class="center">
|
||||
<h1>{{ ctrans('texts.quotes_backup_subject') }}</h1>
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
|
||||
</div>
|
||||
@endcomponent
|
||||
|
@ -1,6 +1,6 @@
|
||||
@component('email.template.admin', ['logo' => $logo, 'settings' => $settings])
|
||||
<div class="center">
|
||||
<h1>{{ ctrans('texts.download_files') }}</h1>
|
||||
<h1>{{ ctrans('texts.reports') }}</h1>
|
||||
<p>{{ ctrans('texts.download_report_description') }}</p>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
@ -6,13 +6,26 @@
|
||||
|
||||
@isset($view_link)
|
||||
|
||||
<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="{{ $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>
|
||||
<!--[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="{{ $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>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
|
||||
@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()
|
||||
{
|
||||
$response = $this->withHeaders([
|
||||
|
Loading…
x
Reference in New Issue
Block a user