feat(workorder): audit-selection-workorder #1618
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature: Audit selected devices from Work Order

What it does
This PR adds an Audit action to the Work Order page (workorder.php). When the user clicks Audit Selected Devices, the page collects the device IDs stored in the existing workOrder cookie and triggers an audit for each device via the REST API.
1)Code changes vs master
New container for results
New JavaScript audit handler
New click handler for #audit:
Reads workOrder cookie.
Handles empty selection with an i18n’d message.
Adds a confirmation dialog before moving items.
Executes all /api/v1/device//store POSTs in parallel and shows a success/error count using Promise.allSettled, with an i18n’d completion message.
On Clear, shows an i18n’d alert (clearedMessage) before redirecting to index.php.
confirmMoveMessage, moveSuccessMessage, moveSuccessCountMessage, moveErrorCountMessage, clearedMessage.
Adds i18n’d strings in the audit flow:
“No devices selected.”, “Running audit…”, “Audit Results”, “Error during audit”.