mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #3187
This commit is contained in:
@@ -644,6 +644,7 @@
|
||||
internal_reference: [],
|
||||
notes: [],
|
||||
attachments: [],
|
||||
external_uri: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -740,6 +741,7 @@
|
||||
internal_reference: [],
|
||||
notes: [],
|
||||
attachments: [],
|
||||
external_uri: [],
|
||||
},
|
||||
},
|
||||
budget: 0,
|
||||
@@ -753,7 +755,8 @@
|
||||
"invoice_date": "",
|
||||
"internal_reference": "",
|
||||
"notes": "",
|
||||
"attachments": []
|
||||
"attachments": [],
|
||||
"external_uri": "",
|
||||
},
|
||||
foreign_amount: {
|
||||
amount: "",
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
: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
|
||||
: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
|
||||
: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>
|
||||
@@ -75,7 +79,8 @@
|
||||
"invoice_date": false,
|
||||
"internal_reference": false,
|
||||
"notes": false,
|
||||
"attachments": false
|
||||
"attachments": false,
|
||||
"external_uri": false
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -93,6 +98,9 @@
|
||||
},
|
||||
textareaComponent () {
|
||||
return 'custom-textarea';
|
||||
},
|
||||
uriComponent () {
|
||||
return 'custom-uri';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -116,4 +124,4 @@
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
77
resources/assets/js/components/transactions/CustomUri.vue
Normal file
77
resources/assets/js/components/transactions/CustomUri.vue
Normal file
@@ -0,0 +1,77 @@
|
||||
<!--
|
||||
- CustomString.vue
|
||||
- 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/>.
|
||||
-->
|
||||
|
||||
<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>
|
||||
</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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -416,6 +416,7 @@
|
||||
internal_reference: [],
|
||||
notes: [],
|
||||
attachments: [],
|
||||
external_uri: [],
|
||||
},
|
||||
},
|
||||
budget: transaction.budget_id,
|
||||
@@ -428,7 +429,8 @@
|
||||
payment_date: transaction.payment_date,
|
||||
invoice_date: transaction.invoice_date,
|
||||
internal_reference: transaction.internal_reference,
|
||||
notes: transaction.notes
|
||||
notes: transaction.notes,
|
||||
external_uri: transaction.external_uri
|
||||
},
|
||||
foreign_amount: {
|
||||
amount: this.roundNumber(this.positiveAmount(transaction.foreign_amount), transaction.foreign_currency_decimal_places),
|
||||
@@ -608,6 +610,7 @@
|
||||
payment_date: row.custom_fields.payment_date,
|
||||
invoice_date: row.custom_fields.invoice_date,
|
||||
internal_reference: row.custom_fields.internal_reference,
|
||||
external_uri: row.custom_fields.external_uri,
|
||||
notes: row.custom_fields.notes,
|
||||
tags: tagList
|
||||
};
|
||||
@@ -830,6 +833,7 @@
|
||||
internal_reference: [],
|
||||
notes: [],
|
||||
attachments: [],
|
||||
external_uri: [],
|
||||
},
|
||||
},
|
||||
budget: 0,
|
||||
@@ -843,7 +847,8 @@
|
||||
"invoice_date": "",
|
||||
"internal_reference": "",
|
||||
"notes": "",
|
||||
"attachments": []
|
||||
"attachments": [],
|
||||
"external_uri": "",
|
||||
},
|
||||
foreign_amount: {
|
||||
amount: "",
|
||||
@@ -903,6 +908,10 @@
|
||||
case 'tags':
|
||||
this.transactions[transactionIndex].errors[fieldName] = errors.errors[key];
|
||||
break;
|
||||
case 'external_uri':
|
||||
console.log('Found ext error in field "'+fieldName+'": ' + errors.errors[key]);
|
||||
this.transactions[transactionIndex].errors.custom_errors[fieldName] = errors.errors[key];
|
||||
break;
|
||||
case 'source_name':
|
||||
case 'source_id':
|
||||
this.transactions[transactionIndex].errors.source_account =
|
||||
@@ -954,6 +963,7 @@
|
||||
internal_reference: [],
|
||||
notes: [],
|
||||
attachments: [],
|
||||
external_uri: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
2
resources/assets/js/create_transaction.js
vendored
2
resources/assets/js/create_transaction.js
vendored
@@ -35,6 +35,7 @@ import ForeignAmountSelect from "./components/transactions/ForeignAmountSelect";
|
||||
import TransactionType from "./components/transactions/TransactionType";
|
||||
import AccountSelect from "./components/transactions/AccountSelect";
|
||||
import Budget from "./components/transactions/Budget";
|
||||
import CustomUri from "./components/transactions/CustomUri";
|
||||
|
||||
/**
|
||||
* First we will load Axios via bootstrap.js
|
||||
@@ -50,6 +51,7 @@ Vue.component('custom-date', CustomDate);
|
||||
Vue.component('custom-string', CustomString);
|
||||
Vue.component('custom-attachments', CustomAttachments);
|
||||
Vue.component('custom-textarea', CustomTextarea);
|
||||
Vue.component('custom-uri', CustomUri);
|
||||
Vue.component('standard-date', StandardDate);
|
||||
Vue.component('group-description', GroupDescription);
|
||||
Vue.component('transaction-description', TransactionDescription);
|
||||
|
||||
2
resources/assets/js/edit_transaction.js
vendored
2
resources/assets/js/edit_transaction.js
vendored
@@ -35,6 +35,7 @@ import ForeignAmountSelect from "./components/transactions/ForeignAmountSelect";
|
||||
import TransactionType from "./components/transactions/TransactionType";
|
||||
import AccountSelect from "./components/transactions/AccountSelect";
|
||||
import Budget from "./components/transactions/Budget";
|
||||
import CustomUri from "./components/transactions/CustomUri";
|
||||
|
||||
/**
|
||||
* First we will load Axios via bootstrap.js
|
||||
@@ -50,6 +51,7 @@ Vue.component('custom-date', CustomDate);
|
||||
Vue.component('custom-string', CustomString);
|
||||
Vue.component('custom-attachments', CustomAttachments);
|
||||
Vue.component('custom-textarea', CustomTextarea);
|
||||
Vue.component('custom-uri', CustomUri);
|
||||
Vue.component('standard-date', StandardDate);
|
||||
Vue.component('group-description', GroupDescription);
|
||||
Vue.component('transaction-description', TransactionDescription);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Kategorie",
|
||||
"attachments": "P\u0159\u00edlohy",
|
||||
"notes": "Pozn\u00e1mky",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Update transaction",
|
||||
"after_update_create_another": "After updating, return here to continue editing.",
|
||||
"store_as_new": "Store as a new transaction instead of updating.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Kategorie",
|
||||
"attachments": "Anh\u00e4nge",
|
||||
"notes": "Notizen",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Buchung aktualisieren",
|
||||
"after_update_create_another": "Nach dem Aktualisieren hierher zur\u00fcckkehren, um weiter zu bearbeiten.",
|
||||
"store_as_new": "Als neue Buchung speichern statt zu aktualisieren.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "\u039a\u03b1\u03c4\u03b7\u03b3\u03bf\u03c1\u03af\u03b1",
|
||||
"attachments": "\u03a3\u03c5\u03bd\u03b7\u03bc\u03bc\u03ad\u03bd\u03b1",
|
||||
"notes": "\u03a3\u03b7\u03bc\u03b5\u03b9\u03ce\u03c3\u03b5\u03b9\u03c2",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03c3\u03c5\u03bd\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae\u03c2",
|
||||
"after_update_create_another": "\u039c\u03b5\u03c4\u03ac \u03c4\u03b7\u03bd \u03b5\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7, \u03b5\u03c0\u03b9\u03c3\u03c4\u03c1\u03ad\u03c8\u03c4\u03b5 \u03b5\u03b4\u03ce \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c3\u03c5\u03bd\u03b5\u03c7\u03af\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1.",
|
||||
"store_as_new": "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c9\u03c2 \u03bd\u03ad\u03b1 \u03c3\u03c5\u03bd\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03b1\u03bd\u03c4\u03af \u03b3\u03b9\u03b1 \u03b5\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Category",
|
||||
"attachments": "Attachments",
|
||||
"notes": "Notes",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Update transaction",
|
||||
"after_update_create_another": "After updating, return here to continue editing.",
|
||||
"store_as_new": "Store as a new transaction instead of updating.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Categoria",
|
||||
"attachments": "Archivos adjuntos",
|
||||
"notes": "Notas",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Actualizar transacci\u00f3n",
|
||||
"after_update_create_another": "Despu\u00e9s de actualizar, vuelve aqu\u00ed para continuar editando.",
|
||||
"store_as_new": "Almacenar como una nueva transacci\u00f3n en lugar de actualizar.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Kategoria",
|
||||
"attachments": "Liitteet",
|
||||
"notes": "Muistiinpanot",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "P\u00e4ivit\u00e4 tapahtuma",
|
||||
"after_update_create_another": "P\u00e4ivityksen j\u00e4lkeen, palaa takaisin jatkamaan muokkausta.",
|
||||
"store_as_new": "Tallenna uutena tapahtumana p\u00e4ivityksen sijaan.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Cat\u00e9gorie",
|
||||
"attachments": "Pi\u00e8ces jointes",
|
||||
"notes": "Notes",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Mettre \u00e0 jour l'op\u00e9ration",
|
||||
"after_update_create_another": "Apr\u00e8s la mise \u00e0 jour, revenir ici pour continuer l'\u00e9dition.",
|
||||
"store_as_new": "Enregistrer comme une nouvelle op\u00e9ration au lieu de mettre \u00e0 jour.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Kateg\u00f3ria",
|
||||
"attachments": "Mell\u00e9kletek",
|
||||
"notes": "Megjegyz\u00e9sek",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Tranzakci\u00f3 friss\u00edt\u00e9se",
|
||||
"after_update_create_another": "A friss\u00edt\u00e9s ut\u00e1n t\u00e9rjen vissza ide a szerkeszt\u00e9s folytat\u00e1s\u00e1hoz.",
|
||||
"store_as_new": "T\u00e1rol\u00e1s \u00faj tranzakci\u00f3k\u00e9nt friss\u00edt\u00e9s helyett.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Kategori",
|
||||
"attachments": "Lampiran",
|
||||
"notes": "Notes",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Update transaction",
|
||||
"after_update_create_another": "After updating, return here to continue editing.",
|
||||
"store_as_new": "Store as a new transaction instead of updating.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Categoria",
|
||||
"attachments": "Allegati",
|
||||
"notes": "Note",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Aggiorna transazione",
|
||||
"after_update_create_another": "Dopo l'aggiornamento, torna qui per continuare la modifica.",
|
||||
"store_as_new": "Salva come nuova transazione invece di aggiornarla.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Kategori",
|
||||
"attachments": "Vedlegg",
|
||||
"notes": "Notater",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Update transaction",
|
||||
"after_update_create_another": "After updating, return here to continue editing.",
|
||||
"store_as_new": "Store as a new transaction instead of updating.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Categorie",
|
||||
"attachments": "Bijlagen",
|
||||
"notes": "Notities",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Update transactie",
|
||||
"after_update_create_another": "Na het opslaan terug om door te gaan met wijzigen.",
|
||||
"store_as_new": "Opslaan als nieuwe transactie ipv de huidige bij te werken.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Kategoria",
|
||||
"attachments": "Za\u0142\u0105czniki",
|
||||
"notes": "Notatki",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Zaktualizuj transakcj\u0119",
|
||||
"after_update_create_another": "Po aktualizacji wr\u00f3\u0107 tutaj, aby kontynuowa\u0107 edycj\u0119.",
|
||||
"store_as_new": "Zapisz jako now\u0105 zamiast aktualizowa\u0107.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Categoria",
|
||||
"attachments": "Anexos",
|
||||
"notes": "Notas",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Atualizar transa\u00e7\u00e3o",
|
||||
"after_update_create_another": "Depois de atualizar, retorne aqui para continuar editando.",
|
||||
"store_as_new": "Store as a new transaction instead of updating.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Categorie",
|
||||
"attachments": "Ata\u0219amente",
|
||||
"notes": "Noti\u021be",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Actualiza\u021bi tranzac\u021bia",
|
||||
"after_update_create_another": "Dup\u0103 actualizare, reveni\u021bi aici pentru a continua editarea.",
|
||||
"store_as_new": "Stoca\u021bi ca o tranzac\u021bie nou\u0103 \u00een loc s\u0103 actualiza\u021bi.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f",
|
||||
"attachments": "\u0412\u043b\u043e\u0436\u0435\u043d\u0438\u044f",
|
||||
"notes": "\u0417\u0430\u043c\u0435\u0442\u043a\u0438",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e",
|
||||
"after_update_create_another": "\u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u0441\u044e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.",
|
||||
"store_as_new": "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u043a \u043d\u043e\u0432\u0443\u044e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Kategori",
|
||||
"attachments": "Bilagor",
|
||||
"notes": "Noteringar",
|
||||
"external_uri": "External URI",
|
||||
"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.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Kategori",
|
||||
"attachments": "Ekler",
|
||||
"notes": "Notlar",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Update transaction",
|
||||
"after_update_create_another": "After updating, return here to continue editing.",
|
||||
"store_as_new": "Store as a new transaction instead of updating.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "Danh m\u1ee5c",
|
||||
"attachments": "T\u1ec7p \u0111\u00ednh k\u00e8m",
|
||||
"notes": "Ghi ch\u00fa",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "C\u1eadp nh\u1eadt giao d\u1ecbch",
|
||||
"after_update_create_another": "Sau khi c\u1eadp nh\u1eadt, quay l\u1ea1i \u0111\u00e2y \u0111\u1ec3 ti\u1ebfp t\u1ee5c ch\u1ec9nh s\u1eeda.",
|
||||
"store_as_new": "L\u01b0u tr\u1eef nh\u01b0 m\u1ed9t giao d\u1ecbch m\u1edbi thay v\u00ec c\u1eadp nh\u1eadt.",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "\u5206\u7c7b",
|
||||
"attachments": "\u9644\u52a0\u6863\u6848",
|
||||
"notes": "\u6ce8\u91ca",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "\u66f4\u65b0\u4ea4\u6613",
|
||||
"after_update_create_another": "\u66f4\u65b0\u540e\uff0c\u8fd4\u56de\u6b64\u9875\u9762\u7ee7\u7eed\u7f16\u8f91\u3002",
|
||||
"store_as_new": "\u4fdd\u5b58\u4e3a\u65b0\u4ea4\u6613\u800c\u4e0d\u662f\u66f4\u65b0\u6b64\u4ea4\u6613\u3002",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"category": "\u5206\u985e",
|
||||
"attachments": "\u9644\u52a0\u6a94\u6848",
|
||||
"notes": "\u5099\u8a3b",
|
||||
"external_uri": "External URI",
|
||||
"update_transaction": "Update transaction",
|
||||
"after_update_create_another": "After updating, return here to continue editing.",
|
||||
"store_as_new": "Store as a new transaction instead of updating.",
|
||||
|
||||
Reference in New Issue
Block a user