Reorganized assignment UI. Added searching by person.
This commit is contained in:
@@ -9,12 +9,14 @@
|
||||
import Admin from './Admin.svelte';
|
||||
import Announcer from './Announcer.svelte';
|
||||
import Assets from "./Assets.svelte";
|
||||
import Assignments from "/imports/ui/Assignments.svelte";
|
||||
|
||||
// When the URL changes, run the code... in this case to scroll to the top.
|
||||
router.subscribe(_ => window.scrollTo(0, 0));
|
||||
|
||||
let canManageLaptops = false;
|
||||
let isAdmin = false;
|
||||
let currentUser
|
||||
$: currentUser = useTracker(() => Meteor.user());
|
||||
|
||||
Tracker.autorun(() => {
|
||||
@@ -62,11 +64,10 @@
|
||||
<a href="/">Home</a>
|
||||
{#if canManageLaptops}
|
||||
<a href="/chromebooks">Chromebooks</a>
|
||||
{/if}
|
||||
{#if canManageLaptops}
|
||||
<a href="/assets">Assets</a>
|
||||
<a href="/assignments">Assignments</a>
|
||||
{/if}
|
||||
{#if isAdmin}
|
||||
<a href="/assets">Assets</a>
|
||||
<a href="/users">Users</a>
|
||||
<a href="/admin">Admin</a>
|
||||
{/if}
|
||||
@@ -81,8 +82,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</Route>
|
||||
<Route path="/assets">
|
||||
<Route path="/assignments">
|
||||
{#if canManageLaptops}
|
||||
<Assignments/>
|
||||
{/if}
|
||||
</Route>
|
||||
<Route path="/assets">
|
||||
{#if isAdmin}
|
||||
<Assets/>
|
||||
{/if}
|
||||
</Route>
|
||||
|
||||
Reference in New Issue
Block a user