Replace uri with url

This commit is contained in:
James Cole
2022-04-12 18:19:30 +02:00
parent ac5c11a8d7
commit 50f87a210a
101 changed files with 449 additions and 486 deletions

View File

@@ -73,7 +73,7 @@ abstract class Controller extends BaseController
} }
/** /**
* Method to grab all parameters from the URI. * Method to grab all parameters from the URL.
* *
* @return ParameterBag * @return ParameterBag
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
@@ -148,7 +148,7 @@ abstract class Controller extends BaseController
/** /**
* Method to help build URI's. * Method to help build URL's.
* *
* @return string * @return string
*/ */

View File

@@ -103,7 +103,7 @@ class ListController extends Controller
{ {
$manager = $this->getManager(); $manager = $this->getManager();
// read type from URI // read type from URL
$type = $request->get('type') ?? 'all'; $type = $request->get('type') ?? 'all';
$this->parameters->set('type', $type); $this->parameters->set('type', $type);

View File

@@ -79,7 +79,7 @@ class ShowController extends Controller
{ {
// create some objects: // create some objects:
$manager = $this->getManager(); $manager = $this->getManager();
// read type from URI // read type from URL
$name = $request->get('name'); $name = $request->get('name');
// types to get, page size: // types to get, page size:

View File

@@ -230,9 +230,9 @@ class UserEventHandler
$oldEmail = $event->oldEmail; $oldEmail = $event->oldEmail;
$user = $event->user; $user = $event->user;
$token = app('preferences')->getForUser($user, 'email_change_confirm_token', 'invalid'); $token = app('preferences')->getForUser($user, 'email_change_confirm_token', 'invalid');
$uri = route('profile.confirm-email-change', [$token->data]); $url = route('profile.confirm-email-change', [$token->data]);
try { try {
Mail::to($newEmail)->send(new ConfirmEmailChangeMail($newEmail, $oldEmail, $uri)); Mail::to($newEmail)->send(new ConfirmEmailChangeMail($newEmail, $oldEmail, $url));
} catch (Exception $e) { // @phpstan-ignore-line } catch (Exception $e) { // @phpstan-ignore-line
Log::error($e->getMessage()); Log::error($e->getMessage());
@@ -256,9 +256,9 @@ class UserEventHandler
$user = $event->user; $user = $event->user;
$token = app('preferences')->getForUser($user, 'email_change_undo_token', 'invalid'); $token = app('preferences')->getForUser($user, 'email_change_undo_token', 'invalid');
$hashed = hash('sha256', sprintf('%s%s', (string) config('app.key'), $oldEmail)); $hashed = hash('sha256', sprintf('%s%s', (string) config('app.key'), $oldEmail));
$uri = route('profile.undo-email-change', [$token->data, $hashed]); $url = route('profile.undo-email-change', [$token->data, $hashed]);
try { try {
Mail::to($oldEmail)->send(new UndoEmailChangeMail($newEmail, $oldEmail, $uri)); Mail::to($oldEmail)->send(new UndoEmailChangeMail($newEmail, $oldEmail, $url));
} catch (Exception $e) { // @phpstan-ignore-line } catch (Exception $e) { // @phpstan-ignore-line
Log::error($e->getMessage()); Log::error($e->getMessage());
@@ -308,7 +308,7 @@ class UserEventHandler
if ($sendMail) { if ($sendMail) {
// get the email address // get the email address
$email = $event->user->email; $email = $event->user->email;
$uri = route('index'); $url = route('index');
// see if user has alternative email address: // see if user has alternative email address:
$pref = app('preferences')->getForUser($event->user, 'remote_guard_alt_email'); $pref = app('preferences')->getForUser($event->user, 'remote_guard_alt_email');
@@ -318,7 +318,7 @@ class UserEventHandler
// send email. // send email.
try { try {
Mail::to($email)->send(new RegisteredUserMail($uri)); Mail::to($email)->send(new RegisteredUserMail($url));
} catch (Exception $e) { // @phpstan-ignore-line } catch (Exception $e) { // @phpstan-ignore-line
Log::error($e->getMessage()); Log::error($e->getMessage());

View File

@@ -119,7 +119,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('accounts.create.fromStore')) { if (true !== session('accounts.create.fromStore')) {
$this->rememberPreviousUri('accounts.create.uri'); $this->rememberPreviousUrl('accounts.create.url');
} }
$request->session()->forget('accounts.create.fromStore'); $request->session()->forget('accounts.create.fromStore');
Log::channel('audit')->info('Creating new account.'); Log::channel('audit')->info('Creating new account.');
@@ -171,7 +171,7 @@ class CreateController extends Controller
} }
// redirect to previous URL. // redirect to previous URL.
$redirect = redirect($this->getPreviousUri('accounts.create.uri')); $redirect = redirect($this->getPreviousUrl('accounts.create.url'));
if (1 === (int) $request->get('create_another')) { if (1 === (int) $request->get('create_another')) {
// set value so create routine will not overwrite URL: // set value so create routine will not overwrite URL:
$request->session()->put('accounts.create.fromStore', true); $request->session()->put('accounts.create.fromStore', true);

View File

@@ -82,7 +82,7 @@ class DeleteController extends Controller
unset($accountList[$account->id]); unset($accountList[$account->id]);
// put previous url in session // put previous url in session
$this->rememberPreviousUri('accounts.delete.uri'); $this->rememberPreviousUrl('accounts.delete.url');
return view('accounts.delete', compact('account', 'subTitle', 'accountList', 'objectType')); return view('accounts.delete', compact('account', 'subTitle', 'accountList', 'objectType'));
} }
@@ -111,7 +111,7 @@ class DeleteController extends Controller
$request->session()->flash('success', (string) trans(sprintf('firefly.%s_deleted', $typeName), ['name' => $name])); $request->session()->flash('success', (string) trans(sprintf('firefly.%s_deleted', $typeName), ['name' => $name]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('accounts.delete.uri')); return redirect($this->getPreviousUrl('accounts.delete.url'));
} }
} }

View File

@@ -118,7 +118,7 @@ class EditController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('accounts.edit.fromUpdate')) { if (true !== session('accounts.edit.fromUpdate')) {
$this->rememberPreviousUri('accounts.edit.uri'); $this->rememberPreviousUrl('accounts.edit.url');
} }
$request->session()->forget('accounts.edit.fromUpdate'); $request->session()->forget('accounts.edit.fromUpdate');
@@ -211,7 +211,7 @@ class EditController extends Controller
} }
// redirect // redirect
$redirect = redirect($this->getPreviousUri('accounts.edit.uri')); $redirect = redirect($this->getPreviousUrl('accounts.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
// set value so edit routine will not overwrite URL: // set value so edit routine will not overwrite URL:
$request->session()->put('accounts.edit.fromUpdate', true); $request->session()->put('accounts.edit.fromUpdate', true);

View File

@@ -134,9 +134,9 @@ class ReconcileController extends Controller
$subTitle = (string) trans('firefly.reconcile_account', ['account' => $account->name]); $subTitle = (string) trans('firefly.reconcile_account', ['account' => $account->name]);
// various links // various links
$transactionsUri = route('accounts.reconcile.transactions', [$account->id, '%start%', '%end%']); $transactionsUrl = route('accounts.reconcile.transactions', [$account->id, '%start%', '%end%']);
$overviewUri = route('accounts.reconcile.overview', [$account->id, '%start%', '%end%']); $overviewUrl = route('accounts.reconcile.overview', [$account->id, '%start%', '%end%']);
$indexUri = route('accounts.reconcile', [$account->id, '%start%', '%end%']); $indexUrl = route('accounts.reconcile', [$account->id, '%start%', '%end%']);
$objectType = 'asset'; $objectType = 'asset';
return view( return view(
@@ -151,9 +151,9 @@ class ReconcileController extends Controller
'subTitle', 'subTitle',
'startBalance', 'startBalance',
'endBalance', 'endBalance',
'transactionsUri', 'transactionsUrl',
'overviewUri', 'overviewUrl',
'indexUri' 'indexUrl'
) )
); );
} }

View File

@@ -114,7 +114,7 @@ class ShowController extends Controller
$fStart = $start->isoFormat($this->monthAndDayFormat); $fStart = $start->isoFormat($this->monthAndDayFormat);
$fEnd = $end->isoFormat($this->monthAndDayFormat); $fEnd = $end->isoFormat($this->monthAndDayFormat);
$subTitle = (string) trans('firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $fStart, 'end' => $fEnd]); $subTitle = (string) trans('firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $fStart, 'end' => $fEnd]);
$chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]); $chartUrl = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
$firstTransaction = $this->repository->oldestJournalDate($account) ?? $start; $firstTransaction = $this->repository->oldestJournalDate($account) ?? $start;
$periods = $this->getAccountPeriodOverview($account, $firstTransaction, $end); $periods = $this->getAccountPeriodOverview($account, $firstTransaction, $end);
@@ -152,7 +152,7 @@ class ShowController extends Controller
'subTitle', 'subTitle',
'start', 'start',
'end', 'end',
'chartUri', 'chartUrl',
'location', 'location',
'balance' 'balance'
) )
@@ -194,7 +194,7 @@ class ShowController extends Controller
$collector->setAccounts(new Collection([$account]))->setLimit($pageSize)->setPage($page)->withAccountInformation()->withCategoryInformation(); $collector->setAccounts(new Collection([$account]))->setLimit($pageSize)->setPage($page)->withAccountInformation()->withCategoryInformation();
$groups = $collector->getPaginatedGroups(); $groups = $collector->getPaginatedGroups();
$groups->setPath(route('accounts.show.all', [$account->id])); $groups->setPath(route('accounts.show.all', [$account->id]));
$chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]); $chartUrl = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
$showAll = true; $showAll = true;
$balance = app('steam')->balance($account, $end); $balance = app('steam')->balance($account, $end);
@@ -209,7 +209,7 @@ class ShowController extends Controller
'attachments', 'attachments',
'currency', 'currency',
'today', 'today',
'chartUri', 'chartUrl',
'periods', 'periods',
'subTitleIcon', 'subTitleIcon',
'groups', 'groups',

View File

