Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 11 additions & 26 deletions TransactionMobile.Maui/Pages/LoginPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,33 @@
BackgroundColor="White">
<ContentPage.Content>
<!-- Main structure-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<VerticalStackLayout x:Name="MainLayout">
<!--Main image-->
<Image Grid.RowSpan="2" Grid.Row="0" Source="Resources/loginimage.jpg" VerticalOptions="Start" Aspect="AspectFit"/>
<Image Source="Resources/loginimage.jpg" VerticalOptions="Start" Aspect="AspectFit"/>

<!-- Title-->
<Label Grid.Row="1" Text="Log In" FontSize="34" VerticalOptions="End" FontAttributes="Bold" Padding="20,0,0,20"/>
<Label Text="Log In" FontSize="34" HorizontalOptions="Center" FontAttributes="Bold" Padding="20,0,0,20"/>

<Frame Grid.Row="2" HasShadow="True" Padding="25,50" Margin="10,0,10,10" VerticalOptions="CenterAndExpand"
<Frame HasShadow="True" Padding="25,50" Margin="10,0,10,10" VerticalOptions="CenterAndExpand"
CornerRadius="20" Opacity="0.9" BackgroundColor="#E5E9F0">
<Grid ColumnDefinitions="Auto,*">
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
</Grid.RowDefinitions>
<VerticalStackLayout x:Name="SubLayout">

<Entry x:Name="UserNameEntry"
Grid.Row="0"
Placeholder="User name or email address"
AutomationId="UserNameEntry"
Style="{DynamicResource UserNameEntryStyle}"
Grid.ColumnSpan="2">
Style="{DynamicResource UserNameEntryStyle}">
</Entry>

<Entry x:Name="PasswordEntry"
Grid.Row="1"
Placeholder="******"
AutomationId="PasswordEntry"
Style="{DynamicResource PasswordEntryStyle}"
Grid.ColumnSpan="2">
Style="{DynamicResource PasswordEntryStyle}">
</Entry>

