mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Add code for administrations.
This commit is contained in:
@@ -10,18 +10,25 @@
|
||||
"/build/webhooks/show.js": "/build/webhooks/show.js",
|
||||
"/build/exchange-rates/index.js": "/build/exchange-rates/index.js",
|
||||
"/build/exchange-rates/rates.js": "/build/exchange-rates/rates.js",
|
||||
"/build/administrations/index.js": "/build/administrations/index.js",
|
||||
"/build/administrations/edit.js": "/build/administrations/edit.js",
|
||||
"/public/v1/js/administrations/edit.js": "/public/v1/js/administrations/edit.js",
|
||||
"/public/v1/js/administrations/index.js": "/public/v1/js/administrations/index.js",
|
||||
"/public/v1/js/app.js": "/public/v1/js/app.js",
|
||||
"/public/v1/js/app.js.LICENSE.txt": "/public/v1/js/app.js.LICENSE.txt",
|
||||
"/public/v1/js/app_vue.js": "/public/v1/js/app_vue.js",
|
||||
"/public/v1/js/app_vue.js.LICENSE.txt": "/public/v1/js/app_vue.js.LICENSE.txt",
|
||||
"/public/v1/js/create.js": "/public/v1/js/create.js",
|
||||
"/public/v1/js/create.js.LICENSE.txt": "/public/v1/js/create.js.LICENSE.txt",
|
||||
"/public/v1/js/create_transaction.js": "/public/v1/js/create_transaction.js",
|
||||
"/public/v1/js/create_transaction.js.LICENSE.txt": "/public/v1/js/create_transaction.js.LICENSE.txt",
|
||||
"/public/v1/js/edit.js": "/public/v1/js/edit.js",
|
||||
"/public/v1/js/edit.js.LICENSE.txt": "/public/v1/js/edit.js.LICENSE.txt",
|
||||
"/public/v1/js/edit_transaction.js": "/public/v1/js/edit_transaction.js",
|
||||
"/public/v1/js/edit_transaction.js.LICENSE.txt": "/public/v1/js/edit_transaction.js.LICENSE.txt",
|
||||
"/public/v1/js/exchange-rates/index.js": "/public/v1/js/exchange-rates/index.js",
|
||||
"/public/v1/js/exchange-rates/index.js.LICENSE.txt": "/public/v1/js/exchange-rates/index.js.LICENSE.txt",
|
||||
"/public/v1/js/exchange-rates/rates.js": "/public/v1/js/exchange-rates/rates.js",
|
||||
"/public/v1/js/exchange-rates/rates.js.LICENSE.txt": "/public/v1/js/exchange-rates/rates.js.LICENSE.txt",
|
||||
"/public/v1/js/ff/accounts/create.js": "/public/v1/js/ff/accounts/create.js",
|
||||
"/public/v1/js/ff/accounts/edit-reconciliation.js": "/public/v1/js/ff/accounts/edit-reconciliation.js",
|
||||
"/public/v1/js/ff/accounts/edit.js": "/public/v1/js/ff/accounts/edit.js",
|
||||
@@ -90,6 +97,8 @@
|
||||
"/public/v1/js/ff/transactions/mass/edit-bulk.js": "/public/v1/js/ff/transactions/mass/edit-bulk.js",
|
||||
"/public/v1/js/ff/transactions/mass/edit.js": "/public/v1/js/ff/transactions/mass/edit.js",
|
||||
"/public/v1/js/ff/transactions/show.js": "/public/v1/js/ff/transactions/show.js",
|
||||
"/public/v1/js/index.js": "/public/v1/js/index.js",
|
||||
"/public/v1/js/index.js.LICENSE.txt": "/public/v1/js/index.js.LICENSE.txt",
|
||||
"/public/v1/js/lib/Chart.bundle.min.js": "/public/v1/js/lib/Chart.bundle.min.js",
|
||||
"/public/v1/js/lib/accounting.min.js": "/public/v1/js/lib/accounting.min.js",
|
||||
"/public/v1/js/lib/bootstrap-multiselect.js": "/public/v1/js/lib/bootstrap-multiselect.js",
|
||||
@@ -148,6 +157,8 @@
|
||||
"/public/v1/js/lib/vue.js": "/public/v1/js/lib/vue.js",
|
||||
"/public/v1/js/profile.js": "/public/v1/js/profile.js",
|
||||
"/public/v1/js/profile.js.LICENSE.txt": "/public/v1/js/profile.js.LICENSE.txt",
|
||||
"/public/v1/js/show.js": "/public/v1/js/show.js",
|
||||
"/public/v1/js/show.js.LICENSE.txt": "/public/v1/js/show.js.LICENSE.txt",
|
||||
"/public/v1/js/webhooks/create.js": "/public/v1/js/webhooks/create.js",
|
||||
"/public/v1/js/webhooks/create.js.LICENSE.txt": "/public/v1/js/webhooks/create.js.LICENSE.txt",
|
||||
"/public/v1/js/webhooks/edit.js": "/public/v1/js/webhooks/edit.js",
|
||||
|
||||
39
resources/assets/v1/src/administrations/edit.js
Normal file
39
resources/assets/v1/src/administrations/edit.js
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* edit_transactions.js
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Edit from "../components/administrations/Edit";
|
||||
|
||||
/**
|
||||
* First we will load Axios via bootstrap.js
|
||||
* jquery and bootstrap-sass preloaded in app.js
|
||||
* vue, uiv and vuei18n are in app_vue.js
|
||||
*/
|
||||
|
||||
require('../bootstrap');
|
||||
const i18n = require('../i18n');
|
||||
|
||||
let props = {};
|
||||
const app = new Vue({
|
||||
i18n,
|
||||
el: "#administrations_edit",
|
||||
render: (createElement) => {
|
||||
return createElement(Edit, {props: props})
|
||||
},
|
||||
});
|
||||
39
resources/assets/v1/src/administrations/index.js
Normal file
39
resources/assets/v1/src/administrations/index.js
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* edit_transactions.js
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Index from "../components/administrations/Index";
|
||||
|
||||
/**
|
||||
* First we will load Axios via bootstrap.js
|
||||
* jquery and bootstrap-sass preloaded in app.js
|
||||
* vue, uiv and vuei18n are in app_vue.js
|
||||
*/
|
||||
|
||||
require('../bootstrap');
|
||||
const i18n = require('../i18n');
|
||||
|
||||
let props = {};
|
||||
const app = new Vue({
|
||||
i18n,
|
||||
el: "#administrations_index",
|
||||
render: (createElement) => {
|
||||
return createElement(Index, {props: props})
|
||||
},
|
||||
});
|
||||
173
resources/assets/v1/src/components/administrations/Edit.vue
Normal file
173
resources/assets/v1/src/components/administrations/Edit.vue
Normal file
@@ -0,0 +1,173 @@
|
||||
<!--
|
||||
- Index.vue
|
||||
- Copyright (c) 2022 james@firefly-iii.org
|
||||
-
|
||||
- This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
- published by the Free Software Foundation, either version 3 of the
|
||||
- License, or (at your option) any later version.
|
||||
-
|
||||
- This program is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- GNU Affero General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU Affero General Public License
|
||||
- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<form accept-charset="UTF-8" class="form-horizontal" enctype="multipart/form-data">
|
||||
<input name="_token" type="hidden" value="xxx">
|
||||
|
||||
<div v-if="error_message !== ''" class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button class="close" data-dismiss="alert" type="button" v-bind:aria-label="$t('firefly.close')"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<strong>{{ $t("firefly.flash_error") }}</strong> {{ error_message }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="success_message !== ''" class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button class="close" data-dismiss="alert" type="button" v-bind:aria-label="$t('firefly.close')"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<strong>{{ $t("firefly.flash_success") }}</strong> <span v-html="success_message"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
{{ $t('firefly.administrations_page_edit_sub_title_js', {title: this.pageTitle}) }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ $t('firefly.temp_administrations_introduction') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
{{ $t('firefly.administrations_page_edit_sub_title_js', {title: this.pageTitle}) }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<Title :value=administration.title :error="errors.title" v-on:input="administration.title = $event"></Title>
|
||||
<UserGroupCurrency :value=administration.currency_id :error="errors.currency_id"
|
||||
v-on:input="administration.currency_id = $event"></UserGroupCurrency>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="btn-group">
|
||||
<button id="submitButton" ref="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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Title from "../form/Title.vue";
|
||||
import WebhookTrigger from "../form/WebhookTrigger.vue";
|
||||
import UserGroupCurrency from "../form/UserGroupCurrency.vue";
|
||||
|
||||
export default {
|
||||
name: "Edit",
|
||||
components: {UserGroupCurrency, WebhookTrigger, Title},
|
||||
data() {
|
||||
return {
|
||||
pageTitle: '',
|
||||
administration: {
|
||||
title: '',
|
||||
currency_id: 0,
|
||||
},
|
||||
errors: {
|
||||
title: [],
|
||||
currency_id: [],
|
||||
},
|
||||
error_message: '',
|
||||
success_message: '',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const page = window.location.href.split('/');
|
||||
const administrationId = parseInt(page[page.length - 1]);
|
||||
this.downloadAdministration(administrationId);
|
||||
},
|
||||
methods: {
|
||||
downloadAdministration: function (id) {
|
||||
axios.get("./api/v1/user-groups/" + id).then((response) => {
|
||||
let current = response.data.data;
|
||||
this.administration = {
|
||||
id: current.id,
|
||||
title: current.attributes.title,
|
||||
currency_id: parseInt(current.attributes.native_currency_id),
|
||||
currency_code: current.attributes.native_currency_code,
|
||||
currency_name: current.attributes.native_currency_name,
|
||||
};
|
||||
this.pageTitle = this.administration.title;
|
||||
});
|
||||
},
|
||||
submit: function (e) {
|
||||
// reset messages
|
||||
this.error_message = '';
|
||||
this.success_message = '';
|
||||
this.errors = {
|
||||
title: [],
|
||||
currency_id: [],
|
||||
};
|
||||
|
||||
// disable button
|
||||
$('#submitButton').prop("disabled", true);
|
||||
|
||||
// collect data
|
||||
let data = {
|
||||
title: this.administration.title,
|
||||
native_currency_id: parseInt(this.administration.currency_id),
|
||||
};
|
||||
|
||||
// post!
|
||||
axios.put('./api/v1/user-groups/' + this.administration.id, data).then((response) => {
|
||||
let administrationId = parseInt(response.data.data.id);
|
||||
window.location.href = './administrations?user_group_id=' + administrationId + '&message=updated';
|
||||
}).catch((error) => {
|
||||
|
||||
this.error_message = error.response.data.message;
|
||||
this.errors.title = error.response.data.errors.title;
|
||||
this.errors.native_currency_id = error.response.data.errors.native_currency_id;
|
||||
|
||||
// enable button again
|
||||
$('#submitButton').prop("disabled", false);
|
||||
|
||||
});
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
127
resources/assets/v1/src/components/administrations/Index.vue
Normal file
127
resources/assets/v1/src/components/administrations/Index.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<!--
|
||||
- Index.vue
|
||||
- Copyright (c) 2022 james@firefly-iii.org
|
||||
-
|
||||
- This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
- published by the Free Software Foundation, either version 3 of the
|
||||
- License, or (at your option) any later version.
|
||||
-
|
||||
- This program is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- GNU Affero General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU Affero General Public License
|
||||
- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
{{ $t('firefly.administrations_index_menu') }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ $t('firefly.temp_administrations_introduction') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
{{ $t('firefly.table') }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-responsive table-hover" v-if="administrations.length > 0"
|
||||
aria-label="A table.">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ $t('list.title') }}</th>
|
||||
<th>{{ $t('list.native_currency') }}</th>
|
||||
<th class="hidden-sm hidden-xs"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="administration in administrations" :key="administration.id">
|
||||
<td>
|
||||
<span v-text="administration.title"></span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-text="administration.currency_name"></span> (<span v-text="administration.currency_code"></span>)
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs">
|
||||
<div class="btn-group btn-group-xs pull-right">
|
||||
<button type="button" class="btn btn-default dropdown-toggle"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ $t('firefly.actions') }} <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||
<li><a :href="'./administrations/edit/' + administration.id"><span class="fa fa-fw fa-pencil"></span>
|
||||
{{ $t('firefly.edit') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Index",
|
||||
data() {
|
||||
return {
|
||||
administrations: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getAdministrations();
|
||||
},
|
||||
methods: {
|
||||
getAdministrations: function () {
|
||||
this.administrations = [];
|
||||
this.downloadAdministrations(1);
|
||||
},
|
||||
|
||||
downloadAdministrations: function (page) {
|
||||
axios.get("./api/v1/user-groups?page=" + page).then((response) => {
|
||||
for (let i in response.data.data) {
|
||||
if (response.data.data.hasOwnProperty(i)) {
|
||||
let current = response.data.data[i];
|
||||
let administration = {
|
||||
id: current.id,
|
||||
title: current.attributes.title,
|
||||
currency_code: current.attributes.native_currency_code,
|
||||
currency_name: current.attributes.native_currency_name,
|
||||
};
|
||||
this.administrations.push(administration);
|
||||
}
|
||||
}
|
||||
|
||||
if (response.data.meta.pagination.current_page < response.data.meta.pagination.total_pages) {
|
||||
this.downloadAdministrations(response.data.meta.pagination.current_page + 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
107
resources/assets/v1/src/components/form/UserGroupCurrency.vue
Normal file
107
resources/assets/v1/src/components/form/UserGroupCurrency.vue
Normal file
@@ -0,0 +1,107 @@
|
||||
<!--
|
||||
- WebhookDelivery.vue
|
||||
- Copyright (c) 2022 james@firefly-iii.org
|
||||
-
|
||||
- This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU Affero General Public License as
|
||||
- published by the Free Software Foundation, either version 3 of the
|
||||
- License, or (at your option) any later version.
|
||||
-
|
||||
- This program is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- GNU Affero General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU Affero General Public License
|
||||
- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
|
||||
<label class="col-sm-4 control-label">
|
||||
{{ $t('form.administration_currency') }}
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<select
|
||||
v-model="currency"
|
||||
:title="$t('form.administration_currency')"
|
||||
class="form-control"
|
||||
name="user_group_currency"
|
||||
>
|
||||
<option v-for="currency in this.currencies"
|
||||
:label="currency.name"
|
||||
:value="currency.id">{{ currency.name }}
|
||||
</option>
|
||||
</select>
|
||||
<p class="help-block" v-text="$t('firefly.administration_currency_form_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 {
|
||||
name: "UserGroupCurrency",
|
||||
data() {
|
||||
return {
|
||||
currency : 0,
|
||||
currencies: [
|
||||
|
||||
],
|
||||
};
|
||||
},
|
||||
props: {
|
||||
error: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
value: {
|
||||
type: Number,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.currency = this.value;
|
||||
this.downloadCurrencies(1);
|
||||
},
|
||||
watch: {
|
||||
value() {
|
||||
this.currency = this.value;
|
||||
},
|
||||
currency(newValue) {
|
||||
this.$emit('input', newValue);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downloadCurrencies: function (page) {
|
||||
axios.get("./api/v1/currencies?enabled=1&page=" + page).then((response) => {
|
||||
for (let i in response.data.data) {
|
||||
if (response.data.data.hasOwnProperty(i)) {
|
||||
let current = response.data.data[i];
|
||||
let currency = {
|
||||
id: current.id,
|
||||
name: current.attributes.name,
|
||||
code: current.attributes.code,
|
||||
};
|
||||
this.currencies.push(currency);
|
||||
}
|
||||
}
|
||||
|
||||
if (response.data.meta.pagination.current_page < response.data.meta.pagination.total_pages) {
|
||||
this.downloadCurrencies(parseInt(response.data.meta.pagination.current_page) + 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
hasError() {
|
||||
return this.error?.length > 0;
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -187,7 +187,7 @@ export default {
|
||||
|
||||
// post!
|
||||
axios.put('./api/v1/webhooks/' + this.id, data).then((response) => {
|
||||
let webhookId = response.data.data.id;
|
||||
let webhookId = parseInt(response.data.data.id);
|
||||
window.location.href = window.previousUrl + '?webhook_id=' + webhookId + '&message=updated';
|
||||
}).catch((error) => {
|
||||
|
||||
|
||||
@@ -50,3 +50,7 @@ mix.js('src/webhooks/show.js', 'build/webhooks').vue({version: 2}).copy('build',
|
||||
// exchange rates
|
||||
mix.js('src/exchange-rates/index.js', 'build/exchange-rates').vue({version: 2});
|
||||
mix.js('src/exchange-rates/rates.js', 'build/exchange-rates').vue({version: 2});
|
||||
|
||||
// administrations
|
||||
mix.js('src/administrations/index.js', 'build/administrations').vue({version: 2});
|
||||
mix.js('src/administrations/edit.js', 'build/administrations').vue({version: 2});
|
||||
|
||||
@@ -1477,9 +1477,9 @@ return [
|
||||
|
||||
// Financial administrations
|
||||
'administration_index' => 'Financial administration',
|
||||
'administrations_index_menu' => 'Financial administration(s)',
|
||||
'administrations_breadcrumb' => 'Financial administrations',
|
||||
'administrations_page_title' => 'Financial administrations',
|
||||
'administrations_page_title' => 'Financial administrations',
|
||||
'administrations_index_menu' => 'Financial administrations',
|
||||
'administrations_page_sub_title' => 'Overview',
|
||||
'create_administration' => 'Create new administration',
|
||||
'administration_owner' => 'Administration owner: {{email}}',
|
||||
@@ -1491,6 +1491,13 @@ return [
|
||||
'new_administration_created' => 'New financial administration "{{title}}" has been created',
|
||||
'edit_administration_breadcrumb' => 'Edit financial administration ":title"',
|
||||
'administrations_page_edit_sub_title' => 'Edit financial administration ":title"',
|
||||
'administrations_page_edit_sub_title_js' => 'Edit financial administration "{title}"',
|
||||
'temp_administrations_introduction' => 'Firefly III will soon get the ability to manage multiple financial administrations. Right now, you only have the one. You can set the title of this administration and its native currency. This replaces the previous setting where you would set your "default currency". This setting is now tied to the financial administration and can be different per administration.',
|
||||
'temp_administrations_introduction_edit' =>'Currently, you can only set the "native currency" of the default financial administration. This replaces the "default currency" setting. This setting is now tied to the financial administration and can be different per administration.',
|
||||
'administration_currency_form_help' => 'It may take a long time for the page to load if you change the native currency because transaction may need to be converted to your (new) native currency.',
|
||||
'flash_administration_updated' => 'Administration ":title" has been updated',
|
||||
'flash_administration_created' => 'Administration ":title" has been created',
|
||||
'flash_administration_deleted' => 'Administration ":title" has been deleted',
|
||||
|
||||
// roles
|
||||
'administration_role_owner' => 'Owner',
|
||||
|
||||
@@ -26,6 +26,7 @@ declare(strict_types=1);
|
||||
|
||||
return [
|
||||
// new user:
|
||||
'administration_currency' => 'Native currency',
|
||||
'bank_name' => 'Bank name',
|
||||
'bank_balance' => 'Balance',
|
||||
'current_balance' => 'Current balance',
|
||||
|
||||
@@ -29,6 +29,7 @@ return [
|
||||
'icon' => 'Icon',
|
||||
'id' => 'ID',
|
||||
'create_date' => 'Created at',
|
||||
'native_currency' => 'Native currency',
|
||||
'update_date' => 'Updated at',
|
||||
'updated_at' => 'Updated at',
|
||||
'balance_before' => 'Balance before',
|
||||
|
||||
@@ -49,6 +49,7 @@ return [
|
||||
'date_or_time' => 'The value must be a valid date or time value (ISO 8601).',
|
||||
'source_equals_destination' => 'The source account equals the destination account.',
|
||||
'unique_account_number_for_user' => 'It looks like this account number is already in use.',
|
||||
'unique_user_group_for_user' => 'It looks like this administration title is already in use.',
|
||||
'unique_iban_for_user' => 'It looks like this IBAN is already in use.',
|
||||
'reconciled_forbidden_field' => 'This transaction is already reconciled, you cannot change the ":field"',
|
||||
'deleted_user' => 'Due to security constraints, you cannot register using this email address.',
|
||||
|
||||
8
resources/views/administrations/edit.twig
Normal file
8
resources/views/administrations/edit.twig
Normal file
@@ -0,0 +1,8 @@
|
||||
{% set VUE_SCRIPT_NAME = 'administrations/edit' %}
|
||||
{% extends './layout/default' %}
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="administrations_edit"></div>
|
||||
{% endblock %}
|
||||
@@ -1,10 +1,8 @@
|
||||
{% set VUE_SCRIPT_NAME = 'administrations/index' %}
|
||||
{% extends './layout/default' %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
|
||||
|
||||
<div id="administrations_index"></div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user