Skip to content

Commit

Permalink
Implemented: modal for gitbook Search functionality (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Jun 18, 2024
1 parent ed69f5b commit 5bcc659
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
17 changes: 17 additions & 0 deletions src/components/DxpGitBookSearch.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<template>
<ion-header>
<ion-toolbar>
<ion-title>{{ "Help" }}</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>
<ion-item>
<ion-label>{{ "item 1" }}</ion-label>
</ion-item>
</ion-content>
</template>

<script setup lang="ts">
import { IonHeader, IonTitle, IonToolbar, IonItem, IonLabel, IonContent } from "@ionic/vue";
</script>
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createPinia } from "pinia";
import { useProductIdentificationStore } from "./store/productIdentification";
import { useAuthStore } from "./store/auth";
import { DxpAppVersionInfo, DxpImage, DxpLanguageSwitcher, DxpLogin, DxpMenuFooterNavigation, DxpOmsInstanceNavigator, DxpProductIdentifier, DxpShopifyImg, DxpTimeZoneSwitcher, DxpUserProfile } from "./components";
import { goToOms, getProductIdentificationValue } from "./utils";
import { goToOms, getProductIdentificationValue, openGitBookSearchModal } from "./utils";
import { initialiseFirebaseApp } from "./utils/firebase"
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { createI18n } from 'vue-i18n'
Expand Down Expand Up @@ -127,6 +127,7 @@ export {
initialiseFirebaseApp,
loginContext,
notificationContext,
openGitBookSearchModal,
productIdentificationContext,
shopifyImgContext,
translate,
Expand Down
17 changes: 15 additions & 2 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { toastController } from "@ionic/vue";
import { modalController, toastController } from "@ionic/vue";
import { DateTime } from "luxon";
import { translate } from "src";
import DxpGitBookSearch from "../components/DxpGitBookSearch.vue";
import { computed, ref } from "vue";

const goToOms = (token: string, oms: string) => {
Expand Down Expand Up @@ -52,9 +53,21 @@ const getCurrentTime = (zone: string, format = 't ZZZZ') => {
return DateTime.now().setZone(zone).toFormat(format)
}

const openGitBookSearchModal = async () => {
const modal = await modalController.create({
component: DxpGitBookSearch
})

console.log(modal);


return modal.present();
}

export {
getCurrentTime,
getProductIdentificationValue,
goToOms,
showToast
showToast,
openGitBookSearchModal
}

0 comments on commit 5bcc659

Please sign in to comment.