diff --git a/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx b/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx index f30e464e7..ffbeb3221 100644 --- a/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx @@ -1,4 +1,4 @@ -import { useMemo, useState } from "react"; +import { type ReactNode, useMemo, useState } from "react"; import { ArrowRight, Eye, @@ -199,7 +199,50 @@ const tripSlipRows = (job: LastMileJob): [string, string][] => [ ["Delivery status", DELIVERY_STATUS_META[job.deliveryStatus].label], ]; -const SignatureBlock = ({ title }: { title: string }) => ( +const SampleStamp = () => ( + + + + + EDR FREIGHT + + + APPROVED + + + OPERATIONS + + + + +); + +const SignatureBlock = ({ title, stamp }: { title: string; stamp?: ReactNode }) => ( {title} @@ -216,21 +259,7 @@ const SignatureBlock = ({ title }: { title: string }) => ( - - - Stamp - - + {stamp} ); @@ -259,7 +288,7 @@ const TripSlipDocument = ({ job }: { job: LastMileJob }) => ( - + } /> ); @@ -277,12 +306,16 @@ const buildTripSlipHtml = (job: LastMileJob) => { `${escapeHtml(label)}${escapeHtml(value)}`, ) .join(""); - const signature = (title: string) => ` + const signature = (title: string, withStamp: boolean) => `
${title}
Name:
Signature:
-
STAMP
+ ${ + withStamp + ? '
EDR FREIGHTAPPROVEDOPERATIONS
' + : "" + }
`; return ` Trip Slip ${escapeHtml(job.bookingRef)} @@ -302,14 +335,18 @@ const buildTripSlipHtml = (job: LastMileJob) => { .sign-title { font-weight: 700; font-size: 13px; margin-bottom: 12px; } .sign-field { display: flex; gap: 6px; align-items: flex-end; font-size: 12px; color: #666; margin-bottom: 10px; } .sign-field .line { flex: 1; border-bottom: 1px solid #888; height: 16px; } - .stamp { margin-top: 6px; height: 96px; border: 1px dashed #aaa; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: 1px; color: #999; } + .stamp { margin-top: 6px; height: 96px; display: flex; align-items: center; } + .ring { width: 96px; height: 96px; border-radius: 50%; border: 2px solid #0c7a57; transform: rotate(-12deg); display: flex; align-items: center; justify-content: center; } + .ring-inner { width: 82px; height: 82px; border-radius: 50%; border: 1px solid #0c7a57; color: #0c7a57; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.1; } + .ring-inner span { font-size: 9px; font-weight: 700; letter-spacing: 1px; } + .ring-inner strong { font-size: 13px; font-weight: 800; }

EDR Freight

Last Mile Trip Slip

${escapeHtml(job.bookingRef)}${escapeHtml(job.requestedDate)}
${rows}
Acknowledgement
-
${signature("Driver")}${signature("Operator")}
+
${signature("Driver", false)}${signature("Operator", true)}
`; };