Skip to content

Commit

Permalink
[BUG] User List Limited to 100 Users - Filtering Doesn't Reveal Hidde…
Browse files Browse the repository at this point in the history
…n Users (#740)

* Create draft PR for #739

* ****TcOpen.Inxton.Local.Security****
*Users are limited to 100
*Fixed layout in grouped users view

**** TcoElements ********
*Carousel base view -> Spot view
* visibility in Carousel in position fixed...

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: peterbarancek <62284244+peterbarancek@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and peterbarancek authored Aug 15, 2024
1 parent 3431f46 commit 94b525e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BaseUserViewModel : BindableBase
private static ObservableCollection<UserData> _allUsers;

public IRepository<UserData> UserRepository { get => _userRepositary; set => _userRepositary = value; }
public ObservableCollection<UserData> AllUsers { get => _allUsers; private set => _allUsers = value; }
public ObservableCollection<UserData> AllUsers { get => _allUsers;private set => _allUsers = value; }
public List<Role> AllRoles { get; private set; } = new List<Role>();
public List<string> AllGroups { get; private set; }
public static event EventHandler OnNewUserAdded;
Expand All @@ -27,13 +27,17 @@ public BaseUserViewModel()
UserRepository = SecurityManager.Manager.UserRepository;
AllRoles = SecurityManager.Manager.AvailableRoles.ToList();
AllGroups = SecurityManager.Manager.AvailableGroups().ToList();
AllUsers = new ObservableCollection<UserData>(UserRepository.GetRecords());
AllUsers = new ObservableCollection<UserData>(UserRepository.Queryable.Where(p=> true));
}





protected void UsersChanged()
{
AllUsers.Clear();
UserRepository.GetRecords().ToList().ForEach(AllUsers.Add);
UserRepository.Queryable.Where(p => true).ToList().ForEach(AllUsers.Add);
OnNewUserAdded?.Invoke(this, EventArgs.Empty);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
<controls:PermissionBox Permissions="Administrator">
<TabControl>
<TabItem Header="{x:Static p:strings.CurrentUsers}">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Margin="12" Style="{DynamicResource Card}">
<controls:AllUsersGroupManagementView/>
</Grid>
</ScrollViewer>
<Grid Margin="12" Style="{DynamicResource Card}">
<controls:AllUsersGroupManagementView/>
</Grid>

</TabItem>
<TabItem Header="{x:Static p:strings.NewUser}">
<ScrollViewer VerticalScrollBarVisibility="Auto">
Expand All @@ -46,11 +45,11 @@
</ScrollViewer>
</TabItem>
<TabItem Header="Group management">
<ScrollViewer VerticalScrollBarVisibility="Auto">

<Grid Margin="12" Style="{DynamicResource Card}">
<controls:AllGroupsGroupManagementView />
</Grid>
</ScrollViewer>

</TabItem>
</TabControl>
</controls:PermissionBox>
Expand Down
2 changes: 1 addition & 1 deletion src/TcOpen.Inxton/src/Security/RoleGroupManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public string GetRolesFromGroupString(string group)
public List<GroupData> GetAllGroup()
{
List<GroupData> data = null;
data = groupRepo.GetRecords().ToList();
data = groupRepo.Queryable.Where(p => true).ToList();
return data;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<UserControl
x:Class="TcoElements.TcoCarouselView"
x:Class="TcoElements.TcoCarouselSpotView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Expand Down Expand Up @@ -44,7 +44,7 @@
Foreground="{DynamicResource OnWarning}"
HorizontalAlignment="Center"
MaxWidth="300"
Visibility="{Binding _status.InPosition.Cyclic, Converter={tcoCore:BooleanToVisibilityConverter}, ConverterParameter=false}"
Visibility="{Binding _status.InPosition.Cyclic, Converter={tcoCore:BooleanToVisibilityConverter}, ConverterParameter=true}"
Content="{x:Static p:Resources.CarouselNotInPos}" />
<Button Style="{StaticResource MaterialDesignOutlinedButton}"
VerticalAlignment="Top"
Expand All @@ -53,7 +53,7 @@
Foreground="{StaticResource OnError}"
HorizontalAlignment="Center"
MaxWidth="300"
Visibility="{Binding _status.InPrecisePosition.Cyclic, Converter={tcoCore:BooleanToVisibilityConverter }, ConverterParameter=false}"
Visibility="{Binding _status.InPrecisePosition.Cyclic, Converter={tcoCore:BooleanToVisibilityConverter }, ConverterParameter=true}"
Content="{x:Static p:Resources.CarouselNotInPrecisePos}" />

</StackPanel>
Expand All @@ -72,7 +72,7 @@
Foreground="{StaticResource OnError}"
MaxWidth="350"
Margin="5,200,5,5"
Visibility="{Binding _status.TurnSafetyCondition.Cyclic, Converter={vortex:BooleanToVisibilityConverter}, ConverterParameter=false}"
Visibility="{Binding _status.TurnSafetyCondition.Cyclic, Converter={vortex:BooleanToVisibilityConverter}, ConverterParameter=true}"
Content="{x:Static p:Resources.CarouselNotSafeTurnCondition}" >
</Button>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ namespace TcoElements
/// <summary>
/// Interaction logic for TcoCarouselServiceView.xaml
/// </summary>
public partial class TcoCarouselView
public partial class TcoCarouselSpotView
: UserControl
{
public TcoCarouselView()
public TcoCarouselSpotView()
{
if (DesignerProperties.GetIsInDesignMode(this))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<Page Update="Carousel\Service\TcoCarouselServiceView.xaml">
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</Page>
<Page Update="Carousel\TcoCarouselView.xaml">
<Page Update="Carousel\TcoCarouselSpotView.xaml">
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
<SubType>Designer</SubType>
</Page>
Expand Down

0 comments on commit 94b525e

Please sign in to comment.