Skip to content

Commit

Permalink
Merge pull request #26 from amansinghbais/23-gitbook-modal
Browse files Browse the repository at this point in the history
Implemented: logic to show gitbookSearch modal from dxp (#23)
  • Loading branch information
ravilodhi authored Jul 10, 2024
2 parents 53d1994 + 4fbe5cf commit 079ead6
Show file tree
Hide file tree
Showing 10 changed files with 406 additions and 300 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ VUE_APP_PERMISSION_ID=
VUE_APP_DEFAULT_LOG_LEVEL="error"
VUE_APP_COMPANY_PARTY_ID="COMPANY"
VUE_APP_LOGIN_URL="https://launchpad.hotwax.io/login"
VUE_APP_FACILITIES_LOGIN_URL="https://facilities.hotwax.io/login"
VUE_APP_FACILITIES_LOGIN_URL="https://facilities.hotwax.io/login"
VUE_APP_GITBOOK_API_KEY=""
VUE_APP_SPACE_ID=""
VUE_APP_GITBOOK_BASE_URL=""
645 changes: 353 additions & 292 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"@capacitor/core": "^2.4.7",
"@hotwax/app-version-info": "^1.0.0",
"@hotwax/apps-theme": "^1.2.6",
"@hotwax/dxp-components": "^1.13.0",
"@hotwax/oms-api": "^1.14.0",
"@hotwax/dxp-components": "^1.15.0",
"@hotwax/oms-api": "^1.15.0",
"@ionic/core": "^7.6.0",
"@ionic/vue": "^7.6.0",
"@ionic/vue-router": "^7.6.0",
Expand Down
5 changes: 4 additions & 1 deletion src/adapter/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { api, client, getConfig, getProductIdentificationPref, getUserFacilities, initialise, logout, resetConfig, setProductIdentificationPref, updateInstanceUrl, updateToken } from '@hotwax/oms-api'
import { api, askQuery, client, getConfig, getGitBookPage, getProductIdentificationPref, getUserFacilities, initialise, logout, resetConfig, searchQuery, setProductIdentificationPref, updateInstanceUrl, updateToken } from '@hotwax/oms-api'

export {
api,
askQuery,
client,
getConfig,
getGitBookPage,
getProductIdentificationPref,
getUserFacilities,
initialise,
logout,
resetConfig,
searchQuery,
setProductIdentificationPref,
updateInstanceUrl,
updateToken
Expand Down
16 changes: 16 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
"Add": "Add",
"Add a custom prefix to HotWax order IDs: <inputValue>10001": "Add a custom prefix to HotWax order IDs: <inputValue>10001",
"Add configurations": "Add configurations",
"Analyzing the question to answer your question.": "Analyzing the question to answer your question.",
"Answer based on resources": "Answer based on {count} resources",
"App": "App",
"Approval": "Approval",
"Approve on import": "Approve on import",
"Ask": "Ask",
"Ask...": "Ask...",
"Ask me anything?": "Ask me anything?",
"Auto approve orders": "Auto approve orders",
"Auto cancellations days": "Auto cancellations days",
"Auto order cancellation": "Auto order cancellation",
Expand Down Expand Up @@ -41,11 +46,15 @@
"Failed to remove tag.": "Failed to remove tag.",
"Failed to update product store name.": "Failed to update product store name.",
"Failed to update product store settings.": "Failed to update product store settings.",
"Fetching resources...": "Fetching resources...",
"Fetching time zones": "Fetching time zones",
"Fulfillment": "Fulfillment",
"Global identifier": "Global identifier",
"Go to OMS": "Go to OMS",
"Go to Launchpad": "Go to Launchpad",
"go to page": "go to page",
"go to section": "go to section",
"Help": "Help",
"Hold pre-order physical inventory": "Hold pre-order physical inventory",
"ID": "ID",
"ID prefix": "ID prefix",
Expand All @@ -60,7 +69,10 @@
"Manage configurations": "Manage configurations",
"Minimum shipment threshold": "Minimum shipment threshold",
"Name": "Name",
"No answer found.": "No answer found.",
"No page found.": "No page found.",
"No product store found.": "No product store found.",
"No resource found.": "No resource found.",
"No time zone found": "No time zone found",
"Notifications": "Nofifications",
"OMS": "OMS",
Expand Down Expand Up @@ -93,6 +105,7 @@
"Product store name updated successfully.": "Product store name updated successfully.",
"Product store represents a brand in OMS": "Product store represents a brand in OMS",
"Product store setting updated successfully.": "Product store setting updated successfully.",
"Related Queries": "Related Queries",
"Returns": "Returns",
"Re-route fulfillment": "Re-route fulfillment",
"Routing": "Routing",
Expand All @@ -101,6 +114,9 @@
"Search country": "Search country",
"Search time zones": "Search time zones",
"Soft Allocation": "Soft Allocation",
"Search": "Search",
"Search...": "Search...",
"Searching your query.": "Searching your query.",
"Secondary identifier": "Secondary identifier",
"Select": "Select",
"Select operating countries": "Select operating countries",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import en from './en.json';

export default {
'en-US': en
};
9 changes: 7 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import { DateTime } from "luxon";
import logger from './logger';
import { dxpComponents } from "@hotwax/dxp-components"
import { login, logout, loader } from "@/user-utils";
import { getConfig, initialise } from '@/adapter';
import { askQuery, getConfig, getGitBookPage, initialise, searchQuery } from '@/adapter';
import localeMessages from '@/locales';

const app = createApp(App)
.use(IonicVue, {
Expand All @@ -49,8 +50,12 @@ const app = createApp(App)
logout,
loader,
appLoginUrl: process.env.VUE_APP_LOGIN_URL as string,
askQuery,
getConfig,
initialise
getGitBookPage,
localeMessages,
initialise,
searchQuery
});

// Filters are removed in Vue 3 and global filter introduced https://v3.vuejs.org/guide/migration/filters.html#global-filters
Expand Down
3 changes: 3 additions & 0 deletions src/views/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<ion-icon :icon="storefrontOutline" />
<ion-label>{{ translate("Product store") }}</ion-label>
</ion-tab-button>

<DxpGitBookSearch />

<ion-tab-button tab="more" href="/tabs/settings">
<ion-icon :icon="settingsOutline" />
<ion-label>{{ translate("Settings") }}</ion-label>
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"resolveJsonModule": true,
"types": [
"webpack-env"
],
Expand Down
13 changes: 11 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')
require("@hotwax/app-version-info")

module.exports = {
pluginOptions: {
i18n: {
Expand All @@ -12,5 +12,14 @@ module.exports = {
fullInstall: true,
enableInSFC: true
}
}
},
configureWebpack: {
resolve: {
alias: {
vue: path.resolve('./node_modules/vue')
}
}
},
runtimeCompiler: true,
transpileDependencies: ['@hotwax/dxp-components']
}

0 comments on commit 079ead6

Please sign in to comment.