PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.15
Yatra – Travel Booking & Tour Operator Software v3.0.15
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 2.0.1 2.0.10 All 83 releases
yatra / resources / js / components / shared / bulkStatusOptions.ts

bulkStatusOptions.ts in Yatra – Travel Booking & Tour Operator Software 3.0.15, at resources/js/components/shared/bulkStatusOptions.ts

40 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from "../../lib/i18n";
2 import type { BulkActionOption } from "./types";
3
4 /**
5 * Returns a default set of bulk status action options based on current statusFilter.
6 * This is shared across Activities, Destinations, Difficulty Levels, etc.
7 */
8 export const getDefaultBulkStatusOptions = (
9 statusFilter: string,
10 ): BulkActionOption[] => {
11 const options: BulkActionOption[] = [];
12
13 switch (statusFilter) {
14 case "publish":
15 options.push({ value: "trash", label: __("Move to Trash", "yatra") });
16 options.push({ value: "draft", label: __("Make Draft", "yatra") });
17 break;
18 case "draft":
19 options.push({ value: "publish", label: __("Make Published", "yatra") });
20 options.push({ value: "trash", label: __("Move to Trash", "yatra") });
21 break;
22 case "trash":
23 options.push({ value: "publish", label: __("Make Published", "yatra") });
24 options.push({ value: "draft", label: __("Make Draft", "yatra") });
25 options.push({
26 value: "delete",
27 label: __("Delete Permanently", "yatra"),
28 });
29 break;
30 case "all":
31 default:
32 options.push({ value: "publish", label: __("Make Published", "yatra") });
33 options.push({ value: "draft", label: __("Make Draft", "yatra") });
34 options.push({ value: "trash", label: __("Move to Trash", "yatra") });
35 break;
36 }
37
38 return options;
39 };
40