1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-29 20:57:11 +02:00

Merge pull request #5477 from turbo124/v5-stable

v5.1.48
This commit is contained in:
David Bomba 2021-04-20 07:48:54 +10:00 committed by GitHub
commit 13ba435dee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 337700 additions and 332112 deletions

View File

@ -1,6 +1,14 @@
# Release notes
## [Unreleased (daily channel)](https://github.com/invoiceninja/invoiceninja/tree/v5-develop)
## Fixed:
- Refactor of e-mail templates
- Client portal: Invoices & recurring invoices are now sorted by date (by default)
## Added:
- Public notes of entities will now show in #footer section of designs (previously totals table).
## [v5.1.47-release](https://github.com/invoiceninja/invoiceninja/releases/tag/v5.1.47-release)
### Added:
- Subscriptions are now going to show the frequency in the table (#5412)

View File

@ -1 +1 @@
5.1.47
5.1.48

View File

@ -33,6 +33,7 @@ use App\Models\Project;
use App\Models\Quote;
use App\Models\RecurringInvoice;
use App\Models\Task;
use App\Models\TaskStatus;
use App\Models\User;
use App\Models\Vendor;
use App\Models\VendorContact;
@ -353,6 +354,8 @@ class DemoMode extends Command
'client_id' => $client->id
]);
$task->status_id = TaskStatus::all()->random()->id;
$task->number = $this->getNextTaskNumber($task);
$task->save();

View File

@ -482,9 +482,9 @@ class CompanyController extends BaseController
$company_user->user->forceDelete();
});
if (Ninja::isHosted()) {
RefundCancelledAccount::dispatchNow($account);
}
// if (Ninja::isHosted()) {
// RefundCancelledAccount::dispatchNow($account);
// }
$account->delete();

View File

@ -85,7 +85,6 @@ class SelfUpdateController extends BaseController
Artisan::call('clear-compiled');
Artisan::call('cache:clear');
// Artisan::call('debugbar:clear');
Artisan::call('route:clear');
Artisan::call('view:clear');
Artisan::call('config:clear');
@ -96,10 +95,17 @@ class SelfUpdateController extends BaseController
private function testWritable()
{
$directoryIterator = new \RecursiveDirectoryIterator(base_path());
$directoryIterator = new \RecursiveDirectoryIterator(base_path(), \RecursiveDirectoryIterator::SKIP_DOTS);
foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
if(strpos($file->getPathname(), '.git') !== false)
continue;
// nlog($file->getPathname());
if ($file->isFile() && ! $file->isWritable()) {
throw new FilePermissionsFailure($file);
return false;
}
}

View File

