Commit Graph

34 Commits

Author SHA1 Message Date
Nathnael
6f137a11c3 fix:cbe and cac 2026-08-02 20:37:16 +00:00
ghost2023
42e227569b Merge remote-tracking branch 'origin/staging' into freight/fix/pay
# Conflicts:
#	apps/edr-freight-api/src/modules/billing/billing.service.ts
#	apps/edr-freight-web/portal/src/pages/billing/InvoiceDetailPage.tsx
#	apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage/components/PaymentMethodModal.tsx
#	pnpm-lock.yaml
2026-08-01 13:09:14 +03:00
Nathnael
97bfe95ec3 feat(payment): integrate CAC Bank OTP payments into freight flows
CAC Bank is an OTP debit with no redirect and no webhook: initiate SMSes a
code to the payer's mobile, and the charge only settles when that code is
confirmed. The payment service already spoke it (passenger uses it); the
freight side had the enum values but none of the flow.

API:
- PaymentClientService.confirmOtp forwards the code to
  POST /payments/intents/:id/confirm, mapping 400/404 to BadRequest so a
  mistyped code stays retryable instead of surfacing as a gateway failure.
- PaymentService.confirmOtp is keyed by the LOCAL intent id (the invoice's
  paymentId) rather than the domain reference, so the right invoice settles
  when several share a booking. On success billing settles the invoice.
- payInvoice rejects CAC_BANK without payerAccount before calling the
  gateway, and no longer runs the demo auto-settle for a COLLECT_OTP intent
  (it is not paid until the payer confirms).
- POST /billing/my-invoices/:id/confirm — ownership-checked, and since
  warehouse fee invoices are central invoices it covers those too.

Portal:
- useInvoicePayment owns the whole flow (initiate, redirect-or-OTP, confirm)
  and replaces the five near-identical pay mutations at the call sites.
- PaymentMethodModal gains the CAC Bank option, the payer mobile field, and
  the OTP step. Click-outside is disabled there so a stray click cannot drop
  the payer out of a live OTP window.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 08:11:23 +00:00
