| @@ -420,13 +420,19 @@ | ||
| 420 | 420 | ]; |
| 421 | 421 | }, [statusFilter]); |
| 422 | 422 | |
| 423 | 423 | const handleBulkApply = async () => { |
| 424 | - if (!bulkAction || selectedIds.length === 0) { | |
| 425 | - showToast( | |
| 426 | - __("Please select items and a bulk action first.", "yatra"), | |
| 427 | - "error", | |
| 428 | - ); | |
| 424 | + // Report the input that is actually missing. The Apply button is disabled | |
| 425 | + // whenever nothing is selected, so this can only be reached with a non-empty | |
| 426 | + // selection — the combined message blamed the selection and left operators | |
| 427 | + // re-selecting rows that were already ticked. | |
| 428 | + if (selectedIds.length === 0) { | |
| 429 | + showToast(__("Please select at least one item.", "yatra"), "error"); | |
| 430 | + return; | |
| 431 | + } | |
| 432 | + | |
| 433 | + if (!bulkAction) { | |
| 434 | + showToast(__("Please choose a bulk action to apply.", "yatra"), "error"); | |
| 429 | 435 | return; |
| 430 | 436 | } |
| 431 | 437 | |
| 432 | 438 | try { |