@feedmepos/mf-order-setting 0.0.14-alpha → 0.0.15-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-order-setting",
3
- "version": "0.0.14-alpha",
3
+ "version": "0.0.15-alpha",
4
4
  "type": "module",
5
5
  "module": "./dist/app.js",
6
6
  "license": "UNLICENSED",
package/src/app.ts CHANGED
@@ -1,7 +1,15 @@
1
1
  import type { App } from 'vue'
2
+ import enUS from "./locales/en-US.json"
3
+ import zhCN from "./locales/zh-CN.json"
4
+
2
5
  export { default as FmApp } from './App.vue'
3
6
  export { routes as routers } from '../src/router/routes'
4
7
 
8
+ export const i18nMessages = {
9
+ "en-US": enUS,
10
+ "zh-CN": zhCN
11
+ }
12
+
5
13
  export function initOrderSettingApp(app: App) {
6
14
 
7
15
  }
package/src/main.ts CHANGED
@@ -11,13 +11,7 @@ import { getAuth, signInWithCustomToken } from 'firebase/auth'
11
11
  import { initializeApp } from 'firebase/app'
12
12
  import { useIframeStore } from './stores/iframe'
13
13
  import { createFeedMeI18n, type I18n, detectLocale } from "@feedmepos/mf-common"
14
- import enUS from "./locales/en-US.json"
15
- import zhCN from "./locales/zh-CN.json"
16
-
17
- export const i18nMessages = {
18
- "en-US": enUS,
19
- "zh-CN": zhCN
20
- }
14
+ import { i18nMessages } from './app'
21
15
 
22
16
  function initI18n(): I18n {
23
17
  const i18n = createFeedMeI18n({
@@ -30,16 +24,15 @@ function initI18n(): I18n {
30
24
 
31
25
  const app = createApp(Entry)
32
26
 
33
- app.use(initI18n())
34
- app.use(createPinia())
35
- app.use(router)
36
-
37
-
38
-
39
27
  app.use(FeedMeUI, {
40
28
  locale: detectLocale(),
41
29
  })
42
30
 
31
+ app.use(initI18n())
32
+
33
+ app.use(createPinia())
34
+ app.use(router)
35
+
43
36
  const CoreStore = useCoreStore();
44
37
  const iframeMode = computed(() => {
45
38
  return new URLSearchParams(window.location.search).get('iframe') === 'true';
@@ -54,7 +54,7 @@ onMounted(async () => {
54
54
  await startAsyncCallWithErr(async () => {
55
55
  await Promise.all(
56
56
  restaurants.value.map(async (r) => {
57
- changeRestaurant(r)
57
+ await changeRestaurant(r)
58
58
  await restaurantStore.readRestaurantSetting(r._id)
59
59
  })
60
60
  )
@@ -192,11 +192,6 @@ function createRule() {
192
192
  condition: {}
193
193
  }
194
194
  ]
195
- // data.value.rules.push({
196
- // rate: data.value.rate,
197
- // inclusive: data.value.inclusive,
198
- // condition: {}
199
- // })
200
195
  }
201
196
 
202
197
  function updateRule(index: number, rule: FdoServiceChargeRule) {
@@ -205,7 +200,6 @@ function updateRule(index: number, rule: FdoServiceChargeRule) {
205
200
 
206
201
  function deleteRule(index: number) {
207
202
  data.value.rules = data.value.rules.filter((_, id) => id !== index)
208
- // data.value.rules.splice(index, 1)
209
203
  }
210
204
 
211
205
  import { useSnackbarFunctions } from '@/components/snackbar'
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./app-CbKAPxxI.js";
2
- export {
3
- f as default
4
- };