Skip to content

Commit

Permalink
Merge branch 'main' into hotwax#246
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Mar 15, 2024
2 parents 0047a28 + 6ef849a commit 03fe834
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 39 deletions.
56 changes: 40 additions & 16 deletions package-lock.json

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

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
};
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,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 +52,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
1 change: 0 additions & 1 deletion src/views/InventoryReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
import { UploadService } from "@/services/UploadService";
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 Down
22 changes: 1 addition & 21 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,7 @@

<hr />

<div class="section-header">
<h1>
{{ $t('App') }}
<p class="overline" >{{ "Version: " + appVersion }}</p>
</h1>
<div class="ion-text-end">
<p class="overline">{{ "Built: " + getDateTime(appInfo.builtTime) }}</p>
<ion-button v-if="pwaState.updateExists" @click="refreshApp()" fill="outline" color="dark" size="small">{{ $t("Update") }}</ion-button>
</div>
</div>
<DxpAppVersionInfo />

<section>
<ion-card>
Expand Down Expand Up @@ -142,8 +133,6 @@ export default defineComponent({
sampleDateTime: '',
dateTimeFormat: '',
defaultDateTimeFormat: process.env.VUE_APP_DATE_FORMAT ? process.env.VUE_APP_DATE_FORMAT : 'MM/dd/yyyy',
appInfo: (process.env.VUE_APP_VERSION_INFO ? JSON.parse(process.env.VUE_APP_VERSION_INFO) : {}) as any,
appVersion: ""
};
},
computed: {
Expand All @@ -156,7 +145,6 @@ export default defineComponent({
mounted(){
this.dateTimeFormat = this.currentDateTimeFormat
this.parseSampleDateTime();
this.appVersion = this.appInfo.branch ? (this.appInfo.branch + "-" + this.appInfo.revision) : this.appInfo.tag;
},
methods: {
updateDateTimeFormat(){
Expand Down Expand Up @@ -184,14 +172,6 @@ export default defineComponent({
},
goToLaunchpad() {
window.location.href = `${process.env.VUE_APP_LOGIN_URL}`
},
getDateTime(time: any) {
return DateTime.fromMillis(time).toLocaleString(DateTime.DATETIME_MED);
},
refreshApp() {
this.store.dispatch('user/updatePwaState', { registration: this.pwaState.registration, updateExists: false });
if (!this.pwaState.registration || !this.pwaState.registration.waiting) return
this.pwaState.registration.waiting.postMessage({ type: 'SKIP_WAITING' })
}
},
setup(){
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
Expand Down

0 comments on commit 03fe834

Please sign in to comment.