From 6621c6d56ba31464f7581f0865ce21e9fe8435a0 Mon Sep 17 00:00:00 2001 From: Joao Rua Date: Thu, 4 Apr 2024 11:37:15 +0100 Subject: [PATCH] before details components --- .../EngineeringModelsTable.razor | 4 +- .../Roles/ParticipantRoleDetails.razor | 45 ++++++++ .../Roles/ParticipantRoleDetails.razor.cs | 50 ++++++++ .../Roles/ParticipantRolesTable.razor | 97 ++++++++++++++++ .../Roles/ParticipantRolesTable.razor.cs | 107 ++++++++++++++++++ .../Extensions/ServiceCollectionExtensions.cs | 3 + .../SiteDirectory/DirectoryPage.razor.cs | 2 + .../Roles/IParticipantRolesTableViewModel.cs | 50 ++++++++ .../Roles/IPersonRolesTableViewModel.cs | 44 +++++++ .../Roles/ParticipantRolesTableViewModel.cs | 88 ++++++++++++++ .../Roles/PersonRolesTableViewModel.cs | 77 +++++++++++++ .../Rows/ParticipantRoleRowViewModel.cs | 44 +++++++ .../Rows/PersonRoleRowViewModel.cs | 44 +++++++ COMETwebapp/_Imports.razor | 3 + COMETwebapp/wwwroot/css/app.css | 2 + 15 files changed, 657 insertions(+), 3 deletions(-) create mode 100644 COMETwebapp/Components/SiteDirectory/Roles/ParticipantRoleDetails.razor create mode 100644 COMETwebapp/Components/SiteDirectory/Roles/ParticipantRoleDetails.razor.cs create mode 100644 COMETwebapp/Components/SiteDirectory/Roles/ParticipantRolesTable.razor create mode 100644 COMETwebapp/Components/SiteDirectory/Roles/ParticipantRolesTable.razor.cs create mode 100644 COMETwebapp/ViewModels/Components/SiteDirectory/Roles/IParticipantRolesTableViewModel.cs create mode 100644 COMETwebapp/ViewModels/Components/SiteDirectory/Roles/IPersonRolesTableViewModel.cs create mode 100644 COMETwebapp/ViewModels/Components/SiteDirectory/Roles/ParticipantRolesTableViewModel.cs create mode 100644 COMETwebapp/ViewModels/Components/SiteDirectory/Roles/PersonRolesTableViewModel.cs create mode 100644 COMETwebapp/ViewModels/Components/SiteDirectory/Rows/ParticipantRoleRowViewModel.cs create mode 100644 COMETwebapp/ViewModels/Components/SiteDirectory/Rows/PersonRoleRowViewModel.cs diff --git a/COMETwebapp/Components/SiteDirectory/EngineeringModel/EngineeringModelsTable.razor b/COMETwebapp/Components/SiteDirectory/EngineeringModel/EngineeringModelsTable.razor index 0f7890ca..40c62358 100644 --- a/COMETwebapp/Components/SiteDirectory/EngineeringModel/EngineeringModelsTable.razor +++ b/COMETwebapp/Components/SiteDirectory/EngineeringModel/EngineeringModelsTable.razor @@ -14,9 +14,7 @@ Copyright (c) 2023-2024 RHEA System S.A. You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/. -------------------------------------------------------------------------------> -@using COMETwebapp.ViewModels.Components.SiteDirectory.Rows -@using CDP4Common.SiteDirectoryData -@inherits COMETwebapp.Components.Common.SelectedDataItemBase +@inherits SelectedDataItemBase
diff --git a/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRoleDetails.razor b/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRoleDetails.razor new file mode 100644 index 00000000..17853652 --- /dev/null +++ b/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRoleDetails.razor @@ -0,0 +1,45 @@ + +@inherits DisposableComponent + + + + + + + + + + @foreach (var permission in this.ViewModel.Thing.ParticipantPermission.OrderBy(x => x.ObjectClass.ToString())) + { + + + + } + + + + @(this.ViewModel.PopupDialog) +
+ + +
+
\ No newline at end of file diff --git a/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRoleDetails.razor.cs b/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRoleDetails.razor.cs new file mode 100644 index 00000000..adff4453 --- /dev/null +++ b/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRoleDetails.razor.cs @@ -0,0 +1,50 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2023-2024 RHEA System S.A. +// +// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Théate Antoine, João Rua +// +// This file is part of CDP4-COMET WEB Community Edition +// The CDP4-COMET WEB Community Edition is the RHEA Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. +// +// The CDP4-COMET WEB Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-COMET WEB Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace COMETwebapp.Components.SiteDirectory.Roles +{ + using COMET.Web.Common.Components; + + using COMETwebapp.ViewModels.Components.SiteDirectory.Roles; + + using Microsoft.AspNetCore.Components; + + /// + /// Support class for the + /// + public partial class ParticipantRoleDetails : DisposableComponent + { + /// + /// The for this component + /// + [Parameter] + public IParticipantRolesTableViewModel ViewModel { get; set; } + + /// + /// Gets or sets the value to check if the deprecatable option should be shown + /// + [Parameter] + public bool ShowDeprecatableOption { get; set; } + } +} diff --git a/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRolesTable.razor b/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRolesTable.razor new file mode 100644 index 00000000..a275d744 --- /dev/null +++ b/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRolesTable.razor @@ -0,0 +1,97 @@ + +@inherits SelectedDeprecatableDataItemBase + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + @foreach (var permission in this.ViewModel.Thing.ParticipantPermission.OrderBy(x => x.ObjectClass.ToString())) + { + + + + } + + + + + + + + + + + + +
+
+
+ + + @(this.ViewModel.PopupDialog) +
+ + +
+
\ No newline at end of file diff --git a/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRolesTable.razor.cs b/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRolesTable.razor.cs new file mode 100644 index 00000000..0bf07b8a --- /dev/null +++ b/COMETwebapp/Components/SiteDirectory/Roles/ParticipantRolesTable.razor.cs @@ -0,0 +1,107 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2023-2024 RHEA System S.A. +// +// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Théate Antoine, João Rua +// +// This file is part of CDP4-COMET WEB Community Edition +// The CDP4-COMET WEB Community Edition is the RHEA Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. +// +// The CDP4-COMET WEB Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-COMET WEB Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace COMETwebapp.Components.SiteDirectory.Roles +{ + using CDP4Common.SiteDirectoryData; + + using COMETwebapp.Components.Common; + using COMETwebapp.ViewModels.Components.SiteDirectory.Roles; + using COMETwebapp.ViewModels.Components.SiteDirectory.Rows; + + using DevExpress.Blazor; + + using Microsoft.AspNetCore.Components; + + /// + /// Support class for the + /// + public partial class ParticipantRolesTable : SelectedDeprecatableDataItemBase + { + /// + /// The for this component + /// + [Inject] + public IParticipantRolesTableViewModel ViewModel { get; set; } + + /// + /// Method invoked when the component is ready to start, having received its + /// initial parameters from its parent in the render tree. + /// + protected override void OnInitialized() + { + base.OnInitialized(); + this.Initialize(this.ViewModel); + } + + /// + /// Method that is invoked when the edit/add thing form is being saved + /// + /// A + protected override async Task OnEditThingSaving() + { + await this.ViewModel.CreateOrEditParticipantRole(this.ShouldCreateThing); + } + + /// + /// Method invoked when creating a new thing + /// + /// A + protected override void CustomizeEditThing(GridCustomizeEditModelEventArgs e) + { + base.CustomizeEditThing(e); + + var dataItem = (ParticipantRoleRowViewModel)e.DataItem; + this.ShouldCreateThing = e.IsNew; + + if (dataItem == null) + { + this.ViewModel.Thing = new ParticipantRole(); + e.EditModel = this.ViewModel.Thing; + return; + } + + this.ViewModel.Thing = dataItem.Thing.Clone(false); + e.EditModel = this.ViewModel.Thing; + } + + /// + /// Metgid invoked everytime a row is selected + /// + /// The selected row + private void OnSelectedDataItemChanged(ParticipantRoleRowViewModel row) + { + // do something + } + + /// + /// Sets the selected values for the creation and submits the form + /// + /// A + private async Task SetSelectedValuesAndSubmit() + { + await this.Grid.SaveChangesAsync(); + } + } +} diff --git a/COMETwebapp/Extensions/ServiceCollectionExtensions.cs b/COMETwebapp/Extensions/ServiceCollectionExtensions.cs index 34767dc4..a2515c37 100644 --- a/COMETwebapp/Extensions/ServiceCollectionExtensions.cs +++ b/COMETwebapp/Extensions/ServiceCollectionExtensions.cs @@ -42,6 +42,7 @@ namespace COMETwebapp.Extensions using COMETwebapp.ViewModels.Components.ReferenceData.ParameterTypes; using COMETwebapp.ViewModels.Components.SiteDirectory.EngineeringModels; using COMETwebapp.ViewModels.Components.SiteDirectory.Organizations; + using COMETwebapp.ViewModels.Components.SiteDirectory.Roles; using COMETwebapp.ViewModels.Components.SubscriptionDashboard; using COMETwebapp.ViewModels.Components.SystemRepresentation; using COMETwebapp.ViewModels.Components.UserManagement; @@ -100,6 +101,8 @@ public static void RegisterViewModels(this IServiceCollection serviceCollection) serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); + serviceCollection.AddTransient(); + serviceCollection.AddTransient(); } } } diff --git a/COMETwebapp/Pages/SiteDirectory/DirectoryPage.razor.cs b/COMETwebapp/Pages/SiteDirectory/DirectoryPage.razor.cs index d72f8c12..d7957100 100644 --- a/COMETwebapp/Pages/SiteDirectory/DirectoryPage.razor.cs +++ b/COMETwebapp/Pages/SiteDirectory/DirectoryPage.razor.cs @@ -26,6 +26,7 @@ namespace COMETwebapp.Pages.SiteDirectory { using COMETwebapp.Components.SiteDirectory; using COMETwebapp.Components.SiteDirectory.EngineeringModel; + using COMETwebapp.Components.SiteDirectory.Roles; using DevExpress.Blazor; @@ -49,6 +50,7 @@ public partial class DirectoryPage {typeof(EngineeringModelsTable), "Models"}, {typeof(DomainsOfExpertiseTable), "Domains"}, {typeof(OrganizationsTable), "Organizations"}, + {typeof(ParticipantRolesTable), "Roles"}, }; /// diff --git a/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/IParticipantRolesTableViewModel.cs b/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/IParticipantRolesTableViewModel.cs new file mode 100644 index 00000000..e1ca225b --- /dev/null +++ b/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/IParticipantRolesTableViewModel.cs @@ -0,0 +1,50 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2023-2024 RHEA System S.A. +// +// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Antoine Théate, João Rua +// +// This file is part of CDP4-COMET WEB Community Edition +// The CDP4-COMET WEB Community Edition is the RHEA Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. +// +// The CDP4-COMET WEB Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-COMET WEB Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace COMETwebapp.ViewModels.Components.SiteDirectory.Roles +{ + using CDP4Common.CommonData; + using CDP4Common.SiteDirectoryData; + + using COMETwebapp.ViewModels.Components.Common.DeprecatableDataItemTable; + using COMETwebapp.ViewModels.Components.SiteDirectory.Rows; + + /// + /// View model used to manage + /// + public interface IParticipantRolesTableViewModel : IDeprecatableDataItemTableViewModel + { + /// + /// Creates or edits a + /// + /// The value to check if a new should be created + /// A + Task CreateOrEditParticipantRole(bool shouldCreate); + + /// + /// Gets the participant permission access kinds + /// + IEnumerable ParticipantAccessKinds { get; } + } +} diff --git a/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/IPersonRolesTableViewModel.cs b/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/IPersonRolesTableViewModel.cs new file mode 100644 index 00000000..5f824073 --- /dev/null +++ b/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/IPersonRolesTableViewModel.cs @@ -0,0 +1,44 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2023-2024 RHEA System S.A. +// +// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Antoine Théate, João Rua +// +// This file is part of CDP4-COMET WEB Community Edition +// The CDP4-COMET WEB Community Edition is the RHEA Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. +// +// The CDP4-COMET WEB Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-COMET WEB Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace COMETwebapp.ViewModels.Components.SiteDirectory.Roles +{ + using CDP4Common.SiteDirectoryData; + + using COMETwebapp.ViewModels.Components.Common.DeprecatableDataItemTable; + using COMETwebapp.ViewModels.Components.SiteDirectory.Rows; + + /// + /// View model used to manage + /// + public interface IPersonRolesTableViewModel : IDeprecatableDataItemTableViewModel + { + /// + /// Creates or edits a + /// + /// The value to check if a new should be created + /// A + Task CreateOrEditPersonRole(bool shouldCreate); + } +} diff --git a/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/ParticipantRolesTableViewModel.cs b/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/ParticipantRolesTableViewModel.cs new file mode 100644 index 00000000..f436123d --- /dev/null +++ b/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/ParticipantRolesTableViewModel.cs @@ -0,0 +1,88 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2023-2024 RHEA System S.A. +// +// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Antoine Théate, João Rua +// +// This file is part of CDP4-COMET WEB Community Edition +// The CDP4-COMET WEB Community Edition is the RHEA Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. +// +// The CDP4-COMET WEB Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-COMET WEB Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace COMETwebapp.ViewModels.Components.SiteDirectory.Roles +{ + using CDP4Common.CommonData; + using CDP4Common.SiteDirectoryData; + + using CDP4Dal; + + using COMET.Web.Common.Services.SessionManagement; + + using COMETwebapp.Services.ShowHideDeprecatedThingsService; + using COMETwebapp.ViewModels.Components.Common.DeprecatableDataItemTable; + using COMETwebapp.ViewModels.Components.SiteDirectory.Rows; + + /// + /// View model used to manage + /// + public class ParticipantRolesTableViewModel : DeprecatableDataItemTableViewModel, IParticipantRolesTableViewModel + { + /// + /// Initializes a new instance of the class. + /// + /// The + /// The + /// The + /// The + public ParticipantRolesTableViewModel(ISessionService sessionService, IShowHideDeprecatedThingsService showHideDeprecatedThingsService, ICDPMessageBus messageBus, ILogger logger) + : base(sessionService, messageBus, showHideDeprecatedThingsService, logger) + { + this.Thing = new ParticipantRole(); + } + + /// + /// Gets the participant permission access kinds + /// + public IEnumerable ParticipantAccessKinds { get; private set; } = [ParticipantAccessRightKind.NONE, ParticipantAccessRightKind.MODIFY, ParticipantAccessRightKind.MODIFY_IF_OWNER, ParticipantAccessRightKind.READ]; + + /// + /// Creates or edits a + /// + /// The value to check if a new should be created + /// A + public async Task CreateOrEditParticipantRole(bool shouldCreate) + { + this.IsLoading = true; + + var siteDirectoryClone = this.SessionService.GetSiteDirectory().Clone(false); + var thingsToCreate = new List(); + + thingsToCreate.AddRange(this.Thing.ParticipantPermission); + + if (shouldCreate) + { + siteDirectoryClone.ParticipantRole.Add(this.Thing); + thingsToCreate.Add(siteDirectoryClone); + } + + thingsToCreate.Add(this.Thing); + await this.SessionService.UpdateThings(siteDirectoryClone, thingsToCreate); + await this.SessionService.RefreshSession(); + + this.IsLoading = false; + } + } +} diff --git a/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/PersonRolesTableViewModel.cs b/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/PersonRolesTableViewModel.cs new file mode 100644 index 00000000..12e26815 --- /dev/null +++ b/COMETwebapp/ViewModels/Components/SiteDirectory/Roles/PersonRolesTableViewModel.cs @@ -0,0 +1,77 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2023-2024 RHEA System S.A. +// +// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Antoine Théate, João Rua +// +// This file is part of CDP4-COMET WEB Community Edition +// The CDP4-COMET WEB Community Edition is the RHEA Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. +// +// The CDP4-COMET WEB Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-COMET WEB Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace COMETwebapp.ViewModels.Components.SiteDirectory.Roles +{ + using CDP4Common.CommonData; + using CDP4Common.SiteDirectoryData; + + using CDP4Dal; + + using COMET.Web.Common.Services.SessionManagement; + + using COMETwebapp.Services.ShowHideDeprecatedThingsService; + using COMETwebapp.ViewModels.Components.Common.DeprecatableDataItemTable; + using COMETwebapp.ViewModels.Components.SiteDirectory.Rows; + + /// + /// View model used to manage + /// + public class PersonRolesTableViewModel : DeprecatableDataItemTableViewModel, IPersonRolesTableViewModel + { + /// + /// Initializes a new instance of the class. + /// + /// The + /// The + /// The + /// The + public PersonRolesTableViewModel(ISessionService sessionService, IShowHideDeprecatedThingsService showHideDeprecatedThingsService, ICDPMessageBus messageBus, ILogger logger) + : base(sessionService, messageBus, showHideDeprecatedThingsService, logger) + { + this.Thing = new PersonRole(); + } + + /// + /// Creates or edits a + /// + /// The value to check if a new should be created + /// A + public async Task CreateOrEditPersonRole(bool shouldCreate) + { + var siteDirectoryClone = this.SessionService.GetSiteDirectory().Clone(false); + var thingsToCreate = new List(); + + if (shouldCreate) + { + siteDirectoryClone.PersonRole.Add(this.Thing); + thingsToCreate.Add(siteDirectoryClone); + } + + thingsToCreate.Add(this.Thing); + await this.SessionService.UpdateThings(siteDirectoryClone, thingsToCreate); + await this.SessionService.RefreshSession(); + } + } +} diff --git a/COMETwebapp/ViewModels/Components/SiteDirectory/Rows/ParticipantRoleRowViewModel.cs b/COMETwebapp/ViewModels/Components/SiteDirectory/Rows/ParticipantRoleRowViewModel.cs new file mode 100644 index 00000000..e7f61b2f --- /dev/null +++ b/COMETwebapp/ViewModels/Components/SiteDirectory/Rows/ParticipantRoleRowViewModel.cs @@ -0,0 +1,44 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2023-2024 RHEA System S.A. +// +// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Antoine Théate, João Rua +// +// This file is part of CDP4-COMET WEB Community Edition +// The CDP4-COMET WEB Community Edition is the RHEA Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. +// +// The CDP4-COMET WEB Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-COMET WEB Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace COMETwebapp.ViewModels.Components.SiteDirectory.Rows +{ + using CDP4Common.SiteDirectoryData; + + using COMETwebapp.ViewModels.Components.Common.Rows; + + /// + /// Row View Model for + /// + public class ParticipantRoleRowViewModel : DeprecatableDataItemRowViewModel + { + /// + /// Initializes a new instance of the class. + /// + /// The associated + public ParticipantRoleRowViewModel(ParticipantRole participantRole) : base(participantRole) + { + } + } +} diff --git a/COMETwebapp/ViewModels/Components/SiteDirectory/Rows/PersonRoleRowViewModel.cs b/COMETwebapp/ViewModels/Components/SiteDirectory/Rows/PersonRoleRowViewModel.cs new file mode 100644 index 00000000..f2e37461 --- /dev/null +++ b/COMETwebapp/ViewModels/Components/SiteDirectory/Rows/PersonRoleRowViewModel.cs @@ -0,0 +1,44 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2023-2024 RHEA System S.A. +// +// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Antoine Théate, João Rua +// +// This file is part of CDP4-COMET WEB Community Edition +// The CDP4-COMET WEB Community Edition is the RHEA Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. +// +// The CDP4-COMET WEB Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-COMET WEB Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace COMETwebapp.ViewModels.Components.SiteDirectory.Rows +{ + using CDP4Common.SiteDirectoryData; + + using COMETwebapp.ViewModels.Components.Common.Rows; + + /// + /// Row View Model for + /// + public class PersonRoleRowViewModel : DeprecatableDataItemRowViewModel + { + /// + /// Initializes a new instance of the class. + /// + /// The associated + public PersonRoleRowViewModel(PersonRole personRole) : base(personRole) + { + } + } +} diff --git a/COMETwebapp/_Imports.razor b/COMETwebapp/_Imports.razor index c9a3bc5f..bac4b4fa 100644 --- a/COMETwebapp/_Imports.razor +++ b/COMETwebapp/_Imports.razor @@ -14,9 +14,11 @@ @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.AspNetCore.Components.Authorization @using Microsoft.JSInterop +@using CDP4Common.SiteDirectoryData @using COMETwebapp @using COMETwebapp.Pages @using COMETwebapp.Components +@using COMETwebapp.Components.Common @using COMETwebapp.Components.Shared @using COMETwebapp.Components.ModelDashboard @using COMETwebapp.Components.SubscriptionDashboard @@ -27,6 +29,7 @@ @using COMETwebapp.Components.UserManagement @using COMETwebapp.Components.SystemRepresentation @using COMETwebapp.Components.Viewer.PropertiesPanel +@using COMETwebapp.ViewModels.Components.SiteDirectory.Rows @using BlazorStrap @using DevExpress.Blazor @using COMET.Web.Common.Components diff --git a/COMETwebapp/wwwroot/css/app.css b/COMETwebapp/wwwroot/css/app.css index da42c40a..7da9147d 100644 --- a/COMETwebapp/wwwroot/css/app.css +++ b/COMETwebapp/wwwroot/css/app.css @@ -99,6 +99,8 @@ html, body, #app { .m-right-10px { margin-right: 10px; } +.max-height-50vh { max-height: 50vh; } + @media (min-width: 721px) { .refresh-button-popover { display: none; } }