From 668ce57fe715dffd55211d8d61c2a5ca83c15323 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 12 Dec 2018 21:15:33 -0600 Subject: [PATCH] hide the option to create a daily event on the fly for non supervisory users --- web/src/scans/Scanner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/scans/Scanner.js b/web/src/scans/Scanner.js index 11800b94..3c7791f9 100644 --- a/web/src/scans/Scanner.js +++ b/web/src/scans/Scanner.js @@ -22,6 +22,7 @@ import { CHECKIN_SERVICE_ID } from '../constants'; import { isMobileAttached, initiateMobileScan } from '../mobile'; import { withContext } from '../shared/ContextProvider'; import { getScanResult } from './scannerUtil'; +import { userCanView } from '../util'; import ServiceList from '../services/ServiceList'; import ScannerMenu from './ScannerMenu'; import ScanDisplay from './ScanDisplay'; @@ -294,7 +295,7 @@ class Scanner extends Component { let dailyEvent = this.getDailyEvent(); let dailyEventExists = events.find(e => e.name === dailyEvent.name); - if (dailyEventExists === undefined) { + if (dailyEventExists === undefined && userCanView()) { events = events.concat(dailyEvent); }