Skip to content

Commit

Permalink
Merge pull request #3 from temporalio/rh-cancelled-fulfillments
Browse files Browse the repository at this point in the history
Show a better status for cancelled fulfillments.
  • Loading branch information
tomwheeler authored Jun 21, 2024
2 parents 10990f7 + f781240 commit 48f9bc1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.svelte-kit
node_modules
4 changes: 3 additions & 1 deletion src/lib/components/fulfillment-details.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export let order: Order;
$: fulfillments = order?.fulfillments?.filter((f) => f.status != 'cancelled') || [];
$: fulfillments = order?.fulfillments || [];
$: getStatus = (fulfillment: Fulfillment) => {
if (!fulfillment.shipment) return fulfillment.status;
Expand All @@ -21,6 +21,8 @@
<p class="location">
{#if fulfillment?.location}
<i>{fulfillment.location}</i>
{:else if fulfillment?.status == "cancelled"}
<strong>Unavailable</strong>
{:else}
<strong>Action Required</strong>
{/if}
Expand Down
6 changes: 4 additions & 2 deletions src/lib/components/shipment-status.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
});
}
const inactiveStatuses = ['pending', 'unavailable'];
const inactiveStatuses = ['pending', 'unavailable', 'cancelled'];
const activeStatuses = ['booked', 'dispatched', 'delivered'];
$: finalStatus = status || 'pending';
Expand All @@ -26,6 +26,7 @@
class:incomplete={!inactive && currentIndex < index}
class:pending={s === 'pending'}
class:unavailable={s === 'unavailable'}
class:cancelled={s === 'cancelled'}
>
{s.toUpperCase()}
</li>
Expand Down Expand Up @@ -85,7 +86,8 @@
}
li.incomplete::before,
li.unavailable::before {
li.unavailable::before,
li.cancelled::before {
background: lightcoral;
}
Expand Down

0 comments on commit 48f9bc1

Please sign in to comment.