mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Minor fixes
This commit is contained in:
parent
43822fbfdd
commit
a7a76e806c
@ -746,6 +746,8 @@ class BaseController extends Controller
|
||||
//pass referral code to front end
|
||||
$data['rc'] = request()->has('rc') ? request()->input('rc') : '';
|
||||
$data['build'] = request()->has('build') ? request()->input('build') : '';
|
||||
$data['login'] = request()->has('login') ? request()->input('login') : "false";
|
||||
|
||||
$data['user_agent'] = request()->server('HTTP_USER_AGENT');
|
||||
|
||||
$data['path'] = $this->setBuild();
|
||||
|
@ -76,7 +76,7 @@ class SendingController extends Controller
|
||||
}
|
||||
|
||||
Mail::to(config('ninja.contact.ninja_official_contact'))
|
||||
->send(new SupportMessageSent($request->input('message'), $send_logs));
|
||||
->send(new SupportMessageSent($request->all(), $send_logs));
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
|
@ -13,13 +13,13 @@ class SupportMessageSent extends Mailable
|
||||
{
|
||||
// use Queueable, SerializesModels;
|
||||
|
||||
public $support_message;
|
||||
public $data;
|
||||
|
||||
public $send_logs;
|
||||
|
||||
public function __construct($support_message, $send_logs)
|
||||
public function __construct(array $data, $send_logs)
|
||||
{
|
||||
$this->support_message = $support_message;
|
||||
$this->data = $data;
|
||||
$this->send_logs = $send_logs;
|
||||
}
|
||||
|
||||
@ -63,17 +63,19 @@ class SupportMessageSent extends Mailable
|
||||
$user = auth()->user();
|
||||
$db = str_replace("db-ninja-", "", $company->db);
|
||||
$is_large = $company->is_large ? "L" : "S";
|
||||
|
||||
$platform = array_key_exists('platform', $this->data) ? $this->data['platform'] : "U";
|
||||
$migrated = strlen($company->company_key) == 32 ? "M" : "";
|
||||
|
||||
if(Ninja::isHosted())
|
||||
$subject = "{$priority}Hosted-{$db}-{$is_large} :: {$plan} :: ".date('M jS, g:ia');
|
||||
$subject = "{$priority}Hosted-{$db}-{$is_large}{$platform}{$migrated} :: {$plan} :: ".date('M jS, g:ia');
|
||||
else
|
||||
$subject = "{$priority}Self Hosted :: {$plan} :: ".date('M jS, g:ia');
|
||||
$subject = "{$priority}Self Hosted :: {$plan}{$platform} :: ".date('M jS, g:ia');
|
||||
|
||||
return $this->from(config('mail.from.address'), $user->present()->name())
|
||||
->replyTo($user->email, $user->present()->name())
|
||||
->subject($subject)
|
||||
->view('email.support.message', [
|
||||
'support_message' => $this->support_message,
|
||||
'support_message' => $this->data['support_message'],
|
||||
'system_info' => $system_info,
|
||||
'laravel_log' => $log_lines,
|
||||
'logo' => $company->present()->logo(),
|
||||
|
@ -101,6 +101,7 @@ class RecurringExpenseTransformer extends EntityTransformer
|
||||
'remaining_cycles' => (int) $recurring_expense->remaining_cycles,
|
||||
'last_sent_date' => $recurring_expense->last_sent_date ?: '',
|
||||
'next_send_date' => $recurring_expense->next_send_date ?: '',
|
||||
'recurring_dates' => (array) [],
|
||||
];
|
||||
|
||||
if(request()->has('show_dates') && request()->query('show_dates') == 'true')
|
||||
|
@ -127,7 +127,7 @@ class RecurringInvoiceTransformer extends EntityTransformer
|
||||
'due_date_days' => (string) $invoice->due_date_days ?: '',
|
||||
'paid_to_date' => (float) $invoice->paid_to_date,
|
||||
'subscription_id' => (string)$this->encodePrimaryKey($invoice->subscription_id),
|
||||
|
||||
'recurring_dates' => (array) [],
|
||||
];
|
||||
|
||||
|
||||
|
@ -158,6 +158,7 @@ class HtmlEngine
|
||||
$data['$view_link'] = ['value' => '<a class="button" href="'.$this->invitation->getLink().'">'.ctrans('texts.view_quote').'</a>', 'label' => ctrans('texts.view_quote')];
|
||||
$data['$viewLink'] = &$data['$view_link'];
|
||||
$data['$viewButton'] = &$data['$view_link'];
|
||||
$data['$view_button'] = &$data['$view_link'];
|
||||
$data['$approveButton'] = ['value' => '<a class="button" href="'.$this->invitation->getLink().'">'.ctrans('texts.view_quote').'</a>', 'label' => ctrans('texts.approve')];
|
||||
$data['$view_url'] = ['value' => $this->invitation->getLink(), 'label' => ctrans('texts.view_quote')];
|
||||
$data['$date'] = ['value' => $this->translateDate($this->entity->date, $this->entity->client->date_format(), $this->entity->client->locale()) ?: ' ', 'label' => ctrans('texts.quote_date')];
|
||||
@ -171,6 +172,7 @@ class HtmlEngine
|
||||
$data['$terms'] = &$data['$entity.terms'];
|
||||
$data['$view_link'] = ['value' => '<a class="button" href="'.$this->invitation->getLink().'">'.ctrans('texts.view_credit').'</a>', 'label' => ctrans('texts.view_credit')];
|
||||
$data['$viewButton'] = &$data['$view_link'];
|
||||
$data['$view_button'] = &$data['$view_link'];
|
||||
$data['$viewLink'] = &$data['$view_link'];
|
||||
$data['$view_url'] = ['value' => $this->invitation->getLink(), 'label' => ctrans('texts.view_credit')];
|
||||
// $data['$view_link'] = ['value' => $this->invitation->getLink(), 'label' => ctrans('texts.view_credit')];
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html data-report-errors="{{ $report_errors }}" data-rc="{{ $rc }}" data-user-agent="{{ $user_agent }}">
|
||||
<html data-report-errors="{{ $report_errors }}" data-rc="{{ $rc }}" data-user-agent="{{ $user_agent }}" data-login="{{ $login }}">
|
||||
<head>
|
||||
<!-- Source: https://github.com/invoiceninja/invoiceninja -->
|
||||
<!-- Version: {{ config('ninja.app_version') }} -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user