PaymentVariantsWindow: Make buttons more user friendly

This commit is contained in:
2024-01-31 13:01:43 +01:00
parent 71a234ca60
commit 60b624b009

View File

@ -137,6 +137,7 @@ namespace Elwig.Windows {
(ConsiderPenaltyInput.IsChecked != BillingData?.ConsiderTotalPenalty) || (ConsiderPenaltyInput.IsChecked != BillingData?.ConsiderTotalPenalty) ||
(ConsiderAutoInput.IsChecked != BillingData?.ConsiderAutoBusinessShares)); (ConsiderAutoInput.IsChecked != BillingData?.ConsiderAutoBusinessShares));
CalculateButton.IsEnabled = !SaveButton.IsEnabled && PaymentVariantList.SelectedItem is PaymentVar { TestVariant: true }; CalculateButton.IsEnabled = !SaveButton.IsEnabled && PaymentVariantList.SelectedItem is PaymentVar { TestVariant: true };
CommitButton.IsEnabled = CalculateButton.IsEnabled;
} }
private void UpdateSums() { private void UpdateSums() {
@ -285,9 +286,9 @@ namespace Elwig.Windows {
Mouse.OverrideCursor = Cursors.AppStarting; Mouse.OverrideCursor = Cursors.AppStarting;
var b = new BillingVariant(v.Year, v.AvNr); var b = new BillingVariant(v.Year, v.AvNr);
await b.Revert(); await b.Revert();
await App.HintContextChange();
Mouse.OverrideCursor = null; Mouse.OverrideCursor = null;
CommitButton.IsEnabled = true; CommitButton.IsEnabled = true;
await App.HintContextChange();
} }
private async void ExportButton_Click(object sender, RoutedEventArgs evt) { private async void ExportButton_Click(object sender, RoutedEventArgs evt) {