|
|
@@ -3,20 +3,76 @@
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
xmlns:modules="clr-namespace:PRS.Avalonia.Modules"
|
|
|
+ xmlns:prs="using:PRS.Avalonia"
|
|
|
+ xmlns:components="using:InABox.Avalonia.Components"
|
|
|
+ xmlns:prsComponents="using:PRS.Avalonia.Components"
|
|
|
+ xmlns:mapsui="using:Mapsui.UI.Avalonia"
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
x:Class="PRS.Avalonia.Modules.EquipmentDetailsView"
|
|
|
x:DataType="modules:EquipmentDetailsViewModel">
|
|
|
- <Grid>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="*" />
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
-
|
|
|
- <Button Classes="Alert,Standard"
|
|
|
- Grid.Row="1"
|
|
|
- Padding="20"
|
|
|
- Content="Unlock Device"
|
|
|
- IsVisible="{Binding CanDisplayUnlockCode}"
|
|
|
- Command="{Binding DisplayUnlockCodeCommand}"/>
|
|
|
- </Grid>
|
|
|
+ <TabControl Classes="Standard"
|
|
|
+ TabStripPlacement="Bottom"
|
|
|
+ SelectedIndex="1">
|
|
|
+ <TabItem Header="Tasks">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <ScrollViewer>
|
|
|
+ <ItemsControl ItemsSource="{Binding OpenKanbans}">
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate DataType="prs:EquipmentKanbanShell">
|
|
|
+ <Button Classes="Standard"
|
|
|
+ Background="Orange"
|
|
|
+ Command="{Binding $parent[modules:EquipmentDetailsView].((modules:EquipmentDetailsViewModel)DataContext).EditOpenTaskCommand}"
|
|
|
+ CommandParameter="{Binding .}"
|
|
|
+ Content="{Binding Title}"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ </ItemsControl>
|
|
|
+ </ScrollViewer>
|
|
|
+ <Button Classes="Standard" Grid.Row="1"
|
|
|
+ Content="{Binding Kanbans.ItemCount,StringFormat='All Tasks ({0})'}"
|
|
|
+ Command="{Binding ViewTasksCommand}"/>
|
|
|
+ </Grid>
|
|
|
+ </TabItem>
|
|
|
+ <TabItem Header="Notes">
|
|
|
+ <TextBox Watermark="Notes"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Focusable="False"
|
|
|
+ VerticalContentAlignment="Top"
|
|
|
+ Text="{Binding Shell.Notes}"/>
|
|
|
+ </TabItem>
|
|
|
+ <TabItem Header="Specs">
|
|
|
+ <Grid>
|
|
|
+ <Label VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
|
|
|
+ Content="No Image Available"
|
|
|
+ Foreground="Gray" IsVisible="{Binding !HasDocument}"/>
|
|
|
+ </Grid>
|
|
|
+ </TabItem>
|
|
|
+ <TabItem Header="Map">
|
|
|
+ <Grid>
|
|
|
+ <mapsui:MapControl x:Name="Map" IsVisible="{Binding HasMap}"/>
|
|
|
+ <Label VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
|
|
|
+ Content="No Map Available"
|
|
|
+ Foreground="Gray" IsVisible="{Binding !HasMap}"/>
|
|
|
+ </Grid>
|
|
|
+ </TabItem>
|
|
|
+ <TabItem Header="Docs">
|
|
|
+ <prsComponents:DocumentList Repository="{Binding Documents}"/>
|
|
|
+ </TabItem>
|
|
|
+ <TabItem Header="Key" IsVisible="{Binding CanDisplayUnlockCode}">
|
|
|
+ <Button Classes="Standard"
|
|
|
+ Width="100" Height="100" CornerRadius="50"
|
|
|
+ Padding="20"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ Command="{Binding DisplayUnlockCodeCommand}">
|
|
|
+ <Image Source="{SvgImage /Images/key.svg}"/>
|
|
|
+ </Button>
|
|
|
+ </TabItem>
|
|
|
+ </TabControl>
|
|
|
</UserControl>
|