Routine {routine.routine_date} {routine.part_of_day.toUpperCase()} — innercontext
{#snippet meta()}
{routine.part_of_day.toUpperCase()} {m.routines_steps({ count: steps.length })} {#if routine.notes} {routine.notes} {/if}
{/snippet}

{m["routines_amOrPm"]()}

{routine.part_of_day.toUpperCase()}

{m.routines_steps({ count: steps.length })}

{steps.length}

{#if routine.notes}

{routine.notes}

{/if}

{m.routines_steps({ count: steps.length })}

{#if showStepForm}
{/if} {#if steps.length}
{#each steps as step, i (step.id)}
{#if editingStepId === step.id}
{#if step.product_id !== undefined} (editDraft.product_id = value || undefined)} />
(editDraft.dose = e.currentTarget.value)} placeholder={m["routines_dosePlaceholder"]()} />
(editDraft.region = e.currentTarget.value)} placeholder={m["routines_regionPlaceholder"]()} />
{:else} (editDraft.action_type = (value || undefined) as GroomingAction | undefined)} />
(editDraft.action_notes = e.currentTarget.value)} placeholder={m["routines_actionNotesPlaceholder"]()} />
{/if} {#if editError}

{editError}

{/if}
{:else}
{i + 1}.
{#if step.product_id} {@const product = products.find((p) => p.id === step.product_id)}

{product?.name ?? step.product_id}

{#if product?.brand}

{product.brand}

{/if} {:else if step.action_type}

{step.action_type.replace(/_/g, ' ')}

{:else}

{m["routines_unknownStep"]()}

{/if}
{#if step.dose} {step.dose} {/if}
{/if}
{/each}
{:else}

{m["routines_noSteps"]()}

{/if}

{m["routines_confirmDelete"]()}

preventIfNotConfirmed(e, m["routines_confirmDelete"]())} >