Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Sep 4, 2024
1 parent 00c8cfe commit 38f42bb
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ui/src/plenty/orders/elements/create-producer-delivery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ export class CreateProducerDelivery extends SignalWatcher(LitElement) {
>${msg("Product Delivery")}</span
>
<span style="flex: 1"></span>
${errorInProcessing
? html`<sl-tag
>${msg("Incomplete:")}&nbsp;${errorInProcessing}</sl-tag
>`
: html``}
</div>
<sl-divider style="--spacing:0"></sl-divider>
<div class="column" style="gap: 16px;">
Expand Down Expand Up @@ -416,7 +422,8 @@ export class CreateProducerDelivery extends SignalWatcher(LitElement) {

const error = this.errorInProcessing(productHash);

if (error) return html`<sl-tag variant="danger">${msg("Error")}</sl-tag>`;
if (error)
return html`<sl-tag variant="danger">${msg("Incomplete")}</sl-tag>`;

switch (product.delivery!.type) {
case "Delivered":
Expand Down Expand Up @@ -451,9 +458,7 @@ export class CreateProducerDelivery extends SignalWatcher(LitElement) {
? html`
<span
>${msg(
str`Error in product "${products.get(decodeHashFromBase64(errorInProcessing))!.entry.name}": `,
)}${this.errorInProcessing(
decodeHashFromBase64(errorInProcessing),
str`Product "${products.get(decodeHashFromBase64(errorInProcessing))!.entry.name}" is incomplete`,
)}</span
>
`
Expand Down

0 comments on commit 38f42bb

Please sign in to comment.