mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Update meta files for new release.
This commit is contained in:
@@ -25,6 +25,7 @@ import {parseFromEntries} from "./shared/parse-from-entries.js";
|
||||
import formatMoney from "../../util/format-money.js";
|
||||
import Autocomplete from "bootstrap5-autocomplete";
|
||||
import Post from "../../api/v2/model/transaction/post.js";
|
||||
import Get from "../../api/v2/model/currency/get.js";
|
||||
import {getVariable} from "../../store/get-variable.js";
|
||||
import {I18n} from "i18n-js";
|
||||
import {loadTranslations} from "../../support/load-translations.js";
|
||||
@@ -45,6 +46,7 @@ let transactions = function () {
|
||||
showErrorMessage: false,
|
||||
entries: [],
|
||||
loadingCurrencies: true,
|
||||
defaultCurrency: {},
|
||||
enabledCurrencies: [],
|
||||
nativeCurrencies: [],
|
||||
foreignCurrencies: [],
|
||||
@@ -52,6 +54,7 @@ let transactions = function () {
|
||||
source: [],
|
||||
destination: [],
|
||||
},
|
||||
errorMessageText: '',
|
||||
detectTransactionType() {
|
||||
const sourceType = this.entries[0].source_account.type ?? 'unknown';
|
||||
const destType = this.entries[0].destination_account.type ?? 'unknown';
|
||||
@@ -129,6 +132,37 @@ let transactions = function () {
|
||||
},
|
||||
loadCurrencies() {
|
||||
console.log('Loading user currencies.');
|
||||
let params = {
|
||||
page: 1,
|
||||
limit: 1337
|
||||
};
|
||||
let getter = new Get();
|
||||
getter.list({}).then((response) => {
|
||||
for(let i in response.data.data) {
|
||||
if(response.data.data.hasOwnProperty(i)) {
|
||||
let current = response.data.data[i];
|
||||
if(current.attributes.enabled) {
|
||||
let obj =
|
||||
|
||||
{
|
||||
id: current.id,
|
||||
name: current.attributes.name,
|
||||
code: current.attributes.code,
|
||||
default: current.attributes.default,
|
||||
symbol: current.attributes.symbol,
|
||||
decimal_places: current.attributes.decimal_places,
|
||||
|
||||
};
|
||||
if(obj.default) {
|
||||
this.defaultCurrency = obj;
|
||||
}
|
||||
this.enabledCurrencies.push(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.loadingCurrencies = false;
|
||||
console.log(this.enabledCurrencies);
|
||||
});
|
||||
},
|
||||
changeSourceAccount(item, ac) {
|
||||
if (typeof item === 'undefined') {
|
||||
@@ -275,7 +309,7 @@ let transactions = function () {
|
||||
this.showErrorMessage = true;
|
||||
// todo create error banner.
|
||||
// todo release form
|
||||
console.error(error);
|
||||
this.errorMessageText = error.response.data.message;
|
||||
});
|
||||
},
|
||||
addSplit() {
|
||||
|
Reference in New Issue
Block a user