Nathnael
82cb5508cc chore: rm the active company profile 2026-07-22 06:43:05 +00:00
Nathnael
d95af0ea72 style: show the profile and the review ont the settings 2026-07-21 12:13:18 +00:00
Nathnael
f737e401b3 fix: the issue in the sheets file 2026-07-10 12:10:17 +00:00
Nathnael
e04b513b8f feat: password reset flow 2026-07-09 08:50:08 +00:00
Nathnael
8947ab8614 feat: fix the settings preview for the business licence and changes request to the approval 2026-07-08 10:42:00 +00:00
Nathnael
300afb4c77 feat: add existing files to customer documet tab on portal 2026-07-03 06:57:56 +00:00
Nathnael
e5aab84f51 feat: ui changes and pdf setup on the clients 2026-07-01 06:56:58 +00:00
Marshal
0ab553bf48 add file viewer functionality across various components
- Implemented a shared file viewer modal using `useFileViewer` hook to allow inline viewing of documents (images, PDFs, videos, etc.) across the application.
- Updated `ContractClearanceReviewSection`, `ContractRequestDetailPage`, `ContractViewPage`, and booking-related components to utilize the new file viewer for document previews.
- Added "Approve all" button in `ContractClearanceReviewSection` to bulk approve documents.
- Enhanced document action buttons to include view and download options based on file type.
- Introduced `isViewable` utility to determine if a file can be previewed inline.
- Created `FileViewer` component to handle rendering of various file types and added appropriate fallback for unsupported formats.
2026-06-27 19:18:43 +00:00
Nathnael Wondisha
d41013890b Merge branch 'dev' into freight/fix/type-errors 2026-06-25 09:27:14 +03:00
Nathnael
083a87ab9e fix: rm the otp on signup 2026-06-24 13:21:03 +00:00
Nathnael
9b48955eaf feat: centralized the user onboaridn requriements 2026-06-24 11:50:28 +00:00
Marshal
6fd1b68389 enhance company approval workflow and TIN validation; add pending approval handling in booking and onboarding forms 2026-06-23 08:37:15 +00:00
Marshal
1f92a04ecf feat: add eTrade fields to company entity and onboarding process
- Added new fields to the Company entity: licenceNumber, statusDescription, dateRegistered, renewedFrom, renewalDate, renewedTo, region, zone, woreda, kebele, houseNo, and etradePhone.
- Updated onboarding wizard to include a new contact step and fetch company information from eTrade using TIN.
- Created ETradeInfo component to handle fetching and displaying eTrade data.
- Implemented ETradeService to interact with eTrade API and extract relevant company registration data.
- Added new DTOs for fetching eTrade data and handling responses.
- Updated CompanyProfileForm to integrate new fields and handle eTrade data.
- Created hooks for managing eTrade data fetching and error handling.
2026-06-20 10:27:41 +00:00
Marshal
54587a8c55 feat: add nationality selection and business license upload functionality
- Introduced a new step in the onboarding process to select company nationality (Ethiopian or Foreign).
- Updated API and service layers to handle nationality data for companies.
- Added support for uploading multiple business license files for each operational profile.
- Refactored company and forwarder forms to include new license upload step.
- Created a reusable RoleLicenseStep component for managing license file uploads.
- Implemented utility functions for phone number handling.
- Added migrations to update the database schema for nationality and business license files.
2026-06-20 08:28:01 +00:00
Marshal
ed91f817ff feat: enhance onboarding process and company profile management
- Updated CompanyInfoResponseDto to include company profile data in response.
- Enhanced ResponseExternalProfileDto to include active profile type and onboarding details.
- Added new fields to ExternalProfile entity for active profile type and onboarding status.
- Implemented onboarding wizard dialog in the frontend to guide users through the onboarding process.
- Introduced API endpoints for managing company profiles and onboarding steps.
- Created migrations to add new columns for active mode and onboarding status in the database.
- Added functionality to switch between operational modes (importer/exporter) and create profiles as needed.
- Improved user experience by ensuring onboarding is enforced for new users and those without completed profiles.
2026-06-19 22:07:58 +00:00
Marshal
7106a549ab Add signature management features for booking contracts
- Implement MySignatureCard component for viewing and updating saved signatures.
- Enhance BookingContractPage to utilize saved signatures for contract signing.
- Introduce hooks for fetching and saving user signatures.
- Update ContractView interface to include saved signature details.
- Create signatures service for API interactions related to user signatures.
2026-06-16 23:06:41 +00:00
ghost2023
cf3db76bb1 type fixes 2026-06-16 15:13:11 +03:00
Nathnael
adba481f23 feat: setted up the schedule in the booking 2026-06-16 07:18:59 +00:00
Nathnael
16f506062a feat: enhance auth guard 2026-06-11 08:22:39 +00:00
Nathnael
c70c10b0df fixes 2026-06-09 08:29:09 +00:00
ghost2023
7a19a161e1 fix: redirects 2026-06-06 09:11:30 +03:00
ghost2023
ac964bace8 feat(WIP): setting and upload logic 2026-06-04 15:40:38 +03:00
ghost2023
f9357ed1b2 feat(api): Introduce dedicated company management API and service 2026-06-03 16:19:04 +03:00
ghost2023
0aece8f1dc feat(portal): Overhaul authentication flow and application routing 2026-06-01 11:37:47 +03:00
ghost2023
0eaa1f93f3 feat(onboarding): Implement customer onboarding guard in App.tsx, redirecting unprofiled users to OnboardingPage, centralizing user and customer data management in useAuth with cookie-based auth. 2026-05-28 15:54:41 +03:00
ghost2023
53e8b40123 refactor(auth): Remove IAM library, implement custom cookie and local storage auth 2026-05-28 15:54:26 +03:00
ghost2023
64356a20e6 feat(frieght): setup useAuth 2026-05-28 15:54:26 +03:00
yaschalew
c7347b88d7 customer registration api integration 2026-05-21 02:21:32 +03:00
yaschalew
51d6df42bb file upload settings 2026-05-20 08:15:29 +03:00
Michael Abebe
1c5ee19388 chore: fmt 2026-05-12 16:50:18 +03:00
Muluhabt
3b8b6979db Project Initialization 2026-05-12 15:17:16 +03:00