{{columnName}}
diff --git a/components/EntityList.vue b/components/EntityList.vue
index aa672f5..7eb08d2 100644
--- a/components/EntityList.vue
+++ b/components/EntityList.vue
@@ -108,7 +108,7 @@ const filteredRows = computed(() => {
:label="`+ ${dataType.labelSingle}`"
variant="outline"
v-if="platform === 'mobile'"
- @click="router.push(`/mobile/standardEntity/${type}/create`)"
+ @click="router.push(`/standardEntity/${type}/create`)"
/>
diff --git a/components/HistoryDisplay.vue b/components/HistoryDisplay.vue
index 9128288..cf60788 100644
--- a/components/HistoryDisplay.vue
+++ b/components/HistoryDisplay.vue
@@ -21,9 +21,12 @@ const showAddHistoryItemModal = ref(false)
const colorMode = useColorMode()
const items = ref([])
+const platform = ref("default")
const setup = async () => {
+ if(await useCapacitor().getIsPhone()) platform.value = "mobile"
+
if(props.type && props.elementId){
items.value = (await supabase.from("historyitems").select().eq(props.type,props.elementId).order("created_at",{ascending: true})).data || []
} else {
@@ -102,10 +105,16 @@ const renderText = (text) => {
-
+
- Eintrag hinzufügen
+
+
+ Eintrag hinzufügen
+
+
+
let rowHeight = 115
- input.times.forEach(time => {
- pages[pageCounter - 1].drawText(`${dayjs(time.startDate).format("HH:mm DD.MM.YY")}`,{
- x: getCoordinatesForPDFLib(20,rowHeight,pages[pageCounter -1]).x,
- y: getCoordinatesForPDFLib(20,rowHeight,pages[pageCounter -1]).y,
- size: 10,
+
+ let splitted = []
+
+ let reversedInput = input.times.slice().reverse()
+
+ const splittedLength = Math.floor((reversedInput.length - 25) / 40)
+
+ splitted.push(reversedInput.slice(0,25))
+
+ let lastIndex = 25
+ for (let i = 0; i < splittedLength; ++i ) {
+ splitted.push(reversedInput.slice(lastIndex, lastIndex + (i + 1) * 40))
+ lastIndex = lastIndex + (i + 1) * 40 + 1
+ }
+
+ splitted.push(reversedInput.slice(lastIndex, reversedInput.length))
+
+
+ splitted.forEach((chunk,index) => {
+ if(index > 0) {
+ const page = pdfDoc.addPage()
+
+ page.drawPage(secondPageBackground, {
+ x: 0,
+ y: 0,
+ })
+
+ pages.push(page)
+ pageCounter++
+ rowHeight = 20
+
+ }
+
+ chunk.forEach(time => {
+ pages[pageCounter - 1].drawText(`${dayjs(time.startDate).format("HH:mm DD.MM.YY")}`,{
+ x: getCoordinatesForPDFLib(20,rowHeight,pages[pageCounter -1]).x,
+ y: getCoordinatesForPDFLib(20,rowHeight,pages[pageCounter -1]).y,
+ size: 10,
+ })
+
+ pages[pageCounter - 1].drawText(`${dayjs(time.endDate).format("HH:mm DD.MM.YY")}`,{
+ x: getCoordinatesForPDFLib(60,rowHeight,pages[pageCounter -1]).x,
+ y: getCoordinatesForPDFLib(60,rowHeight,pages[pageCounter -1]).y,
+ size: 10,
+ })
+
+ pages[pageCounter - 1].drawText(`${getDuration(time).composed}`,{
+ x: getCoordinatesForPDFLib(100,rowHeight,pages[pageCounter -1]).x,
+ y: getCoordinatesForPDFLib(100,rowHeight,pages[pageCounter -1]).y,
+ size: 10,
+ })
+
+ rowHeight += 6
+
})
-
- pages[pageCounter - 1].drawText(`${dayjs(time.endDate).format("HH:mm DD.MM.YY")}`,{
- x: getCoordinatesForPDFLib(60,rowHeight,pages[pageCounter -1]).x,
- y: getCoordinatesForPDFLib(60,rowHeight,pages[pageCounter -1]).y,
- size: 10,
- })
-
- pages[pageCounter - 1].drawText(`${getDuration(time).composed}`,{
- x: getCoordinatesForPDFLib(100,rowHeight,pages[pageCounter -1]).x,
- y: getCoordinatesForPDFLib(100,rowHeight,pages[pageCounter -1]).y,
- size: 10,
- })
-
- rowHeight += 6
-
})
+
+
+
uri.value = await pdfDoc.saveAsBase64({dataUri: true})
}
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 66b1950..9f690eb 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -25,7 +25,7 @@ export default defineNuxtConfig({
transpile: ['@vuepic/vue-datepicker']
},
- modules: ['@pinia/nuxt', '@nuxt/ui', '@nuxt/content', '@nuxtjs/supabase', "nuxt-editorjs", '@nuxtjs/fontaine', '@vite-pwa/nuxt', 'nuxt-viewport', 'nuxt-tiptap-editor', '@nuxtjs/leaflet'],
+ modules: ['@pinia/nuxt', '@nuxt/ui', '@nuxt/content', '@nuxtjs/supabase', "nuxt-editorjs", '@nuxtjs/fontaine', 'nuxt-viewport', 'nuxt-tiptap-editor', '@nuxtjs/leaflet'],
routeRules: {
'/printing': {ssr: false}
diff --git a/package.json b/package.json
index 039404d..15c0d5d 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,6 @@
"devDependencies": {
"@nuxtjs/leaflet": "^1.2.3",
"@nuxtjs/supabase": "^1.1.4",
- "@vite-pwa/nuxt": "^0.3.3",
"nuxt": "^3.14.1592",
"nuxt-tiptap-editor": "^1.2.0",
"vite-plugin-pwa": "^0.17.3",
diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue
index 15ab604..79c8035 100644
--- a/pages/createDocument/edit/[[id]].vue
+++ b/pages/createDocument/edit/[[id]].vue
@@ -716,10 +716,10 @@ const documentReport = computed(() => {
let totalHoursSellingPrice = 0
- itemInfo.value.rows.forEach(row => {
+ itemInfo.value.rows.filter(i => !i.optional && !i.alternative).forEach(row => {
if(row.product) {
let product = products.value.find(i => i.id === row.product)
- console.log(product)
+ console.log(product.purchasePrice)
totalProductsPurchasePrice += product.purchasePrice * row.quantity
diff --git a/pages/mobile/menu.vue b/pages/mobile/menu.vue
index 95a729a..aa27041 100644
--- a/pages/mobile/menu.vue
+++ b/pages/mobile/menu.vue
@@ -10,7 +10,9 @@ definePageMeta({
+ class="w-full my-1"
+ to="/standardEntity/absencerequests"
+ >
Abwesenheiten
+ class="w-full my-1"
+ to="/standardEntity/customers"
+ >
Kunden
+ class="w-full my-1"
+ to="/standardEntity/vendors"
+ >
Lieferanten
+ class="w-full my-1"
+ to="/standardEntity/plants"
+ >
Objekte
diff --git a/pages/profiles/show/[id].vue b/pages/profiles/show/[id].vue
index 66f5b45..364d0a1 100644
--- a/pages/profiles/show/[id].vue
+++ b/pages/profiles/show/[id].vue
@@ -7,6 +7,7 @@ import isoWeek from "dayjs/plugin/isoWeek"
import isBetween from "dayjs/plugin/isBetween"
import DocumentList from "~/components/DocumentList.vue";
import DocumentUpload from "~/components/DocumentUpload.vue";
+import { v4 as uuidv4 } from 'uuid';
dayjs.extend(customParseFormat)
dayjs.extend(isoWeek)
dayjs.extend(isBetween)
@@ -131,6 +132,10 @@ const saveProfile = async () => {
await dataStore.updateItem('profiles',data,oldItemInfo.value)
}
+const addAutomaticHourCorrection = async () => {
+ itemInfo.value.automaticHourCorrections.push({mode: 'correct', id: uuidv4(), weekday: 1, bookingTimeUTC: {hour: 0, minute: 0}, rangeStartUTC: {hour: 0, minute: 0}, rangeEndUTC: {hour: 0, minute: 0}})
+}
+
@@ -161,9 +166,9 @@ const saveProfile = async () => {
label: 'Informationen'
},{
label: 'Logbuch'
- },/*{
+ },{
label: 'Zeiterfassung'
- },*/{
+ },{
label: 'Vertragsdaten'
},{
label: 'Dokumente'
@@ -326,9 +331,9 @@ const saveProfile = async () => {
:preloadedContent="emailSignature"
/>
- Newsletter
+