@burdenoff/microfe-movethewheels 2026.801.1 → 2026.802.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -77,7 +77,10 @@ export function ProofOfDeliveryCard({ deliveryJobId }: ProofOfDeliveryCardProps)
|
|
|
77
77
|
<p className="font-medium">
|
|
78
78
|
{epod.latitude.toFixed(5)}, {epod.longitude.toFixed(5)}
|
|
79
79
|
{epod.locationAccuracy != null && (
|
|
80
|
-
<span className="text-text-secondary">
|
|
80
|
+
<span className="text-text-secondary">
|
|
81
|
+
{' '}
|
|
82
|
+
(±{Math.round(epod.locationAccuracy)}m)
|
|
83
|
+
</span>
|
|
81
84
|
)}
|
|
82
85
|
</p>
|
|
83
86
|
</div>
|
|
@@ -167,7 +167,9 @@ export function useEpod(deliveryJobId: string | undefined) {
|
|
|
167
167
|
);
|
|
168
168
|
setEpod(data.epod ? mapEpod(data.epod) : null);
|
|
169
169
|
} catch (fetchError) {
|
|
170
|
-
setError(
|
|
170
|
+
setError(
|
|
171
|
+
fetchError instanceof Error ? fetchError : new Error('Failed to load proof of delivery')
|
|
172
|
+
);
|
|
171
173
|
setEpod(null);
|
|
172
174
|
} finally {
|
|
173
175
|
setIsLoading(false);
|
|
@@ -290,7 +292,9 @@ export function useCaptureEpod() {
|
|
|
290
292
|
return mapEpod(data.captureEpod);
|
|
291
293
|
} catch (captureError) {
|
|
292
294
|
const err =
|
|
293
|
-
captureError instanceof Error
|
|
295
|
+
captureError instanceof Error
|
|
296
|
+
? captureError
|
|
297
|
+
: new Error('Failed to capture proof of delivery');
|
|
294
298
|
setError(err);
|
|
295
299
|
throw err;
|
|
296
300
|
} finally {
|
|
@@ -362,7 +366,10 @@ export function useEpodPhotoUpload() {
|
|
|
362
366
|
setProgress(100);
|
|
363
367
|
return { fileId: completed.completeUpload.fileId, fileName: file.name };
|
|
364
368
|
} catch (uploadError) {
|
|
365
|
-
const err =
|
|
369
|
+
const err =
|
|
370
|
+
uploadError instanceof Error
|
|
371
|
+
? uploadError
|
|
372
|
+
: new Error('The photo could not be uploaded.');
|
|
366
373
|
setError(err);
|
|
367
374
|
throw err;
|
|
368
375
|
} finally {
|
|
@@ -27,7 +27,16 @@ import {
|
|
|
27
27
|
Upload,
|
|
28
28
|
} from 'lucide-react';
|
|
29
29
|
import { PageLayout } from '../components/PageLayout';
|
|
30
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
Button,
|
|
32
|
+
Card,
|
|
33
|
+
CardContent,
|
|
34
|
+
CardHeader,
|
|
35
|
+
CardTitle,
|
|
36
|
+
Input,
|
|
37
|
+
Label,
|
|
38
|
+
Textarea,
|
|
39
|
+
} from '../components/ui';
|
|
31
40
|
import { SignaturePad, type SignaturePadHandle } from '../components/SignaturePad';
|
|
32
41
|
import { FormError } from '../components/FormError';
|
|
33
42
|
import { Notice, useNotice } from '../components/Notice';
|
|
@@ -85,10 +94,14 @@ function CaptureForm({
|
|
|
85
94
|
}
|
|
86
95
|
|
|
87
96
|
const signatureData =
|
|
88
|
-
signatureType === 'typed'
|
|
97
|
+
signatureType === 'typed'
|
|
98
|
+
? typedSignature.trim()
|
|
99
|
+
: (signaturePadRef.current?.toDataUrl() ?? null);
|
|
89
100
|
if (!signatureData) {
|
|
90
101
|
setValidationError(
|
|
91
|
-
signatureType === 'typed'
|
|
102
|
+
signatureType === 'typed'
|
|
103
|
+
? 'Type the recipient full name as their signature.'
|
|
104
|
+
: 'A signature is required.'
|
|
92
105
|
);
|
|
93
106
|
return;
|
|
94
107
|
}
|
|
@@ -253,7 +266,11 @@ export default function DeliveryCapturePage() {
|
|
|
253
266
|
<Notice message={message} />
|
|
254
267
|
|
|
255
268
|
{selectedJob ? (
|
|
256
|
-
<CaptureForm
|
|
269
|
+
<CaptureForm
|
|
270
|
+
job={selectedJob}
|
|
271
|
+
onCaptured={handleCaptured}
|
|
272
|
+
onCancel={() => setSelectedJob(null)}
|
|
273
|
+
/>
|
|
257
274
|
) : isLoading ? (
|
|
258
275
|
<p className="text-text-secondary text-center py-8">Loading your deliveries…</p>
|
|
259
276
|
) : error ? (
|