Skip to content

Commit

Permalink
Back navigation link fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaytkbabu authored and kyle1morel committed Dec 18, 2024
1 parent 210f22e commit bfa2a54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
18 changes: 5 additions & 13 deletions frontend/src/components/housing/enquiry/EnquiryIntakeForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { storeToRefs } from 'pinia';
import { Form } from 'vee-validate';
import { computed, onBeforeMount, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useRouter } from 'vue-router';
import { array, object, string } from 'yup';
import BackButton from '@/components/common/BackButton.vue';
Expand Down Expand Up @@ -71,21 +71,13 @@ const formSchema = object({
// Actions
const confirm = useConfirm();
const router = useRouter();
const route = useRoute();
const toast = useToast();
const getBackButtonConfig = computed(() => {
if (route.query.activityId) {
return {
text: 'Back to my drafts and previous entries',
routeName: RouteName.HOUSING_SUBMISSIONS
};
} else {
return {
text: 'Back to Housing',
routeName: RouteName.HOUSING
};
}
return {
text: 'Back to Housing',
routeName: RouteName.HOUSING
};
});
function confirmSubmit(data: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { storeToRefs } from 'pinia';
import { Form, FieldArray, ErrorMessage } from 'vee-validate';
import { computed, onBeforeMount, nextTick, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useRouter } from 'vue-router';
import AdvancedFileUpload from '@/components/file/AdvancedFileUpload.vue';
import BackButton from '@/components/common/BackButton.vue';
Expand Down Expand Up @@ -125,21 +125,13 @@ const validationErrors = computed(() => {
// Actions
const confirm = useConfirm();
const router = useRouter();
const route = useRoute();
const toast = useToast();
const getBackButtonConfig = computed(() => {
if (route.query.activityId) {
return {
text: 'Back to my drafts and previous entries',
routeName: RouteName.HOUSING_SUBMISSIONS
};
} else {
return {
text: 'Back to Housing',
routeName: RouteName.HOUSING
};
}
return {
text: 'Back to Housing',
routeName: RouteName.HOUSING
};
});
function confirmSubmit(data: GenericObject) {
Expand Down

0 comments on commit bfa2a54

Please sign in to comment.