${isSafeHttpUrl(part.shopping_url)
? html`
${part.name}`
: part.name}
${tracked
? html`
${part.stock}${part.unit ? ` ${part.unit}` : ""}${part.reorder_threshold != null
? html`/${part.reorder_threshold}`
: nothing}`
: nothing}
${ident ? html`${ident}` : nothing}
${part.storage_location
? html`${part.storage_location}`
: nothing}
${this.canWrite
? html`
${this._restockFor === part.id
? html`
(this._restockQty = (e.target as HTMLInputElement).value)}
@keydown=${(e: KeyboardEvent) => {
if (e.key === "Enter") this._restock(part);
if (e.key === "Escape") this._restockFor = null;
}}
/>