feat(customers): add customer-level and device-level update/upgrade buttons with automatic license date calculation for update discount
This commit is contained in:
@@ -138,6 +138,10 @@ async function OrderDataWrapper({
|
||||
companies = await getCompanies().catch(() => [])
|
||||
}
|
||||
|
||||
const initialLastLicenseDate = initialOrder
|
||||
? (initialOrder.order_data?.last_license_date || (initialOrder.created_at ? new Date(initialOrder.created_at).toISOString().split('T')[0] : ''))
|
||||
: ''
|
||||
|
||||
return (
|
||||
<OrderWizard
|
||||
products={products}
|
||||
@@ -150,6 +154,7 @@ async function OrderDataWrapper({
|
||||
upgradeMode={mode === 'upgrade'}
|
||||
initialEndCustomerId={customerId || null}
|
||||
lockedDeviceId={deviceId ? decodeURIComponent(deviceId) : null}
|
||||
initialLastLicenseDate={initialLastLicenseDate}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user