@ -399,10 +399,10 @@ class TaskStatusController extends BaseController
*/
public function destroy(DestroyTaskStatusRequest $request, TaskStatus $task_status)
{
$this->task_status_repo->delete($task_status);
$task_status = $this->task_status_repo->delete($task_status);
return $this->itemResponse($task_status->fresh());
return $this->itemResponse($task_status);
}
/**

View File

@ -29,6 +29,8 @@ class InvoicesTable extends Component
public function mount()
{
$this->sort_asc = false;
$this->sort_field = 'date';
}
public function render()

View File

@ -23,6 +23,13 @@ class RecurringInvoicesTable extends Component
public $per_page = 10;
public function mount()
{
$this->sort_asc = false;
$this->sort_field = 'date';
}
public function render()
{
$query = RecurringInvoice::query();

View File

@ -29,7 +29,7 @@ class DeleteCompanyDocuments
{
MultiDB::setDb($event->company->db);
$path = sprintf('%s/%s', storage_path('app/public'), $event->company->company_key);
$path = sprintf('%s/%s', public_path('storage'), $event->company->company_key);
// Remove all files & folders, under company's path.
// This will delete directory itself, as well.

View File

@ -14,7 +14,9 @@ namespace App\Mail;
use App\Models\Client;
use App\Models\ClientContact;
use App\Models\User;
use App\Services\PdfMaker\Designs\Utilities\DesignHelpers;
use App\Utils\HtmlEngine;
use App\Utils\TemplateEngine;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
@ -53,8 +55,16 @@ class TemplateEmail extends Mailable
$this->build_email->setBody(str_replace('$body', $this->build_email->getBody(), $this->client->getSetting('email_style_custom')));
}
$this->build_email->setBody(
DesignHelpers::parseMarkdownToHtml($this->build_email->getBody())
);
$settings = $this->client->getMergedSettings();
$this->build_email->setBody(
TemplateEngine::wrapElementsIntoTables('<div id="content-wrapper"></div>', $this->build_email->getBody(), $settings)
);
$company = $this->client->company;
if($this->invitation)
@ -64,10 +74,10 @@ class TemplateEmail extends Mailable
}
else
$signature = $settings->email_signature;
$this->from(config('mail.from.address'), $this->company->present()->name());
if (strlen($settings->bcc_email) > 1)
if (strlen($settings->bcc_email) > 1)
$this->bcc($settings->bcc_email, $settings->bcc_email);
$this->subject($this->build_email->getSubject())

View File

@ -12,6 +12,7 @@
namespace App\Repositories;
use App\Models\Task;
use App\Models\TaskStatus;
/**
* Class for task status repository.
@ -21,10 +22,14 @@ class TaskStatusRepository extends BaseRepository
public function delete($task_status)
{
$ts = TaskStatus::where('company_id', $task_status->company_id)
->first();
$new_status = $ts ? $ts->id : null;
Task::where('status_id', $task_status->id)
->where('company_id', $task_status->company_id)
->update(['status_id' => null]);
->update(['status_id' => $new_status]);
parent::delete($task_status);
@ -36,9 +41,14 @@ class TaskStatusRepository extends BaseRepository
public function archive($task_status)
{
$task_status = TaskStatus::where('company_id', $task_status->company_id)
->first();
$new_status = $task_status ? $task_status->id : null;
Task::where('status_id', $task_status->id)
->where('company_id', $task_status->company_id)
->update(['status_id' => null]);
->update(['status_id' => $new_status]);
parent::archive($task_status);

View File

@ -440,7 +440,6 @@ class Design extends BaseDesign
$elements = [
['element' => 'div', 'properties' => ['style' => 'display: flex; flex-direction: column;'], 'elements' => [
['element' => 'p', 'content' => strtr($_variables['values']['$entity.public_notes'], $_variables), 'properties' => ['data-ref' => 'total_table-public_notes', 'style' => 'text-align: left;']],
['element' => 'p', 'content' => '', 'properties' => ['style' => 'text-align: left; display: flex; flex-direction: column;'], 'elements' => [
['element' => 'span', 'content' => '$entity.terms_label: ', 'properties' => ['hidden' => $this->entityVariableCheck('$entity.terms'), 'data-ref' => 'total_table-terms-label', 'style' => 'font-weight: bold; text-align: left; margin-top: 1rem;']],
['element' => 'span', 'content' => strtr($_variables['values']['$entity.terms'], $_variables), 'properties' => ['data-ref' => 'total_table-terms', 'style' => 'text-align: left;']],

View File

@ -16,6 +16,7 @@ use App\Utils\Traits\MakesHash;
use DOMDocument;
use DOMXPath;
use Exception;
use League\CommonMark\CommonMarkConverter;
trait DesignHelpers
{
@ -308,4 +309,13 @@ trait DesignHelpers
$this->client
);
}
public static function parseMarkdownToHtml(string $markdown): ?string
{
$converter = new CommonMarkConverter([
'allow_unsafe_links' => false,
]);
return $converter->convertToHtml($markdown);
}
}

View File

@ -153,6 +153,8 @@ class HtmlEngine
$data['$date'] = ['value' => $this->translateDate($this->entity->date, $this->entity->client->date_format(), $this->entity->client->locale()) ?: '&nbsp;', 'label' => ctrans('texts.credit_date')];
}
$data['$portal_url'] = ['value' => $this->invitation->getPortalLink(), 'label' =>''];
$data['$entity_number'] = &$data['$number'];
$data['$invoice.discount'] = ['value' => Number::formatMoney($this->entity_calc->getTotalDiscount(), $this->client) ?: '&nbsp;', 'label' => ctrans('texts.discount')];
$data['$discount'] = &$data['$invoice.discount'];

View File

@ -16,6 +16,7 @@ use App\Models\Client;
use App\Models\ClientContact;
use App\Models\Invoice;
use App\Models\InvoiceInvitation;
use App\Services\PdfMaker\Designs\Utilities\DesignHelpers;
use App\Utils\Ninja;
use App\Utils\Traits\MakesHash;
use App\Utils\Traits\MakesInvoiceHtml;
@ -24,6 +25,7 @@ use DB;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Lang;
use League\CommonMark\CommonMarkConverter;
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;
class TemplateEngine
{
@ -168,17 +170,12 @@ class TemplateEngine
$this->body = strtr($this->body, $data['labels']);
$this->body = strtr($this->body, $data['values']);
$this->body = str_replace("\n", "<br>", $this->body);
// $this->body = str_replace("\n", "<br>", $this->body);
$this->subject = strtr($this->subject, $data['labels']);
$this->subject = strtr($this->subject, $data['values']);
$converter = new CommonMarkConverter([
'allow_unsafe_links' => false,
]);
$this->body = $converter->convertToHtml($this->body);
$this->body = DesignHelpers::parseMarkdownToHtml($this->body);
}
private function renderTemplate()
@ -209,7 +206,7 @@ class TemplateEngine
$data = [
'subject' => $this->subject,
'body' => $this->body,
'body' => self::wrapElementsIntoTables(strtr($wrapper, ['$body' => '']), $this->body, $this->entity_obj->client->getMergedSettings()),
'wrapper' => $wrapper,
'raw_body' => $this->raw_body,
'raw_subject' => $this->raw_subject
@ -262,4 +259,50 @@ class TemplateEngine
{
DB::rollBack();
}
public static function wrapElementsIntoTables(string $wrapper, string $body, $settings): ?string
{
$documents['wrapper'] = new \DOMDocument();
$documents['wrapper']->loadHTML($wrapper);
$documents['master'] = new \DOMDocument();
$documents['master']->loadHTML(
view('email.template.master', ['header' => '', 'slot' => '', 'settings' => $settings])->render()
);
$styles = $documents['master']->getElementsByTagName('style')->item(0)->nodeValue;
$documents['wrapper']->saveHTML();
$documents['body'] = new \DOMDocument();
$documents['body']->loadHTML(empty($body) ? '<div></div>' : (new CssToInlineStyles())->convert($body, $styles));
$table_html ='
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:5px;font-family:arial,helvetica,sans-serif;" align="left">
<div style="color: #000000; line-height: 140%; text-align: left; word-wrap: break-word;" id="table-content" class="content-contrast-color"></div>
</td>
</tr>
</tbody>
</table>';
foreach ($documents['body']->getElementsByTagName('body')->item(0)->childNodes as $element) {
$table = new \DOMDocument();
$table->loadHTML($table_html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$element = $table->importNode($element, true);
$table->getElementById('table-content')->appendChild($element);
$node = $documents['wrapper']->importNode($table->documentElement, true);
$documents['wrapper']->getElementById('content-wrapper')->appendChild($node);
}
return $documents['wrapper']->getElementById('content-wrapper')->ownerDocument->saveHTML($documents['wrapper']->getElementById('content-wrapper'));
}
}

View File

@ -66,6 +66,30 @@ trait Inviteable
}
}
public function getPortalLink() :string
{
$domain = isset($this->company->portal_domain) ?: $this->company->domain();
switch ($this->company->portal_mode) {
case 'subdomain':
return $domain.'/client/';
break;
case 'iframe':
return $domain.'/client/';
//return $domain . $entity_type .'/'. $this->contact->client->client_hash .'/'. $this->key;
break;
case 'domain':
return $domain.'/client/';
break;
default:
return '';
break;
}
}
public function getAdminLink() :string
{
return $this->getLink().'?silent=true';

View File

@ -65,6 +65,7 @@
"sentry/sentry-laravel": "^2",
"stripe/stripe-php": "^7.50",
"symfony/http-client": "^5.2",
"tijsverkoyen/css-to-inline-styles": "^2.2",
"turbo124/beacon": "^1.0",
"turbo124/laravel-gmail": "^5",
"webpatser/laravel-countries": "dev-master#75992ad",

159
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "7ccb8d2434343dfb0ba62866f0ee919a",
"content-hash": "f01381d3d00f0bd84acbda078ad1b99e",
"packages": [
{
"name": "authorizenet/authorizenet",
@ -11718,103 +11718,6 @@
],
"time": "2021-01-25T15:34:13+00:00"
},
{
"name": "nunomaduro/larastan",
"version": "v0.7.3",
"source": {
"type": "git",
"url": "https://github.com/nunomaduro/larastan.git",
"reference": "9c515d46851dca5a99fc82c0a69392c362b7affd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nunomaduro/larastan/zipball/9c515d46851dca5a99fc82c0a69392c362b7affd",
"reference": "9c515d46851dca5a99fc82c0a69392c362b7affd",
"shasum": ""
},
"require": {
"composer/composer": "^1.0 || ^2.0",
"ext-json": "*",
"illuminate/console": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/container": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/pipeline": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"mockery/mockery": "^0.9 || ^1.0",
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^0.12.83",
"symfony/process": "^4.3 || ^5.0"
},
"require-dev": {
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0",
"phpunit/phpunit": "^7.3 || ^8.2 || ^9.3"
},
"suggest": {
"orchestra/testbench": "^4.0 || ^5.0"
},
"type": "phpstan-extension",
"extra": {
"branch-alias": {
"dev-master": "0.6-dev"
},
"phpstan": {
"includes": [
"extension.neon"
]
}
},
"autoload": {
"psr-4": {
"NunoMaduro\\Larastan\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nuno Maduro",
"email": "enunomaduro@gmail.com"
}
],
"description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel",
"keywords": [
"PHPStan",
"code analyse",
"code analysis",
"larastan",
"laravel",
"package",
"php",
"static analysis"
],
"support": {
"issues": "https://github.com/nunomaduro/larastan/issues",
"source": "https://github.com/nunomaduro/larastan/tree/v0.7.3"
},
"funding": [
{
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L",
"type": "custom"
},
{
"url": "https://github.com/canvural",
"type": "github"
},
{
"url": "https://github.com/nunomaduro",
"type": "github"
},
{
"url": "https://www.patreon.com/nunomaduro",
"type": "patreon"
}
],
"time": "2021-04-12T11:01:46+00:00"
},
{
"name": "openlss/lib-array2xml",
"version": "1.0.0",
@ -12259,66 +12162,6 @@
},
"time": "2021-03-17T13:42:18+00:00"
},
{
"name": "phpstan/phpstan",
"version": "0.12.83",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "4a967cec6efb46b500dd6d768657336a3ffe699f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/4a967cec6efb46b500dd6d768657336a3ffe699f",
"reference": "4a967cec6efb46b500dd6d768657336a3ffe699f",
"shasum": ""
},
"require": {
"php": "^7.1|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
},
"bin": [
"phpstan",
"phpstan.phar"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.12-dev"
}
},
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/0.12.83"
},
"funding": [
{
"url": "https://github.com/ondrejmirtes",
"type": "github"
},
{
"url": "https://www.patreon.com/phpstan",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
"type": "tidelift"
}
],
"time": "2021-04-03T15:35:45+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.6",

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', ''),
'app_version' => '5.1.47',
'app_tag' => '5.1.47-release',
'app_version' => '5.1.48',
'app_tag' => '5.1.48-release',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),

View File

@ -41,17 +41,17 @@ class ConstantsSeeder extends Seeder
$timezones[] = ['name'=>'US/Samoa', 'location' => '(GMT-11:00) Samoa', 'utc_offset' => -39600];
$timezones[] = ['name'=>'US/Hawaii', 'location' => '(GMT-10:00) Hawaii', 'utc_offset' => -36000];
$timezones[] = ['name'=>'US/Alaska', 'location' => '(GMT-09:00) Alaska', 'utc_offset' => -32400];
$timezones[] = ['name'=>'US/Pacific', 'location' => '(GMT-08:00) Pacific Time (US &amp; Canada)', 'utc_offset' => -28800];
$timezones[] = ['name'=>'US/Pacific', 'location' => '(GMT-08:00) Pacific Time (US & Canada)', 'utc_offset' => -28800];
$timezones[] = ['name'=>'America/Tijuana', 'location' => '(GMT-08:00) Tijuana', 'utc_offset' => -28800];
$timezones[] = ['name'=>'US/Arizona', 'location' => '(GMT-07:00) Arizona', 'utc_offset' => -25200];
$timezones[] = ['name'=>'US/Mountain', 'location' => '(GMT-07:00) Mountain Time (US &amp; Canada)', 'utc_offset' => -25200];
$timezones[] = ['name'=>'US/Mountain', 'location' => '(GMT-07:00) Mountain Time (US & Canada)', 'utc_offset' => -25200];
$timezones[] = ['name'=>'America/Chihuahua', 'location' => '(GMT-07:00) Chihuahua', 'utc_offset' => -25200];
$timezones[] = ['name'=>'America/Mazatlan', 'location' => '(GMT-07:00) Mazatlan', 'utc_offset' => -25200];
$timezones[] = ['name'=>'America/Mexico_City', 'location' => '(GMT-06:00) Mexico City', 'utc_offset' => -21600];
$timezones[] = ['name'=>'America/Monterrey', 'location' => '(GMT-06:00) Monterrey', 'utc_offset' => -21600];
$timezones[] = ['name'=>'Canada/Saskatchewan', 'location' => '(GMT-06:00) Saskatchewan', 'utc_offset' => -21600];
$timezones[] = ['name'=>'US/Central', 'location' => '(GMT-06:00) Central Time (US &amp; Canada)', 'utc_offset' => -21600];
$timezones[] = ['name'=>'US/Eastern', 'location' => '(GMT-05:00) Eastern Time (US &amp; Canada)', 'utc_offset' => -18000];
$timezones[] = ['name'=>'US/Central', 'location' => '(GMT-06:00) Central Time (US & Canada)', 'utc_offset' => -21600];
$timezones[] = ['name'=>'US/Eastern', 'location' => '(GMT-05:00) Eastern Time (US & Canada)', 'utc_offset' => -18000];
$timezones[] = ['name'=>'US/East-Indiana', 'location' => '(GMT-05:00) Indiana (East)', 'utc_offset' => -18000];
$timezones[] = ['name'=>'America/Bogota', 'location' => '(GMT-05:00) Bogota', 'utc_offset' => -18000];
$timezones[] = ['name'=>'America/Lima', 'location' => '(GMT-05:00) Lima', 'utc_offset' => -18000];

View File

@ -19,3 +19,8 @@
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
<IfModule mod_headers.c>
# Blocks Search Engine Indexing
Header set X-Robots-Tag "noindex, nofollow"
</IfModule>

View File

@ -31,7 +31,7 @@ const RESOURCES = {
"assets/assets/images/payment_types/paypal.png": "8e06c094c1871376dfea1da8088c29d1",
"assets/assets/images/payment_types/maestro.png": "e533b92bfb50339fdbfa79e3dfe81f08",
"assets/FontManifest.json": "cf3c681641169319e61b61bd0277378f",
"main.dart.js": "c8128a36f8372b6a128afe89000b6038",
"main.dart.js": "2606c752bb7b06928a46ef443e9909e5",
"version.json": "b66865cd7c928a62b1b7809cad4d5f8c"
};

228001
public/main.dart.js vendored

File diff suppressed because one or more lines are too long

221976
public/main.foss.dart.js vendored

File diff suppressed because one or more lines are too long

219026
public/main.wasm.dart.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
User-agent: *
Disallow:
Disallow: /

View File

@ -2,113 +2,303 @@
if(!isset($design)) {
$design = 'light';
}
$primary_color = isset($settings) ? $settings->primary_color : '#4caf50';
@endphp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="x-apple-disable-message-reformatting">
<!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]-->
<title></title>
<style type="text/css">
a {
color: #0000ee;
text-decoration: underline;
}
@media only screen and (min-width: 520px) {
.u-row {
width: 500px !important;
}
.u-row .u-col {
vertical-align: top;
}
.u-row .u-col-100 {
width: 500px !important;
}
}
@media (max-width: 520px) {
.u-row-container {
max-width: 100% !important;
padding-left: 0px !important;
padding-right: 0px !important;
}
.u-row .u-col {
min-width: 320px !important;
max-width: 100% !important;
display: block !important;
}
.u-row {
width: calc(100% - 40px) !important;
}
.u-col {
width: 100% !important;
}
.u-col>div {
margin: 0 auto;
}
}
body {
margin: 0;
padding: 0;
}
table,
tr,
td {
vertical-align: top;
border-collapse: collapse;
}
p {
margin: 0;
}
.ie-container table,
.mso-container table {
table-layout: fixed;
}
* {
line-height: inherit;
}
a[x-apple-data-detectors='true'] {
color: inherit !important;
text-decoration: none !important;
}
.header-logo {
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
clear: both;
display: inline-block !important;
border: none;
height: auto;
float: none;
width: 60%;
max-width: 288px;
}
h1 {
margin: 0px; color: #000000; line-height: 140%; text-align: left; word-wrap: break-word; font-weight: normal; font-family: arial,helvetica,sans-serif; font-size: 22px;
}
p {
font-size: 14px; line-height: 140%
}
.button {
padding: 12px;
box-sizing: border-box;
display: inline-block;
font-family: arial, helvetica, sans-serif;
text-decoration: none;
-webkit-text-size-adjust: none;
text-align: center;
color: #FFFFFF;
background-color: {{ $primary_color }} !important;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
width: auto;
max-width: 100%;
overflow-wrap: break-word;
word-break: break-word;
word-wrap: break-word;
mso-border-alt: none;
}
.center {
text-align: center;
}
.content-contrast-color {
color: {{ $design == 'dark' ? '#ffffff' : '#000000' }} !important;
opacity: {{ $design == 'dark' ? '87%': '100%' }} !important;
}
</style>
</head>
<style type="text/css">
:root {
--primary-color: {{ $primary_color }};
}
<body class="clean-body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: {{ $design == 'light' ? '#ffffff': '#1D1D1D' }}">
<!--[if IE]><div class="ie-container"><![endif]-->
<!--[if mso]><div class="mso-container"><![endif]-->
<table style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: {{ $design == 'light' ? '#ffffff': '#1D1D1D' }};width:100%" cellpadding="0" cellspacing="0">
<tbody>
<tr style="vertical-align: top">
<td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #ffffff;"><![endif]-->
.primary-color-bg {
background-color: {{ $primary_color }};
}
#email-content h1, h2, h3, h4 {
display: block;
color: {{ $design == 'light' ? 'black' : 'white' }};
padding-bottom: 20px;
padding-top: 20px;
}
<div class="u-row-container" style="padding: 0px;background-color: transparent">
<div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
#email-content p {
display: block;
color: {{ $design == 'light' ? 'black' : 'white' }};
padding-bottom: 20px;
/*padding-top: 20px;*/
}
<!--[if (mso)|(IE)]><td align="center" width="500" style="width: 500px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="width: 100% !important;">
<!--[if (!mso)&(!IE)]><!--><div style="padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"><!--<![endif]-->
.button {
background-color: {{ $primary_color }};
color: white;
padding: 10px 16px;
text-decoration: none;
}
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:0px 0px 20px;font-family:arial,helvetica,sans-serif;" align="left">
#email-content a, .link {
word-break: break-all;
}
<table height="0px" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;border-top: 6px solid {{ $primary_color }};-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%">
<tbody>
<tr style="vertical-align: top">
<td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top;font-size: 0px;line-height: 0px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%">
<span>&#160;</span>
</td>
</tr>
</tbody>
</table>
#email-content .button {
position: center;
}
</td>
</tr>
</tbody>
</table>
.center {
text-align: center;
}
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px 10px 15px;font-family:arial,helvetica,sans-serif;" align="left">
p {
padding-bottom: 5px;
}
</style>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="padding-right: 0px;padding-left: 0px;" align="center">
{{ $header }}
</td>
</tr>
</table>
<body style="margin: 0; padding: 0; background-color: {{ $design == 'light' ? '#F9FAFB' : '#111827' }};">
<table role="presentation" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding: 20px; font-family: Arial, sans-serif, 'Open Sans'">
<table align="center" cellpadding="0" cellspacing="0" width="600"
style="box-shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px 0 rgba(0,0,0,.06)">
<tr>
<td align="center" bgcolor="{{ $primary_color }}" class="primary-color-bg" style="padding: 40px 0 30px 0;">
{{ $header }}
</td>
</tr>
<tr>
<td bgcolor="{{ $design == 'light' ? '#ffffff' : '#1F2937'}}" style="padding: 40px 30px 40px 30px;">
<table cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;">
<tr>
<td id="email-content">
@yield('greeting')
</td>
</tr>
</tbody>
</table>
{{ $slot }}
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
@yield('signature')
@yield('footer')
</td>
</tr>
</table>
</td>
</tr>
<tr>
@isset($whitelabel)
@if(!$whitelabel)
<td bgcolor="{{ $design == 'light' ? '#ffffff' : '#1F2937'}}" style="padding-top: 20px; padding-bottom: 20px;" align="center">
<p style="margin: 0; border-top: 1px solid {{ $design == 'light' ? '#F3F4F6' : '#374151' }}; padding-top: 20px;">
<a href="https://invoiceninja.com" target="_blank">
<img
style="height: 4rem; {{ $design == 'dark' ? 'filter: invert(100%);' : '' }}"
src="{{ asset('images/created-by-invoiceninja-new.png') }}"
alt="Invoice Ninja">
</a>
</p>
</td>
@endif
@endif
</tr>
</table>
<div class="u-row-container" style="padding: 0px;background-color: transparent">
<div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="500" style="width: 500px;padding: 11px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="width: 100% !important;">
<!--[if (!mso)&(!IE)]><!--><div style="padding: 11px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"><!--<![endif]-->
<div id="content-wrapper">
@yield('greeting')
{{ $slot }}
@yield('signature')
@yield('footer')
</div>
<!-- Before border -->
<span id="before-border"></span>
<!-- Bottom border (gray) -->
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px 0px;font-family:arial,helvetica,sans-serif;" align="left">
<table height="0px" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;border-top: 2px solid {{ $design == 'light' ? '#f3f4f6' : '#2c2c2c' }};-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%">
<tbody>
<tr style="vertical-align: top">
<td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top;font-size: 0px;line-height: 0px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%">
<span>&#160;</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- Whitelabel logo -->
@isset($whitelabel)
@if(!$whitelabel)
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="padding-right: 0px;padding-left: 0px;" align="center">
<img align="center" border="0" src="{{ asset('images/created-by-invoiceninja-new.png') }}" alt="Image" title="Image" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 34%;max-width: 163.2px; {{ $design == 'dark' ? 'filter: invert(100%);' : '' }}" width="163.2"/>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
@endif
@endisset
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
<!--[if mso]></div><![endif]-->
<!--[if IE]></div><![endif]-->
</body>
</html>

