Compare commits
2 Commits
287e9a2a0e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50f28e2a29 | ||
|
|
79616c8fdc |
@@ -10,7 +10,11 @@ export function Header() {
|
||||
return (
|
||||
<header className="border-b border-brand-700 bg-brand-600 text-white">
|
||||
<div className="mx-auto flex max-w-5xl items-center justify-between gap-3 px-4 py-3 sm:py-5">
|
||||
<div className="flex min-w-0 items-center gap-3">
|
||||
<Link
|
||||
href="/"
|
||||
className="flex min-w-0 items-center gap-3 rounded-lg outline-none ring-white/40 transition-opacity hover:opacity-90 focus-visible:ring-2"
|
||||
aria-label={c('siteName')}
|
||||
>
|
||||
<div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-white p-1 shadow-sm sm:h-12 sm:w-12 sm:p-1.5">
|
||||
<Image
|
||||
src="/gasol247-logo.png"
|
||||
@@ -29,7 +33,7 @@ export function Header() {
|
||||
{t('tagline')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
<div className="flex items-center gap-2 sm:gap-3">
|
||||
<Link
|
||||
href="/min-sida"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useTransition } from 'react';
|
||||
import { useEffect, useState, useTransition } from 'react';
|
||||
import { useTranslations, useLocale } from 'next-intl';
|
||||
import {
|
||||
setItemFulfillment,
|
||||
@@ -109,6 +109,13 @@ function FulfillmentRow({
|
||||
const [delivered, setDelivered] = useState(item.deliveredQuantity);
|
||||
const [returned, setReturned] = useState(item.returnedQuantity);
|
||||
|
||||
// Sync local state when server data refreshes (e.g. after deliver-all /
|
||||
// return-all bulk actions). Without this, the inputs stay stale until reload.
|
||||
useEffect(() => {
|
||||
setDelivered(item.deliveredQuantity);
|
||||
setReturned(item.returnedQuantity);
|
||||
}, [item.deliveredQuantity, item.returnedQuantity]);
|
||||
|
||||
const outstanding = Math.max(0, delivered - returned);
|
||||
const dirty =
|
||||
delivered !== item.deliveredQuantity || returned !== item.returnedQuantity;
|
||||
|
||||
Reference in New Issue
Block a user