- Introduced `StripeTerminalReaderSelect` component for terminal reader management. - Implemented utility functions for normalizing, sorting, and selecting Stripe readers. - Added unit tests for reader status mapping, normalization, and preferred reader selection. - Updated `PayWithStripeButton` with new reader selection logic and localization.
53 lines
1.7 KiB
Vue
53 lines
1.7 KiB
Vue
<script setup>
|
|
import NextStep from "@/components/forms/department/pos/buttons/NextStep.vue";
|
|
import NextStepError from "@/components/forms/department/pos/error/NextStepError.vue";
|
|
import { order_items, order_id, loadOrderItems } from "@/components/shop/POSDepartmentProcess.vue";
|
|
import Cancel from "@/components/forms/department/pos/buttons/Cancel.vue";
|
|
import ButtonsBox from "@/components/displays/boxes/ButtonsBox.vue";
|
|
import PreviousStep from "@/components/forms/department/pos/buttons/PreviousStep.vue";
|
|
import { useI18n } from "vue-i18n";
|
|
import PosDesktopOrderWorkspace from "@/components/displays/department/pos/order/PosDesktopOrderWorkspace.vue";
|
|
|
|
const { t } = useI18n();
|
|
</script>
|
|
|
|
<template>
|
|
<div data-testid="pos-step-4">
|
|
<PosDesktopOrderWorkspace
|
|
v-if="order_id"
|
|
mode="summary"
|
|
:orderId="order_id"
|
|
:orderItems="order_items"
|
|
:loadOrderItems="loadOrderItems"
|
|
:editPossible="true"
|
|
:showCatalogPane="false"
|
|
:showCustomerRail="true"
|
|
>
|
|
<template #bottom-order-items>
|
|
<ButtonsBox>
|
|
<PreviousStep :is-text="true" :label="t('admin.pos.add_more_items')" />
|
|
</ButtonsBox>
|
|
</template>
|
|
|
|
<template #rail-actions>
|
|
<NextStepError class="is-fullwidth" />
|
|
<ButtonsBox class="pos-actions pos-actions--rail">
|
|
<NextStep
|
|
class="is-fullwidth"
|
|
:label="t('admin.pos.complete')"
|
|
/>
|
|
<Cancel
|
|
tabindex="2"
|
|
class="is-fullwidth"
|
|
:label="t('common.cancel')"
|
|
/>
|
|
</ButtonsBox>
|
|
</template>
|
|
</PosDesktopOrderWorkspace>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|