Update translations + JS

This commit is contained in:
James Cole
2020-10-17 21:41:13 +02:00
parent a79f7e3b59
commit 937c11e83c
76 changed files with 1656 additions and 1603 deletions

View File

@@ -24,10 +24,11 @@
*/
try {
window.$ = window.jQuery = require('jquery');
window.$ = window.jQuery = require('jquery');
require('bootstrap-sass');
} catch (e) {}
} catch (e) {
}

View File

@@ -26,7 +26,7 @@ import VueI18n from 'vue-i18n'
import * as uiv from 'uiv';
window.vuei18n = VueI18n;
window.uiv =uiv;
window.uiv = uiv;
Vue.use(vuei18n);
Vue.use(uiv);
window.Vue = Vue;

View File

@@ -37,8 +37,8 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
let token = document.head.querySelector('meta[name="csrf-token"]');
if (token) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}

View File

@@ -19,25 +19,25 @@
-->
<template>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Example Component</div>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Example Component</div>
<div class="panel-body">
I'm an example component!
</div>
</div>
</div>
<div class="panel-body">
I'm an example component!
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
mounted() {
// console.log('Component mounted.')
}
}
export default {
mounted() {
// console.log('Component mounted.')
}
}
</script>

View File

@@ -19,25 +19,25 @@
-->
<template>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Test Component</div>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Test Component</div>
<div class="panel-body">
<p>{{ $t("firefly.welcome_back") }}</p>
</div>
</div>
</div>
<div class="panel-body">
<p>{{ $t("firefly.welcome_back") }}</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
mounted() {
// console.log('Component mounted.')
}
}
export default {
mounted() {
// console.log('Component mounted.')
}
}
</script>

View File

@@ -31,254 +31,254 @@
<h3 class="box-title">
{{ $t('firefly.profile_oauth_clients') }}
</h3>
<a class="btn btn-default pull-right" tabindex="-1" @click="showCreateClientForm">
{{ $t('firefly.profile_oauth_create_new_client') }}
</a>
</div>
<div class="box-body">
<!-- Current Clients -->
<p class="mb-0" v-if="clients.length === 0">
{{ $t('firefly.profile_oauth_no_clients') }}
</p>
<table class="table table-responsive table-borderless mb-0" v-if="clients.length > 0">
<caption>{{ $t('firefly.profile_oauth_clients_header') }}</caption>
<thead>
<tr>
<th scope="col">{{ $t('firefly.profile_oauth_client_id') }}</th>
<th scope="col">{{ $t('firefly.name') }}</th>
<th scope="col">{{ $t('firefly.profile_oauth_client_secret') }}</th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr v-for="client in clients">
<!-- ID -->
<td style="vertical-align: middle;">
{{ client.id }}
</td>
<!-- Name -->
<td style="vertical-align: middle;">
{{ client.name }}
</td>
<!-- Secret -->
<td style="vertical-align: middle;">
<code>{{ client.secret ? client.secret : '-' }}</code>
</td>
<!-- Edit Button -->
<td style="vertical-align: middle;">
<a class="action-link" tabindex="-1" @click="edit(client)">
{{ $t('firefly.edit') }}
</a>
</td>
<!-- Delete Button -->
<td style="vertical-align: middle;">
<a class="action-link text-danger" @click="destroy(client)">
{{ $t('firefly.delete') }}
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="box-footer">
<a class="btn btn-default pull-right" tabindex="-1" @click="showCreateClientForm">
<a class="btn btn-default pull-right" tabindex="-1" @click="showCreateClientForm">
{{ $t('firefly.profile_oauth_create_new_client') }}
</a>
</div>
</div>
<div class="box-body">
<!-- Current Clients -->
<p v-if="clients.length === 0" class="mb-0">
{{ $t('firefly.profile_oauth_no_clients') }}
</p>
<!-- Create Client Modal -->
<div class="modal fade" id="modal-create-client" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
{{ $t('firefly.profile_oauth_create_client') }}
</h4>
<table v-if="clients.length > 0" class="table table-responsive table-borderless mb-0">
<caption>{{ $t('firefly.profile_oauth_clients_header') }}</caption>
<thead>
<tr>
<th scope="col">{{ $t('firefly.profile_oauth_client_id') }}</th>
<th scope="col">{{ $t('firefly.name') }}</th>
<th scope="col">{{ $t('firefly.profile_oauth_client_secret') }}</th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<tbody>
<tr v-for="client in clients">
<!-- ID -->
<td style="vertical-align: middle;">
{{ client.id }}
</td>
<div class="modal-body">
<!-- Form Errors -->
<div class="alert alert-danger" v-if="createForm.errors.length > 0">
<p class="mb-0"><strong>{{ $t('firefly.profile_whoops') }}</strong> {{
$t('firefly.profile_something_wrong')
}}</p>
<br>
<ul>
<li v-for="error in createForm.errors">
{{ error }}
</li>
</ul>
<!-- Name -->
<td style="vertical-align: middle;">
{{ client.name }}
</td>
<!-- Secret -->
<td style="vertical-align: middle;">
<code>{{ client.secret ? client.secret : '-' }}</code>
</td>
<!-- Edit Button -->
<td style="vertical-align: middle;">
<a class="action-link" tabindex="-1" @click="edit(client)">
{{ $t('firefly.edit') }}
</a>
</td>
<!-- Delete Button -->
<td style="vertical-align: middle;">
<a class="action-link text-danger" @click="destroy(client)">
{{ $t('firefly.delete') }}
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="box-footer">
<a class="btn btn-default pull-right" tabindex="-1" @click="showCreateClientForm">
{{ $t('firefly.profile_oauth_create_new_client') }}
</a>
</div>
</div>
<!-- Create Client Modal -->
<div id="modal-create-client" class="modal fade" role="dialog" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
{{ $t('firefly.profile_oauth_create_client') }}
</h4>
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">&times;</button>
</div>
<!-- Create Client Form -->
<form role="form">
<!-- Name -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.name') }}</label>
<div class="modal-body">
<!-- Form Errors -->
<div v-if="createForm.errors.length > 0" class="alert alert-danger">
<p class="mb-0"><strong>{{ $t('firefly.profile_whoops') }}</strong> {{
$t('firefly.profile_something_wrong')
}}</p>
<br>
<ul>
<li v-for="error in createForm.errors">
{{ error }}
</li>
</ul>
</div>
<div class="col-md-9">
<input id="create-client-name" type="text" class="form-control"
@keyup.enter="store" v-model="createForm.name">
<!-- Create Client Form -->
<form role="form">
<!-- Name -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.name') }}</label>
<span class="form-text text-muted">
<div class="col-md-9">
<input id="create-client-name" v-model="createForm.name" class="form-control"
type="text" @keyup.enter="store">
<span class="form-text text-muted">
{{ $t('firefly.profile_oauth_name_help') }}
</span>
</div>
</div>
</div>
<!-- Redirect URL -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.profile_oauth_redirect_url') }}</label>
<!-- Redirect URL -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.profile_oauth_redirect_url') }}</label>
<div class="col-md-9">
<input type="text" class="form-control" name="redirect"
@keyup.enter="store" v-model="createForm.redirect">
<div class="col-md-9">
<input v-model="createForm.redirect" class="form-control" name="redirect"
type="text" @keyup.enter="store">
<span class="form-text text-muted">
<span class="form-text text-muted">
{{ $t('firefly.profile_oauth_redirect_url_help') }}
</span>
</div>
</div>
<!-- Confidential -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.profile_oauth_confidential') }}</label>
<div class="col-md-9">
<div class="checkbox">
<label>
<input type="checkbox" v-model="createForm.confidential">
</label>
</div>
</div>
<span class="form-text text-muted">
<!-- Confidential -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.profile_oauth_confidential') }}</label>
<div class="col-md-9">
<div class="checkbox">
<label>
<input v-model="createForm.confidential" type="checkbox">
</label>
</div>
<span class="form-text text-muted">
{{ $t('firefly.profile_oauth_confidential_help') }}
</span>
</div>
</div>
</div>
</form>
</div>
<!-- Modal Actions -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ $t('firefly.close') }}</button>
<button type="button" class="btn btn-primary" @click="store">
{{ $t('firefly.profile_create') }}
</button>
</div>
</div>
</div>
</div>
<!-- Edit Client Modal -->
<div class="modal fade" id="modal-edit-client" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
{{ $t('firefly.profile_oauth_edit_client') }}
</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
<!-- Form Errors -->
<div class="alert alert-danger" v-if="editForm.errors.length > 0">
<p class="mb-0"><strong>{{ $t('firefly.profile_whoops') }}</strong> {{
$t('firefly.profile_something_wrong')
}}</p>
<br>
<ul>
<li v-for="error in editForm.errors">
{{ error }}
</li>
</ul>
</form>
</div>
<!-- Edit Client Form -->
<form role="form">
<!-- Name -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.name') }}</label>
<!-- Modal Actions -->
<div class="modal-footer">
<button class="btn btn-secondary" data-dismiss="modal" type="button">{{ $t('firefly.close') }}</button>
<div class="col-md-9">
<input id="edit-client-name" type="text" class="form-control"
@keyup.enter="update" v-model="editForm.name">
<button class="btn btn-primary" type="button" @click="store">
{{ $t('firefly.profile_create') }}
</button>
</div>
</div>
</div>
</div>
<span class="form-text text-muted">
<!-- Edit Client Modal -->
<div id="modal-edit-client" class="modal fade" role="dialog" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
{{ $t('firefly.profile_oauth_edit_client') }}
</h4>
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">&times;</button>
</div>
<div class="modal-body">
<!-- Form Errors -->
<div v-if="editForm.errors.length > 0" class="alert alert-danger">
<p class="mb-0"><strong>{{ $t('firefly.profile_whoops') }}</strong> {{
$t('firefly.profile_something_wrong')
}}</p>
<br>
<ul>
<li v-for="error in editForm.errors">
{{ error }}
</li>
</ul>
</div>
<!-- Edit Client Form -->
<form role="form">
<!-- Name -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.name') }}</label>
<div class="col-md-9">
<input id="edit-client-name" v-model="editForm.name" class="form-control"
type="text" @keyup.enter="update">
<span class="form-text text-muted">
{{ $t('firefly.profile_oauth_name_help') }}
</span>
</div>
</div>
</div>
<!-- Redirect URL -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.profile_oauth_redirect_url') }}</label>
<!-- Redirect URL -->
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ $t('firefly.profile_oauth_redirect_url') }}</label>
<div class="col-md-9">
<input type="text" class="form-control" name="redirect"
@keyup.enter="update" v-model="editForm.redirect">
<div class="col-md-9">
<input v-model="editForm.redirect" class="form-control" name="redirect"
type="text" @keyup.enter="update">
<span class="form-text text-muted">
<span class="form-text text-muted">
{{ $t('firefly.profile_oauth_redirect_url_help') }}
</span>
</div>
</div>
</div>
</form>
</div>
</form>
</div>
<!-- Modal Actions -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ $t('firefly.close') }}</button>
<!-- Modal Actions -->
<div class="modal-footer">
<button class="btn btn-secondary" data-dismiss="modal" type="button">{{ $t('firefly.close') }}</button>
<button type="button" class="btn btn-primary" @click="update">
{{ $t('firefly.profile_save_changes') }}
</button>
<button class="btn btn-primary" type="button" @click="update">
{{ $t('firefly.profile_save_changes') }}
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Client Secret Modal -->
<div class="modal fade" id="modal-client-secret" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
{{ $t('firefly.profile_oauth_client_secret_title') }}
</h4>
<!-- Client Secret Modal -->
<div id="modal-client-secret" class="modal fade" role="dialog" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
{{ $t('firefly.profile_oauth_client_secret_title') }}
</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">&times;</button>
</div>
<div class="modal-body">
<p>
{{ $t('firefly.profile_oauth_client_secret_expl') }}
</p>
<div class="modal-body">
<p>
{{ $t('firefly.profile_oauth_client_secret_expl') }}
</p>
<input type="text" class="form-control" v-model="clientSecret">
</div>
<input v-model="clientSecret" class="form-control" type="text">
</div>
<!-- Modal Actions -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ $t('firefly.close') }}</button>
<!-- Modal Actions -->
<div class="modal-footer">
<button class="btn btn-secondary" data-dismiss="modal" type="button">{{ $t('firefly.close') }}</button>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>

