perfin/src/main/resources/edit-transaction.fxml

137 lines
7.2 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<?import com.andrewlalis.perfin.view.component.AccountSelectionBox?>
2024-01-13 17:54:59 +00:00
<?import com.andrewlalis.perfin.view.component.FileSelectionArea?>
<?import com.andrewlalis.perfin.view.component.PropertiesPane?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import com.andrewlalis.perfin.view.component.CategorySelectionBox?>
<?import com.andrewlalis.perfin.view.component.StyledText?>
<BorderPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
2024-01-11 13:46:57 +00:00
fx:controller="com.andrewlalis.perfin.control.EditTransactionController"
2024-01-13 17:54:59 +00:00
fx:id="container"
>
2024-01-11 13:46:57 +00:00
<top>
<Label fx:id="titleLabel" styleClass="large-font,bold-text,std-padding"/>
</top>
<center>
<ScrollPane fitToWidth="true" fitToHeight="true">
2024-01-08 14:49:34 +00:00
<VBox style="-fx-max-width: 500px;">
2023-12-28 21:19:21 +00:00
<!-- Basic properties -->
<PropertiesPane hgap="5" vgap="5" styleClass="std-padding">
<columnConstraints>
<ColumnConstraints hgrow="NEVER" halignment="LEFT" minWidth="150"/>
<ColumnConstraints hgrow="ALWAYS" halignment="RIGHT"/>
</columnConstraints>
<Label text="Timestamp" labelFor="${timestampField}" styleClass="bold-text"/>
<TextField fx:id="timestampField" styleClass="mono-font"/>
<Label text="Amount" labelFor="${amountField}" styleClass="bold-text"/>
<HBox styleClass="std-spacing">
<TextField fx:id="amountField" styleClass="mono-font" HBox.hgrow="ALWAYS"/>
<ChoiceBox fx:id="currencyChoiceBox"/>
</HBox>
<Label text="Description" labelFor="${descriptionField}" styleClass="bold-text"/>
<TextArea
fx:id="descriptionField"
styleClass="mono-font"
wrapText="true"
style="-fx-pref-height: 100px;-fx-min-height: 100px;"
/>
</PropertiesPane>
2023-12-28 21:19:21 +00:00
<!-- Container for linked accounts -->
<HBox styleClass="std-padding,std-spacing" fx:id="linkedAccountsContainer">
<VBox HBox.hgrow="ALWAYS">
<Label text="Debited Account" labelFor="${debitAccountSelector}" styleClass="bold-text"/>
2024-01-12 22:28:55 +00:00
<AccountSelectionBox fx:id="debitAccountSelector" allowNone="true" showBalance="true"/>
</VBox>
<VBox HBox.hgrow="ALWAYS">
<Label text="Credited Account" labelFor="${creditAccountSelector}" styleClass="bold-text"/>
2024-01-12 22:28:55 +00:00
<AccountSelectionBox fx:id="creditAccountSelector" allowNone="true" showBalance="true"/>
</VBox>
</HBox>
<!-- Additional, mostly optional properties -->
<PropertiesPane hgap="5" vgap="5" styleClass="std-padding">
<columnConstraints>
<ColumnConstraints hgrow="NEVER" halignment="LEFT" minWidth="150"/>
<ColumnConstraints hgrow="ALWAYS" halignment="RIGHT"/>
</columnConstraints>
<VBox>
<Label text="Vendor" labelFor="${vendorComboBox}" styleClass="bold-text"/>
<Hyperlink fx:id="vendorsHyperlink" text="Manage vendors" styleClass="small-font"/>
</VBox>
<ComboBox fx:id="vendorComboBox" editable="true" maxWidth="Infinity"/>
<VBox>
<Label text="Category" labelFor="${categoryComboBox}" styleClass="bold-text"/>
2024-01-31 15:16:53 +00:00
<Hyperlink fx:id="categoriesHyperlink" text="Manage categories" styleClass="small-font"/>
</VBox>
<CategorySelectionBox fx:id="categoryComboBox" maxWidth="Infinity"/>
<VBox>
<Label text="Tags" labelFor="${tagsComboBox}" styleClass="bold-text"/>
2024-01-31 15:16:53 +00:00
<Hyperlink fx:id="tagsHyperlink" text="Manage tags" styleClass="small-font"/>
</VBox>
<VBox maxWidth="Infinity">
<HBox styleClass="std-spacing">
<ComboBox fx:id="tagsComboBox" editable="true" HBox.hgrow="ALWAYS" maxWidth="Infinity"/>
<Button fx:id="addTagButton" text="Add" HBox.hgrow="NEVER"/>
</HBox>
<VBox fx:id="tagsVBox" styleClass="std-spacing,std-padding"/>
</VBox>
<Label text="Line Items" styleClass="bold-text"/>
<VBox maxWidth="Infinity">
<Button text="Add Line Item" fx:id="addLineItemButton" disable="true"/>
<StyledText styleClass="small-font">
Line items aren't yet supported. I'm working on it!
</StyledText>
<VBox styleClass="std-spacing" fx:id="addLineItemForm">
<HBox styleClass="std-spacing">
<VBox>
<Label text="Quantity" styleClass="bold-text,small-font"/>
<Spinner fx:id="lineItemQuantitySpinner" minWidth="60" maxWidth="60"/>
</VBox>
<VBox HBox.hgrow="ALWAYS">
<Label text="Value per Item" styleClass="bold-text,small-font"/>
<TextField fx:id="lineItemValueField"/>
</VBox>
</HBox>
<VBox>
<Label text="Description" styleClass="bold-text,small-font"/>
<TextField fx:id="lineItemDescriptionField"/>
</VBox>
<HBox styleClass="std-spacing" alignment="CENTER_RIGHT">
<Button text="Add" fx:id="addLineItemAddButton"/>
<Button text="Cancel" fx:id="addLineItemCancelButton"/>
</HBox>
</VBox>
<VBox fx:id="lineItemsVBox"/>
</VBox>
</PropertiesPane>
2023-12-28 21:19:21 +00:00
<!-- Container for attachments -->
2024-01-13 17:54:59 +00:00
<VBox styleClass="std-padding">
2023-12-28 21:19:21 +00:00
<Label text="Attachments" styleClass="bold-text"/>
<Label text="Attach receipts, invoices, or other content to this transaction." styleClass="small-font" wrapText="true"/>
2024-01-13 17:54:59 +00:00
<FileSelectionArea fx:id="attachmentsSelectionArea" allowMultiple="true"/>
2023-12-28 21:19:21 +00:00
</VBox>
<!-- Buttons -->
<Separator/>
<HBox styleClass="std-padding,std-spacing" alignment="CENTER_RIGHT">
<Button text="Save" fx:id="saveButton" onAction="#save"/>
<Button text="Cancel" onAction="#cancel"/>
</HBox>
</VBox>
</ScrollPane>
</center>
</BorderPane>