Skip to content

Conversation

@alex001x
Copy link

Feature: Audit selected devices from Work Order
unnamed (1)

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.

  1. “Move to storage” UX

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.

  1. Clear workorder feedback

On Clear, shows an i18n’d alert (clearedMessage) before redirecting to index.php.

  1. I18n message variables

confirmMoveMessage, moveSuccessMessage, moveSuccessCountMessage, moveErrorCountMessage, clearedMessage.

Adds i18n’d strings in the audit flow:

“No devices selected.”, “Running audit…”, “Audit Results”, “Error during audit”.

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.

1 participant