@@ -76,7 +76,7 @@ class LinkController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('link-types.create.fromStore')) { if (true !== session('link-types.create.fromStore')) {
$this->rememberPreviousUri('link-types.create.uri'); $this->rememberPreviousUrl('link-types.create.url');
} }
return view('admin.link.create', compact('subTitle', 'subTitleIcon')); return view('admin.link.create', compact('subTitle', 'subTitleIcon'));
@@ -113,7 +113,7 @@ class LinkController extends Controller
} }
// put previous url in session // put previous url in session
$this->rememberPreviousUri('link-types.delete.uri'); $this->rememberPreviousUrl('link-types.delete.url');
return view('admin.link.delete', compact('linkType', 'subTitle', 'moveTo', 'count')); return view('admin.link.delete', compact('linkType', 'subTitle', 'moveTo', 'count'));
} }
@@ -136,7 +136,7 @@ class LinkController extends Controller
$request->session()->flash('success', (string) trans('firefly.deleted_link_type', ['name' => $name])); $request->session()->flash('success', (string) trans('firefly.deleted_link_type', ['name' => $name]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('link-types.delete.uri')); return redirect($this->getPreviousUrl('link-types.delete.url'));
} }
/** /**
@@ -161,7 +161,7 @@ class LinkController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('link-types.edit.fromUpdate')) { if (true !== session('link-types.edit.fromUpdate')) {
$this->rememberPreviousUri('link-types.edit.uri'); $this->rememberPreviousUrl('link-types.edit.url');
} }
$request->session()->forget('link-types.edit.fromUpdate'); $request->session()->forget('link-types.edit.fromUpdate');
@@ -226,7 +226,7 @@ class LinkController extends Controller
Log::channel('audit')->info('User stored new link type.', $linkType->toArray()); Log::channel('audit')->info('User stored new link type.', $linkType->toArray());
$request->session()->flash('success', (string) trans('firefly.stored_new_link_type', ['name' => $linkType->name])); $request->session()->flash('success', (string) trans('firefly.stored_new_link_type', ['name' => $linkType->name]));
$redirect = redirect($this->getPreviousUri('link-types.create.uri')); $redirect = redirect($this->getPreviousUrl('link-types.create.url'));
if (1 === (int) $request->get('create_another')) { if (1 === (int) $request->get('create_another')) {
// set value so create routine will not overwrite URL: // set value so create routine will not overwrite URL:
$request->session()->put('link-types.create.fromStore', true); $request->session()->put('link-types.create.fromStore', true);
@@ -265,7 +265,7 @@ class LinkController extends Controller
$request->session()->flash('success', (string) trans('firefly.updated_link_type', ['name' => $linkType->name])); $request->session()->flash('success', (string) trans('firefly.updated_link_type', ['name' => $linkType->name]));
app('preferences')->mark(); app('preferences')->mark();
$redirect = redirect($this->getPreviousUri('link-types.edit.uri')); $redirect = redirect($this->getPreviousUrl('link-types.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
// set value so edit routine will not overwrite URL: // set value so edit routine will not overwrite URL:
$request->session()->put('link-types.edit.fromUpdate', true); $request->session()->put('link-types.edit.fromUpdate', true);

View File

@@ -117,7 +117,7 @@ class UserController extends Controller
} }
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('users.edit.fromUpdate')) { if (true !== session('users.edit.fromUpdate')) {
$this->rememberPreviousUri('users.edit.uri'); $this->rememberPreviousUrl('users.edit.url');
} }
session()->forget('users.edit.fromUpdate'); session()->forget('users.edit.fromUpdate');
@@ -217,7 +217,7 @@ class UserController extends Controller
session()->flash('success', (string) trans('firefly.updated_user', ['email' => $user->email])); session()->flash('success', (string) trans('firefly.updated_user', ['email' => $user->email]));
app('preferences')->mark(); app('preferences')->mark();
$redirect = redirect($this->getPreviousUri('users.edit.uri')); $redirect = redirect($this->getPreviousUrl('users.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
session()->put('users.edit.fromUpdate', true); session()->put('users.edit.fromUpdate', true);

View File

@@ -77,7 +77,7 @@ class AttachmentController extends Controller
$subTitle = (string) trans('firefly.delete_attachment', ['name' => $attachment->filename]); $subTitle = (string) trans('firefly.delete_attachment', ['name' => $attachment->filename]);
// put previous url in session // put previous url in session
$this->rememberPreviousUri('attachments.delete.uri'); $this->rememberPreviousUrl('attachments.delete.url');
return view('attachments.delete', compact('attachment', 'subTitle')); return view('attachments.delete', compact('attachment', 'subTitle'));
} }
@@ -99,7 +99,7 @@ class AttachmentController extends Controller
$request->session()->flash('success', (string) trans('firefly.attachment_deleted', ['name' => $name])); $request->session()->flash('success', (string) trans('firefly.attachment_deleted', ['name' => $name]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('attachments.delete.uri')); return redirect($this->getPreviousUrl('attachments.delete.url'));
} }
/** /**
@@ -150,7 +150,7 @@ class AttachmentController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('attachments.edit.fromUpdate')) { if (true !== session('attachments.edit.fromUpdate')) {
$this->rememberPreviousUri('attachments.edit.uri'); $this->rememberPreviousUrl('attachments.edit.url');
} }
$request->session()->forget('attachments.edit.fromUpdate'); $request->session()->forget('attachments.edit.fromUpdate');
$preFilled = [ $preFilled = [
@@ -196,7 +196,7 @@ class AttachmentController extends Controller
$request->session()->flash('success', (string) trans('firefly.attachment_updated', ['name' => $attachment->filename])); $request->session()->flash('success', (string) trans('firefly.attachment_updated', ['name' => $attachment->filename]));
app('preferences')->mark(); app('preferences')->mark();
$redirect = redirect($this->getPreviousUri('attachments.edit.uri')); $redirect = redirect($this->getPreviousUrl('attachments.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
$request->session()->put('attachments.edit.fromUpdate', true); $request->session()->put('attachments.edit.fromUpdate', true);

View File

@@ -169,11 +169,11 @@ class LoginController extends Controller
public function logout(Request $request) public function logout(Request $request)
{ {
$authGuard = config('firefly.authentication_guard'); $authGuard = config('firefly.authentication_guard');
$logoutUri = config('firefly.custom_logout_url'); $logoutUrl = config('firefly.custom_logout_url');
if ('remote_user_guard' === $authGuard && '' !== $logoutUri) { if ('remote_user_guard' === $authGuard && '' !== $logoutUrl) {
return redirect($logoutUri); return redirect($logoutUrl);
} }
if ('remote_user_guard' === $authGuard && '' === $logoutUri) { if ('remote_user_guard' === $authGuard && '' === $logoutUrl) {
session()->flash('error', trans('firefly.cant_logout_guard')); session()->flash('error', trans('firefly.cant_logout_guard'));
} }

View File

@@ -84,7 +84,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('bills.create.fromStore')) { if (true !== session('bills.create.fromStore')) {
$this->rememberPreviousUri('bills.create.uri'); $this->rememberPreviousUrl('bills.create.url');
} }
$request->session()->forget('bills.create.fromStore'); $request->session()->forget('bills.create.fromStore');

View File

@@ -72,7 +72,7 @@ class DeleteController extends Controller
public function delete(Bill $bill) public function delete(Bill $bill)
{ {
// put previous url in session // put previous url in session
$this->rememberPreviousUri('bills.delete.uri'); $this->rememberPreviousUrl('bills.delete.url');
$subTitle = (string) trans('firefly.delete_bill', ['name' => $bill->name]); $subTitle = (string) trans('firefly.delete_bill', ['name' => $bill->name]);
return view('bills.delete', compact('bill', 'subTitle')); return view('bills.delete', compact('bill', 'subTitle'));
@@ -94,6 +94,6 @@ class DeleteController extends Controller
$request->session()->flash('success', (string) trans('firefly.deleted_bill', ['name' => $name])); $request->session()->flash('success', (string) trans('firefly.deleted_bill', ['name' => $name]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('bills.delete.uri')); return redirect($this->getPreviousUrl('bills.delete.url'));
} }
} }

View File

@@ -85,7 +85,7 @@ class EditController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('bills.edit.fromUpdate')) { if (true !== session('bills.edit.fromUpdate')) {
$this->rememberPreviousUri('bills.edit.uri'); $this->rememberPreviousUrl('bills.edit.url');
} }
$currency = app('amount')->getDefaultCurrency(); $currency = app('amount')->getDefaultCurrency();
@@ -141,7 +141,7 @@ class EditController extends Controller
if (count($this->attachments->getMessages()->get('attachments')) > 0) { if (count($this->attachments->getMessages()->get('attachments')) > 0) {
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); $request->session()->flash('info', $this->attachments->getMessages()->get('attachments'));
} }
$redirect = redirect($this->getPreviousUri('bills.edit.uri')); $redirect = redirect($this->getPreviousUrl('bills.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {

View File

@@ -98,7 +98,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('budgets.create.fromStore')) { if (true !== session('budgets.create.fromStore')) {
$this->rememberPreviousUri('budgets.create.uri'); $this->rememberPreviousUrl('budgets.create.url');
} }
$request->session()->forget('budgets.create.fromStore'); $request->session()->forget('budgets.create.fromStore');
$subTitle = (string) trans('firefly.create_new_budget'); $subTitle = (string) trans('firefly.create_new_budget');
@@ -136,7 +136,7 @@ class CreateController extends Controller
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); $request->session()->flash('info', $this->attachments->getMessages()->get('attachments'));
} }
$redirect = redirect($this->getPreviousUri('budgets.create.uri')); $redirect = redirect($this->getPreviousUrl('budgets.create.url'));
if (1 === (int) $request->get('create_another')) { if (1 === (int) $request->get('create_another')) {

View File

@@ -73,7 +73,7 @@ class DeleteController extends Controller
$subTitle = (string) trans('firefly.delete_budget', ['name' => $budget->name]); $subTitle = (string) trans('firefly.delete_budget', ['name' => $budget->name]);
// put previous url in session // put previous url in session
$this->rememberPreviousUri('budgets.delete.uri'); $this->rememberPreviousUrl('budgets.delete.url');
return view('budgets.delete', compact('budget', 'subTitle')); return view('budgets.delete', compact('budget', 'subTitle'));
} }
@@ -93,7 +93,7 @@ class DeleteController extends Controller
$request->session()->flash('success', (string) trans('firefly.deleted_budget', ['name' => $name])); $request->session()->flash('success', (string) trans('firefly.deleted_budget', ['name' => $name]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('budgets.delete.uri')); return redirect($this->getPreviousUrl('budgets.delete.url'));
} }
} }

View File

@@ -108,7 +108,7 @@ class EditController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('budgets.edit.fromUpdate')) { if (true !== session('budgets.edit.fromUpdate')) {
$this->rememberPreviousUri('budgets.edit.uri'); $this->rememberPreviousUrl('budgets.edit.url');
} }
$request->session()->forget('budgets.edit.fromUpdate'); $request->session()->forget('budgets.edit.fromUpdate');
$request->session()->flash('preFilled', $preFilled); $request->session()->flash('preFilled', $preFilled);
@@ -133,7 +133,7 @@ class EditController extends Controller
$this->repository->cleanupBudgets(); $this->repository->cleanupBudgets();
app('preferences')->mark(); app('preferences')->mark();
$redirect = redirect($this->getPreviousUri('budgets.edit.uri')); $redirect = redirect($this->getPreviousUrl('budgets.edit.url'));
// store new attachment(s): // store new attachment(s):
$files = $request->hasFile('attachments') ? $request->file('attachments') : null; $files = $request->hasFile('attachments') ? $request->file('attachments') : null;

View File

@@ -73,7 +73,7 @@ class CreateController extends Controller
public function create(Request $request) public function create(Request $request)
{ {
if (true !== session('categories.create.fromStore')) { if (true !== session('categories.create.fromStore')) {
$this->rememberPreviousUri('categories.create.uri'); $this->rememberPreviousUrl('categories.create.url');
} }
$request->session()->forget('categories.create.fromStore'); $request->session()->forget('categories.create.fromStore');
$subTitle = (string) trans('firefly.create_new_category'); $subTitle = (string) trans('firefly.create_new_category');

View File

@@ -72,7 +72,7 @@ class DeleteController extends Controller
$subTitle = (string) trans('firefly.delete_category', ['name' => $category->name]); $subTitle = (string) trans('firefly.delete_category', ['name' => $category->name]);
// put previous url in session // put previous url in session
$this->rememberPreviousUri('categories.delete.uri'); $this->rememberPreviousUrl('categories.delete.url');
return view('categories.delete', compact('category', 'subTitle')); return view('categories.delete', compact('category', 'subTitle'));
} }
@@ -93,6 +93,6 @@ class DeleteController extends Controller
$request->session()->flash('success', (string) trans('firefly.deleted_category', ['name' => $name])); $request->session()->flash('success', (string) trans('firefly.deleted_category', ['name' => $name]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('categories.delete.uri')); return redirect($this->getPreviousUrl('categories.delete.url'));
} }
} }

View File

@@ -78,7 +78,7 @@ class EditController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('categories.edit.fromUpdate')) { if (true !== session('categories.edit.fromUpdate')) {
$this->rememberPreviousUri('categories.edit.uri'); $this->rememberPreviousUrl('categories.edit.url');
} }
$request->session()->forget('categories.edit.fromUpdate'); $request->session()->forget('categories.edit.fromUpdate');
@@ -117,7 +117,7 @@ class EditController extends Controller
if (count($this->attachments->getMessages()->get('attachments')) > 0) { if (count($this->attachments->getMessages()->get('attachments')) > 0) {
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); $request->session()->flash('info', $this->attachments->getMessages()->get('attachments'));
} }
$redirect = redirect($this->getPreviousUri('categories.edit.uri')); $redirect = redirect($this->getPreviousUrl('categories.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {

View File

@@ -41,7 +41,7 @@ abstract class Controller extends BaseController
protected string $dateTimeFormat; protected string $dateTimeFormat;
protected string $monthAndDayFormat; protected string $monthAndDayFormat;
protected string $monthFormat; protected string $monthFormat;
protected string $redirectUri = '/'; protected string $redirectUrl = '/';
/** /**
* Controller constructor. * Controller constructor.
@@ -63,10 +63,10 @@ abstract class Controller extends BaseController
// share custom auth guard info. // share custom auth guard info.
$authGuard = config('firefly.authentication_guard'); $authGuard = config('firefly.authentication_guard');
$logoutUri = config('firefly.custom_logout_url'); $logoutUrl = config('firefly.custom_logout_url');
app('view')->share('authGuard', $authGuard); app('view')->share('authGuard', $authGuard);
app('view')->share('logoutUri', $logoutUri); app('view')->share('logoutUrl', $logoutUrl);
// upload size // upload size
$maxFileSize = app('steam')->phpBytes(ini_get('upload_max_filesize')); $maxFileSize = app('steam')->phpBytes(ini_get('upload_max_filesize'));

View File

@@ -88,7 +88,7 @@ class CurrencyController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('currencies.create.fromStore')) { if (true !== session('currencies.create.fromStore')) {
$this->rememberPreviousUri('currencies.create.uri'); $this->rememberPreviousUrl('currencies.create.url');
} }
$request->session()->forget('currencies.create.fromStore'); $request->session()->forget('currencies.create.fromStore');
@@ -157,7 +157,7 @@ class CurrencyController extends Controller
} }
// put previous url in session // put previous url in session
$this->rememberPreviousUri('currencies.delete.uri'); $this->rememberPreviousUrl('currencies.delete.url');
$subTitle = (string) trans('form.delete_currency', ['name' => $currency->name]); $subTitle = (string) trans('form.delete_currency', ['name' => $currency->name]);
Log::channel('audit')->info(sprintf('Visit page to delete currency %s.', $currency->code)); Log::channel('audit')->info(sprintf('Visit page to delete currency %s.', $currency->code));
@@ -204,7 +204,7 @@ class CurrencyController extends Controller
$request->session()->flash('success', (string) trans('firefly.deleted_currency', ['name' => $currency->name])); $request->session()->flash('success', (string) trans('firefly.deleted_currency', ['name' => $currency->name]));
return redirect($this->getPreviousUri('currencies.delete.uri')); return redirect($this->getPreviousUrl('currencies.delete.url'));
} }
/** /**
@@ -297,7 +297,7 @@ class CurrencyController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('currencies.edit.fromUpdate')) { if (true !== session('currencies.edit.fromUpdate')) {
$this->rememberPreviousUri('currencies.edit.uri'); $this->rememberPreviousUrl('currencies.edit.url');
} }
$request->session()->forget('currencies.edit.fromUpdate'); $request->session()->forget('currencies.edit.fromUpdate');
@@ -375,7 +375,7 @@ class CurrencyController extends Controller
Log::error('User ' . auth()->user()->id . ' is not admin, but tried to store a currency.'); Log::error('User ' . auth()->user()->id . ' is not admin, but tried to store a currency.');
Log::channel('audit')->info('Tried to create (POST) currency without admin rights.', $data); Log::channel('audit')->info('Tried to create (POST) currency without admin rights.', $data);
return redirect($this->getPreviousUri('currencies.create.uri')); return redirect($this->getPreviousUrl('currencies.create.url'));
} }
@@ -388,7 +388,7 @@ class CurrencyController extends Controller
$request->session()->flash('error', (string) trans('firefly.could_not_store_currency')); $request->session()->flash('error', (string) trans('firefly.could_not_store_currency'));
$currency = null; $currency = null;
} }
$redirect = redirect($this->getPreviousUri('currencies.create.uri')); $redirect = redirect($this->getPreviousUrl('currencies.create.url'));
if (null !== $currency) { if (null !== $currency) {
$request->session()->flash('success', (string) trans('firefly.created_currency', ['name' => $currency->name])); $request->session()->flash('success', (string) trans('firefly.created_currency', ['name' => $currency->name]));
@@ -443,6 +443,6 @@ class CurrencyController extends Controller
} }
return redirect($this->getPreviousUri('currencies.edit.uri')); return redirect($this->getPreviousUrl('currencies.edit.url'));
} }
} }

View File

@@ -168,7 +168,7 @@ class ReconcileController extends Controller
} }
$return = [ $return = [
'post_uri' => $route, 'post_url' => $route,
'html' => $view, 'html' => $view,
]; ];

View File

@@ -72,7 +72,7 @@ class DeleteController extends Controller
$piggyBanks = $objectGroup->piggyBanks()->count(); $piggyBanks = $objectGroup->piggyBanks()->count();
// put previous url in session // put previous url in session
$this->rememberPreviousUri('object-groups.delete.uri'); $this->rememberPreviousUrl('object-groups.delete.url');
return view('object-groups.delete', compact('objectGroup', 'subTitle', 'piggyBanks')); return view('object-groups.delete', compact('objectGroup', 'subTitle', 'piggyBanks'));
} }
@@ -90,7 +90,7 @@ class DeleteController extends Controller
app('preferences')->mark(); app('preferences')->mark();
$this->repository->destroy($objectGroup); $this->repository->destroy($objectGroup);
return redirect($this->getPreviousUri('object-groups.delete.uri')); return redirect($this->getPreviousUrl('object-groups.delete.url'));
} }
} }

View File

@@ -75,7 +75,7 @@ class EditController extends Controller
$subTitleIcon = 'fa-pencil'; $subTitleIcon = 'fa-pencil';
if (true !== session('object-groups.edit.fromUpdate')) { if (true !== session('object-groups.edit.fromUpdate')) {
$this->rememberPreviousUri('object-groups.edit.uri'); $this->rememberPreviousUrl('object-groups.edit.url');
} }
session()->forget('object-groups.edit.fromUpdate'); session()->forget('object-groups.edit.fromUpdate');
@@ -98,7 +98,7 @@ class EditController extends Controller
session()->flash('success', (string) trans('firefly.updated_object_group', ['title' => $objectGroup->title])); session()->flash('success', (string) trans('firefly.updated_object_group', ['title' => $objectGroup->title]));
app('preferences')->mark(); app('preferences')->mark();
$redirect = redirect($this->getPreviousUri('object-groups.edit.uri')); $redirect = redirect($this->getPreviousUrl('object-groups.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {

View File

@@ -76,7 +76,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('piggy-banks.create.fromStore')) { if (true !== session('piggy-banks.create.fromStore')) {
$this->rememberPreviousUri('piggy-banks.create.uri'); $this->rememberPreviousUrl('piggy-banks.create.url');
} }
session()->forget('piggy-banks.create.fromStore'); session()->forget('piggy-banks.create.fromStore');
@@ -115,7 +115,7 @@ class CreateController extends Controller
if (count($this->attachments->getMessages()->get('attachments')) > 0) { if (count($this->attachments->getMessages()->get('attachments')) > 0) {
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); $request->session()->flash('info', $this->attachments->getMessages()->get('attachments'));
} }
$redirect = redirect($this->getPreviousUri('piggy-banks.create.uri')); $redirect = redirect($this->getPreviousUrl('piggy-banks.create.url'));
if (1 === (int) $request->get('create_another')) { if (1 === (int) $request->get('create_another')) {

View File

@@ -72,7 +72,7 @@ class DeleteController extends Controller
$subTitle = (string) trans('firefly.delete_piggy_bank', ['name' => $piggyBank->name]); $subTitle = (string) trans('firefly.delete_piggy_bank', ['name' => $piggyBank->name]);
// put previous url in session // put previous url in session
$this->rememberPreviousUri('piggy-banks.delete.uri'); $this->rememberPreviousUrl('piggy-banks.delete.url');
return view('piggy-banks.delete', compact('piggyBank', 'subTitle')); return view('piggy-banks.delete', compact('piggyBank', 'subTitle'));
} }
@@ -90,6 +90,6 @@ class DeleteController extends Controller
app('preferences')->mark(); app('preferences')->mark();
$this->piggyRepos->destroy($piggyBank); $this->piggyRepos->destroy($piggyBank);
return redirect($this->getPreviousUri('piggy-banks.delete.uri')); return redirect($this->getPreviousUrl('piggy-banks.delete.url'));
} }
} }

View File

@@ -102,7 +102,7 @@ class EditController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('piggy-banks.edit.fromUpdate')) { if (true !== session('piggy-banks.edit.fromUpdate')) {
$this->rememberPreviousUri('piggy-banks.edit.uri'); $this->rememberPreviousUrl('piggy-banks.edit.url');
} }
session()->forget('piggy-banks.edit.fromUpdate'); session()->forget('piggy-banks.edit.fromUpdate');
@@ -138,7 +138,7 @@ class EditController extends Controller
if (count($this->attachments->getMessages()->get('attachments')) > 0) { if (count($this->attachments->getMessages()->get('attachments')) > 0) {
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); $request->session()->flash('info', $this->attachments->getMessages()->get('attachments'));
} }
$redirect = redirect($this->getPreviousUri('piggy-banks.edit.uri')); $redirect = redirect($this->getPreviousUrl('piggy-banks.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {

View File

@@ -94,7 +94,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('recurring.create.fromStore')) { if (true !== session('recurring.create.fromStore')) {
$this->rememberPreviousUri('recurring.create.uri'); $this->rememberPreviousUrl('recurring.create.url');
} }
$request->session()->forget('recurring.create.fromStore'); $request->session()->forget('recurring.create.fromStore');
$repetitionEnds = [ $repetitionEnds = [
@@ -139,7 +139,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('recurring.create.fromStore')) { if (true !== session('recurring.create.fromStore')) {
$this->rememberPreviousUri('recurring.create.uri'); $this->rememberPreviousUrl('recurring.create.url');
} }
$request->session()->forget('recurring.create.fromStore'); $request->session()->forget('recurring.create.fromStore');
$repetitionEnds = [ $repetitionEnds = [
@@ -253,7 +253,7 @@ class CreateController extends Controller
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); $request->session()->flash('info', $this->attachments->getMessages()->get('attachments'));
} }
$redirect = redirect($this->getPreviousUri('recurring.create.uri')); $redirect = redirect($this->getPreviousUrl('recurring.create.url'));
if (1 === (int) $request->get('create_another')) { if (1 === (int) $request->get('create_another')) {
// set value so create routine will not overwrite URL: // set value so create routine will not overwrite URL:
$request->session()->put('recurring.create.fromStore', true); $request->session()->put('recurring.create.fromStore', true);

View File

@@ -73,7 +73,7 @@ class DeleteController extends Controller
{ {
$subTitle = (string) trans('firefly.delete_recurring', ['title' => $recurrence->title]); $subTitle = (string) trans('firefly.delete_recurring', ['title' => $recurrence->title]);
// put previous url in session // put previous url in session
$this->rememberPreviousUri('recurrences.delete.uri'); $this->rememberPreviousUrl('recurrences.delete.url');
$journalsCreated = $this->recurring->getTransactions($recurrence)->count(); $journalsCreated = $this->recurring->getTransactions($recurrence)->count();
@@ -95,7 +95,7 @@ class DeleteController extends Controller
$request->session()->flash('success', (string) trans('firefly.' . 'recurrence_deleted', ['title' => $recurrence->title])); $request->session()->flash('success', (string) trans('firefly.' . 'recurrence_deleted', ['title' => $recurrence->title]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('recurrences.delete.uri')); return redirect($this->getPreviousUrl('recurrences.delete.url'));
} }
} }

View File

@@ -112,7 +112,7 @@ class EditController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('recurrences.edit.fromUpdate')) { if (true !== session('recurrences.edit.fromUpdate')) {
$this->rememberPreviousUri('recurrences.edit.uri'); $this->rememberPreviousUrl('recurrences.edit.url');
} }
$request->session()->forget('recurrences.edit.fromUpdate'); $request->session()->forget('recurrences.edit.fromUpdate');
@@ -186,7 +186,7 @@ class EditController extends Controller
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); $request->session()->flash('info', $this->attachments->getMessages()->get('attachments'));
} }
app('preferences')->mark(); app('preferences')->mark();
$redirect = redirect($this->getPreviousUri('recurrences.edit.uri')); $redirect = redirect($this->getPreviousUrl('recurrences.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
// set value so edit routine will not overwrite URL: // set value so edit routine will not overwrite URL:
$request->session()->put('recurrences.edit.fromUpdate', true); $request->session()->put('recurrences.edit.fromUpdate', true);

View File

@@ -377,7 +377,7 @@ class ReportController extends Controller
return view('error')->with('message', (string) trans('firefly.end_after_start_date')); return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
} }
$uri = match ($reportType) { $url = match ($reportType) {
default => route('reports.report.default', [$accounts, $start, $end]), default => route('reports.report.default', [$accounts, $start, $end]),
'category' => route('reports.report.category', [$accounts, $categories, $start, $end]), 'category' => route('reports.report.category', [$accounts, $categories, $start, $end]),
'audit' => route('reports.report.audit', [$accounts, $start, $end]), 'audit' => route('reports.report.audit', [$accounts, $start, $end]),
@@ -386,7 +386,7 @@ class ReportController extends Controller
'double' => route('reports.report.double', [$accounts, $double, $start, $end]), 'double' => route('reports.report.double', [$accounts, $double, $start, $end]),
}; };
return redirect($uri); return redirect($url);
} }
/** /**

View File

@@ -122,7 +122,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('rules.create.fromStore')) { if (true !== session('rules.create.fromStore')) {
$this->rememberPreviousUri('rules.create.uri'); $this->rememberPreviousUrl('rules.create.url');
} }
session()->forget('rules.create.fromStore'); session()->forget('rules.create.fromStore');
@@ -175,7 +175,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('rules.create.fromStore')) { if (true !== session('rules.create.fromStore')) {
$this->rememberPreviousUri('rules.create.uri'); $this->rememberPreviousUrl('rules.create.url');
} }
session()->forget('rules.create.fromStore'); session()->forget('rules.create.fromStore');
@@ -225,7 +225,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('rules.create.fromStore')) { if (true !== session('rules.create.fromStore')) {
$this->rememberPreviousUri('rules.create.uri'); $this->rememberPreviousUrl('rules.create.url');
} }
session()->forget('rules.create.fromStore'); session()->forget('rules.create.fromStore');
@@ -272,10 +272,10 @@ class CreateController extends Controller
// redirect to new bill creation. // redirect to new bill creation.
if ((int) $request->get('bill_id') > 0) { if ((int) $request->get('bill_id') > 0) {
return redirect($this->getPreviousUri('bills.create.uri')); return redirect($this->getPreviousUrl('bills.create.url'));
} }
$redirect = redirect($this->getPreviousUri('rules.create.uri')); $redirect = redirect($this->getPreviousUrl('rules.create.url'));
if (1 === (int) $request->get('create_another')) { if (1 === (int) $request->get('create_another')) {

View File

@@ -71,7 +71,7 @@ class DeleteController extends Controller
$subTitle = (string) trans('firefly.delete_rule', ['title' => $rule->title]); $subTitle = (string) trans('firefly.delete_rule', ['title' => $rule->title]);
// put previous url in session // put previous url in session
$this->rememberPreviousUri('rules.delete.uri'); $this->rememberPreviousUrl('rules.delete.url');
return view('rules.rule.delete', compact('rule', 'subTitle')); return view('rules.rule.delete', compact('rule', 'subTitle'));
} }
@@ -91,7 +91,7 @@ class DeleteController extends Controller
session()->flash('success', (string) trans('firefly.deleted_rule', ['title' => $title])); session()->flash('success', (string) trans('firefly.deleted_rule', ['title' => $title]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('rules.delete.uri')); return redirect($this->getPreviousUrl('rules.delete.url'));
} }
} }

View File

@@ -127,7 +127,7 @@ class EditController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('rules.edit.fromUpdate')) { if (true !== session('rules.edit.fromUpdate')) {
$this->rememberPreviousUri('rules.edit.uri'); $this->rememberPreviousUrl('rules.edit.url');
} }
session()->forget('rules.edit.fromUpdate'); session()->forget('rules.edit.fromUpdate');
@@ -193,7 +193,7 @@ class EditController extends Controller
session()->flash('success', (string) trans('firefly.updated_rule', ['title' => $rule->title])); session()->flash('success', (string) trans('firefly.updated_rule', ['title' => $rule->title]));
app('preferences')->mark(); app('preferences')->mark();
$redirect = redirect($this->getPreviousUri('rules.edit.uri')); $redirect = redirect($this->getPreviousUrl('rules.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
session()->put('rules.edit.fromUpdate', true); session()->put('rules.edit.fromUpdate', true);

View File

@@ -72,7 +72,7 @@ class CreateController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('rule-groups.create.fromStore')) { if (true !== session('rule-groups.create.fromStore')) {
$this->rememberPreviousUri('rule-groups.create.uri'); $this->rememberPreviousUrl('rule-groups.create.url');
} }
session()->forget('rule-groups.create.fromStore'); session()->forget('rule-groups.create.fromStore');
@@ -94,7 +94,7 @@ class CreateController extends Controller
session()->flash('success', (string) trans('firefly.created_new_rule_group', ['title' => $ruleGroup->title])); session()->flash('success', (string) trans('firefly.created_new_rule_group', ['title' => $ruleGroup->title]));
app('preferences')->mark(); app('preferences')->mark();
$redirect = redirect($this->getPreviousUri('rule-groups.create.uri')); $redirect = redirect($this->getPreviousUrl('rule-groups.create.url'));
if (1 === (int) $request->get('create_another')) { if (1 === (int) $request->get('create_another')) {
session()->put('rule-groups.create.fromStore', true); session()->put('rule-groups.create.fromStore', true);

View File

@@ -73,7 +73,7 @@ class DeleteController extends Controller
$subTitle = (string) trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]); $subTitle = (string) trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]);
// put previous url in session // put previous url in session
$this->rememberPreviousUri('rule-groups.delete.uri'); $this->rememberPreviousUrl('rule-groups.delete.url');
return view('rules.rule-group.delete', compact('ruleGroup', 'subTitle')); return view('rules.rule-group.delete', compact('ruleGroup', 'subTitle'));
} }
@@ -97,7 +97,7 @@ class DeleteController extends Controller
session()->flash('success', (string) trans('firefly.deleted_rule_group', ['title' => $title])); session()->flash('success', (string) trans('firefly.deleted_rule_group', ['title' => $title]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('rule-groups.delete.uri')); return redirect($this->getPreviousUrl('rule-groups.delete.url'));
} }
} }

View File

@@ -80,7 +80,7 @@ class EditController extends Controller
]; ];
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('rule-groups.edit.fromUpdate')) { if (true !== session('rule-groups.edit.fromUpdate')) {
$this->rememberPreviousUri('rule-groups.edit.uri'); $this->rememberPreviousUrl('rule-groups.edit.url');
} }
session()->forget('rule-groups.edit.fromUpdate'); session()->forget('rule-groups.edit.fromUpdate');
session()->flash('preFilled', $preFilled); session()->flash('preFilled', $preFilled);
@@ -140,7 +140,7 @@ class EditController extends Controller
session()->flash('success', (string) trans('firefly.updated_rule_group', ['title' => $ruleGroup->title])); session()->flash('success', (string) trans('firefly.updated_rule_group', ['title' => $ruleGroup->title]));
app('preferences')->mark(); app('preferences')->mark();
$redirect = redirect($this->getPreviousUri('rule-groups.edit.uri')); $redirect = redirect($this->getPreviousUrl('rule-groups.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
session()->put('rule-groups.edit.fromUpdate', true); session()->put('rule-groups.edit.fromUpdate', true);

View File

@@ -52,7 +52,7 @@ class TagController extends Controller
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$this->redirectUri = route('tags.index'); $this->redirectUrl = route('tags.index');
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
@@ -90,7 +90,7 @@ class TagController extends Controller
// put previous url in session if not redirect from store (not "create another"). // put previous url in session if not redirect from store (not "create another").
if (true !== session('tags.create.fromStore')) { if (true !== session('tags.create.fromStore')) {
$this->rememberPreviousUri('tags.create.uri'); $this->rememberPreviousUrl('tags.create.url');
} }
session()->forget('tags.create.fromStore'); session()->forget('tags.create.fromStore');
@@ -109,7 +109,7 @@ class TagController extends Controller
$subTitle = (string) trans('breadcrumbs.delete_tag', ['tag' => $tag->tag]); $subTitle = (string) trans('breadcrumbs.delete_tag', ['tag' => $tag->tag]);
// put previous url in session // put previous url in session
$this->rememberPreviousUri('tags.delete.uri'); $this->rememberPreviousUrl('tags.delete.url');
return view('tags.delete', compact('tag', 'subTitle')); return view('tags.delete', compact('tag', 'subTitle'));
} }
@@ -129,7 +129,7 @@ class TagController extends Controller
session()->flash('success', (string) trans('firefly.deleted_tag', ['tag' => $tagName])); session()->flash('success', (string) trans('firefly.deleted_tag', ['tag' => $tagName]));
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('tags.delete.uri')); return redirect($this->getPreviousUrl('tags.delete.url'));
} }
/** /**
@@ -160,7 +160,7 @@ class TagController extends Controller
// put previous url in session if not redirect from store (not "return_to_edit"). // put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('tags.edit.fromUpdate')) { if (true !== session('tags.edit.fromUpdate')) {
$this->rememberPreviousUri('tags.edit.uri'); $this->rememberPreviousUrl('tags.edit.url');
} }
session()->forget('tags.edit.fromUpdate'); session()->forget('tags.edit.fromUpdate');
@@ -333,7 +333,7 @@ class TagController extends Controller
if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) { if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) {
$request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments')); $request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments'));
} }
$redirect = redirect($this->getPreviousUri('tags.create.uri')); $redirect = redirect($this->getPreviousUrl('tags.create.url'));
if (1 === (int) $request->get('create_another')) { if (1 === (int) $request->get('create_another')) {
session()->put('tags.create.fromStore', true); session()->put('tags.create.fromStore', true);
@@ -374,7 +374,7 @@ class TagController extends Controller
if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) { if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) {
$request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments')); $request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments'));
} }
$redirect = redirect($this->getPreviousUri('tags.edit.uri')); $redirect = redirect($this->getPreviousUrl('tags.edit.url'));
if (1 === (int) $request->get('return_to_edit')) { if (1 === (int) $request->get('return_to_edit')) {
session()->put('tags.edit.fromUpdate', true); session()->put('tags.edit.fromUpdate', true);

View File

@@ -76,7 +76,7 @@ class BulkController extends Controller
{ {
$subTitle = (string) trans('firefly.mass_bulk_journals'); $subTitle = (string) trans('firefly.mass_bulk_journals');
$this->rememberPreviousUri('transactions.bulk-edit.uri'); $this->rememberPreviousUrl('transactions.bulk-edit.url');
// make amounts positive. // make amounts positive.
@@ -121,7 +121,7 @@ class BulkController extends Controller
$request->session()->flash('success', (string) trans_choice('firefly.mass_edited_transactions_success', $count)); $request->session()->flash('success', (string) trans_choice('firefly.mass_edited_transactions_success', $count));
// redirect to previous URL: // redirect to previous URL:
return redirect($this->getPreviousUri('transactions.bulk-edit.uri')); return redirect($this->getPreviousUrl('transactions.bulk-edit.url'));
} }
/** /**

View File

@@ -121,7 +121,7 @@ class CreateController extends Controller
$allowedOpposingTypes = config('firefly.allowed_opposing_types'); $allowedOpposingTypes = config('firefly.allowed_opposing_types');
$accountToTypes = config('firefly.account_to_transaction'); $accountToTypes = config('firefly.account_to_transaction');
$defaultCurrency = app('amount')->getDefaultCurrency(); $defaultCurrency = app('amount')->getDefaultCurrency();
$previousUrl = $this->rememberPreviousUri('transactions.create.uri'); $previousUrl = $this->rememberPreviousUrl('transactions.create.url');
$parts = parse_url($previousUrl); $parts = parse_url($previousUrl);
$search = sprintf('?%s', $parts['query'] ?? ''); $search = sprintf('?%s', $parts['query'] ?? '');
$previousUrl = str_replace($search, '', $previousUrl); $previousUrl = str_replace($search, '', $previousUrl);

View File

@@ -85,8 +85,8 @@ class DeleteController extends Controller
$subTitle = (string) trans('firefly.delete_' . $objectType, ['description' => $group->title ?? $journal->description]); $subTitle = (string) trans('firefly.delete_' . $objectType, ['description' => $group->title ?? $journal->description]);
$previous = app('steam')->getSafePreviousUrl(route('index')); $previous = app('steam')->getSafePreviousUrl(route('index'));
// put previous url in session // put previous url in session
Log::debug('Will try to remember previous URI'); Log::debug('Will try to remember previous URL');
$this->rememberPreviousUri('transactions.delete.uri'); $this->rememberPreviousUrl('transactions.delete.url');
return view('transactions.delete', compact('group', 'journal', 'subTitle', 'objectType', 'previous')); return view('transactions.delete', compact('group', 'journal', 'subTitle', 'objectType', 'previous'));
} }
@@ -115,6 +115,6 @@ class DeleteController extends Controller
app('preferences')->mark(); app('preferences')->mark();
return redirect($this->getPreviousUri('transactions.delete.uri')); return redirect($this->getPreviousUrl('transactions.delete.url'));
} }
} }

View File

@@ -80,7 +80,7 @@ class EditController extends Controller
$defaultCurrency = app('amount')->getDefaultCurrency(); $defaultCurrency = app('amount')->getDefaultCurrency();
$cash = $repository->getCashAccount(); $cash = $repository->getCashAccount();
$previousUrl = $this->rememberPreviousUri('transactions.edit.uri'); $previousUrl = $this->rememberPreviousUrl('transactions.edit.url');
$parts = parse_url($previousUrl); $parts = parse_url($previousUrl);
$search = sprintf('?%s', $parts['query'] ?? ''); $search = sprintf('?%s', $parts['query'] ?? '');
$previousUrl = str_replace($search, '', $previousUrl); $previousUrl = str_replace($search, '', $previousUrl);

View File

@@ -76,7 +76,7 @@ class LinkController extends Controller
{ {
$subTitleIcon = 'fa-link'; $subTitleIcon = 'fa-link';
$subTitle = (string) trans('breadcrumbs.delete_journal_link'); $subTitle = (string) trans('breadcrumbs.delete_journal_link');
$this->rememberPreviousUri('journal_links.delete.uri'); $this->rememberPreviousUrl('journal_links.delete.url');
return view('transactions.links.delete', compact('link', 'subTitle', 'subTitleIcon')); return view('transactions.links.delete', compact('link', 'subTitle', 'subTitleIcon'));
} }
@@ -95,7 +95,7 @@ class LinkController extends Controller
session()->flash('success', (string) trans('firefly.deleted_link')); session()->flash('success', (string) trans('firefly.deleted_link'));
app('preferences')->mark(); app('preferences')->mark();
return redirect((string) session('journal_links.delete.uri')); return redirect((string) session('journal_links.delete.url'));
} }
/** /**

View File

@@ -82,7 +82,7 @@ class MassController extends Controller
$subTitle = (string) trans('firefly.mass_delete_journals'); $subTitle = (string) trans('firefly.mass_delete_journals');
// put previous url in session // put previous url in session
$this->rememberPreviousUri('transactions.mass-delete.uri'); $this->rememberPreviousUrl('transactions.mass-delete.url');
return view('transactions.mass.delete', compact('journals', 'subTitle')); return view('transactions.mass.delete', compact('journals', 'subTitle'));
} }
@@ -115,7 +115,7 @@ class MassController extends Controller
session()->flash('success', (string) trans_choice('firefly.mass_deleted_transactions_success', $count)); session()->flash('success', (string) trans_choice('firefly.mass_deleted_transactions_success', $count));
// redirect to previous URL: // redirect to previous URL:
return redirect($this->getPreviousUri('transactions.mass-delete.uri')); return redirect($this->getPreviousUrl('transactions.mass-delete.url'));
} }
/** /**
@@ -151,7 +151,7 @@ class MassController extends Controller
null : app('steam')->positive($journal['foreign_amount']); null : app('steam')->positive($journal['foreign_amount']);
} }
$this->rememberPreviousUri('transactions.mass-edit.uri'); $this->rememberPreviousUrl('transactions.mass-edit.url');
return view('transactions.mass.edit', compact('journals', 'subTitle', 'withdrawalSources', 'depositDestinations', 'budgets')); return view('transactions.mass.edit', compact('journals', 'subTitle', 'withdrawalSources', 'depositDestinations', 'budgets'));
} }
@@ -187,7 +187,7 @@ class MassController extends Controller
session()->flash('success', (string) trans_choice('firefly.mass_edited_transactions_success', $count)); session()->flash('success', (string) trans_choice('firefly.mass_edited_transactions_success', $count));
// redirect to previous URL: // redirect to previous URL:
return redirect($this->getPreviousUri('transactions.mass-edit.uri')); return redirect($this->getPreviousUrl('transactions.mass-edit.url'));
} }
/** /**

View File

@@ -60,8 +60,6 @@ class Kernel extends HttpKernel
/** /**
* The application's global HTTP middleware stack. * The application's global HTTP middleware stack.
* *
* These middleware are run during every request to your application.
*
* @var array * @var array
*/ */
protected $middleware protected $middleware

