Skip to content

Commit

Permalink
Add description to group view page #362
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsen9026 committed May 22, 2024
1 parent 9dccf95 commit fd181d3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 61 deletions.
2 changes: 1 addition & 1 deletion BLAZAM/BLAZAM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>false</ServerGarbageCollection>
<AssemblyVersion>0.9.2</AssemblyVersion>
<Version>2024.05.21.2352</Version>
<Version>2024.05.22.0109</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
Expand Down
122 changes: 62 additions & 60 deletions BLAZAM/Pages/Groups/ViewGroup.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@



<EditForm Model="Group">


<SetSubHeader>
<DirectoryEntryViewHeader EditMode="@EditMode"
DirectoryEntry="@Group"
OnAssignTo="@(()=>{AssignToModal?.Show();})"
OnChangeThumbnail="@(()=>{UploadThumbnailModal?.Show();})"
OnDelete="@DeleteGroup"
OnMove="@(()=>{MoveToModal?.Show();})"
OnRename="@(()=>{RenameModal?.Show();})"
OnResetPassword="@(()=>{ChangePasswordModal?.Show();})"
OnShowHistory="@(()=>{ChangeHistoryModal?.Show();})"
OnToggleEditMode="@ToggleEditMode" />
<MudOverlay Visible="SavingChanges" DarkBackground="false" Absolute="true" />
</SetSubHeader>

<CascadingValue Value="EditMode">


<AppModal Title=@AppLocalization["Assign To"] @ref=@AssignToModal>
<AssignToModalContent OnGroupMembershipChange=@((change)=>{AssignToModal?.Hide(); InvokeAsync(StateHasChanged);}) DirectoryModel="Group" />
</AppModal>
<AppModal Title=@AppLocalization["Add Members"] @ref=@AssignMemberModal>
<AddMemberModalContent ModelChanged=@((change)=>{AssignMemberModal?.Hide();InvokeAsync(StateHasChanged);}) Group="Group" />
</AppModal>
<AppModal Title=@AppLocalization["Move To"] @ref=@MoveToModal>
@if (MoveToModal?.IsShown == true)
<EditForm Model="Group">


<SetSubHeader>
<DirectoryEntryViewHeader EditMode="@EditMode"
DirectoryEntry="@Group"
OnAssignTo="@(()=>{AssignToModal?.Show();})"
OnChangeThumbnail="@(()=>{UploadThumbnailModal?.Show();})"
OnDelete="@DeleteGroup"
OnMove="@(()=>{MoveToModal?.Show();})"
OnRename="@(()=>{RenameModal?.Show();})"
OnResetPassword="@(()=>{ChangePasswordModal?.Show();})"
OnShowHistory="@(()=>{ChangeHistoryModal?.Show();})"
OnToggleEditMode="@ToggleEditMode" />
<MudOverlay Visible="SavingChanges" DarkBackground="false" Absolute="true" />
</SetSubHeader>

<CascadingValue Value="EditMode">


<AppModal Title=@AppLocalization["Assign To"] @ref=@AssignToModal>
<AssignToModalContent OnGroupMembershipChange=@((change)=>{AssignToModal?.Hide(); InvokeAsync(StateHasChanged);}) DirectoryModel="Group" />
</AppModal>
<AppModal Title=@AppLocalization["Add Members"] @ref=@AssignMemberModal>
<AddMemberModalContent ModelChanged=@((change)=>{AssignMemberModal?.Hide();InvokeAsync(StateHasChanged);}) Group="Group" />
</AppModal>
<AppModal Title=@AppLocalization["Move To"] @ref=@MoveToModal>
@if (MoveToModal?.IsShown == true)
{
<MoveToOUModalContent DirectoryModel="Group" />
}
Expand All @@ -46,59 +46,61 @@
</AppModal>





<MudGrid>
<MudItem xs="12" md="6">
<Section Style="min-height:200px;" Title="Group Details">
<MudTextField Label="@AppLocalization["Group Name"]" @bind-Value="@Group.CanonicalName" Disabled />

<MudTextField Label="@AppLocalization["Account Name"]" @bind-Value="@Group.SamAccountName" Disabled />
<MudTextField Label="@AppLocalization["Account Name"]" @bind-Value="@Group.SamAccountName" Disabled />

<MudTextField Label="@AppLocalization["Description"]" @bind-Value="@Group.Description" Disabled />

<MudTextField Label="@AppLocalization["Email Address"]" @bind-Value="@Group.Email" Disabled=@(!EditMode || !Group.CanEditField(ActiveDirectoryFields.Mail)) />

<MudStack Row=true>
<MudText Typo="Typo.subtitle2">@AppLocalization["Created"]:</MudText>
<MudSpacer />
<DateWithTimeTooltip DateTime="Group?.Created" />
<MudTextField Label="@AppLocalization["Email Address"]" @bind-Value="@Group.Email" Disabled=@(!EditMode || !Group.CanEditField(ActiveDirectoryFields.Mail)) />

</MudStack>
<MudStack Row=true>
<MudText Typo="Typo.subtitle2">@AppLocalization["Created"]:</MudText>
<MudSpacer />
<DateWithTimeTooltip DateTime="Group?.Created" />

<MudStack Row=true>
</MudStack>

<MudText Typo="Typo.subtitle2">@AppLocalization["Last Change"]:</MudText>
<MudSpacer />
<MudStack Row=true>

<DateWithTimeTooltip DateTime="Group?.LastChanged" />
<MudText Typo="Typo.subtitle2">@AppLocalization["Last Change"]:</MudText>
<MudSpacer />

</MudStack>
<DateWithTimeTooltip DateTime="Group?.LastChanged" />

</MudStack>

<MudStack Row=true>
<MudText Typo="Typo.subtitle2">@AppLocalization["OU"]:</MudText>
<MudSpacer />

<MudText Style="text-align:end;" Typo="Typo.caption">@Group.OU.ToPrettyOu()</MudText>
</MudStack>
<MudStack Row=true>
<MudText Typo="Typo.subtitle2">@AppLocalization["OU"]:</MudText>
<MudSpacer />

<MudText Style="text-align:end;" Typo="Typo.caption">@Group.OU.ToPrettyOu()</MudText>
</MudStack>

</Section>
</MudItem>
<MudItem xs="12" md="6">
<Section Style="min-height:200px;" Title=@AppLocalization["Parent Groups"]>
<MemberOfList Model="Group" />

</Section>
</MudItem>
<MudItem xs="12" md="12">
<Section Style="min-height:200px;" Title=@AppLocalization["Members"]>
<GroupMembersDataGrid Group="Group" />
</Section>
</MudItem>
<MudItem xs="12" md="6">
<Section Style="min-height:200px;" Title=@AppLocalization["Parent Groups"]>
<MemberOfList Model="Group" />

</Section>
</MudItem>
<MudItem xs="12" md="12">
<Section Style="min-height:200px;" Title=@AppLocalization["Members"]>
<GroupMembersDataGrid Group="Group" />

</Section>
</MudItem>
</MudGrid>
</Section>
</MudItem>
</MudGrid>



Expand All @@ -112,7 +114,7 @@



@if (Group.CanEdit && Group.HasUnsavedChanges)
@if (Group.CanEdit && Group.HasUnsavedChanges)
{
<UnsavedChangesPrompt SaveChanges="SaveChanges" DiscardChanges="DiscardChanges" />
}
Expand Down

0 comments on commit fd181d3

Please sign in to comment.