removed cron job that made rentals active. Now whether or not the rental is active is determined on the fly
This commit is contained in:
@@ -106,6 +106,18 @@ export interface Item {
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export type RentalStatus =
|
||||
| "pending"
|
||||
| "confirmed"
|
||||
| "declined"
|
||||
| "active"
|
||||
| "completed"
|
||||
| "cancelled"
|
||||
| "returned_late"
|
||||
| "returned_late_and_damaged"
|
||||
| "damaged"
|
||||
| "lost";
|
||||
|
||||
export interface Rental {
|
||||
id: string;
|
||||
itemId: string;
|
||||
@@ -117,17 +129,9 @@ export interface Rental {
|
||||
// Fee tracking fields
|
||||
platformFee?: number;
|
||||
payoutAmount?: number;
|
||||
status:
|
||||
| "pending"
|
||||
| "confirmed"
|
||||
| "declined"
|
||||
| "active"
|
||||
| "completed"
|
||||
| "cancelled"
|
||||
| "returned_late"
|
||||
| "returned_late_and_damaged"
|
||||
| "damaged"
|
||||
| "lost";
|
||||
status: RentalStatus;
|
||||
// Computed status (includes "active" when confirmed + start time passed)
|
||||
displayStatus?: RentalStatus;
|
||||
paymentStatus: "pending" | "paid" | "refunded";
|
||||
// Refund tracking fields
|
||||
refundAmount?: number;
|
||||
|
||||
Reference in New Issue
Block a user