Init
This commit is contained in:
commit
f90fdc0598
99 changed files with 15260 additions and 0 deletions
30
frontend/src/components/Tables/TableOrderCard.vue
Normal file
30
frontend/src/components/Tables/TableOrderCard.vue
Normal file
|
@ -0,0 +1,30 @@
|
|||
<template>
|
||||
<SmallCard bgColor="d" :badgeTwo="order.total !== order.order_item.price">
|
||||
<template #description>{{ order.order_item.description }}</template>
|
||||
<template #badgeOne>{{ convertToEur(order.order_item.price) }}</template>
|
||||
<template #badgeTwo>{{ convertToEur(order.total) }}</template>
|
||||
<template #right>
|
||||
<slot></slot>
|
||||
</template>
|
||||
</SmallCard>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, PropType } from "vue";
|
||||
import { service_Order, types_ItemType } from "@/services/openapi";
|
||||
import { convertToEur } from "@/utils";
|
||||
import SmallCard from "@/components/UI/SmallCard.vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "TableOrderCard",
|
||||
components: { SmallCard },
|
||||
props: {
|
||||
order: { type: Object as PropType<service_Order>, required: true },
|
||||
},
|
||||
emits: ["decrementOrder", "incrementOrder"],
|
||||
setup(props) {
|
||||
const showTotal = computed(() => props.order.order_item.price !== props.order.total);
|
||||
return { convertToEur, types_ItemType, showTotal };
|
||||
},
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue