{#if !$sessionHydrated}

Client Workspace

Hunter Premium Produce Lean 101 client workspace access

Restoring your workspace.

Checking the saved client session before deciding whether sign-in is required.

Checking Session

The sign-in form appears only when no valid local client session is available.

{:else if !$clientSession}

Client Sign-In

Hunter Premium Produce
Secure Workspace Access

Welcome back

Sign in with your email and password to continue.

{#if loginError} {/if}
{:else if postLoginRedirecting}

Opening Workspace

Hunter Premium Produce Applying your role permissions now

Preparing your workspace.

Routing you directly to the first area your role is allowed to open.

Applying Access Rules

Dashboard access is skipped for roles that do not have permission.

{:else}
{#snippet greetIcon()} {@const Icon = greeting.icon} {/snippet} {@render greetIcon()}

{greeting.label}, {firstName($clientSession?.name)}

{#if canOpenEditor($clientSession)} Open Mix Editor {/if}
{#each focusCards as card, i}
{card.code}
{#if loading} {:else} {card.label} {card.detail} {/if}
{#if loading} {:else} {card.value} {/if}
{/each}
Latest market check
NZD USD
{#if loading}
{:else}

{featuredMaterial?.name ?? 'No material loaded'}

{formatDate(featuredMaterial?.effective_date)}

{currency(featuredMaterial?.market_value)}

{currency(featuredMaterial?.cost_per_kg, 4)} / kg Current blend for Hunter Premium Produce

{/if}

Tracked Workspace

Entities currently feeding the Hunter costing model

{totalTracked} tracked items
{#each productionSegments as segment} {segment.label} {segment.value} {/each}
Total Input Spend
{#if loading} {:else} {currency(totalMarketValue)} {/if}

Across all tracked raw materials

Average Mix Cost
{#if loading} {:else} {currency(averageMixCost, 4)} {/if}

Per kg across the current mix set

Top Delivered Output
{#if loading}

{:else} {currency(featuredProduct?.finished_product_delivered)}

{featuredProduct?.product_name ?? 'No products loaded'}

{/if}

Production And Pricing

Throughput and Product Costing for {operations?.period_label ?? 'this month'}

Open Product Costing
Produced
{#if loading} {:else} {kg(operations?.total_kg)} {/if}

{operations?.entry_count ?? 0} throughput entries

Bags
{#if loading} {:else} {(operations?.total_bags ?? 0).toLocaleString(undefined, { maximumFractionDigits: 0 })} {/if}

Logged as bag runs

Wholesale Value
{#if loading} {:else} {currency(operations?.estimated_wholesale_value)} {/if}

{operations?.priced_entry_count ?? 0} priced entries

0}>
Pricing Issues
{#if loading} {:else} {operations?.pricing_issues?.total ?? 0} {/if}

Products needing review

Top Produced By kg
{#if loading} {#each Array(4) as _}
{/each} {:else if operations?.top_products?.length} {#each operations.top_products as product}
{product.product_name} {product.client_name ?? 'No client'} · {product.entries} entries {kg(product.kg)}
{/each} {:else}

No throughput recorded this month.

{/if}
Produced But Not Priced Fix these first
{#if loading} {#each Array(4) as _}
{/each} {:else if operations?.produced_not_priced?.length} {#each operations.produced_not_priced as product}
{product.product_name} {product.warnings[0] ?? product.status} {kg(product.kg)}
{/each} {:else}

All produced products have usable pricing.

{/if}

Monthly Pricing Pulse

Trend view of input pressure and delivered output movement

Peak {trendFocus.month} {trendFocus.label}
{#each monthLabels as label} {label} {/each}

{featuredMix?.name ?? 'Mix Preview'}

{featuredMix?.client_name ?? 'Hunter Premium Produce'}

Open Mix Master
Ingredients {featuredMix?.ingredients_count ?? 0}
Total Kg {featuredMix?.total_mix_kg ?? 0}
Total Cost {currency(featuredMix?.total_mix_cost)}

Priority Watchlist

Current client-facing checkpoints generated from the active costing snapshot

{#each focusCards as card} {/each}
Focus Owner Reference Date Status
{card.code}
{card.label} {card.value}
HP Hunter Premium Produce
{card.detail} Current checkpoint
{card.tone === 'warning' ? 'Watch' : 'On track'}

Finished Product Summary

Highest delivered pricing outputs

{#each topProducts as product}
{product.product_name} {product.warnings.length ? 'Review warnings' : 'Stable pricing output'}
{currency(product.finished_product_delivered)}
{/each}
{/if}