Started adding capture page logic
This commit is contained in:
39
src/WorkTime.Mobile/Views/Pages/CapturePage.xaml
Normal file
39
src/WorkTime.Mobile/Views/Pages/CapturePage.xaml
Normal 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>
|
||||
15
src/WorkTime.Mobile/Views/Pages/CapturePage.xaml.cs
Normal file
15
src/WorkTime.Mobile/Views/Pages/CapturePage.xaml.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user