mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-19 16:10:00 +00:00
Final code for 5.3.3
This commit is contained in:
@@ -100,7 +100,7 @@ export default {
|
||||
]),
|
||||
'datesReady': function () {
|
||||
return null !== this.start && null !== this.end && this.ready;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
datesReady: function (value) {
|
||||
@@ -137,7 +137,8 @@ export default {
|
||||
id: accountIds[key],
|
||||
title: '',
|
||||
url: '',
|
||||
current_balance: '',
|
||||
include: false,
|
||||
current_balance: '0',
|
||||
currency_code: 'EUR',
|
||||
transactions: []
|
||||
});
|
||||
@@ -148,12 +149,15 @@ export default {
|
||||
loadSingleAccount(key, accountId) {
|
||||
axios.get('./api/v1/accounts/' + accountId)
|
||||
.then(response => {
|
||||
this.accounts[key].title = response.data.data.attributes.name;
|
||||
this.accounts[key].url = './accounts/show/' + response.data.data.id;
|
||||
this.accounts[key].current_balance = response.data.data.attributes.current_balance;
|
||||
this.accounts[key].currency_code = response.data.data.attributes.currency_code;
|
||||
|
||||
this.loadTransactions(key, accountId);
|
||||
let account = response.data.data;
|
||||
if ('asset' === account.attributes.type || 'liabilities' === account.attributes.type) {
|
||||
this.accounts[key].title = account.attributes.name;
|
||||
this.accounts[key].url = './accounts/show/' + account.id;
|
||||
this.accounts[key].current_balance = account.attributes.current_balance;
|
||||
this.accounts[key].currency_code = account.attributes.currency_code;
|
||||
this.accounts[key].include = true;
|
||||
this.loadTransactions(key, accountId);
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
:errors="transaction.errors.source"
|
||||
:index="index"
|
||||
:source-allowed-types="sourceAllowedTypes"
|
||||
:transaction-type="transactionType"
|
||||
direction="source"
|
||||
/>
|
||||
</div>
|
||||
@@ -79,6 +80,7 @@
|
||||
:destination-allowed-types="destinationAllowedTypes"
|
||||
:errors="transaction.errors.destination"
|
||||
:index="index"
|
||||
:transaction-type="transactionType"
|
||||
:source-allowed-types="sourceAllowedTypes"
|
||||
direction="destination"
|
||||
/>
|
||||
|
||||
@@ -96,6 +96,10 @@ export default {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
transactionType: {
|
||||
type: String,
|
||||
default: 'any'
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -234,10 +238,6 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 'transactionType',
|
||||
// 'sourceAllowedTypes',
|
||||
// 'destinationAllowedTypes',
|
||||
// 'allowedOpposingTypes'
|
||||
accountKey: {
|
||||
get() {
|
||||
return 'source' === this.direction ? 'source_account' : 'destination_account';
|
||||
@@ -249,11 +249,13 @@ export default {
|
||||
if (0 === this.index) {
|
||||
return true;
|
||||
}
|
||||
// console.log('Direction of account ' + this.index + ' is ' + this.direction + '(' + this.transactionType + ')');
|
||||
// console.log(this.transactionType);
|
||||
if ('source' === this.direction) {
|
||||
return 'any' === this.transactionType || 'Deposit' === this.transactionType
|
||||
return 'any' === this.transactionType || 'Deposit' === this.transactionType || typeof this.transactionType === 'undefined';
|
||||
}
|
||||
if ('destination' === this.direction) {
|
||||
return 'any' === this.transactionType || 'Withdrawal' === this.transactionType;
|
||||
return 'any' === this.transactionType || 'Withdrawal' === this.transactionType || typeof this.transactionType === 'undefined';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,8 @@ export default {
|
||||
return {
|
||||
localDate: this.date,
|
||||
localTime: this.time,
|
||||
timeZone: ''
|
||||
timeZone: '',
|
||||
timeString: '',
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
@@ -98,6 +99,7 @@ export default {
|
||||
// console.log('Time is: ' + localStr);
|
||||
return localStr;
|
||||
}
|
||||
// console.log('Return empty string!');
|
||||
return '';
|
||||
},
|
||||
set(value) {
|
||||
@@ -115,9 +117,20 @@ export default {
|
||||
let parts = value.split(':');
|
||||
// console.log('Parts are:');
|
||||
// console.log(parts);
|
||||
current.setHours(parseInt(parts[0] ?? 0));
|
||||
current.setMinutes(parseInt(parts[1] ?? 0));
|
||||
current.setSeconds(parseInt(parts[2] ?? 0));
|
||||
|
||||
let hrs = parts[0] ?? '0';
|
||||
let min = parts[1] ?? '0';
|
||||
let sec = parts[2] ?? '0';
|
||||
hrs = 3 === hrs.length ? hrs.substr(1, 2) : hrs;
|
||||
min = 3 === min.length ? min.substr(1, 2) : min;
|
||||
sec = 3 === sec.length ? sec.substr(1, 2) : sec;
|
||||
// console.log('Hrs: ' + hrs);
|
||||
// console.log('Min: ' + min);
|
||||
// console.log('Sec: ' + sec);
|
||||
|
||||
current.setHours(parseInt(hrs));
|
||||
current.setMinutes(parseInt(min));
|
||||
current.setSeconds(parseInt(sec));
|
||||
this.localTime = current;
|
||||
this.$emit('set-time', {time: this.localTime});
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"spent": "Speso",
|
||||
"Default asset account": "Conto attivit\u00e0 predefinito",
|
||||
"search_results": "Risultati ricerca",
|
||||
"include": "Include?",
|
||||
"include": "Includere?",
|
||||
"transaction": "Transazione",
|
||||
"account_role_defaultAsset": "Conto attivit\u00e0 predefinito",
|
||||
"account_role_savingAsset": "Conto risparmio",
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"spent": "Gasto",
|
||||
"Default asset account": "Conta padr\u00e3o",
|
||||
"search_results": "Resultados da pesquisa",
|
||||
"include": "Include?",
|
||||
"include": "Incluir?",
|
||||
"transaction": "Transa\u00e7\u00e3o",
|
||||
"account_role_defaultAsset": "Conta padr\u00e3o",
|
||||
"account_role_savingAsset": "Conta poupan\u00e7a",
|
||||
|
||||
Reference in New Issue
Block a user