refactor: create order vm | remove: order email account id thingy admin-side
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
import type { FullOrderModel } from "$lib/domains/order/data/entities";
|
||||
import ProductIcon from "~icons/solar/box-broken";
|
||||
import CreditCardIcon from "~icons/solar/card-broken";
|
||||
import EmailIcon from "~icons/solar/letter-broken";
|
||||
|
||||
let { order }: { order: FullOrderModel } = $props();
|
||||
|
||||
@@ -17,17 +16,6 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-6">
|
||||
{#if order.emailAccountId}
|
||||
<!-- Email Account Info -->
|
||||
<div class={cardStyle}>
|
||||
<div class="flex items-center gap-2">
|
||||
<Icon icon={EmailIcon} cls="w-5 h-5" />
|
||||
<Title size="h5" color="black">Account Information</Title>
|
||||
</div>
|
||||
<p class="text-gray-800">Email Account ID: #{order.emailAccountId}</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Product Info -->
|
||||
<div class={cardStyle}>
|
||||
<div class="flex items-center justify-between">
|
||||
|
||||
@@ -88,28 +88,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Additional Info -->
|
||||
{#if order.emailAccountId}
|
||||
<div class={cardStyle}>
|
||||
<div class="flex items-center gap-2">
|
||||
<Icon icon={InfoIcon} cls="w-5 h-5" />
|
||||
<Title size="h5" color="black">Additional Information</Title>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-2 text-sm">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="text-gray-600">Email Account ID</span>
|
||||
<span class="font-medium">#{order.emailAccountId}</span>
|
||||
</div>
|
||||
|
||||
{#if order.paymentInfoId}
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="text-gray-600">Payment Info ID</span>
|
||||
<span class="font-medium">#{order.paymentInfoId}</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -81,14 +81,6 @@
|
||||
return snakeToSpacedPascal(r.status.toLowerCase());
|
||||
},
|
||||
},
|
||||
{
|
||||
header: "Order Type",
|
||||
accessorKey: "ordertype",
|
||||
cell: ({ row }) => {
|
||||
const r = row.original as FullOrderModel;
|
||||
return r.emailAccountId ? "Agent" : "Customer";
|
||||
},
|
||||
},
|
||||
{
|
||||
header: "Action",
|
||||
id: "actions",
|
||||
|
||||
Reference in New Issue
Block a user