1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fixes for react build

This commit is contained in:
David Bomba 2023-03-24 10:10:35 +11:00
parent d55e41b772
commit f875474459
4 changed files with 9 additions and 6 deletions

View File

@ -51,8 +51,8 @@ class ReactBuilder extends Command
$directoryIterator = new \RecursiveDirectoryIterator(public_path('react'), \RecursiveDirectoryIterator::SKIP_DOTS);
foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
if (str_contains($file->getFileName(), '.js') && !strpos($file->getFileName(), '.json')) {
if (str_contains($file->getFileName(), 'index.')) {
if ($file->getExtension() == 'js') {
if (str_contains($file->getFileName(), 'index-')) {
$includes .= '<script type="module" crossorigin src="/react/'.$file->getFileName().'"></script>'."\n";
} else {
$includes .= '<link rel="modulepreload" href="/react/'.$file->getFileName().'">'."\n";

View File

@ -143,6 +143,8 @@ class Email implements ShouldQueue
$this->email_object->signature = $this->email_object->settings->email_signature;
$this->email_object->invitation_key = $this->email_object->invitation ? $this->email_object->invitation->key : null;
$this->resolveVariables();
return $this;

View File

@ -76,7 +76,8 @@ class EmailDefaults
->setReplyTo()
->setBcc()
->setAttachments()
->setVariables();
->setVariables()
->setHeaders();
return $this->email->email_object;
}
@ -369,7 +370,7 @@ class EmailDefaults
private function setHeaders(): self
{
if ($this->email->email_object->invitation_key) {
$this->email->email_object->headers = array_merge($this->email->email_object->headers, ['x-invitation-key' => $this->email->email_object->invitation_key]);
$this->email->email_object->headers = array_merge($this->email->email_object->headers, ['x-invitation' => $this->email->email_object->invitation_key]);
}
return $this;

View File

@ -206,7 +206,7 @@
gap: 80px;
padding-left: 2rem;
padding-right: 0rem;
page-break-inside:auto;
break-inside: avoid;
overflow: visible !important;
}
@ -271,7 +271,7 @@
#footer {
margin-top: 1rem;
page-break-inside:auto;
break-inside: avoid;
overflow: visible !important;
}