Started adding capture page logic

This commit is contained in:
2025-03-05 19:32:18 +01:00
parent c2f89b1b09
commit 44da4932aa
17 changed files with 458 additions and 97 deletions

View File

@@ -0,0 +1,39 @@
<?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:components="clr-namespace:WorkTime.Mobile.Views.Components"
xmlns:viewModels="clr-namespace:WorkTime.Mobile.ViewModels"
xmlns:models="clr-namespace:WorkTime.Shared.Models;assembly=WorkTime.Shared"
x:Class="WorkTime.Mobile.Views.Pages.CapturePage"
x:DataType="viewModels:CaptureViewModel"
Padding="24, 0, 24, 24">
<Grid RowDefinitions="Auto,*,Auto">
<components:DateSelector
Grid.Row="0"
Command="{Binding DateSelectedCommand}"/>
<CollectionView
Grid.Row="1"
ItemsSource="{Binding Entries}">
<CollectionView.ItemTemplate>
<DataTemplate
x:DataType="models:TimeEntry">
<HorizontalStackLayout Spacing="5">
<Label Text="{Binding Timestamp}" />
<Label Text="{Binding Type}" />
</HorizontalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Button
Grid.Row="2"
Text="{Binding CurrentActionName}"
Command="{Binding RegisterEntryCommand}"/>
</Grid>
</ContentPage>

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkTime.Mobile.ViewModels;
namespace WorkTime.Mobile.Views.Pages;
public partial class CapturePage : ContentPage {
public CapturePage(CaptureViewModel model) {
InitializeComponent();
BindingContext = model;
}
}