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

Release v1.11.0 #273

Merged
merged 24 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
aa17e22
prep release 1.11.0
dherbst Jan 9, 2024
c78cfc3
Clarified running the Guest and Admin apps
dherbst Jan 9, 2024
80760be
Added clarification note to release notes.
dherbst Jan 9, 2024
e829ac5
Improved gh release process.
dherbst Jan 9, 2024
aa98791
Adds improved release process to release notes
dherbst Jan 9, 2024
47f8a9a
Add pronouns in profile
rakshitriya Jan 9, 2024
0f8bd2e
Flag to show guest login form, and move to composition api.
dherbst Jan 10, 2024
a32473c
Fixes #221 redirect a volunteer to the volunteer app if they login to…
dherbst Jan 10, 2024
820e9fb
Adds release note for #221
dherbst Jan 10, 2024
bdd8f95
Update pronoun to pronouns
rakshitriya Jan 10, 2024
674cf33
Update pronouns and placeholder for the same
rakshitriya Jan 10, 2024
a611ccd
Update pronoun to pronouns
rakshitriya Jan 10, 2024
ac76ab6
Update web/admin/src/components/VolunteerRegistrationForm.vue
dherbst Jan 10, 2024
54921d5
Update web/admin/src/views/ProfilePage.vue
dherbst Jan 10, 2024
0920773
Merge pull request #272 from rakshitriya/main
dherbst Jan 10, 2024
1476aca
Adds Pronouns to the profile.
dherbst Jan 10, 2024
855e8d3
Modified pr template to remove stakeholders because it isn't being us…
dherbst Jan 10, 2024
df6035c
Revised issue templates to clarify and remove un-needed information
dherbst Jan 10, 2024
5a9b53d
Upgrade functions libraries
dherbst Jan 10, 2024
3e0b03c
Removed debugging.
dherbst Jan 10, 2024
3e4dc38
Fixes #276 remove front line worker statement.
dherbst Jan 10, 2024
f917524
Adds release notes for 276
dherbst Jan 10, 2024
7ace00b
Adds date
dherbst Jan 10, 2024
b815e93
Release date in release notes.
dherbst Jan 11, 2024
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
12 changes: 2 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
Expand All @@ -23,16 +22,9 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
**Desktop or phone, which browser? (please complete the following information):**
- Device: [e.g. iPhone, Android, Galaxy, macbook, iPad, windows laptop]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ assignees: ''

---

<!-- Choose a Topic: Contributing, Hosting, Deploying -->
<!-- Choose a Topic: Contributing, Hosting, Deploying, Other -->
# Topic:

# Question:
<!-- Write your question here -->
# Question:
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Closes #
# Description
<!-- What does the PR do, add a feature, refactor, fix a bug? -->

## Release Note
- [ ] Added a release note to either `web/app/src/views/ReleaseNotesPage.vue` or `web/admin/src/views/ReleaseNotesPage.vue`

# Testing
<!-- How should a reviewer verify this PR does what it should? -->

# Stakeholders
<!-- @ tag if someone should review this and you do not have permissions to set reviewers. Or if someone should take notice. -->
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ VITE_FB_MEASUREMENTID="some-app-id"

Use these commands for developing locally:

# you should be in the web/app directory
# you should be in the web/admin directory
npm run serve:firebase:emulator # leave this running in one terminal
npm run dev # leave this running in another terminal, this will run vite with hot-reloading
npm run dev # Leave this running in another terminal, this will run vite with hot-reloading on port 5174

Running these two commands will run the emulators in one terminal, and Vite build in the other. You can open your browser to http://localhost:5173 to see the page. The firebase service will not do hot-reloading in the browser when Vite builds to the `dist` folder whenever changes are made, so you will need to reload the web browser as you work to load the latest built code.
# to run the guest app in web/app directory
npm run dev # leave this running in another terminal, this will run vite with hot-reloading on port 5173


Running these three commands will run the emulators in one terminal, and Vite build in the other for the Guest and Admin apps. You can open your browser to http://localhost:5173 to see the guest pages, and http://localhost:5174 to the volunteer pages. The firebase service will not do hot-reloading in the browser when Vite builds to the `dist` folder whenever changes are made, so you will need to reload the web browser as you work to load the latest built code.

