Skip to content

Commit

Permalink
Add route facility_ids to back routes to maintain context in navigation.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Jun 7, 2023
1 parent 1768bce commit 8224234
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions kolibri/plugins/facility/assets/src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ export default [
const facilityId = route.params.facility_id || store.getters.currentFacilityId;
return {
facilityId,
goBackRoute: { name: PageNames.DATA_EXPORT_PAGE },
goBackRoute: {
name: PageNames.DATA_EXPORT_PAGE,
params: { facility_id: route.params.facility_id },
},
editSyncRoute: function(deviceId) {
return {
name: SyncPageNames.EDIT_SYNC_SCHEDULE,
Expand All @@ -180,7 +183,10 @@ export default [
return {
facilityId: route.params.facility_id || store.getters.currentFacilityId,
deviceId: route.params.deviceId,
goBackRoute: { name: SyncPageNames.MANAGE_SYNC_SCHEDULE },
goBackRoute: {
name: SyncPageNames.MANAGE_SYNC_SCHEDULE,
params: { facility_id: route.params.facility_id },
},
};
},
},
Expand Down

0 comments on commit 8224234

Please sign in to comment.