View File

@ -213,6 +213,11 @@
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 15px;
color: white;
}
[data-ref="total_table-public_notes"] {
padding-top: 0.5rem
}
</style>
@ -233,7 +238,9 @@
<tr>
<td class="page-footer-cell">
<div class="footer-wrapper" id="footer">
<div> <!-- #1 column --> </div>
<div>
<p data-ref="total_table-public_notes">$entity.public_notes</p>
</div>
<div> <!-- #2 column --> </div>
<div> <!-- #3 column --> </div>
</div>

View File

@ -218,6 +218,10 @@
text-align: right;
padding-right: 1rem;
}
[data-ref="total_table-public_notes"] {
padding-left: 1rem
}
</style>
<div id="header"></div>
@ -252,4 +256,6 @@
<table id="delivery-note-table" cellspacing="0"></table>
</div>
<div id="footer"></div>
<div id="footer">
<p data-ref="total_table-public_notes">$entity.public_notes</p>
</div>

View File

@ -186,6 +186,10 @@
text-align: right;
padding-right: 1rem;
}
[data-ref="total_table-public_notes"] {
padding-left: 1rem
}
</style>
<div id="header"></div>
@ -218,4 +222,6 @@
<table id="delivery-note-table" cellspacing="0"></table>
</div>
<div id="footer"></div>
<div id="footer">
<p data-ref="total_table-public_notes">$entity.public_notes</p>
</div>

