mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 16:00:13 +00:00
Expand test coverage and improve transaction management code.
This commit is contained in:
9
public/v1/js/ff/recurring/create.js
vendored
9
public/v1/js/ff/recurring/create.js
vendored
@@ -189,13 +189,13 @@ function updateFormFields() {
|
||||
// show source account ID:
|
||||
$('#source_id_holder').show();
|
||||
|
||||
// show destination name:
|
||||
// $('#destination_name_holder').show(); // old one
|
||||
$('#withdrawal_destination_id_holder').show();
|
||||
|
||||
// hide destination ID:
|
||||
$('#destination_id_holder').hide();
|
||||
|
||||
// show destination name:
|
||||
//$('#destination_name_holder').show(); // old one
|
||||
$('#withdrawal_destination_id_holder').show();
|
||||
|
||||
// show budget
|
||||
$('#budget_id_holder').show();
|
||||
|
||||
@@ -212,7 +212,6 @@ function updateFormFields() {
|
||||
// $('#destination_name_holder').hide(); // old one
|
||||
$('#withdrawal_destination_id_holder').hide();
|
||||
|
||||
|
||||
$('#destination_id_holder').show();
|
||||
$('#budget_id_holder').hide();
|
||||
$('#piggy_bank_id_holder').hide();
|
||||
|
24
public/v1/js/ff/recurring/edit.js
vendored
24
public/v1/js/ff/recurring/edit.js
vendored
@@ -184,13 +184,15 @@ function updateFormFields() {
|
||||
|
||||
if (transactionType === 'withdrawal') {
|
||||
// hide source account name:
|
||||
$('#source_name_holder').hide();
|
||||
// $('#source_name_holder').hide(); // no longer used
|
||||
$('#deposit_source_id_holder').hide();
|
||||
|
||||
// show source account ID:
|
||||
$('#source_id_holder').show();
|
||||
|
||||
// show destination name:
|
||||
$('#destination_name_holder').show();
|
||||
// $('#destination_name_holder').show(); // no longer used.
|
||||
$('#withdrawal_destination_id_holder').show();
|
||||
|
||||
// hide destination ID:
|
||||
$('#destination_id_holder').hide();
|
||||
@@ -203,18 +205,28 @@ function updateFormFields() {
|
||||
}
|
||||
|
||||
if (transactionType === 'deposit') {
|
||||
$('#source_name_holder').show();
|
||||
// $('#source_name_holder').show(); // no longer used
|
||||
$('#deposit_source_id_holder').show();
|
||||
|
||||
$('#source_id_holder').hide();
|
||||
$('#destination_name_holder').hide();
|
||||
|
||||
// $('#destination_name_holder').hide(); // no longer used
|
||||
$('#withdrawal_destination_id_holder').hide();
|
||||
|
||||
$('#destination_id_holder').show();
|
||||
$('#budget_id_holder').hide();
|
||||
$('#piggy_bank_id_holder').hide();
|
||||
}
|
||||
|
||||
if (transactionType === 'transfer') {
|
||||
$('#source_name_holder').hide();
|
||||
// $('#source_name_holder').hide(); // no longer used
|
||||
$('#deposit_source_id_holder').hide();
|
||||
|
||||
$('#source_id_holder').show();
|
||||
$('#destination_name_holder').hide();
|
||||
|
||||
// $('#destination_name_holder').hide(); // no longer used
|
||||
$('#withdrawal_destination_id_holder').show();
|
||||
|
||||
$('#destination_id_holder').show();
|
||||
$('#budget_id_holder').hide();
|
||||
$('#piggy_bank_id_holder').show();
|
||||
|
10
public/v1/js/ff/rules/create-edit.js
vendored
10
public/v1/js/ff/rules/create-edit.js
vendored
@@ -307,7 +307,7 @@ function updateTriggerInput(selectList) {
|
||||
case 'to_account_is':
|
||||
case 'to_account_contains':
|
||||
console.log('Select list value is ' + selectList.val() + ', so input needs auto complete.');
|
||||
createAutoComplete(inputResult, 'json/all-accounts');
|
||||
createAutoComplete(inputResult, 'json/accounts');
|
||||
break;
|
||||
case 'tag_is':
|
||||
console.log('Select list value is ' + selectList.val() + ', so input needs auto complete.');
|
||||
@@ -377,8 +377,8 @@ function createAutoComplete(input, URI) {
|
||||
prefetch: {
|
||||
url: URI + '?uid=' + uid,
|
||||
filter: function (list) {
|
||||
return $.map(list, function (name) {
|
||||
return {name: name};
|
||||
return $.map(list, function (item) {
|
||||
return {name: item.name};
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -386,8 +386,8 @@ function createAutoComplete(input, URI) {
|
||||
url: URI + '?search=%QUERY&uid=' + uid,
|
||||
wildcard: '%QUERY',
|
||||
filter: function (list) {
|
||||
return $.map(list, function (name) {
|
||||
return {name: name};
|
||||
return $.map(list, function (item) {
|
||||
return {name: item.name};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user