Compare commits
No commits in common. "master" and "1.12.27" have entirely different histories.
|
|
@ -1,9 +1,5 @@
|
||||||
# Letzte Änderungen
|
# Letzte Änderungen
|
||||||
|
|
||||||
### 1.12.27
|
|
||||||
|
|
||||||
- Bei Rechnungs-und Erinnerungsmails wird nun der Stammesname angezeigt. Zudm kann eine ReplyTo gesetzt werden, wenn gewünscht
|
|
||||||
|
|
||||||
### 1.12.26
|
### 1.12.26
|
||||||
|
|
||||||
- Felder im Form-Builder können nun verschoben und kopiert werden
|
- Felder im Form-Builder können nun verschoben und kopiert werden
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ class InvoiceSettings extends LocalSettings implements Storeable
|
||||||
public ?string $zip;
|
public ?string $zip;
|
||||||
public ?string $iban;
|
public ?string $iban;
|
||||||
public ?string $bic;
|
public ?string $bic;
|
||||||
public ?string $replyTo;
|
|
||||||
public ?int $rememberWeeks;
|
public ?int $rememberWeeks;
|
||||||
|
|
||||||
public static function group(): string
|
public static function group(): string
|
||||||
|
|
@ -44,7 +43,6 @@ class InvoiceSettings extends LocalSettings implements Storeable
|
||||||
'iban' => $this->iban,
|
'iban' => $this->iban,
|
||||||
'bic' => $this->bic,
|
'bic' => $this->bic,
|
||||||
'rememberWeeks' => $this->rememberWeeks,
|
'rememberWeeks' => $this->rememberWeeks,
|
||||||
'replyTo' => $this->replyTo,
|
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -66,7 +64,6 @@ class InvoiceSettings extends LocalSettings implements Storeable
|
||||||
'iban' => '',
|
'iban' => '',
|
||||||
'bic' => '',
|
'bic' => '',
|
||||||
'rememberWeeks' => '',
|
'rememberWeeks' => '',
|
||||||
'replyTo' => '',
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Invoice\Mails;
|
namespace App\Invoice\Mails;
|
||||||
|
|
||||||
use App\Invoice\InvoiceSettings;
|
|
||||||
use App\Invoice\Models\Invoice;
|
use App\Invoice\Models\Invoice;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Mail\Mailable;
|
use Illuminate\Mail\Mailable;
|
||||||
|
|
@ -13,8 +12,6 @@ class BillMail extends Mailable
|
||||||
use Queueable;
|
use Queueable;
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
public InvoiceSettings $settings;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new message instance.
|
* Create a new message instance.
|
||||||
*
|
*
|
||||||
|
|
@ -22,7 +19,6 @@ class BillMail extends Mailable
|
||||||
*/
|
*/
|
||||||
public function __construct(public Invoice $invoice, public string $filename)
|
public function __construct(public Invoice $invoice, public string $filename)
|
||||||
{
|
{
|
||||||
$this->settings = app(InvoiceSettings::class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -34,7 +30,7 @@ class BillMail extends Mailable
|
||||||
{
|
{
|
||||||
return $this->markdown('mail.invoice.bill')
|
return $this->markdown('mail.invoice.bill')
|
||||||
->attach($this->filename)
|
->attach($this->filename)
|
||||||
->when($this->settings->replyTo, fn ($mail) => $mail->replyTo($this->settings->replyTo))
|
->replyTo('kasse@stamm-silva.de')
|
||||||
->subject('Rechnung | '.$this->settings->from_long);
|
->subject('Rechnung | DPSG Stamm Silva');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Invoice\Mails;
|
namespace App\Invoice\Mails;
|
||||||
|
|
||||||
use App\Invoice\InvoiceSettings;
|
|
||||||
use App\Invoice\Models\Invoice;
|
use App\Invoice\Models\Invoice;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Mail\Mailable;
|
use Illuminate\Mail\Mailable;
|
||||||
|
|
@ -13,8 +12,6 @@ class RememberMail extends Mailable
|
||||||
use Queueable;
|
use Queueable;
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
public InvoiceSettings $settings;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new message instance.
|
* Create a new message instance.
|
||||||
*
|
*
|
||||||
|
|
@ -22,7 +19,6 @@ class RememberMail extends Mailable
|
||||||
*/
|
*/
|
||||||
public function __construct(public Invoice $invoice, public string $filename)
|
public function __construct(public Invoice $invoice, public string $filename)
|
||||||
{
|
{
|
||||||
$this->settings = app(InvoiceSettings::class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -34,7 +30,7 @@ class RememberMail extends Mailable
|
||||||
{
|
{
|
||||||
return $this->markdown('mail.invoice.remember')
|
return $this->markdown('mail.invoice.remember')
|
||||||
->attach($this->filename)
|
->attach($this->filename)
|
||||||
->when($this->settings->replyTo, fn ($mail) => $mail->replyTo($this->settings->replyTo))
|
->replyTo('kasse@stamm-silva.de')
|
||||||
->subject('Zahlungserinnerung | '.$this->settings->from_long);
|
->subject('Zahlungserinnerung | DPSG Stamm Silva');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
|
||||||
|
|
||||||
return new class extends SettingsMigration
|
|
||||||
{
|
|
||||||
public function up(): void
|
|
||||||
{
|
|
||||||
$this->migrator->add('bill.replyTo', '');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
<f-text id="iban" v-model="inner.iban" label="IBAN"></f-text>
|
<f-text id="iban" v-model="inner.iban" label="IBAN"></f-text>
|
||||||
<f-text id="bic" v-model="inner.bic" label="BIC"></f-text>
|
<f-text id="bic" v-model="inner.bic" label="BIC"></f-text>
|
||||||
<f-text id="remember_weeks" v-model="inner.rememberWeeks" type="number" label="Erinnerung alle X Wochen versenden"></f-text>
|
<f-text id="remember_weeks" v-model="inner.rememberWeeks" type="number" label="Erinnerung alle X Wochen versenden"></f-text>
|
||||||
<f-text id="reply_to" v-model="inner.replyTo" label="Reply-To E-Mail-Adresse"></f-text>
|
|
||||||
</form>
|
</form>
|
||||||
</setting-layout>
|
</setting-layout>
|
||||||
</page-layout>
|
</page-layout>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@component('mail::message')
|
@component('mail::message')
|
||||||
# {{ $invoice->greeting }},
|
# {{ $invoice->greeting }},
|
||||||
|
|
||||||
Im Anhang findet ihr die aktuelle Rechnung an {{$settings->from}} für das laufende Jahr. Bitte begleicht diese bis zum angegebenen Datum.
|
Im Anhang findet ihr die aktuelle Rechnung des Stammes Silva für das laufende Jahr. Bitte begleicht diese bis zum angegebenen Datum.
|
||||||
|
|
||||||
@component('mail::subcopy')
|
@component('mail::subcopy')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@component('mail::message')
|
@component('mail::message')
|
||||||
# {{ $invoice->greeting }},
|
# {{ $invoice->greeting }},
|
||||||
|
|
||||||
Hiermit möchten wir euch an die noch ausstehenden Mitgliedsbeiträge an {{$settings->from}} für das laufende Jahr erinnern. Bitte begleicht diese bis zum angegebenen Datum.
|
Hiermit möchten wir euch an die noch ausstehenden Mitgliedsbeiträge des Stammes Silva für das laufende Jahr erinnern. Bitte begleicht diese bis zum angegebenen Datum.
|
||||||
|
|
||||||
@component('mail::subcopy')
|
@component('mail::subcopy')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ class InvoiceSendActionTest extends TestCase
|
||||||
Tex::spy();
|
Tex::spy();
|
||||||
Storage::fake('temp');
|
Storage::fake('temp');
|
||||||
$this->withoutExceptionHandling()->login()->loginNami();
|
$this->withoutExceptionHandling()->login()->loginNami();
|
||||||
app(InvoiceSettings::class)->fill(['from_long' => 'Stammname', 'replyTo' => 'reply@mail.com'])->save();
|
|
||||||
$invoice = Invoice::factory()
|
$invoice = Invoice::factory()
|
||||||
->to(ReceiverRequestFactory::new()->name('Familie Muster'))
|
->to(ReceiverRequestFactory::new()->name('Familie Muster'))
|
||||||
->has(InvoicePosition::factory()->withMember(), 'positions')
|
->has(InvoicePosition::factory()->withMember(), 'positions')
|
||||||
|
|
@ -58,13 +57,7 @@ class InvoiceSendActionTest extends TestCase
|
||||||
|
|
||||||
InvoiceSendAction::run();
|
InvoiceSendAction::run();
|
||||||
|
|
||||||
Mail::assertSent(RememberMail::class, fn ($mail) => $mail->build()
|
Mail::assertSent(RememberMail::class, fn ($mail) => $mail->build() && $mail->hasTo('max@muster.de', 'Familie Muster') && Storage::disk('temp')->path('zahlungserinnerung-fur-familie-muster.pdf') === $mail->filename && Storage::disk('temp')->exists('zahlungserinnerung-fur-familie-muster.pdf'));
|
||||||
&& $mail->hasTo('max@muster.de', 'Familie Muster')
|
|
||||||
&& $mail->hasSubject('Zahlungserinnerung | Stammname')
|
|
||||||
&& Storage::disk('temp')->path('zahlungserinnerung-fur-familie-muster.pdf') === $mail->filename
|
|
||||||
&& Storage::disk('temp')->exists('zahlungserinnerung-fur-familie-muster.pdf')
|
|
||||||
&& $mail->hasReplyTo('reply@mail.com')
|
|
||||||
);
|
|
||||||
Tex::assertCompiled(RememberDocument::class, fn ($document) => 'Familie Muster' === $document->toName);
|
Tex::assertCompiled(RememberDocument::class, fn ($document) => 'Familie Muster' === $document->toName);
|
||||||
$this->assertEquals(now()->format('Y-m-d'), $invoice->fresh()->last_remembered_at->format('Y-m-d'));
|
$this->assertEquals(now()->format('Y-m-d'), $invoice->fresh()->last_remembered_at->format('Y-m-d'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,7 @@ class SettingTest extends TestCase
|
||||||
'zip' => '12345',
|
'zip' => '12345',
|
||||||
'iban' => 'DE05',
|
'iban' => 'DE05',
|
||||||
'bic' => 'SOLSDE',
|
'bic' => 'SOLSDE',
|
||||||
'rememberWeeks' => 6,
|
'rememberWeeks' => 6
|
||||||
'replyTo' => 'reply@example.com',
|
|
||||||
])->save();
|
])->save();
|
||||||
|
|
||||||
$this->get(route('setting.data', ['settingGroup' => 'bill']))
|
$this->get(route('setting.data', ['settingGroup' => 'bill']))
|
||||||
|
|
@ -50,8 +49,7 @@ class SettingTest extends TestCase
|
||||||
->assertInertiaPath('data.zip', '12345')
|
->assertInertiaPath('data.zip', '12345')
|
||||||
->assertInertiaPath('data.iban', 'DE05')
|
->assertInertiaPath('data.iban', 'DE05')
|
||||||
->assertInertiaPath('data.bic', 'SOLSDE')
|
->assertInertiaPath('data.bic', 'SOLSDE')
|
||||||
->assertInertiaPath('data.rememberWeeks', 6)
|
->assertInertiaPath('data.rememberWeeks', 6);
|
||||||
->assertInertiaPath('data.replyTo', 'reply@example.com');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testItReturnsTabs(): void
|
public function testItReturnsTabs(): void
|
||||||
|
|
@ -80,8 +78,7 @@ class SettingTest extends TestCase
|
||||||
'zip' => '12345',
|
'zip' => '12345',
|
||||||
'iban' => 'DE05',
|
'iban' => 'DE05',
|
||||||
'bic' => 'SOLSDE',
|
'bic' => 'SOLSDE',
|
||||||
'rememberWeeks' => 10,
|
'rememberWeeks' => 10
|
||||||
'replyTo' => 'reply@example.com2',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$response->assertRedirect('/setting/bill');
|
$response->assertRedirect('/setting/bill');
|
||||||
|
|
@ -89,7 +86,6 @@ class SettingTest extends TestCase
|
||||||
$this->assertEquals('DPSG Stamm Muster', $settings->from_long);
|
$this->assertEquals('DPSG Stamm Muster', $settings->from_long);
|
||||||
$this->assertEquals('DE05', $settings->iban);
|
$this->assertEquals('DE05', $settings->iban);
|
||||||
$this->assertEquals('SOLSDE', $settings->bic);
|
$this->assertEquals('SOLSDE', $settings->bic);
|
||||||
$this->assertEquals('reply@example.com2', $settings->replyTo);
|
|
||||||
$this->assertEquals(10, $settings->rememberWeeks);
|
$this->assertEquals(10, $settings->rememberWeeks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue