Skip to content

Commit a3907ef

Browse files
committed
Display message for eBIC shipments if they try to access shipments
1 parent 067acb5 commit a3907ef

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

client/src/js/modules/shipment/views/shipments.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ define(['marionette',
4040

4141
return Marionette.LayoutView.extend({
4242
className: 'content',
43-
template: '<div><h1>Shipments</h1><p class="help">This page shows a list of shipments associated with the currently selected proposal</p><p class="help">In order to register your samples you need to create a shipment. Shipments contain dewars, dewars contain containers, and containers individual samples. These can be created sequentially by viewing a particular shipment</p><div class="ra"><a class="button add" href="/shipments/add" data-testid="add-shipment-button"><i class="fa fa-plus"></i> Add Shipment</a></div><div class="wrapper"></div></div>',
43+
template: '<div><h1>Shipments</h1><div id="ebic-banner" class="tw-hidden tw-my-4 tw-p-4 tw-bg-content-active tw-rounded tw-flex tw-justify-between"> <p class="tw-text-md"> eBIC is switching to SCAUP for shipments. <a id="ebic-link" href="">Click here to select a session and create a new shipment.</a></p></div><p class="help">This page shows a list of shipments associated with the currently selected proposal</p><p class="help">In order to register your samples you need to create a shipment. Shipments contain dewars, dewars contain containers, and containers individual samples. These can be created sequentially by viewing a particular shipment</p><div class="ra"><a class="button add" href="/shipments/add" data-testid="add-shipment-button"><i class="fa fa-plus"></i> Add Shipment</a></div><div class="wrapper"></div></div>',
4444
regions: { 'wrap': '.wrapper' },
4545
ui: {
4646
add: 'a.add',
47+
ebicBanner: 'div#ebic-banner',
48+
ebicLink: 'a#ebic-link'
4749
},
4850

4951
initialize: function(options) {
@@ -70,6 +72,11 @@ define(['marionette',
7072
onRender: function() {
7173
if (app.proposal && app.proposal.get('ACTIVE') != 1) this.ui.add.hide()
7274

75+
if (app.proposal.get("TYPES").includes("em")) {
76+
this.ui.add.hide();
77+
this.ui.ebicBanner.show();
78+
this.ui.ebicLink.prop("href", `${app.options.get("redirects").em }/proposals/${app.proposal.get("PROPOSAL")}`);
79+
}
7380
this.wrap.show(this.table)
7481
}
7582
})

0 commit comments

Comments
 (0)