Skip to content

Fiks småting i legg til alle kunder på agent systembruker - #1835

Merged
mgunnerud merged 2 commits into
mainfrom
fix/add-all-customers-cleanup
Jan 19, 2026
Merged

Fiks småting i legg til alle kunder på agent systembruker#1835
mgunnerud merged 2 commits into
mainfrom
fix/add-all-customers-cleanup

Conversation

@mgunnerud

@mgunnerud mgunnerud commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

Description

  • Ikke vis "Legg til alle kunder" knapp hvis det ikke finnes noen kunder
  • Legg til mer mellomrom mellom liste-header og liste
  • Fjern tidligere feilmelding hvis legg til/fjern går bra på neste forsøk
  • Legg til litt bedre styling for "Legg til kunder" dialog på mobil/små skjermer
image

Related Issue(s)

  • denne PRen

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Summary by CodeRabbit

  • Bug Fixes

    • Add All button now displays only when there are customers available to add
    • Error messages are properly cleared after successful customer additions or removals
  • Style

    • Improved layout spacing and alignment in the customer list header
    • Enhanced responsive design for smaller screens with better control wrapping

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 19, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR refactors the customer list layout and enhances error state management. CSS changes introduce flexbox wrapping and responsive behavior to the header. The component restructures the search/filter UI and adds a conditional check for list length in the Add All button rendering. Error IDs are now cleared from state after successful customer add or remove operations.

Changes

Cohort / File(s) Summary
Customer List Layout & UI
src/features/amUI/systemUser/SystemUserAgentDelegationPage/CustomerList.module.css, src/features/amUI/systemUser/SystemUserAgentDelegationPage/CustomerList.tsx
Refactored header layout with flexbox wrapping and responsive gap/margin adjustments. Removed .listSearchAndFilter wrapper and added .addAllCustomers with auto margin alignment. Restructured component JSX to decouple search/filter controls and conditionally render Add All button only when list has items.
Error State Management
src/features/amUI/systemUser/SystemUserAgentDelegationPage/SystemUserAgentDelegationPageContent.tsx
Introduced removeErrorId() helper function to clear error IDs from state after successful customer add or remove operations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

✨ A layout reborn, no longer tight,
Flexing and wrapping with responsive might,
Errors now fade when success takes the stage,
Clean UI flows turn the page! 📋

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is in Norwegian and translates to 'Fix small things in add all customers to agent system user'. It accurately reflects the PR's main objectives: UI layout improvements, conditional button rendering, error clearing, and mobile styling adjustments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added bugfix kind/bug Used when something isn't working labels Jan 19, 2026
@mgunnerud
mgunnerud requested a review from Nyeng January 19, 2026 09:04
@mgunnerud
mgunnerud merged commit 0453177 into main Jan 19, 2026
6 checks passed
@mgunnerud
mgunnerud deleted the fix/add-all-customers-cleanup branch January 19, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix kind/bug Used when something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants