Skip to content

Commit

Permalink
CHANGED: Reordered project overview elements for only one bridgehead
Browse files Browse the repository at this point in the history
  • Loading branch information
djuarezgf committed Jan 20, 2025
1 parent 662b26c commit 521c000
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/components/ProjectFieldRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ export default class ProjectFieldRow extends Vue {
<div class="config-box-body">
<div v-if="configurations" style="display: flex;flex-direction: column">
<div style="margin-bottom:2%;text-align:left;min-height:200px">{{ configurations?.get(step)?.description }}</div>
<div v-if="!configurations?.get(step).customConfig" style="text-align: right;margin-bottom:2%">
<div v-if="!configurations?.get(step)?.customConfig" style="text-align: right;margin-bottom:2%">
<button @click.stop="showDetails[index]=!showDetails[index]" style="background: none; border:none; color: #007bff;">
<span v-if="!showDetails[index]">show details</span>
<span v-if="showDetails[index]">hide details</span>
Expand Down Expand Up @@ -490,7 +490,7 @@ export default class ProjectFieldRow extends Vue {
<td style="min-width: 50px;vertical-align: middle">
<span style="display:flex; flex-flow:row; align-items: baseline">
<div style="display:inline-flex; flex-flow:row; align-items: baseline">
<button v-if="isFieldValueEditable() && (redirectUrl === null || isBridgeheads())" class="btn btn-primary"
<button v-if="isFieldValueEditable() && (redirectUrl === null || redirectUrl === undefined || isBridgeheads())" class="btn btn-primary"
data-toggle="tooltip"
data-placement="top" title="Edit"
style="background:none; border:none; color:black"><i class="bi bi-pencil me-2" @click="editField"></i>
Expand All @@ -499,7 +499,7 @@ export default class ProjectFieldRow extends Vue {
:project-manager-backend-service="projectManagerBackendService"
:module="downloadModule" :action="downloadAction"/>
</div>
<button v-if="isFieldValueEditable() && redirectUrl !== null" class="btn btn-primary"
<button v-if="isFieldValueEditable() && redirectUrl !== null && redirectUrl !== undefined" class="btn btn-primary"
data-toggle="tooltip"
data-placement="top" title="CCP Explorer"
style="background:none; border:none; color:black"><i class="bi bi-arrow-right-circle" @click="redirectToURL"></i>
Expand Down
18 changes: 10 additions & 8 deletions src/components/ProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@
<thead>
<tr>
<th class="status-table-header" scope="col">Data Request Number (DRN)</th>
<th v-if="visibleBridgeheads?.length == 1" class="status-table-header" scope="col">User Access</th>
<th v-if="visibleBridgeheads?.length == 1" class="status-table-header" scope="col">Teiler</th>
<th v-if="visibleBridgeheads?.length == 1 && currentUser" class="status-table-header" scope="col">{{(project?.type == 'DATASHIELD' && project.state != 'FINAL') ? 'Script' : 'Results'}} Acceptance</th>
<th v-if="visibleBridgeheads?.length == 1" class="status-table-header" scope="col">User Access</th>
<th class="status-table-header" v-if="visibleBridgeheads?.length == 1 && dataShieldStatus" scope="col">DataSHIELD Status</th>
<th class="status-table-header"
v-if="visibleBridgeheads?.length == 1 && (project?.type == 'RESEARCH_ENVIRONMENT')" scope="col">Files in Research Environment
</th>
<th v-if="visibleBridgeheads?.length == 1 && currentUser" class="status-table-header" scope="col">{{(project?.type == 'DATASHIELD' && project.state != 'FINAL') ? 'Script' : 'Results'}} Acceptance</th>
<th v-if="visibleBridgeheads?.length == 1" class="status-table-header" scope="col">Creator Results Acceptance</th>
<th class="status-table-header" scope="col">Creator</th>
<th class="status-table-header" scope="col">Created at</th>
<th class="status-table-header" scope="col">Expires at</th>
Expand All @@ -59,13 +60,12 @@
<tbody>
<tr>
<td>{{ project ? project.code : '' }}</td>
<td v-if="visibleBridgeheads?.length == 1 && activeBridgehead"><div class="state_circle" :class="activeBridgehead?.state?.toLowerCase()" data-toggle="tooltip" data-placement="top" :title="activeBridgehead?.state ?? undefined"></div></td>
<td v-if="visibleBridgeheads?.length == 1 && activeBridgehead"><div class="state_circle" :class="activeBridgehead?.queryState?.toLowerCase()" data-toggle="tooltip" data-placement="top" :title="activeBridgehead?.queryState ?? undefined"></div></td>
<td v-if="visibleBridgeheads?.length == 1 && activeBridgehead && currentUser"><div class="state_circle" :class="currentUser?.projectState.toLowerCase()" data-toggle="tooltip" data-placement="top" :title="currentUser.projectState"></div></td>
<td v-if="visibleBridgeheads?.length == 1 && activeBridgehead"><div class="state_circle" :class="activeBridgehead?.state?.toLowerCase()" data-toggle="tooltip" data-placement="top" :title="activeBridgehead?.state ?? undefined"></div></td>
<td v-if="visibleBridgeheads?.length == 1 && dataShieldStatus"><div class="state_circle" :class="dataShieldStatus?.project_status.toLowerCase()" data-toggle="tooltip" data-placement="top" :title="dataShieldStatus?.project_status"></div></td>
<td v-if="visibleBridgeheads?.length == 1 && (project?.type == 'RESEARCH_ENVIRONMENT')">
{{ areExportFilesTransferredToResearchEnvironment }}
</td>
<td v-if="visibleBridgeheads?.length == 1 && (project?.type == 'RESEARCH_ENVIRONMENT')">{{ areExportFilesTransferredToResearchEnvironment }}</td>
<td v-if="visibleBridgeheads?.length == 1 && activeBridgehead && currentUser"><div class="state_circle" :class="currentUser?.projectState.toLowerCase()" data-toggle="tooltip" data-placement="top" :title="currentUser.projectState"></div></td>
<td v-if="visibleBridgeheads?.length == 1 && activeBridgehead"><div class="state_circle" :class="creatorAcceptance.toLowerCase()" data-toggle="tooltip" data-placement="top" :title="creatorAcceptance ?? undefined"></div></td>
<td style="display:flex;">
<UserAndEmail
:first-name="project?.creatorName"
Expand Down Expand Up @@ -423,13 +423,15 @@ export default defineComponent({
hasProjectAllMandatoryFields: false,
tooltipTextForCreateButton: '',
canShowBridgeheadAdminButtons: false,
currentUsers: [] as User[]
currentUsers: [] as User[],
creatorAcceptance: 'CREATED'
};
},
watch: {
activeBridgehead(newValue, oldValue) {
this.activeBridgeheadIndex = this.visibleBridgeheads.findIndex(bridgehead => bridgehead === newValue);
this.context = new ProjectManagerContext(this.projectCode, newValue);
this.creatorAcceptance = (this.project?.creatorState) ? this.project.creatorState : (this.activeBridgehead?.creatorState) ? this.activeBridgehead.creatorState : 'CREATED';
},
context(newValue, oldValue) {
this.projectManagerBackendService = new ProjectManagerBackendService(newValue, Site.PROJECT_VIEW_SITE);
Expand Down

0 comments on commit 521c000

Please sign in to comment.