View File

@ -178,6 +178,10 @@
text-align: right;
padding-right: 1rem;
}
[data-ref="total_table-public_notes"] {
padding-left: 1rem
}
</style>
<div id="header"></div>
@ -216,4 +220,6 @@
<table id="delivery-note-table" cellspacing="0"></table>
</div>
<div id="footer"></div>
<div id="footer">
<p data-ref="total_table-public_notes">$entity.public_notes</p>
</div>

View File

@ -172,6 +172,10 @@
text-align: right;
padding-right: 0.5rem;
}
[data-ref="total_table-public_notes"] {
padding-left: 1rem
}
</style>
<div id="header"></div>
@ -216,5 +220,7 @@
<table id="delivery-note-table" cellspacing="0"></table>
</div>
<div id="footer"></div>
<div id="footer">
<p data-ref="total_table-public_notes">$entity.public_notes</p>
</div>

View File

@ -257,4 +257,6 @@
<table id="delivery-note-table" cellspacing="0"></table>
</div>
<div id="footer"></div>
<div id="footer">
<p data-ref="total_table-public_notes">$entity.public_notes</p>
</div>

View File

@ -222,6 +222,11 @@
.page-content-cell {
padding: 1rem;
}
[data-ref="total_table-public_notes"] {
margin-top: 2rem;
margin-bottom: 2rem
}
</style>
<table class="page-container">
@ -242,7 +247,9 @@
<div style="margin-top: 195px"></div>
<div class="footer-wrapper" id="footer">
<div class="footer-content">
<div></div>
<div>
<p data-ref="total_table-public_notes">$entity.public_notes</p>
</div>
<div id="company-details"></div>
<div id="company-address"></div>
</div>

