Skip to content

Commit

Permalink
Merge pull request #398 from bcgov/feature/CCOF-1633
Browse files Browse the repository at this point in the history
add link to list of faclities
  • Loading branch information
jenbeckett authored Aug 9, 2023
2 parents fcfbf2a + b437abc commit ab6393d
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<v-row justify="center" style="padding-top: 2em;">
<ul style="list-style: none">
<li v-for="item in facilityList" :key="item.facilityId" style="">
<span>{{ item.facilityName }}</span>
<router-link :to="getRoutingPath(item.facilityId)"><span>{{ item.facilityName }}</span></router-link>
<v-btn v-if="!isLocked && facilityList.length > 1" variant="outlined" icon color="red" @click="confirmDeleteApplication(item.facilityId, item.changeRequestNewFacilityId, item.facilityName, item.ccfriApplicationId, item.eceweApplicationId, item.ccofBaseFundingId)">
<v-icon>mdi-trash-can-outline</v-icon>
</v-btn>
Expand Down Expand Up @@ -70,7 +70,7 @@

<script>
import { PATHS, changeUrl, pcfUrl } from '@/utils/constants';
import { PATHS, changeUrl, changeUrlGuid, pcfUrl, pcfUrlGuid } from '@/utils/constants';
import { mapState, mapMutations, mapActions, mapGetters } from 'vuex';
import { isChangeRequest } from '@/utils/common';
Expand Down Expand Up @@ -123,6 +123,14 @@ export default {
previous() {
this.$router.push(this.previousPath);
},
getRoutingPath(facilityId) {
if(isChangeRequest(this)){
return changeUrlGuid(PATHS.CCOF_GROUP_FACILITY, this.changeRequestId, facilityId);
}
else {
return pcfUrlGuid(PATHS.CCOF_GROUP_FACILITY, this.programYearId, facilityId);
}
},
addAnotherFacility() {
if (isChangeRequest(this)) {
this.$router.push(changeUrl(PATHS.CCOF_GROUP_FACILITY, this.$route.params.changeRecGuid));
Expand Down

0 comments on commit ab6393d

Please sign in to comment.