@feedmepos/mf-order-setting 0.0.105 → 0.0.106
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-aLqc6lz9.js +9068 -0
- package/dist/{FoodCourtInvitationsView-Bo174yfB.js → FoodCourtInvitationsView-B30qld2i.js} +4 -4
- package/dist/{FoodCourtOrderSettingsView-uUe53O0Z.js → FoodCourtOrderSettingsView-CWmaKgbe.js} +1 -1
- package/dist/{FoodCourtOrdersView-CxC5oGp2.js → FoodCourtOrdersView-FfrganVo.js} +4 -4
- package/dist/{FoodCourtStallsView-BEpRBmSL.js → FoodCourtStallsView-CpGZNP6p.js} +2 -2
- package/dist/{FoodCourtStatusView-DA7mdsuf.js → FoodCourtStatusView-ljQUwIwk.js} +1 -1
- package/dist/{KioskDevicesView-BY9Egk75.js → KioskDevicesView-BwDAYIhX.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-CxroxD-b.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-VidDJfGG.js} +487 -473
- package/dist/KioskSettingView-mfhi9vuf.js +1240 -0
- package/dist/{KioskView-BYL0u6kj.js → KioskView-6p5h92fk.js} +173 -167
- package/dist/{OrderSettingsView-BBHAhgE9.js → OrderSettingsView-Cf_Ye9U_.js} +11 -11
- package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang--9bdtLE1.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-TJJ3PBlq.js} +1 -1
- package/dist/{app-BV2USn83.js → app-BorqCaJT.js} +6965 -6415
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-Bp4Kgnt_.js → dayjs.min-CTTY2vkL.js} +1 -1
- package/dist/display-preview/assets/{BandBoard-DIcfXsNV.js → BandBoard-BLwgs3WX.js} +1 -1
- package/dist/display-preview/assets/{CarouselBlock-XAhTyEWB.js → CarouselBlock-CUrVSbQp.js} +1 -1
- package/dist/display-preview/assets/{CategoryBoard-DBKe18hv.js → CategoryBoard-BkvpcxHR.js} +1 -1
- package/dist/display-preview/assets/{ImageBlock-BCbnYSHq.js → ImageBlock-0UYDHTm0.js} +1 -1
- package/dist/display-preview/assets/{PickupMode-Df_TPCh8.js → PickupMode-BY4iL0BH.js} +1 -1
- package/dist/display-preview/assets/{StatusBoard-28z3bPOf.js → StatusBoard-DGEZ6hvH.js} +1 -1
- package/dist/display-preview/assets/{TextBlock-CvJKITtx.js → TextBlock-CxKwtqoO.js} +1 -1
- package/dist/display-preview/assets/{VideoBlock-Dop43wDv.js → VideoBlock-BKkxdLAd.js} +1 -1
- package/dist/display-preview/assets/{index-cqMoOpSN.js → index-B1olKQmQ.js} +2 -2
- package/dist/display-preview/assets/{pickupView-DRMVXqrc.js → pickupView-CB9fV5jD.js} +1 -1
- package/dist/display-preview/images/feedme-bg-left-image.png +0 -0
- package/dist/display-preview/index.html +1 -1
- package/dist/{featureFlag-C1uGG7u6.js → featureFlag-DFenoxmg.js} +1 -1
- package/dist/frontend/mf-order/src/api/display-system/index.d.ts +2 -2
- package/dist/frontend/mf-order/src/app.d.ts +118 -12
- package/dist/frontend/mf-order/src/composables/useDisplaySystemPermission.d.ts +5 -0
- package/dist/frontend/mf-order/src/main.d.ts +118 -12
- package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +9 -11
- package/dist/frontend/mf-order/src/modules/display-system/legacy-ods/convert.d.ts +10 -0
- package/dist/frontend/mf-order/src/modules/kiosk/deviceCount.d.ts +18 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +12 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/tableNumberHint.d.ts +33 -0
- package/dist/frontend/mf-order/src/stores/display-system/index.d.ts +10 -70
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +51 -0
- package/dist/frontend/mf-order/src/views/display-system/DisplayTemplateEditor.vue.d.ts +2 -0
- package/dist/frontend/mf-order/src/views/display-system/legacy-ods/LegacyOdsTemplateList.vue.d.ts +11 -2
- package/dist/frontend/mf-order/src/views/display-system/view-selection.d.ts +1 -2
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-0GuybwuA.js → index-BZkJr7iu.js} +1 -1
- package/dist/{index-HF3qh9qG.js → index-C4Isv-r7.js} +1 -1
- package/dist/{index-CRNutZC_.js → index-DuJOWWP8.js} +4 -4
- package/dist/{index-D0ZIByef.js → index-nUvyt9Wm.js} +1 -1
- package/dist/{index-KWOCCun9.js → index-tLkJL436.js} +2 -2
- package/dist/{order.dto-GQaBESZq.js → order.dto-nVwtcdX2.js} +6049 -5992
- package/dist/package/entity/display/mediaHosts.d.ts +4 -0
- package/dist/package/entity/food-court/order-v2.do.d.ts +667 -0
- package/dist/package/entity/food-court/order-v2.dto.d.ts +262 -0
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +16 -0
- package/dist/package/entity/order-platform/menu.dto.d.ts +44 -44
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +52 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +293 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +42 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +174 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +42 -0
- package/dist/package/entity/websocket/websocket.dto.d.ts +92 -0
- package/dist/style.css +1 -1
- package/dist/{useInternalUser-C39xpsBU.js → useInternalUser-HhxjbzGl.js} +1 -1
- package/package.json +3 -3
- package/src/api/display-system/index.ts +2 -2
- package/src/composables/useDisplaySystemPermission.spec.ts +27 -0
- package/src/composables/useDisplaySystemPermission.ts +16 -0
- package/src/locales/en-US.json +51 -17
- package/src/locales/ja-JP.json +26 -11
- package/src/locales/th-TH.json +32 -17
- package/src/locales/zh-CN.json +51 -17
- package/src/modules/display-system/interface.spec.ts +1 -32
- package/src/modules/display-system/interface.ts +7 -24
- package/src/modules/display-system/legacy-ods/convert.spec.ts +65 -0
- package/src/modules/display-system/legacy-ods/convert.ts +95 -0
- package/src/modules/display-system/legacy-ods/media.spec.ts +16 -0
- package/src/modules/kiosk/deviceCount.spec.ts +23 -0
- package/src/modules/kiosk/deviceCount.ts +21 -0
- package/src/modules/order-setting/kiosk/interface.ts +13 -0
- package/src/modules/order-setting/kiosk/tableNumberHint.spec.ts +68 -0
- package/src/modules/order-setting/kiosk/tableNumberHint.ts +71 -0
- package/src/router/display-system-permission.spec.ts +13 -0
- package/src/router/routes.ts +2 -1
- package/src/stores/display-system/index.spec.ts +104 -0
- package/src/stores/display-system/index.ts +18 -7
- package/src/stores/order-setting/mapper.ts +11 -2
- package/src/views/display-system/DisplayInspector.vue +3 -0
- package/src/views/display-system/DisplayModulePickerDialog.vue +8 -0
- package/src/views/display-system/DisplaySystemView.conversion.spec.ts +164 -0
- package/src/views/display-system/DisplaySystemView.vue +72 -26
- package/src/views/display-system/DisplayTemplateEditor.spec.ts +18 -0
- package/src/views/display-system/DisplayTemplateEditor.vue +8 -2
- package/src/views/display-system/legacy-ods/LegacyOdsTemplateList.spec.ts +44 -4
- package/src/views/display-system/legacy-ods/LegacyOdsTemplateList.vue +12 -4
- package/src/views/display-system/view-selection.spec.ts +4 -17
- package/src/views/display-system/view-selection.ts +3 -4
- package/src/views/kiosk/devices/KioskDevicesView.vue +6 -2
- package/src/views/kiosk/devices/KioskLicenseSummary.spec.ts +45 -0
- package/src/views/kiosk/devices/KioskLicenseSummary.vue +9 -2
- package/src/views/kiosk/settings/KioskSettingView.vue +140 -6
- package/vitest.config.ts +1 -0
- package/dist/DisplaySystemView-CFr9DnaD.js +0 -8926
- package/dist/KioskSettingView-DPaQ7YFV.js +0 -1124
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { DISPLAY_BUNDLED_IMAGES, isAllowedDisplayMediaUrl } from '@entity'
|
|
2
|
+
import type { DisplayTemplateDraft, DisplayZoneDraft } from '../interface'
|
|
3
|
+
import type { OdsConfigEntry } from './interface'
|
|
4
|
+
|
|
5
|
+
export interface LegacyOdsConversion {
|
|
6
|
+
draft: DisplayTemplateDraft
|
|
7
|
+
/** Stable zone identity lets repeated conversion reopen the saved template. */
|
|
8
|
+
sourceZoneId: string
|
|
9
|
+
notices: string[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function canonical(value: unknown): string {
|
|
13
|
+
if (Array.isArray(value)) return `[${value.map(canonical).join(',')}]`
|
|
14
|
+
if (value && typeof value === 'object') {
|
|
15
|
+
return `{${Object.entries(value).filter(([, v]) => v !== undefined).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`).join(',')}}`
|
|
16
|
+
}
|
|
17
|
+
return JSON.stringify(value) ?? 'null'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Convert configuration only. Never writes the legacy brandkit or binds screens. */
|
|
21
|
+
export async function convertLegacyOds(entry: OdsConfigEntry, label: string): Promise<LegacyOdsConversion> {
|
|
22
|
+
const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(canonical(entry)))
|
|
23
|
+
const fingerprint = Array.from(new Uint8Array(digest)).slice(0, 10).map(v => v.toString(16).padStart(2, '0')).join('')
|
|
24
|
+
const sourceZoneId = `legacy_ods_${fingerprint}`
|
|
25
|
+
const notices = new Set<string>(['binding', 'orientation', 'completedOrders'])
|
|
26
|
+
function mediaUrl(url: string): string | undefined {
|
|
27
|
+
// Relative to the bundle base, including the Portal's nested preview URL.
|
|
28
|
+
const local = url.startsWith('/') ? url.slice(1) : url
|
|
29
|
+
if ((DISPLAY_BUNDLED_IMAGES as readonly string[]).includes(local)) return local
|
|
30
|
+
if (isAllowedDisplayMediaUrl(url)) return url
|
|
31
|
+
notices.add('missingImage')
|
|
32
|
+
return undefined
|
|
33
|
+
}
|
|
34
|
+
function number(value: unknown, fallback: number, min: number, max: number): number {
|
|
35
|
+
const result = typeof value === 'number' && Number.isFinite(value) ? Math.round(value) : fallback
|
|
36
|
+
const bounded = Math.max(min, Math.min(max, result))
|
|
37
|
+
if (bounded !== result) notices.add('sizeAdjusted')
|
|
38
|
+
return bounded
|
|
39
|
+
}
|
|
40
|
+
const display = entry.display
|
|
41
|
+
const status = display?.groupBy === 'status'
|
|
42
|
+
const board: DisplayZoneDraft = {
|
|
43
|
+
kind: 'ZONE', id: sourceZoneId,
|
|
44
|
+
block: {
|
|
45
|
+
id: 'legacy_pickup', type: status ? 'pickup.statusBoard' : 'pickup.categoryBoard',
|
|
46
|
+
props: {
|
|
47
|
+
rotateMs: number(display?.statusSlidingPeriod, 10000, 2000, 60000),
|
|
48
|
+
showDeliveryIcons: display?.showDeliveryIcons ?? true,
|
|
49
|
+
showCurrentOrder: display?.currentOrder?.enabled ?? true,
|
|
50
|
+
announce: true,
|
|
51
|
+
...(status ? {
|
|
52
|
+
layout: display?.statusLayout === 'vertical' ? 'VERTICAL' : 'HORIZONTAL',
|
|
53
|
+
columns: number(display?.statusColumnCount, 2, 1, 5),
|
|
54
|
+
showOrderCount: display?.showOrderCount ?? false,
|
|
55
|
+
showEstimatedTime: display?.showEstimatedTime ?? false
|
|
56
|
+
} : { showProgressBar: display?.showProgressBar ?? false })
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (display?.statusTemplate && display.statusTemplate !== 'default') notices.add('style')
|
|
61
|
+
if (display?.showOrderTypeTabs) notices.add('typeTabs')
|
|
62
|
+
if (status && display?.showProgressBar) notices.add('progress')
|
|
63
|
+
if (!status && (display?.showOrderCount || display?.showEstimatedTime)) notices.add('statistics')
|
|
64
|
+
const layout = entry.layout
|
|
65
|
+
if (layout?.boardWidthPercent !== undefined && layout.boardWidthPercent !== 100) notices.add('boardWidth')
|
|
66
|
+
if (layout?.footerMode === 'settingsIcon') notices.add('footer')
|
|
67
|
+
const background = layout?.background === undefined
|
|
68
|
+
? { url: '/images/feedme-bg.png', size: 'cover', position: 'center' }
|
|
69
|
+
: layout.background
|
|
70
|
+
if (background?.url) {
|
|
71
|
+
const url = mediaUrl(background.url)
|
|
72
|
+
if (url) board.background = { url, size: background.size ?? 'cover', position: background.position ?? 'center' }
|
|
73
|
+
}
|
|
74
|
+
const draft: DisplayTemplateDraft = {
|
|
75
|
+
schemaVersion: 2, orientation: 'LANDSCAPE', label,
|
|
76
|
+
...(entry.brandkitOverride ? { theme: { brandkitOverride: JSON.parse(JSON.stringify(entry.brandkitOverride)) } } : {}),
|
|
77
|
+
root: board
|
|
78
|
+
}
|
|
79
|
+
const panel = layout?.sidePanel
|
|
80
|
+
if (panel?.url) {
|
|
81
|
+
const url = mediaUrl(panel.url)
|
|
82
|
+
if (url) {
|
|
83
|
+
const width = number(panel.widthPercent, 30, 15, 70)
|
|
84
|
+
const fit = panel.objectFit?.toUpperCase() ?? 'COVER'
|
|
85
|
+
const image: DisplayZoneDraft = { kind: 'ZONE', id: 'legacy_image', block: {
|
|
86
|
+
id: 'legacy_media', type: 'media.image', props: { url, objectFit: ['COVER', 'CONTAIN'].includes(fit) ? fit : 'CONTAIN' }
|
|
87
|
+
} }
|
|
88
|
+
const children = [{ weight: width, node: image }, { weight: 100 - width, node: board }]
|
|
89
|
+
draft.root = { kind: 'SPLIT', direction: 'ROW', children: panel.position === 'right' ? children.reverse() : children }
|
|
90
|
+
if (display?.currentOrder?.enabled !== false) notices.add('currentOrder')
|
|
91
|
+
if (background) notices.add('background')
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return { draft, sourceZoneId, notices: [...notices] }
|
|
95
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { isAllowedDisplayMediaUrl, DISPLAY_BUNDLED_IMAGES } from '@entity'
|
|
3
|
+
import { existsSync } from 'node:fs'
|
|
4
|
+
import { resolve } from 'node:path'
|
|
5
|
+
|
|
6
|
+
describe('bundled ODS media', () => {
|
|
7
|
+
it('permits only known paths backed by files in the TV bundle', () => {
|
|
8
|
+
for (const path of DISPLAY_BUNDLED_IMAGES) {
|
|
9
|
+
expect(isAllowedDisplayMediaUrl(path)).toBe(true)
|
|
10
|
+
expect(existsSync(resolve(path === 'images/feedme-side.png' ? '../ods/public' : '../display-system-v3/public', path))).toBe(true)
|
|
11
|
+
}
|
|
12
|
+
for (const path of ['/images/unknown.png', '/images/../feedme-side.png', '//evil.example/image.png', '/images/feedme-side.png?redirect=1', 'https://feedme.cc.evil.example/a.png']) {
|
|
13
|
+
expect(isAllowedDisplayMediaUrl(path)).toBe(false)
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { deviceCountLabel } from './deviceCount'
|
|
3
|
+
import enUS from '@/locales/en-US.json'
|
|
4
|
+
|
|
5
|
+
describe('deviceCountLabel (ITS-003092)', () => {
|
|
6
|
+
it('names the outlet device count when nothing is filtered out', () => {
|
|
7
|
+
expect(deviceCountLabel(37, 37)).toEqual({ key: 'order.devicesAtOutlet', params: { count: 37, total: 37 } })
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
it('shows "X of Y" only while a search or filter hides devices', () => {
|
|
11
|
+
expect(deviceCountLabel(5, 37)).toEqual({ key: 'order.showingDevices', params: { count: 5, total: 37 } })
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it('an outlet with no devices reads as zero devices, not "0 of 0"', () => {
|
|
15
|
+
expect(deviceCountLabel(0, 0).key).toBe('order.devicesAtOutlet')
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('both texts say "devices", so they cannot be read as a licence count', () => {
|
|
19
|
+
const order = (enUS as any).order
|
|
20
|
+
expect(order.devicesAtOutlet).toMatch(/devices/i)
|
|
21
|
+
expect(order.showingDevices).toMatch(/devices/i)
|
|
22
|
+
})
|
|
23
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The count next to the device search (ITS-003092).
|
|
3
|
+
*
|
|
4
|
+
* It counts this outlet's DEVICES, never licences: licences are a business-wide
|
|
5
|
+
* pool and live in the licence cards above (`KioskLicenseSummary`, from the
|
|
6
|
+
* licence service). The old "Showing 38 of 38" read like "38 used of 38
|
|
7
|
+
* licences", so after an unbind support saw "37 of 37" and lost the licence
|
|
8
|
+
* total. Now the text names devices, and "Showing X of Y" appears only while a
|
|
9
|
+
* search or type filter hides some of them.
|
|
10
|
+
*/
|
|
11
|
+
export interface DeviceCountLabel {
|
|
12
|
+
key: 'order.devicesAtOutlet' | 'order.showingDevices'
|
|
13
|
+
params: { count: number; total: number }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function deviceCountLabel(shown: number, total: number): DeviceCountLabel {
|
|
17
|
+
return {
|
|
18
|
+
key: shown < total ? 'order.showingDevices' : 'order.devicesAtOutlet',
|
|
19
|
+
params: { count: shown, total }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { FdoEPaymentMethod, F_ORDER_PAYMENT_TYPE, type OrderKioskSettings } from "@entity";
|
|
2
2
|
import { FdoOfflinePaymentMethod } from '@feedmepos/core/entity';
|
|
3
|
+
import type { TableNumberHintMessage } from './tableNumberHint';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Kiosk table number page hint (`displayStand.hint` in the entity). `show`: show the
|
|
7
|
+
* hint below the number pad; absent = true. `messages`: custom hint text per kiosk
|
|
8
|
+
* language; null = the kiosk's own text.
|
|
9
|
+
*/
|
|
10
|
+
export interface MfKioskHintSetting {
|
|
11
|
+
show: boolean,
|
|
12
|
+
messages: TableNumberHintMessage | null,
|
|
13
|
+
}
|
|
3
14
|
|
|
4
15
|
export interface MfKioskSubmitOrderInstruction {
|
|
5
16
|
payAtCounter: string | null,
|
|
@@ -18,6 +29,7 @@ export interface MfDisplayStandSetting {
|
|
|
18
29
|
padDigit: number,
|
|
19
30
|
enablePaxDialog: boolean,
|
|
20
31
|
submitOrderInstruction: MfKioskSubmitOrderInstruction,
|
|
32
|
+
hint: MfKioskHintSetting,
|
|
21
33
|
}
|
|
22
34
|
|
|
23
35
|
export interface DisplayStandSettingForm {
|
|
@@ -30,6 +42,7 @@ export interface DisplayStandSettingForm {
|
|
|
30
42
|
padDigit: number | null,
|
|
31
43
|
enablePaxDialog: boolean,
|
|
32
44
|
submitOrderInstruction: KioskSubmitOrderInstructionForm,
|
|
45
|
+
hint: MfKioskHintSetting,
|
|
33
46
|
}
|
|
34
47
|
|
|
35
48
|
export interface MfKioskPickAtCounterSetting {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { KIOSK_LANGUAGE_OPTIONS } from './languages'
|
|
3
|
+
import {
|
|
4
|
+
defaultTableNumberHint,
|
|
5
|
+
normalizeTableNumberHint,
|
|
6
|
+
tableNumberHintLanguages
|
|
7
|
+
} from './tableNumberHint'
|
|
8
|
+
|
|
9
|
+
describe('tableNumberHintLanguages', () => {
|
|
10
|
+
it('lists every kiosk language when the languages are not limited', () => {
|
|
11
|
+
expect(tableNumberHintLanguages(null)).toEqual(KIOSK_LANGUAGE_OPTIONS)
|
|
12
|
+
expect(tableNumberHintLanguages([])).toEqual(KIOSK_LANGUAGE_OPTIONS)
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
it('lists exactly the ticked languages, in the kiosk order', () => {
|
|
16
|
+
expect(tableNumberHintLanguages(['th-TH', 'en-US']).map((o) => o.code)).toEqual([
|
|
17
|
+
'en-US',
|
|
18
|
+
'th-TH'
|
|
19
|
+
])
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
describe('defaultTableNumberHint', () => {
|
|
24
|
+
it('fills the table range, with the prefix, into the kiosk text', () => {
|
|
25
|
+
expect(defaultTableNumberHint('en-US', { prefix: 'T', min: 1, max: 20 })).toBe(
|
|
26
|
+
'Enter a number between T1 and T20'
|
|
27
|
+
)
|
|
28
|
+
expect(defaultTableNumberHint('th-TH', { prefix: null, min: 1, max: 9 })).toBe(
|
|
29
|
+
'กรอกหมายเลขระหว่าง 1 และ 9'
|
|
30
|
+
)
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
it('is null while the range is incomplete, so no broken sentence is shown', () => {
|
|
34
|
+
expect(defaultTableNumberHint('en-US', { prefix: null, min: null, max: 20 })).toBeNull()
|
|
35
|
+
expect(defaultTableNumberHint('en-US', { prefix: null, min: 1, max: null })).toBeNull()
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
describe('normalizeTableNumberHint', () => {
|
|
40
|
+
it('is null when there is no text', () => {
|
|
41
|
+
expect(normalizeTableNumberHint(null)).toBeNull()
|
|
42
|
+
expect(normalizeTableNumberHint(undefined)).toBeNull()
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
it('keeps every kiosk language, ticked or not, trimmed', () => {
|
|
46
|
+
expect(
|
|
47
|
+
normalizeTableNumberHint({
|
|
48
|
+
'en-US': ' Your table number ',
|
|
49
|
+
'th-TH': 'หมายเลขโต๊ะ',
|
|
50
|
+
'zh-CN': '桌号'
|
|
51
|
+
})
|
|
52
|
+
).toEqual({ 'en-US': 'Your table number', 'th-TH': 'หมายเลขโต๊ะ', 'zh-CN': '桌号' })
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
it('drops keys that are not kiosk languages', () => {
|
|
56
|
+
expect(normalizeTableNumberHint({ 'en-US': 'Hi', 'xx-XX': 'Nope' } as never)).toEqual({
|
|
57
|
+
'en-US': 'Hi'
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
it('drops empty languages, and is null when none is left', () => {
|
|
62
|
+
expect(normalizeTableNumberHint({ 'en-US': 'Hi', 'th-TH': ' ' })).toEqual({
|
|
63
|
+
'en-US': 'Hi'
|
|
64
|
+
})
|
|
65
|
+
expect(normalizeTableNumberHint({ 'en-US': ' ' })).toBeNull()
|
|
66
|
+
expect(normalizeTableNumberHint({})).toBeNull()
|
|
67
|
+
})
|
|
68
|
+
})
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { KioskLocale } from '@entity'
|
|
2
|
+
import { KIOSK_LANGUAGE_OPTIONS, type KioskLanguageOption } from './languages'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Custom hint below the number pad on the kiosk's table number page (display stand mode),
|
|
6
|
+
* one text per kiosk language: `{ 'en-US': '…', 'th-TH': '…' }`, the same shape as the
|
|
7
|
+
* other kiosk texts (`KioskTextSettingDto`). null = no custom hint; the kiosk shows its
|
|
8
|
+
* own text.
|
|
9
|
+
*/
|
|
10
|
+
export type TableNumberHintMessage = Partial<Record<KioskLocale, string>>
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The kiosk's own hint when display stand has a table range, which the portal always
|
|
14
|
+
* saves: kiosk-v2 `home.slotModal.rangeHint` in each locale. Shown as each input's
|
|
15
|
+
* placeholder so the merchant sees what they replace.
|
|
16
|
+
*/
|
|
17
|
+
const KIOSK_DEFAULT_RANGE_HINT: Record<KioskLocale, string> = {
|
|
18
|
+
'en-US': 'Enter a number between {min} and {max}',
|
|
19
|
+
'zh-CN': '请输入 {min} 到 {max} 之间的号码',
|
|
20
|
+
'th-TH': 'กรอกหมายเลขระหว่าง {min} และ {max}',
|
|
21
|
+
'vi-VN': 'Nhập một số từ {min} đến {max}',
|
|
22
|
+
'id-ID': 'Masukkan angka antara {min} dan {max}',
|
|
23
|
+
'ko-KR': '{min}부터 {max} 사이의 번호를 입력해 주세요',
|
|
24
|
+
'ja-JP': '{min}から{max}の数字を入力してください',
|
|
25
|
+
'ar-SA': 'أدخل رقمًا بين {min} و{max}'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The languages the hint needs a text for: exactly the ones the kiosk can show.
|
|
30
|
+
* With "Limit the languages shown" on, that is the ticked ones; off (`null`) or
|
|
31
|
+
* nothing ticked yet, every language the kiosk ships. Always in the kiosk's order.
|
|
32
|
+
*/
|
|
33
|
+
export function tableNumberHintLanguages(languages: string[] | null): KioskLanguageOption[] {
|
|
34
|
+
if (!languages || languages.length === 0) return KIOSK_LANGUAGE_OPTIONS
|
|
35
|
+
return KIOSK_LANGUAGE_OPTIONS.filter((option) => languages.includes(option.code))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The kiosk's default hint in one language, with the table range filled in. null
|
|
40
|
+
* while the range is incomplete (a min or max field cleared mid-edit), so the input
|
|
41
|
+
* shows no placeholder instead of a sentence with blank numbers.
|
|
42
|
+
*/
|
|
43
|
+
export function defaultTableNumberHint(
|
|
44
|
+
code: KioskLocale,
|
|
45
|
+
range: { prefix: string | null; min: number | null; max: number | null }
|
|
46
|
+
): string | null {
|
|
47
|
+
if (range.min == null || range.max == null) return null
|
|
48
|
+
const prefix = range.prefix ?? ''
|
|
49
|
+
return KIOSK_DEFAULT_RANGE_HINT[code]
|
|
50
|
+
.replace('{min}', `${prefix}${range.min}`)
|
|
51
|
+
.replace('{max}', `${prefix}${range.max}`)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* What to save: every kiosk language's text, trimmed, without empty ones (an empty
|
|
56
|
+
* language keeps the kiosk's own text). Languages not ticked under "Limit the
|
|
57
|
+
* languages shown" keep their text too, so it is still there when the merchant
|
|
58
|
+
* ticks them again. null when nothing is left, so a switched-on hint with no text
|
|
59
|
+
* saves as "no custom hint".
|
|
60
|
+
*/
|
|
61
|
+
export function normalizeTableNumberHint(
|
|
62
|
+
message: TableNumberHintMessage | null | undefined
|
|
63
|
+
): TableNumberHintMessage | null {
|
|
64
|
+
if (!message) return null
|
|
65
|
+
const next: TableNumberHintMessage = {}
|
|
66
|
+
for (const { code } of KIOSK_LANGUAGE_OPTIONS) {
|
|
67
|
+
const text = message[code]?.trim()
|
|
68
|
+
if (text) next[code] = text
|
|
69
|
+
}
|
|
70
|
+
return Object.keys(next).length > 0 ? next : null
|
|
71
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { describe, expect, it, vi } from 'vitest'
|
|
2
|
+
vi.mock('@feedmepos/mf-common', () => ({ useCoreStore: vi.fn() }))
|
|
3
|
+
vi.mock('@feedmepos/hrm-permission/components', () => ({ withPermission: (component: unknown) => component }))
|
|
4
|
+
import { routes } from './routes'
|
|
5
|
+
import { manageDisplaySystem } from '@/composables/useDisplaySystemPermission'
|
|
6
|
+
|
|
7
|
+
describe('direct Display System route', () => {
|
|
8
|
+
it('requires only the dedicated permission, with no Brandkit or Order Settings fallback', () => {
|
|
9
|
+
const route = routes.find((entry) => entry.name === 'Display System View')
|
|
10
|
+
expect(route?.meta).toEqual({ validationManifest: { requiredCaslPermissions: [manageDisplaySystem] } })
|
|
11
|
+
expect(manageDisplaySystem.coverSubject).toBeUndefined()
|
|
12
|
+
})
|
|
13
|
+
})
|
package/src/router/routes.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Permission, type CaslPermission } from '@feedmepos/hrm-permission'
|
|
|
4
4
|
import { withPermission } from '@feedmepos/hrm-permission/components'
|
|
5
5
|
import { kioskPermission } from '@/composables/useKioskPermission'
|
|
6
6
|
import { orderSettingPermission } from '@/composables/useOrderSettingPermission'
|
|
7
|
+
import { manageDisplaySystem } from '@/composables/useDisplaySystemPermission'
|
|
7
8
|
import { PortalRoute } from '@/utils/constants/route';
|
|
8
9
|
|
|
9
10
|
/** Wrap CASL permissions into a route meta the withPermission HOC validates. */
|
|
@@ -61,7 +62,7 @@ const routes: RouteRecordRaw[] = [
|
|
|
61
62
|
component: withPermission(
|
|
62
63
|
defineAsyncComponent(() => import('@/views/display-system/DisplaySystemView.vue')),
|
|
63
64
|
),
|
|
64
|
-
meta: permissionMeta([
|
|
65
|
+
meta: permissionMeta([manageDisplaySystem]),
|
|
65
66
|
},
|
|
66
67
|
{
|
|
67
68
|
// Food Court Operations (KDI-4920). A court is not a business, so no business
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
|
2
|
+
import { createPinia, setActivePinia } from 'pinia'
|
|
3
|
+
import type { DisplayScreen, DisplayScreenWithLicense } from '@/modules/display-system/interface'
|
|
4
|
+
|
|
5
|
+
const api = vi.hoisted(() => ({
|
|
6
|
+
getScreenCapabilities: vi.fn(),
|
|
7
|
+
listScreens: vi.fn(),
|
|
8
|
+
createScreen: vi.fn(),
|
|
9
|
+
updateScreen: vi.fn(),
|
|
10
|
+
deleteScreen: vi.fn(),
|
|
11
|
+
updateScreenStatus: vi.fn()
|
|
12
|
+
}))
|
|
13
|
+
vi.mock('@/api/display-system', () => ({ displaySystemApi: api }))
|
|
14
|
+
|
|
15
|
+
import { useDisplaySystemStore } from './index'
|
|
16
|
+
|
|
17
|
+
function screen(id: string): DisplayScreen {
|
|
18
|
+
return {
|
|
19
|
+
_id: id,
|
|
20
|
+
businessId: 'business',
|
|
21
|
+
restaurantId: 'outlet',
|
|
22
|
+
templateId: 'template',
|
|
23
|
+
name: id,
|
|
24
|
+
status: 'ACTIVE',
|
|
25
|
+
tokenVersion: 1,
|
|
26
|
+
createdAt: '2026-08-20T00:00:00.000Z',
|
|
27
|
+
updatedAt: '2026-08-20T00:00:00.000Z'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe('display screen license refresh', () => {
|
|
32
|
+
beforeEach(() => {
|
|
33
|
+
setActivePinia(createPinia())
|
|
34
|
+
vi.resetAllMocks()
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it.each(['disable', 'delete'] as const)('refreshes sibling licenses after %s frees a slot', async (operation) => {
|
|
38
|
+
const older = { ...screen('older'), licensed: true }
|
|
39
|
+
const later = { ...screen('later'), createdAt: '2026-09-01T00:00:00.000Z', licensed: false }
|
|
40
|
+
const store = useDisplaySystemStore()
|
|
41
|
+
store.screens = [older, later]
|
|
42
|
+
const refreshed: DisplayScreenWithLicense[] = operation === 'delete'
|
|
43
|
+
? [{ ...later, licensed: true }]
|
|
44
|
+
: [{ ...older, status: 'DISABLED', licensed: false }, { ...later, licensed: true }]
|
|
45
|
+
api.listScreens.mockResolvedValue(refreshed)
|
|
46
|
+
api.updateScreenStatus.mockResolvedValue({ ...screen('older'), status: 'DISABLED' })
|
|
47
|
+
|
|
48
|
+
if (operation === 'delete') await store.deleteScreen('outlet', 'older')
|
|
49
|
+
else await store.updateScreenStatus('outlet', 'older', 'DISABLED')
|
|
50
|
+
|
|
51
|
+
expect(api.listScreens).toHaveBeenCalledWith('outlet')
|
|
52
|
+
expect(store.screens).toEqual(refreshed)
|
|
53
|
+
expect(store.screens.find((item) => item._id === 'later')?.licensed).toBe(true)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
it.each(['create', 'edit'] as const)('uses GET license flags after %s returns a raw screen', async (operation) => {
|
|
57
|
+
const store = useDisplaySystemStore()
|
|
58
|
+
store.screens = [{ ...screen('existing'), licensed: true }]
|
|
59
|
+
const raw = screen('saved')
|
|
60
|
+
const refreshed = [{ ...screen('existing'), licensed: false }, { ...raw, licensed: true }]
|
|
61
|
+
const input = { name: raw.name, templateId: raw.templateId }
|
|
62
|
+
api.createScreen.mockResolvedValue(raw)
|
|
63
|
+
api.updateScreen.mockResolvedValue(raw)
|
|
64
|
+
api.listScreens.mockResolvedValue(refreshed)
|
|
65
|
+
|
|
66
|
+
if (operation === 'create') await store.createScreen('outlet', input)
|
|
67
|
+
else await store.updateScreen('outlet', raw._id, input)
|
|
68
|
+
|
|
69
|
+
expect(api.listScreens).toHaveBeenCalledWith('outlet')
|
|
70
|
+
expect(store.screens).toEqual(refreshed)
|
|
71
|
+
expect(store.screens.every((item) => typeof item.licensed === 'boolean')).toBe(true)
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
const capability = { posSupported: true, posV8: false, screenLimit: 1, screenUsed: 0, capabilities: [] }
|
|
76
|
+
describe('outlet capability requests', () => {
|
|
77
|
+
beforeEach(() => { setActivePinia(createPinia()); vi.resetAllMocks() })
|
|
78
|
+
it('clears previous outlet permissions when the new request fails', async () => {
|
|
79
|
+
const store = useDisplaySystemStore()
|
|
80
|
+
api.getScreenCapabilities.mockResolvedValueOnce(capability)
|
|
81
|
+
await store.loadScreenCapabilities('a')
|
|
82
|
+
api.getScreenCapabilities.mockRejectedValueOnce(new Error('offline'))
|
|
83
|
+
await expect(store.loadScreenCapabilities('b')).rejects.toThrow('offline')
|
|
84
|
+
expect(store.screenCapabilities).toBeUndefined()
|
|
85
|
+
expect(store.loadingScreenCapabilities).toBe(false)
|
|
86
|
+
})
|
|
87
|
+
it('ignores older responses while the selected outlet is loading', async () => {
|
|
88
|
+
const store = useDisplaySystemStore()
|
|
89
|
+
let finishA!: (value: typeof capability) => void
|
|
90
|
+
let finishB!: (value: typeof capability) => void
|
|
91
|
+
api.getScreenCapabilities.mockImplementationOnce(() => new Promise(resolve => { finishA = resolve }))
|
|
92
|
+
api.getScreenCapabilities.mockImplementationOnce(() => new Promise(resolve => { finishB = resolve }))
|
|
93
|
+
const a = store.loadScreenCapabilities('a')
|
|
94
|
+
const b = store.loadScreenCapabilities('b')
|
|
95
|
+
finishA(capability)
|
|
96
|
+
await a
|
|
97
|
+
expect(store.screenCapabilities).toBeUndefined()
|
|
98
|
+
expect(store.loadingScreenCapabilities).toBe(true)
|
|
99
|
+
finishB({ ...capability, posSupported: false })
|
|
100
|
+
await b
|
|
101
|
+
expect(store.screenCapabilities?.posSupported).toBe(false)
|
|
102
|
+
expect(store.loadingScreenCapabilities).toBe(false)
|
|
103
|
+
})
|
|
104
|
+
})
|
|
@@ -2,26 +2,37 @@ import { defineStore } from 'pinia'
|
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
|
|
4
4
|
import { displaySystemApi } from '@/api/display-system'
|
|
5
|
-
import type { CreateDisplayScreen, CreateDisplayTemplate, DisplayScreen, DisplayScreenCapabilities, DisplayTemplate, UpdateDisplayScreen, UpdateDisplayTemplate } from '@/modules/display-system/interface'
|
|
5
|
+
import type { CreateDisplayScreen, CreateDisplayTemplate, DisplayScreen, DisplayScreenWithLicense, DisplayScreenCapabilities, DisplayTemplate, UpdateDisplayScreen, UpdateDisplayTemplate } from '@/modules/display-system/interface'
|
|
6
6
|
|
|
7
7
|
export const useDisplaySystemStore = defineStore('display-system', () => {
|
|
8
|
-
const screens = ref<
|
|
8
|
+
const screens = ref<DisplayScreenWithLicense[]>([])
|
|
9
9
|
const screenCapabilities = ref<DisplayScreenCapabilities>()
|
|
10
10
|
const templates = ref<DisplayTemplate[]>([])
|
|
11
11
|
const loadingScreens = ref(false)
|
|
12
12
|
const loadingScreenCapabilities = ref(false)
|
|
13
13
|
const loadingTemplates = ref(false)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
let capabilityRequest = 0
|
|
16
|
+
async function loadScreenCapabilities(restaurantId: string) {
|
|
17
|
+
const request = ++capabilityRequest
|
|
18
|
+
screenCapabilities.value = undefined
|
|
19
|
+
loadingScreenCapabilities.value = true
|
|
20
|
+
try {
|
|
21
|
+
const capabilities = await displaySystemApi.getScreenCapabilities(restaurantId)
|
|
22
|
+
if (request === capabilityRequest) screenCapabilities.value = capabilities
|
|
23
|
+
} finally {
|
|
24
|
+
if (request === capabilityRequest) loadingScreenCapabilities.value = false
|
|
25
|
+
}
|
|
26
|
+
}
|
|
16
27
|
async function loadScreens(restaurantId: string) { loadingScreens.value = true; try { screens.value = await displaySystemApi.listScreens(restaurantId) } finally { loadingScreens.value = false } }
|
|
17
28
|
async function loadTemplates(restaurantId?: string) { loadingTemplates.value = true; try { templates.value = await displaySystemApi.listTemplates(restaurantId) } finally { loadingTemplates.value = false } }
|
|
18
29
|
async function createTemplate(input: CreateDisplayTemplate) { const value = await displaySystemApi.createTemplate(input); templates.value = [value, ...templates.value]; return value }
|
|
19
30
|
async function updateTemplate(id: string, input: UpdateDisplayTemplate) { const value = await displaySystemApi.updateTemplate(id, input); templates.value = templates.value.map((item) => item._id === id ? value : item); return value }
|
|
20
31
|
async function deleteTemplate(id: string) { await displaySystemApi.deleteTemplate(id); templates.value = templates.value.filter((item) => item._id !== id) }
|
|
21
|
-
async function createScreen(restaurantId: string, input: CreateDisplayScreen) { const value = await displaySystemApi.createScreen(restaurantId, input);
|
|
22
|
-
async function updateScreen(restaurantId: string, id: string, input: UpdateDisplayScreen) { const value = await displaySystemApi.updateScreen(restaurantId, id, input);
|
|
23
|
-
async function deleteScreen(restaurantId: string, id: string) { await displaySystemApi.deleteScreen(restaurantId, id);
|
|
24
|
-
async function updateScreenStatus(restaurantId: string, id: string, status: DisplayScreen['status']) { const value = await displaySystemApi.updateScreenStatus(restaurantId, id, status);
|
|
32
|
+
async function createScreen(restaurantId: string, input: CreateDisplayScreen) { const value = await displaySystemApi.createScreen(restaurantId, input); await loadScreens(restaurantId); return value }
|
|
33
|
+
async function updateScreen(restaurantId: string, id: string, input: UpdateDisplayScreen) { const value = await displaySystemApi.updateScreen(restaurantId, id, input); await loadScreens(restaurantId); return value }
|
|
34
|
+
async function deleteScreen(restaurantId: string, id: string) { await displaySystemApi.deleteScreen(restaurantId, id); await loadScreens(restaurantId) }
|
|
35
|
+
async function updateScreenStatus(restaurantId: string, id: string, status: DisplayScreen['status']) { const value = await displaySystemApi.updateScreenStatus(restaurantId, id, status); await loadScreens(restaurantId); return value }
|
|
25
36
|
|
|
26
37
|
return { screens, screenCapabilities, templates, loadingScreens, loadingScreenCapabilities, loadingTemplates, loadScreenCapabilities, loadScreens, loadTemplates, createTemplate, updateTemplate, deleteTemplate, createScreen, updateScreen, deleteScreen, updateScreenStatus }
|
|
27
38
|
})
|
|
@@ -17,6 +17,7 @@ import type {
|
|
|
17
17
|
KioskPickAtCounterSettingForm
|
|
18
18
|
} from '@/modules/order-setting/kiosk/interface'
|
|
19
19
|
import type { MfOrderSetting } from '@/modules/order-setting/interface'
|
|
20
|
+
import type { TableNumberHintMessage } from '@/modules/order-setting/kiosk/tableNumberHint'
|
|
20
21
|
import type { OrderKioskSettings, OrderKioskPaymentSetting } from '@entity'
|
|
21
22
|
|
|
22
23
|
export const defaultDisplayStand: MfDisplayStandSetting = {
|
|
@@ -31,7 +32,8 @@ export const defaultDisplayStand: MfDisplayStandSetting = {
|
|
|
31
32
|
submitOrderInstruction: {
|
|
32
33
|
payAtCounter: null,
|
|
33
34
|
paid: null
|
|
34
|
-
}
|
|
35
|
+
},
|
|
36
|
+
hint: { show: true, messages: null }
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export const defaultTakeaway: KioskTakeawaySettingForm = {
|
|
@@ -239,7 +241,14 @@ const toKioskDineInSetting = (
|
|
|
239
241
|
null,
|
|
240
242
|
paid: kioskDineInSetting.displayStand.submitOrderInstruction?.paid?.['en'] ?? null
|
|
241
243
|
}
|
|
242
|
-
: defaultSubmitOrderInstruction
|
|
244
|
+
: defaultSubmitOrderInstruction,
|
|
245
|
+
// Absent (older documents) = the hint shows, with the kiosk's own text.
|
|
246
|
+
hint: {
|
|
247
|
+
show: kioskDineInSetting.displayStand.hint?.show ?? true,
|
|
248
|
+
messages:
|
|
249
|
+
(kioskDineInSetting.displayStand.hint?.messages as TableNumberHintMessage | null | undefined) ??
|
|
250
|
+
null
|
|
251
|
+
}
|
|
243
252
|
}
|
|
244
253
|
: defaultDisplayStand
|
|
245
254
|
}
|
|
@@ -148,6 +148,9 @@ function canRemoveItem(field: BlockEditorField): boolean {
|
|
|
148
148
|
|
|
149
149
|
<!-- Module scope -->
|
|
150
150
|
<template v-else-if="block && definition">
|
|
151
|
+
<p v-if="definition.capability === 'QUEUE'" class="inspector-warning">
|
|
152
|
+
{{ t('order.displaySystem.editor.ui.queuePremiumRequired') }}
|
|
153
|
+
</p>
|
|
151
154
|
<section v-if="contentFields.length" class="inspector-section">
|
|
152
155
|
<h4 class="inspector-section-title">{{ t('order.displaySystem.editor.ui.sectionContent') }}</h4>
|
|
153
156
|
|
|
@@ -38,6 +38,9 @@ function pick(type: string): void {
|
|
|
38
38
|
>
|
|
39
39
|
<span class="module-picker-icon"><FmIcon :name="definition.editor.icon" size="sm" /></span>
|
|
40
40
|
<span class="module-picker-label">{{ t(definition.editor.labelKey) }}</span>
|
|
41
|
+
<span v-if="definition.capability === 'QUEUE'" class="module-picker-requirement">
|
|
42
|
+
{{ t('order.displaySystem.editor.ui.queuePremiumRequired') }}
|
|
43
|
+
</span>
|
|
41
44
|
</button>
|
|
42
45
|
</div>
|
|
43
46
|
</section>
|
|
@@ -104,4 +107,9 @@ function pick(type: string): void {
|
|
|
104
107
|
line-height: 1.3;
|
|
105
108
|
overflow-wrap: anywhere;
|
|
106
109
|
}
|
|
110
|
+
.module-picker-requirement {
|
|
111
|
+
color: #92400e;
|
|
112
|
+
font-size: 11px;
|
|
113
|
+
line-height: 1.4;
|
|
114
|
+
}
|
|
107
115
|
</style>
|