-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #269 from ncosd/dev-1.10.0
Release v1.10.0
- Loading branch information
Showing
20 changed files
with
184 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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":1704077730177,"customAttributes":"{\"volunteer\":true}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"v2"}],"validSince":"1704077730","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":1704077730177,"customAttributes":"{\"admin\": true,\"volunteer\":true}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"VolunteerUser","photoUrl":""}],"validSince":"1704077730","email":"[email protected]","emailVerified":false,"disabled":false,"lastRefreshAt":"2024-01-01T02:56:15.556Z"},{"localId":"woEHhjSLumylkHLkbJKYdV7bTlNF","createdAt":"1681846322321","lastLoginAt":"1684257041600","displayName":"v1","passwordHash":"fakeHash:salt=fakeSaltMmMYfmogc9thU5bAe1wL:password=password","salt":"fakeSaltMmMYfmogc9thU5bAe1wL","passwordUpdatedAt":1704077730177,"customAttributes":"{\"volunteer\":true}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"v1"}],"validSince":"1704077730","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":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}]} |
Binary file modified
BIN
+0 Bytes
(100%)
...xtures/firestore_export/all_namespaces/all_kinds/all_namespaces_all_kinds.export_metadata
Binary file not shown.
Binary file modified
BIN
+583 Bytes
(110%)
web/admin/fixtures/firestore_export/all_namespaces/all_kinds/output-0
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
web/admin/fixtures/firestore_export/firestore_export.overall_export_metadata
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,99 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
import dayjs from 'dayjs' | ||
import { VueSignaturePad } from 'vue-signature-pad' | ||
const props = defineProps({ | ||
agreementHTML: String, | ||
name: String | ||
}) | ||
const emit = defineEmits(['saveSignature']) | ||
const signaturePad = ref(null) | ||
const showSigErr = ref(false) | ||
const showNameErr =ref(false) | ||
const showAgreeErr = ref(false) | ||
const agreeCheckBox = ref(false) | ||
const userName = ref('') | ||
const agreementDate = ref(dayjs().toDate()) | ||
const saveForm = ()=>{ | ||
showSigErr.value = false | ||
showNameErr.value = false | ||
showAgreeErr.value = false | ||
let hasErr = false | ||
const { isEmpty, data } = signaturePad.value.saveSignature() | ||
//console.log('isEmpty', isEmpty, 'data', data) | ||
if (isEmpty) { | ||
showSigErr.value = true | ||
hasErr = true | ||
} | ||
if (!agreeCheckBox.value) { | ||
showAgreeErr.value = true | ||
hasErr = true | ||
} | ||
console.log('username.value', userName.value) | ||
if (!userName.value || userName.value === '') { | ||
showNameErr.value = true | ||
hasErr = true | ||
} | ||
if (hasErr) { | ||
return | ||
} | ||
console.log('Saving signature') | ||
emit('saveSignature', { | ||
agreementDate: agreementDate.value, | ||
agreementName: props.name, | ||
agreeCheckBox: agreeCheckBox.value, | ||
printedName: userName.value, | ||
signatureData: data | ||
}) | ||
} | ||
</script> | ||
|
||
<template> | ||
<div class="container"> | ||
<div v-html="props.agreementHTML"></div> | ||
|
||
<form> | ||
<div> | ||
<input type="checkbox" class="form-check-input me-3" id="agreementCheck"> | ||
<label class="form-check-label" for="agreementCheck">By checking this, I agree with all of the above.</label> | ||
<form @submit.prevent="saveForm"> | ||
<div class="my-3"> | ||
<input type="checkbox" class="form-check-input me-3" id="agreementCheck" v-model="agreeCheckBox"> | ||
<label class="form-check-label" for="agreementCheck">By checking this, I have read and I agree with all of the above.</label> | ||
</div> | ||
<div v-if="showAgreeErr" class="text-danger">You must agree to save this form.</div> | ||
|
||
<div> | ||
<div class="my-3"> | ||
<label class="form-label" for="agreementDate">Date</label> | ||
<input type="text" class="form-control" id="agreementDate" /> | ||
<input type="text" class="form-control" id="agreementDate" v-model="agreementDate"/> | ||
</div> | ||
|
||
<div> | ||
<div class="my-3"> | ||
<label class="form-label" for="agreementSignature"> | ||
Signature of Staff Member/Volunteer | ||
</label> | ||
<input type="text" class="form-control" id="agreementSignature" /> | ||
|
||
|
||
<VueSignaturePad id="agreementSignature" class="border" ref="signaturePad"/> | ||
<div id="signatureHelp" class="form-text">Draw your signature in the box above with your mouse or finger</div> | ||
<div v-if="showSigErr" class="text-danger">You must provide a signature.</div> | ||
|
||
</div> | ||
|
||
<div> | ||
<label class="form-label" for="printedName"> | ||
Printed Name | ||
</label> | ||
<input type="text" class="form-control" id="printedName" /> | ||
<div class="my-3"> | ||
<label class="form-label" for="printedName">Printed Name</label> | ||
<input type="text" class="form-control" id="printedName" v-model="userName"/> | ||
<div v-if="showNameErr" class="text-danger">You must provide your name.</div> | ||
</div> | ||
<div class="mt-3"> | ||
<button type="submit" class="btn btn-primary" disabled>Submit</button> | ||
<div class="my-3"> | ||
<button type="submit" class="btn btn-primary">Submit</button> | ||
</div> | ||
</form> | ||
</div> | ||
</template> | ||
|
||
<style></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,3 @@ const props = defineProps({ | |
</label> | ||
</form> | ||
</template> | ||
|
||
<style></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,49 @@ | ||
<script setup> | ||
import AgreementForm from '@/components/AgreementForm.vue' | ||
import { ref, onBeforeMount } from 'vue' | ||
import { getFirestore, doc, getDoc } from 'firebase/firestore' | ||
import { getFirestore, doc, getDoc, addDoc, collection } from 'firebase/firestore' | ||
import { useAuthUserStore } from '@/stores/authUser' | ||
import { useRouter } from 'vue-router' | ||
const props = defineProps({ | ||
name: String, | ||
}) | ||
const router = useRouter() | ||
const user = useAuthUserStore() | ||
const db = getFirestore() | ||
const agreementHTML = ref() | ||
const showErr = ref(false) | ||
const showSuccess = ref(false) | ||
onBeforeMount(async()=>{ | ||
const db = getFirestore() | ||
const docRef = doc(db, 'agreements', props.name) | ||
console.log('docRef', docRef) | ||
const docSnap = await getDoc(docRef) | ||
if (docSnap.exists()) { | ||
agreementHTML.value = docSnap.data().html | ||
} else { | ||
agreementHTML.value = '<div><strong>Agreement not found.</strong></div>' | ||
agreementHTML.value = '<div><strong>Agreement (' + props.name + ') not found in database.</strong></div>' | ||
} | ||
}) | ||
const saveSignatureHandler = async (formData) => { | ||
showSuccess.value = false | ||
showErr.value = false | ||
try { | ||
const savedSigRef = await addDoc(collection(db, 'signedagreements', user.data.uid, props.name), | ||
{ ...formData }) | ||
showSuccess.value = true | ||
router.push({name:'Profile-Forms'}) | ||
} catch (err) { | ||
showErr.value = true | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<AgreementForm :agreementHTML="agreementHTML" :name="props.name"/> | ||
<AgreementForm :agreementHTML="agreementHTML" :name="props.name" @saveSignature="saveSignatureHandler"/> | ||
<div v-if="showErr" class="text-danger">An error occurred, try again later.</div> | ||
<div v-if="showSuccess" class="text-success">Agreement saved</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.