Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back navigation link fix for Proponent views #224

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading