| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286 |
- <?xml version="1.0" encoding="utf-8" ?>
- <mobile:MobilePage xmlns:local="clr-namespace:PRS.Mobile" xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
- xmlns:views="http://xamarin.com/schemas/2020/toolkit"
- x:Class="PRS.Mobile.StocktakeModule"
- Title="Stock Take">
-
- <mobile:MobilePage.BindingContext>
- <local:StockTakeViewModel x:Name="ViewModel"/>
- </mobile:MobilePage.BindingContext>
-
- <mobile:MobilePage.Resources>
- <mobile:BooleanToImageConverter x:Key="BooleanToImageConverter" Checked="hide" Unchecked="show"/>
- <mobile:BooleanToStringConverter x:Key="BooleanToStringConverter" TrueValue=", Active" FalseValue=", Inactive"/>
- <mobile:IntToBooleanConverter x:Key="ItemsVisibleConverter" Value="0" Result="True"/>
- <mobile:IntToBooleanConverter x:Key="PhotoVisibleConverter" Value="1" Result="True"/>
- <mobile:IntToBooleanConverter x:Key="SaveVisibleConverter" Value="2" Result="True" />
- <mobile:ByteArrayToImageSourceConverter x:Key="ImageConverter"/>
- <mobile:StringWithDefaultValueConverter x:Key="LocationConverter" Default="(Select)" />
- <local:StockHoldingShellColorConverter x:Key="StockHoldingShellColorConverter" x:Name="_stockHoldingShellColorConverter" />
- <local:StockHoldingShellAdjustmentConverter x:Key="StockHoldingShellAdjustmentConverter" x:Name="_stockHoldingShellAdjustmentConverter" />
- <local:StockHoldingShellBalanceConverter x:Key="StockHoldingShellBalanceConverter" />
- <local:StockLocationStatusConverter x:Key="StockLocationStatusConverter" />
- <DataTemplate x:Key="HoldingTemplate" x:DataType="local:StockHoldingShell">
- <ViewCell>
- <mobile:MobileCard
- BackgroundColor="{Binding ., Converter={StaticResource StockHoldingShellColorConverter}}"
- Padding="5"
- Margin="0,0,0,5"
- IsClickable="True"
- Clicked="Holding_Clicked">
-
- <Grid Grid.RowSpacing="5" Grid.ColumnSpacing="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="80"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="80"/>
- </Grid.ColumnDefinitions>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
-
- <Image
- Grid.Row="0"
- Grid.RowSpan="3"
- Grid.Column="0"
- Source = "{Binding Image, Converter={StaticResource ImageConverter}}"
- Aspect="AspectFit"
- HeightRequest="80"
- WidthRequest="80"
- HorizontalOptions="Center"
- VerticalOptions="Center"
- />
-
- <Label
- Grid.Row="3"
- Grid.Column="0"
- Text="{Binding ProductCode}"
- FontSize="Micro"
- TextColor="{StaticResource Theme.OnBackground}"
- LineBreakMode="NoWrap"
- HorizontalTextAlignment="Center"/>
-
- <Label
- Grid.Row="0"
- Grid.Column="1"
- Text="{Binding ProductName}"
- FontSize="Micro"
- TextColor="{StaticResource Theme.OnBackground}"
- HorizontalTextAlignment="Center"/>
-
- <Label
- Grid.Row="1"
- Grid.Column="1"
- Margin="5,0,0,0"
- Text="{Binding DimensionsUnitSize}"
- FontSize="Micro"
- TextColor="{StaticResource Theme.OnBackground}"
- HorizontalTextAlignment="Center"/>
-
- <Label
- Grid.Row="2"
- Grid.Column="1"
- Text="{Binding StyleDescription}"
- FontSize="Micro"
- LineBreakMode="TailTruncation"
- TextColor="{StaticResource Theme.OnBackground}"
- HorizontalTextAlignment="Center"/>
-
- <Label
- Grid.Row="3"
- Grid.Column="1"
- Text="{Binding JobDisplay}"
- FontSize="Micro"
- LineBreakMode="TailTruncation"
- HorizontalTextAlignment="Center"
- TextColor="{StaticResource Theme.OnBackground}"/>
-
- <StackLayout
- Orientation="Vertical"
- VerticalOptions="CenterAndExpand"
- Grid.Row="0"
- Grid.Column="2"
- Grid.RowSpan="4"
- Spacing="20">
- <Label Text="{Binding ., Converter={StaticResource StockHoldingShellBalanceConverter}}" HorizontalTextAlignment="Center" FontAttributes="Bold" />
- <Label Text="{Binding ., Converter={StaticResource StockHoldingShellAdjustmentConverter}}" HorizontalTextAlignment="Center" FontSize="{StaticResource Theme.Text.Small.Size}"/>
- </StackLayout>
- </Grid>
-
- </mobile:MobileCard>
- </ViewCell>
- </DataTemplate>
-
- <DataTemplate x:Key="PhotoTemplate" x:DataType="local:StockTransactionImage">
- <ViewCell>
- <mobile:MobileCard
- IsClickable="True"
- Clicked="Image_Clicked"
- Margin="0,0,0,5">
-
- <Image
- Margin="5"
- Source="{Binding Thumbnail, Converter={StaticResource ImageConverter}}"
- HeightRequest="200"
- Aspect="AspectFit"/>
-
- </mobile:MobileCard>
- </ViewCell>
- </DataTemplate>
-
- </mobile:MobilePage.Resources>
-
- <mobile:MobilePage.PrimaryMenu>
-
-
- <mobile:MobileMenuButton
- Image="plus" Clicked="AddHolding_Clicked"
- IsVisible="{Binding Source={x:Reference Name=_tabStrip}, Path=SelectedIndex, Converter={StaticResource ItemsVisibleConverter}}" />
-
- <mobile:MobileMenuButton
- x:Name="Photo"
- Image="camera"
- IsVisible="{Binding Source={x:Reference Name=_tabStrip}, Path=SelectedIndex, Converter={StaticResource PhotoVisibleConverter}}">
- <mobile:MobileMenuButton.Items>
- <mobile:MobileMenuItem Text="Take Photo" Clicked="TakePhoto_Clicked" />
- <mobile:MobileMenuItem Text="Browse Library" Clicked="PickPhoto_Clicked" />
- </mobile:MobileMenuButton.Items>
- </mobile:MobileMenuButton>
-
- <mobile:MobileMenuButton
- Image="save" Clicked="Save_Clicked"
- IsVisible="{Binding Source={x:Reference Name=_tabStrip}, Path=SelectedIndex, Converter={StaticResource SaveVisibleConverter}}" />
- </mobile:MobilePage.PrimaryMenu>
- <mobile:MobilePage.PageContent>
-
- <Grid Margin="5" RowSpacing="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
-
- <mobile:MobilePageStack
- Grid.Row="0"
- SelectedIndex="{Binding Source={x:Reference Name=_tabStrip}, Path=SelectedIndex}">
- <mobile:MobilePageStack.Items>
-
- <mobile:MobilePageStackItem>
- <mobile:MobilePageStackItem.Content>
-
- <views:DockLayout>
-
- <mobile:MobileListView
- views:DockLayout.Dock="Top"
- x:Name="_holdings"
- ItemsSource="{Binding Holdings.Items}"
- ItemTemplate="{StaticResource HoldingTemplate}"
- PullToRefresh="False"
- ShowRecordCount="False" />
-
- </views:DockLayout>
-
- </mobile:MobilePageStackItem.Content>
- </mobile:MobilePageStackItem>
-
- <mobile:MobilePageStackItem>
- <mobile:MobilePageStackItem.Content>
- <mobile:MobileListView
- x:Name="_imagelist"
- PullToRefresh="False"
- ShowRecordCount="False"
- ItemsSource="{Binding Images}"
- ItemTemplate="{StaticResource PhotoTemplate}" />
- </mobile:MobilePageStackItem.Content>
- </mobile:MobilePageStackItem>
-
- <mobile:MobilePageStackItem>
- <mobile:MobilePageStackItem.Content>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Label
- Grid.Row="0"
- Text="Stock Take Notes:"
- FontSize="{StaticResource Theme.Text.Body.Size}"
- TextColor="{StaticResource Theme.OnBackground}"/>
- <mobile:MobileCard
- Grid.Row="1"
- Background="{StaticResource Theme.Surface}"
- Padding="5">
- <mobile:MobileEditor
- Text="{Binding Notes}"
- BackgroundColor="Transparent"/>
- </mobile:MobileCard>
-
- <Label
- Grid.Row="2"
- Text="Move Stock Location To:"
- FontSize="{StaticResource Theme.Text.Body.Size}"
- TextColor="{StaticResource Theme.OnBackground}"/>
-
- <Grid
- Grid.Row="3">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <mobile:MobileCard
- Grid.Column="0"
- Padding="5,0"
- BackgroundColor="{StaticResource Theme.Background}">
- <Label
- HorizontalOptions="Fill"
- Text="{Binding Location.AreaDescription}"
- FontSize="Small"
- TextColor="{StaticResource Theme.OnBackground}"
- LineBreakMode="TailTruncation"
- VerticalTextAlignment="Center"
- />
- </mobile:MobileCard>
-
- <mobile:MobileButton
- Grid.Column="1"
- Image="lines"
- WidthRequest="40"
- Clicked="ChangeArea_Clicked"
- />
- </Grid>
-
- </Grid>
- </mobile:MobilePageStackItem.Content>
- </mobile:MobilePageStackItem>
-
- </mobile:MobilePageStack.Items>
- </mobile:MobilePageStack>
-
-
- <mobile:MobileTabStrip
- x:Name="_tabStrip"
- Grid.Row="1">
- <mobile:MobileTabStrip.Items>
- <mobile:MobileTabStripItem Text="Location" />
- <mobile:MobileTabStripItem Text="Photos" />
- <mobile:MobileTabStripItem Text="Summary" />
- </mobile:MobileTabStrip.Items>
- </mobile:MobileTabStrip>
-
- </Grid>
- </mobile:MobilePage.PageContent>
- </mobile:MobilePage>
|