View File

@@ -53,7 +53,7 @@ class Installer
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
Log::debug(sprintf('Installer middleware for URI %s', $request->url())); Log::debug(sprintf('Installer middleware for URL %s', $request->url()));
// ignore installer in test environment. // ignore installer in test environment.
if ('testing' === config('app.env')) { if ('testing' === config('app.env')) {
return $next($request); return $next($request);

View File

@@ -79,8 +79,8 @@ class UpdateRequest implements UpdateRequestInterface
'message' => (string) trans('firefly.unknown_error'), 'message' => (string) trans('firefly.unknown_error'),
]; ];
$uri = config('firefly.update_endpoint'); $url = config('firefly.update_endpoint');
Log::debug(sprintf('Going to call %s', $uri)); Log::debug(sprintf('Going to call %s', $url));
try { try {
$client = new Client; $client = new Client;
$options = [ $options = [
@@ -89,7 +89,7 @@ class UpdateRequest implements UpdateRequestInterface
], ],
'timeout' => 3.1415, 'timeout' => 3.1415,
]; ];
$res = $client->request('GET', $uri, $options); $res = $client->request('GET', $url, $options);
} catch (GuzzleException $e) { } catch (GuzzleException $e) {
Log::error('Ran into Guzzle error.'); Log::error('Ran into Guzzle error.');
Log::error($e->getMessage()); Log::error($e->getMessage());

View File

@@ -48,7 +48,7 @@ class PwndVerifierV2 implements Verifier
$hash = sha1($password); $hash = sha1($password);
$prefix = substr($hash, 0, 5); $prefix = substr($hash, 0, 5);
$rest = substr($hash, 5); $rest = substr($hash, 5);
$uri = sprintf('https://api.pwnedpasswords.com/range/%s', $prefix); $url = sprintf('https://api.pwnedpasswords.com/range/%s', $prefix);
$opt = [ $opt = [
'headers' => [ 'headers' => [
'User-Agent' => sprintf('Firefly III v%s', config('firefly.version')), 'User-Agent' => sprintf('Firefly III v%s', config('firefly.version')),
@@ -61,7 +61,7 @@ class PwndVerifierV2 implements Verifier
try { try {
$client = new Client(); $client = new Client();
$res = $client->request('GET', $uri, $opt); $res = $client->request('GET', $url, $opt);
} catch (GuzzleException|RequestException $e) { } catch (GuzzleException|RequestException $e) {
Log::error(sprintf('Could not verify password security: %s', $e->getMessage())); Log::error(sprintf('Could not verify password security: %s', $e->getMessage()));

View File

@@ -157,7 +157,7 @@ trait RequestInformation
} }
/** /**
* Parses attributes from URI. * Parses attributes from URL
* *
* @param array $attributes * @param array $attributes
* *

View File

@@ -43,15 +43,15 @@ trait UserNavigation
/** /**
* Functionality:. * Functionality:.
* *
* - If the $identifier contains the word "delete" then a remembered uri with the text "/show/" in it will not be returned but instead the index (/) * - If the $identifier contains the word "delete" then a remembered url with the text "/show/" in it will not be returned but instead the index (/)
* will be returned. * will be returned.
* - If the remembered uri contains "jscript/" the remembered uri will not be returned but instead the index (/) will be returned. * - If the remembered url contains "jscript/" the remembered url will not be returned but instead the index (/) will be returned.
* *
* @param string $identifier * @param string $identifier
* *
* @return string * @return string
*/ */
final protected function getPreviousUri(string $identifier): string final protected function getPreviousUrl(string $identifier): string
{ {
Log::debug(sprintf('Trying to retrieve URL stored under "%s"', $identifier)); Log::debug(sprintf('Trying to retrieve URL stored under "%s"', $identifier));
$url = (string) session($identifier); $url = (string) session($identifier);
@@ -161,7 +161,7 @@ trait UserNavigation
* *
* @return string|null * @return string|null
*/ */
final protected function rememberPreviousUri(string $identifier): ?string final protected function rememberPreviousUrl(string $identifier): ?string
{ {
$return = app('steam')->getSafePreviousUrl(); $return = app('steam')->getSafePreviousUrl();
session()->put($identifier, $return); session()->put($identifier, $return);

View File

@@ -18,8 +18,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: overviewUri, transactionsUri, indexUri,accounting */
var balanceDifference = 0; var balanceDifference = 0;
var difference = 0; var difference = 0;
var selectedAmount = 0; var selectedAmount = 0;
@@ -142,10 +140,10 @@ function storeReconcile() {
journals: ids, journals: ids,
cleared: cleared, cleared: cleared,
}; };
var uri = overviewUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); var url = overviewUrl.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val());
$.getJSON(uri, variables).done(function (data) { $.getJSON(url, variables).done(function (data) {
$('#defaultModal').empty().html(data.html).modal('show'); $('#defaultModal').empty().html(data.html).modal('show');
}); });
} }
@@ -197,11 +195,11 @@ function getTransactionsForRange() {
console.log('in getTransactionsForRange()'); console.log('in getTransactionsForRange()');
// clear out the box: // clear out the box:
$('#transactions_holder').empty().append($('<p>').addClass('text-center').html('<span class="fa fa-fw fa-spin fa-spinner"></span>')); $('#transactions_holder').empty().append($('<p>').addClass('text-center').html('<span class="fa fa-fw fa-spin fa-spinner"></span>'));
var uri = transactionsUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); var url = transactionsUrl.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val());
var index = indexUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); var index = indexUrl.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val());
window.history.pushState('object or string', "Reconcile account", index); window.history.pushState('object or string', "Reconcile account", index);
$.getJSON(uri).done(placeTransactions).catch(exceptionHandling) $.getJSON(url).done(placeTransactions).catch(exceptionHandling)
} }
function exceptionHandling() { function exceptionHandling() {
$('#transactions_holder').empty().append($('<p>').addClass('text-center lead').html(selectRangeAndBalance)); $('#transactions_holder').empty().append($('<p>').addClass('text-center lead').html(selectRangeAndBalance));

View File

@@ -18,8 +18,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: chartUri, incomeCategoryUri, showAll, expenseCategoryUri, expenseBudgetUri, token */
var fixHelper = function (e, tr) { var fixHelper = function (e, tr) {
"use strict"; "use strict";
var $originals = tr.children(); var $originals = tr.children();
@@ -33,12 +31,12 @@ var fixHelper = function (e, tr) {
$(function () { $(function () {
"use strict"; "use strict";
//lineChart(chartUri, 'overview-chart'); //lineChart(chartUrl, 'overview-chart');
lineNoStartZeroChart(chartUri, 'overview-chart'); lineNoStartZeroChart(chartUrl, 'overview-chart');
if (!showAll) { if (!showAll) {
multiCurrencyPieChart(incomeCategoryUri, 'account-cat-in'); multiCurrencyPieChart(incomeCategoryUrl, 'account-cat-in');
multiCurrencyPieChart(expenseCategoryUri, 'account-cat-out'); multiCurrencyPieChart(expenseCategoryUrl, 'account-cat-out');
multiCurrencyPieChart(expenseBudgetUri, 'account-budget-out'); multiCurrencyPieChart(expenseBudgetUrl, 'account-budget-out');
} }
// sortable! // sortable!

View File

@@ -18,8 +18,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: updateCheckUri */
$(function () { $(function () {
"use strict"; "use strict";

View File

@@ -18,11 +18,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: billUri */
$(function () { $(function () {
"use strict"; "use strict";
configAccounting(billCurrencySymbol); configAccounting(billCurrencySymbol);
columnChart(billUri, 'bill-overview'); columnChart(billUrl, 'bill-overview');
} }
); );

View File

@@ -44,8 +44,8 @@ $(function () {
$('.selectPeriod').change(function (e) { $('.selectPeriod').change(function (e) {
var selected = $(e.currentTarget); var selected = $(e.currentTarget);
if (selected.find(":selected").val() !== "x") { if (selected.find(":selected").val() !== "x") {
var newUri = budgetIndexUri.replace("START", selected.find(":selected").data('start')).replace('END', selected.find(":selected").data('end')); var newUrl = budgetIndexUrl.replace("START", selected.find(":selected").data('start')).replace('END', selected.find(":selected").data('end'));
window.location.assign(newUri); window.location.assign(newUrl);
} }
}); });
@@ -85,7 +85,7 @@ function updateBudgetedAmount(e) {
var currencyId = parseInt(input.data('currency')); var currencyId = parseInt(input.data('currency'));
input.prop('disabled', true); input.prop('disabled', true);
if (0 === budgetLimitId) { if (0 === budgetLimitId) {
$.post(storeBudgetLimitUri, { $.post(storeBudgetLimitUrl, {
_token: token, _token: token,
budget_id: budgetId, budget_id: budgetId,
transaction_currency_id: currencyId, transaction_currency_id: currencyId,
@@ -108,7 +108,7 @@ function updateBudgetedAmount(e) {
console.error('I failed :('); console.error('I failed :(');
}); });
} else { } else {
$.post(updateBudgetLimitUri.replace('REPLACEME', budgetLimitId.toString()), { $.post(updateBudgetLimitUrl.replace('REPLACEME', budgetLimitId.toString()), {
_token: token, _token: token,
amount: input.val(), amount: input.val(),
}).done(function (data) { }).done(function (data) {
@@ -134,7 +134,7 @@ function updateTotalBudgetedAmount(currencyId) {
}); });
// get new amount: // get new amount:
$.get(totalBudgetedUri.replace('REPLACEME', currencyId)).done(function (data) { $.get(totalBudgetedUrl.replace('REPLACEME', currencyId)).done(function (data) {
// set thing: // set thing:
$('span.budgeted_amount[data-currency="' + currencyId + '"]') $('span.budgeted_amount[data-currency="' + currencyId + '"]')
.html(data.budgeted_formatted) .html(data.budgeted_formatted)
@@ -201,7 +201,7 @@ function sortStop(event, ui) {
function createBudgetLimit(e) { function createBudgetLimit(e) {
var button = $(e.currentTarget); var button = $(e.currentTarget);
var budgetId = button.data('id'); var budgetId = button.data('id');
$('#defaultModal').empty().load(createBudgetLimitUri.replace('REPLACEME', budgetId.toString()), function () { $('#defaultModal').empty().load(createBudgetLimitUrl.replace('REPLACEME', budgetId.toString()), function () {
$('#defaultModal').modal('show'); $('#defaultModal').modal('show');
}); });
return false; return false;
@@ -220,7 +220,7 @@ function deleteBudgetLimit(e) {
} }
function createAltAvailableBudget(e) { function createAltAvailableBudget(e) {
$('#defaultModal').empty().load(createAltAvailableBudgetUri, function () { $('#defaultModal').empty().load(createAltAvailableBudgetUrl, function () {
$('#defaultModal').modal('show'); $('#defaultModal').modal('show');
}); });
return false; return false;
@@ -230,13 +230,13 @@ function updateAvailableBudget(e) {
var button = $(e.currentTarget); var button = $(e.currentTarget);
var abId = parseInt(button.data('id')); var abId = parseInt(button.data('id'));
if (0 === abId) { if (0 === abId) {
$('#defaultModal').empty().load(createAvailableBudgetUri, function () { $('#defaultModal').empty().load(createAvailableBudgetUrl, function () {
$('#defaultModal').modal('show'); $('#defaultModal').modal('show');
}); });
} }
if (abId > 0) { if (abId > 0) {
// edit URL. // edit URL.
$('#defaultModal').empty().load(editAvailableBudgetUri.replace('REPLACEME', abId), function () { $('#defaultModal').empty().load(editAvailableBudgetUrl.replace('REPLACEME', abId), function () {
$('#defaultModal').modal('show'); $('#defaultModal').modal('show');
}); });
} }

View File

@@ -18,20 +18,18 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: budgetChartUri, expenseCategoryUri, expenseAssetUri, expenseExpenseUri, budgetLimitID */
$(function () { $(function () {
"use strict"; "use strict";
if (budgetLimitID > 0) { if (budgetLimitID > 0) {
otherCurrencyLineChart(budgetChartUri, 'budgetOverview', currencySymbol); otherCurrencyLineChart(budgetChartUrl, 'budgetOverview', currencySymbol);
multiCurrencyPieChart(expenseCategoryUri, 'budget-cat-out'); multiCurrencyPieChart(expenseCategoryUrl, 'budget-cat-out');
multiCurrencyPieChart(expenseAssetUri, 'budget-asset-out'); multiCurrencyPieChart(expenseAssetUrl, 'budget-asset-out');
multiCurrencyPieChart(expenseExpenseUri, 'budget-expense-out'); multiCurrencyPieChart(expenseExpenseUrl, 'budget-expense-out');
} }
if (budgetLimitID === 0) { if (budgetLimitID === 0) {
columnChart(budgetChartUri, 'budgetOverview'); columnChart(budgetChartUrl, 'budgetOverview');
multiCurrencyPieChart(expenseCategoryUri, 'budget-cat-out'); multiCurrencyPieChart(expenseCategoryUrl, 'budget-cat-out');
multiCurrencyPieChart(expenseAssetUri, 'budget-asset-out'); multiCurrencyPieChart(expenseAssetUrl, 'budget-asset-out');
multiCurrencyPieChart(expenseExpenseUri, 'budget-expense-out'); multiCurrencyPieChart(expenseExpenseUrl, 'budget-expense-out');
} }
}); });

View File

@@ -76,25 +76,25 @@ function colorizeData(data) {
/** /**
* Function to draw a line chart: * Function to draw a line chart:
* @param URI * @param URL
* @param container * @param container
*/ */
function lineChart(URI, container) { function lineChart(URL, container) {
"use strict"; "use strict";
var colorData = true; var colorData = true;
var options = $.extend(true, {}, defaultChartOptions); var options = $.extend(true, {}, defaultChartOptions);
var chartType = 'line'; var chartType = 'line';
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* Function to draw a line chart that doesn't start at ZERO. * Function to draw a line chart that doesn't start at ZERO.
* @param URI * @param URL
* @param container * @param container
*/ */
function lineNoStartZeroChart(URI, container) { function lineNoStartZeroChart(URL, container) {
"use strict"; "use strict";
var colorData = true; var colorData = true;
@@ -102,16 +102,16 @@ function lineNoStartZeroChart(URI, container) {
var chartType = 'line'; var chartType = 'line';
options.scales.yAxes[0].ticks.beginAtZero = false; options.scales.yAxes[0].ticks.beginAtZero = false;
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* Overrules the currency the line chart is drawn in. * Overrules the currency the line chart is drawn in.
* *
* @param URI * @param URL
* @param container * @param container
*/ */
function otherCurrencyLineChart(URI, container, currencySymbol) { function otherCurrencyLineChart(URL, container, currencySymbol) {
"use strict"; "use strict";
var colorData = true; var colorData = true;
@@ -153,16 +153,16 @@ function otherCurrencyLineChart(URI, container, currencySymbol) {
console.log(options); console.log(options);
var chartType = 'line'; var chartType = 'line';
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* Function to draw a chart with double Y Axes and stacked columns. * Function to draw a chart with double Y Axes and stacked columns.
* *
* @param URI * @param URL
* @param container * @param container
*/ */
function doubleYChart(URI, container) { function doubleYChart(URL, container) {
"use strict"; "use strict";
var colorData = true; var colorData = true;
@@ -203,16 +203,16 @@ function doubleYChart(URI, container) {
var chartType = 'bar'; var chartType = 'bar';
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* Function to draw a chart with double Y Axes and non stacked columns. * Function to draw a chart with double Y Axes and non stacked columns.
* *
* @param URI * @param URL
* @param container * @param container
*/ */
function doubleYNonStackedChart(URI, container) { function doubleYNonStackedChart(URL, container) {
"use strict"; "use strict";
var colorData = true; var colorData = true;
@@ -250,47 +250,47 @@ function doubleYNonStackedChart(URI, container) {
]; ];
var chartType = 'bar'; var chartType = 'bar';
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* *
* @param URI * @param URL
* @param container * @param container
*/ */
function columnChart(URI, container) { function columnChart(URL, container) {
"use strict"; "use strict";
var colorData = true; var colorData = true;
var options = $.extend(true, {}, defaultChartOptions); var options = $.extend(true, {}, defaultChartOptions);
var chartType = 'bar'; var chartType = 'bar';
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* *
* @param URI * @param URL
* @param container * @param container
*/ */
function columnChartCustomColours(URI, container) { function columnChartCustomColours(URL, container) {
"use strict"; "use strict";
var colorData = false; var colorData = false;
var options = $.extend(true, {}, defaultChartOptions); var options = $.extend(true, {}, defaultChartOptions);
var chartType = 'bar'; var chartType = 'bar';
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* *
* @param URI * @param URL
* @param container * @param container
*/ */
function stackedColumnChart(URI, container) { function stackedColumnChart(URL, container) {
"use strict"; "use strict";
var colorData = true; var colorData = true;
@@ -302,60 +302,60 @@ function stackedColumnChart(URI, container) {
var chartType = 'bar'; var chartType = 'bar';
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* *
* @param URI * @param URL
* @param container * @param container
*/ */
function pieChart(URI, container) { function pieChart(URL, container) {
"use strict"; "use strict";
var colorData = false; var colorData = false;
var options = $.extend(true, {}, defaultPieOptions); var options = $.extend(true, {}, defaultPieOptions);
var chartType = 'pie'; var chartType = 'pie';
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* *
* @param URI * @param URL
* @param container * @param container
*/ */
function multiCurrencyPieChart(URI, container) { function multiCurrencyPieChart(URL, container) {
"use strict"; "use strict";
var colorData = false; var colorData = false;
var options = $.extend(true, {}, pieOptionsWithCurrency); var options = $.extend(true, {}, pieOptionsWithCurrency);
var chartType = 'pie'; var chartType = 'pie';
drawAChart(URI, container, chartType, options, colorData); drawAChart(URL, container, chartType, options, colorData);
} }
/** /**
* @param URI * @param URL
* @param container * @param container
* @param chartType * @param chartType
* @param options * @param options
* @param colorData * @param colorData
* @param today * @param today
*/ */
function drawAChart(URI, container, chartType, options, colorData) { function drawAChart(URL, container, chartType, options, colorData) {
var containerObj = $('#' + container); var containerObj = $('#' + container);
if (containerObj.length === 0) { if (containerObj.length === 0) {
return; return;
} }
$.getJSON(URI).done(function (data) { $.getJSON(URL).done(function (data) {
containerObj.removeClass('general-chart-error'); containerObj.removeClass('general-chart-error');
// if result is empty array, or the labels array is empty, show error. // if result is empty array, or the labels array is empty, show error.
// console.log(URI); // console.log(URL);
// console.log(data.length); // console.log(data.length);
// console.log(typeof data.labels); // console.log(typeof data.labels);
// console.log(data.labels.length); // console.log(data.labels.length);

View File

@@ -69,7 +69,7 @@ $(function () {
function (start, end, label) { function (start, end, label) {
// send post. // send post.
$.post(dateRangeMeta.uri, { $.post(dateRangeMeta.url, {
start: start.format('YYYY-MM-DD'), start: start.format('YYYY-MM-DD'),
end: end.format('YYYY-MM-DD'), end: end.format('YYYY-MM-DD'),
label: label, label: label,

View File

@@ -18,7 +18,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: accountFrontpageUri, today, piggyInfoUri, token, billCount, accountExpenseUri, accountRevenueUri */
$(function () { $(function () {
"use strict"; "use strict";
@@ -29,15 +28,15 @@ $(function () {
function drawChart() { function drawChart() {
"use strict"; "use strict";
lineChart(accountFrontpageUri, 'accounts-chart'); lineChart(accountFrontpageUrl, 'accounts-chart');
if (billCount > 0) { if (billCount > 0) {
multiCurrencyPieChart('chart/bill/frontpage', 'bills-chart'); multiCurrencyPieChart('chart/bill/frontpage', 'bills-chart');
} }
stackedColumnChart('chart/budget/frontpage', 'budgets-chart'); stackedColumnChart('chart/budget/frontpage', 'budgets-chart');
columnChart('chart/category/frontpage', 'categories-chart'); columnChart('chart/category/frontpage', 'categories-chart');
columnChart(accountExpenseUri, 'expense-accounts-chart'); columnChart(accountExpenseUrl, 'expense-accounts-chart');
columnChart(accountRevenueUri, 'revenue-accounts-chart'); columnChart(accountRevenueUrl, 'revenue-accounts-chart');
// get balance box: // get balance box:
getBalanceBox(); getBalanceBox();
@@ -53,7 +52,7 @@ function drawChart() {
* *
*/ */
function getPiggyBanks() { function getPiggyBanks() {
$.getJSON(piggyInfoUri).done(function (data) { $.getJSON(piggyInfoUrl).done(function (data) {
if (data.html.length > 0) { if (data.html.length > 0) {
$('#piggy_bank_overview').html(data.html); $('#piggy_bank_overview').html(data.html);
} }

View File

@@ -34,7 +34,7 @@ function startRunningCommands() {
} }
function runCommand(index) { function runCommand(index) {
$.post(runCommandUri, {_token: token, index: index}).done(function (data) { $.post(runCommandUrl, {_token: token, index: index}).done(function (data) {
if (data.error === false) { if (data.error === false) {
// increase index // increase index
index++; index++;
@@ -60,7 +60,7 @@ function runCommand(index) {
function startMigration() { function startMigration() {
$.post(migrateUri, {_token: token}).done(function (data) { $.post(migrateUrl, {_token: token}).done(function (data) {
if (data.error === false) { if (data.error === false) {
// move to decrypt routine. // move to decrypt routine.
startDecryption(); startDecryption();
@@ -75,7 +75,7 @@ function startMigration() {
function startDecryption() { function startDecryption() {
$('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Setting up DB #2...'); $('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Setting up DB #2...');
$.post(decryptUri, {_token: token}).done(function (data) { $.post(decryptUrl, {_token: token}).done(function (data) {
if (data.error === false) { if (data.error === false) {
// move to decrypt routine. // move to decrypt routine.
startPassport(); startPassport();
@@ -93,7 +93,7 @@ function startDecryption() {
*/ */
function startPassport() { function startPassport() {
$('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Setting up OAuth2...'); $('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Setting up OAuth2...');
$.post(keysUri, {_token: token}).done(function (data) { $.post(keysUrl, {_token: token}).done(function (data) {
if (data.error === false) { if (data.error === false) {
startUpgrade(); startUpgrade();
} else { } else {
@@ -110,7 +110,7 @@ function startPassport() {
*/ */
function startUpgrade() { function startUpgrade() {
$('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Upgrading database...'); $('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Upgrading database...');
$.post(upgradeUri, {_token: token}).done(function (data) { $.post(upgradeUrl, {_token: token}).done(function (data) {
if (data.error === false) { if (data.error === false) {
startVerify(); startVerify();
} else { } else {
@@ -126,7 +126,7 @@ function startUpgrade() {
*/ */
function startVerify() { function startVerify() {
$('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Verify database integrity...'); $('#status-box').html('<span class="fa fa-spin fa-spinner"></span> Verify database integrity...');
$.post(verifyUri, {_token: token}).done(function (data) { $.post(verifyUrl, {_token: token}).done(function (data) {
if (data.error === false) { if (data.error === false) {
completeDone(); completeDone();
} else { } else {
@@ -143,7 +143,7 @@ function startVerify() {
function completeDone() { function completeDone() {
$('#status-box').html('<span class="fa fa-thumbs-up"></span> Installation + upgrade complete! Wait to be redirected...'); $('#status-box').html('<span class="fa fa-thumbs-up"></span> Installation + upgrade complete! Wait to be redirected...');
setTimeout(function () { setTimeout(function () {
window.location = homeUri; window.location = homeUrl;
}, 3000); }, 3000);
} }

View File

@@ -18,11 +18,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: nextLabel, prevLabel,skipLabel,doneLabel routeForTour, token, routeStepsUri, routeForFinishedTour, forceDemoOff */
$(function () { $(function () {
"use strict"; "use strict";
if (!forceDemoOff) { if (!forceDemoOff) {
$.getJSON(routeStepsUri).done(setupIntro) $.getJSON(routeStepsUrl).done(setupIntro)
} }
}); });

View File

@@ -65,19 +65,19 @@ $(document).ready(function () {
function showRepCalendar() { function showRepCalendar() {
// pre-append URL with repetition info: // pre-append URL with repetition info:
var newEventsUri = eventsUri + '?type=' + $('#ffInput_repetition_type').val(); var newEventsUrl = eventsUrl + '?type=' + $('#ffInput_repetition_type').val();
newEventsUri += '&skip=' + $('#ffInput_skip').val(); newEventsUrl += '&skip=' + $('#ffInput_skip').val();
newEventsUri += '&ends=' + $('#ffInput_repetition_end').val(); newEventsUrl += '&ends=' + $('#ffInput_repetition_end').val();
newEventsUri += '&end_date=' + $('#ffInput_repeat_until').val(); newEventsUrl += '&end_date=' + $('#ffInput_repeat_until').val();
newEventsUri += '&reps=' + $('#ffInput_repetitions').val(); newEventsUrl += '&reps=' + $('#ffInput_repetitions').val();
newEventsUri += '&first_date=' + $('#ffInput_first_date').val(); newEventsUrl += '&first_date=' + $('#ffInput_first_date').val();
newEventsUri += '&weekend=' + $('#ffInput_weekend').val(); newEventsUrl += '&weekend=' + $('#ffInput_weekend').val();
// remove all event sources from calendar: // remove all event sources from calendar:
calendar.fullCalendar('removeEventSources'); calendar.fullCalendar('removeEventSources');
// add a new one: // add a new one:
calendar.fullCalendar('addEventSource', newEventsUri); calendar.fullCalendar('addEventSource', newEventsUrl);
$('#calendarModal').modal('show'); $('#calendarModal').modal('show');
return false; return false;
@@ -116,7 +116,7 @@ function respondToFirstDateChange() {
preSelected = select.val(); preSelected = select.val();
} }
$.getJSON(suggestUri, {date: date,pre_select: preSelected}).fail(function () { $.getJSON(suggestUrl, {date: date,pre_select: preSelected}).fail(function () {
console.error('Could not load repetition suggestions'); console.error('Could not load repetition suggestions');
alert('Could not load repetition suggestions'); alert('Could not load repetition suggestions');
}).done(parseRepetitionSuggestions); }).done(parseRepetitionSuggestions);

View File

@@ -65,19 +65,19 @@ $(document).ready(function () {
function showRepCalendar() { function showRepCalendar() {
// pre-append URL with repetition info: // pre-append URL with repetition info:
var newEventsUri = eventsUri + '?type=' + $('#ffInput_repetition_type').val(); var newEventsUrl = eventsUrl + '?type=' + $('#ffInput_repetition_type').val();
newEventsUri += '&skip=' + $('#ffInput_skip').val(); newEventsUrl += '&skip=' + $('#ffInput_skip').val();
newEventsUri += '&ends=' + $('#ffInput_repetition_end').val(); newEventsUrl += '&ends=' + $('#ffInput_repetition_end').val();
newEventsUri += '&end_date=' + $('#ffInput_repeat_until').val(); newEventsUrl += '&end_date=' + $('#ffInput_repeat_until').val();
newEventsUri += '&reps=' + $('#ffInput_repetitions').val(); newEventsUrl += '&reps=' + $('#ffInput_repetitions').val();
newEventsUri += '&first_date=' + $('#ffInput_first_date').val(); newEventsUrl += '&first_date=' + $('#ffInput_first_date').val();
newEventsUri += '&weekend=' + $('#ffInput_weekend').val(); newEventsUrl += '&weekend=' + $('#ffInput_weekend').val();
// remove all event sources from calendar: // remove all event sources from calendar:
calendar.fullCalendar('removeEventSources'); calendar.fullCalendar('removeEventSources');
// add a new one: // add a new one:
calendar.fullCalendar('addEventSource', newEventsUri); calendar.fullCalendar('addEventSource', newEventsUrl);
$('#calendarModal').modal('show'); $('#calendarModal').modal('show');
return false; return false;
@@ -117,7 +117,7 @@ function respondToFirstDateChange() {
preSelected = select.val(); preSelected = select.val();
} }
$.getJSON(suggestUri, {date: date, pre_select: preSelected, past: true}).fail(function () { $.getJSON(suggestUrl, {date: date, pre_select: preSelected, past: true}).fail(function () {
console.error('Could not load repetition suggestions'); console.error('Could not load repetition suggestions');
alert('Could not load repetition suggestions'); alert('Could not load repetition suggestions');
}).done(parseRepetitionSuggestions); }).done(parseRepetitionSuggestions);

View File

@@ -18,16 +18,16 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: startDate, endDate, accountIds */ /** global: startDate, endDate, accountIds */
function loadAjaxPartial(holder, uri) { function loadAjaxPartial(holder, url) {
"use strict"; "use strict";
$.get(uri).done(function (data) { $.get(url).done(function (data) {
displayAjaxPartial(data, holder); displayAjaxPartial(data, holder);
}).fail(function () { }).fail(function () {
failAjaxPartial(uri, holder); failAjaxPartial(url, holder);
}); });
} }
function failAjaxPartial(uri, holder) { function failAjaxPartial(url, holder) {
"use strict"; "use strict";
var holderObject = $('#' + holder); var holderObject = $('#' + holder);
holderObject.parent().find('.overlay').remove(); holderObject.parent().find('.overlay').remove();

View File

@@ -22,12 +22,12 @@ $(function () {
"use strict"; "use strict";
drawChart(); drawChart();
loadAjaxPartial('accountsHolder', accountsUri); loadAjaxPartial('accountsHolder', accountsUrl);
loadAjaxPartial('budgetsHolder', budgetsUri); loadAjaxPartial('budgetsHolder', budgetsUrl);
loadAjaxPartial('accountPerbudgetHolder', accountPerBudgetUri); loadAjaxPartial('accountPerbudgetHolder', accountPerBudgetUrl);
loadAjaxPartial('topExpensesHolder', topExpensesUri); loadAjaxPartial('topExpensesHolder', topExpensesUrl);
loadAjaxPartial('avgExpensesHolder', avgExpensesUri); loadAjaxPartial('avgExpensesHolder', avgExpensesUrl);
}); });
@@ -42,15 +42,15 @@ function drawChart() {
}); });
// draw pie chart of income, depending on "show other transactions too": // draw pie chart of income, depending on "show other transactions too":
redrawPieChart('budgets-out-pie-chart', budgetExpenseUri); redrawPieChart('budgets-out-pie-chart', budgetExpenseUrl);
redrawPieChart('categories-out-pie-chart', categoryExpenseUri); redrawPieChart('categories-out-pie-chart', categoryExpenseUrl);
redrawPieChart('source-accounts-pie-chart', sourceExpenseUri); redrawPieChart('source-accounts-pie-chart', sourceExpenseUrl);
redrawPieChart('dest-accounts-pie-chart', destinationExpenseUri); redrawPieChart('dest-accounts-pie-chart', destinationExpenseUrl);
} }
function redrawPieChart(container, uri) { function redrawPieChart(container, url) {
"use strict"; "use strict";
multiCurrencyPieChart(uri, container); multiCurrencyPieChart(url, container);
} }

View File

@@ -20,26 +20,26 @@
$(function () { $(function () {
"use strict"; "use strict";
loadAjaxPartial('accountsHolder', accountsUri); loadAjaxPartial('accountsHolder', accountsUrl);
loadAjaxPartial('categoriesHolder', categoriesUri); loadAjaxPartial('categoriesHolder', categoriesUrl);
loadAjaxPartial('accountPerCategoryHolder', accountPerCategoryUri); loadAjaxPartial('accountPerCategoryHolder', accountPerCategoryUrl);
$.each($('.main_category_canvas'), function (i, v) { $.each($('.main_category_canvas'), function (i, v) {
var canvas = $(v); var canvas = $(v);
columnChart(canvas.data('url'), canvas.attr('id')); columnChart(canvas.data('url'), canvas.attr('id'));
}); });
multiCurrencyPieChart(categoryOutUri, 'category-out-pie-chart'); multiCurrencyPieChart(categoryOutUrl, 'category-out-pie-chart');
multiCurrencyPieChart(categoryInUri, 'category-in-pie-chart'); multiCurrencyPieChart(categoryInUrl, 'category-in-pie-chart');
multiCurrencyPieChart(budgetsOutUri, 'budgets-out-pie-chart'); multiCurrencyPieChart(budgetsOutUrl, 'budgets-out-pie-chart');
multiCurrencyPieChart(sourceOutUri, 'source-out-pie-chart'); multiCurrencyPieChart(sourceOutUrl, 'source-out-pie-chart');
multiCurrencyPieChart(sourceInUri, 'source-in-pie-chart'); multiCurrencyPieChart(sourceInUrl, 'source-in-pie-chart');
multiCurrencyPieChart(destOutUri, 'dest-out-pie-chart'); multiCurrencyPieChart(destOutUrl, 'dest-out-pie-chart');
multiCurrencyPieChart(destInUri, 'dest-in-pie-chart'); multiCurrencyPieChart(destInUrl, 'dest-in-pie-chart');
loadAjaxPartial('topExpensesHolder', topExpensesUri); loadAjaxPartial('topExpensesHolder', topExpensesUrl);
loadAjaxPartial('avgExpensesHolder', avgExpensesUri); loadAjaxPartial('avgExpensesHolder', avgExpensesUrl);
loadAjaxPartial('topIncomeHolder', topIncomeUri); loadAjaxPartial('topIncomeHolder', topIncomeUrl);
loadAjaxPartial('avgIncomeHolder', avgIncomeUri); loadAjaxPartial('avgIncomeHolder', avgIncomeUrl);
}); });

View File

@@ -18,19 +18,17 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: accountReportUri, incomeReportUri, expenseReportUri, incExpReportUri, startDate, endDate, accountIds */
$(function () { $(function () {
"use strict"; "use strict";
// load the account report, which this report shows: // load the account report, which this report shows:
loadAjaxPartial('accountReport', accountReportUri); loadAjaxPartial('accountReport', accountReportUrl);
// load income and expense reports: // load income and expense reports:
loadAjaxPartial('incomeReport', incomeReportUri); loadAjaxPartial('incomeReport', incomeReportUrl);
loadAjaxPartial('expenseReport', expenseReportUri); loadAjaxPartial('expenseReport', expenseReportUrl);
loadAjaxPartial('incomeVsExpenseReport', incExpReportUri); loadAjaxPartial('incomeVsExpenseReport', incExpReportUrl);
loadAjaxPartial('billReport', billReportUri); loadAjaxPartial('billReport', billReportUrl);
}); });

View File

@@ -18,14 +18,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: categoryReportUri, budgetReportUri, balanceReportUri, accountChartUri */
$(function () { $(function () {
"use strict"; "use strict";
lineChart(accountChartUri, 'account-balances-chart'); lineChart(accountChartUrl, 'account-balances-chart');
loadAjaxPartial('categoryReport', categoryReportUri); loadAjaxPartial('categoryReport', categoryReportUrl);
loadAjaxPartial('budgetReport', budgetReportUri); loadAjaxPartial('budgetReport', budgetReportUrl);
loadAjaxPartial('balanceReport', balanceReportUri); loadAjaxPartial('balanceReport', balanceReportUrl);
}); });

View File

@@ -18,15 +18,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: budgetPeriodReportUri, categoryExpenseUri, categoryIncomeUri, netWorthUri, opChartUri */
$(function () { $(function () {
"use strict"; "use strict";
lineChart(netWorthUri, 'net-worth'); lineChart(netWorthUrl, 'net-worth');
columnChartCustomColours(opChartUri, 'income-expenses-chart'); columnChartCustomColours(opChartUrl, 'income-expenses-chart');
loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUrl);
loadAjaxPartial('categoryExpense', categoryExpenseUri); loadAjaxPartial('categoryExpense', categoryExpenseUrl);
loadAjaxPartial('categoryIncome', categoryIncomeUri); loadAjaxPartial('categoryIncome', categoryIncomeUrl);
}); });

View File

@@ -18,15 +18,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: budgetPeriodReportUri, categoryExpenseUri, categoryIncomeUri, netWorthUri, opChartUri */
$(function () { $(function () {
"use strict"; "use strict";
lineChart(netWorthUri, 'net-worth'); lineChart(netWorthUrl, 'net-worth');
columnChartCustomColours(opChartUri, 'income-expenses-chart'); columnChartCustomColours(opChartUrl, 'income-expenses-chart');
loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUrl);
loadAjaxPartial('categoryExpense', categoryExpenseUri); loadAjaxPartial('categoryExpense', categoryExpenseUrl);
loadAjaxPartial('categoryIncome', categoryIncomeUri); loadAjaxPartial('categoryIncome', categoryIncomeUrl);
}); });

View File

@@ -20,24 +20,24 @@
$(function () { $(function () {
"use strict"; "use strict";
loadAjaxPartial('opsAccounts', opsAccountsUri); loadAjaxPartial('opsAccounts', opsAccountsUrl);
loadAjaxPartial('opsAccountsAsset', opsAccountsAssetUri); loadAjaxPartial('opsAccountsAsset', opsAccountsAssetUrl);
multiCurrencyPieChart(categoryOutUri, 'category-out-pie-chart'); multiCurrencyPieChart(categoryOutUrl, 'category-out-pie-chart');
multiCurrencyPieChart(categoryInUri, 'category-in-pie-chart'); multiCurrencyPieChart(categoryInUrl, 'category-in-pie-chart');
multiCurrencyPieChart(budgetsOutUri, 'budgets-out-pie-chart'); multiCurrencyPieChart(budgetsOutUrl, 'budgets-out-pie-chart');
multiCurrencyPieChart(tagOutUri, 'tag-out-pie-chart'); multiCurrencyPieChart(tagOutUrl, 'tag-out-pie-chart');
multiCurrencyPieChart(tagInUri, 'tag-in-pie-chart'); multiCurrencyPieChart(tagInUrl, 'tag-in-pie-chart');
$.each($('.main_double_canvas'), function (i, v) { $.each($('.main_double_canvas'), function (i, v) {
var canvas = $(v); var canvas = $(v);
columnChart(canvas.data('url'), canvas.attr('id')); columnChart(canvas.data('url'), canvas.attr('id'));
}); });
loadAjaxPartial('topExpensesHolder', topExpensesUri); loadAjaxPartial('topExpensesHolder', topExpensesUrl);
loadAjaxPartial('avgExpensesHolder', avgExpensesUri); loadAjaxPartial('avgExpensesHolder', avgExpensesUrl);
loadAjaxPartial('topIncomeHolder', topIncomeUri); loadAjaxPartial('topIncomeHolder', topIncomeUrl);
loadAjaxPartial('avgIncomeHolder', avgIncomeUri); loadAjaxPartial('avgIncomeHolder', avgIncomeUrl);
}); });

View File

@@ -20,29 +20,29 @@
$(function () { $(function () {
"use strict"; "use strict";
loadAjaxPartial('accountsHolder', accountsUri); loadAjaxPartial('accountsHolder', accountsUrl);
loadAjaxPartial('tagsHolder', tagsUri); loadAjaxPartial('tagsHolder', tagsUrl);
loadAjaxPartial('accountPerTagHolder', accountPerTagUri); loadAjaxPartial('accountPerTagHolder', accountPerTagUrl);
$.each($('.main_tag_canvas'), function (i, v) { $.each($('.main_tag_canvas'), function (i, v) {
var canvas = $(v); var canvas = $(v);
columnChart(canvas.data('url'), canvas.attr('id')); columnChart(canvas.data('url'), canvas.attr('id'));
}); });
multiCurrencyPieChart(tagOutUri, 'tag-out-pie-chart'); multiCurrencyPieChart(tagOutUrl, 'tag-out-pie-chart');
multiCurrencyPieChart(tagInUri, 'tag-in-pie-chart'); multiCurrencyPieChart(tagInUrl, 'tag-in-pie-chart');
multiCurrencyPieChart(categoryOutUri, 'category-out-pie-chart'); multiCurrencyPieChart(categoryOutUrl, 'category-out-pie-chart');
multiCurrencyPieChart(categoryInUri, 'category-in-pie-chart'); multiCurrencyPieChart(categoryInUrl, 'category-in-pie-chart');
multiCurrencyPieChart(budgetsOutUri, 'budgets-out-pie-chart'); multiCurrencyPieChart(budgetsOutUrl, 'budgets-out-pie-chart');
multiCurrencyPieChart(sourceOutUri, 'source-out-pie-chart'); multiCurrencyPieChart(sourceOutUrl, 'source-out-pie-chart');
multiCurrencyPieChart(sourceInUri, 'source-in-pie-chart'); multiCurrencyPieChart(sourceInUrl, 'source-in-pie-chart');
multiCurrencyPieChart(destOutUri, 'dest-out-pie-chart'); multiCurrencyPieChart(destOutUrl, 'dest-out-pie-chart');
multiCurrencyPieChart(destInUri, 'dest-in-pie-chart'); multiCurrencyPieChart(destInUrl, 'dest-in-pie-chart');
loadAjaxPartial('topExpensesHolder', topExpensesUri); loadAjaxPartial('topExpensesHolder', topExpensesUrl);
loadAjaxPartial('avgExpensesHolder', avgExpensesUri); loadAjaxPartial('avgExpensesHolder', avgExpensesUrl);
loadAjaxPartial('topIncomeHolder', topIncomeUri); loadAjaxPartial('topIncomeHolder', topIncomeUrl);
loadAjaxPartial('avgIncomeHolder', avgIncomeUri); loadAjaxPartial('avgIncomeHolder', avgIncomeUrl);
}); });

View File

@@ -376,14 +376,14 @@ function updateTriggerInput(selectList) {
/** /**
* Create actual autocomplete * Create actual autocomplete
* @param input * @param input
* @param URI * @param URL
*/ */
function createAutoComplete(input, URI) { function createAutoComplete(input, URL) {
console.log('Now in createAutoComplete("' + URI + '").'); console.log('Now in createAutoComplete("' + URL + '").');
input.typeahead('destroy'); input.typeahead('destroy');
// append URI: // append URL:
var lastChar = URI[URI.length -1]; var lastChar = URL[URL.length -1];
var urlParamSplit = '?'; var urlParamSplit = '?';
if('&' === lastChar) { if('&' === lastChar) {
urlParamSplit = ''; urlParamSplit = '';
@@ -392,7 +392,7 @@ function createAutoComplete(input, URI) {
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'), datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
queryTokenizer: Bloodhound.tokenizers.whitespace, queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: { prefetch: {
url: URI + urlParamSplit + 'uid=' + uid, url: URL + urlParamSplit + 'uid=' + uid,
filter: function (list) { filter: function (list) {
return $.map(list, function (item) { return $.map(list, function (item) {
return {name: item.name}; return {name: item.name};
@@ -400,7 +400,7 @@ function createAutoComplete(input, URI) {
} }
}, },
remote: { remote: {
url: URI + urlParamSplit + 'query=%QUERY&uid=' + uid, url: URL + urlParamSplit + 'query=%QUERY&uid=' + uid,
wildcard: '%QUERY', wildcard: '%QUERY',
filter: function (list) { filter: function (list) {
return $.map(list, function (item) { return $.map(list, function (item) {

View File

@@ -18,8 +18,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: searchQuery,searchUri,token */
$(function () { $(function () {
@@ -29,7 +27,7 @@ $(function () {
}); });
function startSearch(query) { function startSearch(query) {
$.post(searchUri, {query: query, _token: token}).done(presentSearchResults).fail(searchFailure); $.post(searchUrl, {query: query, _token: token}).done(presentSearchResults).fail(searchFailure);
} }
function searchFailure() { function searchFailure() {

View File

@@ -21,9 +21,9 @@
$(function () { $(function () {
"use strict"; "use strict";
if (!showAll) { if (!showAll) {
multiCurrencyPieChart(categoryChartUri, 'category_chart'); multiCurrencyPieChart(categoryChartUrl, 'category_chart');
multiCurrencyPieChart(budgetChartUri, 'budget_chart'); multiCurrencyPieChart(budgetChartUrl, 'budget_chart');
multiCurrencyPieChart(destinationChartUri, 'destination_chart'); multiCurrencyPieChart(destinationChartUrl, 'destination_chart');
multiCurrencyPieChart(sourceChartUri, 'source_chart'); multiCurrencyPieChart(sourceChartUrl, 'source_chart');
} }
}); });

View File

@@ -18,8 +18,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** global: autoCompleteUri */
$(function () { $(function () {
"use strict"; "use strict";
$('.link-modal').click(getLinkModal); $('.link-modal').click(getLinkModal);
@@ -33,7 +31,7 @@ $(function () {
function getLinkModal(e) { function getLinkModal(e) {
var button = $(e.currentTarget); var button = $(e.currentTarget);
var journalId = parseInt(button.data('journal')); var journalId = parseInt(button.data('journal'));
var url = modalDialogURI.replace('%JOURNAL%', journalId); var url = modalDialogURL.replace('%JOURNAL%', journalId);
console.log(url); console.log(url);
$.get(url).done(function (data) { $.get(url).done(function (data) {
$('#linkJournalModal').html(data).modal('show'); $('#linkJournalModal').html(data).modal('show');
@@ -53,7 +51,7 @@ function makeAutoComplete() {
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'), datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
queryTokenizer: Bloodhound.tokenizers.whitespace, queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: { prefetch: {
url: acURI + '?uid=' + uid, url: acURL + '?uid=' + uid,
filter: function (list) { filter: function (list) {
return $.map(list, function (item) { return $.map(list, function (item) {
return item; return item;
@@ -61,7 +59,7 @@ function makeAutoComplete() {
} }
}, },
remote: { remote: {
url: acURI + '?query=%QUERY&uid=' + uid, url: acURL + '?query=%QUERY&uid=' + uid,
wildcard: '%QUERY', wildcard: '%QUERY',
filter: function (list) { filter: function (list) {
return $.map(list, function (item) { return $.map(list, function (item) {
@@ -78,7 +76,7 @@ function makeAutoComplete() {
function selectedJournal(event, journal) { function selectedJournal(event, journal) {
$('#journal-selector').hide(); $('#journal-selector').hide();
$('#journal-selection').show(); $('#journal-selection').show();
$('#selected-journal').html('<a href="' + groupURI.replace('%GROUP%', journal.transaction_group_id) + '">' + journal.description + '</a>').show(); $('#selected-journal').html('<a href="' + groupURL.replace('%GROUP%', journal.transaction_group_id) + '">' + journal.description + '</a>').show();
$('input[name="opposing"]').val(journal.id); $('input[name="opposing"]').val(journal.id);
} }

View File

@@ -128,9 +128,9 @@
var accountID = {{ account.id }}; var accountID = {{ account.id }};
var startBalance = {{ startBalance }}; var startBalance = {{ startBalance }};
var endBalance = {{ endBalance }}; var endBalance = {{ endBalance }};
var transactionsUri = '{{ transactionsUri }}'; var transactionsUrl = '{{ transactionsUrl }}';
var overviewUri = '{{ overviewUri }}'; var overviewUrl = '{{ overviewUrl }}';
var indexUri = '{{ indexUri }}'; var indexUrl = '{{ indexUrl }}';
var selectRangeAndBalance = '{{ 'select_range_and_balance'|_|escape('js') }}'; var selectRangeAndBalance = '{{ 'select_range_and_balance'|_|escape('js') }}';
</script> </script>
<script src="v1/js/ff/accounts/reconcile.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script> <script src="v1/js/ff/accounts/reconcile.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>

View File

@@ -182,14 +182,14 @@
var showAll = true; var showAll = true;
currencySymbol = "{{ currency.symbol }}"; currencySymbol = "{{ currency.symbol }}";
var accountID = {{ account.id }}; var accountID = {{ account.id }};
var chartUri = '{{ chartUri }}'; var chartUrl = '{{ chartUrl }}';
{% if not showAll %} {% if not showAll %}
showAll = false; showAll = false;
// uri's for charts: // url's for charts:
var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; var incomeCategoryUrl = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; var expenseCategoryUrl = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; var expenseBudgetUrl = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var drawVerticalLine = ''; var drawVerticalLine = '';
{# render vertical line with text "today" #} {# render vertical line with text "today" #}
{% if start.lte(today) and end.gte(today) %} {% if start.lte(today) and end.gte(today) %}

View File

@@ -69,7 +69,7 @@
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
<script type="text/javascript" nonce="{{ JS_NONCE }}"> <script type="text/javascript" nonce="{{ JS_NONCE }}">
var updateCheckUri = '{{ route('admin.update-check.manual') }}'; var updateCheckUrl = '{{ route('admin.update-check.manual') }}';
</script> </script>
<script type="text/javascript" src="v1/js/ff/admin/update/index.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/admin/update/index.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %} {% endblock %}

View File

@@ -166,7 +166,7 @@
{% block scripts %} {% block scripts %}
<script type="text/javascript" nonce="{{ JS_NONCE }}"> <script type="text/javascript" nonce="{{ JS_NONCE }}">
var billCurrencySymbol = "{{ object.data.currency.symbol }}"; var billCurrencySymbol = "{{ object.data.currency.symbol }}";
var billUri = '{{ route('chart.bill.single', [object.data.id]) }}'; var billUrl = '{{ route('chart.bill.single', [object.data.id]) }}';
</script> </script>
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -458,20 +458,20 @@
<script type="text/javascript" nonce="{{ JS_NONCE }}"> <script type="text/javascript" nonce="{{ JS_NONCE }}">
// index route. // index route.
var budgetIndexUri = "{{ route('budgets.index',['START','END']) }}"; var budgetIndexUrl = "{{ route('budgets.index',['START','END']) }}";
// create available budgets / edit // create available budgets / edit
var createAvailableBudgetUri = "{{ route('available-budgets.create', [start.format('Y-m-d'), end.format('Y-m-d')]) }}"; var createAvailableBudgetUrl = "{{ route('available-budgets.create', [start.format('Y-m-d'), end.format('Y-m-d')]) }}";
var createAltAvailableBudgetUri = "{{ route('available-budgets.create-alternative', [start.format('Y-m-d'), end.format('Y-m-d')]) }}"; var createAltAvailableBudgetUrl = "{{ route('available-budgets.create-alternative', [start.format('Y-m-d'), end.format('Y-m-d')]) }}";
var editAvailableBudgetUri = "{{ route('available-budgets.edit', ['REPLACEME', start.format('Y-m-d'), end.format('Y-m-d')]) }}"; var editAvailableBudgetUrl = "{{ route('available-budgets.edit', ['REPLACEME', start.format('Y-m-d'), end.format('Y-m-d')]) }}";
var deleteABUrl = "{{ route('available-budgets.delete') }}"; var deleteABUrl = "{{ route('available-budgets.delete') }}";
// budget limit create form. // budget limit create form.
var createBudgetLimitUri = "{{ route('budget-limits.create', ['REPLACEME', start.format('Y-m-d'), end.format('Y-m-d')]) }}"; var createBudgetLimitUrl = "{{ route('budget-limits.create', ['REPLACEME', start.format('Y-m-d'), end.format('Y-m-d')]) }}";
var storeBudgetLimitUri = "{{ route('budget-limits.store') }}"; var storeBudgetLimitUrl = "{{ route('budget-limits.store') }}";
var updateBudgetLimitUri = "{{ route('budget-limits.update', ['REPLACEME']) }}"; var updateBudgetLimitUrl = "{{ route('budget-limits.update', ['REPLACEME']) }}";
var deleteBudgetLimitUrl = "{{ route('budget-limits.delete', ['REPLACEME']) }}"; var deleteBudgetLimitUrl = "{{ route('budget-limits.delete', ['REPLACEME']) }}";
var totalBudgetedUri = "{{ route('json.budget.total-budgeted', ['REPLACEME', start.format('Y-m-d'), end.format('Y-m-d')]) }}"; var totalBudgetedUrl = "{{ route('json.budget.total-budgeted', ['REPLACEME', start.format('Y-m-d'), end.format('Y-m-d')]) }}";
// period thing: // period thing:
var periodStart = "{{ start.format('Y-m-d') }}"; var periodStart = "{{ start.format('Y-m-d') }}";

View File

@@ -207,16 +207,16 @@
var budgetLimitID = 0; var budgetLimitID = 0;
{% if budgetLimit.id %} {% if budgetLimit.id %}
budgetLimitID = {{ budgetLimit.id }}; budgetLimitID = {{ budgetLimit.id }};
var budgetChartUri = '{{ route('chart.budget.budget-limit', [budget.id, budgetLimit.id] ) }}'; var budgetChartUrl = '{{ route('chart.budget.budget-limit', [budget.id, budgetLimit.id] ) }}';
var currencySymbol = '{{ budgetLimit.transactionCurrency.symbol }}'; var currencySymbol = '{{ budgetLimit.transactionCurrency.symbol }}';
var expenseCategoryUri = '{{ route('chart.budget.expense-category', [budget.id, budgetLimit.id]) }}'; var expenseCategoryUrl = '{{ route('chart.budget.expense-category', [budget.id, budgetLimit.id]) }}';
var expenseAssetUri = '{{ route('chart.budget.expense-asset', [budget.id, budgetLimit.id]) }}'; var expenseAssetUrl = '{{ route('chart.budget.expense-asset', [budget.id, budgetLimit.id]) }}';
var expenseExpenseUri = '{{ route('chart.budget.expense-expense', [budget.id, budgetLimit.id]) }}'; var expenseExpenseUrl = '{{ route('chart.budget.expense-expense', [budget.id, budgetLimit.id]) }}';
{% else %} {% else %}
var budgetChartUri = '{{ route('chart.budget.budget', [budget.id] ) }}'; var budgetChartUrl = '{{ route('chart.budget.budget', [budget.id] ) }}';
var expenseCategoryUri = '{{ route('chart.budget.expense-category', [budget.id]) }}'; var expenseCategoryUrl = '{{ route('chart.budget.expense-category', [budget.id]) }}';
var expenseAssetUri = '{{ route('chart.budget.expense-asset', [budget.id]) }}'; var expenseAssetUrl = '{{ route('chart.budget.expense-asset', [budget.id]) }}';
var expenseExpenseUri = '{{ route('chart.budget.expense-expense', [budget.id]) }}'; var expenseExpenseUrl = '{{ route('chart.budget.expense-expense', [budget.id]) }}';
{% endif %} {% endif %}
</script> </script>

View File

@@ -170,10 +170,10 @@
{% block scripts %} {% block scripts %}
<script type="text/javascript" nonce="{{ JS_NONCE }}"> <script type="text/javascript" nonce="{{ JS_NONCE }}">
var billCount = {{ billCount }}; var billCount = {{ billCount }};
var accountFrontpageUri = '{{ route('chart.account.frontpage') }}'; var accountFrontpageUrl = '{{ route('chart.account.frontpage') }}';
var accountRevenueUri = '{{ route('chart.account.revenue') }}'; var accountRevenueUrl = '{{ route('chart.account.revenue') }}';
var accountExpenseUri = '{{ route('chart.account.expense') }}'; var accountExpenseUrl = '{{ route('chart.account.expense') }}';
var piggyInfoUri = '{{ route('json.fp.piggy-banks') }}'; var piggyInfoUrl = '{{ route('json.fp.piggy-banks') }}';
var drawVerticalLine = ''; var drawVerticalLine = '';
{# render vertical line with text "today" #} {# render vertical line with text "today" #}
{% if start.lte(today) and end.gte(today) %} {% if start.lte(today) and end.gte(today) %}

View File

@@ -16,8 +16,8 @@
<script type="text/javascript" nonce="{{ JS_NONCE }}"> <script type="text/javascript" nonce="{{ JS_NONCE }}">
var token = '{{ csrf_token() }}'; var token = '{{ csrf_token() }}';
var index = 0; var index = 0;
var runCommandUri = '{{ route('installer.runCommand') }}'; var runCommandUrl = '{{ route('installer.runCommand') }}';
var homeUri = '{{ route('flush') }}'; var homeUrl = '{{ route('flush') }}';
</script> </script>
<script type="text/javascript" src="v1/js/ff/install/index.js" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/install/index.js" nonce="{{ JS_NONCE }}"></script>
{% endblock %} {% endblock %}

View File

@@ -7,7 +7,7 @@ var ranges = {};
// date range meta configuration // date range meta configuration
var dateRangeMeta = { var dateRangeMeta = {
title: "{{ dateRangeTitle }}", title: "{{ dateRangeTitle }}",
uri: "{{ route('daterange') }}", url: "{{ route('daterange') }}",
labels: { labels: {
apply: "{{ 'apply'|_ }}", apply: "{{ 'apply'|_ }}",
cancel: "{{ 'cancel'|_ }}", cancel: "{{ 'cancel'|_ }}",

View File

@@ -201,7 +201,7 @@
{% if not shownDemo %} {% if not shownDemo %}
<script type="text/javascript" nonce="{{ JS_NONCE }}"> <script type="text/javascript" nonce="{{ JS_NONCE }}">
var routeForTour = "{{ current_route_name }}"; var routeForTour = "{{ current_route_name }}";
var routeStepsUri = "{{ route('json.intro', [current_route_name, objectType|default("")]) }}"; var routeStepsUrl = "{{ route('json.intro', [current_route_name, objectType|default("")]) }}";
var routeForFinishedTour = "{{ route('json.intro.finished', [current_route_name, objectType|default("")]) }}"; var routeForFinishedTour = "{{ route('json.intro.finished', [current_route_name, objectType|default("")]) }}";
</script> </script>
<script type="text/javascript" src="v1/lib/intro/intro.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/lib/intro/intro.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -208,8 +208,8 @@
<script type="text/javascript" src="v1/lib/fc/fullcalendar.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/lib/fc/fullcalendar.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" nonce="{{ JS_NONCE }}"> <script type="text/javascript" nonce="{{ JS_NONCE }}">
var transactionType = "{{ preFilled.transaction_type }}"; var transactionType = "{{ preFilled.transaction_type }}";
var suggestUri = "{{ route('recurring.suggest') }}"; var suggestUrl = "{{ route('recurring.suggest') }}";
var eventsUri = "{{ route('recurring.events') }}"; var eventsUrl = "{{ route('recurring.events') }}";
var oldRepetitionType= "{{ oldRepetitionType }}"; var oldRepetitionType= "{{ oldRepetitionType }}";
</script> </script>
<script type="text/javascript" src="v1/js/ff/recurring/create.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/recurring/create.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -205,8 +205,8 @@
<script type="text/javascript" src="v1/lib/fc/fullcalendar.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/lib/fc/fullcalendar.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" nonce="{{ JS_NONCE }}"> <script type="text/javascript" nonce="{{ JS_NONCE }}">
var transactionType = "{{ preFilled.transaction_type }}"; var transactionType = "{{ preFilled.transaction_type }}";
var suggestUri = "{{ route('recurring.suggest') }}"; var suggestUrl = "{{ route('recurring.suggest') }}";
var eventsUri = "{{ route('recurring.events') }}"; var eventsUrl = "{{ route('recurring.events') }}";
var currentRepType = "{{ currentRepType }}"; var currentRepType = "{{ currentRepType }}";
</script> </script>
<script type="text/javascript" src="v1/js/ff/recurring/edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/recurring/edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -161,18 +161,17 @@
var accountIds = '{{ accountIds }}'; var accountIds = '{{ accountIds }}';
var budgetIds = '{{ budgetIds }}'; var budgetIds = '{{ budgetIds }}';
// html block URI's: // html block URL's:
var accountsUri = '{{ route('report-data.budget.accounts', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; var accountsUrl = '{{ route('report-data.budget.accounts', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
var budgetsUri = '{{ route('report-data.budget.budgets', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; var budgetsUrl = '{{ route('report-data.budget.budgets', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
var accountPerBudgetUri = '{{ route('report-data.budget.account-per-budget', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; var accountPerBudgetUrl = '{{ route('report-data.budget.account-per-budget', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
var avgExpensesUri = '{{ route('report-data.budget.avg-expenses', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; var avgExpensesUrl = '{{ route('report-data.budget.avg-expenses', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
var topExpensesUri = '{{ route('report-data.budget.top-expenses', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; var topExpensesUrl = '{{ route('report-data.budget.top-expenses', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
// chart uri's var budgetExpenseUrl = '{{ route('chart.budget.budget-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
var budgetExpenseUri = '{{ route('chart.budget.budget-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryExpenseUrl = '{{ route('chart.budget.category-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryExpenseUri = '{{ route('chart.budget.category-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; var sourceExpenseUrl = '{{ route('chart.budget.source-account-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
var sourceExpenseUri = '{{ route('chart.budget.source-account-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; var destinationExpenseUrl = '{{ route('chart.budget.destination-account-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
var destinationExpenseUri = '{{ route('chart.budget.destination-account-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
</script> </script>

View File

@@ -227,25 +227,24 @@
var accountIds = '{{ accountIds }}'; var accountIds = '{{ accountIds }}';
var categoryIds = '{{ categoryIds }}'; var categoryIds = '{{ categoryIds }}';
// html block URI's:
var accountsUri = '{{ route('report-data.category.accounts', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var accountsUrl = '{{ route('report-data.category.accounts', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoriesUri = '{{ route('report-data.category.categories', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoriesUrl = '{{ route('report-data.category.categories', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var accountPerCategoryUri = '{{ route('report-data.category.account-per-category', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var accountPerCategoryUrl = '{{ route('report-data.category.account-per-category', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
// pie charts: // pie charts:
var categoryOutUri = '{{ route('chart.category.category-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryOutUrl = '{{ route('chart.category.category-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryInUri = '{{ route('chart.category.category-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryInUrl = '{{ route('chart.category.category-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var budgetsOutUri = '{{ route('chart.category.budget-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var budgetsOutUrl = '{{ route('chart.category.budget-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var sourceOutUri = '{{ route('chart.category.source-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var sourceOutUrl = '{{ route('chart.category.source-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var sourceInUri = '{{ route('chart.category.source-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var sourceInUrl = '{{ route('chart.category.source-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var destOutUri = '{{ route('chart.category.dest-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var destOutUrl = '{{ route('chart.category.dest-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var destInUri = '{{ route('chart.category.dest-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var destInUrl = '{{ route('chart.category.dest-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var avgExpensesUri = '{{ route('report-data.category.avg-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var avgExpensesUrl = '{{ route('report-data.category.avg-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var topExpensesUri = '{{ route('report-data.category.top-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var topExpensesUrl = '{{ route('report-data.category.top-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var avgIncomeUri = '{{ route('report-data.category.avg-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var avgIncomeUrl = '{{ route('report-data.category.avg-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var topIncomeUri = '{{ route('report-data.category.top-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; var topIncomeUrl = '{{ route('report-data.category.top-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
</script> </script>
<script type="text/javascript" src="v1/js/ff/reports/category/month.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/reports/category/month.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -160,18 +160,16 @@
var reportType = '{{ reportType }}'; var reportType = '{{ reportType }}';
var accountIds = '{{ accountIds }}'; var accountIds = '{{ accountIds }}';
// uri's for data var accountReportUrl = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryReportUrl = '{{ route('report-data.category.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryReportUri = '{{ route('report-data.category.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var budgetReportUrl = '{{ route('report-data.budget.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var budgetReportUri = '{{ route('report-data.budget.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var balanceReportUrl = '{{ route('report-data.balance.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var balanceReportUri = '{{ route('report-data.balance.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var incomeReportUrl = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var expenseReportUrl = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var incExpReportUrl = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var billReportUrl = '{{ route('report-data.bills.overview', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var billReportUri = '{{ route('report-data.bills.overview', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
// uri's for charts: var accountChartUrl = '{{ route('chart.account.report', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var accountChartUri = '{{ route('chart.account.report', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
</script> </script>
<script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -202,20 +202,18 @@
var endDate = '{{ end.format('Ymd') }}'; var endDate = '{{ end.format('Ymd') }}';
var accountIds = '{{ accountIds }}'; var accountIds = '{{ accountIds }}';
// report uri's var opChartUrl = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var opChartUri = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var netWorthUrl = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var netWorthUri = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
// data uri's var accountReportUrl = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var incomeReportUrl = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var expenseReportUrl = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var incExpReportUrl = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var budgetPeriodReportUri = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var budgetPeriodReportUrl = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryExpenseUri = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryExpenseUrl = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryIncomeUri = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryIncomeUrl = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var billReportUri = ''; var billReportUrl = '';
</script> </script>
<script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -196,20 +196,18 @@
var endDate = '{{ end.format('Ymd') }}'; var endDate = '{{ end.format('Ymd') }}';
var accountIds = '{{ accountIds }}'; var accountIds = '{{ accountIds }}';
// report uri's var opChartUrl = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var opChartUri = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var netWorthUrl = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var netWorthUri = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
// data uri's var accountReportUrl = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var incomeReportUrl = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var expenseReportUrl = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var incExpReportUrl = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var budgetPeriodReportUri = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var budgetPeriodReportUrl = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryExpenseUri = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryExpenseUrl = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryIncomeUri = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryIncomeUrl = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
var billReportUri = ''; var billReportUrl = '';
</script> </script>
<script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -204,24 +204,22 @@
var accountIds = '{{ accountIds }}'; var accountIds = '{{ accountIds }}';
var doubleIds = '{{ doubleIds }}'; var doubleIds = '{{ doubleIds }}';
// chart uri's
{#var mainUri = '{{ route('chart.expense.main', [accountIds, expenseIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
// html blocks. // html blocks.
var opsAccountsUri = '{{ route('report-data.double.operations', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var opsAccountsUrl = '{{ route('report-data.double.operations', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
var opsAccountsAssetUri = '{{ route('report-data.double.ops-asset', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var opsAccountsAssetUrl = '{{ route('report-data.double.ops-asset', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
// pie charts: // pie charts:
var categoryOutUri = '{{ route('chart.double.category-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryOutUrl = '{{ route('chart.double.category-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryInUri = '{{ route('chart.double.category-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryInUrl = '{{ route('chart.double.category-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
var budgetsOutUri = '{{ route('chart.double.budget-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var budgetsOutUrl = '{{ route('chart.double.budget-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
var tagOutUri = '{{ route('chart.double.tag-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var tagOutUrl = '{{ route('chart.double.tag-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
var tagInUri = '{{ route('chart.double.tag-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var tagInUrl = '{{ route('chart.double.tag-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
var avgExpensesUri = '{{ route('report-data.double.avg-expenses', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var avgExpensesUrl = '{{ route('report-data.double.avg-expenses', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
var topExpensesUri = '{{ route('report-data.double.top-expenses', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var topExpensesUrl = '{{ route('report-data.double.top-expenses', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
var avgIncomeUri = '{{ route('report-data.double.avg-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var avgIncomeUrl = '{{ route('report-data.double.avg-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
var topIncomeUri = '{{ route('report-data.double.top-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; var topIncomeUrl = '{{ route('report-data.double.top-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}';
</script> </script>
<script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -258,27 +258,26 @@
var accountIds = '{{ accountIds }}'; var accountIds = '{{ accountIds }}';
var tagIds = '{{ tagIds }}'; var tagIds = '{{ tagIds }}';
// html block URI's:
var accountsUri = '{{ route('report-data.tag.accounts', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var accountsUrl = '{{ route('report-data.tag.accounts', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var tagsUri = '{{ route('report-data.tag.tags', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var tagsUrl = '{{ route('report-data.tag.tags', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var accountPerTagUri = '{{ route('report-data.tag.account-per-tag', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var accountPerTagUrl = '{{ route('report-data.tag.account-per-tag', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
// pie charts: // pie charts:
var tagOutUri = '{{ route('chart.tag.tag-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var tagOutUrl = '{{ route('chart.tag.tag-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var tagInUri = '{{ route('chart.tag.tag-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var tagInUrl = '{{ route('chart.tag.tag-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryOutUri = '{{ route('chart.tag.category-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryOutUrl = '{{ route('chart.tag.category-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var categoryInUri = '{{ route('chart.tag.category-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryInUrl = '{{ route('chart.tag.category-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var budgetsOutUri = '{{ route('chart.tag.budget-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var budgetsOutUrl = '{{ route('chart.tag.budget-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var sourceOutUri = '{{ route('chart.tag.source-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var sourceOutUrl = '{{ route('chart.tag.source-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var sourceInUri = '{{ route('chart.tag.source-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var sourceInUrl = '{{ route('chart.tag.source-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var destOutUri = '{{ route('chart.tag.dest-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var destOutUrl = '{{ route('chart.tag.dest-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var destInUri = '{{ route('chart.tag.dest-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var destInUrl = '{{ route('chart.tag.dest-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var avgExpensesUri = '{{ route('report-data.tag.avg-expenses', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var avgExpensesUrl = '{{ route('report-data.tag.avg-expenses', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var topExpensesUri = '{{ route('report-data.tag.top-expenses', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var topExpensesUrl = '{{ route('report-data.tag.top-expenses', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var avgIncomeUri = '{{ route('report-data.tag.avg-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var avgIncomeUrl = '{{ route('report-data.tag.avg-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
var topIncomeUri = '{{ route('report-data.tag.top-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; var topIncomeUrl = '{{ route('report-data.tag.top-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}';
</script> </script>
<script type="text/javascript" src="v1/js/ff/reports/tag/month.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/ff/reports/tag/month.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

View File

@@ -143,7 +143,7 @@
var edit_bulk_selected_txt = "{{ trans('firefly.bulk_edit')|escape('js') }}"; var edit_bulk_selected_txt = "{{ trans('firefly.bulk_edit')|escape('js') }}";
var searchQuery = "{{ fullQuery|escape('js') }}"; var searchQuery = "{{ fullQuery|escape('js') }}";
var searchUri = "{{ route('search.search') }}?page={{ page }}"; var searchUrl = "{{ route('search.search') }}?page={{ page }}";
var searchPage = {{ page }}; var searchPage = {{ page }};
var cloneGroupUrl = '{{ route('transactions.clone') }}'; var cloneGroupUrl = '{{ route('transactions.clone') }}';
</script> </script>

View File

@@ -125,10 +125,10 @@
<script type="text/javascript" nonce="{{ JS_NONCE }}"> <script type="text/javascript" nonce="{{ JS_NONCE }}">
var showAll = {% if periods|length > 0 %}false{% else %}true{% endif %}; var showAll = {% if periods|length > 0 %}false{% else %}true{% endif %};
var categoryChartUri = '{{ route('chart.transactions.categories', [objectType, start.format('Y-m-d'), end.format('Y-m-d')]) }}'; var categoryChartUrl = '{{ route('chart.transactions.categories', [objectType, start.format('Y-m-d'), end.format('Y-m-d')]) }}';
var budgetChartUri = '{{ route('chart.transactions.budgets', [start.format('Y-m-d'), end.format('Y-m-d')]) }}'; var budgetChartUrl = '{{ route('chart.transactions.budgets', [start.format('Y-m-d'), end.format('Y-m-d')]) }}';
var destinationChartUri = '{{ route('chart.transactions.destinationAccounts', [objectType, start.format('Y-m-d'), end.format('Y-m-d')]) }}'; var destinationChartUrl = '{{ route('chart.transactions.destinationAccounts', [objectType, start.format('Y-m-d'), end.format('Y-m-d')]) }}';
var sourceChartUri = '{{ route('chart.transactions.sourceAccounts', [objectType, start.format('Y-m-d'), end.format('Y-m-d')]) }}'; var sourceChartUrl = '{{ route('chart.transactions.sourceAccounts', [objectType, start.format('Y-m-d'), end.format('Y-m-d')]) }}';
</script> </script>
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> <script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>

Some files were not shown because too many files have changed in this diff Show More