Update meta files.

This commit is contained in:
James Cole
2020-06-22 18:03:57 +02:00
parent 1a043e35c2
commit bcb9794315
25 changed files with 507 additions and 414 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -26,11 +26,7 @@
<main-account /> <main-account />
</div> </div>
</div> </div>
<div class="row"> <main-account-list/>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<main-account-list/>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12"> <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">

View File

@@ -40,7 +40,6 @@
this.chartData = DataConverter.methods.convertChart(response.data); this.chartData = DataConverter.methods.convertChart(response.data);
this.chartData = DataConverter.methods.colorizeData(this.chartData); this.chartData = DataConverter.methods.colorizeData(this.chartData);
this.chartData = DataConverter.methods.convertLabelsToDate(this.chartData); this.chartData = DataConverter.methods.convertLabelsToDate(this.chartData);
console.log(this.chartData);
this.loaded = true this.loaded = true
}); });
}, },

View File

@@ -1,19 +1,69 @@
<template> <template>
<div class="card"> <div class="row">
<div class="card-header"> <div v-bind:class="{ 'col-lg-12': 1 === accounts.length, 'col-lg-6': 2 === accounts.length, 'col-lg-4': accounts.length > 2 }"
<h3 class="card-title">I am a card</h3> v-for="account in accounts">
</div> <div class="card">
<div class="card-body"> <div class="card-header">
<p> <h3 class="card-title"><a :href="account.uri">{{ account.title }}</a></h3>
I am card body </div>
</p> <div class="card-body table-responsive p-0">
<transaction-list-large :transactions="account.transactions" v-if="1===accounts.length" />
<transaction-list-medium :transactions="account.transactions" v-if="2===accounts.length" />
<transaction-list-small :transactions="account.transactions" v-if="accounts.length > 2" />
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "MainAccountList" name: "MainAccountList",
data() {
return {
accounts: [],
}
},
mounted() {
axios.get('./api/v1/preferences/frontpageAccounts')
.then(response => {
this.loadAccounts(response);
}
);
},
methods:
{
loadAccounts(response) {
let accountIds = response.data.data.attributes.data;
for (let key in accountIds) {
if (accountIds.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
this.accounts.push({
id: accountIds[key],
title: '',
uri: '',
transactions: []
});
this.loadSingleAccount(key, accountIds[key]);
}
}
},
loadSingleAccount(key, accountId) {
axios.get('./api/v1/accounts/' + accountId)
.then(response => {
this.accounts[key].title = response.data.data.attributes.name;
this.accounts[key].uri = './accounts/show/' + response.data.data.id;
this.loadTransactions(key, accountId);
}
);
},
loadTransactions(key, accountId) {
axios.get('./api/v1/accounts/' + accountId + '/transactions?page=1&limit=10')
.then(response => {
this.accounts[key].transactions = response.data.data;
}
);
},
}
} }
</script> </script>

View File