View File

@@ -30,19 +30,19 @@
<div class="box box-default">
<div class="box-header">
<h3 class="box-title">{{ $t('firefly.profile_personal_access_tokens') }}</h3>
<a class="btn btn-default pull-right" tabindex="-1" @click="showCreateTokenForm">
{{ $t('firefly.profile_create_new_token') }}
</a>
</div>
<a class="btn btn-default pull-right" tabindex="-1" @click="showCreateTokenForm">
{{ $t('firefly.profile_create_new_token') }}
</a>
</div>
<div class="box-body">
<!-- No Tokens Notice -->
<p class="mb-0" v-if="tokens.length === 0">
<p v-if="tokens.length === 0" class="mb-0">
{{ $t('firefly.profile_no_personal_access_token') }}
</p>
<!-- Personal Access Tokens -->
<table class="table table-responsive table-borderless mb-0" v-if="tokens.length > 0">
<table v-if="tokens.length > 0" class="table table-responsive table-borderless mb-0">
<caption style="display:none;">{{ $t('firefly.profile_personal_access_tokens') }}</caption>
<thead>
<tr>
@@ -77,7 +77,7 @@
</div>
<!-- Create Token Modal -->
<div class="modal fade" id="modal-create-token" tabindex="-1" role="dialog">
<div id="modal-create-token" class="modal fade" role="dialog" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
@@ -85,13 +85,14 @@
{{ $t('firefly.profile_create_token') }}
</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">&times;</button>
</div>
<div class="modal-body">
<!-- Form Errors -->
<div class="alert alert-danger" v-if="form.errors.length > 0">
<p class="mb-0"><strong>{{ $t('firefly.profile_whoops') }}</strong> {{ $t('firefly.profile_something_wrong') }}</p>
<div v-if="form.errors.length > 0" class="alert alert-danger">
<p class="mb-0"><strong>{{ $t('firefly.profile_whoops') }}</strong>
{{ $t('firefly.profile_something_wrong') }}</p>
<br>
<ul>
<li v-for="error in form.errors">
@@ -107,21 +108,21 @@
<label class="col-md-4 col-form-label">{{ $t('firefly.name') }}</label>
<div class="col-md-6">
<input id="create-token-name" type="text" class="form-control" name="name" v-model="form.name">
<input id="create-token-name" v-model="form.name" class="form-control" name="name" type="text">
</div>
</div>
<!-- Scopes -->
<div class="form-group row" v-if="scopes.length > 0">
<div v-if="scopes.length > 0" class="form-group row">
<label class="col-md-4 col-form-label">{{ $t('firefly.profile_scopes') }}</label>
<div class="col-md-6">
<div v-for="scope in scopes">
<div class="checkbox">
<label>
<input type="checkbox"
@click="toggleScope(scope.id)"
:checked="scopeIsAssigned(scope.id)">
<input :checked="scopeIsAssigned(scope.id)"
type="checkbox"
@click="toggleScope(scope.id)">
{{ scope.id }}
</label>
@@ -134,9 +135,9 @@
<!-- Modal Actions -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ $t('firefly.close') }}</button>
<button class="btn btn-secondary" data-dismiss="modal" type="button">{{ $t('firefly.close') }}</button>
<button type="button" class="btn btn-primary" @click="store">
<button class="btn btn-primary" type="button" @click="store">
Create
</button>
</div>
@@ -145,7 +146,7 @@
</div>
<!-- Access Token Modal -->
<div class="modal fade" id="modal-access-token" tabindex="-1" role="dialog">
<div id="modal-access-token" class="modal fade" role="dialog" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
@@ -153,19 +154,19 @@
{{ $t('firefly.profile_personal_access_token') }}
</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">&times;</button>
</div>
<div class="modal-body">
<p>
{{ $t('firefly.profile_personal_access_token_explanation') }}
</p>
<textarea readonly style="width:100%;" rows="20" class="form-control">{{ accessToken }}</textarea>
<textarea class="form-control" readonly rows="20" style="width:100%;">{{ accessToken }}</textarea>
</div>
<!-- Modal Actions -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ $t('firefly.close') }}</button>
<button class="btn btn-secondary" data-dismiss="modal" type="button">{{ $t('firefly.close') }}</button>
</div>
</div>
</div>

View File

@@ -19,29 +19,29 @@
-->
<template>
<div>
<div class="row">
<div class="col-lg-12">
<passport-clients></passport-clients>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<passport-authorized-clients></passport-authorized-clients>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<passport-personal-access-tokens></passport-personal-access-tokens>
</div>
</div>
<div>
<div class="row">
<div class="col-lg-12">
<passport-clients></passport-clients>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<passport-authorized-clients></passport-authorized-clients>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<passport-personal-access-tokens></passport-personal-access-tokens>
</div>
</div>
</div>
</template>
<script>
export default {
name: "ProfileOptions"
}
export default {
name: "ProfileOptions"
}
</script>
<style scoped>

View File

