Explorar o código

PRS MOBILE - fix to user credentials link

Nick-PRSDigital@bitbucket.org %!s(int64=2) %!d(string=hai) anos
pai
achega
bd5d9dbc6f

+ 1 - 3
prs.mobile/comal.timesheets/Data Classes/GlobalVariables.cs

@@ -20,9 +20,7 @@ namespace comal.timesheets
         public const string CacheUserIDString = "ConnectionSettingsUserID";
         public const string CachePasswordString = "ConnectionSettingsPassword";
 
-        public const string CacheSettingsURL1 = "CacheSettingsURL1";
-        public const string CacheSettingsURL2 = "CacheSettingsURL2";
-        public const string CacheSettingsURL3 = "CacheSettingsURL3";
+        public const string CacheSettingsURL = "CacheSettingsURL";
 
         public static List<ProductShell> ProductShells { get; set; }
 

+ 5 - 0
prs.mobile/comal.timesheets/DataGrid/MobileDataGrid.xaml.cs

@@ -401,6 +401,11 @@ namespace comal.timesheets
         }
 
         private void Filters_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+        {
+            UpdateScreenOnFilter();
+        }
+
+        public void UpdateScreenOnFilter()
         {
             if (bSearching)
                 return;

+ 1 - 0
prs.mobile/comal.timesheets/Grids/KanbanGrid.cs

@@ -133,6 +133,7 @@ namespace comal.timesheets
                 Items.Clear();
                 Items.AddRange(list);
                 Refresh(Items);
+                UpdateScreenOnFilter();
             }
         }
     }

+ 11 - 11
prs.mobile/comal.timesheets/Main/App.xaml.cs

@@ -22,7 +22,7 @@ namespace comal.timesheets
 {
     public partial class App : Application
     {
-        string deviceString = "";
+        public static string DeviceString = "";
         public static bool IsUserLoggedIn => ClientFactory.UserGuid != Guid.Empty;
         public static void LogoutUser()
         {
@@ -82,14 +82,14 @@ namespace comal.timesheets
                 new LocalConfiguration<DatabaseSettings>().Save(DBSettings);
                 MobileUtils.SaveToSecureStorage();
 
-                //if (!string.IsNullOrWhiteSpace(GlobalVariables.LoadFromLinkString))
-                //{
-                //    MobileUtils.LoadFromLink();
-                //}
+                if (!string.IsNullOrWhiteSpace(GlobalVariables.LoadFromLinkString))
+                {
+                    MobileUtils.LoadFromLink();
+                }
 
                 var result = JsonClient<User>.Ping(DBSettings.URLs, out DatabaseInfo info);
 
-                ClientFactory.SetClientType(typeof(JsonClient<>), "TimeBench", MobileUtils.AppVersion.InstalledVersionNumber + deviceString, result, true);
+                ClientFactory.SetClientType(typeof(JsonClient<>), "TimeBench", MobileUtils.AppVersion.InstalledVersionNumber + DeviceString, result, true);
 
                 GlobalVariables.InternalOnAppearing = true;
                 GlobalVariables.ChangeUser = false;
@@ -155,25 +155,25 @@ namespace comal.timesheets
                 {
                     if (idiom.Equals(DeviceIdiom.Phone))
                     {
-                        deviceString = "i";
+                        DeviceString = "i";
                     }
                     else if (idiom.Equals(DeviceIdiom.Tablet))
                     {
-                        deviceString = "I";
+                        DeviceString = "I";
                     }
                 }
                 else if (Device.RuntimePlatform.Equals(Device.Android))
                 {
                     if (idiom.Equals(DeviceIdiom.Phone))
                     {
-                        deviceString = "a";
+                        DeviceString = "a";
                     }
                     else if (idiom.Equals(DeviceIdiom.Tablet))
                     {
-                        deviceString = "A";
+                        DeviceString = "A";
                     }
                 }
-                GlobalVariables.DeviceString = deviceString;
+                GlobalVariables.DeviceString = DeviceString;
             }
             catch { }
         }

+ 2 - 1
prs.mobile/comal.timesheets/Site/Site.xaml.cs

@@ -226,7 +226,8 @@ namespace comal.timesheets
             var grid = host.DataGrid as KanbanGrid;
             grid.OnKanbanGridItemSelected += (item) =>
             {
-                return GenerateView(item);
+                return null;
+                //return GenerateView(item);
             };
 
             Navigation.PushAsync(host);

+ 1 - 1
prs.mobile/comal.timesheets/StringList.xaml.cs

@@ -77,7 +77,7 @@ namespace comal.timesheets
             };
             Grid.SetColumn(edt, 0);
 
-            Image img = new Image { Source = "closee.png", HeightRequest = 20, WidthRequest = 20 };
+            Image img = new Image { Source = "closee.png", HeightRequest = 20, WidthRequest = 20, Margin = new Thickness(2,2,10,2) };
             img.GestureRecognizers.Add(new TapGestureRecognizer { Command = new Command(Close) });
             Grid.SetColumn(img, 1);