Merge branch 'fix-bugs-21-10'

fix-bugs-22-10
Lou BRODA 1 year ago
commit bb53472775

@ -25,13 +25,15 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="10"/>
<RowDefinition Height="*"/>
<RowDefinition Height="10"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Grid BackgroundColor="{AppThemeBinding Light={StaticResource HeaderGray}, Dark={StaticResource Gray900}}"
Grid.Row="0">
Grid.Row="0"
Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
@ -44,9 +46,10 @@
Grid.Column="1"/>
</Grid>
<Grid HorizontalOptions="Center"
Grid.Row="2">
Grid.Row="1"
Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="5"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
@ -62,8 +65,14 @@
Text="{Binding ContactsVM.Manager.GivenLastName}"/>
<Button Text="Enregistrer"
BackgroundColor="Transparent"
BorderColor="Black"
Command="{Binding ContactsVM.Manager.AddContactCommand}"/>
Command="{Binding ContactsVM.Manager.AddContactCommand}">
<Button.BorderColor>
<AppThemeBinding Light="{StaticResource Black}" Dark="{StaticResource White}" />
</Button.BorderColor>
<Button.TextColor>
<AppThemeBinding Light="{StaticResource Black}" Dark="{StaticResource White}" />
</Button.TextColor>
</Button>
</VerticalStackLayout>
<Grid.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ContactsVM.AddContactDataFormCommand}"/>
@ -74,7 +83,8 @@
SelectionChangedCommand="{Binding ContactsVM.BookLendedCommand}"
SelectionChangedCommandParameter="{Binding ContactsVM.Manager.SelectedContact}"
SelectionMode="Single"
Grid.Row="4">
Grid.Row="1"
Grid.Column="1">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="viewModel:ContactVM">
<VerticalStackLayout>

@ -300,7 +300,21 @@
<contentView:SeparatorCutStartView/>
</VerticalStackLayout>
<Picker ItemsSource="{Binding DetailsLivreVM.Manager.AllStatus}"
SelectedItem="{Binding DetailsLivreVM.Manager.SelectedStatus}"
IsVisible="{Binding DetailsLivreVM.IsPickerVisible}"
HorizontalOptions="Center"
VerticalOptions="Center"
Grid.Row="1">
<Picker.Behaviors>
<toolkit:EventToCommandBehavior EventName="SelectedIndexChanged"
Command="{Binding DetailsLivreVM.Manager.UpdateStatusBookCommand}"
CommandParameter="{Binding DetailsLivreVM.Book}"/>
</Picker.Behaviors>
</Picker>
<!--Buttons-->
<VerticalStackLayout Grid.Row="2">
@ -344,19 +358,6 @@
</VerticalStackLayout>
<Picker ItemsSource="{Binding DetailsLivreVM.Manager.AllStatus}"
SelectedItem="{Binding DetailsLivreVM.Manager.SelectedStatus}"
IsVisible="{Binding DetailsLivreVM.IsPickerVisible}"
Grid.RowSpan="3"
HorizontalOptions="Center"
VerticalOptions="Center">
<Picker.Behaviors>
<toolkit:EventToCommandBehavior EventName="SelectedIndexChanged"
Command="{Binding DetailsLivreVM.Manager.UpdateStatusBookCommand}"
CommandParameter="{Binding DetailsLivreVM.Book}"/>
</Picker.Behaviors>
</Picker>
</Grid>
</ScrollView>
</Grid>

@ -36,7 +36,7 @@
SelectedItem="{Binding EmpruntsPretsVM.Manager.SelectedLoan}"
SelectionMode="Single"
SelectionChangedCommand="{Binding EmpruntsPretsVM.OnSelectionLoanChangedCommand}"
SelectionChangedCommandParameter="{Binding EmpruntsPretsVM.Manager.SelectedBook}"
SelectionChangedCommandParameter="{Binding EmpruntsPretsVM.Manager.SelectedLoan}"
IsVisible="{Binding EmpruntsPretsVM.PretCollectionIsVisible}"
IsGrouped="True">
<CollectionView.GroupHeaderTemplate>

@ -136,7 +136,7 @@ namespace LivreLand.ViewModel
private void OnSelectionLoanChanged(LoanVM loanVM)
{
if (loanVM == null)
if (loanVM != null)
{
foreach (var b in Manager.AllCurrentLoans)
{

@ -472,6 +472,7 @@ namespace ViewModels
{
await Model.AddBookToCollection(result.Id);
}
GetBooksFromCollectionCommand.Execute(null);
}
private async Task UpdateBook(BookVM bookVM)

Loading…
Cancel
Save