Skip to content

Commit

Permalink
Clear out date field on cancel and update gspc email text.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-labbate committed Apr 3, 2024
1 parent 95b4d91 commit eb2d992
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions training-front-end/src/components/ValidatedDatepicker.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import {computed , reactive} from 'vue'
import {computed , reactive, watch} from 'vue'
const props = defineProps({
'modelValue': {
Expand Down Expand Up @@ -40,13 +40,26 @@
const year = user_input.year;
const month = user_input.month;
const day = user_input.day;
if (year && month && day) {
if (year.length == 4 && month && day) {
const newDate = new Date(`${year}-${month}-${day}`);
if (!isNaN(newDate)) {
emit('update:modelValue', newDate);
}
}
}
watch(() => props.modelValue, (newValue) => {
const newDate = new Date(newValue);
if (!isNaN(newDate)) {
user_input.day = newDate?.getDate()
user_input.month = newDate?.getMonth() + 1 //+1 to convert from 0 index array
user_input.year = newDate?.getFullYear()
} else{
user_input.day = '';
user_input.month = '';
user_input.year = '';
}
});
</script>
<template>
Expand Down
2 changes: 1 addition & 1 deletion training/api/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<p>Greetings!</p>
<p>
During the GSA SmartPay Training Forum, you completed the required coursework for the GSA SmartPay Program Certification (GSPC)
During the GSA SmartPay® Training Forum, you completed the required coursework for the GSA SmartPay Program Certification (GSPC)
defined by <a href="https://smartpay.gsa.gov/policies-and-audits/smart-bulletins/022/">Smart Bulletin 22</a>.
</p>
<p>
Expand Down

0 comments on commit eb2d992

Please sign in to comment.