fix(shared-state): clear shared Production IDs when input is cleared
Fixes a bug where clearing the order number input in the extraction page did not clear the shared Production IDs in the main process. This caused the data cleanup page to continue using stale data when filtering by Production ID. Changes: - Add VALIDATION_CLEAR_SHARED_PRODUCTION_IDS IPC channel - Register handler to clear shared Production IDs by sender ID - Expose clearSharedProductionIds API in preload script - Update ExtractorPage to call clear when order numbers are empty Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -755,6 +755,17 @@ export function registerValidationHandlers(): void {
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* Clear shared Production IDs
|
||||
*/
|
||||
ipcMain.handle(
|
||||
IPC_CHANNELS.VALIDATION_CLEAR_SHARED_PRODUCTION_IDS,
|
||||
async (event): Promise<void> => {
|
||||
log.info('Clearing shared Production IDs')
|
||||
clearSharedProductionIds(event.sender.id)
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* Get cleaner data (order numbers from shared Production IDs + material codes from MaterialsToBeDeleted)
|
||||
* Filters materials by current user (admin sees all, regular users see only their own)
|
||||
|
||||
Reference in New Issue
Block a user