Kaynağa Gözat

PRS MOBILE - version 4.39.4 for ios - attempt to fix login issues

Nick-PRSDigital@bitbucket.org 2 yıl önce
ebeveyn
işleme
e77e087280

+ 2 - 1
prs.mobile/comal.timesheets.Android/Resources/Resource.designer.cs

@@ -2,6 +2,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -14,7 +15,7 @@ namespace comal.timesheets.Droid
 {
 	
 	
-	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.0.0.73")]
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.1.0.5")]
 	public partial class Resource
 	{
 		

+ 1 - 1
prs.mobile/comal.timesheets.Android/comal.timesheets.Android.csproj

@@ -128,7 +128,7 @@
       <Version>2.0.1</Version>
     </PackageReference>
     <PackageReference Include="Xamarin.Forms">
-      <Version>5.0.0.2244</Version>
+      <Version>5.0.0.2545</Version>
     </PackageReference>
     <PackageReference Include="Xamarin.Forms.Maps">
       <Version>5.0.0.2244</Version>

+ 2 - 2
prs.mobile/comal.timesheets.iOS/Info.plist

@@ -9,9 +9,9 @@
 	<key>CFBundleName</key>
 	<string>TimeBench</string>
 	<key>CFBundleShortVersionString</key>
-	<string>4.39.3</string>
+	<string>4.39.4</string>
 	<key>CFBundleVersion</key>
-	<string>4.39.3</string>
+	<string>4.39.4</string>
 	<key>NSBluetoothAlwaysUsageDescription</key>
 	<string>Bluetooth access is needed to locate equipment items</string>
 	<key>NSBluetoothPeripheralUsageDescription</key>

+ 1 - 1
prs.mobile/comal.timesheets.iOS/comal.timesheets.iOS.csproj

@@ -1319,7 +1319,7 @@
       <Version>2.0.5</Version>
     </PackageReference>
     <PackageReference Include="Xamarin.Forms">
-      <Version>5.0.0.2515</Version>
+      <Version>5.0.0.2545</Version>
     </PackageReference>
     <PackageReference Include="Xamarin.Forms.Maps">
       <Version>5.0.0.2515</Version>

+ 7 - 2
prs.mobile/comal.timesheets/DigitalForms/Renderer/QAFormViewer.cs

@@ -2043,9 +2043,14 @@ namespace comal.timesheets.QAForms
                 return null;
             }
 
+        }
+
+        public void SetFieldColour(string field, System.Drawing.Color? colour = null)
+        {
+            
         }
         #endregion
-        
-        
+
+
     }
 }

+ 14 - 12
prs.mobile/comal.timesheets/Main/PINLoginPage.xaml.cs

@@ -21,6 +21,7 @@ namespace comal.timesheets
         bool twoFAvisible = false;
         bool checkingClipBoard = false;
         string loadFromIOSLink = "";
