mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
implementation of custom email templates
This commit is contained in:
parent
ff072956cb
commit
b513ceed11
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use DirectoryIterator;
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ class TokenAuth
|
|||||||
*/
|
*/
|
||||||
app('queue')->createPayloadUsing(function () use ($company_token) {
|
app('queue')->createPayloadUsing(function () use ($company_token) {
|
||||||
return ['db' => $company_token->company->db];
|
return ['db' => $company_token->company->db];
|
||||||
|
// return ['db' => $company_token->company->db, 'is_premium' => $company_token->account->isPremium()];
|
||||||
});
|
});
|
||||||
|
|
||||||
//user who once existed, but has been soft deleted
|
//user who once existed, but has been soft deleted
|
||||||
|
@ -34,6 +34,7 @@ class NinjaMailer extends Mailable
|
|||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
|
|
||||||
$from_name = config('mail.from.name');
|
$from_name = config('mail.from.name');
|
||||||
|
|
||||||
if (property_exists($this->mail_obj, 'from_name')) {
|
if (property_exists($this->mail_obj, 'from_name')) {
|
||||||
|
@ -294,6 +294,11 @@ class Account extends BaseModel
|
|||||||
return Ninja::isNinja() ? ($this->isPaidHostedClient() && !$this->isTrial()) : $this->hasFeature(self::FEATURE_WHITE_LABEL);
|
return Ninja::isNinja() ? ($this->isPaidHostedClient() && !$this->isTrial()) : $this->hasFeature(self::FEATURE_WHITE_LABEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isPremium(): bool
|
||||||
|
{
|
||||||
|
return Ninja::isHosted() && $this->isPaidHostedClient() && !$this->isTrial() && Carbon::createFromTimestamp($this->created_at)->diffInMonths() > 2;
|
||||||
|
}
|
||||||
|
|
||||||
public function isPaidHostedClient(): bool
|
public function isPaidHostedClient(): bool
|
||||||
{
|
{
|
||||||
if (!Ninja::isNinja()) {
|
if (!Ninja::isNinja()) {
|
||||||
|
@ -24,6 +24,18 @@ class ComposerServiceProvider extends ServiceProvider
|
|||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
view()->composer('portal.*', PortalComposer::class);
|
view()->composer('portal.*', PortalComposer::class);
|
||||||
|
|
||||||
|
// view()->composer(
|
||||||
|
// ['email.admin.generic', 'email.client.generic'],
|
||||||
|
// function ($view) {
|
||||||
|
// $view->with(
|
||||||
|
// 'template',
|
||||||
|
// Ninja::isHosted()
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,6 +33,7 @@ class MultiDBProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->app['events']->listen(
|
$this->app['events']->listen(
|
||||||
JobProcessing::class,
|
JobProcessing::class,
|
||||||
function ($event) {
|
function ($event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user