Change background color typo to be able to sent it from module views

This commit is contained in:
Burak Çakırel 2021-02-01 17:44:05 +03:00
parent 01996c94a2
commit ecdc442fd9
No known key found for this signature in database
GPG Key ID: 48FFBB7771B99C7C
7 changed files with 21 additions and 22 deletions

View File

@ -3,15 +3,15 @@
namespace App\Abstracts\View\Components; namespace App\Abstracts\View\Components;
use App\Abstracts\View\Components\Document as Base; use App\Abstracts\View\Components\Document as Base;
use App\Traits\DateTime;
use App\Models\Common\Media; use App\Models\Common\Media;
use App\Traits\DateTime;
use File; use File;
use Image;
use Storage;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\URL;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Image;
use Intervention\Image\Exception\NotReadableException; use Intervention\Image\Exception\NotReadableException;
use Storage;
abstract class DocumentShow extends Base abstract class DocumentShow extends Base
{ {
@ -28,7 +28,7 @@ abstract class DocumentShow extends Base
public $logo; public $logo;
/** @var string */ /** @var string */
public $backGroundColor; public $backgroundColor;
/** @var string */ /** @var string */
public $signedUrl; public $signedUrl;
@ -359,7 +359,7 @@ abstract class DocumentShow extends Base
* @return void * @return void
*/ */
public function __construct( public function __construct(
$type, $document, $documentTemplate = '', $logo = '', $backGroundColor = '', string $signedUrl = '', $histories = [], $transactions = [], $type, $document, $documentTemplate = '', $logo = '', $backgroundColor = '', string $signedUrl = '', $histories = [], $transactions = [],
string $textRecurringType = '', string $textStatusMessage = '', string $textHistories = '', string $textHistoryStatus = '', string $textRecurringType = '', string $textStatusMessage = '', string $textHistories = '', string $textHistoryStatus = '',
string $routeButtonAddNew = '', string $routeButtonEdit = '', string $routeButtonDuplicate = '', string $routeButtonPrint = '', string $routeButtonPdf = '', string $routeButtonCancelled = '', string $routeButtonDelete = '', string $routeButtonCustomize = '', string $routeButtonSent = '', string $routeButtonAddNew = '', string $routeButtonEdit = '', string $routeButtonDuplicate = '', string $routeButtonPrint = '', string $routeButtonPdf = '', string $routeButtonCancelled = '', string $routeButtonDelete = '', string $routeButtonCustomize = '', string $routeButtonSent = '',
string $routeButtonReceived = '', string $routeButtonEmail = '', string $routeButtonPaid = '', string $routeButtonReceived = '', string $routeButtonEmail = '', string $routeButtonPaid = '',
@ -387,7 +387,7 @@ abstract class DocumentShow extends Base
$this->document = $document; $this->document = $document;
$this->documentTemplate = $this->getDocumentTemplate($type, $documentTemplate); $this->documentTemplate = $this->getDocumentTemplate($type, $documentTemplate);
$this->logo = $this->getLogo($logo); $this->logo = $this->getLogo($logo);
$this->backGroundColor = $backGroundColor; $this->backgroundColor = $backgroundColor;
$this->signedUrl = $this->getSignedUrl($type, $signedUrl); $this->signedUrl = $this->getSignedUrl($type, $signedUrl);
$this->histories = ($histories) ? $histories : $document->histories; $this->histories = ($histories) ? $histories : $document->histories;

View File

@ -7,9 +7,8 @@ use App\Models\Common\Media;
use App\Traits\DateTime; use App\Traits\DateTime;
use File; use File;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
use Intervention\Image\Exception\NotReadableException;
use Image; use Image;
use Intervention\Image\Exception\NotReadableException;
use Storage; use Storage;
abstract class DocumentTemplate extends Base abstract class DocumentTemplate extends Base
@ -29,7 +28,7 @@ abstract class DocumentTemplate extends Base
public $logo; public $logo;
public $backGroundColor; public $backgroundColor;
public $hideFooter; public $hideFooter;
@ -129,7 +128,7 @@ abstract class DocumentTemplate extends Base
$this->document = $document; $this->document = $document;
$this->documentTemplate = $this->getDocumentTemplate($type, $documentTemplate); $this->documentTemplate = $this->getDocumentTemplate($type, $documentTemplate);
$this->logo = $this->getLogo($logo); $this->logo = $this->getLogo($logo);
$this->backGroundColor = $this->getBackgroundColor($type, $backgroundColor); $this->backgroundColor = $this->getBackgroundColor($type, $backgroundColor);
$this->hideFooter = $hideFooter; $this->hideFooter = $hideFooter;
$this->hideCompanyLogo = $hideCompanyLogo; $this->hideCompanyLogo = $hideCompanyLogo;

View File

@ -84,7 +84,7 @@
:document="$document" :document="$document"
document-template="{{ $documentTemplate }}" document-template="{{ $documentTemplate }}"
logo="{{ $logo }}" logo="{{ $logo }}"
back-ground-color="{{ $backGroundColor }}" background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}" hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}" hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}" hide-company-details="{{ $hideCompanyDetails }}"

View File

@ -10,7 +10,7 @@
:document="$document" :document="$document"
document-template="{{ $documentTemplate }}" document-template="{{ $documentTemplate }}"
logo="{{ $logo }}" logo="{{ $logo }}"
back-ground-color="{{ $backGroundColor }}" background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}" hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}" hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}" hide-company-details="{{ $hideCompanyDetails }}"
@ -53,7 +53,7 @@
:document="$document" :document="$document"
document-template="{{ $documentTemplate }}" document-template="{{ $documentTemplate }}"
logo="{{ $logo }}" logo="{{ $logo }}"
back-ground-color="{{ $backGroundColor }}" background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}" hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}" hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}" hide-company-details="{{ $hideCompanyDetails }}"
@ -96,7 +96,7 @@
:document="$document" :document="$document"
document-template="{{ $documentTemplate }}" document-template="{{ $documentTemplate }}"
logo="{{ $logo }}" logo="{{ $logo }}"
back-ground-color="{{ $backGroundColor }}" background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}" hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}" hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}" hide-company-details="{{ $hideCompanyDetails }}"

View File

@ -52,8 +52,8 @@
<div class="row mt-2"> <div class="row mt-2">
<div class="col-33"> <div class="col-33">
<hr class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backGroundColor }};"> <hr class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }};">
<hr class="invoice-classic-line" style="background-color:{{ $backGroundColor }};"> <hr class="invoice-classic-line" style="background-color:{{ $backgroundColor }};">
</div> </div>
<div class="col-33"> <div class="col-33">
@ -72,8 +72,8 @@
</div> </div>
<div class="col-33"> <div class="col-33">
<hr class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backGroundColor }};"> <hr class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }};">
<hr class="invoice-classic-line" style="background-color:{{ $backGroundColor }};"> <hr class="invoice-classic-line" style="background-color:{{ $backgroundColor }};">
</div> </div>
</div> </div>

View File

@ -148,7 +148,7 @@
<div class="col-100"> <div class="col-100">
<div class="text"> <div class="text">
<table class="lines"> <table class="lines">
<thead style="background-color:{{ $backGroundColor }} !important; -webkit-print-color-adjust: exact;"> <thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<tr> <tr>
@stack('name_th_start') @stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription)) @if (!$hideItems || (!$hideName && !$hideDescription))

View File

@ -1,4 +1,4 @@
<div class="row" style="background-color:{{ $backGroundColor }} !important; -webkit-print-color-adjust: exact;"> <div class="row" style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<div class="col-58"> <div class="col-58">
<div class="text company pl-2 mb-1 d-flex align-items-center"> <div class="text company pl-2 mb-1 d-flex align-items-center">
@stack('company_logo_start') @stack('company_logo_start')
@ -138,7 +138,7 @@
<div class="col-100"> <div class="col-100">
<div class="text"> <div class="text">
<table class="m-lines"> <table class="m-lines">
<thead style="background-color:{{ $backGroundColor }} !important; -webkit-print-color-adjust: exact;"> <thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<tr> <tr>
@stack('name_th_start') @stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription)) @if (!$hideItems || (!$hideName && !$hideDescription))
@ -244,7 +244,7 @@
@if (!$hideFooter) @if (!$hideFooter)
@if ($document->footer) @if ($document->footer)
<div class="row mt-7"> <div class="row mt-7">
<div class="col-100 py-2" style="background-color:{{ $backGroundColor }} !important; -webkit-print-color-adjust: exact;"> <div class="col-100 py-2" style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<div class="text pl-2"> <div class="text pl-2">
<strong class="text-white">{!! nl2br($document->footer) !!}</strong> <strong class="text-white">{!! nl2br($document->footer) !!}</strong>
</div> </div>