@@ -18,207 +18,207 @@
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<template>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ inputDescription }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input
ref="input"
type="text"
:placeholder="inputDescription"
:data-index="index"
autocomplete="off"
data-role="input"
v-on:keypress="handleEnter"
:disabled="inputDisabled"
class="form-control"
v-on:submit.prevent
:name="inputName"
:title="inputDescription">
<span class="input-group-btn">
<button
v-on:click="clearSource"
class="btn btn-default"
tabIndex="-1"
type="button"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<typeahead
:open-on-empty=true
:open-on-focus=true
v-on:input="selectedItem"
:async-function="aSyncFunction"
v-model="name"
:target="target"
item-key="name_with_balance"
></typeahead>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ inputDescription }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input
ref="input"
:data-index="index"
:disabled="inputDisabled"
:name="inputName"
:placeholder="inputDescription"
:title="inputDescription"
autocomplete="off"
class="form-control"
data-role="input"
type="text"
v-on:keypress="handleEnter"
v-on:submit.prevent>
<span class="input-group-btn">
<button
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearSource"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<typeahead
v-model="name"
:async-function="aSyncFunction"
:open-on-empty=true
:open-on-focus=true
:target="target"
item-key="name_with_balance"
v-on:input="selectedItem"
></typeahead>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
export default {
props: {
inputName: String,
inputDescription: String,
index: Number,
transactionType: String,
error: Array,
accountName: {
type: String,
default: ''
},
accountTypeFilters: {
type: Array,
default: function () {
return [];
}
},
defaultAccountTypeFilters: {
type: Array,
default: function () {
return [];
}
}
},
data() {
return {
accountAutoCompleteURI: null,
name: null,
trType: this.transactionType,
target: null,
inputDisabled: false,
allowedTypes: this.accountTypeFilters,
defaultAllowedTypes: this.defaultAccountTypeFilters
}
},
ready() {
// console.log('ready(): this.name = this.accountName (' + this.accountName + ')');
this.name = this.accountName;
},
mounted() {
this.target = this.$refs.input;
this.updateACURI(this.allowedTypes.join(','));
// console.log('mounted(): this.name = this.accountName (' + this.accountName + ')');
this.name = this.accountName;
this.triggerTransactionType();
},
watch: {
transactionType() {
this.triggerTransactionType();
},
accountName() {
// console.log('AccountSelect watch accountName!');
this.name = this.accountName;
},
accountTypeFilters() {
let types = this.accountTypeFilters.join(',');
if (0 === this.accountTypeFilters.length) {
types = this.defaultAccountTypeFilters.join(',');
}
this.updateACURI(types);
},
name() {
// console.log('Watch: name()');
// console.log(this.name);
}
},
methods:
{
aSyncFunction: function (query, done) {
axios.get(this.accountAutoCompleteURI + query)
.then(res => {
done(res.data);
})
.catch(err => {
// any error handler
})
},
updateACURI: function (types) {
this.accountAutoCompleteURI =
document.getElementsByTagName('base')[0].href +
'api/v1/autocomplete/accounts' +
'?types=' +
types +
'&query=';
// console.log('Auto complete URI is now ' + this.accountAutoCompleteURI);
},
hasError: function () {
return this.error.length > 0;
},
triggerTransactionType: function () {
// console.log('On triggerTransactionType(' + this.inputName + ')');
if(null === this.name) {
// console.log('this.name is NULL.');
}
if (null === this.transactionType) {
// console.log('Transaction type is NULL.');
return;
}
if ('' === this.transactionType) {
// console.log('Transaction type is "".');
return;
}
this.inputDisabled = false;
if (this.transactionType.toString() !== '' && this.index > 0) {
if (this.transactionType.toString().toLowerCase() === 'transfer') {
this.inputDisabled = true;
// todo: needs to copy value from very first input
return;
}
if (this.transactionType.toString().toLowerCase() === 'withdrawal' && this.inputName.substr(0, 6).toLowerCase() === 'source') {
// todo also clear value?
this.inputDisabled = true;
return;
}
if (this.transactionType.toString().toLowerCase() === 'deposit' && this.inputName.substr(0, 11).toLowerCase() === 'destination') {
// todo also clear value?
this.inputDisabled = true;
}
}
},
selectedItem: function (e) {
// console.log('In SelectedItem()');
if (typeof this.name === 'undefined') {
// console.log('Is undefined');
return;
}
if(typeof this.name === 'string') {
// console.log('Is a string.');
//this.trType = null;
this.$emit('clear:value');
}
// emit the fact that the user selected a type of account
// (influencing the destination)
// console.log('Is some object maybe:');
// console.log(this.name);
this.$emit('select:account', this.name);
},
clearSource: function (e) {
// console.log('clearSource()');
//props.value = '';
this.name = '';
// some event?
this.$emit('clear:value')
},
handleEnter: function (e) {
// todo feels sloppy
if (e.keyCode === 13) {
//e.preventDefault();
}
}
}
export default {
props: {
inputName: String,
inputDescription: String,
index: Number,
transactionType: String,
error: Array,
accountName: {
type: String,
default: ''
},
accountTypeFilters: {
type: Array,
default: function () {
return [];
}
},
defaultAccountTypeFilters: {
type: Array,
default: function () {
return [];
}
}
},
data() {
return {
accountAutoCompleteURI: null,
name: null,
trType: this.transactionType,
target: null,
inputDisabled: false,
allowedTypes: this.accountTypeFilters,
defaultAllowedTypes: this.defaultAccountTypeFilters
}
},
ready() {
// console.log('ready(): this.name = this.accountName (' + this.accountName + ')');
this.name = this.accountName;
},
mounted() {
this.target = this.$refs.input;
this.updateACURI(this.allowedTypes.join(','));
// console.log('mounted(): this.name = this.accountName (' + this.accountName + ')');
this.name = this.accountName;
this.triggerTransactionType();
},
watch: {
transactionType() {
this.triggerTransactionType();
},
accountName() {
// console.log('AccountSelect watch accountName!');
this.name = this.accountName;
},
accountTypeFilters() {
let types = this.accountTypeFilters.join(',');
if (0 === this.accountTypeFilters.length) {
types = this.defaultAccountTypeFilters.join(',');
}
this.updateACURI(types);
},
name() {
// console.log('Watch: name()');
// console.log(this.name);
}
},
methods:
{
aSyncFunction: function (query, done) {
axios.get(this.accountAutoCompleteURI + query)
.then(res => {
done(res.data);
})
.catch(err => {
// any error handler
})
},
updateACURI: function (types) {
this.accountAutoCompleteURI =
document.getElementsByTagName('base')[0].href +
'api/v1/autocomplete/accounts' +
'?types=' +
types +
'&query=';
// console.log('Auto complete URI is now ' + this.accountAutoCompleteURI);
},
hasError: function () {
return this.error.length > 0;
},
triggerTransactionType: function () {
// console.log('On triggerTransactionType(' + this.inputName + ')');
if (null === this.name) {
// console.log('this.name is NULL.');
}
if (null === this.transactionType) {
// console.log('Transaction type is NULL.');
return;
}
if ('' === this.transactionType) {
// console.log('Transaction type is "".');
return;
}
this.inputDisabled = false;
if (this.transactionType.toString() !== '' && this.index > 0) {
if (this.transactionType.toString().toLowerCase() === 'transfer') {
this.inputDisabled = true;
// todo: needs to copy value from very first input
return;
}
if (this.transactionType.toString().toLowerCase() === 'withdrawal' && this.inputName.substr(0, 6).toLowerCase() === 'source') {
// todo also clear value?
this.inputDisabled = true;
return;
}
if (this.transactionType.toString().toLowerCase() === 'deposit' && this.inputName.substr(0, 11).toLowerCase() === 'destination') {
// todo also clear value?
this.inputDisabled = true;
}
}
},
selectedItem: function (e) {
// console.log('In SelectedItem()');
if (typeof this.name === 'undefined') {
// console.log('Is undefined');
return;
}
if (typeof this.name === 'string') {
// console.log('Is a string.');
//this.trType = null;
this.$emit('clear:value');
}
// emit the fact that the user selected a type of account
// (influencing the destination)
// console.log('Is some object maybe:');
// console.log(this.name);
this.$emit('select:account', this.name);
},
clearSource: function (e) {
// console.log('clearSource()');
//props.value = '';
this.name = '';
// some event?
this.$emit('clear:value')
},
handleEnter: function (e) {
// todo feels sloppy
if (e.keyCode === 13) {
//e.preventDefault();
}
}
}
}
</script>
<style scoped>

View File

@@ -23,31 +23,31 @@
<div class="col-sm-8 col-sm-offset-4 text-sm">
{{ $t('firefly.amount') }}
</div>
<label class="col-sm-4 control-label" ref="cur"></label>
<label ref="cur" class="col-sm-4 control-label"></label>
<div class="col-sm-8">
<div class="input-group">
<input type="number"
@input="handleInput"
ref="amount"
<input ref="amount"
:title="$t('firefly.amount')"
:value="value"
step="any"
autocomplete="off"
class="form-control"
name="amount[]"
:title="$t('firefly.amount')"
autocomplete="off"
v-bind:placeholder="$t('firefly.amount')">
step="any"
type="number"
v-bind:placeholder="$t('firefly.amount')"
@input="handleInput">
<span class="input-group-btn">
<button
v-on:click="clearAmount"
tabIndex="-1"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
tabIndex="-1"
type="button"
v-on:click="clearAmount"><i class="fa fa-trash-o"></i></button>
</span>
</div>
</div>
<ul class="list-unstyled" v-for="error in this.error">
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
@@ -133,7 +133,7 @@ export default {
console.log('amount: watch source triggered');
this.changeData();
},
value: function() {
value: function () {
console.log('amount: value changed');
},
destination: function () {

View File

@@ -19,29 +19,29 @@
-->
<template>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
v-if="typeof this.transactionType === 'undefined' || this.transactionType === 'withdrawal' || this.transactionType === 'Withdrawal' || this.transactionType === '' || null === this.transactionType">
<div v-if="typeof this.transactionType === 'undefined' || this.transactionType === 'withdrawal' || this.transactionType === 'Withdrawal' || this.transactionType === '' || null === this.transactionType"
class="form-group"
v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ $t('firefly.bill') }}
</div>
<div class="col-sm-12">
<select
name="bill[]"
v-if="this.bills.length > 0"
ref="bill"
v-model="selected"
@input="handleInput"
v-on:change="signalChange"
:title="$t('firefly.bill')"
class="form-control"
v-if="this.bills.length > 0">
name="bill[]"
@input="handleInput"
v-on:change="signalChange">
<option v-for="cBill in this.bills"
:label="cBill.name"
:value="cBill.id">{{ cBill.name }}
</option>
</select>
<p class="help-block" v-if="this.bills.length === 1" v-html="$t('firefly.no_bill_pointer')"></p>
<ul class="list-unstyled" v-for="error in this.error">
<p v-if="this.bills.length === 1" class="help-block" v-html="$t('firefly.no_bill_pointer')"></p>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>

View File

@@ -19,29 +19,29 @@
-->
<template>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
v-if="typeof this.transactionType === 'undefined' || this.transactionType === 'withdrawal' || this.transactionType === 'Withdrawal' || this.transactionType === '' || null === this.transactionType">
<div v-if="typeof this.transactionType === 'undefined' || this.transactionType === 'withdrawal' || this.transactionType === 'Withdrawal' || this.transactionType === '' || null === this.transactionType"
class="form-group"
v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ $t('firefly.budget') }}
</div>
<div class="col-sm-12">
<select
name="budget[]"
v-if="this.budgets.length > 0"
ref="budget"
v-model="selected"
@input="handleInput"
v-on:change="signalChange"
:title="$t('firefly.budget')"
class="form-control"
v-if="this.budgets.length > 0">
name="budget[]"
@input="handleInput"
v-on:change="signalChange">
<option v-for="cBudget in this.budgets"
:label="cBudget.name"
:value="cBudget.id">{{ cBudget.name }}
</option>
</select>
<p class="help-block" v-if="this.budgets.length === 1" v-html="$t('firefly.no_budget_pointer')"></p>
<ul class="list-unstyled" v-for="error in this.error">
<p v-if="this.budgets.length === 1" class="help-block" v-html="$t('firefly.no_budget_pointer')"></p>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>

View File

@@ -19,125 +19,125 @@
-->
<template>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ $t('firefly.category') }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input
ref="input"
:value="value"
@input="handleInput"
type="text"
v-bind:placeholder="$t('firefly.category')"
autocomplete="off"
data-role="input"
v-on:keypress="handleEnter"
class="form-control"
v-on:submit.prevent
name="category[]"
v-bind:title="$t('firefly.category')">
<span class="input-group-btn">
<button
v-on:click="clearCategory"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<typeahead
:open-on-empty=true
:open-on-focus=true
v-on:input="selectedItem"
:async-function="aSyncFunction"
v-model="name"
:target="target"
item-key="name"
></typeahead>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ $t('firefly.category') }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input
ref="input"
:value="value"
autocomplete="off"
class="form-control"
data-role="input"
name="category[]"
type="text"
v-bind:placeholder="$t('firefly.category')"
v-bind:title="$t('firefly.category')"
@input="handleInput"
v-on:keypress="handleEnter"
v-on:submit.prevent>
<span class="input-group-btn">
<button
class="btn btn-default"
type="button"
v-on:click="clearCategory"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<typeahead
v-model="name"
:async-function="aSyncFunction"
:open-on-empty=true
:open-on-focus=true
:target="target"
item-key="name"
v-on:input="selectedItem"
></typeahead>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: "Category",
props: {
value: String,
inputName: String,
error: Array,
accountName: {
type: String,
default: ''
},
},
data() {
return {
categoryAutoCompleteURI: null,
name: null,
target: null,
}
},
ready() {
this.name = this.accountName;
},
mounted() {
this.target = this.$refs.input;
this.categoryAutoCompleteURI = document.getElementsByTagName('base')[0].href + "api/v1/autocomplete/categories?query=";
},
methods: {
hasError: function () {
return this.error.length > 0;
},
aSyncFunction: function (query, done) {
axios.get(this.categoryAutoCompleteURI + query)
.then(res => {
done(res.data);
})
.catch(err => {
// any error handler
})
},
handleInput(e) {
if (typeof this.$refs.input.value === 'string') {
this.$emit('input', this.$refs.input.value);
return;
}
this.$emit('input', this.$refs.input.value.name);
},
clearCategory: function () {
//props.value = '';
this.name = '';
this.$refs.input.value = '';
this.$emit('input', this.$refs.input.value);
// some event?
this.$emit('clear:category')
},
selectedItem: function (e) {
if (typeof this.name === 'undefined') {
return;
}
// emit the fact that the user selected a type of account
// (influencing the destination)
this.$emit('select:category', this.name);
if (typeof this.name === 'string') {
this.$emit('input', this.name);
return;
}
this.$emit('input', this.name.name);
},
handleEnter: function (e) {
// todo feels sloppy
if (e.keyCode === 13) {
//e.preventDefault();
}
}
}
export default {
name: "Category",
props: {
value: String,
inputName: String,
error: Array,
accountName: {
type: String,
default: ''
},
},
data() {
return {
categoryAutoCompleteURI: null,
name: null,
target: null,
}
},
ready() {
this.name = this.accountName;
},
mounted() {
this.target = this.$refs.input;
this.categoryAutoCompleteURI = document.getElementsByTagName('base')[0].href + "api/v1/autocomplete/categories?query=";
},
methods: {
hasError: function () {
return this.error.length > 0;
},
aSyncFunction: function (query, done) {
axios.get(this.categoryAutoCompleteURI + query)
.then(res => {
done(res.data);
})
.catch(err => {
// any error handler
})
},
handleInput(e) {
if (typeof this.$refs.input.value === 'string') {
this.$emit('input', this.$refs.input.value);
return;
}
this.$emit('input', this.$refs.input.value.name);
},
clearCategory: function () {
//props.value = '';
this.name = '';
this.$refs.input.value = '';
this.$emit('input', this.$refs.input.value);
// some event?
this.$emit('clear:category')
},
selectedItem: function (e) {
if (typeof this.name === 'undefined') {
return;
}
// emit the fact that the user selected a type of account
// (influencing the destination)
this.$emit('select:category', this.name);
if (typeof this.name === 'string') {
this.$emit('input', this.name);
return;
}
this.$emit('input', this.name.name);
},
handleEnter: function (e) {
// todo feels sloppy
if (e.keyCode === 13) {
//e.preventDefault();
}
}
}
}
</script>
<style scoped>

View File

