Commit Graph

1636 Commits

Author SHA1 Message Date
Hagernesh
375cf55e5f LM map missing map api fall back fix 2026-08-08 07:51:41 +00:00
Hagernesh
6b1ffa831f feat(eims): surface filing state in backoffice and alert on failures
Two gaps that only bite in production: nobody could see an invoice's filing
state, and a blocked chain was visible only in the logs.

A failed filing now notifies the staff who can act on it. An ambiguous result
is HIGH priority because it blocks every further invoice for the system number
until someone resolves it, and nothing else would surface that -- the sweep
just goes quiet. A deterministic rejection affects one invoice, so it is
normal priority. The alert never throws: it must not mask the filing outcome.

The backoffice invoice detail page gains an EIMS card showing status, IRN,
counter, submitted and acknowledged timestamps, and the gateway's own error
message, with actions gated on invoices:eims_register. FAILED offers "File
again" -- the reservation model already allows re-registering a rejected
invoice, so retry needed no new endpoint. UNKNOWN offers no re-file button at
all, since resubmitting risks a duplicate registration, and instead explains
that a supervisor must record the IRN or discard the attempt.

Also aligns the migration class name with its renamed file. The DDL is
idempotent, so re-applying under the new name is a no-op against the columns;
it leaves one superseded row in freight.migrations.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 04:56:57 +00:00
Marshal
a05753f4a6 Merge branch 'dev' of github.com:Tria-plc/edr-platform into freight_feature/usermanagement
# Conflicts:
#	apps/edr-freight-web/backoffice/src/App.tsx
2026-08-07 23:55:30 +00:00
Marshal
cd90ccb0f5 feat(contracts): per-cargo bulk contract templates 2026-08-07 23:50:27 +00:00
marshal
7d8a2847e0 Merge pull request #1172 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-08 02:00:59 +03:00
Marshal
d2eb47d14b feat(ui): 2026-08-07 23:00:06 +00:00
Nathnael Wondisha
22e6e550bc Merge pull request #1164 from Tria-plc/freight/nati-2
Freight/nati 2
2026-08-07 15:58:02 +03:00
Nathnael
c9bb105e94 feat: add nationality indicator to the customer 2026-08-07 12:54:00 +00:00
Nathnael Wondisha
116ea97be8 Merge pull request #1163 from Tria-plc/freight/nati-2
Freight/nati 2
2026-08-07 15:26:32 +03:00
Nathnael
1e9149ce00 feat: better navigation in backoffice 2026-08-07 12:24:30 +00:00
Marshal
70215a9f37 feat(wagons): audited maintenance/availability toggle 2026-08-07 12:10:43 +00:00
Marshal
ffdb4c5117 merge 2026-08-07 09:04:11 +00:00
Marshal
64150acdca issue fix 2026-08-07 08:44:03 +00:00
Nathnael
7d2f17d767 Merge branch 'dev' into freight/nati-2 2026-08-07 08:09:34 +00:00
Nathnael
c1fcabcba2 feat(backoffice): guard routes and actions by permission
Mirrors the new keys in lib/permissions.ts, wraps the warehouse,
overview, reports, support and booking-request routes in
RequirePermission, and gates the dispatch, mark-paid, invoice pay/cancel,
export and support-send actions behind their own keys. Removes duplicate
route blocks.
2026-08-07 07:32:25 +00:00
Marshal
fc7f40a373 fix wagon cancellation 2026-08-07 07:18:12 +00:00
Marshal
296878cbde fix wagon cncellation 2026-08-07 06:59:31 +00:00
Nathnael
828392dd04 feat: edr help video 2026-08-07 06:57:55 +00:00
Marshal
3db14bc09a fix wagon cncellation 2026-08-07 06:31:25 +00:00
Marshal
17f6230129 fix wagon cancellation 2026-08-07 05:53:55 +00:00
Marshal
eb1349e846 fix wagon cncellation 2026-08-07 05:48:23 +00:00
Marshal
2321c9b893 Merge branch 'dev' of github.com:Tria-plc/edr-platform into freight_feature/usermanagement 2026-08-06 23:49:48 +00:00
Marshal
0f4aa1128f giveme git commit message 50 char 2026-08-06 23:48:06 +00:00
Nathnael Wondisha
eff60885cd Merge pull request #1146 from Tria-plc/freight/nati-2
Freight/nati 2
2026-08-07 01:41:42 +03:00
marshal
4a02eca537 Merge pull request #1145 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-07 01:35:39 +03:00
Marshal
96a4dd2e7f exclude self from container clash 2026-08-06 22:34:53 +00:00
Marshal
1b8c7e4296 full change-booking flow for op revisions 2026-08-06 21:57:08 +00:00
Marshal
c61b66fd23 feat(bookings): show allocated wagons in portal 2026-08-06 20:40:28 +00:00
Nathnael
30b0eff603 feat: add faq, help, privacy policy and tos 2026-08-06 20:40:05 +00:00
Marshal
4eb0d56faf feat(bookings): show allocated wagons in portal 2026-08-06 20:25:08 +00:00
Marshal
7db03ea347 customer cancel + revise edit flow 2026-08-06 20:16:48 +00:00
Marshal
9a50df2be3 add cancellation for booking 2026-08-06 20:05:13 +00:00
Nathnael
dd2b624aa6 fix: onboarding validation 2026-08-06 18:54:54 +00:00
Marshal
533de3cc93 fix(cbe): update response code from 3 to 2 for business failures in CBE integration 2026-08-06 17:50:27 +00:00
Marshal
3a2f1a46d6 fix(auth): resolve position-type permissions so GL staff can open clearance pages 2026-08-06 13:24:42 +00:00
Hagernesh
95fad6f095 Bulk (per ton per km) last-mile rates now carry From/To km bands like
container mode: the Add Rate dialog offers the multi-tier editor in both
modes, each tier is created as its own rate row, and overlapping bulk
bands are rejected. Pricing picks the tier whose half-open band holds
the trip km, falling back to the legacy bandless bulk rate.
2026-08-06 08:56:35 +00:00
Hagernesh
69f6fd36a9 fix(rates): render stored rate currency, default last mile to birr
The rate matrix currency cell hardcoded USD, so a last-mile rate
priced in ETB still displayed as dollars. formatCell now takes the
row and reads its currency code, falling back to USD.