@@ -0,0 +1,15 @@
<template>
<div>
Hello
</div>
</template>
<script>
export default {
name: "SingleTransactionRow"
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
name: "SmallTransactionList"
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
name: "TransactionListLarge"
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
name: "TransactionListMedium"
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,40 @@
<template>
<table class="table table-striped">
<tr v-for="transaction in transactions">
<td>
<a href="#">
<span v-if="transaction.attributes.transactions.length > 1">{{ transaction.attributes.group_title }}</span>
<span v-if="1===transaction.attributes.transactions.length">{{ transaction.attributes.transactions[0].description }}</span>
</a>
</td>
<td style="text-align:right;">
<span v-for="tr in transaction.attributes.transactions">
<span v-if="'withdrawal' === tr.type" class="text-danger">
{{ Intl.NumberFormat('en-US', {style: 'currency', currency: tr.currency_code}).format(tr.amount * -1)}}<br>
</span>
<span v-if="'deposit' === tr.type" class="text-success">
{{ Intl.NumberFormat('en-US', {style: 'currency', currency: tr.currency_code}).format(tr.amount)}}<br>
</span>
</span>
</td>
</tr>
</table>
</template>
<script>
export default {
name: "TransactionListSmall",
props: {
transactions: {
type: Array,
default: function () {
return [];
}
},
}
}
</script>
<style scoped>
</style>

View File

@@ -8,6 +8,9 @@ import MainCategoryChart from "../components/dashboard/MainCategoryChart";
import MainCrebitChart from "../components/dashboard/MainCrebitChart"; import MainCrebitChart from "../components/dashboard/MainCrebitChart";
import MainDebitChart from "../components/dashboard/MainDebitChart"; import MainDebitChart from "../components/dashboard/MainDebitChart";
import MainPiggyList from "../components/dashboard/MainPiggyList"; import MainPiggyList from "../components/dashboard/MainPiggyList";
import TransactionListLarge from "../components/transactions/TransactionListLarge";
import TransactionListMedium from "../components/transactions/TransactionListMedium";
import TransactionListSmall from "../components/transactions/TransactionListSmall";
/** /**
* First we will load Axios via bootstrap.js * First we will load Axios via bootstrap.js
* jquery and bootstrap-sass preloaded in app.js * jquery and bootstrap-sass preloaded in app.js
@@ -16,6 +19,10 @@ import MainPiggyList from "../components/dashboard/MainPiggyList";
require('../bootstrap'); require('../bootstrap');
Vue.component('transaction-list-large', TransactionListLarge);
Vue.component('transaction-list-medium', TransactionListMedium);
Vue.component('transaction-list-small', TransactionListSmall);
// components as an example // components as an example
Vue.component('dashboard', Dashboard); Vue.component('dashboard', Dashboard);
Vue.component('top-boxes', TopBoxes); Vue.component('top-boxes', TopBoxes);
@@ -28,6 +35,8 @@ Vue.component('main-credit-chart', MainCrebitChart);
Vue.component('main-debit-chart', MainDebitChart); Vue.component('main-debit-chart', MainDebitChart);
Vue.component('main-piggy-list', MainPiggyList); Vue.component('main-piggy-list', MainPiggyList);
// i18n // i18n
let i18n = require('../i18n'); let i18n = require('../i18n');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"firefly": { "firefly": {
"welcome_back": "Que se passe-t-il ?", "welcome_back": "Quoi de neuf ?",
"flash_error": "Erreur !", "flash_error": "Erreur !",
"flash_success": "Super !", "flash_success": "Super !",
"close": "Fermer", "close": "Fermer",

View File

@@ -47,25 +47,25 @@
"profile_whoops": "Whoops!", "profile_whoops": "Whoops!",
"profile_something_wrong": "Something went wrong!", "profile_something_wrong": "Something went wrong!",
"profile_try_again": "Something went wrong. Please try again.", "profile_try_again": "Something went wrong. Please try again.",
"profile_oauth_clients": "OAuth Clients", "profile_oauth_clients": "Klienci OAuth",
"profile_oauth_no_clients": "You have not created any OAuth clients.", "profile_oauth_no_clients": "Nie utworzy\u0142e\u015b \u017cadnych klient\u00f3w OAuth.",
"profile_oauth_clients_header": "Clients", "profile_oauth_clients_header": "Klienci",
"profile_oauth_client_id": "Client ID", "profile_oauth_client_id": "ID klienta",
"profile_oauth_client_name": "Name", "profile_oauth_client_name": "Nazwa",
"profile_oauth_client_secret": "Secret", "profile_oauth_client_secret": "Sekretny klucz",
"profile_oauth_create_new_client": "Create New Client", "profile_oauth_create_new_client": "Utw\u00f3rz nowego klienta",
"profile_oauth_create_client": "Create Client", "profile_oauth_create_client": "Utw\u00f3rz klienta",
"profile_oauth_edit_client": "Edit Client", "profile_oauth_edit_client": "Edytuj klienta",
"profile_oauth_name_help": "Something your users will recognize and trust.", "profile_oauth_name_help": "Something your users will recognize and trust.",
"profile_oauth_redirect_url": "Redirect URL", "profile_oauth_redirect_url": "Przekierowanie URL",
"profile_oauth_redirect_url_help": "Your application's authorization callback URL.", "profile_oauth_redirect_url_help": "Your application's authorization callback URL.",
"profile_authorized_apps": "Authorized applications", "profile_authorized_apps": "Autoryzowane aplikacje",
"profile_authorized_clients": "Authorized clients", "profile_authorized_clients": "Autoryzowani klienci",
"profile_scopes": "Scopes", "profile_scopes": "Zakresy",
"profile_revoke": "Revoke", "profile_revoke": "Uniewa\u017cnij",
"profile_personal_access_tokens": "Personal Access Tokens", "profile_personal_access_tokens": "Osobiste tokeny dost\u0119pu",
"profile_personal_access_token": "Personal Access Token", "profile_personal_access_token": "Osobisty token dost\u0119pu",
"profile_personal_access_token_explanation": "Here is your new personal access token. This is the only time it will be shown so don't lose it! You may now use this token to make API requests.", "profile_personal_access_token_explanation": "Oto tw\u00f3j nowy osobisty token dost\u0119pu. Jest to jedyny raz, gdy zostanie wy\u015bwietlony, wi\u0119c nie zgub go! Mo\u017cesz teraz u\u017cy\u0107 tego tokenu, aby wykona\u0107 zapytania API.",
"profile_no_personal_access_token": "You have not created any personal access tokens.", "profile_no_personal_access_token": "You have not created any personal access tokens.",
"profile_create_new_token": "Create new token", "profile_create_new_token": "Create new token",
"profile_create_token": "Create token", "profile_create_token": "Create token",

View File

@@ -27,7 +27,7 @@
"category": "Categoria", "category": "Categoria",
"attachments": "Anexos", "attachments": "Anexos",
"notes": "Notas", "notes": "Notas",
"update_transaction": "Update transaction", "update_transaction": "Atualizar transa\u00e7\u00e3o",
"after_update_create_another": "After updating, return here to continue editing.", "after_update_create_another": "After updating, return here to continue editing.",
"store_as_new": "Store as a new transaction instead of updating.", "store_as_new": "Store as a new transaction instead of updating.",
"split_title_help": "Se voc\u00ea criar uma transa\u00e7\u00e3o dividida, \u00e9 necess\u00e1rio haver uma descri\u00e7\u00e3o global para todas as partes da transa\u00e7\u00e3o.", "split_title_help": "Se voc\u00ea criar uma transa\u00e7\u00e3o dividida, \u00e9 necess\u00e1rio haver uma descri\u00e7\u00e3o global para todas as partes da transa\u00e7\u00e3o.",
@@ -45,7 +45,7 @@
"delete": "Apagar", "delete": "Apagar",
"name": "Nome", "name": "Nome",
"profile_whoops": "Ops!", "profile_whoops": "Ops!",
"profile_something_wrong": "Something went wrong!", "profile_something_wrong": "Alguma coisa deu errado!",
"profile_try_again": "Something went wrong. Please try again.", "profile_try_again": "Something went wrong. Please try again.",
"profile_oauth_clients": "OAuth Clients", "profile_oauth_clients": "OAuth Clients",
"profile_oauth_no_clients": "You have not created any OAuth clients.", "profile_oauth_no_clients": "You have not created any OAuth clients.",
@@ -60,11 +60,11 @@
"profile_oauth_redirect_url": "Redirect URL", "profile_oauth_redirect_url": "Redirect URL",
"profile_oauth_redirect_url_help": "Your application's authorization callback URL.", "profile_oauth_redirect_url_help": "Your application's authorization callback URL.",
"profile_authorized_apps": "Authorized applications", "profile_authorized_apps": "Authorized applications",
"profile_authorized_clients": "Authorized clients", "profile_authorized_clients": "Clientes autorizados",
"profile_scopes": "Escopos", "profile_scopes": "Escopos",
"profile_revoke": "Revogar", "profile_revoke": "Revogar",
"profile_personal_access_tokens": "Personal Access Tokens", "profile_personal_access_tokens": "Tokens de acesso pessoal",
"profile_personal_access_token": "Personal Access Token", "profile_personal_access_token": "Token de acesso pessoal",
"profile_personal_access_token_explanation": "Here is your new personal access token. This is the only time it will be shown so don't lose it! You may now use this token to make API requests.", "profile_personal_access_token_explanation": "Here is your new personal access token. This is the only time it will be shown so don't lose it! You may now use this token to make API requests.",
"profile_no_personal_access_token": "You have not created any personal access tokens.", "profile_no_personal_access_token": "You have not created any personal access tokens.",
"profile_create_new_token": "Criar novo token", "profile_create_new_token": "Criar novo token",

673
yarn.lock

File diff suppressed because it is too large Load Diff