@@ -21,27 +21,27 @@
<template>
<form accept-charset="UTF-8" class="form-horizontal" enctype="multipart/form-data">
<input name="_token" type="hidden" value="xxx">
<div class="row" v-if="error_message !== ''">
<div v-if="error_message !== ''" class="row">
<div class="col-lg-12">
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" v-bind:aria-label="$t('firefly.close')"><span
<button class="close" data-dismiss="alert" type="button" v-bind:aria-label="$t('firefly.close')"><span
aria-hidden="true">&times;</span></button>
<strong>{{ $t("firefly.flash_error") }}</strong> {{ error_message }}
</div>
</div>
</div>
<div class="row" v-if="success_message !== ''">
<div v-if="success_message !== ''" class="row">
<div class="col-lg-12">
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" v-bind:aria-label="$t('firefly.close')"><span
<button class="close" data-dismiss="alert" type="button" v-bind:aria-label="$t('firefly.close')"><span
aria-hidden="true">&times;</span></button>
<strong>{{ $t("firefly.flash_success") }}</strong> <span v-html="success_message"></span>
</div>
</div>
</div>
<div>
<div class="row" v-for="(transaction, index) in transactions">
<div v-for="(transaction, index) in transactions" class="row">
<div class="col-lg-12">
<div class="box">
<div class="box-header with-border">
@@ -51,116 +51,117 @@
}}</span>
<span v-if="transactions.length === 1">{{ $t('firefly.transaction_journal_information') }}</span>
</h3>
<div class="box-tools pull-right" v-if="transactions.length > 1" x>
<button type="button" v-on:click="deleteTransaction(index, $event)" class="btn btn-xs btn-danger"><i
<div v-if="transactions.length > 1" class="box-tools pull-right" x>
<button class="btn btn-xs btn-danger" type="button" v-on:click="deleteTransaction(index, $event)"><i
class="fa fa-trash"></i></button>
</div>
</div>
<div class="box-body">
<div class="row">
<div class="col-lg-4" id="transaction-info">
<div id="transaction-info" class="col-lg-4">
<transaction-description
v-model="transaction.description"
:index="index"
:error="transaction.errors.description"
:index="index"
>
</transaction-description>
<account-select
inputName="source[]"
v-bind:inputDescription="$t('firefly.source_account')"
:accountName="transaction.source_account.name"
:accountTypeFilters="transaction.source_account.allowed_types"
:defaultAccountTypeFilters="transaction.source_account.default_allowed_types"
:transactionType="transactionType"
:error="transaction.errors.source_account"
:index="index"
:transactionType="transactionType"
inputName="source[]"
v-bind:inputDescription="$t('firefly.source_account')"
v-on:clear:value="clearSource(index)"
v-on:select:account="selectedSourceAccount(index, $event)"
:error="transaction.errors.source_account"
></account-select>
<account-select
inputName="destination[]"
v-bind:inputDescription="$t('firefly.destination_account')"
:accountName="transaction.destination_account.name"
:accountTypeFilters="transaction.destination_account.allowed_types"
:defaultAccountTypeFilters="transaction.destination_account.default_allowed_types"
:transactionType="transactionType"
:error="transaction.errors.destination_account"
:index="index"
:transactionType="transactionType"
inputName="destination[]"
v-bind:inputDescription="$t('firefly.destination_account')"
v-on:clear:value="clearDestination(index)"
v-on:select:account="selectedDestinationAccount(index, $event)"
:error="transaction.errors.destination_account"
></account-select>
<p class="text-warning" v-if="0!== index && (null === transactionType || 'invalid' === transactionType || '' === transactionType)">
<p v-if="0!== index && (null === transactionType || 'invalid' === transactionType || '' === transactionType)"
class="text-warning">
{{ $t('firefly.multi_account_warning_unknown') }}
</p>
<p class="text-warning" v-if="0!== index && 'Withdrawal' === transactionType">
<p v-if="0!== index && 'Withdrawal' === transactionType" class="text-warning">
{{ $t('firefly.multi_account_warning_withdrawal') }}
</p>
<p class="text-warning" v-if="0!== index && 'Deposit' === transactionType">
<p v-if="0!== index && 'Deposit' === transactionType" class="text-warning">
{{ $t('firefly.multi_account_warning_deposit') }}
</p>
<p class="text-warning" v-if="0!== index && 'Transfer' === transactionType">
<p v-if="0!== index && 'Transfer' === transactionType" class="text-warning">
{{ $t('firefly.multi_account_warning_transfer') }}
</p>
<standard-date v-if="0===index"
v-model="transaction.date"
:index="index"
:error="transaction.errors.date"
:index="index"
>
</standard-date>
<div v-if="index===0">
<transaction-type
:source="transaction.source_account.type"
:destination="transaction.destination_account.type"
:source="transaction.source_account.type"
v-on:set:transactionType="setTransactionType($event)"
v-on:act:limitSourceType="limitSourceType($event)"
v-on:act:limitDestinationType="limitDestinationType($event)"
></transaction-type>
</div>
</div>
<div class="col-lg-4" id="amount-info">
<div id="amount-info" class="col-lg-4">
<amount
:source="transaction.source_account"
:destination="transaction.destination_account"
v-model="transaction.amount"
:destination="transaction.destination_account"
:error="transaction.errors.amount"
:source="transaction.source_account"
:transactionType="transactionType"
></amount>
<foreign-amount
:source="transaction.source_account"
:destination="transaction.destination_account"
v-model="transaction.foreign_amount"
:transactionType="transactionType"
:destination="transaction.destination_account"
:error="transaction.errors.foreign_amount"
:source="transaction.source_account"
:transactionType="transactionType"
v-bind:title="$t('form.foreign_amount')"
></foreign-amount>
</div>
<div class="col-lg-4" id="optional-info">
<div id="optional-info" class="col-lg-4">
<budget
:transactionType="transactionType"
v-model="transaction.budget"
:error="transaction.errors.budget_id"
:no_budget="$t('firefly.none_in_select_list')"
:transactionType="transactionType"
></budget>
<category
:transactionType="transactionType"
v-model="transaction.category"
:error="transaction.errors.category"
:transactionType="transactionType"
></category>
<piggy-bank
:transactionType="transactionType"
v-model="transaction.piggy_bank"
:error="transaction.errors.piggy_bank"
:no_piggy_bank="$t('firefly.no_piggy_bank')"
:transactionType="transactionType"
></piggy-bank>
<tags
v-model="transaction.tags"
:error="transaction.errors.tags"
></tags>
<bill
:transactionType="transactionType"
v-model="transaction.bill"
:error="transaction.errors.bill_id"
:no_bill="$t('firefly.none_in_select_list')"
:transactionType="transactionType"
></bill>
<custom-transaction-fields
v-model="transaction.custom_fields"
@@ -169,7 +170,7 @@
</div>
</div>
</div>
<div class="box-footer" v-if="transactions.length-1 === index">
<div v-if="transactions.length-1 === index" class="box-footer">
<button class="split_add_btn btn btn-default" type="button" @click="addTransactionToArray">
{{ $t('firefly.add_another_split') }}
</button>
@@ -178,7 +179,7 @@
</div>
</div>
</div>
<div class="row" v-if="transactions.length > 1">
<div v-if="transactions.length > 1" class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
@@ -188,8 +189,8 @@
</div>
<div class="box-body">
<group-description
:error="group_title_errors"
v-model="group_title"
:error="group_title_errors"
></group-description>
</div>
</div>
@@ -221,7 +222,7 @@
</div>
<div class="box-footer">
<div class="btn-group">
<button class="btn btn-success" id="submitButton" @click="submit">{{ $t('firefly.submit') }}</button>
<button id="submitButton" class="btn btn-success" @click="submit">{{ $t('firefly.submit') }}</button>
</div>
<p class="text-success" v-html="success_message"></p>
<p class="text-danger" v-html="error_message"></p>

View File

@@ -27,20 +27,20 @@
</div>
<div class="col-sm-12">
<div class="input-group">
<input multiple="multiple"
autocomplete="off"
<input ref="input"
:name="name"
:placeholder="title"
:title="title"
ref="input"
:name="name" type="file" class="form-control">
autocomplete="off"
class="form-control" multiple="multiple" type="file">
<span class="input-group-btn">
<button
v-on:click="clearAtt"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
type="button"
v-on:click="clearAtt"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul class="list-unstyled" v-for="error in this.error">
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>

View File

@@ -19,58 +19,58 @@
-->
<template>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ title }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input type="date" class="form-control" :name="name"
:title="title" autocomplete="off"
ref="date"
:value="value ? value.substr(0,10): ''" @input="handleInput"
:placeholder="title">
<span class="input-group-btn">
<button
tabIndex="-1"
v-on:click="clearDate"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ title }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input ref="date" :name="name" :placeholder="title"
:title="title" :value="value ? value.substr(0,10): ''"
autocomplete="off"
class="form-control" type="date"
@input="handleInput">
<span class="input-group-btn">
<button
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearDate"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: "CustomDate",
props: {
value: String,
title: String,
name: String,
error: Array,
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.date.value);
},
hasError: function () {
return this.error.length > 0;
},
clearDate: function () {
//props.value = '';
this.name = '';
this.$refs.date.value = '';
this.$emit('input', this.$refs.date.value);
},
}
}
export default {
name: "CustomDate",
props: {
value: String,
title: String,
name: String,
error: Array,
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.date.value);
},
hasError: function () {
return this.error.length > 0;
},
clearDate: function () {
//props.value = '';
this.name = '';
this.$refs.date.value = '';
this.$emit('input', this.$refs.date.value);
},
}
}
</script>
<style scoped>

View File

@@ -19,58 +19,58 @@
-->
<template>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ title }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input type="text" class="form-control" :name="name"
:title="title" autocomplete="off"
ref="str"
:value="value" @input="handleInput"
:placeholder="title">
<span class="input-group-btn">
<button
tabIndex="-1"
v-on:click="clearField"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ title }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input ref="str" :name="name" :placeholder="title"
:title="title" :value="value"
autocomplete="off"
class="form-control" type="text"
@input="handleInput">
<span class="input-group-btn">
<button
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearField"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: "CustomString",
props: {
title: String,
name: String,
value: String,
error: Array
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.str.value);
},
clearField: function () {
//props.value = '';
this.name = '';
this.$refs.str.value = '';
this.$emit('input', this.$refs.str.value);
},
hasError: function () {
return this.error.length > 0;
}
}
export default {
name: "CustomString",
props: {
title: String,
name: String,
value: String,
error: Array
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.str.value);
},
clearField: function () {
//props.value = '';
this.name = '';
this.$refs.str.value = '';
this.$emit('input', this.$refs.str.value);
},
hasError: function () {
return this.error.length > 0;
}
}
}
</script>
<style scoped>

View File

@@ -19,50 +19,50 @@
-->
<template>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ title }}
</div>
<div class="col-sm-12">
<textarea class="form-control" :name="name"
:title="title" autocomplete="off"
ref="str"
rows="8"
v-model="textValue"
@input="handleInput"
:placeholder="title"></textarea>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ title }}
</div>
<div class="col-sm-12">
<textarea ref="str" v-model="textValue"
:name="name" :placeholder="title"
:title="title"
autocomplete="off"
class="form-control"
rows="8"
@input="handleInput"></textarea>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: "CustomTextarea",
props: {
title: String,
name: String,
value: String,
error: Array
},
data() {
return {
textValue: this.value,
}
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.str.value);
},
hasError: function () {
return this.error.length > 0;
}
}
export default {
name: "CustomTextarea",
props: {
title: String,
name: String,
value: String,
error: Array
},
data() {
return {
textValue: this.value,
}
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.str.value);
},
hasError: function () {
return this.error.length > 0;
}
}
}
</script>
<style scoped>

View File

