diff --git a/misc/BreCalApi.cs b/misc/BreCalApi.cs
index 1d8f258..7537be1 100644
--- a/misc/BreCalApi.cs
+++ b/misc/BreCalApi.cs
@@ -1,7 +1,7 @@
//----------------------
//
-// Generated REST API Client Code Generator v1.19.0.0 on 04.02.2025 10:01:05
+// Generated REST API Client Code Generator v1.19.0.0 on 05.02.2025 08:46:11
// Using the tool OpenAPI Generator v7.11.0
//
//----------------------
@@ -6940,7 +6940,8 @@ namespace BreCalClient.misc.Model
/// notifyPopup.
/// exp.
/// token.
- public LoginResult(int id = default(int), int participantId = default(int), string firstName = default(string), string lastName = default(string), string userName = default(string), string userPhone = default(string), string userEmail = default(string), bool? notifyEmail = default(bool?), bool? notifyWhatsapp = default(bool?), bool? notifySignal = default(bool?), bool? notifyPopup = default(bool?), float exp = default(float), string token = default(string))
+ /// notifyOn.
+ public LoginResult(int id = default(int), int participantId = default(int), string firstName = default(string), string lastName = default(string), string userName = default(string), string userPhone = default(string), string userEmail = default(string), bool? notifyEmail = default(bool?), bool? notifyWhatsapp = default(bool?), bool? notifySignal = default(bool?), bool? notifyPopup = default(bool?), float exp = default(float), string token = default(string), List notifyOn = default(List))
{
this.Id = id;
this.ParticipantId = participantId;
@@ -6955,6 +6956,7 @@ namespace BreCalClient.misc.Model
this.NotifyPopup = notifyPopup;
this.Exp = exp;
this.Token = token;
+ this.NotifyOn = notifyOn;
}
///
/// Gets or Sets Id
@@ -7061,6 +7063,14 @@ namespace BreCalClient.misc.Model
[DataMember(Name = "token", EmitDefaultValue = true)]
public string Token { get; set; }
///
+ /// Gets or Sets NotifyOn
+ ///
+ /*
+ ["assignment","next24h"]
+ */
+ [DataMember(Name = "notify_on", EmitDefaultValue = true)]
+ public List NotifyOn { get; set; }
+ ///
/// Returns the string presentation of the object
///
/// String presentation of the object
@@ -7081,6 +7091,7 @@ namespace BreCalClient.misc.Model
sb.Append(" NotifyPopup: ").Append(NotifyPopup).Append("\n");
sb.Append(" Exp: ").Append(Exp).Append("\n");
sb.Append(" Token: ").Append(Token).Append("\n");
+ sb.Append(" NotifyOn: ").Append(NotifyOn).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/misc/BreCalApi.yaml b/misc/BreCalApi.yaml
index cd1a6bd..77ae767 100644
--- a/misc/BreCalApi.yaml
+++ b/misc/BreCalApi.yaml
@@ -1736,6 +1736,14 @@ components:
token:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
+ notify_on:
+ type: array
+ nullable: true
+ items:
+ $ref: '#/components/schemas/NotificationType'
+ example:
+ - assignment
+ - next24h
example:
id: 42
participant_id: 5
diff --git a/src/BreCalClient/AboutDialog.xaml b/src/BreCalClient/AboutDialog.xaml
index 5e75673..76a4af8 100644
--- a/src/BreCalClient/AboutDialog.xaml
+++ b/src/BreCalClient/AboutDialog.xaml
@@ -7,11 +7,12 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p = "clr-namespace:BreCalClient.Resources"
mc:Ignorable="d" Left="{local:SettingBinding W1Left}" Top="{local:SettingBinding W1Top}"
- Title="Help" Height="496" Width="500" Loaded="Window_Loaded">
+ Title="Help" Height="512" Width="800" Loaded="Window_Loaded">
-
+
+
@@ -20,6 +21,7 @@
+
@@ -48,7 +50,7 @@
Informatikbüro Daniel Schick
-
+
@@ -60,19 +62,21 @@
-
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/src/BreCalClient/AboutDialog.xaml.cs b/src/BreCalClient/AboutDialog.xaml.cs
index b96dd83..d2def00 100644
--- a/src/BreCalClient/AboutDialog.xaml.cs
+++ b/src/BreCalClient/AboutDialog.xaml.cs
@@ -58,6 +58,11 @@ namespace BreCalClient
this.LoginResult.UserEmail = this.textBoxUserEmail.Text.Trim();
this.LoginResult.NotifyEmail = this.checkboxEMailNotify.IsChecked ?? false;
this.LoginResult.NotifyPopup = this.checkboxPushNotify.IsChecked ?? false;
+ this.LoginResult.NotifyOn.Clear();
+ if ((this.checkListBoxEventSelection.SelectedItems.Count > 0) && (this.LoginResult.NotifyOn == null))
+ this.LoginResult.NotifyOn = new();
+ foreach(NotificationType nt in this.checkListBoxEventSelection.SelectedItems)
+ this.LoginResult.NotifyOn.Add(nt);
this.ChangeUserSettingsRequested?.Invoke();
}
}
@@ -80,12 +85,19 @@ namespace BreCalClient
private void Window_Loaded(object sender, RoutedEventArgs e)
{
+ this.checkListBoxEventSelection.ItemsSource = Enum.GetValues(typeof(BreCalClient.misc.Model.NotificationType));
+
if(LoginResult != null)
{
this.textBoxUserEmail.Text = LoginResult.UserEmail;
this.textBoxUserPhone.Text = LoginResult.UserPhone;
this.checkboxEMailNotify.IsChecked = LoginResult.NotifyEmail;
this.checkboxPushNotify.IsChecked = LoginResult.NotifyPopup;
+ if (LoginResult.NotifyOn != null)
+ {
+ foreach (NotificationType nt in LoginResult.NotifyOn)
+ this.checkListBoxEventSelection.SelectedItems.Add(nt);
+ }
}
}
diff --git a/src/BreCalClient/MainWindow.xaml.cs b/src/BreCalClient/MainWindow.xaml.cs
index 08b85c7..724f984 100644
--- a/src/BreCalClient/MainWindow.xaml.cs
+++ b/src/BreCalClient/MainWindow.xaml.cs
@@ -368,8 +368,13 @@ namespace BreCalClient
NotifyEmail = _loginResult.NotifyEmail,
NotifyPopup = _loginResult.NotifyPopup,
NotifySignal = _loginResult.NotifySignal,
- NotifyWhatsapp = _loginResult.NotifyWhatsapp
+ NotifyWhatsapp = _loginResult.NotifyWhatsapp,
};
+ if (_loginResult.NotifyOn != null)
+ {
+ ud.NotifyOn = new(_loginResult.NotifyOn);
+ }
+
try
{
await _userApi.UserUpdateAsync(ud);
diff --git a/src/BreCalClient/Resources/Resources.Designer.cs b/src/BreCalClient/Resources/Resources.Designer.cs
index 0717048..7be1ee9 100644
--- a/src/BreCalClient/Resources/Resources.Designer.cs
+++ b/src/BreCalClient/Resources/Resources.Designer.cs
@@ -948,6 +948,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Notify on.
+ ///
+ public static string textNotifyOn {
+ get {
+ return ResourceManager.GetString("textNotifyOn", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Notify by push notification in app.
///
diff --git a/src/BreCalClient/Resources/Resources.resx b/src/BreCalClient/Resources/Resources.resx
index 1ad1bec..0c2a7dd 100644
--- a/src/BreCalClient/Resources/Resources.resx
+++ b/src/BreCalClient/Resources/Resources.resx
@@ -646,4 +646,7 @@
The shipcall was cancelled
+
+ Notify on
+
\ No newline at end of file