@feedmepos/mf-order-setting 0.0.100 → 0.0.102
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/dist/{DisplaySystemView-bnG_JNDd.js → DisplaySystemView-jnt6letY.js} +4 -4
- package/dist/{FoodCourtInvitationsView-DbuetF4z.js → FoodCourtInvitationsView-DoynqFWB.js} +4 -4
- package/dist/{FoodCourtOrderSettingsView-BXgApCVG.js → FoodCourtOrderSettingsView-DYZLhTHy.js} +1 -1
- package/dist/{FoodCourtOrdersView-K0iC1arR.js → FoodCourtOrdersView-CAPOycT3.js} +3 -3
- package/dist/{FoodCourtStallsView-DijfdyBw.js → FoodCourtStallsView-CRMTt5BB.js} +2 -2
- package/dist/{FoodCourtStatusView-DTriHcSD.js → FoodCourtStatusView-C-b-eI-8.js} +1 -1
- package/dist/{KioskDevicesView-d2SWWkhC.js → KioskDevicesView-B0U9JxRl.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-DA6c96uZ.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-V3ai4FVI.js} +5 -5
- package/dist/{KioskSettingView-I7Hgzrvr.js → KioskSettingView-rdom_aS8.js} +3 -3
- package/dist/{KioskView-B_lLNsaU.js → KioskView-DOON9zR6.js} +6 -6
- package/dist/{OrderSettingsView-8OS93YGL.js → OrderSettingsView-BBCnekaj.js} +10959 -10953
- package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-K0oCZMt8.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-DjoTyV6m.js} +1 -1
- package/dist/{app-qdN8kXAM.js → app-Dvk30CIa.js} +511 -507
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-C-IKwmsU.js → dayjs.min-DUFHhM7O.js} +1 -1
- package/dist/{featureFlag-z_-AhzUC.js → featureFlag-BvcirzHS.js} +1 -1
- package/dist/frontend/mf-order/src/api/order-setting/index.d.ts +3 -1
- package/dist/frontend/mf-order/src/api/order-setting/queue-counter.d.ts +14 -0
- package/dist/frontend/mf-order/src/app.d.ts +4 -0
- package/dist/frontend/mf-order/src/main.d.ts +4 -0
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-BxK-mqfV.js → index-C4n5H7t3.js} +1 -1
- package/dist/index-C5n6lil6.js +39 -0
- package/dist/{index-DjtNAyFp.js → index-CGxCWKHB.js} +4 -4
- package/dist/{index-BK-RT8YN.js → index-CW4VlFWz.js} +1 -1
- package/dist/{index-WSlqpTW2.js → index-CaHG3M7C.js} +1 -1
- package/dist/{index-DfsaaxdM.js → index-ILnighyU.js} +1 -1
- package/dist/{order.dto-BTF8MlM5.js → order.dto-Cb_gh3iB.js} +1119 -1116
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +236 -2
- package/dist/package/entity/order-setting/queue/queue.dto.d.ts +263 -0
- package/package.json +1 -1
- package/src/api/order-setting/index.ts +4 -2
- package/src/api/order-setting/queue-counter.spec.ts +74 -0
- package/src/api/order-setting/queue-counter.ts +34 -0
- package/src/locales/en-US.json +1 -0
- package/src/locales/ja-JP.json +1 -0
- package/src/locales/th-TH.json +1 -0
- package/src/locales/zh-CN.json +1 -0
- package/src/views/order-settings/queue/QueueSetting.source.spec.ts +29 -0
- package/src/views/order-settings/queue/QueueSetting.vue +22 -1
- package/src/views/order-settings/reservation/ReservationSetting.vue +710 -715
- package/src/views/order-settings/reservation/reservation-pos-note.spec.ts +42 -0
- package/dist/index-DeUtM1Z8.js +0 -24
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { resolve } from 'node:path'
|
|
3
|
+
import { describe, expect, it } from 'vitest'
|
|
4
|
+
|
|
5
|
+
import { RESERVATION_MIN_POS_VERSION } from '../dine-in/reservation-pos'
|
|
6
|
+
|
|
7
|
+
// ITS-002856: the Reservation tab says, above "Online booking", that reservations need
|
|
8
|
+
// POS v8 8.0.2 or later on the Main POS, in the warning style of the time-based rule note.
|
|
9
|
+
const page = readFileSync(resolve(__dirname, 'ReservationSetting.vue'), 'utf8')
|
|
10
|
+
const locales = ['en-US', 'ja-JP', 'th-TH', 'zh-CN'].map((name) => ({
|
|
11
|
+
name,
|
|
12
|
+
json: JSON.parse(readFileSync(resolve(__dirname, `../../../locales/${name}.json`), 'utf8')),
|
|
13
|
+
}))
|
|
14
|
+
|
|
15
|
+
function find(node: unknown, key: string): string | undefined {
|
|
16
|
+
if (!node || typeof node !== 'object') return undefined
|
|
17
|
+
for (const [k, v] of Object.entries(node)) {
|
|
18
|
+
if (k === key && typeof v === 'string') return v
|
|
19
|
+
const found = find(v, key)
|
|
20
|
+
if (found) return found
|
|
21
|
+
}
|
|
22
|
+
return undefined
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
describe('ITS-002856: the reservation POS note', () => {
|
|
26
|
+
it('sits above the switch as a warning, with the shared minimum version', () => {
|
|
27
|
+
const note = page.indexOf("t('order.reservationNeedsPosV8', { min: RESERVATION_MIN_POS_VERSION })")
|
|
28
|
+
expect(note).toBeGreaterThan(-1)
|
|
29
|
+
expect(note).toBeLessThan(page.indexOf("'Online booking'"))
|
|
30
|
+
expect(page.slice(page.lastIndexOf('<FmHelperText', note), note)).toContain(":state=\"'warning'\"")
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
it('has the text in every language, naming the version and POS v7', () => {
|
|
34
|
+
for (const { name, json } of locales) {
|
|
35
|
+
const text = find(json, 'reservationNeedsPosV8')
|
|
36
|
+
expect(text, name).toBeTruthy()
|
|
37
|
+
expect(text, name).toContain('{min}')
|
|
38
|
+
expect(text, name).toContain('POS v7')
|
|
39
|
+
}
|
|
40
|
+
expect(RESERVATION_MIN_POS_VERSION).toBe('8.0.2')
|
|
41
|
+
})
|
|
42
|
+
})
|
package/dist/index-DeUtM1Z8.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { g as n, s as a, a as r, r as e } from "./index-BxK-mqfV.js";
|
|
2
|
-
import "./order.dto-BTF8MlM5.js";
|
|
3
|
-
async function i() {
|
|
4
|
-
const t = await e().get("/order-settings");
|
|
5
|
-
return n(t);
|
|
6
|
-
}
|
|
7
|
-
async function c(t) {
|
|
8
|
-
const s = await e().put("/order-settings", t);
|
|
9
|
-
return n(s);
|
|
10
|
-
}
|
|
11
|
-
const d = {
|
|
12
|
-
getOrderSetting: i,
|
|
13
|
-
updateOrderSetting: c
|
|
14
|
-
};
|
|
15
|
-
async function o() {
|
|
16
|
-
return n(await a().get(`balance/${r.getBusinessId()}`));
|
|
17
|
-
}
|
|
18
|
-
const p = {
|
|
19
|
-
read: o
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
d as O,
|
|
23
|
-
p as s
|
|
24
|
-
};
|