mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Allow unreconcile and expand API to block reconciled transactions.
This commit is contained in:
@@ -220,6 +220,10 @@
|
||||
class="fa fa-pencil"></span> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span
|
||||
class="fa fa-trash"></span> {{ 'delete'|_ }}</a></li>
|
||||
{% if journal.reconciled %}
|
||||
<li><a class="reconcile-button" href="{{ route('transactions.unreconcile', [journal.transaction_journal_id]) }}"><span
|
||||
class="fa fa-history"></span> {{ 'unreconcile'|_ }}</a></li>
|
||||
{% endif %}
|
||||
<li role="separator" class="divider"></li>
|
||||
|
||||
{# convert to different type #}
|
||||
@@ -504,9 +508,25 @@
|
||||
var cloneGroupUrl = '{{ route('transactions.clone') }}';
|
||||
var cloneAndEditUrl = '{{ route('transactions.clone') }}?redirect=edit';
|
||||
|
||||
|
||||
$('.switch-link').on('click', switchLink);
|
||||
$('.reconcile-button').on('click', unreconcile);
|
||||
var switchLinkUrl = '{{ route('transactions.link.switch') }}';
|
||||
|
||||
function unreconcile(e) {
|
||||
e.preventDefault();
|
||||
var obj = $(e.currentTarget);
|
||||
$.post(obj.attr('href'), {
|
||||
_token: token
|
||||
}).done(function () {
|
||||
location.reload();
|
||||
}).fail(function () {
|
||||
console.error('I failed :(');
|
||||
});
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
function switchLink(e) {
|
||||
e.preventDefault();
|
||||
var obj = $(e.currentTarget);
|
||||
|
||||
Reference in New Issue
Block a user