+        bool timerRunning = false;
         Timer timer;
         public PINLoginPage(string logindetails = "")
         {
@@ -33,7 +34,7 @@ namespace comal.timesheets
 
     
 
-        protected override async void OnAppearing()
+        protected override void OnAppearing()
         {
             try
             {
@@ -46,7 +47,7 @@ namespace comal.timesheets
                 if (!string.IsNullOrWhiteSpace(GlobalVariables.LoadFromLinkString))
                 {
                     if (GlobalVariables.LoadFromLinkString == "Link has expired")
-                        await DisplayAlert("Alert", "Link has expired", "OK");
+                        DisplayAlert("Alert", "Link has expired", "OK");
                 }
 
                 if (!GlobalVariables.InternalOnAppearing)
@@ -77,14 +78,14 @@ namespace comal.timesheets
                     Thread.Sleep(250);
                     Device.BeginInvokeOnMainThread(() =>
                     {
-                        if (App.IsUserLoggedIn && GlobalVariables.ChangeUser == false)
-                        {
-                            LaunchMainPage();
-                            return;
-                        }
-                        else
-                        {
-                            if (String.IsNullOrWhiteSpace(App.Settings.UserID) || String.IsNullOrWhiteSpace(App.Settings.Password))
+                    if (App.IsUserLoggedIn && GlobalVariables.ChangeUser == false)
+                    {
+                        LaunchMainPage();
+                        return;
+                    }
+                    else
+                    {
+                        if (String.IsNullOrWhiteSpace(App.Settings.UserID) || String.IsNullOrWhiteSpace(App.Settings.Password))
                             {
                                 DisplayAlert("Unable to log in", "User ID or password is blank", "OK");
                                 ShowPINPad();
@@ -167,8 +168,8 @@ namespace comal.timesheets
                 App.Current.Properties.Add("SessionID", ClientFactory.SessionID);
             else
                 App.Current.Properties["SessionID"] = ClientFactory.SessionID;
-            timer = new Timer(Callback, null, Timeout.Infinite, 5000);
-            timer.Dispose();
+            if(timerRunning)
+                timer.Dispose();
             App.Data.Refresh(true);
             Device.BeginInvokeOnMainThread(async () => { await Navigation.PushAsync(new MainPage()); });
         }
@@ -209,6 +210,7 @@ namespace comal.timesheets
             try
             {
                 timer = new Timer(Callback, null, 4000, 500);
+                timerRunning = true;
             }
             catch
             { }

+ 5 - 5
prs.mobile/comal.timesheets/Main/Settings.xaml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <ContentPage
     xmlns="http://xamarin.com/schemas/2014/forms"
     xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
@@ -70,14 +70,14 @@
 
             <!--row 3-->
             <Label Text="Password" Grid.Row="3" Grid.Column="0"  VerticalOptions="CenterAndExpand" FontSize="Small"/>
-            <!--<Entry x:Name="Password" Grid.Row="3" Grid.Column="1" Text="{Binding Password}" Keyboard="Url" IsPassword="True" VerticalOptions="Fill" HorizontalOptions="Fill" FontSize="Small"
-                   TextChanged="UserPassword_Changed"/>-->
+            <Entry x:Name="Password" Grid.Row="3" Grid.Column="1" Text="{Binding Password}" Keyboard="Url" IsPassword="True" VerticalOptions="Fill" HorizontalOptions="Fill" FontSize="Small"
+                   TextChanged="UserPassword_Changed"/>
 
             <!--<maskededit:SfMaskedEdit x:Name="Password" Grid.Row="3" Grid.Column="0"  VerticalOptions="Fill" HorizontalOptions="Fill" FontSize="Small" ClearButtonVisibility="WhileEditing"
                         Value="{Binding Password}" ValueChanged="UserPassword_Changed" PasswordChar="*" EnablePasswordDelay="True" PasswordDelayDuration="2"
                                      />-->
 
-            <Grid Grid.Row="3" Grid.Column="1" >
+            <!--<Grid Grid.Row="3" Grid.Column="1" >
                 <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="*"/>
                     <ColumnDefinition Width="30"/>
@@ -98,7 +98,7 @@
                         <TapGestureRecognizer Tapped="ShowPW_Tapped"/>
                     </Image.GestureRecognizers>
                 </Image>
-            </Grid>
+            </Grid>-->
 
 
             <!--row 4-->

+ 22 - 22
prs.mobile/comal.timesheets/Main/Settings.xaml.cs

@@ -184,18 +184,18 @@ namespace comal.timesheets
 
         private void UserPassword_Changed(object sender, EventArgs e)
         {
-            //if (!string.IsNullOrWhiteSpace(UserID.Text))
-            //{
-            //    Password.Text = Password.Text.Trim();
-            //}
-            if (!string.IsNullOrWhiteSpace(Password.Value.ToString()))
+            if (!string.IsNullOrWhiteSpace(UserID.Text))
             {
-                Password.Value = Password.Value.ToString().Trim();
-                s = Password.Value.ToString();
-                showPassword.Text = s;
+                Password.Text = Password.Text.Trim();
             }
-            else
-                s = "";
+            //if (!string.IsNullOrWhiteSpace(Password.Value.ToString()))
+            //{
+            //    Password.Value = Password.Value.ToString().Trim();
+            //    s = Password.Value.ToString();
+            //    showPassword.Text = s;
+            //}
+            //else
+            //    s = "";
         }
 
         async void BackgroundLoadProducts()
@@ -244,22 +244,22 @@ namespace comal.timesheets
 
         private void ShowPW_Tapped(object sender, EventArgs e)
         {
-            passwordOne.Width = new GridLength(0, GridUnitType.Absolute);
-            passwordTwo.Width = new GridLength(1, GridUnitType.Star);
-            Task.Run(() =>
-            {
-                Thread.Sleep(2500);
-                ShowMaskedText();
-            });
+            //passwordOne.Width = new GridLength(0, GridUnitType.Absolute);
+            //passwordTwo.Width = new GridLength(1, GridUnitType.Star);
+            //Task.Run(() =>
+            //{
+            //    Thread.Sleep(2500);
+            //    ShowMaskedText();
+            //});
         }
 
         private void ShowMaskedText()
         {
-            Device.BeginInvokeOnMainThread(() =>
-            {
-                passwordTwo.Width = new GridLength(0, GridUnitType.Absolute);
-                passwordOne.Width = new GridLength(1, GridUnitType.Star);
-            });
+            //Device.BeginInvokeOnMainThread(() =>
+            //{
+            //    passwordTwo.Width = new GridLength(0, GridUnitType.Absolute);
+            //    passwordOne.Width = new GridLength(1, GridUnitType.Star);
+            //});
         }
 
         private async void ClearStorageBtn_Clicked(object sender, EventArgs e)