### Java installed?
The firebase emulator needs node.js 8.0 or higher and Java JDK version 11 or higher.
Expand Down
1 change: 0 additions & 1 deletion web/admin/src/components/ThemeChooser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const getPreferredTheme = () => {
}

const setTheme = theme => {
console.log('setTheme', theme)
if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark')
} else {
Expand Down
40 changes: 18 additions & 22 deletions web/admin/src/components/VolunteerRegistrationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,25 @@
</div>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<div v-if="phoneError" class="text-bg-danger">Phone required to volunteer format: 111-222-4444.</div>
<label class="form-label">Phone</label>
<input class="form-control" v-model="profile.phone" autocomplete="phone" placeholder="111-222-4444" required>


<div class="row">
<div class="col-md-6">
<div class="mb-3">
<div v-if="phoneError" class="text-bg-danger">Phone required to volunteer format: 111-222-4444.</div>
<label class="form-label">Phone</label>
<input class="form-control" v-model="profile.phone" autocomplete="phone" placeholder="111-222-4444" required>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label class="form-label">Pronouns (optional)</label>
<input class="form-control" v-model="profile.pronoun" placeholder="(she/her, they/them, he/him, etc)">
</div>
</div>
</div>


<div class="row mb-3 border-top border-bottom">
<div class="mt-3">Best days for you:</div>
<div class="form-check ms-3"><input id="avail_monday" class="form-check-input" type="checkbox" v-model="profile.avail_monday"><label class="form-check-label" for="avail_monday">Monday</label></div>
Expand All @@ -77,15 +88,6 @@
<input id="acceptParent" class="form-check-input" type="checkbox" v-model="profile.acceptParent">
<label for="acceptParent" class="form-label">I understand that volunteers under 16 years of age need to be accompanied by a
parent.</label>

</div>
</div>

<div class="row">
<div class="form-check ms-3 mb-3">
<div v-if="acceptFrontLineError" class="text-bg-danger">This is required to volunteer.</div>
<input id="acceptfrontline" class="form-check-input" type="checkbox" v-model="profile.acceptFrontLine">
<label for="acceptfrontline" class="form-label">{{config.AdminFrontline}}</label>
</div>
</div>

Expand Down Expand Up @@ -133,10 +135,10 @@ export default {
profile: {
firstname: '',
lastname: '',
pronoun:'',
phone: '',
acceptLiftClean: false,
acceptParent: false,
acceptFrontLine: false,
acceptTerms: false,
preferredtimes: '',
extraNote: '',
Expand All @@ -148,7 +150,6 @@ export default {
acceptTermsError: false,
acceptLiftError: false,
acceptParentError: false,
acceptFrontLineError: false,
phoneError: false,
emailError: false,
passwordError: false,
Expand All @@ -166,7 +167,7 @@ LoadingSpinner,
this.acceptTermsError = false
this.acceptLiftError = false
this.acceptParentError = false
this.acceptFrontLineError = false

this.phoneError = false
this.emailError = false
this.passwordError = false
Expand Down Expand Up @@ -229,11 +230,6 @@ this.spin = false
this.error += " Acknowledge under 16 must be accompanied by parent."
}

if (!this.profile.acceptFrontLine) {
this.acceptFrontLineError = true
this.error += " Accept Front Line worker statement."
}

if (this.error) {
return false
}
Expand Down
3 changes: 1 addition & 2 deletions web/admin/src/config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
export let config = {
version: "1.10.0",
version: "1.11.0",
adminAppNavName: import.meta.env.VITE_ADMIN_APP_NAV_NAME || 'ADMIN_APP_NAV_NAME',
adminAppNavImg: import.meta.env.VITE_ADMIN_APP_NAV_IMG || null,
appNavName: import.meta.env.VITE_APP_NAV_NAME || 'APP_NAV_NAME',
OrganizationName: import.meta.env.VITE_ORGANIZATION_NAME || 'ORGANIZATION_NAME',
ProjectLongName: import.meta.env.VITE_PROJECT_LONG_NAME || 'PROJECT_LONG_NAME',
AdminProjectLongName: import.meta.env.VITE_ADMIN_PROJECT_LONG_NAME || 'ADMIN_PROJECT_LONG_NAME',
AdminFrontline: import.meta.env.VITE_ADMIN_FRONTLINE || 'ADMIN_FRONTLINE',

meta: {
Home: {
Expand Down
38 changes: 9 additions & 29 deletions web/admin/src/views/ProfilePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import EmailVerified from '@/components/EmailVerified.vue'
const props = defineProps({
uid: String
})
const user = useAuthUserStore()

const db = getFirestore()
const user = useAuthUserStore()
const router = useRouter()
const profile = ref()
const status = ref()
Expand All @@ -23,13 +24,10 @@ var stateRef = null
const phoneError = ref(false)
const acceptLiftError = ref(false)
const acceptParentError = ref(false)
const acceptFrontLineError = ref(false)
const acceptTermsError = ref(false)


const save = async ()=>{
await updateDoc(profileRef, profile.value)
await updateDoc(stateRef, { status: status.value })

if (user.data.displayName != profile.value.displayname) {
const auth = getAuth()
Expand All @@ -53,7 +51,6 @@ onBeforeMount( async () => {
userId.value = user.data.uid
}

const db = getFirestore()
profileRef = doc(db, "volunteerprofile", userId.value)
const profileSnap = await getDoc(profileRef)
if (profileSnap.exists()) {
Expand All @@ -70,13 +67,13 @@ onBeforeMount( async () => {
firstname: '',
lastname: '',
phone: '',
pronoun:'',
avail_monday: false,
avail_tuesday: false,
avail_thursday: false,
avail_saturday: false,
acceptLiftClean: false,
acceptParent: false,
acceptFrontLine: false,
extraNote: ''
}
status.value = 'in-review'
Expand All @@ -100,18 +97,7 @@ onBeforeMount( async () => {
<div class="row my-3">
<div class="col">
<label class="form-label me-3" for="status">Volunteer Status</label>
<template v-if="user.isAdmin">
<select class="form-select" v-model="status">
<option value="active">active</option>
<option value="in-review">in-review</option>
<option value="inactive">inactive</option>
</select>
</template>
<template v-else>
<div class="p-3 bg-light text-dark">
{{ status }}
</div>
</template>
<input name="status" class="form-control" :value="status" disabled>
</div>
</div>
<div class="row my-3">
Expand All @@ -135,11 +121,15 @@ onBeforeMount( async () => {
</div>
</div>
<div class="row my-3">
<div class="col">
<div class="col-12 col-md-6">
<div v-if="phoneError" class="text-bg-danger">Phone required to volunteer format: 111-222-4444.</div>
<label class="form-label" for="phone">Phone</label>
<input class="form-control" v-model="profile.phone" autocomplete="phone" placeholder="111-222-4444" required>
</div>
<div class="col-12 col-md-6">
<label class="form-label" for="pronoun">Pronouns (optional)</label>
<input class="form-control" v-model="profile.pronoun" placeholder="(she/her, they/them, he/him, etc)">
</div>
</div>

<div class="row my-3">
Expand Down Expand Up @@ -172,16 +162,6 @@ onBeforeMount( async () => {
</div>
</div>

<div class="row">
<div class="col">
<div class="form-check mb-3">
<div v-if="acceptFrontLineError" class="text-bg-danger">This is required to volunteer.</div>
<input id="acceptfrontline" class="form-check-input" type="checkbox" v-model="profile.acceptFrontLine" disabled>
<label for="acceptfrontline" class="form-label">{{ config.AdminFrontline }}</label>
</div>
</div>
</div>

<div class="row">
<div class="col">
<div class="form-check mb-3">
Expand Down
7 changes: 7 additions & 0 deletions web/admin/src/views/ReleaseNotesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
<template>
<div class="container">
<h1>Release Notes</h1>
<h2 id="1.11.0">January 10, 2024 - 1.11.0</h2>
<ul>
<li><a href="https://github.com/ncosd/food-pantry-app/issues/238">#238</a> Add pronouns to the profile.</li>
<li><a href="https://github.com/ncosd/food-pantry-app/issues/276">#276</a> Remove front line worker attestation.</li>
<li>Improved "make release" automation.</li>
<li>Clarified how to run the Guest and Volunteer apps on the README.md file.</li>
</ul>
<h2 id="1.10.0">January 9, 2024 - 1.10.0</h2>
<ul>
<li><a href="https://github.com/ncosd/food-pantry-app/issues/181">#181</a> Adds signable confidentiality agreement page.</li>
Expand Down
2 changes: 2 additions & 0 deletions web/app/env.demo
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ VITE_ADMIN_APP_NAV_IMG="/ncfb-logo.png"
VITE_ADMIN_APP_NAV_NAME="FPA-Admin"
VITE_ADMIN_PROJECT_LONG_NAME="FPA-Admin"
VITE_ADMIN_FRONTLINE="Additional message here."
VITE_VOLUNTEER_PORTAL_URL="http://localhost:5174"
VITE_ENABLE_GUEST_LOGIN=false
64 changes: 24 additions & 40 deletions web/app/src/components/AppNavigation.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
<script setup>
import { getAuth, signOut } from 'firebase/auth'
import { config } from '@/config'
import { useRouter } from 'vue-router'
import { useAuthUserStore } from '@/stores/authUser'

const user = useAuthUserStore()
const router = useRouter()
const auth = getAuth()

const signOutClick = () => {
signOut(auth)
.then( () => {
router.push({ name: "Home" })
}).catch(
(err) => {
console.log("Error logging out: " + err)
}
)
}
</script>

<template>
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
Expand All @@ -24,8 +46,7 @@
</ul>
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">

<!--
<div class="d-flex">
<div class="d-flex" v-if="config.EnableGuestLogin === 'true'">
<template v-if="user && user.isLoggedIn === true">
<span class="nav-item py-2"><i class="bi bi-person-fill"></i> {{ user.data && user.data.displayName }}</span>
<a class="btn btn-primary mx-2" @click.prevent="signOutClick">Sign Out</a>
Expand All @@ -34,46 +55,9 @@
<a class="btn btn-primary mx-2" href="/login" role="button">Login</a>
</template>
</div>
-->

</ul>
</div>
</div>
</nav>
</template>

<script>
import { getAuth, signOut } from 'firebase/auth'
import { config } from '@/config'
import { useRouter } from 'vue-router'
import { useAuthUserStore } from '@/stores/authUser'


export default {
name: 'AppNavigation',
data() {
return {
user: null,
config: config
}
},
mounted() {
this.user = useAuthUserStore()
},
methods: {
signOutClick() {
const router = useRouter()
const auth = getAuth()
signOut(auth)
.then( () => {
router.replace({ name: "Home" })
}).catch((err) => {
console.log("Error logging out: " + err)
})
}
}
}
</script>

<style scoped>

</style>
3 changes: 2 additions & 1 deletion web/app/src/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export let config = {
version: "1.10.0",
version: "1.11.0",
appNavName: import.meta.env.VITE_APP_NAV_NAME || 'APP_NAV_NAME',
OrganizationName: import.meta.env.VITE_ORGANIZATION_NAME || 'ORGANIZATION_NAME',
ProjectLongName: import.meta.env.VITE_PROJECT_LONG_NAME || 'PROJECT_LONG_NAME',
Expand All @@ -9,6 +9,7 @@ export let config = {
DeliveryMessage: import.meta.env.VITE_DELIVERY_MESSAGE || "",
DeliveryFormURL: import.meta.env.VITE_DELIVERY_FORM_URL || "/delivery-form",
VolunteerPortalURL: import.meta.env.VITE_VOLUNTEER_PORTAL_URL || "VOLUNTEER_PORTAL_URL",
EnableGuestLogin: import.meta.env.VITE_ENABLE_GUEST_LOGIN || "false",

meta: {
Home: {
Expand Down
Loading