Last-mile currency select gets defaultValue ETB (new generic
FormFieldDef.defaultValue for create-time pre-selection) and lists
ETB (Birr) first; USD stays selectable. Backend already persisted
and validated the chosen currency.
2026-08-06 08:56:35 +00:00
Hagernesh
4786c896b5 feat(last-mile): customer-signed LM contract gates the advance invoice
Approval now snapshots the rate estimate and generates a last-mile
contract instead of invoicing immediately. The customer picks a delivery
date on the confirm form, then reviews and signs the contract in the
portal (saved signature or drawn); the signed PDF is stored as
LM_<CustomerName>.pdf and only then is the advance invoice issued.
Backoffice shows signature status and the contract download.
2026-08-06 07:11:23 +00:00
Hagernesh
4716aa14c3 feat(rates): multi-tier distance band entry in last-mile rate form
- tierList field type in rule-engine form dialog (add/remove rows,
  overlap + open-ended validation, From km auto-continues)
- create submits one rate row per tier sequentially
- editing a band row keeps the single From/To/value form
2026-08-06 07:11:23 +00:00
Hagernesh
5c8c68e990 feat(rates): last-mile rate rules with bulk per-ton-km and container distance bands
- rates: min_km/max_km columns, PER_TON_KM unit, ETB|USD currency for last mile
- extend UQ_rates_pattern with band start; overlap + shape validation
- shared last-mile charge resolver; approve-dialog price estimate endpoint
- delivery-fee invoice prices via rules, falls back to vehicle price/km
- backoffice: last-mile rate form (mode, container type, band, currency)
2026-08-05 22:13:42 +00:00
marshal
ca109d88d2 Merge pull request #1128 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-05 23:05:39 +03:00
Marshal
1b5f364294 feat(fleet): add permanent delete option to FleetRecordActions 2026-08-05 20:05:05 +00:00
Hagernesh
1f4d659ffb Last mile confirmation request , approval, payment Feature 2026-08-05 20:01:48 +00:00
Nathnael Wondisha
37d0cc966a Merge pull request #1124 from Tria-plc/freight/nati-2
Audit log and presistent cbe pnr
2026-08-05 17:23:54 +03:00
Nathnael
2133d6a574 fix: fitler out the client side request 2026-08-05 14:23:00 +00:00
Nathnael
595c165820 feat: implement audit logs 2026-08-05 14:17:00 +00:00
Marshal
b5eeb7c3a3 fix issue 2026-08-05 14:01:01 +00:00
Nathnael
4f08b370e1 Merge branch 'dev' into freight/nati-2 2026-08-05 13:27:10 +00:00
Nathnael
8476a6a00e fix: the fayda and etrade syncing 2026-08-05 13:06:56 +00:00
Marshal
b7dcc1bf0a feat(billing): add PAYMENT_PROCESSING invoice status on payment success redirect (all except CBE bill) 2026-08-05 12:59:37 +00:00