yavsc/src/PostIt/PostIt/Views/Commands/RdvPage.axaml

125 lines
5.4 KiB
Text
Raw Normal View History

2026-09-04 13:19:31 +01:00
<ContentPage xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cvm="using:PostIt.ViewModels.Commands"
xmlns:mapsui="using:Mapsui.UI.Avalonia"
xmlns:postitControls="using:PostIt.Controls"
2026-09-04 13:19:31 +01:00
x:Class="PostIt.Views.Commands.RdvPage"
x:DataType="cvm:RdvViewModel"
Header="Commande billing">
<ScrollViewer>
<Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto" ColumnDefinitions="Auto,*" Margin="12">
2026-09-04 13:19:31 +01:00
<TextBlock Grid.Row="0" Grid.ColumnSpan="2"
Text="{Binding Title}"
FontSize="18"
FontWeight="Bold" />
<TextBlock Grid.Row="1" Grid.ColumnSpan="2"
Margin="0,4,0,12"
Text="{Binding SupportMessage}"
TextWrapping="Wrap"
Opacity="0.8" />
<TextBlock Grid.Row="2" Text="Utilisateur" VerticalAlignment="Center" Margin="0,0,12,8" />
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding PerformerLabel}" IsReadOnly="True" Margin="0,0,0,8" />
<TextBlock Grid.Row="3" Text="Activité" VerticalAlignment="Center" Margin="0,0,12,8" />
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding ActivityLabel}" IsReadOnly="True" Margin="0,0,0,8" />
<TextBlock Grid.Row="4" Text="Date" VerticalAlignment="Center" Margin="0,0,12,8" />
2026-09-06 17:42:46 +01:00
<DatePicker Grid.Row="4" Grid.Column="1" DayFormat="ddd dd" SelectedDate="{Binding EventDateSelection, Mode=TwoWay}" Margin="0,0,0,8" />
2026-09-04 13:19:31 +01:00
<TextBlock Grid.Row="5"
Text="Motif"
VerticalAlignment="Center"
2026-09-04 20:25:06 +01:00
Margin="0,0,12,8" />
2026-09-04 13:19:31 +01:00
<TextBox Grid.Row="5"
Grid.Column="1"
Text="{Binding Reason, Mode=TwoWay}"
2026-09-04 20:25:06 +01:00
Margin="0,0,0,8" />
2026-09-04 13:19:31 +01:00
<TextBlock Grid.Row="6" Text="Adresse" VerticalAlignment="Center" Margin="0,0,12,8" />
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding Address, Mode=TwoWay}" Margin="0,0,0,8" />
<Grid Grid.Row="7"
x:Name="SuggestedAddressPanel"
Grid.ColumnSpan="2"
ColumnDefinitions="*,12,Auto,12,Auto"
Margin="0,0,0,8"
IsVisible="{Binding HasSuggestedAddressPanel}">
<TextBlock Grid.Column="0"
VerticalAlignment="Center"
Text="{Binding SuggestedAddress, StringFormat='Adresse suggérée: {0}'}"
TextWrapping="Wrap"
Opacity="0.8" />
<Button Grid.Column="2"
x:Name="ApplySuggestedAddressButton"
Content="Utiliser"
IsVisible="{Binding HasSuggestedAddress}"
Command="{Binding ApplySuggestedAddressCommand}" />
<ProgressBar Grid.Column="4"
x:Name="SuggestedAddressProgress"
Width="80"
IsIndeterminate="True"
IsVisible="{Binding IsResolvingAddress}" />
</Grid>
<Grid Grid.Row="8"
Grid.ColumnSpan="2"
ColumnDefinitions="Auto,12,Auto"
Margin="0,0,0,8">
<Button Grid.Column="0"
HorizontalAlignment="Left"
Content="Utiliser ma position"
Command="{Binding UseCurrentLocationCommand}" />
<Button Grid.Column="2"
HorizontalAlignment="Left"
Content="Me localiser sur la carte"
Click="OnCenterCurrentLocationClicked"
IsEnabled="{Binding CanUseCurrentLocation}" />
</Grid>
2026-09-04 13:19:31 +01:00
<TextBlock Grid.Row="9" Text="Latitude" VerticalAlignment="Center" Margin="0,0,12,8" />
<TextBox Grid.Row="9" Grid.Column="1" Text="{Binding Latitude, Mode=TwoWay}" PlaceholderText="Optionnel" Margin="0,0,0,8" />
2026-09-04 13:19:31 +01:00
<TextBlock Grid.Row="10" Text="Longitude" VerticalAlignment="Center" Margin="0,0,12,8" />
<TextBox Grid.Row="10" Grid.Column="1" Text="{Binding Longitude, Mode=TwoWay}" PlaceholderText="Optionnel" Margin="0,0,0,8" />
2026-09-04 13:19:31 +01:00
<TextBlock Grid.Row="11" Grid.ColumnSpan="2"
Text="Carte: cliquez pour positionner le rendez-vous"
Margin="0,0,0,8"
Opacity="0.85" />
<mapsui:MapControl Grid.Row="12"
Grid.ColumnSpan="2"
x:Name="LocationMap"
Height="260"
Margin="0,0,0,8" />
2026-09-04 13:19:31 +01:00
<TextBlock Grid.Row="13"
2026-09-04 13:19:31 +01:00
Text="Informations"
VerticalAlignment="Center"
2026-09-04 20:25:06 +01:00
Margin="0,0,12,8" />
<TextBox Grid.Row="13"
2026-09-04 13:19:31 +01:00
Grid.Column="1"
Text="{Binding AdditionalInfo, Mode=TwoWay}"
2026-09-04 20:25:06 +01:00
Margin="0,0,0,8" />
2026-09-04 13:19:31 +01:00
<CheckBox Grid.Row="14" Grid.ColumnSpan="2"
2026-09-04 13:19:31 +01:00
Content="Je consens à la création de cette commande"
IsChecked="{Binding Consent, Mode=TwoWay}"
Margin="0,4,0,12" />
<Grid Grid.Row="15" Grid.ColumnSpan="2" ColumnDefinitions="Auto,12,*,Auto">
2026-09-04 13:19:31 +01:00
<Button Grid.Column="0"
Content="{Binding SubmitLabel}"
Command="{Binding SubmitCommand}"
IsEnabled="{Binding IsSupported}" />
<postitControls:StatusBar Grid.Column="2"
DataContext="{Binding ActionStatus}" />
2026-09-04 13:19:31 +01:00
<ProgressBar Grid.Column="3"
Width="120"
IsIndeterminate="True"
IsVisible="{Binding IsBusy}" />
</Grid>
</Grid>
</ScrollViewer>
</ContentPage>