Skip to content

Commit

Permalink
Merge branch 'main' into login-errorhandling
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 authored Mar 18, 2024
2 parents 6b99623 + 2d4b425 commit 18b49fc
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 143 deletions.
129 changes: 54 additions & 75 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.1.0",
"@hotwax/dxp-components": "^1.11.0",
"@hotwax/oms-api": "^1.10.0",
"@hotwax/dxp-components": "^1.12.1",
"@hotwax/oms-api": "^1.13.0",
"@ionic/core": "6.7.5",
"@ionic/vue": "6.7.5",
"@ionic/vue-router": "6.7.5",
Expand Down
6 changes: 3 additions & 3 deletions src/components/MissingSkuModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<ion-list v-if="segmentSelected === 'completed'">
<ion-item v-for="item in getCompletedItems()" :key="item.shopifyProductSKU">
<ion-thumbnail slot="start">
<ShopifyImg :src="item.imageUrl" size="small" />
<DxpShopifyImg :src="item.imageUrl" size="small" />
</ion-thumbnail>
<ion-label>
<p class="overline">{{ item.parentProductName }}</p>
Expand Down Expand Up @@ -92,7 +92,7 @@ import { closeOutline, saveOutline } from 'ionicons/icons';
import { defineComponent } from "@vue/runtime-core";
import { mapGetters, useStore } from "vuex";
import { ref } from "vue";
import { ShopifyImg } from "@hotwax/dxp-components";
import { DxpShopifyImg } from "@hotwax/dxp-components";
export default defineComponent({
name: "MissingSkuModal",
Expand All @@ -117,7 +117,7 @@ export default defineComponent({
IonTitle,
IonThumbnail,
IonToolbar,
ShopifyImg
DxpShopifyImg
},
data(){
return {
Expand Down
6 changes: 3 additions & 3 deletions src/components/PurchaseOrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div class="list-item">
<ion-item lines="none">
<ion-thumbnail slot="start">
<ShopifyImg :src="item.imageUrl" size="small" />
<DxpShopifyImg :src="item.imageUrl" size="small" />
</ion-thumbnail>
<ion-label class="ion-text-wrap">
<h3>{{ item.pseudoId }}</h3>
Expand Down Expand Up @@ -55,7 +55,7 @@
</div>
</template>
<script lang="ts">
import { ShopifyImg } from "@hotwax/dxp-components";
import { DxpShopifyImg } from "@hotwax/dxp-components";
import {
IonCheckbox,
IonThumbnail,
Expand All @@ -82,7 +82,7 @@ export default defineComponent({
IonIcon,
IonItem,
IonLabel,
ShopifyImg
DxpShopifyImg
},
props: {
purchaseOrders: {
Expand Down
2 changes: 2 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"Backorder": "Backorder",
"Blank": "Blank",
"Buffer days": "Buffer days",
"Built: ": "Built: {builtDateTime}",
"Bulk adjustment": "Bulk adjustment",
"Buffer quantity": "Buffer quantity",
"cancel": "cancel",
Expand Down Expand Up @@ -168,6 +169,7 @@
"Upload a file": "Upload a file",
"Upload purchase order": "Upload purchase order",
"Username": "Username",
"Version: ": "Version: {appVersion}",
"View all date time formats supported by the HotWax Import app.": "View all date time formats supported by the HotWax Import app.",
"View": "View",
"Would you like to update your time zone to . Your profile is currently set to . This setting can always be changed from the settings menu.": "Would you like to update your time zone to {localTimeZone}. Your profile is currently set to {profileTimeZone}. This setting can always be changed from the settings menu."
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
};
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router';
import './registerServiceWorker'

import { IonicVue } from '@ionic/vue';

Expand Down Expand Up @@ -33,6 +32,7 @@ import logger from './logger';
import { dxpComponents } from '@hotwax/dxp-components'
import { login, logout, loader } from './user-utils';
import { getConfig, initialise } from '@hotwax/oms-api';
import localeMessages from './locales';

const app = createApp(App)
.use(IonicVue, {
Expand All @@ -51,7 +51,8 @@ const app = createApp(App)
loader,
appLoginUrl: process.env.VUE_APP_LOGIN_URL as string,
getConfig,
initialise
initialise,
localeMessages
});

// Filters are removed in Vue 3 and global filter introduced https://v3.vuejs.org/guide/migration/filters.html#global-filters
Expand Down
31 changes: 0 additions & 31 deletions src/registerServiceWorker.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/services/UserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const login = async (username: string, password: string): Promise <any> => {

const checkPermission = async (payload: any): Promise <any> => {
let baseURL = store.getters['user/getInstanceUrl'];
baseURL = baseURL && baseURL.startsWith('http') ? baseURL : `https://${baseURL}.hotwax.io/api/`;
baseURL = baseURL && baseURL.startsWith('http') ? (baseURL.includes('/api') ? baseURL : `${baseURL}/api/`) : `https://${baseURL}.hotwax.io/api/`;
return client({
url: "checkPermission",
method: "post",
Expand Down
7 changes: 3 additions & 4 deletions src/views/InventoryReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<div class="list-item">
<ion-item lines="none">
<ion-thumbnail slot="start">
<ShopifyImg :src="item.imageUrl" size="small" />
<DxpShopifyImg :src="item.imageUrl" size="small" />
</ion-thumbnail>
<ion-label class="ion-text-wrap">
<h3>{{ item.pseudoId }}</h3>
Expand Down Expand Up @@ -95,9 +95,8 @@
</template>
<script lang="ts">
import { UploadService } from "@/services/UploadService";
import { ShopifyImg } from "@hotwax/dxp-components";
import { DxpShopifyImg } from "@hotwax/dxp-components";
import ProductPopover from '@/components/ProductPopover.vue'
import BulkInventoryAdjustmentModal from '@/components/BulkInventoryAdjustmentModal.vue'
import MissingFacilitiesModal from '@/components/MissingFacilitiesModal.vue'
import { defineComponent } from 'vue';
import { mapGetters, useStore } from "vuex";
Expand All @@ -110,7 +109,7 @@ import { businessOutline, calculatorOutline, chevronForwardOutline, ellipsisVert
export default defineComponent({
name: 'InventoryDetail',
components: {
ShopifyImg,
DxpShopifyImg,
IonCard,
IonCardContent,
IonPage,
Expand Down
Loading

0 comments on commit 18b49fc

Please sign in to comment.