feat: add currency management for families with enabled currencies (#1419)

* feat: add currency management for families with enabled currencies

* feat: update currency selection logic and improve accessibility

* feat: update currency preferences to use group moniker in titles

---------

Signed-off-by: Ang Wei Feng (Ted) <hello@tedawf.com>
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
Ang Wei Feng (Ted)
2026-04-14 01:53:04 +08:00
committed by GitHub
parent 1aa3c8f007
commit 60929cdee0
13 changed files with 322 additions and 18 deletions

View File

@@ -0,0 +1,31 @@
import { Controller } from "@hotwired/stimulus";
export default class extends Controller {
static targets = ["dialog", "checkbox"];
static values = {
baseCurrency: String,
};
open() {
this.dialogTarget.showModal();
}
selectAll() {
this.checkboxTargets.forEach((checkbox) => {
checkbox.checked = true;
});
}
selectBaseOnly() {
this.checkboxTargets.forEach((checkbox) => {
checkbox.checked = checkbox.value === this.baseCurrencyValue;
});
}
handleSubmitEnd(event) {
if (!event.detail.success) return;
if (!this.dialogTarget.open) return;
this.dialogTarget.close();
}
}