Skip to content

Commit

Permalink
LIMS-1286: Show ERA status on calendar and visits list (#834)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Williams <[email protected]>
  • Loading branch information
ndg63276 and Mark Williams authored Oct 1, 2024
1 parent 98b6d45 commit d09aa59
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions api/src/Page/Proposal.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ function _get_visits($visit = null, $output = true)
s.beamlineoperator AS lc,
s.comments,
s.scheduled,
s.riskrating,
st.typename AS sessiontype,
DATE_FORMAT(s.startdate, '%d-%m-%Y %H:%i') AS startdate,
DATE_FORMAT(s.enddate, '%d-%m-%Y %H:%i') AS enddate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
class="tw-no-underline tw-text-content-page-color"
>
{{ session['VISIT'] }}
</router-link> <span> ({{ session['LEN'] }})</span>
</router-link>
<span v-if="session['RISKRATING'] == 'Low'" title="Risk Rating: Low">&#128994;</span>
<span v-else-if="session['RISKRATING'] == 'Medium'" title="Risk Rating: Medium">&#128993;</span>
<span v-else-if="session['RISKRATING'] == 'High'" title="Risk Rating: High">&#128308;</span>
<span v-else title="No approved ERA">&#9899;</span>
<span> ({{ session['LEN'] }})</span>
</p>
<p class="tw-ml-2">
- {{ session['BEAMLINEOPERATOR'] }}
Expand Down Expand Up @@ -105,4 +110,4 @@ export default {
}
}
</script>
<style></style>
<style></style>
9 changes: 8 additions & 1 deletion client/src/js/modules/visits/views/visit_list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@
<a v-if="value.key == 'LINKS' && visit.DCCOUNT>0" class="button button-notext" title="View Statistics" id="STATS"><i class="fa fa-pie-chart"></i></a>
<a v-if="value.key == 'LINKS' && visit.DCCOUNT>0" class="button button-notext" title="Download PDF Report" id="PDF"><i class="fa fa-list"></i></a>
<a v-if="value.key == 'LINKS' && visit.DCCOUNT>0" class="button button-notext" title="Export Data Collections to CSV" id="CSV"><i class="fa fa-file-o"></i></a>

<span v-if="value.key == 'ERA' && visit.RISKRATING == 'Low'" title="Risk Rating: Low">&#128994;</span>
<span v-else-if="value.key == 'ERA' && visit.RISKRATING == 'Medium'" title="Risk Rating: Medium">&#128993;</span>
<span v-else-if="value.key == 'ERA' && visit.RISKRATING == 'High'" title="Risk Rating: High">&#128308;</span>
<span v-else-if="value.key == 'ERA'" title="No approved ERA">&#9899;</span>
<div data-testid="visit-table-archived" v-if="value.key == 'ARCHIVED' && visit.ARCHIVED == 1">
<i class="fa fa-archive r" :title="'The raw data from this visit have been '+ isArchived + '. You can no longer reprocess data or view full sized diffraction images.'"></i>
</div>
Expand Down Expand Up @@ -134,6 +137,10 @@ export default {
key: "BEAMLINENAME",
title: 'Beamline'
},
{
key: "ERA",
title: 'ERA'
},
{
key: "DEWARS",
title: 'Dewar(s)'
Expand Down

0 comments on commit d09aa59

Please sign in to comment.