feat(partner): complete proxy order with dual SMS and pickup
CI / verify (pull_request) Has been cancelled
CI / verify (pull_request) Has been cancelled
Add partner/customer SMS confirm, address auto-receive or on-site pickup, proxy placer fields, PARTNER_PROXY user source, and C-end badge. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,10 +22,19 @@ export function mapOrderItemCompat(order: OrderLike) {
|
||||
};
|
||||
}
|
||||
|
||||
export function mapOrderCompat<T extends OrderLike>(order: T) {
|
||||
export function mapOrderCompat<T extends OrderLike & {
|
||||
orderType?: string | null;
|
||||
proxyPartnerName?: string | null;
|
||||
proxyPartnerPhone?: string | null;
|
||||
proxyPartnerAccountId?: bigint | number | string | null;
|
||||
}>(order: T) {
|
||||
const payStatus = order.payStatus ?? 'UNPAID';
|
||||
const isProxyOrder = order.orderType === 'PROXY';
|
||||
return {
|
||||
...order,
|
||||
isProxyOrder,
|
||||
proxyPartnerName: order.proxyPartnerName ?? null,
|
||||
proxyPartnerPhone: order.proxyPartnerPhone ?? null,
|
||||
items: [mapOrderItemCompat(order)],
|
||||
payment: {
|
||||
status: payStatus === 'PAID' ? 'SUCCESS' : payStatus,
|
||||
|
||||
Reference in New Issue
Block a user