-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored components that inherit from selected data item base class
- Loading branch information
Showing
31 changed files
with
333 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
COMETwebapp/Components/Common/DataItemDetailsComponent.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!------------------------------------------------------------------------------ | ||
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 http://www.gnu.org/licenses/. | ||
-------------------------------------------------------------------------------> | ||
|
||
@namespace COMETwebapp.Components.Common | ||
|
||
<div class="data-item-details-section"> | ||
@if (this.IsSelected) | ||
{ | ||
@this.ChildContent | ||
} | ||
else | ||
{ | ||
<h5>Select an item to view or edit</h5> | ||
<img src="images/comet-logo-black.png" class="data-item-details-image" alt="Comet Web"/> | ||
} | ||
</div> | ||
|
46 changes: 46 additions & 0 deletions
46
COMETwebapp/Components/Common/DataItemDetailsComponent.razor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright file="DataItemDetailsComponent.razor.cs" company="RHEA System S.A."> | ||
// 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 <http://www.gnu.org/licenses/>. | ||
// </copyright> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
namespace COMETwebapp.Components.Common | ||
{ | ||
using Microsoft.AspNetCore.Components; | ||
|
||
/// <summary> | ||
/// The <see cref="DataItemDetailsComponent" /> is used to display the details of a selected data item | ||
/// </summary> | ||
public partial class DataItemDetailsComponent | ||
{ | ||
/// <summary> | ||
/// Value asserting that the <see cref="DataItemDetailsComponent" /> is selected or not | ||
/// </summary> | ||
[Parameter] | ||
public bool IsSelected { get; set; } | ||
|
||
/// <summary> | ||
/// The child content of the component | ||
/// </summary> | ||
[Parameter] | ||
public RenderFragment ChildContent { get; set; } | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
COMETwebapp/Components/Common/DataItemDetailsComponent.razor.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.data-item-details-section { | ||
width: 50%; | ||
padding: 30px; | ||
} | ||
|
||
.data-item-details-image { | ||
margin: auto; | ||
display: block; | ||
width: 300px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
COMETwebapp/Components/SiteDirectory/DomainsOfExpertiseForm.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!------------------------------------------------------------------------------ | ||
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 http://www.gnu.org/licenses/. | ||
-------------------------------------------------------------------------------> | ||
@inherits SelectedDataItemForm | ||
|
||
<EditForm Context="editFormContext" Model="@(this.ViewModel.Thing)" OnValidSubmit="@(this.OnValidSubmit)"> | ||
<FluentValidationValidator /> | ||
<DxFormLayout CssClass="w-100"> | ||
<DxFormLayoutItem Caption="Shortname:" ColSpanMd="10"> | ||
<DxTextBox @bind-Text="@this.ViewModel.Thing.ShortName"/> | ||
</DxFormLayoutItem> | ||
<DxFormLayoutItem Caption="Name:" ColSpanMd="10"> | ||
<DxTextBox @bind-Text="@this.ViewModel.Thing.Name"/> | ||
</DxFormLayoutItem> | ||
<DxFormLayoutItem Caption="Deprecated:" ColSpanMd="6"> | ||
<DxCheckBox @bind-Checked="@this.ViewModel.Thing.IsDeprecated"/> | ||
</DxFormLayoutItem> | ||
</DxFormLayout> | ||
<div class="pt-3"></div> | ||
<ValidationSummary /> | ||
<div class="dxbl-grid-edit-form-buttons"> | ||
<DxButton Id="saveCommonFileStoreButton" | ||
SubmitFormOnClick="true"> | ||
Save | ||
</DxButton> | ||
|
||
<DxButton Id="cancelCommonFileStoreButton" | ||
Click="@(() => this.OnCancel())" | ||
RenderStyle="ButtonRenderStyle.Secondary"> | ||
Cancel | ||
</DxButton> | ||
</div> | ||
</EditForm> |
Oops, something went wrong.