create payment roadmap pr a

This commit is contained in:
2026-05-08 20:43:14 +07:00
parent ccb3437e82
commit d4db13778a
10 changed files with 823 additions and 51 deletions
+12
View File
@@ -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);
}