Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cancelled and ineligble applications to application history view #439

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/.prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 200,
"trailingComma": "all",
"printWidth": 120,
"trailingComma": "none",
"endOfLine": "auto",
"htmlWhitespaceSensitivity": "ignore",
"bracketSameLine": true
Expand Down
19 changes: 11 additions & 8 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ export default [
js.configs.recommended,
eslintPluginPrettier,
{
ignores: ['dist/'],
ignores: ['dist/']
},
{
rules: {
semi: 'off',
'eol-last': ['error', 'always'],
indent: ['error', 2, { SwitchCase: 1 }],
indent: 'off', // Defer to Prettier
quotes: ['error', 'single', { avoidEscape: true }],
'no-unused-vars': ['error', { args: 'after-used', argsIgnorePattern: '^_', caughtErrors: 'all', caughtErrorsIgnorePattern: '^ignore' }],
'no-unused-vars': [
'error',
{ args: 'after-used', argsIgnorePattern: '^_', caughtErrors: 'all', caughtErrorsIgnorePattern: '^ignore' }
],
'vue/no-v-text-v-html-on-component': ['error', { allow: ['v-card-text'] }],
'vue/valid-v-slot': [
'error',
{
allowModifiers: true,
},
],
},
},
allowModifiers: true
}
]
}
}
]
2 changes: 1 addition & 1 deletion frontend/public/js/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ const config = {
BANNER_ENVIRONMENT: 'DEV',
BANNER_COLOR: '#8d28d7',
TDAD_CONTACT_EMAIL: '[email protected]',
IRREGULAR_EXPENSE_FORM_URL: 'https://www2.gov.bc.ca/assets/download/80DAA65E3FA44EFCA61F4557C6FAEE59',
IRREGULAR_EXPENSE_FORM_URL: 'https://www2.gov.bc.ca/assets/download/80DAA65E3FA44EFCA61F4557C6FAEE59'
}
6 changes: 3 additions & 3 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ export default {
TheEnvBar,
TheHeader,
TheSnackBar,
TheFooter,
TheFooter
},
methods: {
...mapActions(useAppStore, ['getLookupInfo']),
...mapActions(useAuthStore, ['getJwtToken']),
},
...mapActions(useAuthStore, ['getJwtToken'])
}
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/common/apiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const intercept = apiAxios.interceptors.response.use(
reject(e)
})
})
},
}
)

