97 lines
5.2 KiB
Plaintext
97 lines
5.2 KiB
Plaintext
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
|
||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||
|
xmlns:local="using:WheresMyMoney.Maui"
|
||
|
x:Class="WheresMyMoney.Maui.PlannedPaymentsPage">
|
||
|
<ContentPage.ToolbarItems>
|
||
|
<ToolbarItem
|
||
|
IconImageSource="{FontImageSource Glyph=+, FontFamily=FontAwesome, Size=32, Color={AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}} }"
|
||
|
Order="Primary"
|
||
|
Clicked="InsertPlannedPayment_OnClicked" />
|
||
|
</ContentPage.ToolbarItems>
|
||
|
<CollectionView ItemsSource="{Binding FullPlannedPaymentViewModels}">
|
||
|
<CollectionView.ItemTemplate>
|
||
|
<DataTemplate x:DataType="local:FullPlannedPaymentViewModel">
|
||
|
<VerticalStackLayout Margin="10,15" Padding="10">
|
||
|
<!-- Separator -->
|
||
|
<BoxView HeightRequest="1"
|
||
|
BackgroundColor="Gray"
|
||
|
Margin="0,10,0,10" />
|
||
|
|
||
|
<!-- Name -->
|
||
|
<Label Text="{Binding Name}"
|
||
|
FontSize="20"
|
||
|
FontAttributes="None"
|
||
|
Margin="0,5,0,5" />
|
||
|
<Grid ColumnDefinitions="*,Auto">
|
||
|
<VerticalStackLayout Grid.Column="0">
|
||
|
<!-- Amount -->
|
||
|
<Label Text="{Binding Amount}"
|
||
|
FontSize="20"
|
||
|
FontAttributes="Bold"
|
||
|
Margin="0,5,0,10" />
|
||
|
|
||
|
<!-- Subscription Indicator -->
|
||
|
<Label FontSize="20"
|
||
|
FontAttributes="None"
|
||
|
Margin="0,5,0,5">
|
||
|
<Label.Triggers>
|
||
|
<DataTrigger TargetType="Label" Binding="{Binding IsSubscription}" Value="True">
|
||
|
<Setter Property="Text" Value="Subskrybcja" />
|
||
|
</DataTrigger>
|
||
|
<DataTrigger TargetType="Label" Binding="{Binding IsSubscription}"
|
||
|
Value="False">
|
||
|
<Setter Property="IsVisible" Value="False" />
|
||
|
</DataTrigger>
|
||
|
</Label.Triggers>
|
||
|
</Label>
|
||
|
|
||
|
<!-- Start Date -->
|
||
|
<Label Text="od"
|
||
|
FontSize="16"
|
||
|
FontAttributes="None"
|
||
|
TextColor="Gray"
|
||
|
Margin="0,5,0,0" />
|
||
|
<Label Text="{Binding DateStart}"
|
||
|
FontSize="20"
|
||
|
FontAttributes="None"
|
||
|
Margin="0,0,0,10" />
|
||
|
|
||
|
<!-- End Date -->
|
||
|
<Label Text="do"
|
||
|
FontSize="16"
|
||
|
FontAttributes="None"
|
||
|
TextColor="Gray"
|
||
|
Margin="0,5,0,0" IsVisible="{Binding ShowDateEnd}" />
|
||
|
<Label Text="{Binding DateEnd}"
|
||
|
FontSize="20"
|
||
|
FontAttributes="None"
|
||
|
Margin="0,0,0,10" IsVisible="{Binding ShowDateEnd}" />
|
||
|
|
||
|
<!-- Subscription Details -->
|
||
|
<HorizontalStackLayout IsVisible="False"
|
||
|
Margin="0,10,0,0">
|
||
|
<HorizontalStackLayout.Triggers>
|
||
|
<DataTrigger TargetType="HorizontalStackLayout"
|
||
|
Binding="{Binding Path=IsSubscription}"
|
||
|
Value="True">
|
||
|
<Setter Property="IsVisible" Value="True" />
|
||
|
</DataTrigger>
|
||
|
</HorizontalStackLayout.Triggers>
|
||
|
<Label Text="Powtarzaj co"
|
||
|
Margin="0,0,5,0" />
|
||
|
<Label Text="{Binding Reoccurences}"
|
||
|
Margin="0,0,5,0" />
|
||
|
<Label Text="{Binding ReoccurenceType}" />
|
||
|
</HorizontalStackLayout>
|
||
|
</VerticalStackLayout>
|
||
|
<Button Grid.Column="1" Text="" FontFamily="FontAwesome" FontSize="32"
|
||
|
Clicked="RemovePlannedPayment_OnClicked"
|
||
|
CommandParameter="{Binding Id}" HorizontalOptions="End" VerticalOptions="Center" />
|
||
|
</Grid>
|
||
|
</VerticalStackLayout>
|
||
|
</DataTemplate>
|
||
|
</CollectionView.ItemTemplate>
|
||
|
</CollectionView>
|
||
|
</ContentPage>
|