| 
														
															@@ -2,9 +2,10 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import { useStore } from "vuex"; 
														 | 
														
														 | 
														
															 import { useStore } from "vuex"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import { ref, defineAsyncComponent, onMounted, onBeforeUnmount } from "vue"; 
														 | 
														
														 | 
														
															 import { ref, defineAsyncComponent, onMounted, onBeforeUnmount } from "vue"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import Toast from "toasters"; 
														 | 
														
														 | 
														
															 import Toast from "toasters"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import { storeToRefs } from "pinia"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import { useWebsocketsStore } from "@/stores/websockets"; 
														 | 
														
														 | 
														
															 import { useWebsocketsStore } from "@/stores/websockets"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import { useLongJobsStore } from "@/stores/longJobs"; 
														 | 
														
														 | 
														
															 import { useLongJobsStore } from "@/stores/longJobs"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import { useModalState } from "@/vuex_helpers"; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import { useBulkActionsStore } from "@/stores/bulkActions"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import ws from "@/ws"; 
														 | 
														
														 | 
														
															 import ws from "@/ws"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const AutoSuggest = defineAsyncComponent( 
														 | 
														
														 | 
														
															 const AutoSuggest = defineAsyncComponent( 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -24,9 +25,8 @@ const { setJob } = useLongJobsStore(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const { socket } = useWebsocketsStore(); 
														 | 
														
														 | 
														
															 const { socket } = useWebsocketsStore(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-const { type } = useModalState("modals/bulkActions/MODAL_UUID", { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	modalUuid: props.modalUuid 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-}); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+const bulkActionsStore = useBulkActionsStore(props); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+const { type } = storeToRefs(bulkActionsStore); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const method = ref("add"); 
														 | 
														
														 | 
														
															 const method = ref("add"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const items = ref([]); 
														 | 
														
														 | 
														
															 const items = ref([]); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -34,8 +34,8 @@ const itemInput = ref(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const allItems = ref([]); 
														 | 
														
														 | 
														
															 const allItems = ref([]); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const init = () => { 
														 | 
														
														 | 
														
															 const init = () => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	if (type.autosuggest && type.autosuggestDataAction) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		socket.dispatch(type.autosuggestDataAction, res => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if (type.value.autosuggest && type.value.autosuggestDataAction) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		socket.dispatch(type.value.autosuggestDataAction, res => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			if (res.status === "success") { 
														 | 
														
														 | 
														
															 			if (res.status === "success") { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				const { items } = res.data; 
														 | 
														
														 | 
														
															 				const { items } = res.data; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				allItems.value = items; 
														 | 
														
														 | 
														
															 				allItems.value = items; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -47,10 +47,10 @@ const init = () => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const addItem = () => { 
														 | 
														
														 | 
														
															 const addItem = () => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	if (!itemInput.value) return; 
														 | 
														
														 | 
														
															 	if (!itemInput.value) return; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	if (type.regex && !type.regex.test(itemInput.value)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		new Toast(`Invalid ${type.name} format.`); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if (type.value.regex && !type.value.regex.test(itemInput.value)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		new Toast(`Invalid ${type.value.name} format.`); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	} else if (items.value.includes(itemInput.value)) { 
														 | 
														
														 | 
														
															 	} else if (items.value.includes(itemInput.value)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		new Toast(`Duplicate ${type.name} specified.`); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		new Toast(`Duplicate ${type.value.name} specified.`); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	} else { 
														 | 
														
														 | 
														
															 	} else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		items.value.push(itemInput.value); 
														 | 
														
														 | 
														
															 		items.value.push(itemInput.value); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		itemInput.value = null; 
														 | 
														
														 | 
														
															 		itemInput.value = null; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -65,30 +65,36 @@ const applyChanges = () => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	let id; 
														 | 
														
														 | 
														
															 	let id; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	let title; 
														 | 
														
														 | 
														
															 	let title; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	socket.dispatch(type.action, method.value, items.value, type.items, { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		cb: () => {}, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		onProgress: res => { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			if (res.status === "started") { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				id = res.id; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				title = res.title; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				closeCurrentModal(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	socket.dispatch( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		type.value.action, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		method.value, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		items.value, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		type.value.items, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		{ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			cb: () => {}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			onProgress: res => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				if (res.status === "started") { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+					id = res.id; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+					title = res.title; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+					closeCurrentModal(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				if (id) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+					setJob({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+						id, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+						name: title, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+						...res 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+					}); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			} 
														 | 
														
														 | 
														
															 			} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			if (id) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				setJob({ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					id, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					name: title, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					...res 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				}); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		} 
														 | 
														
														 | 
														
															 		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	}); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 }; 
														 | 
														
														 | 
														
															 }; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 onBeforeUnmount(() => { 
														 | 
														
														 | 
														
															 onBeforeUnmount(() => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	itemInput.value = null; 
														 | 
														
														 | 
														
															 	itemInput.value = null; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	items.value = []; 
														 | 
														
														 | 
														
															 	items.value = []; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	// Delete the VueX module that was created for this modal, after all other cleanup tasks are performed 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	store.unregisterModule(["modals", "bulkActions", props.modalUuid]); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	// Delete the Pinia store that was created for this modal, after all other cleanup tasks are performed 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	bulkActionsStore.$dispose(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 }); 
														 | 
														
														 | 
														
															 }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 onMounted(() => { 
														 | 
														
														 | 
														
															 onMounted(() => { 
														 |