Web: cleanup, move objectEmpty(o) function to main.js

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2022-05-19 15:41:23 +02:00
parent 6a0e4c6e56
commit 3274e2c551
3 changed files with 2 additions and 11 deletions

View File

@ -55,12 +55,6 @@ import * as datetime from "@/datetime";
import * as API from '@/manager-api';
import { apiClient } from '@/stores/api-query-count';
function objectEmpty(o) {
if (!o) return true;
return Object.entries(o).length == 0;
}
window.objectEmpty = objectEmpty;
export default {
props: [
"jobData", // Job data to show.

View File

@ -47,11 +47,6 @@ import * as datetime from "@/datetime";
import * as API from '@/manager-api';
import { apiClient } from '@/stores/api-query-count';
function objectEmpty(o) {
if (!o) return true;
return Object.entries(o).length == 0;
}
export default {
props: [
"taskData", // Task data to show.

View File

@ -11,6 +11,8 @@ window.DateTime = DateTime;
// plain removes any Vue reactivity.
window.plain = (x) => JSON.parse(JSON.stringify(x));
// objectEmpty returns whether the object is empty or not.
window.objectEmpty = (o) => !o || Object.entries(o).length == 0;
const app = createApp(App)
const pinia = createPinia()