Rename variable.

This commit is contained in:
James Cole 2021-10-03 06:05:11 +02:00
parent 0a89af3c83
commit 1e0e5d0fe9
No known key found for this signature in database
GPG Key ID: BDE6667570EADBD5
8 changed files with 16 additions and 16 deletions

View File

@ -119,10 +119,10 @@ class CreateController extends Controller
$allowedOpposingTypes = config('firefly.allowed_opposing_types');
$accountToTypes = config('firefly.account_to_transaction');
$defaultCurrency = app('amount')->getDefaultCurrency();
$previousUri = $this->rememberPreviousUri('transactions.create.uri');
$parts = parse_url($previousUri);
$previousUrl = $this->rememberPreviousUri('transactions.create.uri');
$parts = parse_url($previousUrl);
$search = sprintf('?%s', $parts['query'] ?? '');
$previousUri = str_replace($search, '', $previousUri);
$previousUrl = str_replace($search, '', $previousUrl);
session()->put('preFilled', $preFilled);
@ -134,7 +134,7 @@ class CreateController extends Controller
'objectType',
'subTitle',
'defaultCurrency',
'previousUri',
'previousUrl',
'optionalFields',
'preFilled',
'allowedOpposingTypes',

View File

@ -80,16 +80,16 @@ class EditController extends Controller
$defaultCurrency = app('amount')->getDefaultCurrency();
$cash = $repository->getCashAccount();
$previousUri = $this->rememberPreviousUri('transactions.edit.uri');
$parts = parse_url($previousUri);
$previousUrl = $this->rememberPreviousUri('transactions.edit.uri');
$parts = parse_url($previousUrl);
$search = sprintf('?%s', $parts['query'] ?? '');
$previousUri = str_replace($search, '', $previousUri);
$previousUrl = str_replace($search, '', $previousUrl);
return prefixView(
'transactions.edit',
compact(
'cash', 'allowedSourceDests', 'expectedSourceTypes', 'transactionGroup', 'allowedOpposingTypes', 'accountToTypes', 'defaultCurrency',
'previousUri'
'previousUrl'
)
);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -519,8 +519,8 @@ export default {
let button = $('#submitButton');
button.removeAttr('disabled');
} else {
// console.log('Will redirect to previous URL. (' + previousUri + ')');
window.location.href = window.previousUri + '?transaction_group_id=' + groupId + '&message=created';
//console.log('Will redirect to previous URL. (' + previousUrl + ')');
window.location.href = window.previousUrl + '?transaction_group_id=' + groupId + '&message=created';
}
},

View File

@ -718,9 +718,9 @@ export default {
}
} else {
if (this.storeAsNew) {
window.location.href = window.previousUri + '?transaction_group_id=' + groupId + '&message=created';
window.location.href = window.previousUrl + '?transaction_group_id=' + groupId + '&message=created';
} else {
window.location.href = window.previousUri + '?transaction_group_id=' + groupId + '&message=updated';
window.location.href = window.previousUrl + '?transaction_group_id=' + groupId + '&message=updated';
}
}
},

View File

@ -13,7 +13,7 @@
var accountToTypes = {{ accountToTypes|json_encode|raw }};
var defaultCurrency = {{ defaultCurrency.toArray()|json_encode|raw }};
var cashAccountId = {{ cash.id }};
var previousUri = '{{ previousUri }}';
var previousUrl = '{{ previousUrl }}';
window.sourceId = {{ sourceId }};
window.destinationId = {{ destinationId }};
</script>

View File

@ -17,7 +17,7 @@
var allowedSourceDests = {{ allowedSourceDests|json_encode|raw }};
var expectedSourceTypes = {{ expectedSourceTypes|json_encode|raw }};
var cashAccountId = {{ cash.id }};
var previousUri = '{{ previousUri }}';
var previousUrl = '{{ previousUrl }}';
</script>
{% endblock %}