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:
jackiettran
2026-01-02 17:08:49 -05:00
parent bc01c818aa
commit 4209dcc8fc
17 changed files with 142 additions and 162 deletions

View File

@@ -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;