Commit graph

2 commits

Author SHA1 Message Date
FreightDesk
9b5e568e72 [OWL] Bug fixes + seed data + bulk parser route
Some checks are pending
FreightDesk CI/CD / Lint & Test (push) Waiting to run
FreightDesk CI/CD / Build Docker Image (push) Blocked by required conditions
FreightDesk CI/CD / Deploy to Coolify (push) Blocked by required conditions
Fixes:
- Negotiate route: added auth check (only shipper or bidder can negotiate)
- Negotiate route: added notification to other party
- All payment views: removed /100 division (amounts stored in rupees, not paise)
- Migration 006: updated platform_config seed values to rupees
- Migration 007: added current_lat/current_lng columns to vehicles table
- Added bulk-parser route to marketplace.js
- Added Bulk WhatsApp Parser link to portal sidebar

Seed Data:
- scripts/seed-demo.js: 5 shippers, 5 drivers, 8 loads, sample bids
- Idempotent: skips if data already exists
2026-06-08 02:16:02 +00:00
FreightDesk
4923357e29 [OWL] Payment escrow system + marketplace payment integration
Some checks are pending
FreightDesk CI/CD / Lint & Test (push) Waiting to run
FreightDesk CI/CD / Build Docker Image (push) Blocked by required conditions
FreightDesk CI/CD / Deploy to Coolify (push) Blocked by required conditions
Database (migration 006):
- escrow_accounts: per-user balance tracking (available + held)
- escrow_transactions: all financial transactions (deposit/hold/release/refund/payout/fee)
- payout_requests: driver withdrawal requests with bank/UPI details
- platform_config: fee settings (5% commission, min deposit, hold period)
- disputes: payment dispute tracking
- Enhanced loads table: payment_status, escrow_amount, platform_fee, settled_at

Escrow Routes (/escrow):
- GET /escrow — payment dashboard with balance and transactions
- GET/POST /escrow/deposit — deposit funds (simulated, production: Razorpay)
- POST /escrow/hold — move funds to escrow for a specific load
- POST /escrow/release — release funds to driver after delivery
- GET/POST /escrow/payout — driver payout request (UPI or bank)
- POST /escrow/admin/payouts/:id/approve — admin approves payout
- POST /escrow/dispute — raise payment dispute

Views:
- Payment dashboard (balance, transactions, quick actions)
- Deposit page with quick amounts
- Payout request page with bank/UPI forms
- Payment status card on load detail (shipper view)
- Hold/Release/Dispute actions integrated into marketplace flow

Payment Flow:
1. Shipper deposits funds → balance
2. Shipper accepts bid → hold in escrow (driver freight + 5% fee)
3. Delivery confirmed → release to driver
4. Driver requests payout → admin approves → bank transfer
2026-06-08 01:50:02 +00:00