Merge branch 'dev' into beta
This commit is contained in:
@@ -252,7 +252,7 @@ watch(item.value, async (newItem, oldItem) => {
|
|||||||
</template>
|
</template>
|
||||||
</UInput>
|
</UInput>
|
||||||
<UToggle
|
<UToggle
|
||||||
:color="datapoint.required ? (item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]] ? 'primary' : 'rose') : 'white'"
|
:color="datapoint.required ? (item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]] ? 'primary' : 'rose') : 'primary'"
|
||||||
@change="datapoint.inputChangeFunction ? datapoint.inputChangeFunction(item,loadedOptions) : null"
|
@change="datapoint.inputChangeFunction ? datapoint.inputChangeFunction(item,loadedOptions) : null"
|
||||||
v-else-if="datapoint.inputType === 'bool'"
|
v-else-if="datapoint.inputType === 'bool'"
|
||||||
v-model="item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
v-model="item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||||
@@ -353,7 +353,7 @@ watch(item.value, async (newItem, oldItem) => {
|
|||||||
</template>
|
</template>
|
||||||
</UInput>
|
</UInput>
|
||||||
<UToggle
|
<UToggle
|
||||||
:color="datapoint.required ? (item[datapoint.key] ? 'primary' : 'rose') : 'white'"
|
:color="datapoint.required ? (item[datapoint.key] ? 'primary' : 'rose') : 'primary'"
|
||||||
@change="datapoint.inputChangeFunction ? datapoint.inputChangeFunction(item,loadedOptions) : null"
|
@change="datapoint.inputChangeFunction ? datapoint.inputChangeFunction(item,loadedOptions) : null"
|
||||||
v-else-if="datapoint.inputType === 'bool'"
|
v-else-if="datapoint.inputType === 'bool'"
|
||||||
v-model="item[datapoint.key]"
|
v-model="item[datapoint.key]"
|
||||||
@@ -498,7 +498,7 @@ watch(item.value, async (newItem, oldItem) => {
|
|||||||
</template>
|
</template>
|
||||||
</UInput>
|
</UInput>
|
||||||
<UToggle
|
<UToggle
|
||||||
:color="datapoint.required ? (item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]] ? 'primary' : 'rose') : 'white'"
|
:color="datapoint.required ? (item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]] ? 'primary' : 'rose') : 'primary'"
|
||||||
@change="datapoint.inputChangeFunction ? datapoint.inputChangeFunction(item,loadedOptions) : null"
|
@change="datapoint.inputChangeFunction ? datapoint.inputChangeFunction(item,loadedOptions) : null"
|
||||||
v-else-if="datapoint.inputType === 'bool'"
|
v-else-if="datapoint.inputType === 'bool'"
|
||||||
v-model="item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
v-model="item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||||
@@ -599,7 +599,7 @@ watch(item.value, async (newItem, oldItem) => {
|
|||||||
</template>
|
</template>
|
||||||
</UInput>
|
</UInput>
|
||||||
<UToggle
|
<UToggle
|
||||||
:color="datapoint.required ? (item[datapoint.key] ? 'primary' : 'rose') : 'white'"
|
:color="datapoint.required ? (item[datapoint.key] ? 'primary' : 'rose') : 'primary'"
|
||||||
@change="datapoint.inputChangeFunction ? datapoint.inputChangeFunction(item,loadedOptions) : null"
|
@change="datapoint.inputChangeFunction ? datapoint.inputChangeFunction(item,loadedOptions) : null"
|
||||||
v-else-if="datapoint.inputType === 'bool'"
|
v-else-if="datapoint.inputType === 'bool'"
|
||||||
v-model="item[datapoint.key]"
|
v-model="item[datapoint.key]"
|
||||||
|
|||||||
15
components/columnRenderings/endDateTime.vue
Normal file
15
components/columnRenderings/endDateTime.vue
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<script setup>
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
row: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<span v-if="props.row.endDate">{{dayjs(props.row.endDate).format("DD.MM.YYYY HH:mm")}}</span>
|
||||||
|
</template>
|
||||||
15
components/columnRenderings/startDateTime.vue
Normal file
15
components/columnRenderings/startDateTime.vue
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<script setup>
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
row: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<span v-if="props.row.startDate">{{dayjs(props.row.startDate).format("DD.MM.YYYY HH:mm")}}</span>
|
||||||
|
</template>
|
||||||
9
package-lock.json
generated
9
package-lock.json
generated
@@ -40,7 +40,7 @@
|
|||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"fast-sort": "^3.4.1",
|
"fast-sort": "^3.4.1",
|
||||||
"handlebars": "^4.7.8",
|
"handlebars": "^4.7.8",
|
||||||
"jsprintmanager": "^6.0.3",
|
"jsprintmanager": "^7.0.2",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"maplibre-gl": "^4.7.0",
|
"maplibre-gl": "^4.7.0",
|
||||||
"nuxt-editorjs": "^1.0.4",
|
"nuxt-editorjs": "^1.0.4",
|
||||||
@@ -10049,9 +10049,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jsprintmanager": {
|
"node_modules/jsprintmanager": {
|
||||||
"version": "6.0.3",
|
"version": "7.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/jsprintmanager/-/jsprintmanager-6.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/jsprintmanager/-/jsprintmanager-7.0.2.tgz",
|
||||||
"integrity": "sha512-5JQIUtdjad8w5SiG1cws635XW8qgSJEK6E0bTe8ksEf/Z+p8V9O1Ou6IHkU2lMD1Wv0uhOr8/aGNqIH0aSgQ4Q=="
|
"integrity": "sha512-mripy7zRw0njMoP6aft1qYwiDIUNEoSyNovge2CDxujvZYVs5p29aL9oyQVM0x0hKpVUmuGb8wLLitU+e/+HiA==",
|
||||||
|
"license": "SEE LICENSE IN <https://www.neodynamic.com/eula>"
|
||||||
},
|
},
|
||||||
"node_modules/kdbush": {
|
"node_modules/kdbush": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
|
|||||||
@@ -54,7 +54,6 @@
|
|||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"fast-sort": "^3.4.1",
|
"fast-sort": "^3.4.1",
|
||||||
"handlebars": "^4.7.8",
|
"handlebars": "^4.7.8",
|
||||||
"jsprintmanager": "^6.0.3",
|
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"maplibre-gl": "^4.7.0",
|
"maplibre-gl": "^4.7.0",
|
||||||
"nuxt-editorjs": "^1.0.4",
|
"nuxt-editorjs": "^1.0.4",
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import timeGridPlugin from "@fullcalendar/timegrid"
|
|||||||
import resourceTimelinePlugin from "@fullcalendar/resource-timeline";
|
import resourceTimelinePlugin from "@fullcalendar/resource-timeline";
|
||||||
import interactionPlugin from "@fullcalendar/interaction";
|
import interactionPlugin from "@fullcalendar/interaction";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import profiles from "~/components/columnRenderings/profiles.vue";
|
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
middleware: "auth"
|
middleware: "auth"
|
||||||
@@ -18,8 +17,6 @@ const router = useRouter()
|
|||||||
const mode = ref(route.params.mode || "grid")
|
const mode = ref(route.params.mode || "grid")
|
||||||
const supabase = useSupabaseClient()
|
const supabase = useSupabaseClient()
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
//const resources = dataStore.getResources
|
|
||||||
//const eventTypes = dataStore.getEventTypes
|
|
||||||
|
|
||||||
const profileStore = useProfileStore()
|
const profileStore = useProfileStore()
|
||||||
|
|
||||||
@@ -129,46 +126,12 @@ const calendarOptionsTimeline = ref({
|
|||||||
|
|
||||||
const loaded = ref(false)
|
const loaded = ref(false)
|
||||||
const setupPage = async () => {
|
const setupPage = async () => {
|
||||||
let tempData = await useSupabaseSelect("events", "*, vehicles(*), inventoryitems(*)")
|
let tempData = (await useSupabaseSelect("events", "*, vehicles(*), inventoryitems(*)")).filter(i => !i.archived)
|
||||||
let absencerequests = await useSupabaseSelect("absencerequests", "*, profile(*)")
|
let absencerequests = (await useSupabaseSelect("absencerequests", "*, profile(*)")).filter(i => !i.archived)
|
||||||
let projects = await useSupabaseSelect("projects", "*")
|
let projects = (await useSupabaseSelect("projects", "*")).filter(i => !i.archived)
|
||||||
let inventoryitems = await useSupabaseSelect("inventoryitems", "*")
|
let inventoryitems = (await useSupabaseSelect("inventoryitems", "*")).filter(i => !i.archived)
|
||||||
let profiles = await useSupabaseSelect("profiles", "*")
|
let profiles = (await useSupabaseSelect("profiles", "*")).filter(i => !i.archived)
|
||||||
let vehicles = await useSupabaseSelect("vehicles", "*")
|
let vehicles = (await useSupabaseSelect("vehicles", "*")).filter(i => !i.archived)
|
||||||
|
|
||||||
/*events.value = [
|
|
||||||
...tempData.map(event => {
|
|
||||||
let eventColor = profileStore.ownTenant.calendarConfig.eventTypes.find(type => type.label === event.eventtype).color
|
|
||||||
|
|
||||||
let title = ""
|
|
||||||
if (event.name) {
|
|
||||||
title = event.name
|
|
||||||
} else if (event.project) {
|
|
||||||
projects.find(i => i.id === event.project) ? projects.find(i => i.id === event.project).name : ""
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
...event,
|
|
||||||
start: event.startDate,
|
|
||||||
end: event.endDate,
|
|
||||||
title: title,
|
|
||||||
borderColor: eventColor,
|
|
||||||
textColor: eventColor,
|
|
||||||
backgroundColor: "black"
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
...absencerequests.map(absence => {
|
|
||||||
return {
|
|
||||||
id: absence.id,
|
|
||||||
resourceId: absence.user,
|
|
||||||
resourceType: "person",
|
|
||||||
title: `Abw.: ${absence.reason}`,
|
|
||||||
start: dayjs(absence.start).toDate(),
|
|
||||||
end: dayjs(absence.end).add(1, 'day').toDate(),
|
|
||||||
allDay: true,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
]*/
|
|
||||||
|
|
||||||
calendarOptionsGrid.value.initialEvents = [
|
calendarOptionsGrid.value.initialEvents = [
|
||||||
...tempData.map(event => {
|
...tempData.map(event => {
|
||||||
@@ -178,7 +141,7 @@ const setupPage = async () => {
|
|||||||
if (event.name) {
|
if (event.name) {
|
||||||
title = event.name
|
title = event.name
|
||||||
} else if (event.project) {
|
} else if (event.project) {
|
||||||
projects.find(i => i.id === event.project) ? projects.find(i => i.id === event.project).name : ""
|
title = projects.find(i => i.id === event.project) ? projects.find(i => i.id === event.project).name : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -231,7 +194,6 @@ const setupPage = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
console.log(calendarOptionsTimeline.value.resources)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
calendarOptionsTimeline.value.initialEvents = [
|
calendarOptionsTimeline.value.initialEvents = [
|
||||||
@@ -266,7 +228,6 @@ const setupPage = async () => {
|
|||||||
let tempEvents = []
|
let tempEvents = []
|
||||||
|
|
||||||
tempData.forEach(event => {
|
tempData.forEach(event => {
|
||||||
console.log(event)
|
|
||||||
let eventColor = profileStore.ownTenant.calendarConfig.eventTypes.find(type => type.label === event.eventtype).color
|
let eventColor = profileStore.ownTenant.calendarConfig.eventTypes.find(type => type.label === event.eventtype).color
|
||||||
|
|
||||||
let title = ""
|
let title = ""
|
||||||
@@ -290,21 +251,18 @@ const setupPage = async () => {
|
|||||||
|
|
||||||
|
|
||||||
if(event.profiles.length > 0) {
|
if(event.profiles.length > 0) {
|
||||||
console.log("Profiles found")
|
|
||||||
event.profiles.forEach(profile => {
|
event.profiles.forEach(profile => {
|
||||||
returnData.resourceIds.push(profile)
|
returnData.resourceIds.push(profile)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(event.vehicles.length > 0) {
|
if(event.vehicles.length > 0) {
|
||||||
console.log("Vehicles found")
|
|
||||||
event.vehicles.forEach(vehicle => {
|
event.vehicles.forEach(vehicle => {
|
||||||
returnData.resourceIds.push(`F-${vehicle.id}`)
|
returnData.resourceIds.push(`F-${vehicle.id}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(event.inventoryitems.length > 0) {
|
if(event.inventoryitems.length > 0) {
|
||||||
console.log("Inventoryitems found")
|
|
||||||
event.inventoryitems.forEach(inventoryitem => {
|
event.inventoryitems.forEach(inventoryitem => {
|
||||||
returnData.resourceIds.push(`I-${inventoryitem.id}`)
|
returnData.resourceIds.push(`I-${inventoryitem.id}`)
|
||||||
})
|
})
|
||||||
@@ -330,7 +288,6 @@ const setupPage = async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
calendarOptionsTimeline.value.initialEvents = tempEvents
|
calendarOptionsTimeline.value.initialEvents = tempEvents
|
||||||
console.log(calendarOptionsTimeline.value)
|
|
||||||
|
|
||||||
loaded.value = true
|
loaded.value = true
|
||||||
|
|
||||||
|
|||||||
@@ -744,14 +744,22 @@ const getDocumentData = () => {
|
|||||||
type: itemInfo.value.type,
|
type: itemInfo.value.type,
|
||||||
taxType: itemInfo.value.taxType,
|
taxType: itemInfo.value.taxType,
|
||||||
adressLine: `${businessInfo.name}, ${businessInfo.street}, ${businessInfo.zip} ${businessInfo.city}`,
|
adressLine: `${businessInfo.name}, ${businessInfo.street}, ${businessInfo.zip} ${businessInfo.city}`,
|
||||||
recipient: {
|
/*recipient: {
|
||||||
name: customerData.name,
|
name: customerData.name,
|
||||||
contact: contactData ? `${contactData.firstName} ${contactData.lastName}` : "",
|
contact: contactData ? `${contactData.firstName} ${contactData.lastName}` : "",
|
||||||
street: itemInfo.value.address.street || customerData.infoData.street,
|
street: itemInfo.value.address.street || customerData.infoData.street,
|
||||||
special: itemInfo.value.address.special || customerData.infoData.special,
|
special: itemInfo.value.address.special || customerData.infoData.special,
|
||||||
city: itemInfo.value.address.city || customerData.infoData.city,
|
city: itemInfo.value.address.city || customerData.infoData.city,
|
||||||
zip: itemInfo.value.address.zip || customerData.infoData.zip
|
zip: itemInfo.value.address.zip || customerData.infoData.zip
|
||||||
},
|
},*/
|
||||||
|
recipient: [
|
||||||
|
customerData.name,
|
||||||
|
... contactData ? [`${contactData.firstName} ${contactData.lastName}`] : [],
|
||||||
|
itemInfo.value.address.street,
|
||||||
|
... itemInfo.value.address.special ? [itemInfo.value.address.special] : [],
|
||||||
|
`${itemInfo.value.address.zip} ${itemInfo.value.address.city}`,
|
||||||
|
|
||||||
|
],
|
||||||
/*info: {
|
/*info: {
|
||||||
customerNumber: customerData.customerNumber,
|
customerNumber: customerData.customerNumber,
|
||||||
documentNumber: itemInfo.value.documentNumber,
|
documentNumber: itemInfo.value.documentNumber,
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ import sellingPriceComposedWorker from "~/components/columnRenderings/sellingPri
|
|||||||
import sellingPriceComposedTotal from "~/components/columnRenderings/sellingPriceComposedTotal.vue"
|
import sellingPriceComposedTotal from "~/components/columnRenderings/sellingPriceComposedTotal.vue"
|
||||||
import startDate from "~/components/columnRenderings/startDate.vue"
|
import startDate from "~/components/columnRenderings/startDate.vue"
|
||||||
import endDate from "~/components/columnRenderings/endDate.vue"
|
import endDate from "~/components/columnRenderings/endDate.vue"
|
||||||
|
import startDateTime from "~/components/columnRenderings/startDateTime.vue"
|
||||||
|
import endDateTime from "~/components/columnRenderings/endDateTime.vue"
|
||||||
import serviceCategories from "~/components/columnRenderings/serviceCategories.vue"
|
import serviceCategories from "~/components/columnRenderings/serviceCategories.vue"
|
||||||
import phase from "~/components/columnRenderings/phase.vue"
|
import phase from "~/components/columnRenderings/phase.vue"
|
||||||
|
|
||||||
@@ -592,6 +594,7 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
key: "reason",
|
key: "reason",
|
||||||
label: "Grund",
|
label: "Grund",
|
||||||
inputType: "select",
|
inputType: "select",
|
||||||
|
required: true,
|
||||||
selectValueAttribute: "label",
|
selectValueAttribute: "label",
|
||||||
selectManualOptions: [
|
selectManualOptions: [
|
||||||
{label:"Urlaub"},
|
{label:"Urlaub"},
|
||||||
@@ -1550,12 +1553,14 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
label: "Start",
|
label: "Start",
|
||||||
required: true,
|
required: true,
|
||||||
inputType: "datetime",
|
inputType: "datetime",
|
||||||
|
component: startDateTime
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "endDate",
|
key: "endDate",
|
||||||
label: "Ende",
|
label: "Ende",
|
||||||
required: true,
|
required: true,
|
||||||
inputType: "datetime",
|
inputType: "datetime",
|
||||||
|
component: endDateTime
|
||||||
},/*{
|
},/*{
|
||||||
key: "eventtype",
|
key: "eventtype",
|
||||||
label: "Typ",
|
label: "Typ",
|
||||||
|
|||||||
Reference in New Issue
Block a user