implement self-healing for freight payment milestones and enhance contract change request visibility

This commit is contained in:
Marshal
2026-07-07 07:45:59 +00:00
parent 05b13e84a8
commit 05d71eb6da
8 changed files with 124 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ import { Fragment, useMemo, useState } from "react";
import { useNavigate } from "react-router-dom";
import { useQuery } from "@tanstack/react-query";
import {
Badge,
Box,
Button,
Center,
@@ -339,6 +340,7 @@ export default function ContractsList() {
<Table.Tr>
<Table.Th style={{ width: 44 }} aria-label="Expand" />
<Table.Th>Contract</Table.Th>
<Table.Th>Type</Table.Th>
<Table.Th>Cargo</Table.Th>
<Table.Th>Route</Table.Th>
<Table.Th>Trade</Table.Th>
@@ -352,7 +354,7 @@ export default function ContractsList() {
<Table.Tbody>
{isLoading && (
<Table.Tr>
<Table.Td colSpan={10}>
<Table.Td colSpan={11}>
<Center py={48}>
<Loader color="edr-green" size="sm" />
</Center>
@@ -362,7 +364,7 @@ export default function ContractsList() {
{!isLoading && isError && (
<Table.Tr>
<Table.Td colSpan={10}>
<Table.Td colSpan={11}>
<Center py={48}>
<Text fz={13} c="red">
Failed to load contracts. Please try again.
@@ -374,7 +376,7 @@ export default function ContractsList() {
{!isLoading && !isError && rows.length === 0 && (
<Table.Tr>
<Table.Td colSpan={10}>
<Table.Td colSpan={11}>
<Stack align="center" gap={8} py={48}>
<Inbox size={26} color={MUTED} style={{ opacity: 0.5 }} />
<Text fz={13} c="dimmed">
@@ -442,10 +444,18 @@ export default function ContractsList() {
{c.reference}
</Text>
<Text fz={12} c="dimmed">
{isGeneral ? "General" : "One-Time"} ·{" "}
{isContainer ? "Containerised" : "Bulk"}
</Text>
</Table.Td>
<Table.Td>
<Badge
variant="light"
color={isGeneral ? "edr-green" : "gray"}
radius="sm"
>
{isGeneral ? "General" : "One-Time"}
</Badge>
</Table.Td>
<Table.Td>
<Group gap={7} wrap="nowrap" align="center">
{isContainer ? (
@@ -533,7 +543,7 @@ export default function ContractsList() {
</Table.Tr>
{isOpen && (
<Table.Tr style={{ background: "#F4FBF8" }}>
<Table.Td colSpan={10} style={{ padding: "6px 20px 18px" }}>
<Table.Td colSpan={11} style={{ padding: "6px 20px 18px" }}>
<ContractStepBanner contract={c} />
</Table.Td>
</Table.Tr>

View File

@@ -693,8 +693,25 @@ export default function NewContractPage({
title="A reviewer asked for changes"
mb="lg"
>
Update any contract detail or document that needs to change, then
resubmit the contract for review.
{editContract?.latestChangeRequestNote ? (
<Stack gap={6}>
<Text size="sm" fw={600}>
What the reviewer asked for:
</Text>
<Text
size="sm"
style={{ whiteSpace: "pre-wrap" }}
>
{editContract.latestChangeRequestNote}
</Text>
<Text size="sm" c="dimmed" mt={2}>
Update the details or documents below, then resubmit the
contract for review.
</Text>
</Stack>
) : (
"Update any contract detail or document that needs to change, then resubmit the contract for review."
)}
</Alert>
)}