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

Fixed: the routing from the query page to the route list page #79

Merged
merged 5 commits into from
Feb 14, 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
2 changes: 1 addition & 1 deletion src/views/BrokeringQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="menu">
<ion-item lines="none">
<ion-label>{{ currentRouting.routingName }}</ion-label>
<ion-chip slot="end" outline @click="router.push(`/tabs/brokering/${currentRouting.routingGroupId}/routes`)">
<ion-chip slot="end" outline @click="router.go(-1)">
{{ getRouteIndex() }}
<ion-icon :icon="chevronUpOutline" />
</ion-chip>
Expand Down
9 changes: 3 additions & 6 deletions src/views/BrokeringRoute.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<!-- Used ion-button, instead of ion-back-button as back-button navigates on the basis of history and thus stuck in the loop of navigation -->
<ion-button fill="clear" @click="router.push('/tabs/brokering')">
<ion-icon slot="icon-only" :icon="arrowBackOutline"/>
</ion-button>
<ion-back-button default-href="/tabs/brokering" />
</ion-buttons>
<ion-title>{{ currentRoutingGroup.groupName }}</ion-title>
</ion-toolbar>
Expand Down Expand Up @@ -142,8 +139,8 @@
</template>

<script setup lang="ts">
import { IonBadge, IonButtons, IonButton, IonCard, IonCardHeader, IonCardTitle, IonChip, IonContent, IonFab, IonFabButton, IonHeader, IonIcon, IonItem, IonLabel, IonList, IonListHeader, IonPage, IonReorder, IonReorderGroup, IonSelect, IonSelectOption, IonTextarea, IonTitle, IonToolbar, alertController, modalController, onIonViewWillEnter } from "@ionic/vue";
import { addCircleOutline, archiveOutline, arrowBackOutline, refreshOutline, reorderTwoOutline, saveOutline, timeOutline, timerOutline } from "ionicons/icons"
import { IonBackButton, IonBadge, IonButtons, IonButton, IonCard, IonCardHeader, IonCardTitle, IonChip, IonContent, IonFab, IonFabButton, IonHeader, IonIcon, IonItem, IonLabel, IonList, IonListHeader, IonPage, IonReorder, IonReorderGroup, IonSelect, IonSelectOption, IonTextarea, IonTitle, IonToolbar, alertController, modalController, onIonViewWillEnter } from "@ionic/vue";
import { addCircleOutline, archiveOutline, refreshOutline, reorderTwoOutline, saveOutline, timeOutline, timerOutline } from "ionicons/icons"
import { onBeforeRouteLeave, useRouter } from "vue-router";
import { useStore } from "vuex";
import { computed, defineProps, ref } from "vue";
Expand Down
10 changes: 9 additions & 1 deletion src/views/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ion-page>
<ion-tabs>
<ion-router-outlet></ion-router-outlet>
<ion-tab-bar slot="bottom">
<ion-tab-bar slot="bottom" v-if="showFooter()">
<ion-tab-button tab="brokering" href="/tabs/brokering">
<ion-icon :icon="shuffleOutline" />
<ion-label>{{ translate("Brokering") }}</ion-label>
Expand All @@ -21,6 +21,14 @@
import { translate } from "@/i18n";
import { IonIcon, IonLabel, IonPage, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from "@ionic/vue";
import { settingsOutline, shuffleOutline } from "ionicons/icons";
import { useRouter } from "vue-router";

const router = useRouter();

function showFooter() {
if (['/tabs/settings', '/tabs/brokering'].includes(router.currentRoute.value.path)) return true
return false
}
</script>

<style scoped>
Expand Down
Loading