@@ -19,107 +19,117 @@
-->
<template>
<div>
<p class="help-block" v-html="$t('firefly.hidden_fields_preferences')"></p>
<component
:error="error.interest_date"
v-model="value.interest_date" v-if="this.fields.interest_date" name="interest_date[]" v-bind:title="$t('form.interest_date')" v-bind:is="dateComponent"></component>
<component
:error="error.book_date"
v-model="value.book_date" v-if="this.fields.book_date" name="book_date[]" v-bind:title="$t('form.book_date')" v-bind:is="dateComponent"></component>
<component
:error="error.process_date"
v-model="value.process_date" v-if="this.fields.process_date" name="process_date[]" v-bind:title="$t('form.process_date')" v-bind:is="dateComponent"></component>
<component
:error="error.due_date"
v-model="value.due_date" v-if="this.fields.due_date" name="due_date[]" v-bind:title="$t('form.due_date')" v-bind:is="dateComponent"></component>
<component
:error="error.payment_date"
v-model="value.payment_date" v-if="this.fields.payment_date" name="payment_date[]" v-bind:title="$t('form.payment_date')" v-bind:is="dateComponent"></component>
<div>
<p class="help-block" v-html="$t('firefly.hidden_fields_preferences')"></p>
<component
v-bind:is="dateComponent"
v-if="this.fields.interest_date" v-model="value.interest_date" :error="error.interest_date"
name="interest_date[]" v-bind:title="$t('form.interest_date')"></component>
<component
v-bind:is="dateComponent"
v-if="this.fields.book_date" v-model="value.book_date" :error="error.book_date" name="book_date[]"
v-bind:title="$t('form.book_date')"></component>
<component
v-bind:is="dateComponent"
v-if="this.fields.process_date" v-model="value.process_date" :error="error.process_date"
name="process_date[]" v-bind:title="$t('form.process_date')"></component>
<component
v-bind:is="dateComponent"
v-if="this.fields.due_date" v-model="value.due_date" :error="error.due_date" name="due_date[]"
v-bind:title="$t('form.due_date')"></component>
<component
v-bind:is="dateComponent"
v-if="this.fields.payment_date" v-model="value.payment_date" :error="error.payment_date"
name="payment_date[]" v-bind:title="$t('form.payment_date')"></component>
<component
:error="error.invoice_date"
v-model="value.invoice_date" v-if="this.fields.invoice_date" name="invoice_date[]" v-bind:title="$t('form.invoice_date')" v-bind:is="dateComponent"></component>
<component
v-bind:is="dateComponent"
v-if="this.fields.invoice_date" v-model="value.invoice_date" :error="error.invoice_date"
name="invoice_date[]" v-bind:title="$t('form.invoice_date')"></component>
<component
:error="error.internal_reference"
v-model="value.internal_reference" v-if="this.fields.internal_reference" name="internal_reference[]" v-bind:title="$t('form.internal_reference')" v-bind:is="stringComponent"></component>
<component
v-bind:is="stringComponent"
v-if="this.fields.internal_reference" v-model="value.internal_reference" :error="error.internal_reference"
name="internal_reference[]" v-bind:title="$t('form.internal_reference')"></component>
<component
:error="error.attachments"
v-model="value.attachments" v-if="this.fields.attachments" name="attachments[]" v-bind:title="$t('firefly.attachments')" v-bind:is="attachmentComponent"></component>
<component
v-bind:is="attachmentComponent"
v-if="this.fields.attachments" v-model="value.attachments" :error="error.attachments"
name="attachments[]" v-bind:title="$t('firefly.attachments')"></component>
<component
:error="error.external_uri"
v-model="value.external_uri" v-if="this.fields.external_uri" name="external_uri[]" v-bind:title="$t('firefly.external_uri')" v-bind:is="uriComponent"></component>
<component
v-bind:is="uriComponent"
v-if="this.fields.external_uri" v-model="value.external_uri" :error="error.external_uri"
name="external_uri[]" v-bind:title="$t('firefly.external_uri')"></component>
<component
:error="error.notes"
v-model="value.notes" v-if="this.fields.notes" name="notes[]" v-bind:title="$t('firefly.notes')" v-bind:is="textareaComponent"></component>
</div>
<component
v-bind:is="textareaComponent"
v-if="this.fields.notes" v-model="value.notes" :error="error.notes" name="notes[]"
v-bind:title="$t('firefly.notes')"></component>
</div>
</template>
<script>
export default {
name: "CustomTransactionFields",
props: ['value','error'],
mounted() {
this.getPreference();
},
data() {
return {
customInterestDate: null,
fields: [
{
"interest_date": false,
"book_date": false,
"process_date": false,
"due_date": false,
"payment_date": false,
"invoice_date": false,
"internal_reference": false,
"notes": false,
"attachments": false,
"external_uri": false
}
]
};
},
computed: {
// TODO this seems a pretty weird way of doing it.
dateComponent () {
return 'custom-date';
},
stringComponent () {
return 'custom-string';
},
attachmentComponent () {
return 'custom-attachments';
},
textareaComponent () {
return 'custom-textarea';
},
uriComponent () {
return 'custom-uri';
}
},
methods: {
handleInput(e) {
this.$emit('input', this.value);
},
getPreference() {
// Vue.component('custom-date', (resolve) => {
// console.log('loaded');
// });
const url = document.getElementsByTagName('base')[0].href + 'api/v1/preferences/transaction_journal_optional_fields';
axios.get(url).then(response => {
this.fields = response.data.data.attributes.data;
}).catch(() => console.warn('Oh. Something went wrong loading custom transaction fields.'));
},
export default {
name: "CustomTransactionFields",
props: ['value', 'error'],
mounted() {
this.getPreference();
},
data() {
return {
customInterestDate: null,
fields: [
{
"interest_date": false,
"book_date": false,
"process_date": false,
"due_date": false,
"payment_date": false,
"invoice_date": false,
"internal_reference": false,
"notes": false,
"attachments": false,
"external_uri": false
}
]
};
},
computed: {
// TODO this seems a pretty weird way of doing it.
dateComponent() {
return 'custom-date';
},
stringComponent() {
return 'custom-string';
},
attachmentComponent() {
return 'custom-attachments';
},
textareaComponent() {
return 'custom-textarea';
},
uriComponent() {
return 'custom-uri';
}
},
methods: {
handleInput(e) {
this.$emit('input', this.value);
},
getPreference() {
// Vue.component('custom-date', (resolve) => {
// console.log('loaded');
// });
const url = document.getElementsByTagName('base')[0].href + 'api/v1/preferences/transaction_journal_optional_fields';
axios.get(url).then(response => {
this.fields = response.data.data.attributes.data;
}).catch(() => console.warn('Oh. Something went wrong loading custom transaction fields.'));
},
}
}
</script>
<style scoped>

View File

@@ -19,57 +19,57 @@
-->
<template>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ title }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input type="url" class="form-control" :name="name"
:title="title" autocomplete="off"
ref="uri"
:value="value" @input="handleInput"
:placeholder="title">
<span class="input-group-btn">
<button
tabIndex="-1"
v-on:click="clearField"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ title }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input ref="uri" :name="name" :placeholder="title"
:title="title" :value="value"
autocomplete="off"
class="form-control" type="url"
@input="handleInput">
<span class="input-group-btn">
<button
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearField"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: "CustomString",
props: {
title: String,
name: String,
value: String,
error: Array
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.uri.value);
},
clearField: function () {
this.name = '';
this.$refs.uri.value = '';
this.$emit('input', this.$refs.uri.value);
},
hasError: function () {
return this.error.length > 0;
}
}
export default {
name: "CustomString",
props: {
title: String,
name: String,
value: String,
error: Array
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.uri.value);
},
clearField: function () {
this.name = '';
this.$refs.uri.value = '';
this.$emit('input', this.$refs.uri.value);
},
hasError: function () {
return this.error.length > 0;
}
}
}
</script>
<style scoped>

View File

