# NGBVD Repeatable Rows + Edit Records Fix

This patch does not change the accepted UI/UX design. It fixes functionality only.

## Fixes
- Add-row behaviour for Perpetrator, Witness, Action Taken and Case Status.
- Each cloned row now has independent select/dropdown behaviour.
- Selectize/searchable dropdowns are reinitialised correctly after adding a row.
- Date pickers are reinitialised correctly after adding a row.
- Case Status dependent dropdowns now populate within the same row only.
- Exact duplicate rows within the same section are blocked before save.
- Backend duplicate validation also rejects exact duplicates in the same submitted section.
- Edit mode now displays previously saved Perpetrator, Witness, Action and Case Status records.
- Update methods now update existing rows where row IDs are submitted, and add new rows where needed.
- Backend save logic uses transactions and `saveOrFail()` to avoid partial commits.

## Test URLs
- /dataentry/index?id=<case_id>&tab=perpetrator
- /dataentry/index?id=<case_id>&tab=witness
- /dataentry/index?id=<case_id>&tab=action
- /dataentry/index?id=<case_id>&tab=status
- /dataentry/update?id=<case_id>&tab=perpetrator
- /dataentry/update?id=<case_id>&tab=witness
- /dataentry/update?id=<case_id>&tab=action
- /dataentry/update?id=<case_id>&tab=status
