Skip to content

Commit

Permalink
(#57)(#260) add saving organization criteria for searching events
Browse files Browse the repository at this point in the history
  • Loading branch information
an2508374 committed Jun 2, 2024
1 parent ff119b4 commit 9c44cd1
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
<h4>Select an organization (also suborganizations are included in results):</h4>

<RadzenTree Data="@rootOrganizations" Expand="@OnExpand" @bind-Value=@selectedItem>
<RadzenTreeLevel TextProperty="Name" ChildrenProperty="Children"/>
<RadzenTreeLevel TextProperty="Name" ChildrenProperty="Children"/>
<RadzenTreeLevel TextProperty="Name" ChildrenProperty="Children"/>
<RadzenTreeLevel TextProperty="Name" ChildrenProperty="Children"/>
<RadzenTreeLevel TextProperty="Name" ChildrenProperty="Children"/>
<RadzenTreeLevel TextProperty="Name" ChildrenProperty="Children"/>
<RadzenTreeLevel TextProperty="Name" ChildrenProperty="Children"/>
<RadzenTreeLevel TextProperty="Name" ChildrenProperty="Children"/>
Expand Down Expand Up @@ -188,18 +193,25 @@
StateHasChanged();
}

private static void ConvertOrganizationDtoList(IEnumerable<OrganizationDto> input, IList<OrganizationModel> result, Guid? rootId)
private void ConvertOrganizationDtoList(IEnumerable<OrganizationDto> input, IList<OrganizationModel> result, Guid? rootId)
{
result.Clear();
foreach (var organization in input)
{
result.Add(new OrganizationModel()
var newNode = new OrganizationModel()
{
Id = organization.Id,
Name = organization.Name,
RootId = rootId ?? organization.Id,
Children = new List<OrganizationModel>()
});
};

if (SearchEventsModel.Organization.Id == organization.Id)
{
selectedItem = newNode;
}

result.Add(newNode);
}
}

Expand Down

0 comments on commit 9c44cd1

Please sign in to comment.