@@ -179,7 +179,7 @@ const templateColumns = [
sortable: true
},{
key: 'state',
- label: "Status.",
+ label: "Status",
sortable: true
},
{
@@ -199,14 +199,14 @@ const templateColumns = [
},
{
key: "paid",
- label: "Bezahlt:",
+ label: "Bezahlt",
sortable: true
},
{
key: "dueDate",
- label: "Fällig:",
+ label: "Fällig",
sortable: true
- },
+ }
]
const selectedColumns = ref(templateColumns)
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))
diff --git a/pages/products/[mode]/[[id]].vue b/pages/products/[mode]/[[id]].vue
index f3ae0f3..abc5357 100644
--- a/pages/products/[mode]/[[id]].vue
+++ b/pages/products/[mode]/[[id]].vue
@@ -304,6 +304,19 @@ setupPage()
v-model="itemInfo.barcode"
/>
-->
+
+
+
+ EUR
+
+
+
diff --git a/pages/profiles/show/[id].vue b/pages/profiles/show/[id].vue
index 644b7de..8068056 100644
--- a/pages/profiles/show/[id].vue
+++ b/pages/profiles/show/[id].vue
@@ -1,4 +1,5 @@
+
+
+
+
+
+
+
+
+
+
+ {{dataStore.ownTenant.ownFields}}
+
+
+
\ No newline at end of file
diff --git a/pages/workingtimes/evaluate/[id].vue b/pages/workingtimes/evaluate/[id].vue
index 13bbdab..65b9a0e 100644
--- a/pages/workingtimes/evaluate/[id].vue
+++ b/pages/workingtimes/evaluate/[id].vue
@@ -17,12 +17,19 @@ dayjs.extend(isSameOrBefore)
const dataStore = useDataStore()
const supabase = useSupabaseClient()
const route = useRoute()
+const router = useRouter()
const itemInfo = ref({})
const oldItemInfo = ref({})
-const setupPage = () => {
+
+const workingtimes = ref([])
+
+
+const setupPage = async () => {
if(route.params.id) itemInfo.value = dataStore.getProfileById(route.params.id)
if(itemInfo.value.id) oldItemInfo.value = JSON.parse(JSON.stringify(itemInfo.value))
+ workingtimes.value = (await supabase.from("workingtimes").select().eq("profile",itemInfo.value.id).order("startDate",{ascending:false})).data
+
}
const selectedPresetRange = ref("Dieser Monat")
@@ -58,11 +65,12 @@ const changeRange = () => {
selectedStartDay.value = dayjs().subtract(subtract,selector === "isoWeek" ? "week" : selector).startOf(selector).format("YYYY-MM-DD")
selectedEndDay.value = dayjs().subtract(subtract,selector === "isoWeek" ? "week" : selector).endOf(selector).format("YYYY-MM-DD")
+ openTab.value = 0
}
const workingTimeInfo = computed(() => {
- let times = dataStore.getWorkingTimesByProfileId(route.params.id)
+ let times = workingtimes.value
//times = times.filter(i => dayjs(i.date).isBetween(dayjs(selectedStartDay.value).subtract(1,"days"),selectedEndDay.value,'day') && i.end)
times = times.filter(i => dayjs(i.startDate).isSameOrAfter(selectedStartDay.value) && dayjs(i.endDate).isSameOrBefore(selectedEndDay.value))
@@ -133,6 +141,12 @@ const generateEvaluation = async () => {
await generateDocument()
}
+const openTab = ref(0)
+const onTabChange = async (index) => {
+ if(index === 1) {
+ await generateEvaluation()
+ }
+}
setupPage()
@@ -208,7 +222,7 @@ changeRange()
/>
-
+
@@ -220,42 +234,46 @@ changeRange()
/>
-
+
-
-
- Bericht erstellen
-
-
-
+
+
+ Zusammenfassung
+
Eingreicht: {{Math.floor(workingTimeInfo.sumWorkingMinutesEingereicht/60)}}:{{String(workingTimeInfo.sumWorkingMinutesEingereicht % 60).padStart(2,"0")}} h
Bestätigt: {{Math.floor(workingTimeInfo.sumWorkingMinutesApproved/60)}}:{{String(workingTimeInfo.sumWorkingMinutesApproved % 60).padStart(2,"0")}} h
Soll Stunden: {{workingTimeInfo.monthlyWorkingHours}} h
- Abwesend:
- Ausgleich:
+
Inoffizielles Saldo: {{workingTimeInfo.saldoInOfficial}} h
Saldo: {{workingTimeInfo.saldo}} h
-
+
-
-
+ router.push(`/workingtimes/edit/${row.id}`)"
+ :columns="[
{
key: 'state',
label: 'Status'
+ }, {
+ key: 'approved',
+ label: 'Genehmigt'
}, {
key: 'start',
label: 'Start'
@@ -270,26 +288,34 @@ changeRange()
label: 'Notizen'
}
]"
- >
-
- {{dataStore.profiles.find(profile => profile.id === row.profile) ? dataStore.profiles.find(profile => profile.id === row.profile).fullName : row.profile }}
-
+ >
+
+ {{dataStore.profiles.find(profile => profile.id === row.profile) ? dataStore.profiles.find(profile => profile.id === row.profile).fullName : row.profile }}
+
+
+ Ja
+ Nein
+
+
+
+ {{dayjs(row.startDate).format("HH:mm DD.MM.YY")}} Uhr
+
+
+ {{dayjs(row.endDate).format("HH:mm DD.MM.YY")}} Uhr
+
+
+ {{getDuration(row).composed}}
+
+
+
+
-
- {{dayjs(row.startDate).format("HH:mm DD.MM.YY")}} Uhr
-
-
- {{dayjs(row.endDate).format("HH:mm DD.MM.YY")}} Uhr
-
-
- {{getDuration(row).composed}}
-
-
+
diff --git a/pages/workingtimes/index.vue b/pages/workingtimes/index.vue
index 4130f3d..5ecf5d4 100644
--- a/pages/workingtimes/index.vue
+++ b/pages/workingtimes/index.vue
@@ -24,10 +24,22 @@ const timeInfo = ref({
const filterUser = ref(dataStore.activeProfile.id || "")
+const workingtimes = ref([])
+
+const setupPage = async () => {
+ workingtimes.value = (await supabase.from("workingtimes").select().eq("profile",filterUser.value).order("startDate",{ascending: false})).data
+}
+
+setupPage()
+
+
+
+
+
const filteredRows = computed(() => {
- let times = dataStore.workingtimes
+ let times = workingtimes.value
times = times.filter(i => i.profile === filterUser.value)
@@ -61,6 +73,11 @@ const columns = [
label: "Status",
sortable:true
},
+ {
+ key: "approved",
+ label: "Genehmigt",
+ sortable:true
+ },
{
key: "profile",
label: "Mitarbeiter",
@@ -181,6 +198,7 @@ const getDuration = (time) => {
option-attribute="fullName"
value-attribute="id"
v-model="filterUser"
+ @change="setupPage"
>
{{dataStore.getProfileById(filterUser) ? dataStore.getProfileById(filterUser).fullName : "Kein Benutzer ausgewählt"}}
@@ -222,41 +240,29 @@ const getDuration = (time) => {
-
-
-
{
- router.push(`/workingtimes/edit/${row.id}`)
- /*configTimeMode = '[mode]';
- itemInfo = row;
- showConfigTimeModal = true*/}"
+ router.push(`/workingtimes/edit/${row.id}`)}"
>
-
+
+
+
{{dataStore.profiles.find(profile => profile.id === row.profile) ? dataStore.profiles.find(profile => profile.id === row.profile).fullName : row.profile }}
+
+ Ja
+ Nein
+
{{dayjs(row.startDate).format("DD.MM.YYYY")}}
-
{{dayjs(row.startDate).format("HH:mm")}} Uhr
diff --git a/stores/data.js b/stores/data.js
index ae64bf6..56a64f7 100644
--- a/stores/data.js
+++ b/stores/data.js
@@ -123,7 +123,9 @@ export const useDataStore = defineStore('data', () => {
},
workingtimes: {
label: "Anwesenheiten",
- labelSingle: "Anwesenheit"
+ labelSingle: "Anwesenheit",
+ redirect: true,
+ redirectToList: true
},
texttemplates: {
label: "Textvorlagen",
@@ -887,7 +889,7 @@ export const useDataStore = defineStore('data', () => {
//await eval(dataType + '.value[' + dataType + '.value.findIndex(i => i.id === ' + JSON.stringify(data.id) + ')] = ' + JSON.stringify(supabaseData[0]))
if(dataType === 'profiles') await fetchProfiles()
toast.add({title: `${dataTypes[dataType].labelSingle} gespeichert`})
- if(dataTypes[dataType].redirect) await router.push(`/${dataType}/show/${data.id}`)
+ if(dataTypes[dataType].redirect) await router.push(dataTypes[dataType].redirectToList ? `/${dataType}` : `/${dataType}/show/${data.id}`)
return supabaseData
}
}
@@ -1244,7 +1246,7 @@ export const useDataStore = defineStore('data', () => {
})
const getTextTemplatesByDocumentType = computed(() => (documentType) => {
- console.log(documentType)
+ //console.log(documentType)
let type = ""
if(documentType === "serialInvoices") {
@@ -1253,7 +1255,7 @@ export const useDataStore = defineStore('data', () => {
type = documentType
}
- console.log(type)
+ //console.log(type)
return texttemplates.value.filter(i => i.documentType === type)
})