Skip to content

Commit

Permalink
Merge pull request #282 from ncosd/dev-1.12.0
Browse files Browse the repository at this point in the history
Release 1.12.0
  • Loading branch information
dherbst authored Jan 18, 2024
2 parents 72f4270 + 9f28bdf commit d7b4c51
Show file tree
Hide file tree
Showing 23 changed files with 336 additions and 113 deletions.
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.trimTrailingWhitespace": true,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.wordWrap": "on"
}
2 changes: 1 addition & 1 deletion web/admin/fixtures/auth_export/accounts.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"5WddDr1Teytl9YHQ0Lgf2yP86pft","createdAt":"1681846355208","lastLoginAt":"1681846355208","displayName":"v2","passwordHash":"fakeHash:salt=fakeSaltMaXkJGcoDb58rWtYnrD4:password=password","salt":"fakeSaltMaXkJGcoDb58rWtYnrD4","passwordUpdatedAt":1704248415365,"customAttributes":"{\"volunteer\":true}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"v2"}],"validSince":"1704248415","email":"[email protected]","emailVerified":false,"disabled":false},{"localId":"olN7alG8mHwRg6YYgVjlpR9scwq5","createdAt":"1614344510322","lastLoginAt":"1704077775556","displayName":"VolunteerUser","photoUrl":"","passwordHash":"fakeHash:salt=fakeSaltPdNFgJYXTp3KoHpHPeET:password=password","salt":"fakeSaltPdNFgJYXTp3KoHpHPeET","passwordUpdatedAt":1704248415365,"customAttributes":"{\"admin\": true,\"volunteer\":true}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"VolunteerUser","photoUrl":""}],"validSince":"1704248415","email":"[email protected]","emailVerified":false,"disabled":false,"lastRefreshAt":"2024-01-03T02:20:59.137Z"},{"localId":"woEHhjSLumylkHLkbJKYdV7bTlNF","createdAt":"1681846322321","lastLoginAt":"1684257041600","displayName":"v1","passwordHash":"fakeHash:salt=fakeSaltMmMYfmogc9thU5bAe1wL:password=password","salt":"fakeSaltMmMYfmogc9thU5bAe1wL","passwordUpdatedAt":1704248415365,"customAttributes":"{\"volunteer\":true}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"v1"}],"validSince":"1704248415","email":"[email protected]","emailVerified":false,"disabled":false}]}
{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"5WddDr1Teytl9YHQ0Lgf2yP86pft","createdAt":"1681846355208","lastLoginAt":"1681846355208","displayName":"v2","passwordHash":"fakeHash:salt=fakeSaltMaXkJGcoDb58rWtYnrD4:password=password","salt":"fakeSaltMaXkJGcoDb58rWtYnrD4","passwordUpdatedAt":1704985140624,"customAttributes":"{\"volunteer\":true}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"v2"}],"validSince":"1704985140","email":"[email protected]","emailVerified":false,"disabled":false},{"localId":"olN7alG8mHwRg6YYgVjlpR9scwq5","createdAt":"1614344510322","lastLoginAt":"1704985153659","displayName":"VolunteerUser","photoUrl":"","passwordHash":"fakeHash:salt=fakeSaltPdNFgJYXTp3KoHpHPeET:password=password","salt":"fakeSaltPdNFgJYXTp3KoHpHPeET","passwordUpdatedAt":1704985140624,"customAttributes":"{\"admin\": true,\"volunteer\":true}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"VolunteerUser","photoUrl":""}],"validSince":"1704985140","email":"[email protected]","emailVerified":false,"disabled":false,"lastRefreshAt":"2024-01-11T14:59:13.659Z"},{"localId":"woEHhjSLumylkHLkbJKYdV7bTlNF","createdAt":"1681846322321","lastLoginAt":"1684257041600","displayName":"v1","passwordHash":"fakeHash:salt=fakeSaltMmMYfmogc9thU5bAe1wL:password=password","salt":"fakeSaltMmMYfmogc9thU5bAe1wL","passwordUpdatedAt":1704985140625,"customAttributes":"{\"volunteer\":true}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"v1"}],"validSince":"1704985140","email":"[email protected]","emailVerified":false,"disabled":false}]}
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions web/admin/src/components/AdminCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@ const prevMonth = () => {
}
const statusClass = (win) => {
if (win.tasktype === 'Holiday') {
return 'text-bg-holiday'
}
const attending = props.windows.attending.get(win.id)
if (attending && attending.winid === win.id) {
return 'text-bg-success'
} else if (win.numAttending >= win.numNeeded) {
return 'text-bg-secondary'
}
return 'text-bg-available'
}
Expand Down
13 changes: 12 additions & 1 deletion web/admin/src/components/AdminCalendarScheduler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ function isoDate(date) {
const d = dayjs(date)
return d.format()
}
const windowColor = (win) => {
console.log('windowColor(win)=', win.tasktype, win)
if (win.tasktype === 'Holiday') {
return 'text-bg-holiday'
}
return 'text-bg-secondary'
}
</script>


Expand Down Expand Up @@ -149,7 +160,7 @@ function isoDate(date) {
</div>
<div v-for="w in windows.getDay(day)">
<router-link :to="{name:'ScheduleWindowById', params: {id:w.id}}">
<div class="badge rounded-pill text-bg-warning text-wrap d-block m-1">
<div class="badge rounded-pill text-wrap d-block m-1" :class="windowColor(w)">
{{w.location}} {{w.tasktype}}
{{dayjs(w.starttime.toDate()).format('h:mm A')}} - {{dayjs(w.endtime.toDate()).format('h:mm A')}}
</div>
Expand Down
1 change: 1 addition & 0 deletions web/admin/src/components/ColorKey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
<span class="badge rounded-pill text-bg-secondary me-1">staffing met</span>
<span class="badge rounded-pill text-bg-available me-1">needs volunteers</span>
<span class="badge rounded-pill text-bg-danger me-1">unavailable</span>
<span class="badge rounded-pill text-bg-holiday me-1">Holiday (Closed)</span>
</div>
</template>
133 changes: 71 additions & 62 deletions web/admin/src/components/VolunteerRegistrationForm.vue
Original file line number Diff line number Diff line change
@@ -1,78 +1,86 @@
<template>
<form @submit.prevent="submit">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">Volunteer Sign Up</div>
<div class="card-body">
<template v-if="showSuccess">
<div class="text-bg-success">{{ successMessage }}</div>
</template>
<template v-if="error">
<div class="text-bg-danger">{{ error }}</div>
</template>

<div class="row my-3">
<div v-if="emailError" class="text-bg-danger">Email is required. Please check email is correct.</div>
<label class="form-label">Email</label>
<div class="col-sm-10">
<input type="text" v-model="email" autocomplete="username" class="form-control" placeholder="[email protected]" required>
</div>
<form @submit.prevent="submit">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">Volunteer Sign Up</div>
<div class="card-body">
<template v-if="showSuccess">
<div class="text-bg-success">{{ successMessage }}</div>
</template>
<template v-if="error">
<div class="text-bg-danger">{{ error }}</div>
</template>

<div class="row my-3">
<div v-if="emailError" class="text-bg-danger">Email is required. Please check email is correct.</div>
<label class="form-label">Email</label>
<div class="col-sm-10">
<input type="text" v-model="email" autocomplete="username" class="form-control" placeholder="[email protected]" required>
</div>
</div>

<div class="row my-3">
<div v-if="passwordError" class="text-bg-danger">Password is required, must be at least 8 characters.</div>
<label class="form-label">Password</label>
<div class="col-sm-10">
<input type="password" v-model="password" autocomplete="new-password" class="form-control" required>
</div>
<div class="row my-3">
<div v-if="passwordError" class="text-bg-danger">Password is required, must be at least 8 characters.</div>
<label class="form-label">Password</label>
<div class="col-sm-10">
<input type="password" v-model="password" autocomplete="new-password" class="form-control" required>
</div>
</div>

<div class="row">
<div class="col-md-6">
<div class="mb-3">
<div v-if="firstnameError" class="text-bg-danger">First name is required.</div>
<label class="form-label">First Name</label>
<input class="form-control" v-model="profile.firstname" autocomplete="First Name" required>
</div>
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<div v-if="firstnameError" class="text-bg-danger">First name is required.</div>
<label class="form-label">First Name</label>
<input class="form-control" v-model="profile.firstname" autocomplete="First Name" required>
</div>
</div>

<div class="col-md-6">
<div class="mb-3">
<div v-if="lastnameError" class="text-bg-danger">Last Name is required.</div>
<label class="form-label">Last Name</label>
<input class="form-control" v-model="profile.lastname" autocomplete="Last Name" required>
</div>
<div class="col-md-6">
<div class="mb-3">
<div v-if="lastnameError" class="text-bg-danger">Last Name is required.</div>
<label class="form-label">Last Name</label>
<input class="form-control" v-model="profile.lastname" autocomplete="Last Name" required>
</div>
</div>
</div>


<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 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 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 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="row mb-3 border-top border-bottom">
<div class="col-md-6">
<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>
<div class="form-check ms-3"><input id="avail_tuesday" class="form-check-input" type="checkbox" v-model="profile.avail_tuesday"><label class="form-check-label" for="avail_tuesday">Tuesday</label></div>
<div class="form-check ms-3"><input id="avail_thursday" class="form-check-input" type="checkbox" v-model="profile.avail_thursday"><label class="form-check-label" for="avail_thursday">Thursday</label></div>
<div class="form-check ms-3 mb-3"><input id="avail_saturday" class="form-check-input" type="checkbox" v-model="profile.avail_saturday"><label class="form-check-label" for="avail_saturday">Saturday</label></div>
</div>

<div class="row">
<div class="col-md-6">
<div class="mt-3">
<input id="iWantToBeADriver" class="form-check-input me-3" type="checkbox" v-model="profile.isDriver">
<label for="iWantToBeADriver" class="form-label">I want to be a delivery driver</label>
</div>
</div>

</div>

<div class="row">
<div class="form-check ms-3 mb-3">
<div v-if="acceptLiftError" class="text-bg-danger">This is required to volunteer.</div>
<input id="acceptliftclean" class="form-check-input" type="checkbox" v-model="profile.acceptLiftClean">
Expand Down Expand Up @@ -141,6 +149,7 @@ export default {
acceptParent: false,
acceptTerms: false,
preferredtimes: '',
isDriver: false,
extraNote: '',
},
error: '',
Expand All @@ -155,13 +164,13 @@ export default {
passwordError: false,
firstnameError: false,
lastnameError: false,
config: config,
spin: false,
config: config,
spin: false,
}
},
components: {
LoadingSpinner,
},
},
components: {
LoadingSpinner,
},
methods: {
resetErrors() {
this.acceptTermsError = false
Expand All @@ -172,8 +181,8 @@ LoadingSpinner,
this.emailError = false
this.passwordError = false
this.firstnameError = false
this.lastnameError = false
this.spin = false
this.lastnameError = false
this.spin = false
},
validate() {
this.error = ""
Expand Down
2 changes: 1 addition & 1 deletion web/admin/src/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export let config = {
version: "1.11.0",
version: "1.12.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',
Expand Down
7 changes: 7 additions & 0 deletions web/admin/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ const routes = [
component: () => import('@/views/ProfileCertificationsPage.vue'),
meta: { requiresLogin: true },
},
{
path: '/profile-admin-forms/:volunteerId/:formName',
name: 'ProfileAdminForms',
props: true,
meta: { requiresLogin: true, admin: true },
component: () => import('@/views/ProfileAdminFormsPage.vue'),
},
{
path: '/unavailable',
name: 'Unavailable',
Expand Down
5 changes: 4 additions & 1 deletion web/admin/src/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@
background-color: $red-500;
}


.text-bg-holiday {
color: color-contrast($red-500) if($enable-important-utilities, !important, null);
background-color: $red-700;
}



Expand Down
9 changes: 4 additions & 5 deletions web/admin/src/views/LocationsListPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ onBeforeMount( async () => {
})
const mapsquery = ( (loc)=>{
const mapurl = 'https://www.google.com/maps/search/?api=1&query='
const q = loc.street + ',' + loc.city + ',' + loc.state + ',' + loc.zip
const mapsquery = (loc)=>{
const mapurl = 'https://www.google.com/maps/search/?api=1&query='
const q = loc.street + ',' + loc.city + ',' + loc.state + ',' + loc.zip
return mapurl + encodeURIComponent(q)
})
}
</script>

<template>
Expand Down
Loading

0 comments on commit d7b4c51

Please sign in to comment.