export default {
Expand All @@ -61,5 +61,5 @@ export default {
} else {
delete apiAxios.defaults.headers.common['Authorization']
}
},
}
}
4 changes: 2 additions & 2 deletions frontend/src/common/authService.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
async refreshAuthToken(token) {
try {
const response = await axios.post(AuthRoutes.REFRESH, {
refreshToken: token,
refreshToken: token
})

if (response.data.error) {
Expand All @@ -30,5 +30,5 @@ export default {
console.log(`Failed to refresh JWT token - ${e}`)
throw e
}
},
}
}
4 changes: 2 additions & 2 deletions frontend/src/components/TheEnvBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default {
data() {
return {
bannerEnvironment: StaticConfig.BANNER_ENVIRONMENT,
bannerColor: StaticConfig.BANNER_COLOR,
bannerColor: StaticConfig.BANNER_COLOR
}
},
}
}
</script>
<style scoped>
Expand Down
15 changes: 9 additions & 6 deletions frontend/src/components/TheFacilityHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<v-btn id="changeFacility" variant="text" v-bind="props">(change)</v-btn>
</template>
<v-list>
<v-list-item v-for="facility in userInfo.facilities" :key="facility.facilityId" @click="changeFacility(facility)">
<v-list-item
v-for="facility in userInfo.facilities"
:key="facility.facilityId"
@click="changeFacility(facility)">
<v-list-item-title>{{ facility.facilityName }}</v-list-item-title>
</v-list-item>
</v-list>
Expand All @@ -28,21 +31,21 @@ export default {
props: {
showFacility: {
type: Boolean,
default: true,
},
default: true
}
},
computed: {
...mapState(useAuthStore, ['isAuthenticated', 'userInfo']),
...mapWritableState(useAuthStore, ['currentFacility']),
borderClass() {
return this.$vuetify.display.xs || this.$vuetify.display.sm ? 'flex-start' : 'flex-end'
},
}
},
methods: {
changeFacility(facility) {
this.currentFacility = facility
},
},
}
}
}
</script>
<style scoped>
Expand Down
30 changes: 24 additions & 6 deletions frontend/src/components/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,38 @@
<v-row no-gutters class="territorial-row">
<v-col>
<p>
The B.C. Public Service acknowledges the territories of First Nations around B.C. and is grateful to carry out our work on these lands. We acknowledge the rights, interests, priorities,
and concerns of all Indigenous Peoples - First Nations, Métis, and Inuit - respecting and acknowledging their distinct cultures, histories, rights, laws, and governments.
The B.C. Public Service acknowledges the territories of First Nations around B.C. and is grateful to carry
out our work on these lands. We acknowledge the rights, interests, priorities, and concerns of all
Indigenous Peoples - First Nations, Métis, and Inuit - respecting and acknowledging their distinct cultures,
histories, rights, laws, and governments.
</p>
</v-col>
</v-row>
<v-row no-gutters>
<v-col class="d-flex flex-wrap justify-center">
<v-btn id="footer-home" variant="text" color="white" href="https://www.gov.bc.ca/">Home</v-btn>
<v-btn id="footer-about" variant="text" color="white" href="https://www2.gov.bc.ca/gov/content/about-gov-bc-ca">About gov.bc.ca</v-btn>
<v-btn id="footer-disclaimer" variant="text" color="white" href="http://gov.bc.ca/disclaimer">Disclaimer</v-btn>
<v-btn
id="footer-about"
variant="text"
color="white"
href="https://www2.gov.bc.ca/gov/content/about-gov-bc-ca">
About gov.bc.ca
</v-btn>
<v-btn id="footer-disclaimer" variant="text" color="white" href="http://gov.bc.ca/disclaimer">
Disclaimer
</v-btn>
<v-btn id="footer-privacy" variant="text" color="white" href="http://gov.bc.ca/privacy">Privacy</v-btn>
<v-btn id="footer-accessibility" variant="text" color="white" href="http://gov.bc.ca/webaccessibility">Accessibility</v-btn>
<v-btn id="footer-accessibility" variant="text" color="white" href="http://gov.bc.ca/webaccessibility">
Accessibility
</v-btn>
<v-btn id="footer-copyright" variant="text" color="white" href="http://gov.bc.ca/copyright">Copyright</v-btn>
<v-btn id="footer-contact" variant="text" color="white" href="https://www2.gov.bc.ca/gov/content/home/contact-us">Contact Us</v-btn>
<v-btn
id="footer-contact"
variant="text"
color="white"
href="https://www2.gov.bc.ca/gov/content/home/contact-us">
Contact Us
</v-btn>
</v-col>
</v-row>
</v-container>
Expand Down
47 changes: 37 additions & 10 deletions frontend/src/components/TheHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,33 @@
</v-row>
</v-row>
</v-col>
<v-col v-if="showMenu" cols="12" sm="6" md="5" lg="4" class="d-flex align-center justify-center justify-sm-end px-2 py-2 py-sm-3" :class="iconsClass">
<v-col
v-if="showMenu"
cols="12"
sm="6"
md="5"
lg="4"
class="d-flex align-center justify-center justify-sm-end px-2 py-2 py-sm-3"
:class="iconsClass">
<div>
<v-row class="align-center">
<v-col v-if="showMessagingIcon" style="width: 70px">
<div>
<v-btn v-if="!isNaN(messageNotificationCount)" id="mail_box_button" aria-label="Messages/Notifications" rounded @click="$router.push({ name: 'messaging' })">
<v-badge color="error" class="pt-0" :content="messageNotificationCount" bottom right overlap offset-x="8" offset-y="28">
<v-btn
v-if="!isNaN(messageNotificationCount)"
id="mail_box_button"
aria-label="Messages/Notifications"
rounded
@click="$router.push({ name: 'messaging' })">
<v-badge
color="error"
class="pt-0"
:content="messageNotificationCount"
bottom
right
overlap
offset-x="8"
offset-y="28">
<v-icon aria-hidden="false" icon="mdi-email-outline" size="40" color="white" />
</v-badge>
</v-btn>
Expand All @@ -47,7 +67,12 @@
</v-chip>
</template>
<v-list style="background-color: #003366; color: white">
<v-list-item v-if="isMinistryUser" id="impersonate_button" class="user-link" :to="{ name: 'impersonate' }" title="Impersonate" />
<v-list-item
v-if="isMinistryUser"
id="impersonate_button"
class="user-link"
:to="{ name: 'impersonate' }"
title="Impersonate" />
<v-list-item id="logout_button" class="user-link" :href="logoutPath" title="Log Out" />
</v-list>
</v-menu>
Expand Down Expand Up @@ -86,7 +111,9 @@ export default {
},
// count of requests that are unread or are in the status of “Action required”
actionRequiredAndUnreadMessageCount() {
const readActionRequiredMessagesCount = this.assistanceRequests?.filter((message) => message.status === 'Action required' && message.isRead)?.length
const readActionRequiredMessagesCount = this.assistanceRequests?.filter(
(message) => message.status === 'Action required' && message.isRead
)?.length
return this.unreadMessageCount + readActionRequiredMessagesCount
},
showMenu() {
Expand All @@ -100,15 +127,15 @@ export default {
},
iconsClass() {
return this.$vuetify.display.xs ? 'icons-border' : ''
},
}
},
watch: {
userInfo: {
handler(_value) {
this.loadUserInfo()
},
deep: true,
},
deep: true
}
},
methods: {
...mapActions(useMessagesStore, ['getAssistanceRequests']),
Expand All @@ -122,8 +149,8 @@ export default {
} catch (error) {
console.log(error)
}
},
},
}
}
}
</script>

Expand Down
22 changes: 15 additions & 7 deletions frontend/src/components/TheSnackBar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<!-- eslint-disable vue/no-v-html -->
<template>
<div @mouseover="pause = true" @mouseleave="pause = false">
<v-snackbar v-model="showSnackBar" :timeout="timeout" elevation="24" location="top" centered :color="colour" transition="slide-y-transition" class="snackbar">
<v-snackbar
v-model="showSnackBar"
:timeout="timeout"
elevation="24"
location="top"
centered
:color="colour"
transition="slide-y-transition"
class="snackbar">
<div v-html="alertNotificationText" />
<template #action="{ attrs }">
<v-btn text color="white" v-bind="attrs" @click="showSnackBar = false">
Expand All @@ -24,7 +32,7 @@ export default {
colour: '',
polling: null,
timeout: 5000,
pause: false,
pause: false
}
},
computed: {
Expand All @@ -38,8 +46,8 @@ export default {
},
set(val) {
this.setAlertNotification(val)
},
},
}
}
},
watch: {
showSnackBar() {
Expand All @@ -50,7 +58,7 @@ export default {
} else {
this.teardownSnackBar()
}
},
}
},
methods: {
...mapActions(useAppStore, ['setAlertNotificationText', 'setAlertNotification']),
Expand Down Expand Up @@ -100,8 +108,8 @@ export default {
this.timeout += 1
}
}, 1000)
},
},
}
}
}
</script>

Expand Down
Loading