View File

@ -150,6 +150,10 @@
text-align: right;
padding-right: 1rem;
}
[data-ref="total_table-public_notes"] {
padding-left: 1rem
}
</style>
<div id="header"></div>
@ -180,4 +184,6 @@
<table id="delivery-note-table" cellspacing="0"></table>
</div>
<div id="footer"></div>
<div id="footer">
<p data-ref="total_table-public_notes">$entity.public_notes</p>
</div>

View File

@ -94,7 +94,9 @@
#product-table,
#delivery-note-table,
#task-table {
padding: 3rem;
padding-left: 3rem;
padding-right: 3rem;
margin-top: 3rem;
/* margin-bottom: 200px; */
min-width: 100%;
table-layout: fixed;
@ -220,17 +222,10 @@
padding: 10px;
}
#footer {
position: fixed;
bottom: 0;
min-width: 100%;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
margin-left: -10px;
}
#footer > * {
padding: 5px;
[data-ref="total_table-public_notes"] {
text-align: left;
padding-left: 3rem;
padding-right: 3rem;
}
</style>
@ -286,15 +281,6 @@
</div>
<div id="footer">
<div style="background-color: #00968B"><!-- 1 --></div>
<div style="background-color: #1D756E"><!-- 2 --></div>
<div style="background-color: #FCB600"><!-- 3 --></div>
<div style="background-color: #BA932F"><!-- 4 --></div>
<div style="background-color: #A72A4E"><!-- 5 --></div>
<div style="background-color: #E20041"><!-- 6 --></div>
<div style="background-color: #F8B300"><!-- 7 --></div>
<div style="background-color: #009B8F"><!-- 8 --></div>
<p data-ref="total_table-public_notes">$entity.public_notes</p>
</div>

View File

@ -135,7 +135,7 @@ class TaskStatusApiTest extends TestCase
])->delete('/api/v1/task_statuses/'.$this->encodePrimaryKey($this->task_status->id));
$arr = $response->json();
nlog($arr);
$this->assertTrue($arr['data']['is_deleted']);
}