@@ -19,30 +19,30 @@
-->
<template>
<form method="POST" action="#" accept-charset="UTF-8" class="form-horizontal" id="store"
enctype="multipart/form-data">
<form id="store" accept-charset="UTF-8" action="#" class="form-horizontal" enctype="multipart/form-data"
method="POST">
<input name="_token" type="hidden" value="xxx">
<div class="row" v-if="error_message !== ''">
<div v-if="error_message !== ''" class="row">
<div class="col-lg-12">
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" v-bind:aria-label="$t('firefly.close')"><span
<button class="close" data-dismiss="alert" type="button" v-bind:aria-label="$t('firefly.close')"><span
aria-hidden="true">&times;</span></button>
<strong>{{ $t("firefly.flash_error") }}</strong> {{ error_message }}
</div>
</div>
</div>
<div class="row" v-if="success_message !== ''">
<div v-if="success_message !== ''" class="row">
<div class="col-lg-12">
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" v-bind:aria-label="$t('firefly.close')"><span
<button class="close" data-dismiss="alert" type="button" v-bind:aria-label="$t('firefly.close')"><span
aria-hidden="true">&times;</span></button>
<strong>{{ $t("firefly.flash_success") }}</strong> <span v-html="success_message"></span>
</div>
</div>
</div>
<div>
<div class="row" v-for="(transaction, index) in transactions">
<div v-for="(transaction, index) in transactions" class="row">
<div class="col-lg-12">
<div class="box">
<div class="box-header with-border">
@@ -52,8 +52,8 @@
}}</span>
<span v-if="transactions.length === 1">{{ $t('firefly.transaction_journal_information') }}</span>
</h3>
<div class="box-tools pull-right" v-if="transactions.length > 1">
<button type="button" v-on:click="deleteTransaction(index, $event)" class="btn btn-xs btn-danger"><i
<div v-if="transactions.length > 1" class="box-tools pull-right">
<button class="btn btn-xs btn-danger" type="button" v-on:click="deleteTransaction(index, $event)"><i
class="fa fa-trash"></i></button>
</div>
</div>
@@ -62,22 +62,22 @@
<div class="col-lg-4">
<transaction-description v-if="transactionType.toLowerCase() !== 'reconciliation'"
v-model="transaction.description"
:index="index"
:error="transaction.errors.description"
:index="index"
>
</transaction-description>
<account-select v-if="transactionType.toLowerCase() !== 'reconciliation'"
inputName="source[]"
v-bind:inputDescription="$t('firefly.source_account')"
:accountName="transaction.source_account.name"
:accountTypeFilters="transaction.source_account.allowed_types"
:transactionType="transactionType"
:error="transaction.errors.source_account"
:index="index"
:transactionType="transactionType"
inputName="source[]"
v-bind:inputDescription="$t('firefly.source_account')"
v-on:clear:value="clearSource(index)"
v-on:select:account="selectedSourceAccount(index, $event)"
:error="transaction.errors.source_account"
></account-select>
<div class="form-group" v-if="transactionType.toLowerCase() === 'reconciliation'">
<div v-if="transactionType.toLowerCase() === 'reconciliation'" class="form-group">
<div class="col-sm-12">
<p id="ffInput_source" class="form-control-static">
<em>
@@ -87,17 +87,17 @@
</div>
</div>
<account-select v-if="transactionType.toLowerCase() !== 'reconciliation'"
inputName="destination[]"
v-bind:inputDescription="$t('firefly.destination_account')"
:accountName="transaction.destination_account.name"
:accountTypeFilters="transaction.destination_account.allowed_types"
:transactionType="transactionType"
:error="transaction.errors.destination_account"
:index="index"
:transactionType="transactionType"
inputName="destination[]"
v-bind:inputDescription="$t('firefly.destination_account')"
v-on:clear:value="clearDestination(index)"
v-on:select:account="selectedDestinationAccount(index, $event)"
:error="transaction.errors.destination_account"
></account-select>
<div class="form-group" v-if="transactionType.toLowerCase() === 'reconciliation'">
<div v-if="transactionType.toLowerCase() === 'reconciliation'" class="form-group">
<div class="col-sm-12">
<p id="ffInput_dest" class="form-control-static">
<em>
@@ -108,14 +108,14 @@
</div>
<standard-date
v-model="transaction.date"
:index="index"
:error="transaction.errors.date"
:index="index"
>
</standard-date>
<div v-if="index===0">
<transaction-type
:source="transaction.source_account.type"
:destination="transaction.destination_account.type"
:source="transaction.source_account.type"
v-on:set:transactionType="setTransactionType($event)"
v-on:act:limitSourceType="limitSourceType($event)"
v-on:act:limitDestinationType="limitDestinationType($event)"
@@ -125,45 +125,45 @@
<div class="col-lg-4">
<!-- -->
<amount
:source="transaction.source_account"
:destination="transaction.destination_account"
v-model="transaction.amount"
:destination="transaction.destination_account"
:error="transaction.errors.amount"
:source="transaction.source_account"
:transactionType="transactionType"
></amount>
<foreign-amount v-if="transactionType.toLowerCase() !== 'reconciliation'"
:source="transaction.source_account"
:destination="transaction.destination_account"
v-model="transaction.foreign_amount"
:transactionType="transactionType"
:destination="transaction.destination_account"
:error="transaction.errors.foreign_amount"
:no_currency="$t('firefly.none_in_select_list')"
:source="transaction.source_account"
:transactionType="transactionType"
v-bind:title="$t('form.foreign_amount')"
></foreign-amount>
</div>
<div class="col-lg-4">
<budget
:transactionType="transactionType"
v-model="transaction.budget"
:error="transaction.errors.budget_id"
:no_budget="$t('firefly.none_in_select_list')"
:transactionType="transactionType"
></budget>
<category
:transactionType="transactionType"
v-model="transaction.category"
:error="transaction.errors.category"
:transactionType="transactionType"
></category>
<tags
:transactionType="transactionType"
:tags="transaction.tags"
v-model="transaction.tags"
:error="transaction.errors.tags"
:tags="transaction.tags"
:transactionType="transactionType"
></tags>
<bill
:transactionType="transactionType"
v-model="transaction.bill"
:error="transaction.errors.bill_id"
:no_bill="$t('firefly.none_in_select_list')"
:transactionType="transactionType"
></bill>
<custom-transaction-fields
v-model="transaction.custom_fields"
@@ -172,8 +172,8 @@
</div>
</div>
</div>
<div class="box-footer"
v-if="transactions.length-1 === index && transactionType.toLowerCase() !== 'reconciliation'">
<div v-if="transactions.length-1 === index && transactionType.toLowerCase() !== 'reconciliation'"
class="box-footer">
<button class="btn btn-default" type="button" @click="addTransaction">{{
$t('firefly.add_another_split')
}}
@@ -183,7 +183,7 @@
</div>
</div>
</div>
<div class="row" v-if="transactions.length > 1">
<div v-if="transactions.length > 1" class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
@@ -193,8 +193,8 @@
</div>
<div class="box-body">
<group-description
:error="group_title_errors"
v-model="group_title"
:error="group_title_errors"
></group-description>
</div>
</div>
@@ -215,7 +215,7 @@
{{ $t('firefly.after_update_create_another') }}
</label>
</div>
<div class="checkbox" v-if="null !== transactionType && transactionType.toLowerCase() !== 'reconciliation'">
<div v-if="null !== transactionType && transactionType.toLowerCase() !== 'reconciliation'" class="checkbox">
<label>
<input v-model="storeAsNew" name="store_as_new" type="checkbox">
{{ $t('firefly.store_as_new') }}
@@ -224,7 +224,7 @@
</div>
<div class="box-footer">
<div class="btn-group">
<button class="btn btn-success" @click="submit" id="submitButton">{{
<button id="submitButton" class="btn btn-success" @click="submit">{{
$t('firefly.update_transaction')
}}
</button>

View File

@@ -23,17 +23,17 @@
Show if:
- one or more currencies.
-->
<div class="form-group" v-bind:class="{ 'has-error': hasError()}" v-if="this.enabledCurrencies.length >= 1">
<div v-if="this.enabledCurrencies.length >= 1" class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-8 col-sm-offset-4 text-sm">
{{ $t('form.foreign_amount') }}
</div>
<div class="col-sm-4">
<select class="form-control" ref="currency_select" name="foreign_currency[]" @input="handleInput">
<select ref="currency_select" class="form-control" name="foreign_currency[]" @input="handleInput">
<option
v-for="currency in this.enabledCurrencies"
:value="currency.id"
:label="currency.attributes.name"
:selected="parseInt(value.currency_id) === parseInt(currency.id)"
:value="currency.id"
>
{{ currency.attributes.name }}
@@ -42,18 +42,18 @@
</div>
<div class="col-sm-8">
<div class="input-group">
<input type="number" @input="handleInput" ref="amount" :value="value.amount" step="any" class="form-control"
name="foreign_amount[]" v-if="this.enabledCurrencies.length > 0"
:title="this.title" autocomplete="off" :placeholder="this.title">
<input v-if="this.enabledCurrencies.length > 0" ref="amount" :placeholder="this.title" :title="this.title" :value="value.amount" autocomplete="off"
class="form-control" name="foreign_amount[]"
step="any" type="number" @input="handleInput">
<span class="input-group-btn">
<button
v-on:click="clearAmount"
tabIndex="-1"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
tabIndex="-1"
type="button"
v-on:click="clearAmount"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul class="list-unstyled" v-for="error in this.error">
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>

View File

@@ -19,59 +19,59 @@
-->
<template>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ $t('firefly.split_transaction_title') }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input
type="text"
class="form-control"
name="group_title"
v-bind:title="$t('firefly.split_transaction_title')"
ref="descr"
autocomplete="off"
v-bind:placeholder="$t('firefly.split_transaction_title')"
:value="value" @input="handleInput"
>
<span class="input-group-btn">
<button
tabIndex="-1"
v-on:click="clearField"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<p class="help-block" v-if="error.length === 0">
{{ $t('firefly.split_transaction_title_help') }}
</p>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ $t('firefly.split_transaction_title') }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input
ref="descr"
:value="value"
autocomplete="off"
class="form-control"
name="group_title"
type="text"
v-bind:placeholder="$t('firefly.split_transaction_title')"
v-bind:title="$t('firefly.split_transaction_title')" @input="handleInput"
>
<span class="input-group-btn">
<button
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearField"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<p v-if="error.length === 0" class="help-block">
{{ $t('firefly.split_transaction_title_help') }}
</p>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
export default {
props: ['error', 'value', 'index'],
name: "GroupDescription",
methods: {
hasError: function () {
return this.error.length > 0;
},
handleInput(e) {
this.$emit('input', this.$refs.descr.value);
},
clearField: function () {
//props.value = '';
this.name = '';
this.$refs.descr.value = '';
this.$emit('input', this.$refs.descr.value);
},
}
}
export default {
props: ['error', 'value', 'index'],
name: "GroupDescription",
methods: {
hasError: function () {
return this.error.length > 0;
},
handleInput(e) {
this.$emit('input', this.$refs.descr.value);
},
clearField: function () {
//props.value = '';
this.name = '';
this.$refs.descr.value = '';
this.$emit('input', this.$refs.descr.value);
},
}
}
</script>
<style scoped>

View File

@@ -18,98 +18,103 @@
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<template>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
v-if="typeof this.transactionType !== 'undefined' && this.transactionType === 'Transfer'">
<div class="col-sm-12 text-sm">
{{ $t('firefly.piggy_bank') }}
<div v-if="typeof this.transactionType !== 'undefined' && this.transactionType === 'Transfer'"
class="form-group"
v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ $t('firefly.piggy_bank') }}
</div>
<div class="col-sm-12">
<select name="piggy_bank[]" ref="piggy" @input="handleInput" class="form-control">
<optgroup v-for="(option, key) in this.piggies" v-bind:label="key">
<option v-for="piggy in option.piggies" :label="piggy.name_with_balance" :value="piggy.id">{{piggy.name_with_balance}}</option>
</optgroup>
</select>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
<div class="col-sm-12">
<select ref="piggy" class="form-control" name="piggy_bank[]" @input="handleInput">
<optgroup v-for="(option, key) in this.piggies" v-bind:label="key">
<option v-for="piggy in option.piggies" :label="piggy.name_with_balance" :value="piggy.id">
{{ piggy.name_with_balance }}
</option>
</optgroup>
</select>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: "PiggyBank",
props: ['value','transactionType','error', 'no_piggy_bank'],
mounted() {
this.loadPiggies();
},
data() {
return {
piggies: [],
}
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.piggy.value);
},
hasError: function () {
return this.error.length > 0;
},
loadPiggies: function () {
let URI = document.getElementsByTagName('base')[0].href + "api/v1/autocomplete/piggy-banks-with-balance?limit=1337";
axios.get(URI, {}).then((res) => {
let tempList = {
0: {
group: {
title: this.$t('firefly.default_group_title_name')
},
piggies: [
{
name_with_balance: this.no_piggy_bank,
id: 0,
}
],
}
};
for (const key in res.data) {
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
// add to temp list
let currentPiggy = res.data[key];
if (currentPiggy.objectGroup) {
let groupOrder = currentPiggy.objectGroup.order;
if (!tempList[groupOrder]) {
tempList[groupOrder] = {
group: {
title: currentPiggy.objectGroup.title
},
piggies: [],
};
}
tempList[groupOrder].piggies.push({name_with_balance: currentPiggy.name_with_balance, id: currentPiggy.id});
}
if (!currentPiggy.objectGroup) {
// add to empty one:
tempList[0].piggies.push({name_with_balance: currentPiggy.name_with_balance, id: currentPiggy.id});
}
//console.log(currentPiggy);
this.piggies.push(res.data[key]);
}
}
const ordered = {};
Object.keys(tempList).sort().forEach(function(key) {
let groupName = tempList[key].group.title;
ordered[groupName] = tempList[key];
});
// final list:
this.piggies = ordered;
// console.log(ordered);
});
}
}
export default {
name: "PiggyBank",
props: ['value', 'transactionType', 'error', 'no_piggy_bank'],
mounted() {
this.loadPiggies();
},
data() {
return {
piggies: [],
}
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.piggy.value);
},
hasError: function () {
return this.error.length > 0;
},
loadPiggies: function () {
let URI = document.getElementsByTagName('base')[0].href + "api/v1/autocomplete/piggy-banks-with-balance?limit=1337";
axios.get(URI, {}).then((res) => {
let tempList = {
0: {
group: {
title: this.$t('firefly.default_group_title_name')
},
piggies: [
{
name_with_balance: this.no_piggy_bank,
id: 0,
}
],
}
};
for (const key in res.data) {
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
// add to temp list
let currentPiggy = res.data[key];
if (currentPiggy.objectGroup) {
let groupOrder = currentPiggy.objectGroup.order;
if (!tempList[groupOrder]) {
tempList[groupOrder] = {
group: {
title: currentPiggy.objectGroup.title
},
piggies: [],
};
}
tempList[groupOrder].piggies.push({
name_with_balance: currentPiggy.name_with_balance,
id: currentPiggy.id
});
}
if (!currentPiggy.objectGroup) {
// add to empty one:
tempList[0].piggies.push({name_with_balance: currentPiggy.name_with_balance, id: currentPiggy.id});
}
//console.log(currentPiggy);
this.piggies.push(res.data[key]);
}
}
const ordered = {};
Object.keys(tempList).sort().forEach(function (key) {
let groupName = tempList[key].group.title;
ordered[groupName] = tempList[key];
});
// final list:
this.piggies = ordered;
// console.log(ordered);
});
}
}
}
</script>
<style scoped>

