Skip to content

Commit

Permalink
Merge pull request #30 from input-output-hk/NPG-9091
Browse files Browse the repository at this point in the history
feat: Add default final milestone content.
  • Loading branch information
coire1 authored Jul 15, 2024
2 parents feb4f6f + 9d8499c commit d0a24a6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 10 additions & 2 deletions milestone-tracker-frontend/src/components/forms/NewSom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</template>

<script setup>
import { ref, computed } from 'vue'
import { ref, computed, onMounted } from 'vue'
import { SchemaFormFactory, useSchemaForm } from "formvuelate"
import VeeValidatePlugin from "@formvuelate/plugin-vee-validate"
Expand Down Expand Up @@ -176,7 +176,7 @@ const initialSchema = computed(() => {
const localSchema = {
title: {
type: 'string',
help: t('new_som.title_help')
help: t('new_som.title_help'),
},
outputs: {
type: 'html',
Expand Down Expand Up @@ -278,4 +278,12 @@ const _clearForm = () => {
submitting.value = false
}
onMounted(() => {
if (isLastMilestone.value) {
updateFormModel('outputs', {type: 'update', content: t('new_som.last_milestone_outputs_default')})
updateFormModel('success_criteria', {type: 'update', content: t('new_som.last_milestone_success_criteria_default')})
updateFormModel('evidence', {type: 'update', content: t('new_som.last_milestone_evidence_default')})
}
})
</script>
5 changes: 4 additions & 1 deletion milestone-tracker-frontend/src/locales/messages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ export default {
evidence_help: "The evidence you submit must show clearly and visibly that this milestone has been completed.",
month_help: "In which month do you plan to complete this milestone. Month 1 of your project should be the same month as the initial payment. Month 2 is the next month after your initial payment.",
cost_help: "What is the cost forecast in {currency} to complete this milestone? The cost of the milestone cannot exceed 30% of the whole budget. For this milestone you cannot exceed {maxCost}.",
completion_help: "Once you have completed this milestone, how much in % terms will you have completed of your project? The completion must be at least 10% more than the previous milestone."
completion_help: "Once you have completed this milestone, how much in % terms will you have completed of your project? The completion must be at least 10% more than the previous milestone.",
last_milestone_outputs_default: "<ul><li>Final close-out report</li><li>Final close-out video</li></ul>",
last_milestone_success_criteria_default: "<ul><li>Final close-out report is publicly available</li><li>Final close-out video is publicly available</li></ul>",
last_milestone_evidence_default: "<ul><li>Link to final close-out report</li><li>Link to final close-out video</li></ul>"
},
som_review: {
from: "From",
Expand Down

0 comments on commit d0a24a6

Please sign in to comment.