Skip to content

Firefly III: a personal finances manager

updated views

Sander Dorigo5607961a2b9b
diff --git a/resources/assets/v3/js/api/model/transaction/get.js b/resources/assets/v3/js/api/model/transaction/get.js
new file mode 100644
index 0000000000..bf0bdfe0c3
--- /dev/null
+++ b/resources/assets/v3/js/api/model/transaction/get.js
@@ -0,0 +1,37 @@
+/*
+ * get.js
+ * Copyright (c) 2023 [email protected]
+ *
+ * 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 {api} from "../../../boot/axios";
+
+export default class Get {
+
+ /**
+ *
+ * @param params
+ * @returns {Promise<AxiosResponse<any>>}
+ */
+ list(params) {
+ return api.get('/api/v1/transactions', {params: params});
+ }
+ show(id, params){
+ return api.get('/api/v1/transactions/' + id, {params: params});
+ }
+}
diff --git a/resources/assets/v3/js/api/model/transaction/put.js b/resources/assets/v3/js/api/model/transaction/put.js
new file mode 100644
index 0000000000..29885e8539
--- /dev/null
+++ b/resources/assets/v3/js/api/model/transaction/put.js
@@ -0,0 +1,28 @@
+/*
+ * post.js
+ * Copyright (c) 2023 [email protected]
+ *
+ * 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 {api} from "../../../boot/axios";
+
+export default class Put {
+ put(submission, params) {
+ let url = '/api/v1/transactions/' + parseInt(params.id);
+ return api.put(url, submission);
+ }
+}
diff --git a/resources/assets/v3/js/pages/transactions/create.js b/resources/assets/v3/js/pages/transactions/create.js
index a14b912666..9fe863193f 100644
--- a/resources/assets/v3/js/pages/transactions/create.js
+++ b/resources/assets/v3/js/pages/transactions/create.js
@@ -32,18 +32,9 @@ import {loadPiggyBanks} from "./shared/load-piggy-banks.js";
import {loadSubscriptions} from "./shared/load-subscriptions.js";
//
// import 'leaflet/dist/leaflet.css';
-import {addAutocomplete, getUrls} from "./shared/add-autocomplete.js";
-import {
- changeCategory,
- changeDescription,
- changeDestinationAccount,
- changeSourceAccount,
- selectDestinationAccount,
- selectSourceAccount
-} from "./shared/autocomplete-functions.js";
+import {addAllAutocompleteToForm, getUrls} from "./shared/add-autocomplete.js";
import {processAttachments} from "./shared/process-attachments.js";
import {spliceErrorsIntoTransactions} from "./shared/splice-errors-into-transactions.js";
-import Tags from "bootstrap5-tags";
// import {addLocation} from "./shared/manage-locations.js";
import i18next from "i18next";
// TODO fix tags
@@ -135,6 +126,23 @@ let create = function () {
changedSourceAccount(event) {
this.detectTransactionType();
},
+ disableSplitAccounts() {
+ if(this.entries.length > 1) {
+ // disable source and/or destination, based on account type.
+ for(let i = 1;i<this.entries.length;i++) {
+ // disable source when withdrawal or transfer
+ if('transfer' === this.groupProperties.transactionType || 'withdrawal' === this.groupProperties.transactionType) {
+ this.entries[i].source_account.disabled = true;
+ console.log('Disable source account #' + i);
+ }
+ // disable destination when deposit or transfer
+ if('transfer' === this.groupProperties.transactionType || 'deposit' === this.groupProperties.transactionType) {
+ this.entries[i].destination_account.disabled = true;
+ console.log('Disable destination account #' + i);
+ }
+ }
+ }
+ },
detectTransactionType() {
const sourceType = this.entries[0].source_account.type ?? 'unknown';
@@ -142,6 +150,7 @@ let create = function () {
if ('unknown' === sourceType && 'unknown' === destType) {
this.groupProperties.transactionType = 'unknown';
console.warn('Cannot infer transaction type from two unknown accounts.');
+ this.disableSplitAccounts();
return;
}
@@ -155,6 +164,7 @@ let create = function () {
console.log('filter down currencies for transfer.');
this.filterPrimaryCurrencies(this.entries[0].source_account.currency_code);
this.filterForeignCurrencies(this.entries[0].destination_account.currency_code);
+ this.disableSplitAccounts();
return;
}
// withdrawals:
@@ -162,6 +172,7 @@ let create = function () {
this.groupProperties.transactionType = 'withdrawal';
console.log('[a] Transaction type is detected to be "' + this.groupProperties.transactionType + '".');
this.filterPrimaryCurrencies(this.entries[0].source_account.currency_code);
+ this.disableSplitAccounts();
return;
}
if ('Asset account' === sourceType && 'unknown' === destType) {
@@ -169,12 +180,14 @@ let create = function () {
console.log('[b] Transaction type is detected to be "' + this.groupProperties.transactionType + '".');
console.log(this.entries[0].source_account);
this.filterPrimaryCurrencies(this.entries[0].source_account.currency_code);
+ this.disableSplitAccounts();
return;
}
if (['Debt', 'Loan', 'Mortgage'].includes(sourceType) && 'Expense account' === destType) {
this.groupProperties.transactionType = 'withdrawal';
console.log('[c] Transaction type is detected to be "' + this.groupProperties.transactionType + '".');
this.filterPrimaryCurrencies(this.entries[0].source_account.currency_code);
+ this.disableSplitAccounts();
return;
}
@@ -182,25 +195,30 @@ let create = function () {
if ('Revenue account' === sourceType && ['Asset account', 'Debt', 'Loan', 'Mortgage'].includes(destType)) {
this.groupProperties.transactionType = 'deposit';
console.log('Transaction type is detected to be "' + this.groupProperties.transactionType + '".');
+ this.disableSplitAccounts();
return;
}
if ('unknown' === sourceType && ['Asset account', 'Debt', 'Loan', 'Mortgage'].includes(destType)) {
this.groupProperties.transactionType = 'deposit';
console.log('Transaction type is detected to be "' + this.groupProperties.transactionType + '".');
+ this.disableSplitAccounts();
return;
}
if ('Expense account' === sourceType && ['Asset account', 'Debt', 'Loan', 'Mortgage'].includes(destType)) {
this.groupProperties.transactionType = 'deposit';
console.warn('FORCE transaction type to be "' + this.groupProperties.transactionType + '".');
this.entries[0].source_account.id = '';
+ this.disableSplitAccounts();
return;
}
if (['Debt', 'Loan', 'Mortgage'].includes(sourceType) && 'Asset account' === destType) {
this.groupProperties.transactionType = 'deposit';
console.log('Transaction type is detected to be "' + this.groupProperties.transactionType + '".');
+ this.disableSplitAccounts();
return;
}
console.warn('Unknown account combination between "' + sourceType + '" and "' + destType + '".');
+ this.disableSplitAccounts();
},
formattedTotalAmount() {
@@ -275,7 +293,7 @@ let create = function () {
},
addedSplit() {
-
+ addAllAutocompleteToForm(this.filters);
},
processUpload(event) {
@@ -302,6 +320,9 @@ let create = function () {
clearDescription(index) {
this.entries[index].description = '';
},
+ clearCategory(index) {
+ this.entries[index].category_name = '';
+ },
clearSourceAccount(index) {
this.entries[index].source_account = getAccount();
this.detectTransactionType();
@@ -377,26 +398,22 @@ let create = function () {
},
keyUpFromCategory(e) {
if (e.key === 'Enter' && false === this.formStates.categorySelectVisible) {
- this.submitTransaction();
+ this.save();
return;
}
this.formStates.categorySelectVisible = document.querySelector('input.ac-category').nextSibling.classList.contains('show');
},
- submitTransaction() {
- // reset all messages:
+ save() {
this.notifications.error.show = false;
this.notifications.success.show = false;
this.notifications.wait.show = false;
- //
- // reset all errors in the entries array:
+ this.formStates.isSubmitting = true;
+
for (let i in this.entries) {
- if (this.entries.hasOwnProperty(i)) {
- this.entries[i].errors = defaultErrorSet();
+ if (this.entries.hasOwnProperty(i)) {
+ this.entries[i].errors = defaultErrorSet();
+ }
}
- }
-
- // form is now submitting:
- this.formStates.isSubmitting = true;
// final check on transaction type.
this.detectTransactionType();
@@ -418,13 +435,11 @@ let create = function () {
// submit the transaction. Multi-stage process thing going on here!
let poster = new Post();
- console.log(submission);
poster.post(submission).then((response) => {
const group = response.data.data;
// submission was a success!
this.groupProperties.id = parseInt(group.id);
this.groupProperties.title = group.attributes.group_title ?? group.attributes.transactions[0].description
- console.log('group title is now: ', this.groupProperties.title);
// process attachments, if any:
const attachmentCount = processAttachments(this.groupProperties.id, group.attributes.transactions);
@@ -436,18 +451,12 @@ let create = function () {
return;
}
- // if not, respond to user options:
this.showMessageOrRedirectUser();
}).catch((error) => {
-
- this.submitting = false;
- console.log(error);
- // todo put errors in form
+ this.formStates.isSubmitting = true;
if (typeof error.response !== 'undefined') {
this.parseErrors(error.response.data);
}
-
-
});
},
@@ -494,90 +503,8 @@ let create = function () {
addSplit() {
console.log('addSplit()');
this.entries.push(createEmptySplit());
-
- setTimeout(() => {
- const count = this.entries.length - 1;
- const renderAccount = function (item, b, c) {
- return item.name_with_balance + '<br><small class="text-muted">' + i18next.t('firefly.account_type_' + item.type) + '</small>';
- };
- // if(document.querySelector('#location_map_' + count)) {
- // addLocation(count);
- // }
-
- // render tags:
- Tags.init('select.ac-tags', {
- allowClear: true,
- server: urls.tag,
- liveServer: true,
- clearEnd: true,
- labelField: 'tag',
- valueField: 'id',
- queryParam: 'query',
- allowNew: true,
- //serverDataKey: 'data',
- notFoundMessage: i18next.t('firefly.nothing_found'),
- noCache: true,
- fetchOptions: {
- headers: {
- 'X-CSRF-TOKEN': document.head.querySelector('meta[name="csrf-token"]').content
- }
- }
- });
-
- addAutocomplete({
- selector: 'input.ac-description',
- serverUrl: urls.description,
- valueField: 'id',
- labelField: 'description',
- onChange: changeDescription,
- onSelectItem: changeDescription,
- });
-
- addAutocomplete({
- selector: 'input.ac-source',
- serverUrl: urls.account,
- onRenderItem: renderAccount,
- valueField: 'id',
- labelField: 'name_with_balance',
- onChange: changeSourceAccount,
- onSelectItem: selectSourceAccount,
- hiddenValue: this.entries[count].source_account.alpine_name
- });
-
- addAutocomplete({
- selector: 'input.ac-dest',
- serverUrl: urls.account,
- account_types: this.filters.destination,
- valueField: 'id',
- labelField: 'name_with_balance',
- onRenderItem: renderAccount,
- onChange: changeDestinationAccount,
- onSelectItem: selectDestinationAccount
- });
-
- addAutocomplete({
- selector: 'input.ac-category',
- serverUrl: urls.category,
- valueField: 'id',
- labelField: 'name',
- onChange: changeCategory,
- onSelectItem: changeCategory
- });
-
- }, 150);
-
- // setTimeout(() => {
- // //
- //
- // // addedSplit, is called from the HTML
- // // for source account
-
- // console.log('here we are in');
-
-
-
- //
- // }, 150);
+ this.disableSplitAccounts();
+ addAllAutocompleteToForm(this.filters);
},
removeSplit(index) {
diff --git a/resources/assets/v3/js/pages/transactions/edit.js b/resources/assets/v3/js/pages/transactions/edit.js
new file mode 100644
index 0000000000..0fb4d7e757
--- /dev/null
+++ b/resources/assets/v3/js/pages/transactions/edit.js
@@ -0,0 +1,421 @@
+/*
+ * edit.js
+ * Copyright (c) 2024 [email protected]
+ *
+ * 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 '../../boot/bootstrap.js';
+import dates from '../../pages/shared/dates.js';
+import formatMoney from "../../util/format-money.js";
+import Get from "../../api/model/transaction/get.js";
+import {parseDownloadedSplits} from "./shared/parse-downloaded-splits.js";
+import {addAllAutocompleteToForm, getUrls} from "./shared/add-autocomplete.js";
+import {loadCurrencies} from "./shared/load-currencies.js";
+import {loadBudgets} from "./shared/load-budgets.js";
+import {loadPiggyBanks} from "./shared/load-piggy-banks.js";
+import {loadSubscriptions} from "./shared/load-subscriptions.js";
+import Tags from "bootstrap5-tags";
+import i18next from "i18next";
+import {createEmptySplit, defaultErrorSet} from "./shared/create-empty-split.js";
+import {parseFromEntries} from "./shared/parse-from-entries.js";
+import Put from "../../api/model/transaction/put.js";
+import {processAttachments} from "./shared/process-attachments.js";
+import {spliceErrorsIntoTransactions} from "./shared/splice-errors-into-transactions.js";
+import sidebar from "../shared/sidebar.js";
+
+// TODO upload attachments to other file
+// TODO fix two maps, perhaps disconnect from entries entirely.
+// TODO group title
+// TODO map location from preferences
+// TODO field preferences
+// TODO filters
+// TODO parse amount
+
+const urls = getUrls();
+
+let transactions = function () {
+ return {
+ // transactions are stored in "entries":
+ entries: [],
+ originals: [],
+
+ // state of the form is stored in formState:
+ formStates: {
+ loadingCurrencies: true,
+ loadingBudgets: true,
+ loadingPiggyBanks: true,
+ loadingSubscriptions: true,
+ isSubmitting: false,
+ returnHereButton: false,
+ saveAsNewButton: false, // edit form only
+ resetButton: true,
+ rulesButton: true,
+ webhooksButton: true,
+ },
+
+ // form behavior during transaction
+ formBehaviour: {
+ formType: 'edit',
+ foreignCurrencyEnabled: true,
+ categorySelectVisible: false,
+ },
+
+ // form data (except transactions) is stored in formData
+ formData: {
+ primaryCurrency: null,
+ enabledCurrencies: [],
+ primaryCurrencies: [],
+ foreignCurrencies: [],
+ budgets: [],
+ piggyBanks: [],
+ subscriptions: [],
+ },
+
+ // properties for the entire transaction group
+ groupProperties: {
+ transactionType: 'unknown',
+ title: null,
+ editTitle: null,
+ id: null, totalAmount: 0,
+ },
+
+ // notifications
+ notifications: {
+ error: {
+ show: false, text: '', url: '',
+ }, success: {
+ show: false, text: '', url: '',
+ }, wait: {
+ show: false, text: '',
+
+ }
+ },
+
+ keyUpFromCategory(e) {
+ if (e.key === 'Enter' && false === this.formBehaviour.categorySelectVisible) {
+ this.save();
+ return;
+ }
+ this.formBehaviour.categorySelectVisible = document.querySelector('input.ac-category').nextSibling.classList.contains('show');
+ },
+
+ // submit the transaction form.
+ // basically the same as store.js.
+ save() {
+ this.notifications.error.show = false;
+ this.notifications.success.show = false;
+ this.notifications.wait.show = false;
+ this.formStates.isSubmitting = true;
+
+ // reset all errors in the entries array:
+ for (let i in this.entries) {
+ if (this.entries.hasOwnProperty(i)) {
+ this.entries[i].errors = defaultErrorSet();
+ }
+ }
+
+ // parse transaction:
+ let transactions = parseFromEntries(this.entries, this.originals, this.groupProperties.transactionType);
+ let submission = {
+ group_title: this.groupProperties.editTitle,
+ fire_webhooks: this.formStates.webhooksButton,
+ apply_rules: this.formStates.rulesButton,
+ transactions: transactions
+ };
+
+ // catch for group title:
+ if (null === this.groupProperties.title && transactions.length > 1) {
+ submission.group_title = transactions[0].description;
+ }
+
+ // submit the transaction. Multi-stage process thing going on here!
+ let putter = new Put();
+ putter.put(submission, {id: this.groupProperties.id}).then((response) => {
+ const group = response.data.data;
+
+ // submission was a success!
+ this.groupProperties.id = parseInt(group.id);
+ this.groupProperties.title = group.attributes.group_title ?? group.attributes.transactions[0].description
+
+ // process attachments, if any:
+ const attachmentCount = processAttachments(this.groupProperties.id, group.attributes.transactions);
+
+ if (attachmentCount > 0) {
+ // if count is more than zero, system is processing transactions in the background.
+ this.notifications.wait.show = true;
+ this.notifications.wait.text = i18next.t('firefly.wait_attachments');
+ return;
+ }
+
+ // if not, respond to user options:
+ this.showMessageOrRedirectUser();
+ }).catch((error) => {
+ this.formStates.isSubmitting = false;
+ if (typeof error.response !== 'undefined') {
+ this.parseErrors(error.response.data);
+ }
+ });
+ },
+
+ // part of the account selection auto-complete
+ filters: {
+ source: [], destination: [],
+ },
+
+ addSplit() {
+ console.log('addSplit()');
+ this.entries.push(createEmptySplit());
+ this.disableSplitAccounts();
+ addAllAutocompleteToForm(this.filters);
+ },
+ addedSplit() {
+ console.log('addedSplit()');
+ this.disableSplitAccounts();
+ addAllAutocompleteToForm(this.filters);
+ },
+
+ disableSplitAccounts() {
+ if(this.entries.length > 1) {
+ // disable source and/or destination, based on account type.
+ for(let i = 1;i<this.entries.length;i++) {
+ // disable source when withdrawal or transfer
+ if('transfer' === this.groupProperties.transactionType || 'withdrawal' === this.groupProperties.transactionType) {
+ this.entries[i].source_account.disabled = true;
+ console.log('Disable source account #' + i);
+ }
+ // disable destination when deposit or transfer
+ if('transfer' === this.groupProperties.transactionType || 'deposit' === this.groupProperties.transactionType) {
+ this.entries[i].destination_account.disabled = true;
+ console.log('Disable destination account #' + i);
+ }
+ }
+ }
+ },
+
+ // events in the form
+ changedDateTime(event) {
+ console.warn('changedDateTime, event is not used');
+ },
+
+ changedDescription(event) {
+ console.warn('changedDescription, event is not used');
+ },
+
+ changedDestinationAccount(event) {
+ console.warn('changedDestinationAccount, event is not used');
+ },
+
+ changedSourceAccount(event) {
+ console.warn('changedSourceAccount, event is not used');
+ },
+
+ // duplicate function but this is easier.
+ formattedTotalAmount() {
+ if (this.entries.length === 0) {
+ return formatMoney(this.groupProperties.totalAmount, 'EUR');
+ }
+ return formatMoney(this.groupProperties.totalAmount, this.entries[0].currency_code ?? 'EUR');
+ },
+ getTags(index) {
+ console.log('at get tags ' + index);
+ console.log(this.entries[index].tags);
+ return this.entries[index].tags ?? [];
+ },
+
+ getTransactionGroup() {
+ this.entries = [];
+ const page = window.location.href.split('/');
+ const groupId = parseInt(page[page.length - 1]);
+ const getter = new Get();
+ getter.show(groupId, {}).then((response) => {
+ const data = response.data.data;
+ this.groupProperties.id = parseInt(data.id);
+ this.groupProperties.transactionType = data.attributes.transactions[0].type.toLowerCase();
+ this.groupProperties.title = data.attributes.title ?? data.attributes.transactions[0].description;
+ this.entries = parseDownloadedSplits(data.attributes.transactions, parseInt(data.id));
+
+ // remove waiting thing.
+ this.notifications.wait.show = false;
+ }).then(() => {
+ this.groupProperties.totalAmount = 0;
+ for (let i in this.entries) {
+ if (this.entries.hasOwnProperty(i)) {
+ this.groupProperties.totalAmount = this.groupProperties.totalAmount + parseFloat(this.entries[i].amount);
+ // TODO this does not include all possible types.
+ this.filters.source.push(this.entries[i].source_account.type);
+ this.filters.destination.push(this.entries[i].destination_account.type);
+ }
+ }
+ setTimeout(() => {
+ // render tags:
+ Tags.init('select.ac-tags', {
+ allowClear: true,
+ server: urls.tag,
+ liveServer: true,
+ clearEnd: true,
+ allowNew: true,
+ labelField: 'title',
+ valueField: 'id',
+ queryParam: 'filter[query]',
+ notFoundMessage: i18next.t('firefly.nothing_found'),
+ noCache: true,
+ fetchOptions: {
+ headers: {
+ 'X-CSRF-TOKEN': document.head.querySelector('meta[name="csrf-token"]').content
+ }
+ }
+ });
+ }, 150);
+ });
+ },
+
+ init() {
+ // download translations and get the transaction group.
+ this.notifications.wait.show = true;
+ this.notifications.wait.text = i18next.t('firefly.wait_loading_transaction');
+ this.getTransactionGroup();
+
+ // load meta data.
+ loadCurrencies().then(data => {
+ this.formStates.loadingCurrencies = false;
+ this.formData.primaryCurrency = data.primaryCurrency;
+ this.formData.enabledCurrencies = data.enabledCurrencies;
+ this.formData.primaryCurrencies = data.primaryCurrencies;
+ this.formData.foreignCurrencies = data.foreignCurrencies;
+ });
+
+ loadBudgets().then(data => {
+ this.formData.budgets = data;
+ this.formStates.loadingBudgets = false;
+ });
+ loadPiggyBanks().then(data => {
+ this.formData.piggyBanks = data;
+ this.formStates.loadingPiggyBanks = false;
+ });
+ loadSubscriptions().then(data => {
+ this.formData.subscriptions = data;
+ this.formStates.loadingSubscriptions = false;
+ });
+
+ // add some event listeners
+ document.addEventListener('upload-success', (event) => {
+ this.processUpload(event);
+ document.querySelectorAll("input[type=file]").value = "";
+ });
+
+ document.addEventListener('upload-error', (event) => {
+ this.processUploadError(event);
+ });
+ document.addEventListener('location-move', (event) => {
+ this.entries[event.detail.index].latitude = event.detail.latitude;
+ this.entries[event.detail.index].longitude = event.detail.longitude;
+ });
+
+ document.addEventListener('location-set', (event) => {
+ this.entries[event.detail.index].hasLocation = true;
+ this.entries[event.detail.index].latitude = event.detail.latitude;
+ this.entries[event.detail.index].longitude = event.detail.longitude;
+ this.entries[event.detail.index].zoomLevel = event.detail.zoomLevel;
+ });
+
+ document.addEventListener('location-zoom', (event) => {
+ this.entries[event.detail.index].hasLocation = true;
+ this.entries[event.detail.index].zoomLevel = event.detail.zoomLevel;
+ });
+ },
+
+ changedAmount(e) {
+ const index = parseInt(e.target.dataset.index);
+ this.entries[index].amount = parseFloat(e.target.value);
+ this.groupProperties.totalAmount = 0;
+ for (let i in this.entries) {
+ if (this.entries.hasOwnProperty(i)) {
+ this.groupProperties.totalAmount = this.groupProperties.totalAmount + parseFloat(this.entries[i].amount);
+ }
+ }
+ },
+ // TODO is a duplicate
+ showMessageOrRedirectUser() {
+ // disable all messages:
+ this.notifications.error.show = false;
+ this.notifications.success.show = false;
+ this.notifications.wait.show = false;
+
+ if (this.formStates.returnHereButton) {
+ let title = this.groupProperties.title;
+ if('' === title) {
+ title = this.entries[0].description;
+ }
+ this.notifications.success.show = true;
+ this.notifications.success.url = 'transactions/show/' + this.groupProperties.id;
+ this.notifications.success.text = i18next.t('firefly.updated_journal_js', {description: title});
+ this.formStates.isSubmitting = false;
+ return;
+ }
+ window.location = 'transactions/show/' + this.groupProperties.id + '?transaction_group_id=' + this.groupProperties.id + '&message=updated';
+ },
+ // TODO is a duplicate
+ parseErrors(data) {
+ // disable all messages:
+ this.notifications.error.show = true;
+ this.notifications.success.show = false;
+ this.notifications.wait.show = false;
+ this.formStates.isSubmitting = false;
+ this.notifications.error.text = i18next.t('firefly.errors_submission_v2', {errorMessage: data.message});
+
+ if (data.hasOwnProperty('errors')) {
+ this.entries = spliceErrorsIntoTransactions(data.errors, this.entries);
+ }
+ },
+ // TODO is a duplicate
+ processUpload(event) {
+ this.showMessageOrRedirectUser();
+ },
+ // TODO is a duplicate
+ processUploadError(event) {
+ this.notifications.success.show = false;
+ this.notifications.wait.show = false;
+ this.notifications.error.show = true;
+ this.formStates.isSubmitting = false;
+ this.notifications.error.text = i18next.t('firefly.errors_upload');
+ console.error(event);
+ },
+ }
+}
+
+let comps = {transactions, sidebar, dates};
+
+
+function loadPage() {
+ Object.keys(comps).forEach(comp => {
+ console.log(`Loading page component "${comp}"`);
+ let data = comps[comp]();
+ Alpine.data(comp, () => data);
+ });
+ Alpine.start();
+}
+
+// wait for load until bootstrapped event is received.
+document.addEventListener('firefly-iii-bootstrapped', () => {
+ console.log('Loaded through event listener.');
+ loadPage();
+});
+// or is bootstrapped before event is triggered.
+if (window.bootstrapped) {
+ console.log('Loaded through window variable.');
+ loadPage();
+}
diff --git a/resources/assets/v3/js/pages/transactions/shared/add-autocomplete.js b/resources/assets/v3/js/pages/transactions/shared/add-autocomplete.js
index 1c59bf8cb3..5e1ccb1258 100644
--- a/resources/assets/v3/js/pages/transactions/shared/add-autocomplete.js
+++ b/resources/assets/v3/js/pages/transactions/shared/add-autocomplete.js
@@ -19,6 +19,15 @@
*/
import Autocomplete from "bootstrap5-autocomplete";
+import i18next from "i18next";
+import {
+ changeCategory, changeDescription,
+ changeDestinationAccount,
+ changeSourceAccount,
+ selectDestinationAccount,
+ selectSourceAccount
+} from "./autocomplete-functions.js";
+import Tags from "bootstrap5-tags";
export function getUrls() {
return {
@@ -29,7 +38,74 @@ export function getUrls() {
}
}
-export function addAutocomplete(options) {
+export function addAllAutocompleteToForm(filters) {
+ const urls = getUrls();
+ setTimeout(() => {
+ // addedSplit, is called from the HTML
+ // for source account
+ const renderAccount = function (item, b, c) {
+ return item.name_with_balance + '<br><small class="text-muted">' + i18next.t('firefly.account_type_' + item.type) + '</small>';
+ };
+
+ // render tags:
+ Tags.init('select.ac-tags', {
+ allowClear: true,
+ server: urls.tag,
+ liveServer: true,
+ clearEnd: true,
+ labelField: 'tag',
+ valueField: 'id',
+ queryParam: 'query',
+ allowNew: true,
+ //serverDataKey: 'data',
+ notFoundMessage: i18next.t('firefly.nothing_found'),
+ noCache: true,
+ fetchOptions: {
+ headers: {
+ 'X-CSRF-TOKEN': document.head.querySelector('meta[name="csrf-token"]').content
+ }
+ }
+ });
+ addAutocomplete({
+ selector: 'input.ac-source',
+ serverUrl: urls.account,
+ account_types: filters.source,
+ onRenderItem: renderAccount,
+ valueField: 'id',
+ labelField: 'name',
+ onChange: changeSourceAccount,
+ onSelectItem: selectSourceAccount
+ });
+ addAutocomplete({
+ selector: 'input.ac-dest',
+ serverUrl: urls.account,
+ valueField: 'id',
+ labelField: 'name',
+ account_types: filters.destination,
+ onRenderItem: renderAccount,
+ onChange: changeDestinationAccount,
+ onSelectItem: selectDestinationAccount
+ });
+ addAutocomplete({
+ selector: 'input.ac-category',
+ serverUrl: urls.category,
+ valueField: 'id',
+ labelField: 'name',
+ onChange: changeCategory,
+ onSelectItem: changeCategory
+ });
+ addAutocomplete({
+ selector: 'input.ac-description',
+ serverUrl: urls.description,
+ valueField: 'id',
+ labelField: 'title',
+ onChange: changeDescription,
+ onSelectItem: changeDescription,
+ });
+ }, 150);
+}
+
+function addAutocomplete(options) {
const params = {
server: options.serverUrl,
serverParams: {},
diff --git a/resources/assets/v3/js/pages/transactions/shared/create-empty-split.js b/resources/assets/v3/js/pages/transactions/shared/create-empty-split.js
index b377c47575..7bc5668498 100644
--- a/resources/assets/v3/js/pages/transactions/shared/create-empty-split.js
+++ b/resources/assets/v3/js/pages/transactions/shared/create-empty-split.js
@@ -26,6 +26,7 @@ export function getAccount() {
id: '',
name: '',
alpine_name: '',
+ disabled: false,
};
}
diff --git a/resources/assets/v3/js/pages/transactions/shared/parse-downloaded-splits.js b/resources/assets/v3/js/pages/transactions/shared/parse-downloaded-splits.js
new file mode 100644
index 0000000000..95ca3582ea
--- /dev/null
+++ b/resources/assets/v3/js/pages/transactions/shared/parse-downloaded-splits.js
@@ -0,0 +1,95 @@
+/*
+ * parse-downloaded-splits.js
+ * Copyright (c) 2024 [email protected]
+ *
+ * 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 {createEmptySplit} from "./create-empty-split.js";
+import {format} from "date-fns";
+
+export function parseDownloadedSplits(downloads, groupId) {
+ let returnArray = [];
+ for (let i in downloads) {
+ if (downloads.hasOwnProperty(i)) {
+ // we have at least all default values!
+ let download = downloads[i];
+ let current = createEmptySplit();
+
+ // meta data
+ current.transaction_journal_id = download.transaction_journal_id;
+ current.transaction_group_id = groupId;
+ current.bill_id = download.bill_id;
+ current.bill_name = download.bill_name;
+ current.budget_id = download.budget_id;
+ current.budget_name = download.budget_name;
+ current.category_name = download.category_name;
+ current.category_id = download.category_id;
+ current.piggy_bank_id = download.piggy_bank_id;
+ current.piggy_bank_name = download.piggy_bank_name;
+
+ // meta dates
+ current.book_date = download.book_date;
+ current.due_date = download.due_date;
+ current.interest_date = download.interest_date;
+ current.invoice_date = download.invoice_date;
+ current.payment_date = download.payment_date;
+ current.process_date = download.process_date;
+
+ // more meta
+ current.external_url = download.external_url;
+ current.internal_reference = download.internal_reference;
+ current.notes = download.notes;
+ current.tags = download.tags;
+
+ // amount
+ current.amount = parseFloat(download.amount).toFixed(download.currency_decimal_places);
+ current.currency_code = download.currency_code;
+ if(null !== download.foreign_amount) {
+ current.forein_currency_code = download.foreign_currency_code;
+ current.foreign_amount = parseFloat(download.foreign_amount).toFixed(download.foreign_currency_decimal_places);
+ }
+
+ // date and description
+ current.date = format(new Date(download.date), 'yyyy-MM-dd HH:mm');
+ current.description = download.description;
+
+ // source and destination
+ current.destination_account = {
+ id: download.destination_id,
+ name: download.destination_name,
+ type: download.destination_type,
+ alpine_name: download.destination_name,
+ };
+
+ current.source_account = {
+ id: download.source_id,
+ name: download.source_name,
+ type: download.source_type,
+ alpine_name: download.source_name,
+ };
+
+ if(null !== download.latitude) {
+ current.hasLocation = true;
+ current.latitude = download.latitude;
+ current.longitude = download.longitude;
+ current.zoomLevel = download.zoom_level;
+ }
+ returnArray.push(current);
+ }
+ }
+ return returnArray;
+}
diff --git a/resources/assets/v3/vite.config.js b/resources/assets/v3/vite.config.js
index a7ddff822f..174a61e0d3 100644
--- a/resources/assets/v3/vite.config.js
+++ b/resources/assets/v3/vite.config.js
@@ -62,6 +62,7 @@ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {
// transactions
'js/pages/transactions/index.js',
'js/pages/transactions/create.js',
+ 'js/pages/transactions/edit.js',
// piggy banks
'js/pages/piggy-banks/index.js',
diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php
index ea2ade9cec..8a3e1198a3 100644
--- a/resources/lang/en_US/firefly.php
+++ b/resources/lang/en_US/firefly.php
@@ -1960,6 +1960,8 @@ return [
'extension_date_is' => 'Extension date is {date}',
// accounts:
+ 'disabled_split_account_dest' => 'This field is disabled. You can only change the destination account from the first split, and it will be applied to all splits.',
+ 'disabled_split_account_src' => 'This field is disabled. You can only change the source account from the first split, and it will be applied to all splits.',
'account_locked_currency' => 'The currency of this account must remain :name as long as piggy banks are linked to it.',
'i_am_owed_amount' => 'I am owed amount',
'i_owe_amount' => 'I owe amount',
@@ -2142,6 +2144,7 @@ return [
'deleted_reconciliation' => 'Successfully deleted reconciliation transaction ":description"',
'stored_journal' => 'Successfully created new transaction ":description"',
'stored_journal_js' => 'Successfully created new transaction "{{description}}"',
+ 'updated_journal_js' => 'Successfully updated transaction "{{description}}"',
'stored_journal_no_descr' => 'Successfully created your new transaction',
'updated_journal_no_descr' => 'Successfully updated your transaction',
'select_transactions' => 'Select transactions',
diff --git a/resources/views/accounts/reconcile/show.twig b/resources/views/accounts/reconcile/show.twig
index e151a1f6b0..e71ac83208 100644
--- a/resources/views/accounts/reconcile/show.twig
+++ b/resources/views/accounts/reconcile/show.twig
@@ -16,8 +16,8 @@
<button id="transaction_menu" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span class="fa fa-ellipsis-v"></span>
</button>
<ul class="dropdown-menu" role="menu">
- <li><a href="{{ route('transactions.edit',journal.id) }}"><span class="fa fa-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
- <li><a href="{{ route('transactions.delete',journal.id) }}"><span class="fa fa-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
+ <li><a href="{{ route('transactions.edit',journal.id) }}"><span class="bi bi-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
+ <li><a href="{{ route('transactions.delete',journal.id) }}"><span class="bi bi-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
</ul>
</div>
</div>
@@ -52,8 +52,8 @@
<div class="box-footer">
<div class="pull-right">
<div class="btn-group">
- <a class="btn btn-default" href="{{ route('transactions.edit',journal.id) }}"><span class="fa fa-pencil fa-fw"></span> {{ 'edit'|_ }}</a>
- <a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-danger"><span class="fa fa-trash fa-fw"></span> {{ 'delete'|_ }}
+ <a class="btn btn-default" href="{{ route('transactions.edit',journal.id) }}"><span class="bi bi-pencil fa-fw"></span> {{ 'edit'|_ }}</a>
+ <a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-danger"><span class="bi bi-trash fa-fw"></span> {{ 'delete'|_ }}
</a>
</div>
</div>
diff --git a/resources/views/accounts/reconcile/transactions.twig b/resources/views/accounts/reconcile/transactions.twig
index 354048aff0..701ced5d87 100644
--- a/resources/views/accounts/reconcile/transactions.twig
+++ b/resources/views/accounts/reconcile/transactions.twig
@@ -60,11 +60,11 @@
{% endif %}
<tr data-date="{{ journal.date.format('Y-m-d') }}" data-id="{{ journal.transaction_journal_id }}">
<td class="hidden-xs">
- <div class="btn-group btn-group-xs">
+ <div class="btn-group btn-group-sm">
<a href="{{ route('transactions.edit', [journal.transaction_group_id]) }}" class="btn btn-xs btn-default"><span
- class="fa fa-fw fa-pencil"></span></a>
+ class="bi bi-pencil"></span></a>
<a href="{{ route('transactions.delete', [journal.transaction_group_id]) }}" class="btn btn-danger"><span
- class="fa fa-trash"></span></a>
+ class="bi bi-trash"></span></a>
</div>
</td>
diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig
index b024ab2fc0..0f64db0c4b 100644
--- a/resources/views/accounts/show.twig
+++ b/resources/views/accounts/show.twig
@@ -31,9 +31,9 @@
class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('accounts.edit', account.id) }}"><span
- class="fa fa-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
+ class="bi bi-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('accounts.delete', account.id) }}"><span
- class="fa fa-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
+ class="bi bi-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
<li>
<a href="{{ route('accounts.reconcile',account.id) }}"><span class="fa fa-fw fa-check"></span> {{ 'reconcile_this_account'|_ }}</a>
</li>
diff --git a/resources/views/attachments/index.twig b/resources/views/attachments/index.twig
index 28e67eb014..b80617fabc 100644
--- a/resources/views/attachments/index.twig
+++ b/resources/views/attachments/index.twig
@@ -29,9 +29,9 @@
{% for att in set %}
<tr>
<td data-value="{{ att.id }}">
- <div class="btn-group btn-group-xs">
- <a href="{{ route('attachments.edit', att.id) }}" class="btn btn-default"><span class="fa fa-pencil"></span></a>
- <a href="{{ route('attachments.delete', att.id) }}" class="btn btn-danger"><span class="fa fa-trash"></span></a>
+ <div class="btn-group btn-group-sm">
+ <a href="{{ route('attachments.edit', att.id) }}" class="btn btn-default"><span class="bi bi-pencil"></span></a>
+ <a href="{{ route('attachments.delete', att.id) }}" class="btn btn-danger"><span class="bi bi-trash"></span></a>
<a href="{{ route('attachments.download', att.id) }}" class="btn btn-default"><span class="fa fa-download"></span></a>
</div>
</td>
diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig
index 82093bb760..24e9360149 100644
--- a/resources/views/bills/show.twig
+++ b/resources/views/bills/show.twig
@@ -16,8 +16,8 @@
<div class="btn-group">
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
- <li><a href="{{ route('subscriptions.edit', object.data.id) }}"><span class="fa fa-fw fa-pencil"></span> {{ 'edit'|_ }}</a></li>
- <li><a href="{{ route('subscriptions.delete', object.data.id) }}"><span class="fa fa-fw fa-trash-o"></span> {{ 'delete'|_ }}</a></li>
+ <li><a href="{{ route('subscriptions.edit', object.data.id) }}"><span class="bi bi-pencil"></span> {{ 'edit'|_ }}</a></li>
+ <li><a href="{{ route('subscriptions.delete', object.data.id) }}"><span class="bi bi-trash-o"></span> {{ 'delete'|_ }}</a></li>
</ul>
</div>
</div>
diff --git a/resources/views/budgets/old-index.twig b/resources/views/budgets/old-index.twig
index f54c692c26..54d3303973 100644
--- a/resources/views/budgets/old-index.twig
+++ b/resources/views/budgets/old-index.twig
@@ -222,10 +222,10 @@
{% for budget in budgets %}
<tr data-id="{{ budget.id }}">
<td class="hidden-sm hidden-xs">
- <div class="btn-group btn-group-xs">
+ <div class="btn-group btn-group-sm">
<a href="#" class="handle object-handle btn btn-default"><span class="fa fa-fw fa-bars"></span></a>
- <a href="{{ route('budgets.edit', budget.id) }}" class="btn btn-xs btn-default"><span class="fa fa-fw fa-pencil"></span></a>
- <a href="{{ route('budgets.delete', budget.id) }}" class="btn btn-xs btn-danger"><span class="fa fa-fw fa-trash-o"></span></a>
+ <a href="{{ route('budgets.edit', budget.id) }}" class="btn btn-xs btn-default"><span class="bi bi-pencil"></span></a>
+ <a href="{{ route('budgets.delete', budget.id) }}" class="btn btn-xs btn-danger"><span class="bi bi-trash-o"></span></a>
</div>
</td>
<td>
diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twig
index f13da32c4d..5129640e16 100644
--- a/resources/views/budgets/show.twig
+++ b/resources/views/budgets/show.twig
@@ -20,8 +20,8 @@
<div class="btn-group">
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
- <li><a href="{{ route('budgets.edit',budget.id) }}"><span class="fa fa-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
- <li><a href="{{ route('budgets.delete',budget.id) }}"><span class="fa fa-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
+ <li><a href="{{ route('budgets.edit',budget.id) }}"><span class="bi bi-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
+ <li><a href="{{ route('budgets.delete',budget.id) }}"><span class="bi bi-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
</ul>
</div>
</div>
diff --git a/resources/views/components/layout/sidebar.blade.php b/resources/views/components/layout/sidebar.blade.php
index 29f91a70c6..61bf3d3e66 100644
--- a/resources/views/components/layout/sidebar.blade.php
+++ b/resources/views/components/layout/sidebar.blade.php
@@ -30,7 +30,7 @@
</li>
<li class="nav-header text-uppercase">{{ __('firefly.financial_control') }}</li>
<li class="nav-item">
- <a href="{{ route('budgets.index') }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuItemActivePartial('budgets.') }}">
+ <a href="{{ route('budgets.index') }}" class="nav-link {{ menu_item_active_partial('budgets.') }}">
<em class="nav-icon bi bi-pie-chart"></em>
<p>
{{ __('firefly.budgets') }}
@@ -38,7 +38,7 @@
</a>
</li>
<li class="nav-item">
- <a href="{{ route('subscriptions.index') }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuItemActivePartial('subscriptions.') }}">
+ <a href="{{ route('subscriptions.index') }}" class="nav-link {{ menu_item_active_partial('subscriptions.') }}">
<em class="nav-icon bi bi-calendar"></em>
<p>
{{ __('firefly.subscriptions') }}
@@ -46,7 +46,7 @@
</a>
</li>
<li class="nav-item">
- <a href="{{ route('piggy-banks.index') }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuItemActivePartial('piggy-banks.') }}">
+ <a href="{{ route('piggy-banks.index') }}" class="nav-link {{ menu_item_active_partial('piggy-banks.') }}">
<em class="nav-icon bi bi-bullseye"></em>
<p>
{{ __('firefly.piggyBanks') }}
@@ -55,7 +55,7 @@
</li>
<li class="nav-header text-uppercase">{{ __('firefly.accounting') }}</li>
- <li class="nav-item {{ \FireflyIII\Support\Blade\Navigation::menuOpenPartial('transactions.') }}">
+ <li class="nav-item {{ menu_open_partial('transactions.') }}">
<a href="#" class="nav-link">
<em class="nav-icon bi bi-wallet"></em>
<p>
@@ -65,32 +65,32 @@
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
- <a href="{{ route('transactions.index', ['withdrawal']) }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuSubItemActive('transactions.index','withdrawal') }}">
+ <a href="{{ route('transactions.index', ['withdrawal']) }}" class="nav-link {{ menu_sub_item_active('transactions.index','withdrawal') }}">
<em class="nav-icon bi bi-arrow-left"></em>
<p>{{ __('firefly.expenses') }}</p>
</a>
</li>
<li class="nav-item">
- <a href="{{ route('transactions.index', ['deposit']) }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuSubItemActive('transactions.index','deposit') }}">
+ <a href="{{ route('transactions.index', ['deposit']) }}" class="nav-link {{ menu_sub_item_active('transactions.index','deposit') }}">
<em class="nav-icon bi bi-arrow-right"></em>
<p>{{ __('firefly.income') }}</p>
</a>
</li>
<li class="nav-item">
- <a href="{{ route('transactions.index', ['transfers']) }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuSubItemActive('transactions.index','transfers') }}">
+ <a href="{{ route('transactions.index', ['transfers']) }}" class="nav-link {{ menu_sub_item_active('transactions.index','transfers') }}">
<em class="nav-icon bi bi-arrow-left-right"></em>
<p>{{ __('firefly.transfers') }}</p>
</a>
</li>
<li class="nav-item">
- <a href="{{ route('transactions.index', ['all']) }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuSubItemActive('transactions.index','all') }}">
+ <a href="{{ route('transactions.index', ['all']) }}" class="nav-link {{ menu_sub_item_active('transactions.index','all') }}">
<em class="nav-icon bi bi-arrow-repeat"></em>
<p>{{ __('firefly.all_transactions') }}</p>
</a>
</li>
</ul>
</li>
- <li class="nav-item {{ \FireflyIII\Support\Blade\Navigation::menuOpenPartial('rules.') }} {{ \FireflyIII\Support\Blade\Navigation::menuOpenPartial('recurring.') }}">
+ <li class="nav-item {{ menu_open_partial('rules.') }} {{ menu_open_partial('recurring.') }}">
<a href="#" class="nav-link">
<em class="nav-icon bi bi-cpu"></em>
<p>
@@ -100,7 +100,7 @@
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
- <a href="{{ route('rules.index') }}" class="nav-link">
+ <a href="{{ route('rules.index') }}" class="nav-link {{ menu_item_active_partial('rules.') }}">
<em class="nav-icon bi bi-shuffle"></em>
<p>{{__('firefly.rules')}}</p>
</a>
@@ -130,7 +130,7 @@
</ul>
</li>
<li class="nav-header text-uppercase">{{ __('firefly.organization') }}</li>
- <li class="nav-item {{ \FireflyIII\Support\Blade\Navigation::menuOpenPartial('accounts.') }}">
+ <li class="nav-item {{ menu_open_partial('accounts.') }}">
<a href="#" class="nav-link">
<em class="nav-icon bi bi-credit-card"></em>
<p>
@@ -140,25 +140,25 @@
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
- <a href="{{ route('accounts.index', ['asset']) }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuSubItemActive('accounts.index','asset') }}">
+ <a href="{{ route('accounts.index', ['asset']) }}" class="nav-link {{ menu_sub_item_active('accounts.index','asset') }}">
<em class="nav-icon bi bi-cash"></em>
<p>{{ __('firefly.asset_accounts') }}</p>
</a>
</li>
<li class="nav-item">
- <a href="{{ route('accounts.index', ['expense']) }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuSubItemActive('accounts.index','expense') }}">
+ <a href="{{ route('accounts.index', ['expense']) }}" class="nav-link {{ menu_sub_item_active('accounts.index','expense') }}">
<em class="nav-icon bi bi-cart"></em>
<p>{{trans('firefly.expense_accounts')}}</p>
</a>
</li>
<li class="nav-item">
- <a href="{{ route('accounts.index', ['revenue']) }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuSubItemActive('accounts.index','revenue') }}">
+ <a href="{{ route('accounts.index', ['revenue']) }}" class="nav-link {{ menu_sub_item_active('accounts.index','revenue') }}">
<em class="nav-icon bi bi-box-arrow-down"></em>
<p>{{ __('firefly.revenue_accounts') }}</p>
</a>
</li>
<li class="nav-item">
- <a href="{{ route('accounts.index', ['liabilities']) }}" class="nav-link {{ \FireflyIII\Support\Blade\Navigation::menuSubItemActive('accounts.index','liabilities') }}">
+ <a href="{{ route('accounts.index', ['liabilities']) }}" class="nav-link {{ menu_sub_item_active('accounts.index','liabilities') }}">
<em class="nav-icon bi bi-ticket-detailed"></em>
<p>{{ __('firefly.liabilities_accounts') }}</p>
</a>
@@ -166,7 +166,7 @@
</ul>
</li>
- <li class="nav-item {{ \FireflyIII\Support\Blade\Navigation::menuOpenPartial('categories.') }} {{ \FireflyIII\Support\Blade\Navigation::menuOpenPartial('tags.') }} {{ \FireflyIII\Support\Blade\Navigation::menuOpenPartial('object-groups.') }}">
+ <li class="nav-item {{ menu_open_partial('categories.') }} {{ menu_open_partial('tags.') }} {{ menu_open_partial('object-groups.') }}">
<a href="#" class="nav-link">
<em class="nav-icon bi bi-tags"></em>
<p>
@@ -198,25 +198,25 @@
<li class="nav-header text-uppercase">{{ __('firefly.others') }}</li>
- <li class="nav-item {{ \FireflyIII\Support\Blade\Navigation::menuItemActivePartial('currencies.') }}">
+ <li class="nav-item {{ menu_item_active_partial('currencies.') }}">
<a href="{{ route('currencies.index') }}" class="nav-link">
<em class="nav-icon bi bi-currency-euro"></em>
<p>{{ __('firefly.currencies') }}</p>
</a>
</li>
- <li class="nav-item {{ \FireflyIII\Support\Blade\Navigation::menuItemActivePartial('exchange-rates.') }}">
+ <li class="nav-item {{ menu_item_active_partial('exchange-rates.') }}">
<a href="{{ route('exchange-rates.index') }}" class="nav-link">
<em class="nav-icon bi bi-currency-exchange"></em>
<p>{{ __('firefly.menu_exchange_rates_index') }}</p>
</a>
</li>
- <li class="nav-item {{ \FireflyIII\Support\Blade\Navigation::menuItemActivePartial('reports.') }}">
+ <li class="nav-item {{ menu_item_active_partial('reports.') }}">
<a href="{{ route('reports.index') }}" class="nav-link">
<em class="nav-icon bi bi-bar-chart"></em>
<p>{{ __('firefly.reports') }}</p>
</a>
</li>
- <li class="nav-item {{ \FireflyIII\Support\Blade\Navigation::menuItemActivePartial('export.') }}">
+ <li class="nav-item {{ menu_item_active_partial('export.') }}">
<a href="{{ route('export.index') }}" class="nav-link">
<em class="nav-icon bi bi-upload"></em>
<p>{{ __('firefly.export_data_menu') }}</p>
diff --git a/resources/views/components/lists/groups-large.blade.php b/resources/views/components/lists/groups-large.blade.php
index 25b86899a8..8f12f0f4e2 100644
--- a/resources/views/components/lists/groups-large.blade.php
+++ b/resources/views/components/lists/groups-large.blade.php
@@ -13,9 +13,9 @@
{{ __('firefly.actions') }}<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="top_action_menu">
- <li><a href="#" class="dropdown-item mass-edit"><span class="fa fa-fw fa-pencil"></span><span class="txt">{{ __('firefly.mass_edit') }}</span></a></li>
- <li><a href="#" class="dropdown-item bulk-edit"><span class="fa fa-fw fa-pencil-square-o"></span><span class="txt">{{ __('firefly.bulk_edit') }}</span></a></li>
- <li><a href="#" class="dropdown-item mass-delete"><span class="fa fa-fw fa-trash"></span><span class="txt">{{ __('firefly.mass_delete') }}</span></a></li>
+ <li><a href="#" class="dropdown-item mass-edit"><span class="bi bi-pencil"></span><span class="txt">{{ __('firefly.mass_edit') }}</span></a></li>
+ <li><a href="#" class="dropdown-item bulk-edit"><span class="bi bi-pencil-square-o"></span><span class="txt">{{ __('firefly.bulk_edit') }}</span></a></li>
+ <li><a href="#" class="dropdown-item mass-delete"><span class="bi bi-trash"></span><span class="txt">{{ __('firefly.mass_delete') }}</span></a></li>
</ul>
</div>
</td>
@@ -87,8 +87,8 @@
<button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">{{ __('firefly.actions') }} <span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
- <li><a href="{{ route('transactions.edit', [$group['id']]) }}"><span class="fa fa-fw fa-pencil"></span> {{ __('firefly.edit') }}</a></li>
- <li><a href="{{ route('transactions.delete', [$group['id']]) }}"><span class="fa fa-fw fa-trash"></span> {{ __('firefly.delete') }}</a></li>
+ <li><a href="{{ route('transactions.edit', [$group['id']]) }}"><span class="bi bi-pencil"></span> {{ __('firefly.edit') }}</a></li>
+ <li><a href="{{ route('transactions.delete', [$group['id']]) }}"><span class="bi bi-trash"></span> {{ __('firefly.delete') }}</a></li>
<li><a href="#" data-id="{{ $group['id'] }}" class="clone-transaction"><span class="fa fa-copy fa-fw"></span> {{ __('firefly.clone') }}</a></li>
<li><a href="#" data-id="{{ $group['id'] }}" class="clone-transaction-and-edit"><span class="fa fa-copy fa-fw"></span> {{ __('firefly.clone_and_edit') }}</a></li>
</ul>
diff --git a/resources/views/components/transaction/split.blade.php b/resources/views/components/transaction/split.blade.php
index 415a28b0e1..1906d2857e 100644
--- a/resources/views/components/transaction/split.blade.php
+++ b/resources/views/components/transaction/split.blade.php
@@ -116,7 +116,7 @@
@click="removeSplit(index)">{{ __('firefly.transaction_remove_split') }}</button>
</template>
<button class="btn btn-success text-white" :disabled="formStates.isSubmitting"
- @click="submitTransaction()">{{ __('firefly.submit') }}</button>
+ @click="save()">{{ __('firefly.submit') }}</button>
</div>
</div>
</div>
diff --git a/resources/views/components/transaction/tab-list.blade.php b/resources/views/components/transaction/tab-list.blade.php
index 5bdc8a4e0a..bfc5ebf965 100644
--- a/resources/views/components/transaction/tab-list.blade.php
+++ b/resources/views/components/transaction/tab-list.blade.php
@@ -10,7 +10,13 @@
:data-bs-target="'#split-'+index+'-pane'"
type="button" role="tab"
:aria-controls="'split-'+index+'-pane'"
- aria-selected="true">{{ __('firefly.single_split') }} #<span x-text="index+1"></span>
+ aria-selected="true">
+ <template x-if="'' === transaction.description">
+ <span>{{ __('firefly.single_split') }} #<span x-text="index+1"></span></span>
+ </template>
+ <template x-if="'' !== transaction.description">
+ <span x-text="transaction.description"></span>
+ </template>
</button>
</li>
</template>
diff --git a/resources/views/currencies/index.twig b/resources/views/currencies/index.twig
index 82d40aeebd..d82ee39ed5 100644
--- a/resources/views/currencies/index.twig
+++ b/resources/views/currencies/index.twig
@@ -34,12 +34,12 @@
{% for currency in currencies %}
<tr>
<td>
- <div class="btn-group btn-group-xs">
+ <div class="btn-group btn-group-sm">
{% if isOwner %}
<a class="btn btn-default" href="{{ route('currencies.edit',currency.id) }}"><span
- class="fa fa-fw fa-pencil"></span></a>
+ class="bi bi-pencil"></span></a>
<a class="btn btn-danger" href="{{ route('currencies.delete',currency.id) }}"><span
- class="fa fa-fw fa-trash"></span></a>
+ class="bi bi-trash"></span></a>
{% endif %}
{# Disable the currency. #}
{% if currency.userGroupEnabled %}
diff --git a/resources/views/list/accounts.twig b/resources/views/list/accounts.twig
index 30d6096202..5242e50ba8 100644
--- a/resources/views/list/accounts.twig
+++ b/resources/views/list/accounts.twig
@@ -133,12 +133,12 @@
</span>
</td>
<td class="hidden-sm hidden-xs">
- <div class="btn-group btn-group-xs pull-right">
+ <div class="btn-group btn-group-sm pull-right">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
- <li><a href="{{ route('accounts.edit',account.id) }}"><span class="fa fa-fw fa-pencil"></span> {{ 'edit'|_ }}</a></li>
- <li><a href="{{ route('accounts.delete',account.id) }}"><span class="fa fa-fw fa-trash"></span> {{ 'delete'|_ }}</a></li>
+ <li><a href="{{ route('accounts.edit',account.id) }}"><span class="bi bi-pencil"></span> {{ 'edit'|_ }}</a></li>
+ <li><a href="{{ route('accounts.delete',account.id) }}"><span class="bi bi-trash"></span> {{ 'delete'|_ }}</a></li>
{% if objectType == 'asset' %}
<li><a href="{{ route('accounts.reconcile',account.id) }}"><span class="fa fa-fw fa-check"></span> {{ 'reconcile_this_account'|_ }}</a></li>
{% endif %}
diff --git a/resources/views/list/attachments.twig b/resources/views/list/attachments.twig
index 61e359c0dc..69ed2e9d93 100644
--- a/resources/views/list/attachments.twig
+++ b/resources/views/list/attachments.twig
@@ -2,11 +2,11 @@
{% for attachment in attachments %}
<tr>
<td class="onetwenty">
- <div class="btn-group btn-group-xs">
+ <div class="btn-group btn-group-sm">
<a href="{{ route('attachments.edit', attachment.id) }}" class="btn btn-default"><span
- class="fa fa-pencil"></span></a>
+ class="bi bi-pencil"></span></a>
<a href="{{ route('attachments.delete', attachment.id) }}" class="btn btn-danger"><span
- class="fa fa-trash"></span></a>
+ class="bi bi-trash"></span></a>
{% if attachment.file_exists %}
<a href="{{ route('attachments.download', attachment.id) }}" class="btn btn-default"><span
class="fa fa-download"></span></a>
diff --git a/resources/views/list/bills.twig b/resources/views/list/bills.twig
index ff4cbcc562..f025df8bb0 100644
--- a/resources/views/list/bills.twig
+++ b/resources/views/list/bills.twig
@@ -31,11 +31,11 @@
<span class="fa fa-fw fa-bars bill-handle"></span>
</td>
<td class="hidden-sm hidden-xs">
- <div class="btn-group btn-group-xs edit_tr_buttons"><a href="{{ route('subscriptions.edit',entry.id) }}"
+ <div class="btn-group btn-group-sm edit_tr_buttons"><a href="{{ route('subscriptions.edit',entry.id) }}"
class="btn btn-default btn-xs"><span
- class="fa fa-fw fa-pencil"></span></a><a
+ class="bi bi-pencil"></span></a><a
href="{{ route('subscriptions.delete',entry.id) }}" class="btn btn-danger btn-xs"><span
- class="fa fa-fw fa-trash-o"></span></a></div>
+ class="bi bi-trash-o"></span></a></div>
</td>
<td>
{% if not entry.active %}
diff --git a/resources/views/list/categories.twig b/resources/views/list/categories.twig
index 43b7c677e3..dad57d0235 100644
--- a/resources/views/list/categories.twig
+++ b/resources/views/list/categories.twig
@@ -18,9 +18,9 @@
{% for category in categories %}
<tr>
<td>
- <div class="btn-group btn-group-xs">
- <a href="{{ route('categories.edit', category.id) }}" class="btn btn-default btn-xs"><span class="fa fa-fw fa-pencil"></span></a>
- <a href="{{ route('categories.delete', category.id) }}" class="btn btn-danger btn-xs"><span class="fa fa-fw fa-trash-o"></span></a>
+ <div class="btn-group btn-group-sm">
+ <a href="{{ route('categories.edit', category.id) }}" class="btn btn-default btn-xs"><span class="bi bi-pencil"></span></a>
+ <a href="{{ route('categories.delete', category.id) }}" class="btn btn-danger btn-xs"><span class="bi bi-trash-o"></span></a>
</div>
</td>
<td data-value="{{ category.name }}">
diff --git a/resources/views/list/groups.twig b/resources/views/list/groups.twig
index 604f4caec5..64d4f422c8 100644
--- a/resources/views/list/groups.twig
+++ b/resources/views/list/groups.twig
@@ -8,17 +8,17 @@
{% endif %}
<td colspan="1" class="hidden-xs">
<!-- Single button -->
- <div class="btn-group btn-group-xs action-menu pull-right hidden">
+ <div class="btn-group btn-group-sm action-menu pull-right hidden">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }}<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
- <li><a href="#" class="mass-edit"><span class="fa fa-fw fa-pencil"></span>
+ <li><a href="#" class="mass-edit"><span class="bi bi-pencil"></span>
<span class="txt">{{ 'mass_edit'|_ }}</span></a></li>
- <li><a href="#" class="bulk-edit"><span class="fa fa-fw fa-pencil-square-o"></span>
+ <li><a href="#" class="bulk-edit"><span class="bi bi-pencil-square-o"></span>
<span class="txt">{{ 'bulk_edit'|_ }}</span></a></li>
- <li><a href="#" class="mass-delete"><span class="fa fa-fw fa-trash"></span>
+ <li><a href="#" class="mass-delete"><span class="bi bi-trash"></span>
<span class="txt">{{ 'mass_delete'|_ }}</span></a></li>
</ul>
</div>
@@ -92,15 +92,15 @@
<td class="top-light-border" colspan="2">&nbsp;</td>
{% endif %}
<td class="top-light-border hidden-xs" colspan="2">
- <div class="btn-group btn-group-xs pull-right">
+ <div class="btn-group btn-group-sm pull-right">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li><a href="{{ route('transactions.edit', [group.id]) }}"><span
- class="fa fa-fw fa-pencil"></span> {{ 'edit'|_ }}</a></li>
+ class="bi bi-pencil"></span> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('transactions.delete', [group.id]) }}"><span
- class="fa fa-fw fa-trash"></span> {{ 'delete'|_ }}</a></li>
+ class="bi bi-trash"></span> {{ 'delete'|_ }}</a></li>
<li><a href="#" data-id="{{ group.id }}" class="clone-transaction"><span
class="fa fa-copy fa-fw"></span> {{ 'clone'|_ }}</a></li>
<li><a href="#" data-id="{{ group.id }}" class="clone-transaction-and-edit"><span
@@ -381,16 +381,16 @@
{% if group.count == 1 %}
<td class="hidden-xs {{ className }}">
- <div class="btn-group btn-group-xs pull-right">
+ <div class="btn-group btn-group-sm pull-right">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li><a href="{{ route('transactions.edit', [group.id]) }}"><span
- class="fa fa-fw fa-pencil"></span> {{ 'edit'|_ }}</a></li>
+ class="bi bi-pencil"></span> {{ 'edit'|_ }}</a></li>
{% if transaction.transaction_type_type != 'Opening balance' and transaction.transaction_type_type != 'Liability credit' %}
<li><a href="{{ route('transactions.delete', [group.id]) }}"><span
- class="fa fa-fw fa-trash"></span> {{ 'delete'|_ }}</a></li>
+ class="bi bi-trash"></span> {{ 'delete'|_ }}</a></li>
{% endif %}
{% if transaction.transaction_type_type != 'Reconciliation' and transaction.transaction_type_type != 'Opening balance' and transaction.transaction_type_type != 'Liability credit' %}
<li><a href="#" data-id="{{ group.id }}" class="clone-transaction"><span
@@ -432,17 +432,17 @@
<td colspan="8">
<div class="pull-right">
<!-- Single button -->
- <div class="btn-group action-menu btn-group-xs pull-right hidden">
+ <div class="btn-group action-menu btn-group-sm pull-right hidden">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span>
</button>
- <ul class="dropdown-menu btn-group-xs dropdown-menu-right">
- <li><a href="#" class="mass-edit"><span class="fa fa-fw fa-pencil"></span>
+ <ul class="dropdown-menu btn-group-sm dropdown-menu-right">
+ <li><a href="#" class="mass-edit"><span class="bi bi-pencil"></span>
<span>{{ 'mass_edit'|_ }}</span></a></li>
- <li><a href="#" class="bulk-edit"><span class="fa fa-fw fa-pencil-square-o"></span>
+ <li><a href="#" class="bulk-edit"><span class="bi bi-pencil-square-o"></span>
<span>{{ 'bulk_edit'|_ }}</span></a></li>
- <li><a href="#" class="mass-delete"><span class="fa fa-fw fa-trash"></span>
+ <li><a href="#" class="mass-delete"><span class="bi bi-trash"></span>
<span>{{ 'mass_delete'|_ }}</span></a></li>
</ul>
</div>
diff --git a/resources/views/list/piggy-banks.twig b/resources/views/list/piggy-banks.twig
index a46d59236b..be616daa47 100644
--- a/resources/views/list/piggy-banks.twig
+++ b/resources/views/list/piggy-banks.twig
@@ -24,7 +24,7 @@
&nbsp;
</td>
<td class="visible-xs visible-sm hidden-md hidden-lg">
- <div class="btn-group btn-group-xs">
+ <div class="btn-group btn-group-sm">
<a href="{{ route('piggy-banks.remove-money-mobile', piggy.id) }}" class="btn btn-default btn-xs"><span class="fa fa-minus"></span></a>
<a href="{{ route('piggy-banks.add-money-mobile', piggy.id) }}" class="btn btn-default btn-xs"><span class="fa fa-plus"></span></a>
</div>
@@ -34,9 +34,9 @@
<span class="loadSpin"></span>
</td>
<td class="hidden-sm hidden-xs hundred-px">
- <div class="btn-group btn-group-xs">
- <a href="{{ route('piggy-banks.edit', piggy.id) }}" class="btn btn-default btn-xs"><span class="fa fa-pencil fa-fw"></span></a>
- <a href="{{ route('piggy-banks.delete', piggy.id) }}" class="btn btn-danger btn-xs"><span class="fa fa-trash fa-fw"></span></a>
+ <div class="btn-group btn-group-sm">
+ <a href="{{ route('piggy-banks.edit', piggy.id) }}" class="btn btn-default btn-xs"><span class="bi bi-pencil fa-fw"></span></a>
+ <a href="{{ route('piggy-banks.delete', piggy.id) }}" class="btn btn-danger btn-xs"><span class="bi bi-trash fa-fw"></span></a>
</div>
</td>
<td>
diff --git a/resources/views/object-groups/index.twig b/resources/views/object-groups/index.twig
index aee4a9d578..bbbabacf2c 100644
--- a/resources/views/object-groups/index.twig
+++ b/resources/views/object-groups/index.twig
@@ -52,10 +52,10 @@
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-default" href="{{ route('object-groups.edit', [objectGroup.id]) }}">
- <span class="fa fa-pencil"></span>
+ <span class="bi bi-pencil"></span>
</a>
<a class="btn btn-danger" href="{{ route('object-groups.delete', [objectGroup.id]) }}">
- <span class="fa fa-trash"></span>
+ <span class="bi bi-trash"></span>
</a>
</div>
</td>
diff --git a/resources/views/partials/form/transaction/category.blade.php b/resources/views/partials/form/transaction/category.blade.php
index 91221903ac..700f062486 100644
--- a/resources/views/partials/form/transaction/category.blade.php
+++ b/resources/views/partials/form/transaction/category.blade.php
@@ -3,6 +3,7 @@
<em title="{{ __('firefly.category') }}" class="bi bi-bookmark"></em>
</label>
<div class="col-sm-10">
+ <div class="input-group">
<input type="search"
class="form-control ac-category"
:id="'category_name_' + index"
@@ -10,5 +11,7 @@
x-model="transaction.category_name"
:data-index="index"
placeholder="{{ __('firefly.category') }}">
+ <button tabindex="-1" class="btn btn-outline-secondary" type="button" @click="clearCategory(index)"><em class="bi bi-trash"></em></button>
+ </div>
</div>
</div>
diff --git a/resources/views/partials/form/transaction/destination-account.blade.php b/resources/views/partials/form/transaction/destination-account.blade.php
index 152b4d63c8..61b7320f89 100644
--- a/resources/views/partials/form/transaction/destination-account.blade.php
+++ b/resources/views/partials/form/transaction/destination-account.blade.php
@@ -11,9 +11,16 @@
x-model="transaction.destination_account.alpine_name"
:data-index="index"
@changed="changedDestinationAccount"
+ x-bind:disabled="true===transaction.destination_account.disabled"
+ x-bind:readonly="true===transaction.destination_account.disabled"
placeholder="{{ __('firefly.destination_account') }}">
<button tabindex="-1" class="btn btn-outline-secondary" type="button" @click="clearDestinationAccount(index)"><em class="bi bi-trash"></em></button>
</div>
+ <template x-if="true===transaction.destination_account.disabled">
+ <div class="small form-control-feedback">
+ {{ __('firefly.disabled_split_account_dest') }}
+ </div>
+ </template>
<template x-if="transaction.errors.destination_account.length > 0">
<div class="invalid-feedback"
x-text="transaction.errors.destination_account[0]">
diff --git a/resources/views/partials/form/transaction/source-account.blade.php b/resources/views/partials/form/transaction/source-account.blade.php
index 90f7d54d97..9d72da249b 100644
--- a/resources/views/partials/form/transaction/source-account.blade.php
+++ b/resources/views/partials/form/transaction/source-account.blade.php
@@ -10,10 +10,17 @@
:id="'source_' + index"
x-model="transaction.source_account.alpine_name"
:data-index="index"
+ x-bind:disabled="true===transaction.source_account.disabled"
+ x-bind:readonly="true===transaction.source_account.disabled"
@changed="changedSourceAccount"
placeholder="{{ __('firefly.source_account') }}">
<button tabindex="-1" class="btn btn-outline-secondary" type="button" @click="clearSourceAccount(index)"><em class="bi bi-trash"></em></button>
</div>
+ <template x-if="true===transaction.source_account.disabled">
+ <div class="small form-control-feedback">
+ {{ __('firefly.disabled_split_account_src') }}
+ </div>
+ </template>
<template x-if="transaction.errors.source_account.length > 0">
<div class="invalid-feedback"
x-text="transaction.errors.source_account[0]">
diff --git a/resources/views/piggy-banks/show.twig b/resources/views/piggy-banks/show.twig
index b66a7d54e7..35f60e098c 100644
--- a/resources/views/piggy-banks/show.twig
+++ b/resources/views/piggy-banks/show.twig
@@ -24,8 +24,8 @@
<div class="btn-group">
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
- <li><a href="{{ route('piggy-banks.edit', piggy.id) }}"><span class="fa fa-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
- <li><a href="{{ route('piggy-banks.delete', piggy.id) }}"><span class="fa fa-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
+ <li><a href="{{ route('piggy-banks.edit', piggy.id) }}"><span class="bi bi-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
+ <li><a href="{{ route('piggy-banks.delete', piggy.id) }}"><span class="bi bi-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
</ul>
</div>
</div>
diff --git a/resources/views/profile/index.twig b/resources/views/profile/index.twig
index a8e8c93379..71bd66625e 100644
--- a/resources/views/profile/index.twig
+++ b/resources/views/profile/index.twig
@@ -114,7 +114,7 @@
<button type="button"
data-success="{{ trans('firefly.purged_all_records')|escape('html') }}"
data-type="purge" class="confirm btn btn-warning btn-sm"><span
- class="fa fa-trash"></span> {{ 'purge_all_data'|_ }}</button>
+ class="bi bi-trash"></span> {{ 'purge_all_data'|_ }}</button>
</p>
diff --git a/resources/views/recurring/index.twig b/resources/views/recurring/index.twig
index e23fddb5a7..2f5f8120d2 100644
--- a/resources/views/recurring/index.twig
+++ b/resources/views/recurring/index.twig
@@ -48,11 +48,11 @@
{% for rt in paginator %}
<tr>
<td class="hidden-sm hidden-xs">
- <div class="btn-group btn-group-xs edit_tr_buttons">
+ <div class="btn-group btn-group-sm edit_tr_buttons">
<a class="btn btn-default btn-xs" title="{{ 'edit'|_ }}" href="{{ route('recurring.edit',rt.id) }}"><span
- class="fa fa-fw fa-pencil"></span></a><a class="btn btn-danger btn-xs" title="{{ 'delete'|_ }}"
+ class="bi bi-pencil"></span></a><a class="btn btn-danger btn-xs" title="{{ 'delete'|_ }}"
href="{{ route('recurring.delete',rt.id) }}"><span
- class="fa fa-fw fa-trash-o"></span></a>
+ class="bi bi-trash-o"></span></a>
</div>
</td>
<td data-value="{{ rt.title }}">
diff --git a/resources/views/recurring/show.twig b/resources/views/recurring/show.twig
index b130bb2732..7e2f22d2d7 100644
--- a/resources/views/recurring/show.twig
+++ b/resources/views/recurring/show.twig
@@ -52,9 +52,9 @@
<div class="box-footer">
<div class="btn-group">
<a href="{{ route('recurring.edit', [array.id]) }}" class="btn btn-sm btn-default"><span
- class="fa fa-pencil"></span> {{ 'edit'|_ }}</a>
+ class="bi bi-pencil"></span> {{ 'edit'|_ }}</a>
<a href="{{ route('recurring.delete', [array.id]) }}" class="btn btn-sm btn-danger">{{ 'delete'|_ }}
- <span class="fa fa-trash"></span></a>
+ <span class="bi bi-trash"></span></a>
</div>
</div>
</div>
diff --git a/resources/views/reports/partials/journals-audit.twig b/resources/views/reports/partials/journals-audit.twig
index 6c7e8695c5..24fb157ad3 100644
--- a/resources/views/reports/partials/journals-audit.twig
+++ b/resources/views/reports/partials/journals-audit.twig
@@ -39,9 +39,9 @@
<tr data-date="{{ journal.date.format('Y-m-d') }}" data-id="{{ journal.id }}">
<td class="hide-buttons">
- <div class="btn-group btn-group-xs">
- <a href="{{ route('transactions.edit',journal.transaction_group_id) }}" class="btn btn-xs btn-default"><span class="fa fa-fw fa-pencil"></span></a>
- <a href="{{ route('transactions.delete',journal.transaction_group_id) }}" class="btn btn-xs btn-danger"><span class="fa fa-fw fa-trash-o"></span></a>
+ <div class="btn-group btn-group-sm">
+ <a href="{{ route('transactions.edit',journal.transaction_group_id) }}" class="btn btn-xs btn-default"><span class="bi bi-pencil"></span></a>
+ <a href="{{ route('transactions.delete',journal.transaction_group_id) }}" class="btn btn-xs btn-danger"><span class="bi bi-trash-o"></span></a>
</div>
</td>
diff --git a/resources/views/rules/index.blade.php b/resources/views/rules/index.blade.php
index ef491db86e..2706f07403 100644
--- a/resources/views/rules/index.blade.php
+++ b/resources/views/rules/index.blade.php
@@ -1,14 +1,5 @@
@extends('layout.v3.session')
@section('content')
- <div class="row">
- <div class="col-lg-12 col-md-12 col-sm-12">
- <div class="btn-group">
- <a href="{{ route('rule-groups.create') }}" id="new_rule_group" class="btn btn-success">{{ __('firefly.new_rule_group') }}</a>
- <a href="{{ route('rules.create') }}" class="btn btn-success new_rule">{{ __('firefly.new_rule') }}</a>
- </div>
- <p></p>
- </div>
- </div>
@if(1 === count($ruleGroups) && 0 === $ruleGroups[0]->count())
@php
$shownDemo = true
@@ -36,18 +27,22 @@ $shownDemo = true
<span class="bi bi-list"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="card_header_{{ $ruleGroup->id }}">
- <li><a class="dropdown-item" href="{{ route('rule-groups.edit',$ruleGroup->id) }}"><span class="fa fa-fw fa-pencil"></span> {{ __('firefly.edit') }}</a></li>
- <li><a class="dropdown-item" href="{{ route('rule-groups.delete',$ruleGroup->id) }}"><span class="fa fa-fw fa-trash"></span> {{ __('firefly.delete') }}</a></li>
+ <li><a class="dropdown-item" href="{{ route('rule-groups.edit',$ruleGroup->id) }}"><span class="bi bi-pencil"></span> {{ __('firefly.edit') }}</a></li>
+ <li><a class="dropdown-item" href="{{ route('rule-groups.delete',$ruleGroup->id) }}"><span class="bi bi-trash"></span> {{ __('firefly.delete') }}</a></li>
<li><a class="dropdown-item" href="{{ route('rule-groups.select-transactions',$ruleGroup->id) }}"><span
- class="fa fa-fw fa-power-off"></span> {{ trans('firefly.apply_rule_group_selection', ['title' => $ruleGroup->title]) }}
+ class="bi bi-power"></span> {{ trans('firefly.apply_rule_group_selection', ['title' => $ruleGroup->title]) }}
</a></li>
+
+ <li><a class="dropdown-item" href="{{ route('rule-groups.create') }}"><em class="bi bi-plus"></em> {{ __('firefly.new_rule_group') }}</a></li>
+ <li><a href="{{ route('rules.create', $ruleGroup->id) }}" class="dropdown-item new_rule"><em class="bi bi-plus"></em> {{ __('firefly.new_rule') }}</a></li>
+
@if($ruleGroup->order > 1)
<li><a href="#" class="dropdown-item move-group" data-direction="up" data-id="{{ $ruleGroup->id }}"><span
- class="fa fa-fw fa-arrow-up"></span> {{ __('firefly.move_rule_group_up') }}</a></li>
+ class="bi bi-arrow-up"></span> {{ __('firefly.move_rule_group_up') }}</a></li>
@endif
@if($ruleGroup->order < count($ruleGroups))
<li><a href="#" class="dropdown-item move-group" data-direction="down" data-id="{{ $ruleGroup->id }}"><span
- class="fa fa-fw fa-arrow-down"></span> {{ __('firefly.move_rule_group_down') }}
+ class="bi bi-arrow-down"></span> {{ __('firefly.move_rule_group_down') }}
</a></li>
@endif
</ul>
@@ -59,10 +54,6 @@ $shownDemo = true
<p>
<em>{{ $ruleGroup->description }}</em>
</p>
- <p>
- <a href="{{ route('rules.create', $ruleGroup->id) }}"
- class="btn btn-success new_rule">{{ __('firefly.new_rule') }}</a>
- </p>
@if($ruleGroup->rules->count() > 0)
<table class="table table-sm table-hover table-striped group-rules">
@@ -72,40 +63,37 @@ $shownDemo = true
<th class="ten">&nbsp;</th>
<th class="ten">&nbsp;</th>
<th class="quarter">{{ __('firefly.rule_name') }}</th>
- <th class="quarter hidden-xs">{{ __('firefly.rule_triggers') }}</th>
- <th class="quarter hidden-xs">{{ __('firefly.rule_actions') }}</th>
+ <th class="quarter d-xs-none">{{ __('firefly.rule_triggers') }}</th>
+ <th class="quarter d-xs-none">{{ __('firefly.rule_actions') }}</th>
</tr>
</thead>
<tbody class="rule-connected-list">
@foreach($ruleGroup->rules as $rule)
<tr class="single-rule" data-order="{{ $rule->order }}" data-id="{{ $rule->id }}" data-group-id="{{ $ruleGroup->id }}" data-position="{{ $loop->index }}">
<td>
- <div class="btn-group btn-group-xs prio_buttons">
- <span class="fa fa-fw fa-bars rule-handle"></span>
+ <div class="btn-group btn-group-sm prio_buttons">
+ <span class="bi bi-list rule-handle"></span>
</div>
</td>
<td>
- <div class="btn-group btn-group-xs edit_buttons">
+ <div class="btn-group btn-group-sm edit_buttons">
<a title="{{ __('firefly.edit') }}" href="{{ route('rules.edit', $rule->id) }}"
class="btn btn-default"><span
- class="fa fa-fw fa-pencil"></span></a>
- <a title="{{ __('firefly.delete') }}"
- href="{{ route('rules.delete', $rule->id) }}"
- class="btn btn-danger"><span
- class="fa fa-fw fa-trash"></span></a>
+ class="bi bi-pencil"></span></a>
+ <a title="{{ __('firefly.delete') }}" href="{{ route('rules.delete', $rule->id) }}" class="btn btn-danger"><span class="bi bi-trash"></span></a>
</div>
</td>
<td>
- <div class="btn-group btn-group-xs test_buttons">
+ <div class="btn-group btn-group-sm test_buttons">
{{-- show which transactions would match --}}
- <a href="{{ route('rules.search',$rule->id) }}" class="btn btn-default {% if false == rule.strict %}test_rule_triggers{% endif %}" data-id="{{ $rule->id }}" title="{{ __('firefly.test_rule_triggers') }}"><span data-id="{{ $rule->id }}" class="fa fa-fw fa-flask"></span></a>
+ <a href="{{ route('rules.search',$rule->id) }}" class="btn btn-default {% if false == rule.strict %}test_rule_triggers{% endif %}" data-id="{{ $rule->id }}" title="{{ __('firefly.test_rule_triggers') }}"><span data-id="{{ $rule->id }}" class="bi bi-flask"></span></a>
@if($rule->active)
{{-- actually execute rule --}}
- <a href="{{ route('rules.select-transactions',$rule->id) }}" class="btn btn-default" title=" {{ trans('firefly.apply_rule_selection', ['title' => $rule->title]) }}"><span class="fa fa-fw fa-power-off "></span></a>
+ <a href="{{ route('rules.select-transactions',$rule->id) }}" class="btn btn-default" title=" {{ trans('firefly.apply_rule_selection', ['title' => $rule->title]) }}"><span class="bi bi-power "></span></a>
@endif
{{-- duplicate rule --}}
- <a href="#" class="btn btn-default duplicate-rule" data-id="{{ $rule->id }}" title=" {{ trans('firefly.duplicate_rule', ['title' => $rule->title]) }}"><span class="fa fa-fw fa-copy"></span></a>
+ <a href="#" class="btn btn-default duplicate-rule" data-id="{{ $rule->id }}" title=" {{ trans('firefly.duplicate_rule', ['title' => $rule->title]) }}"><span class="bi bi-copy"></span></a>
</div>
</td>
<td class="markdown">
@@ -115,7 +103,7 @@ $shownDemo = true
<s>{{ $rule->title }}</s> ({{ strtolower(__('firefly.inactive')) }})
@endif
@if($rule->stop_processing)
- <span class="fa fa-stop-circle-o"></span>
+ <span class="bi bi-stop-circle"></span>
@endif
@if('' !== $rule->description)
<small class="hidden-xs
@@ -127,11 +115,11 @@ $shownDemo = true
@endif
<small>(@if($rule->strict)<span class="text-danger">{{ __('firefly.rule_is_strict') }}</span>@else<span class="text-success">{{ __('firefly.rule_is_not_strict') }}</span>@endif&ZeroWidthSpace;)</small>
</td>
- <td class="hidden-xs">
+ <td class="d-xs-none">
@if($rule->ruleTriggers->count() > 0)
<ul class="small rule-trigger-list" data-count="{{ $rule->ruleTriggers->count() }}" data-id="{{ $rule->id }}">
@foreach($rule->ruleTriggers as $trigger)
- @if('user_action' === $trigger->trigger_type)
+ @if('user_action' !== $trigger->trigger_type)
<li
@if(!$rule->active)
class="text-muted"
@@ -139,18 +127,18 @@ $shownDemo = true
data-id="{{ $trigger->id }}">
{{ trans(('firefly.rule_trigger_' . get_root_search_operator($trigger->trigger_type)), ['trigger_value' => $trigger->trigger_value]) }}
@if($trigger->stop_processing)
- <span class="fa fa-stop-circle-o"></span>
+ <span class="bi bi-stop-circle"></span>
@endif
</li>
@endif
@endforeach
</ul>
- <ul class="small rule-triggers-show hidden pointer" data-id="{{ $rule->id }}">
+ <ul class="small rule-triggers-show d-none pointer" data-id="{{ $rule->id }}">
<li data-id="{{ $rule->id }}">{{ __('firefly.show_triggers') }}</li>
</ul>
@endif
</td>
- <td class="hidden-xs">
+ <td class="d-xs-none">
@if($rule->ruleActions->count() > 0)
<ul class="small rule-action-list" data-count="{{ $rule->ruleActions->count() }}" data-id="{{ $rule->id }}">
@foreach($rule->ruleActions as $action)
@@ -160,12 +148,12 @@ $shownDemo = true
@endif
data-id="{{ $action->id }}">{{ trans(('firefly.rule_action_' . $action->action_type), ['action_value' => $action->action_value]) }}
@if($action->stop_processing)
- <span class="fa fa-stop-circle-o"></span>
+ <span class="bi bi-stop-circle"></span>
@endif
</li>
@endforeach
</ul>
- <ul class="small rule-actions-show hidden pointer" data-id="{{ $rule->id }}">
+ <ul class="small rule-actions-show d-none pointer" data-id="{{ $rule->id }}">
<li>{{ __('firefly.show_actions') }}</li>
</ul>
@endif
@@ -179,24 +167,14 @@ $shownDemo = true
<em>{{ __('firefly.no_rules_in_group') }}</em>
</p>
@endif
- <p>
- <br/>
- <a href="{{ route('rules.create', $ruleGroup->id) }}"
- class="btn btn-success new_rule">{{ __('firefly.new_rule') }}</a>
- </p>
</div>
</div>
</div>
</div>
@endforeach
- {% include 'rules.partials.test-trigger-modal' %}
+ @include('rules.partials.test-trigger-modal')
- <div class="row">
- <div class="col-lg-12 col-md-12 col-sm-12">
- <a href="{{ route('rule-groups.create') }}" class="btn btn-success">{{ __('firefly.new_rule_group') }}</a>
- </div>
- </div>
@endsection
@section('scripts')
diff --git a/resources/views/rules/old-index.twig b/resources/views/rules/old-index.twig
index 212e43bd9a..df206530c3 100644
--- a/resources/views/rules/old-index.twig
+++ b/resources/views/rules/old-index.twig
@@ -42,8 +42,8 @@
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span
class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
- <li><a href="{{ route('rule-groups.edit',ruleGroup.id) }}"><span class="fa fa-fw fa-pencil"></span> {{ 'edit'|_ }}</a></li>
- <li><a href="{{ route('rule-groups.delete',ruleGroup.id) }}"><span class="fa fa-fw fa-trash"></span> {{ 'delete'|_ }}</a></li>
+ <li><a href="{{ route('rule-groups.edit',ruleGroup.id) }}"><span class="bi bi-pencil"></span> {{ 'edit'|_ }}</a></li>
+ <li><a href="{{ route('rule-groups.delete',ruleGroup.id) }}"><span class="bi bi-trash"></span> {{ 'delete'|_ }}</a></li>
<li><a href="{{ route('rule-groups.select-transactions',ruleGroup.id) }}"><span
class="fa fa-fw fa-power-off"></span> {{ trans('firefly.apply_rule_group_selection', {title: ruleGroup.title}) }}
</a></li>
@@ -86,23 +86,23 @@
{% for rule in ruleGroup.rules %}
<tr class="single-rule" data-order="{{ rule.order }}" data-id="{{ rule.id }}" data-group-id="{{ ruleGroup.id }}" data-position="{{ loop.index0 }}">
<td>
- <div class="btn-group btn-group-xs prio_buttons">
+ <div class="btn-group btn-group-sm prio_buttons">
<span class="fa fa-fw fa-bars rule-handle"></span>
</div>
</td>
<td>
- <div class="btn-group btn-group-xs edit_buttons">
+ <div class="btn-group btn-group-sm edit_buttons">
<a title="{{ 'edit'|_ }}" href="{{ route('rules.edit', rule.id) }}"
class="btn btn-default"><span
- class="fa fa-fw fa-pencil"></span></a>
+ class="bi bi-pencil"></span></a>
<a title="{{ 'delete'|_ }}"
href="{{ route('rules.delete', rule.id) }}"
class="btn btn-danger"><span
- class="fa fa-fw fa-trash"></span></a>
+ class="bi bi-trash"></span></a>
</div>
</td>
<td>
- <div class="btn-group btn-group-xs test_buttons">
+ <div class="btn-group btn-group-sm test_buttons">
{# show which transactions would match #}
<a href="{{ route('rules.search',rule.id) }}" class="btn btn-default {% if false == rule.strict %}test_rule_triggers{% endif %}" data-id="{{ rule.id }}" title="{{ 'test_rule_triggers'|_ }}"><span data-id="{{ rule.id }}" class="fa fa-fw fa-flask"></span></a>
{% if rule.active %}
diff --git a/resources/views/rules/partials/action.twig b/resources/views/rules/partials/action.twig
index 5d78b34bcf..e18c9c1a74 100644
--- a/resources/views/rules/partials/action.twig
+++ b/resources/views/rules/partials/action.twig
@@ -1,6 +1,6 @@
<tr data-count="{{ count }}" class="rule-action-holder">
<td class="forty-px">
- <a href="#" class="btn btn-danger btn-sm remove-action"><span class="fa fa-trash"></span></a>
+ <a href="#" class="btn btn-danger btn-sm remove-action"><span class="bi bi-trash"></span></a>
</td>
<td class="thirty">
{# TODO error when invalid name #}
diff --git a/resources/views/rules/partials/test-trigger-modal.blade.php b/resources/views/rules/partials/test-trigger-modal.blade.php
new file mode 100644
index 0000000000..27b71d38d9
--- /dev/null
+++ b/resources/views/rules/partials/test-trigger-modal.blade.php
@@ -0,0 +1,21 @@
+<div class="modal fade" id="testTriggerModal" tabindex="-1" role="dialog" aria-labelledby="testTriggerLabel">
+ <div class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span>&times;</span></button>
+ <h4 class="modal-title" id="testTriggerLabel">{{ __('firefly.test_rule_triggers') }}</h4>
+ </div>
+ <div class="modal-body">
+ <div class="transaction-warning alert alert-warning">
+ <h4><span class="icon bi bi-exclamation-triangle"></span> {{ __('firefly.flash_warning') }}</h4>
+ <span class="warning-contents"></span>
+ </div>
+ <div class="transactions-list">
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{ __('firefly.close') }}</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/resources/views/rules/partials/trigger.twig b/resources/views/rules/partials/trigger.twig
index 99d98f8f54..b5a774fe10 100644
--- a/resources/views/rules/partials/trigger.twig
+++ b/resources/views/rules/partials/trigger.twig
@@ -1,6 +1,6 @@
<tr data-count="{{ count }}" class="rule-trigger-holder">
<td class="forty-px">
- <a href="#" class="btn btn-danger btn-sm remove-trigger"><span class="fa fa-trash"></span></a>
+ <a href="#" class="btn btn-danger btn-sm remove-trigger"><span class="bi bi-trash"></span></a>
</td>
<td class="thirty">
<select name="triggers[{{ count }}][type]" class="form-control">
diff --git a/resources/views/search/index.twig b/resources/views/search/index.twig
index 18fa1699b9..cee9f12c79 100644
--- a/resources/views/search/index.twig
+++ b/resources/views/search/index.twig
@@ -103,9 +103,9 @@
<div class="row mass_edit_all hidden-xs hidden">
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
<div class="mass_button_options btn-group btn-group hidden">
- <a href="#" class="btn btn-default mass_edit"><span class="fa fa-fw fa-pencil"></span> <span>{{ 'edit_selected'|_ }}</span></a>
+ <a href="#" class="btn btn-default mass_edit"><span class="bi bi-pencil"></span> <span>{{ 'edit_selected'|_ }}</span></a>
<a href="#" class="btn btn-default bulk_edit"><span>{{ 'bulk_edit'|_ }}</span></a>
- <a href="#" class="btn btn-danger mass_delete"><span class="fa fa-fw fa-trash"></span>
+ <a href="#" class="btn btn-danger mass_delete"><span class="bi bi-trash"></span>
<span>{{ 'delete_selected'|_ }}</span></a>
</div>
</div>
diff --git a/resources/views/settings/link/index.twig b/resources/views/settings/link/index.twig
index c4b7dc5d42..dfc9589448 100644
--- a/resources/views/settings/link/index.twig
+++ b/resources/views/settings/link/index.twig
@@ -26,11 +26,11 @@
<tr>
<td>
{% if linkType.editable %}
- <div class="btn-group btn-group-xs">
+ <div class="btn-group btn-group-sm">
<a class="btn btn-default btn-xs" href="{{ route('settings.links.edit',linkType.id) }}"><span
- class="fa fa-fw fa-pencil"></span></a>
+ class="bi bi-pencil"></span></a>
<a class="btn btn-danger btn-xs" href="{{ route('settings.links.delete',linkType.id) }}"><span
- class="fa fa-fw fa-trash-o"></span></a>
+ class="bi bi-trash-o"></span></a>
</div>
{% endif %}
</td>
diff --git a/resources/views/settings/link/show.twig b/resources/views/settings/link/show.twig
index 870f5115b2..386a079100 100644
--- a/resources/views/settings/link/show.twig
+++ b/resources/views/settings/link/show.twig
@@ -26,8 +26,8 @@
{% for link in links %}
<tr>
<td>
- <div class="btn-group btn-group-xs">
- <a href="{{ route('transactions.link.delete', [link.id]) }}" class="btn btn-danger delete-link" data-id="{{ link.id }}"><span class="fa fa-trash"></span></a>
+ <div class="btn-group btn-group-sm">
+ <a href="{{ route('transactions.link.delete', [link.id]) }}" class="btn btn-danger delete-link" data-id="{{ link.id }}"><span class="bi bi-trash"></span></a>
<a href="#" class="btn btn-default switch-link" data-id="{{ link.id }}"><span
class="fa fa-fw fa-arrows-h"></span></a>
</div>
diff --git a/resources/views/settings/users/index.twig b/resources/views/settings/users/index.twig
index 93d58184a7..e2c9b7a379 100644
--- a/resources/views/settings/users/index.twig
+++ b/resources/views/settings/users/index.twig
@@ -53,11 +53,11 @@
{% for user in users %}
<tr>
<td class="hidden-xs" data-value="{{ user.id }}">
- <div class="btn-group btn-group-xs">
+ <div class="btn-group btn-group-sm">
<a class="btn btn-default" href="{{ route('settings.users.edit',user.id) }}"><span
- class="fa fa-pencil"></span></a>
+ class="bi bi-pencil"></span></a>
<a class="btn btn-danger" href="{{ route('settings.users.delete',user.id) }}"><span
- class="fa fa-trash"></span></a>
+ class="bi bi-trash"></span></a>
</div>
</td>
<td class="hidden-xs" data-value="{{ user.id }}">#{{ user.id }}</td>
@@ -136,9 +136,9 @@
{% for invitee in invitedUsers %}
<tr>
<td class="hidden-xs" data-value="{{ user.id }}">
- <div class="btn-group btn-group-xs">
+ <div class="btn-group btn-group-sm">
<a class="btn btn-danger delete-invite" href="{{ route('settings.users.delete-invite', invitee.id) }}"><span
- class="fa fa-trash"></span></a>
+ class="bi bi-trash"></span></a>
</div>
</td>
<td>
diff --git a/resources/views/tags/index.twig b/resources/views/tags/index.twig
index 0afc5ff561..4a0d477a81 100644
--- a/resources/views/tags/index.twig
+++ b/resources/views/tags/index.twig
@@ -60,7 +60,7 @@
<p>
<a class="btn btn-success" href="{{ route('tags.create') }}"><span class="fa fa-plus fa-fw"></span> {{ ('no_tags_create_default')|_ }}</a>
<button type="submit" class="btn pull-right btn-danger confirm-tag-delete">
- <span class="fa fa-fw fa-trash"></span> {{ 'delete_all_selected_tags'|_ }}
+ <span class="bi bi-trash"></span> {{ 'delete_all_selected_tags'|_ }}
</button>
</p>
</div>
diff --git a/resources/views/tags/show.twig b/resources/views/tags/show.twig
index 3e68d2f6ce..e575a67629 100644
--- a/resources/views/tags/show.twig
+++ b/resources/views/tags/show.twig
@@ -18,10 +18,10 @@
class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('tags.edit',tag.id) }}"><span
- class="fa fa-pencil fa-fw"></span> {{ trans('firefly.edit_tag',{tag: tag.tag}) }}
+ class="bi bi-pencil fa-fw"></span> {{ trans('firefly.edit_tag',{tag: tag.tag}) }}
</a></li>
<li><a href="{{ route('tags.delete',tag.id) }}"><span
- class="fa fa-trash fa-fw"></span> {{ trans('firefly.delete_tag',{tag: tag.tag}) }}
+ class="bi bi-trash fa-fw"></span> {{ trans('firefly.delete_tag',{tag: tag.tag}) }}
</a></li>
</ul>
</div>
@@ -164,9 +164,9 @@
<div class="box-footer">
<div class="btn-group btn-group-sm">
<a href="{{ route('tags.edit',tag.id) }}" class="btn btn-default"><span
- class="fa fa-pencil fa-fw"></span></a>
+ class="bi bi-pencil fa-fw"></span></a>
<a href="{{ route('tags.delete',tag.id) }}" class="btn btn-danger"><span
- class="fa fa-trash fa-fw"></span></a>
+ class="bi bi-trash fa-fw"></span></a>
</div>
<p class="text-muted">
<small>{{ 'sums_apply_to_range'|_ }}</small>
@@ -184,10 +184,10 @@
class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('tags.edit',tag.id) }}"><span
- class="fa fa-pencil fa-fw"></span> {{ trans('firefly.edit_tag',{tag: tag.tag}) }}
+ class="bi bi-pencil fa-fw"></span> {{ trans('firefly.edit_tag',{tag: tag.tag}) }}
</a></li>
<li><a href="{{ route('tags.delete',tag.id) }}"><span
- class="fa fa-trash fa-fw"></span> {{ trans('firefly.delete_tag',{tag: tag.tag}) }}
+ class="bi bi-trash fa-fw"></span> {{ trans('firefly.delete_tag',{tag: tag.tag}) }}
</a></li>
</ul>
</div>
@@ -241,10 +241,10 @@
class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('tags.edit',tag.id) }}"><span
- class="fa fa-pencil fa-fw"></span> {{ trans('firefly.edit_tag',{tag: tag.tag}) }}
+ class="bi bi-pencil fa-fw"></span> {{ trans('firefly.edit_tag',{tag: tag.tag}) }}
</a></li>
<li><a href="{{ route('tags.delete',tag.id) }}"><span
- class="fa fa-trash fa-fw"></span> {{ trans('firefly.delete_tag',{tag: tag.tag}) }}
+ class="bi bi-trash fa-fw"></span> {{ trans('firefly.delete_tag',{tag: tag.tag}) }}
</a></li>
</ul>
</div>
diff --git a/resources/views/transactions/edit.blade.php b/resources/views/transactions/edit.blade.php
new file mode 100644
index 0000000000..c480f15d10
--- /dev/null
+++ b/resources/views/transactions/edit.blade.php
@@ -0,0 +1,24 @@
+@extends('layout.v3.session')
+@section('scripts')
+ @vite(['js/pages/transactions/edit.js'])
+@endsection
+@section('content')
+ <div class="app-content">
+ <!--begin::Container-->
+ <div class="container-fluid" x-data="transactions" id="form">
+ <x-transaction.messages />
+ <x-transaction.tab-list />
+ <div class="tab-content" id="splitTabsContent">
+ <template x-for="transaction,index in entries">
+ <x-transaction.split
+ :zoomLevel="$zoomLevel"
+ :latitude="$latitude"
+ :longitude="$longitude"
+ :optionalFields="$optionalFields"
+ :optionalDateFields="$optionalDateFields"></x-transaction.split>
+ </template>
+ </div>
+ </div>
+ </div>
+
+@endsection
diff --git a/resources/views/transactions/mass/edit.twig b/resources/views/transactions/mass/edit.twig
index 47b7f943da..31029a8c0f 100644
--- a/resources/views/transactions/mass/edit.twig
+++ b/resources/views/transactions/mass/edit.twig
@@ -36,7 +36,7 @@
<td>
{# LINK TO EDIT FORM #}
<a href="{{ route('transactions.edit', journal.transaction_group_id) }}" class="btn btn-xs btn-default"><span
- class="fa fa-fw fa-pencil"></span></a>
+ class="bi bi-pencil"></span></a>
<input type="hidden" name="journals[]" value="{{ journal.transaction_journal_id }}"/>
</td>
<td>
diff --git a/resources/views/transactions/edit.twig b/resources/views/transactions/old-edit.twig
similarity index 100%
rename from resources/views/transactions/edit.twig
rename to resources/views/transactions/old-edit.twig
diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twig
index 6071ea9336..bb2ab6a672 100644
--- a/resources/views/transactions/show.twig
+++ b/resources/views/transactions/show.twig
@@ -10,7 +10,7 @@
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transaction_journal_information'|_ }}</h3>
- <div class="btn-group btn-group-xs pull-right">
+ <div class="btn-group btn-group-sm pull-right">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span>
@@ -18,10 +18,10 @@
<ul class="dropdown-menu">
{# edit + delete #}
<li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span
- class="fa fa-pencil"></span> {{ 'edit'|_ }}</a></li>
+ class="bi bi-pencil"></span> {{ 'edit'|_ }}</a></li>
{% if groupArray.transactions[0].type != 'reconciliation' and groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'liability credit' %}
<li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span
- class="fa fa-trash"></span> {{ 'delete'|_ }}</a></li>
+ class="bi bi-trash"></span> {{ 'delete'|_ }}</a></li>
{% endif %}
{% if groupArray.transactions[0].type != 'reconciliation' and groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'liability credit' %}
<li role="separator" class="divider"></li>
@@ -223,7 +223,7 @@
</h3>
- <div class="btn-group btn-group-xs pull-right">
+ <div class="btn-group btn-group-sm pull-right">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span>
@@ -231,10 +231,10 @@
<ul class="dropdown-menu">
{# edit + delete #}
<li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span
- class="fa fa-pencil"></span> {{ 'edit'|_ }}</a></li>
+ class="bi bi-pencil"></span> {{ 'edit'|_ }}</a></li>
{% if groupArray.transactions[0].type != 'reconciliation' and groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'liability credit' %}
<li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span
- class="fa fa-trash"></span> {{ 'delete'|_ }}</a></li>
+ class="bi bi-trash"></span> {{ 'delete'|_ }}</a></li>
{% endif %}
{% if journal.reconciled %}
<li><a class="reconcile-button" href="{{ route('transactions.unreconcile', [journal.transaction_journal_id]) }}"><span
@@ -467,11 +467,11 @@
{% for link in links[journal.transaction_journal_id] %}
<tr>
<td class="onetwenty">
- <div class="btn-group btn-group-xs">
+ <div class="btn-group btn-group-sm">
<a href="#" class="btn btn-default switch-link" data-id="{{ link.id }}"><span
class="fa fa-fw fa-arrows-h"></span></a>
<a href="{{ route('transactions.link.delete', [link.id]) }}"
- class="btn btn-danger"><span class="fa fa-trash"></span></a>
+ class="btn btn-danger"><span class="bi bi-trash"></span></a>
</div>
</td>
<td>
diff --git a/resources/views/v2/accounts/index.blade.php b/resources/views/v2/accounts/index.blade.php
index e5f5fb8e5d..fda8a32293 100644
--- a/resources/views/v2/accounts/index.blade.php
+++ b/resources/views/v2/accounts/index.blade.php
@@ -66,7 +66,7 @@
<td x-show="tableColumns.active.visible && tableColumns.active.enabled">&nbsp;</td>
<td x-show="tableColumns.name.visible && tableColumns.name.enabled">
<em x-show="'' !== filters.name && null !== filters.name">"<span x-text="filters.name"></span>"</em>
- <a href="#" @click.prevent="removeFilter('name')"><em class="text-danger fa fa-trash-can"></em></a>
+ <a href="#" @click.prevent="removeFilter('name')"><em class="text-danger bi bi-trash-can"></em></a>
</td>
<td x-show="tableColumns.type.visible && tableColumns.type.enabled">&nbsp;</td>
<td x-show="tableColumns.liability_type.visible && tableColumns.liability_type.enabled">