Skip to content

feat: allow bulk SHS registration from comma-separated serials#1371

Open
Zhey-on wants to merge 1 commit intoEnAccess:mainfrom
Zhey-on:fix/1368-shs-bulk-serial-registration
Open

feat: allow bulk SHS registration from comma-separated serials#1371
Zhey-on wants to merge 1 commit intoEnAccess:mainfrom
Zhey-on:fix/1368-shs-bulk-serial-registration

Conversation

@Zhey-on
Copy link

@Zhey-on Zhey-on commented Mar 12, 2026

Brief summary of the change made

This PR implements a basic bulk registration flow for SHS devices from the "Add SHS" modal.

  • The serial number field now accepts multiple values as chips.
  • Users can paste a comma-separated list (or line-separated values), which is converted into chips.
  • Saving the form creates one SHS record per serial number.
  • Newly created SHS entries are prepended to the list without reloading.
  • As a small UX improvement, users can click a chip to edit it.
  • Validation feedback for invalid serials is now clearer and highlights invalid values in red.

closes: #1368

Are there any other side effects of this change that we should be aware of?

  • No backend API contract changes were introduced.
  • Bulk creation is currently implemented as sequential create requests (one request per serial), which matches the intermediate solution requested in the issue.

Describe how you tested your changes?

Manual test in local development UI:

  1. Open Solar Home Systems and click New SHS.
  2. Paste 12345678, 87654321, 76543210 into the serial field.
  3. Confirm values are converted into chips.
  4. Click Save and verify multiple SHS entries are created and shown in the table.
  5. Click an existing chip, edit it, and confirm the updated value is kept.
  6. Enter an invalid serial (e.g. 123) and verify:
    • a clear error message is shown,
    • invalid values are highlighted in red.

Pull Request checklist

Please confirm you have completed any of the necessary steps below.

  • Meaningful Pull Request title and description
  • Changes tested as described above
  • Added appropriate documentation for the change.
  • Created GitHub issues for any relevant followup/future enhancements if appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Allow registration of SHS devices in bulk

1 participant