create payment roadmap pr a
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Pricing helpers untuk trip. Single source of truth — semua gate "trip gratis"
|
||||
* harus lewat sini, jangan compare `price === 0` inline.
|
||||
*/
|
||||
|
||||
export function isFreeTrip(trip: { price: number }): boolean {
|
||||
return trip.price <= 0;
|
||||
}
|
||||
|
||||
export function isPaidTrip(trip: { price: number }): boolean {
|
||||
return !isFreeTrip(trip);
|
||||
}
|
||||
Reference in New Issue
Block a user