View File

@@ -19,61 +19,61 @@
-->
<template>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ $t('firefly.date') }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input
type="date"
class="form-control"
name="date[]"
v-bind:title="$t('firefly.date')"
ref="date"
autocomplete="off"
:disabled="index > 0"
v-bind:placeholder="$t('firefly.date')"
:value="value" @input="handleInput"
>
<span class="input-group-btn">
<button
tabIndex="-1"
v-on:click="clearDate"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
<div class="col-sm-12 text-sm">
{{ $t('firefly.date') }}
</div>
<div class="col-sm-12">
<div class="input-group">
<input
ref="date"
:disabled="index > 0"
:value="value"
autocomplete="off"
class="form-control"
name="date[]"
type="date"
v-bind:placeholder="$t('firefly.date')"
v-bind:title="$t('firefly.date')" @input="handleInput"
>
<span class="input-group-btn">
<button
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearDate"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
export default {
props: ['error', 'value', 'index'],
name: "StandardDate",
methods: {
hasError: function () {
return this.error.length > 0;
},
handleInput(e) {
this.$emit('input', this.$refs.date.value);
},
clearDate: function () {
//props.value = '';
this.name = '';
this.$refs.date.value = '';
this.$emit('input', this.$refs.date.value);
// some event?
this.$emit('clear:date')
},
}
}
export default {
props: ['error', 'value', 'index'],
name: "StandardDate",
methods: {
hasError: function () {
return this.error.length > 0;
},
handleInput(e) {
this.$emit('input', this.$refs.date.value);
},
clearDate: function () {
//props.value = '';
this.name = '';
this.$refs.date.value = '';
this.$emit('input', this.$refs.date.value);
// some event?
this.$emit('clear:date')
},
}
}
</script>
<style scoped>

View File

@@ -19,91 +19,91 @@
-->
<template>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ $t('firefly.tags') }}
</div>
<div class="col-sm-12">
<div class="input-group">
<vue-tags-input
v-model="tag"
:tags="tags"
:title="$t('firefly.tags')"
classes="form-input"
:autocomplete-items="autocompleteItems"
:add-only-from-autocomplete="false"
@tags-changed="update"
v-bind:placeholder="$t('firefly.tags')"
/>
<span class="input-group-btn">
<button
v-on:click="clearTags"
tabIndex="-1"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
</span>
</div>
</div>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
>
<div class="col-sm-12 text-sm">
{{ $t('firefly.tags') }}
</div>
<div class="col-sm-12">
<div class="input-group">
<vue-tags-input
v-model="tag"
:add-only-from-autocomplete="false"
:autocomplete-items="autocompleteItems"
:tags="tags"
:title="$t('firefly.tags')"
classes="form-input"
v-bind:placeholder="$t('firefly.tags')"
@tags-changed="update"
/>
<span class="input-group-btn">
<button
class="btn btn-default"
tabIndex="-1"
type="button"
v-on:click="clearTags"><i class="fa fa-trash-o"></i></button>
</span>
</div>
</div>
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>
</div>
</template>
<script>
import axios from 'axios';
import VueTagsInput from '@johmun/vue-tags-input';
import axios from 'axios';
import VueTagsInput from '@johmun/vue-tags-input';
export default {
name: "Tags",
components: {
VueTagsInput
},
props: ['value','error'],
data() {
return {
tag: '',
autocompleteItems: [],
debounce: null,
tags: this.value,
};
},
watch: {
'tag': 'initItems',
},
methods: {
update(newTags) {
this.autocompleteItems = [];
this.tags = newTags;
this.$emit('input', this.tags);
},
clearTags() {
this.tags = [];
},
hasError: function () {
return this.error.length > 0;
},
initItems() {
// console.log('Now in initItems');
if (this.tag.length < 2) {
return;
}
const url = document.getElementsByTagName('base')[0].href + `api/v1/autocomplete/tags?query=${this.tag}`;
export default {
name: "Tags",
components: {
VueTagsInput
},
props: ['value', 'error'],
data() {
return {
tag: '',
autocompleteItems: [],
debounce: null,
tags: this.value,
};
},
watch: {
'tag': 'initItems',
},
methods: {
update(newTags) {
this.autocompleteItems = [];
this.tags = newTags;
this.$emit('input', this.tags);
},
clearTags() {
this.tags = [];
},
hasError: function () {
return this.error.length > 0;
},
initItems() {
// console.log('Now in initItems');
if (this.tag.length < 2) {
return;
}
const url = document.getElementsByTagName('base')[0].href + `api/v1/autocomplete/tags?query=${this.tag}`;
clearTimeout(this.debounce);
this.debounce = setTimeout(() => {
axios.get(url).then(response => {
this.autocompleteItems = response.data.map(a => {
return {text: a.tag};
});
}).catch(() => console.warn('Oh. Something went wrong loading tags.'));
}, 600);
},
},
}
clearTimeout(this.debounce);
this.debounce = setTimeout(() => {
axios.get(url).then(response => {
this.autocompleteItems = response.data.map(a => {
return {text: a.tag};
});
}).catch(() => console.warn('Oh. Something went wrong loading tags.'));
}, 600);
},
},
}
</script>
<style scoped>

View File

@@ -26,35 +26,35 @@
<div class="col-sm-12">
<div class="input-group">
<input
type="text"
ref="descr"
:title="$t('firefly.description')"
:value="value"
autocomplete="off"
class="form-control"
name="description[]"
:title="$t('firefly.description')"
v-on:keypress="handleEnter"
v-on:submit.prevent
ref="descr"
autocomplete="off"
type="text"
v-bind:placeholder="$t('firefly.description')"
:value="value" @input="handleInput"
@input="handleInput"
v-on:keypress="handleEnter" v-on:submit.prevent
>
<span class="input-group-btn">
<button
v-on:click="clearDescription"
tabIndex="-1"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
tabIndex="-1"
type="button"
v-on:click="clearDescription"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<typeahead
v-model="name"
:async-function="aSyncFunction"
:open-on-empty=true
:open-on-focus=true
v-on:input="selectedItem"
:async-function="aSyncFunction"
v-model="name"
:target="target"
item-key="description"
v-on:input="selectedItem"
></typeahead>
<ul class="list-unstyled" v-for="error in this.error">
<ul v-for="error in this.error" class="list-unstyled">
<li class="text-danger">{{ error }}</li>
</ul>
</div>

View File

@@ -19,70 +19,70 @@
-->
<template>
<div class="form-group">
<div class="col-sm-12">
<label v-if="sentence !== ''" class="control-label text-info">
{{ sentence }}
</label>
</div>
<div class="form-group">
<div class="col-sm-12">
<label v-if="sentence !== ''" class="control-label text-info">
{{ sentence }}
</label>
</div>
</div>
</template>
<script>
export default {
props: {
source: String,
destination: String,
type: String
},
methods: {
changeValue: function () {
if (this.source && this.destination) {
let transactionType = '';
if (window.accountToTypes[this.source]) {
if (window.accountToTypes[this.source][this.destination]) {
transactionType = window.accountToTypes[this.source][this.destination];
} else {
console.warn('User selected an impossible destination.');
}
} else {
console.warn('User selected an impossible source.');
}
if ('' !== transactionType) {
this.transactionType = transactionType;
this.sentence = this.$t('firefly.you_create_' + transactionType.toLowerCase());
export default {
props: {
source: String,
destination: String,
type: String
},
methods: {
changeValue: function () {
if (this.source && this.destination) {
let transactionType = '';
if (window.accountToTypes[this.source]) {
if (window.accountToTypes[this.source][this.destination]) {
transactionType = window.accountToTypes[this.source][this.destination];
} else {
console.warn('User selected an impossible destination.');
}
} else {
console.warn('User selected an impossible source.');
}
if ('' !== transactionType) {
this.transactionType = transactionType;
this.sentence = this.$t('firefly.you_create_' + transactionType.toLowerCase());
// Must also emit a change to set ALL sources and destinations to this particular type.
this.$emit('act:limitSourceType', this.source);
this.$emit('act:limitDestinationType', this.destination);
}
} else {
this.sentence = '';
this.transactionType = '';
}
// emit event how cool is that.
this.$emit('set:transactionType', this.transactionType);
}
},
data() {
return {
transactionType: this.type,
sentence: ''
}
},
watch: {
source() {
this.changeValue();
},
destination() {
this.changeValue();
}
},
name: "TransactionType"
// Must also emit a change to set ALL sources and destinations to this particular type.
this.$emit('act:limitSourceType', this.source);
this.$emit('act:limitDestinationType', this.destination);
}
} else {
this.sentence = '';
this.transactionType = '';
}
// emit event how cool is that.
this.$emit('set:transactionType', this.transactionType);
}
},
data() {
return {
transactionType: this.type,
sentence: ''
}
},
watch: {
source() {
this.changeValue();
},
destination() {
this.changeValue();
}
},
name: "TransactionType"
}
</script>
<style scoped>

View File

@@ -72,9 +72,9 @@ const i18n = require('./i18n');
let props = {};
new Vue({
i18n,
el: "#create_transaction",
render: (createElement) => {
return createElement(CreateTransaction, { props: props });
},
});
i18n,
el: "#create_transaction",
render: (createElement) => {
return createElement(CreateTransaction, {props: props});
},
});

View File

@@ -44,7 +44,7 @@ import Bill from "./components/transactions/Bill";
* vue, uiv and vuei18n are in app_vue.js
*/
require('./bootstrap');
require('./bootstrap');
// components for create and edit transactions.
Vue.component('budget', Budget);
@@ -72,9 +72,9 @@ const i18n = require('./i18n');
let props = {};
new Vue({
i18n,
el: "#edit_transaction",
render: (createElement) => {
return createElement(EditTransaction, { props: props })
},
});
i18n,
el: "#edit_transaction",
render: (createElement) => {
return createElement(EditTransaction, {props: props})
},
});

View File

@@ -13,9 +13,9 @@
"transaction_new_stored_link": "<a href=\"transactions\/show\/{ID}\">Buchung #{ID}<\/a> wurde gespeichert.",
"transaction_journal_information": "Transaktionsinformationen",
"no_budget_pointer": "Sie scheinen noch keine Kostenrahmen festgelegt zu haben. Sie sollten einige davon auf der Seite <a href=\"budgets\">Kostenrahmen<\/a>- anlegen. Kostenrahmen k\u00f6nnen Ihnen dabei helfen, den \u00dcberblick \u00fcber die Ausgaben zu behalten.",
"no_bill_pointer": "You seem to have no bills yet. You should create some on the <a href=\"bills\">bills<\/a>-page. Bills can help you keep track of expenses.",
"no_bill_pointer": "Sie scheinen noch keine Rechnungen zu haben. Sie sollten einige auf der Seite <a href=\"bills\">Rechnungen<\/a> erstellen. Anhand der Rechnungen k\u00f6nnen Sie den \u00dcberblick \u00fcber Ihre Ausgaben behalten.",
"source_account": "Quellkonto",
"hidden_fields_preferences": "You can enable more transaction options in your <a href=\"preferences\">preferences<\/a>.",
"hidden_fields_preferences": "Sie k\u00f6nnen weitere Buchungsoptionen in Ihren <a href=\"preferences\">Einstellungen<\/a> aktivieren.",
"destination_account": "Zielkonto",
"add_another_split": "Eine weitere Aufteilung hinzuf\u00fcgen",
"submission": "\u00dcbermittlung",

