Skip to content

Commit

Permalink
hide the option to create a daily event on the fly for non supervisor…
Browse files Browse the repository at this point in the history
…y users
  • Loading branch information
jpdillingham committed Dec 13, 2018
1 parent 63da0a0 commit 668ce57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/scans/Scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 668ce57

Please sign in to comment.