Skip to content

Commit

Permalink
Merge pull request #210 from uw-it-aca/task/move-msgs
Browse files Browse the repository at this point in the history
Move persistent msgs into nav message comp.
  • Loading branch information
charlon authored Jun 16, 2023
2 parents d2fd0c0 + d655f92 commit 722f913
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 32 deletions.
41 changes: 20 additions & 21 deletions compass_vue/components/nav-message.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
<template>
<div class="text-light">
<p
v-show="$route.path == '/'"
class="text-light-gray bg-dark-purple rounded-3 p-3 small"
>
Welcome to <strong>check-ins</strong>. View upcoming student appointments.
</p>

<p
v-show="$route.path.includes('/caseload')"
class="text-light-gray bg-dark-purple rounded-3 p-3 small"
>
Welcome to <strong>caseloads</strong>. View all students in your current
caseload.
</p>
<p
v-show="$route.path == '/settings'"
class="text-light-gray bg-dark-purple rounded-3 p-3 small"
>
Welcome to <strong>settings</strong>. Manage your teams form options.
</p>
<div class="text-light my-3">
<div class="text-light-gray bg-dark-purple rounded-3 p-3 small">
<div class="mb-2">
<i class="bi bi-exclamation-triangle-fill me-2"></i>System Messages
</div>
<ul class="list-unstyled m-0">
<li
v-for="(msg, index) in messages"
:key="index"
v-html="msg"
class="mt-2"
></li>
</ul>
</div>
</div>
</template>

<script>
export default {
props: {
messages: {
type: Object,
required: true,
},
},
data() {
return {};
},
Expand Down
12 changes: 1 addition & 11 deletions compass_vue/layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,9 @@
</template>
<template #aside>
<QuarterWeek :term-data="termData" />
<NavMessage />
<NavMessage v-if="persMsg && persMsg.length > 0" :messages="persMsg" />
</template>
<template #main>
<div
v-if="persMsg && persMsg.length > 0"
class="sticky-top alert alert-purple mt-3 border-0 small"
role="alert"
>
<ul class="list-unstyled m-0">
<li v-for="(msg, index) in persMsg" :key="index" v-html="msg"></li>
</ul>
</div>

<slot name="title">
<h1 class="visually-hidden">{{ pageTitle }}</h1>
</slot>
Expand Down

0 comments on commit 722f913

Please sign in to comment.