Web: cleanup, move objectEmpty(o)
function to main.js
No functional changes.
This commit is contained in:
parent
6a0e4c6e56
commit
3274e2c551
@ -55,12 +55,6 @@ import * as datetime from "@/datetime";
|
|||||||
import * as API from '@/manager-api';
|
import * as API from '@/manager-api';
|
||||||
import { apiClient } from '@/stores/api-query-count';
|
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 {
|
export default {
|
||||||
props: [
|
props: [
|
||||||
"jobData", // Job data to show.
|
"jobData", // Job data to show.
|
||||||
|
@ -47,11 +47,6 @@ import * as datetime from "@/datetime";
|
|||||||
import * as API from '@/manager-api';
|
import * as API from '@/manager-api';
|
||||||
import { apiClient } from '@/stores/api-query-count';
|
import { apiClient } from '@/stores/api-query-count';
|
||||||
|
|
||||||
function objectEmpty(o) {
|
|
||||||
if (!o) return true;
|
|
||||||
return Object.entries(o).length == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: [
|
props: [
|
||||||
"taskData", // Task data to show.
|
"taskData", // Task data to show.
|
||||||
|
@ -11,6 +11,8 @@ window.DateTime = DateTime;
|
|||||||
|
|
||||||
// plain removes any Vue reactivity.
|
// plain removes any Vue reactivity.
|
||||||
window.plain = (x) => JSON.parse(JSON.stringify(x));
|
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 app = createApp(App)
|
||||||
const pinia = createPinia()
|
const pinia = createPinia()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user