Updated the App to work with the calculate func

This commit is contained in:
Maddox Werts 2025-08-01 15:51:18 -04:00
parent d4b7b500c8
commit 10f6e9e17e

View file

@ -6,9 +6,10 @@ export component Prorater inherits Window {
height: 720px;
in property <[string]> membership_names: ["Select One..."];
out property <string> last_billing: "NULL";
out property <string> current_membership;
out property <string> new_membership;
callback on_calculate();
callback on_calculate() -> string;
VerticalBox {
Image {
@ -72,9 +73,15 @@ export component Prorater inherits Window {
Button {
text: "Calculate";
clicked => {
on_calculate();
result_text.text = on_calculate();
}
}
result_text := Text {
text: "";
font-size: 1.25rem;
horizontal-alignment: center;
}
}
date_picker := DatePickerPopup {
@ -84,7 +91,8 @@ export component Prorater inherits Window {
accepted(date) => {
date_picker.close();
last-billing-date.text = date.month + "/" + date.day + "/" + date.year;
root.last_billing = date.month + "/" + date.day + "/" + date.year;
last_billing_date.text = root.last_billing;
}
canceled => {