修复预计 截止时间
This commit is contained in:
@@ -109,6 +109,7 @@ function orderRentedAt() {
|
||||
|
||||
function orderEstimatedEndAt() {
|
||||
if (!order.value) return undefined
|
||||
if (order.value.estimated_end_at) return order.value.estimated_end_at
|
||||
const rentedAt = orderRentedAt()
|
||||
const durationHours = Number(order.value.estimated_duration_hours || 0)
|
||||
if (!rentedAt || durationHours <= 0) return undefined
|
||||
|
||||
@@ -18,6 +18,7 @@ export interface Order {
|
||||
login_platform: string
|
||||
rented_at?: string
|
||||
estimated_duration_hours: number
|
||||
estimated_end_at?: string
|
||||
price_role?: 'renter' | 'owner' | 'admin' | string
|
||||
display_amount_cent: number
|
||||
rent_amount_cent?: number
|
||||
|
||||
@@ -211,6 +211,7 @@ export function getSnapshotHafCoinM(order: Order | null) {
|
||||
}
|
||||
|
||||
export function orderEstimatedEndAt(order: Order | null) {
|
||||
if (order?.estimated_end_at) return order.estimated_end_at
|
||||
const rentedAt = order?.rented_at
|
||||
const durationHours = Number(order?.estimated_duration_hours || 0)
|
||||
if (!rentedAt || durationHours <= 0) return undefined
|
||||
|
||||
Reference in New Issue
Block a user