View File

@@ -8,14 +8,14 @@
"errors_submission": "Hiba t\u00f6rt\u00e9nt a bek\u00fcld\u00e9s sor\u00e1n. K\u00e9rem, jav\u00edtsa az al\u00e1bbi hib\u00e1kat.",
"split": "Feloszt\u00e1s",
"single_split": "Feloszt\u00e1s",
"transaction_stored_link": "<a href=\"transactions\/show\/{ID}\">Transaction #{ID} (\"{title}\")<\/a> has been stored.",
"transaction_stored_link": "<a href=\"transactions\/show\/{ID}\">Transaction #{ID} (\"{title}\")<\/a> mentve.",
"transaction_updated_link": "<a href=\"transactions\/show\/{ID}\">Transaction #{ID}<\/a> has been updated.",
"transaction_new_stored_link": "<a href=\"transactions\/show\/{ID}\">Transaction #{ID}<\/a> has been stored.",
"transaction_new_stored_link": "<a href=\"transactions\/show\/{ID}\">Transaction #{ID}<\/a> mentve.",
"transaction_journal_information": "Tranzakci\u00f3s inform\u00e1ci\u00f3k",
"no_budget_pointer": "You seem to have no budgets yet. You should create some on the <a href=\"budgets\">budgets<\/a>-page. Budgets can help you keep track of expenses.",
"no_bill_pointer": "You seem to have no bills yet. You should create some on the <a href=\"bills\">bills<\/a>-page. Bills can help you keep track of expenses.",
"source_account": "Forr\u00e1s sz\u00e1mla",
"hidden_fields_preferences": "You can enable more transaction options in your <a href=\"preferences\">preferences<\/a>.",
"hidden_fields_preferences": "A <a href=\"preferences\">be\u00e1ll\u00edt\u00e1sokban<\/a> t\u00f6bb mez\u0151 is enged\u00e9lyezhet\u0151.",
"destination_account": "C\u00e9lsz\u00e1mla",
"add_another_split": "M\u00e1sik feloszt\u00e1s hozz\u00e1ad\u00e1sa",
"submission": "Feliratkoz\u00e1s",

View File

@@ -12,10 +12,10 @@
"transaction_updated_link": "La <a href=\"transactions\/show\/{ID}\">transazione #{ID}<\/a> \u00e8 stata aggiornata.",
"transaction_new_stored_link": "La <a href=\"transactions\/show\/{ID}\">transazione #{ID}<\/a> \u00e8 stata salvata.",
"transaction_journal_information": "Informazioni transazione",
"no_budget_pointer": "You seem to have no budgets yet. You should create some on the <a href=\"budgets\">budgets<\/a>-page. Budgets can help you keep track of expenses.",
"no_bill_pointer": "You seem to have no bills yet. You should create some on the <a href=\"bills\">bills<\/a>-page. Bills can help you keep track of expenses.",
"no_budget_pointer": "Sembra che tu non abbia ancora dei budget. Dovresti crearne alcuni nella pagina dei <a href=\"budgets\">budget<\/a>. I budget possono aiutarti a tenere traccia delle spese.",
"no_bill_pointer": "Sembra che tu non abbia ancora delle bollette. Dovresti crearne alcune nella pagina delle <a href=\"bills\">bollette<\/a>. Le bollette possono aiutarti a tenere traccia delle spese.",
"source_account": "Conto di origine",
"hidden_fields_preferences": "You can enable more transaction options in your <a href=\"preferences\">preferences<\/a>.",
"hidden_fields_preferences": "Puoi abilitare maggiori opzioni per le transazioni nelle tue <a href=\"preferences\">impostazioni<\/a>.",
"destination_account": "Conto destinazione",
"add_another_split": "Aggiungi un'altra divisione",
"submission": "Invio",
@@ -88,7 +88,7 @@
"multi_account_warning_transfer": "Ricorda che il conto di origine e il conto di destinazione delle successive suddivisioni verranno sovrascritti da quelli definiti nella prima suddivisione del trasferimento."
},
"form": {
"interest_date": "Data interesse",
"interest_date": "Data di valuta",
"book_date": "Data contabile",
"process_date": "Data elaborazione",
"due_date": "Data scadenza",

View File

@@ -12,8 +12,8 @@
"transaction_updated_link": "<a href=\"transactions\/show\/{ID}\">\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f #{ID}<\/a> \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430.",
"transaction_new_stored_link": "<a href=\"transactions\/show\/{ID}\">\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f #{ID}<\/a> \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430.",
"transaction_journal_information": "\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438",
"no_budget_pointer": "You seem to have no budgets yet. You should create some on the <a href=\"budgets\">budgets<\/a>-page. Budgets can help you keep track of expenses.",
"no_bill_pointer": "You seem to have no bills yet. You should create some on the <a href=\"bills\">bills<\/a>-page. Bills can help you keep track of expenses.",
"no_budget_pointer": "\u041f\u043e\u0445\u043e\u0436\u0435, \u0443 \u0432\u0430\u0441 \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 \u0431\u044e\u0434\u0436\u0435\u0442\u043e\u0432. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <a href=\"budgets\">\u0411\u044e\u0434\u0436\u0435\u0442\u044b<\/a>. \u0411\u044e\u0434\u0436\u0435\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0434\u044b.",
"no_bill_pointer": "\u041f\u043e\u0445\u043e\u0436\u0435, \u0443 \u0432\u0430\u0441 \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 \u0441\u0447\u0435\u0442\u043e\u0432 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <a href=\"bills\">\u0421\u0447\u0435\u0442\u0430 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443<\/a>. \u0421\u0447\u0435\u0442\u0430 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0434\u044b.",
"source_account": "\u0421\u0447\u0451\u0442-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a",
"hidden_fields_preferences": "You can enable more transaction options in your <a href=\"preferences\">preferences<\/a>.",
"destination_account": "\u0421\u0447\u0451\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f",

View File

@@ -4,7 +4,7 @@
"flash_error": "Fel!",
"flash_success": "Slutf\u00f6rd!",
"close": "St\u00e4ng",
"split_transaction_title": "Description of the split transaction",
"split_transaction_title": "Beskrivning av delad transaktion",
"errors_submission": "N\u00e5got fel uppstod med inskickningen. V\u00e4nligen kontrollera felen nedan.",
"split": "Dela",
"single_split": "Dela",
@@ -12,10 +12,10 @@
"transaction_updated_link": "<a href=\"transactions\/show\/{ID}\">Transaktion #{ID}<\/a> uppdaterades.",
"transaction_new_stored_link": "<a href=\"transactions\/show\/{ID}\">Transaktion #{ID}<\/a> sparades.",
"transaction_journal_information": "Transaktionsinformation",
"no_budget_pointer": "You seem to have no budgets yet. You should create some on the <a href=\"budgets\">budgets<\/a>-page. Budgets can help you keep track of expenses.",
"no_bill_pointer": "You seem to have no bills yet. You should create some on the <a href=\"bills\">bills<\/a>-page. Bills can help you keep track of expenses.",
"no_budget_pointer": "Du verkar inte ha n\u00e5gra budgetar \u00e4n. Du b\u00f6r skapa n\u00e5gra p\u00e5 <a href=\"budgets\">budgetar<\/a>-sidan. Budgetar kan hj\u00e4lpa dig att h\u00e5lla reda p\u00e5 utgifter.",
"no_bill_pointer": "Du verkar inte ha n\u00e5gra r\u00e4kningar \u00e4nnu. Du b\u00f6r skapa n\u00e5gra p\u00e5 <a href=\"bills\">r\u00e4kningar<\/a>-sidan. R\u00e4kningar kan hj\u00e4lpa dig att h\u00e5lla reda p\u00e5 utgifter.",
"source_account": "K\u00e4llkonto",
"hidden_fields_preferences": "You can enable more transaction options in your <a href=\"preferences\">preferences<\/a>.",
"hidden_fields_preferences": "Du kan aktivera fler transaktionsalternativ i dina <a href=\"preferences\">inst\u00e4llningar<\/a>.",
"destination_account": "Till konto",
"add_another_split": "L\u00e4gga till en annan delning",
"submission": "Inskickning",
@@ -34,18 +34,18 @@
"update_transaction": "Uppdatera transaktion",
"after_update_create_another": "Efter uppdaterat, \u00e5terkom hit f\u00f6r att forts\u00e4tta redigera.",
"store_as_new": "Spara en ny transaktion ist\u00e4llet f\u00f6r att uppdatera.",
"split_title_help": "If you create a split transaction, there must be a global description for all splits of the transaction.",
"split_title_help": "Om du skapar en delad transaktion m\u00e5ste det finnas en global beskrivning f\u00f6r alla delningar av transaktionen.",
"none_in_select_list": "(Ingen)",
"no_piggy_bank": "(ingen spargris)",
"description": "Beskrivning",
"split_transaction_title_help": "If you create a split transaction, there must be a global description for all splits of the transaction.",
"split_transaction_title_help": "Om du skapar en delad transaktion m\u00e5ste det finnas en global beskrivning f\u00f6r alla delningar av transaktionen.",
"destination_account_reconciliation": "Du kan inte redigera destinationskontot f\u00f6r en avst\u00e4mningstransaktion.",
"source_account_reconciliation": "Du kan inte redigera k\u00e4llkontot f\u00f6r en avst\u00e4mningstransaktion.",
"budget": "Budget",
"bill": "Nota",
"you_create_withdrawal": "You're creating a withdrawal.",
"you_create_transfer": "You're creating a transfer.",
"you_create_deposit": "You're creating a deposit.",
"you_create_withdrawal": "Du skapar ett uttag.",
"you_create_transfer": "Du skapar en \u00f6verf\u00f6ring.",
"you_create_deposit": "Du skapar en ins\u00e4ttning.",
"edit": "Redigera",
"delete": "Ta bort",
"name": "Namn",
@@ -76,7 +76,7 @@
"profile_create_token": "Skapa token",
"profile_create": "Skapa",
"profile_save_changes": "Spara \u00e4ndringar",
"default_group_title_name": "(ungrouped)",
"default_group_title_name": "(ogrupperad)",
"piggy_bank": "Spargris",
"profile_oauth_client_secret_title": "Klienthemlighet",
"profile_oauth_client_secret_expl": "H\u00e4r \u00e4r din nya klient hemlighet. Detta \u00e4r den enda g\u00e5ngen det kommer att visas s\u00e5 f\u00f6rlora inte det! Du kan nu anv\u00e4nda denna hemlighet f\u00f6r att g\u00f6ra API-f\u00f6rfr\u00e5gningar.",

View File

@@ -32,7 +32,7 @@ import ProfileOptions from "./components/profile/ProfileOptions";
require('./bootstrap');
Vue.component('passport-clients', Clients);
Vue.component('passport-authorized-clients',AuthorizedClients);
Vue.component('passport-authorized-clients', AuthorizedClients);
Vue.component('passport-personal-access-tokens', PersonalAccessTokens);
Vue.component('profile-options', ProfileOptions);
@@ -41,9 +41,9 @@ const i18n = require('./i18n');
let props = {};
new Vue({
i18n,
el: "#passport_clients",
render: (createElement) => {
return createElement(ProfileOptions, { props: props })
},
});
i18n,
el: "#passport_clients",
render: (createElement) => {
return createElement(ProfileOptions, {props: props})
},
});