Extended API and added event type selection to about dialog
This commit is contained in:
parent
fd5dbc8b37
commit
a3a8ef3b39
@ -1,7 +1,7 @@
|
||||
|
||||
//----------------------
|
||||
// <auto-generated>
|
||||
// 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
|
||||
// </auto-generated>
|
||||
//----------------------
|
||||
@ -6940,7 +6940,8 @@ namespace BreCalClient.misc.Model
|
||||
/// <param name="notifyPopup">notifyPopup.</param>
|
||||
/// <param name="exp">exp.</param>
|
||||
/// <param name="token">token.</param>
|
||||
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))
|
||||
/// <param name="notifyOn">notifyOn.</param>
|
||||
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<NotificationType> notifyOn = default(List<NotificationType>))
|
||||
{
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
@ -7061,6 +7063,14 @@ namespace BreCalClient.misc.Model
|
||||
[DataMember(Name = "token", EmitDefaultValue = true)]
|
||||
public string Token { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or Sets NotifyOn
|
||||
/// </summary>
|
||||
/*
|
||||
<example>["assignment","next24h"]</example>
|
||||
*/
|
||||
[DataMember(Name = "notify_on", EmitDefaultValue = true)]
|
||||
public List<NotificationType> NotifyOn { get; set; }
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
@ -20,6 +21,7 @@
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
@ -48,7 +50,7 @@
|
||||
Informatikbüro Daniel Schick
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<Border BorderThickness="0 0 0 2" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="Gray" />
|
||||
<Border BorderThickness="0 0 0 2" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" BorderBrush="Gray" />
|
||||
<Label FontWeight="DemiBold" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textChangeContactInfo}" HorizontalContentAlignment="Right"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textEmail}" HorizontalContentAlignment="Right" />
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textPhone}" HorizontalContentAlignment="Right" />
|
||||
@ -60,19 +62,21 @@
|
||||
<Label Grid.Row="8" Grid.Column="1" Content="{x:Static p:Resources.textNotifyEmail}" />
|
||||
<CheckBox HorizontalAlignment="Right" Margin="2" Grid.Column="0" Grid.Row="9" VerticalAlignment="Center" x:Name="checkboxPushNotify" />
|
||||
<Label Grid.Row="9" Grid.Column="1" Content="{x:Static p:Resources.textNotifyPush}" />
|
||||
<Button x:Name="buttonChangeUserFields" Click="buttonChangeUserFields_Click" Grid.Column="1" Grid.Row="10" Margin="2" Content="{x:Static p:Resources.textChange}" Width="80" HorizontalAlignment="Left" IsEnabled="True" />
|
||||
<Label Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textNotifyOn}" />
|
||||
<xctk:CheckListBox Grid.Column="2" Grid.Row="8" Grid.RowSpan="3" x:Name="checkListBoxEventSelection" Margin="2" />
|
||||
<Button x:Name="buttonChangeUserFields" Click="buttonChangeUserFields_Click" Grid.Column="2" Grid.Row="11" Margin="2" Content="{x:Static p:Resources.textChange}" Width="80" HorizontalAlignment="Right" IsEnabled="True" />
|
||||
|
||||
<Border BorderThickness="0 0 0 2" Grid.Row="11" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="Gray" />
|
||||
<Label FontWeight="DemiBold" Grid.Row="12" Grid.Column="0" Content="{x:Static p:Resources.textChangePassword}" HorizontalContentAlignment="Right"/>
|
||||
<Border BorderThickness="0 0 0 2" Grid.Row="12" Grid.Column="0" Grid.ColumnSpan="3" BorderBrush="Gray" />
|
||||
<Label FontWeight="DemiBold" Grid.Row="13" Grid.Column="0" Content="{x:Static p:Resources.textChangePassword}" HorizontalContentAlignment="Right"/>
|
||||
|
||||
<xctk:WatermarkPasswordBox Watermark="{x:Static p:Resources.textOldPassword}" Grid.Column="1" Grid.Row="12" Margin="2" x:Name="wpBoxOldPassword" TextChanged="wpBoxOldPassword_TextChanged"/>
|
||||
<xctk:WatermarkPasswordBox Watermark="{x:Static p:Resources.textNewPassword}" Grid.Column="1" Grid.Row="13" Margin="2" x:Name="wpBoxNewPassword" TextChanged="wpBoxOldPassword_TextChanged"/>
|
||||
<xctk:WatermarkPasswordBox Watermark="{x:Static p:Resources.textRepeatNewPassword}" Grid.Column="1" Grid.Row="14" Margin="2" x:Name="wpBoxNewPasswordRepeat" TextChanged="wpBoxOldPassword_TextChanged"/>
|
||||
<Button x:Name="buttonChangePassword" Click="buttonChangePassword_Click" Grid.Column="1" Grid.Row="15" Margin="2" Content="{x:Static p:Resources.textChangePassword}" Width="120" HorizontalAlignment="Left" IsEnabled="False" />
|
||||
<Border BorderThickness="0 0 0 2" Grid.Row="16" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="Gray" />
|
||||
<xctk:WatermarkPasswordBox Watermark="{x:Static p:Resources.textOldPassword}" Grid.Column="1" Grid.Row="13" Margin="2" x:Name="wpBoxOldPassword" TextChanged="wpBoxOldPassword_TextChanged"/>
|
||||
<xctk:WatermarkPasswordBox Watermark="{x:Static p:Resources.textNewPassword}" Grid.Column="1" Grid.Row="14" Margin="2" x:Name="wpBoxNewPassword" TextChanged="wpBoxOldPassword_TextChanged"/>
|
||||
<xctk:WatermarkPasswordBox Watermark="{x:Static p:Resources.textRepeatNewPassword}" Grid.Column="1" Grid.Row="15" Margin="2" x:Name="wpBoxNewPasswordRepeat" TextChanged="wpBoxOldPassword_TextChanged"/>
|
||||
<Button x:Name="buttonChangePassword" Click="buttonChangePassword_Click" Grid.Column="1" Grid.Row="16" Margin="2" Content="{x:Static p:Resources.textChangePassword}" Width="120" HorizontalAlignment="Right" IsEnabled="False" />
|
||||
<Border BorderThickness="0 0 0 2" Grid.Row="17" Grid.Column="0" Grid.ColumnSpan="3" BorderBrush="Gray" />
|
||||
|
||||
|
||||
<Button x:Name="buttonClose" Click="buttonClose_Click" Content="{x:Static p:Resources.textClose}" Width="80" Margin="2" Grid.Column="1" Grid.Row="18" HorizontalAlignment="Right" />
|
||||
<Button x:Name="buttonClose" Click="buttonClose_Click" Content="{x:Static p:Resources.textClose}" Width="80" Margin="2" Grid.Column="2" Grid.Row="19" HorizontalAlignment="Right" />
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
9
src/BreCalClient/Resources/Resources.Designer.cs
generated
9
src/BreCalClient/Resources/Resources.Designer.cs
generated
@ -948,6 +948,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Notify on.
|
||||
/// </summary>
|
||||
public static string textNotifyOn {
|
||||
get {
|
||||
return ResourceManager.GetString("textNotifyOn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Notify by push notification in app.
|
||||
/// </summary>
|
||||
|
||||
@ -646,4 +646,7 @@
|
||||
<data name="textShipcallCancelled" xml:space="preserve">
|
||||
<value>The shipcall was cancelled</value>
|
||||
</data>
|
||||
<data name="textNotifyOn" xml:space="preserve">
|
||||
<value>Notify on</value>
|
||||
</data>
|
||||
</root>
|
||||
Loading…
Reference in New Issue
Block a user