Redesign login UI, add theme toggle, refactor user update
- Redesigned login page with two-panel layout and branding - Added HexaDistro logo and theme toggle to sidebar/header - Refactored user update: roles via update endpoint, removed assignRole API/controller - Extended UpdateUserRequest for username, role, password changes - UserService.UpdateAsync syncs changes with AuthHex, with rollback - Stock balances client dedupes by itemId-locationId - Middleware matcher excludes static assets from auth checks - Improved localStorage clearing for user context - Added lucide-react for icons - Minor UI/code cleanups for consistency and UX
This commit is contained in:
@@ -45,7 +45,15 @@ export function StockBalancesClient() {
|
||||
setLoading(true)
|
||||
try {
|
||||
const res = await stockApi.balances({ page: p, pageSize: ps })
|
||||
setData(getPaginatedItems(res))
|
||||
const items = getPaginatedItems(res)
|
||||
const seen = new Set<string>()
|
||||
const deduped = items.filter(r => {
|
||||
const k = `${r.itemId}-${r.locationId}`
|
||||
if (seen.has(k)) return false
|
||||
seen.add(k)
|
||||
return true
|
||||
})
|
||||
setData(deduped)
|
||||
setTotal(res.total)
|
||||
} catch (err) {
|
||||
toast.add({ title: 'Failed to load stock balances', description: getApiError(err), type: 'error' })
|
||||
|
||||
Reference in New Issue
Block a user