<Button Grid.ColumnSpan="2" Grid.Row="2" Text="Continue" Style="{StaticResource StandardButton}" Command="{Binding LoginCommand}"/>
<Label Grid.ColumnSpan="2" Grid.Row="3" Text="Forgot your password?" TextColor="{StaticResource P}" FontAttributes="Bold"/>
</Grid>
<Button Text="Continue" Style="{StaticResource StandardButton}" Command="{Binding LoginCommand}"/>
<!--<Label Grid.ColumnSpan="2" Grid.Row="3" Text="Forgot your password?" TextColor="{StaticResource P}" FontAttributes="Bold"/>-->
</VerticalStackLayout>
</Frame>
</Grid>
</VerticalStackLayout>
</ContentPage.Content>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
Style="{DynamicResource MobileTopupButtonStyle}"
Command="{Binding PerformTopupCommand}"
AutomationId="PerformTopupButton"/>
<!--Style="{DynamicResource MobileTopupButtonStyle}"-->
</VerticalStackLayout>
</Frame>
</VerticalStackLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public MobileTopupPerformTopupPage(MobileTopupPerformTopupPageViewModel vm)
BindingContext = vm;
vm.OnCustomerMobileNumberEntryCompleted = () =>
{
if (this.TopupAmountEntry.IsReadOnly)
if (this.TopupAmountEntry.IsReadOnly == false)
{
this.TopupAmountEntry.Focus();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TransactionMobile.Maui.VoucherIssueFailedPage"
Title="{Binding Title}"
Shell.NavBarIsVisible="False"
BackgroundColor="White">
<StackLayout>
<Label
Margin="0,40,0,0"
Style="{StaticResource LabelStyle}"
HorizontalTextAlignment="Center"
AutomationId="VoucherIssueFailed"
Text="VOUCHER ISSUE FAILURE" />
<VerticalStackLayout x:Name="MainLayout">
<Label Text="{Binding Title}" FontSize="24" HorizontalOptions="Center" VerticalOptions="End"
FontAttributes="Bold" Padding="20,0,0,20"/>
<Frame HasShadow="True" Padding="25,50" Margin="10,0,10,10" VerticalOptions="CenterAndExpand" CornerRadius="20"
Opacity="0.9" BackgroundColor="#E5E9F0">
<VerticalStackLayout Spacing="10">

<Button
x:Name="CancelButton"
Grid.Row="5"
Margin="0,16"
MinimumWidthRequest="250"
WidthRequest="400"
Text="Cancel"
Command="{Binding CancelledCommand}"
AutomationId="CancelButton"/>
</StackLayout>
<Image Source="Resources/PaymentFailure.svg" VerticalOptions="Start" Aspect="AspectFit"/>

<Label Margin="17,8"
Text="Unfortunately, we could not process your voucher issue, this may be for a variety of reasons. If you wish you can retry the transaction."/>

<Button x:Name="CancelButton" Grid.Row="5" Margin="0,16"
Text="Cancel" Command="{Binding CancelledCommand}"
Style="{DynamicResource VoucherButtonStyle}" AutomationId="CancelButton"/>
</VerticalStackLayout>
</Frame>
</VerticalStackLayout>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,24 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TransactionMobile.Maui.VoucherIssueSuccessPage"
Title="{Binding Title}"
Shell.NavBarIsVisible="False"
BackgroundColor="White">
<StackLayout>
<Label
Margin="0,40,0,0"
Style="{StaticResource LabelStyle}"
HorizontalTextAlignment="Center"
AutomationId="VoucherIssueSuccessful"
Text="VOUCHER ISSUE SUCCESSFUL" />
<VerticalStackLayout x:Name="MainLayout">
<Label Text="{Binding Title}" FontSize="24" HorizontalOptions="Center" VerticalOptions="End"
FontAttributes="Bold" Padding="20,0,0,20"/>
<Frame HasShadow="True" Padding="25,50" Margin="10,0,10,10" VerticalOptions="CenterAndExpand" CornerRadius="20"
Opacity="0.9" BackgroundColor="#E5E9F0">
<VerticalStackLayout Spacing="10">

<!-- Payment description label -->
<Label
Margin="17,8"
Text="Thank you for your voucher. An automated payment receipt will be sent to your email entered." />
<Image Source="Resources/PaymentSuccess.svg" VerticalOptions="Start" Aspect="AspectFit"/>

<Button
x:Name="CompleteButton"
Margin="0,16"
MinimumWidthRequest="250"
WidthRequest="250"
Text="Complete"
Command="{Binding CompletedCommand}"
AutomationId="CompleteButton"/>
</StackLayout>
<!-- Payment description label -->
<Label Margin="17,8"
Text="Thank you for your voucher purchase. An automated payment receipt will be sent to your email entered."/>

<Button x:Name="CompleteButton" Margin="0,16" Text="Complete" Command="{Binding CompletedCommand}"
Style="{DynamicResource VoucherButtonStyle}" AutomationId="CompleteButton"/>
</VerticalStackLayout>
</Frame>
</VerticalStackLayout>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,71 @@
x:Class="TransactionMobile.Maui.VoucherPerformIssuePage"
xmlns:behaviors="clr-namespace:CommunityToolkit.Maui.Behaviors;assembly=CommunityToolkit.Maui"
Title="{Binding Title}"
Shell.NavBarIsVisible="False"
BackgroundColor="White">
<StackLayout>
<Entry x:Name="RecipientMobileNumberEntry"
<VerticalStackLayout x:Name="MainLayout">
<Label Text="{Binding Title}" FontSize="24" HorizontalOptions="Center" VerticalOptions="End" FontAttributes="Bold" Padding="20,0,0,20"/>
<Frame HasShadow="True" Padding="25,50" Margin="10,0,10,10" VerticalOptions="CenterAndExpand"
CornerRadius="20" Opacity="0.9" BackgroundColor="#E5E9F0">
<VerticalStackLayout Spacing="10">
<Entry x:Name="RecipientMobileNumberEntry"
Placeholder="Recipient Mobile Number"
AutomationId="RecipientMobileNumberEntry"
Style="{DynamicResource MobileNumberEntryStyle}"
Text="{Binding RecipientMobileNumber}"
Keyboard="Numeric">
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
EventName="Completed"
Command="{Binding RecipientMobileNumberEntryCompletedCommand}" />
</Entry.Behaviors>
</Entry>
</Entry.Behaviors>
</Entry>

<Entry x:Name="RecipientEmailAddressEntry"
<Entry x:Name="RecipientEmailAddressEntry"
Placeholder="Recipient Email Address"
AutomationId="RecipientEmailAddressEntry"
Style="{DynamicResource EmailAddressEntryStyle}"
Text="{Binding RecipientEmailAddress}"
Keyboard="Numeric">
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
EventName="Completed"
Command="{Binding RecipientEmailAddressEntryCompletedCommand}" />
</Entry.Behaviors>
</Entry>
</Entry.Behaviors>
</Entry>

<Entry x:Name="VoucherAmountEntry"
<Entry x:Name="VoucherAmountEntry"
Placeholder="100"
AutomationId="VoucherAmountEntry"
Style="{DynamicResource AmountEntryStyle}"
Text="{Binding VoucherAmount}"
Keyboard="Numeric">
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
EventName="Completed"
Command="{Binding VoucherAmountEntryCompletedCommand}" />
</Entry.Behaviors>
</Entry>
<Entry x:Name="CustomerEmailAddressEntry"
</Entry.Behaviors>
</Entry>

<Entry x:Name="CustomerEmailAddressEntry"
Placeholder="customeremail@email.com"
AutomationId="CustomerEmailAddressEntry"
Style="{DynamicResource EmailAddressEntryStyle}"
Text="{Binding CustomerEmailAddress}">
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
EventName="Completed"
Command="{Binding CustomerEmailAddressEntryCompletedCommand}" />
</Entry.Behaviors>
</Entry>
</Entry.Behaviors>
</Entry>

<Button x:Name="IssueVoucherButton"
<Button x:Name="IssueVoucherButton"
Text="Issue Voucher"
Command="{Binding IssueVoucherCommand}"
Style="{DynamicResource VoucherButtonStyle}"
AutomationId="IssueVoucherButton"/>
</StackLayout>
</VerticalStackLayout>
</Frame>
</VerticalStackLayout>

</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public VoucherPerformIssuePage(VoucherPerformIssuePageViewModel vm)
BindingContext = vm;
vm.OnRecipientMobileNumberEntryCompleted = () =>
{
if (this.VoucherAmountEntry.IsEnabled)
if (this.VoucherAmountEntry.IsReadOnly == false)
{
this.VoucherAmountEntry.Focus();
}
Expand Down Expand Up @@ -48,7 +48,7 @@ protected override async void OnAppearing()
base.OnAppearing();
if (viewModel.VoucherAmount > 0)
{
this.VoucherAmountEntry.IsEnabled = false;
this.VoucherAmountEntry.IsReadOnly = true;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TransactionMobile.Maui.VoucherSelectOperatorPage"
Title="{Binding Title}"
Shell.NavBarIsVisible="False"
BackgroundColor="White">
<StackLayout>
<Grid x:Name="OperatorGrid" HorizontalOptions="CenterAndExpand" VerticalOptions="FillAndExpand">
</Grid>
</StackLayout>
<VerticalStackLayout x:Name="MainLayout">
<Label Text="{Binding Title}" FontSize="24" HorizontalOptions="Center" VerticalOptions="End"
FontAttributes="Bold" Padding="20,0,0,20"/>
<Frame HasShadow="True" Padding="25,50" Margin="10,0,10,10" VerticalOptions="CenterAndExpand" CornerRadius="20"
Opacity="0.9" BackgroundColor="#E5E9F0">
<VerticalStackLayout Spacing="10" x:Name="OperatorList">
</VerticalStackLayout>
</Frame>
</VerticalStackLayout>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,8 @@ protected override async void OnAppearing()

private void LoadOperators(VoucherSelectOperatorPageViewModel viewModel)
{
RowDefinitionCollection rowDefinitionCollection = new RowDefinitionCollection();
for (Int32 i = 0; i < viewModel.Operators.Count; i++)
{
rowDefinitionCollection.Add(new RowDefinition
{
Height = 60
});
}

this.OperatorGrid.RowDefinitions = rowDefinitionCollection;

this.OperatorList.Children.Clear();

Int32 rowCount = 0;
foreach (ContractOperatorModel modelOperator in viewModel.Operators)
{
Expand All @@ -42,7 +33,7 @@ private void LoadOperators(VoucherSelectOperatorPageViewModel viewModel)
HorizontalOptions = LayoutOptions.FillAndExpand,
AutomationId = modelOperator.OperatorName,
};
//button.SetDynamicResource(VisualElement.StyleProperty, "MobileTopupButtonStyle");
button.SetDynamicResource(VisualElement.StyleProperty, "VoucherButtonStyle");
Binding commandParameter = new Binding()
{
Source = new ItemSelected<ContractOperatorModel>(){
Expand All @@ -59,7 +50,7 @@ private void LoadOperators(VoucherSelectOperatorPageViewModel viewModel)
button.SetBinding(Button.CommandProperty, command);
button.SetBinding(Button.CommandParameterProperty, commandParameter);

this.OperatorGrid.Add(button, 0, rowCount);
this.OperatorList.Add(button);

rowCount++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TransactionMobile.Maui.VoucherSelectProductPage"
Title="{Binding Title}"
Shell.NavBarIsVisible="False"
BackgroundColor="White">
<StackLayout>
<Grid x:Name="ProductsGrid" HorizontalOptions="CenterAndExpand" VerticalOptions="FillAndExpand">
</Grid>
</StackLayout>
<VerticalStackLayout x:Name="MainLayout">
<Label Text="{Binding Title}" FontSize="24" HorizontalOptions="Center" VerticalOptions="End"
FontAttributes="Bold" Padding="20,0,0,20"/>
<Frame HasShadow="True" Padding="25,50" Margin="10,0,10,10" VerticalOptions="CenterAndExpand" CornerRadius="20"
Opacity="0.9" BackgroundColor="#E5E9F0">
<VerticalStackLayout Spacing="10" x:Name="ProductsList">
</VerticalStackLayout>
</Frame>
</VerticalStackLayout>
</ContentPage>
Loading