PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.17
Yatra – Travel Booking & Tour Operator Software v3.0.17
3.0.17 3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 All 85 releases
← All changes | resources/js/pages/Items.tsx +12 -6 3.0.5 → 3.0.17 View file →
@@ -420,16 +420,22 @@
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");
429 430 return;
430 431 }
431 432
433 + if (!bulkAction) {
434 + showToast(__("Please choose a bulk action to apply.", "yatra"), "error");
435 + return;
436 + }
437 +
432 438 try {
433 439 setBulkMutationPending(true);
434 440
435 441 const selectedItems = items.filter((item: Item) =>
@@ -660,9 +666,9 @@
660 666 });
661 667 }
662 668
663 669 return actions;
664 - // eslint-disable-next-line react-hooks/exhaustive-deps
670 + // eslint-disable-next-line react-hooks/exhaustive-deps
665 671 }, [can, queryClient, showToast]);
666 672
667 673 return (
668 674 <div className="space-y-3">