From 1a0b7288dfa5bf3f29470f31720e0a6209037f50 Mon Sep 17 00:00:00 2001 From: flfeders Date: Thu, 15 Feb 2024 22:49:09 +0100 Subject: [PATCH] Added Phases to Projects --- spaces/Dockerfile | 2 +- spaces/app.vue | 20 +- spaces/components/DocumentDisplay.vue | 22 +- spaces/components/DocumentUpload.vue | 15 +- spaces/components/HistoryDisplay.vue | 88 ++-- spaces/components/Toolbar.vue | 14 + spaces/layouts/default.vue | 379 +++++++++++++----- spaces/package.json | 2 +- .../pages/absenceRequests/[mode]/[[id]].vue | 8 - spaces/pages/calendar/[mode].vue | 1 + spaces/pages/contacts/[mode]/[[id]].vue | 334 ++++++++------- spaces/pages/contacts/index.vue | 21 +- spaces/pages/contracts/[mode]/[[id]].vue | 253 ++++++------ spaces/pages/customers/[mode]/[[id]].vue | 236 ++++++----- spaces/pages/customers/index.vue | 20 +- spaces/pages/documents.vue | 11 +- spaces/pages/email.vue | 316 +++++++++++++++ spaces/pages/index.vue | 33 +- spaces/pages/inventoryitems/[mode]/[[id]].vue | 155 +++++++ spaces/pages/inventoryitems/index.vue | 75 ++++ spaces/pages/login.vue | 5 +- spaces/pages/planningBoard.vue | 3 +- spaces/pages/plants/[mode]/[[id]].vue | 310 +++++++------- spaces/pages/plants/index.vue | 19 +- spaces/pages/products/[mode]/[[id]].vue | 283 ++++++------- spaces/pages/products/index.vue | 33 +- spaces/pages/projects/[mode]/[[id]].vue | 310 +++++--------- spaces/pages/projects/index.vue | 46 ++- spaces/pages/receipts/index.vue | 10 +- spaces/pages/settings/index.vue | 51 +++ spaces/pages/spaces/[mode]/[[id]].vue | 191 +++++---- spaces/pages/spaces/index.vue | 22 +- spaces/pages/tasks/index.vue | 67 ++-- spaces/pages/vehicles/[mode]/[[id]].vue | 41 +- spaces/pages/vendors/[mode]/[[id]].vue | 299 +++++++------- spaces/pages/vendors/index.vue | 21 +- spaces/stores/data.js | 109 +++-- 37 files changed, 2342 insertions(+), 1483 deletions(-) create mode 100644 spaces/components/Toolbar.vue create mode 100644 spaces/pages/email.vue create mode 100644 spaces/pages/inventoryitems/[mode]/[[id]].vue create mode 100644 spaces/pages/inventoryitems/index.vue create mode 100644 spaces/pages/settings/index.vue diff --git a/spaces/Dockerfile b/spaces/Dockerfile index 21c098e..18ee495 100644 --- a/spaces/Dockerfile +++ b/spaces/Dockerfile @@ -12,4 +12,4 @@ ENV NUXT_PORT=3000 EXPOSE 3000 -ENTRYPOINT ["node", ".output/server/index.mjs"] +ENTRYPOINT ["node", ".output/server/index.js"] diff --git a/spaces/app.vue b/spaces/app.vue index 538eda6..584089a 100644 --- a/spaces/app.vue +++ b/spaces/app.vue @@ -12,7 +12,6 @@ const viewport = useViewport() console.log('Breakpoint updated:', oldBreakpoint, '->', newBreakpoint) })*/ -dataStore.initializeData() useHead({ meta: [ @@ -52,10 +51,7 @@ useSeoMeta({ width: auto; } -#contentContainer { - width: 95vw; - height: 85vh; -} + .documentList { display: flex; @@ -103,4 +99,18 @@ useSeoMeta({ a:hover { color: #69c350 } + + + +.table > div { + width: 78vw; + height: 90vh; + overflow: scroll !important; + -ms-overflow-style: none; /*!* IE and Edge *!*/ + scrollbar-width: none; /*!* Firefox *!*/ +} + +.table > div::-webkit-scrollbar { + display: none; +} \ No newline at end of file diff --git a/spaces/components/DocumentDisplay.vue b/spaces/components/DocumentDisplay.vue index 9cb36a1..a6e690f 100644 --- a/spaces/components/DocumentDisplay.vue +++ b/spaces/components/DocumentDisplay.vue @@ -99,7 +99,16 @@ const archiveDocument = () => { :data="documentData.url" class="previewEmbed" type="application/pdf" + v-if="!documentData.tags.includes('Bild')" /> + + + + { class="h-full w-full" :data="documentData.url" type="application/pdf" + v-if="!documentData.tags.includes('Bild')" + /> + @@ -159,7 +175,11 @@ const archiveDocument = () => { Eingangsrechnung erstellen - +
+ In neuen Tab anzeigen { let fileData = fileUploadFormData.value fileData[type] = elementId - await dataStore.uploadFiles(fileData, document.getElementById("fileUploadInput").files) + await dataStore.uploadFiles(fileData, document.getElementById("fileUploadInput").files,true) uploadModalOpen.value = false; uploadInProgress.value = false; @@ -40,7 +40,7 @@ const uploadFiles = async () => { \ No newline at end of file diff --git a/spaces/layouts/default.vue b/spaces/layouts/default.vue index ff074e3..9d854aa 100644 --- a/spaces/layouts/default.vue +++ b/spaces/layouts/default.vue @@ -6,13 +6,15 @@ const colorMode = useColorMode() const userProfile = dataStore.getOwnProfile const supabase = useSupabaseClient() const router = useRouter() +const route = useRoute() +dataStore.initializeData((await supabase.auth.getUser()).data.user.id) const isLight = computed({ - get () { + get() { return colorMode.value !== 'dark' }, - set () { + set() { colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark' } }) @@ -52,12 +54,12 @@ const navLinks = [ label: "Belege", to: "/receipts", icon: "i-heroicons-document-text" - },/* + }, { label: "Bank", to: "/banking", icon: "i-heroicons-currency-euro" - },*/ + }, ] }, { @@ -105,6 +107,11 @@ const navLinks = [ to: "/documents", icon: "i-heroicons-document" }, + { + label: "E-Mail", + to: "/email", + icon: "i-heroicons-envelope" + }, ] },/* { @@ -122,7 +129,7 @@ const navLinks = [ icon: "i-heroicons-clock" }, { - label: "Stechuhr", + label: "Anwesenheiten", to: "/workingtimes", icon: "i-heroicons-clock" }, @@ -156,6 +163,10 @@ const navLinks = [ label: "Fahrzeuge", to: "/vehicles", icon: "i-heroicons-truck" + }, { + label: "Inventar", + to: "/inventoryitems", + icon: "i-heroicons-puzzle-piece" }, ] }, @@ -173,6 +184,11 @@ const userMenuItems = ref([ icon: "i-heroicons-cog-8-tooth", to: "/settings/numberRanges" }, + { + label: "Einstellungen", + icon: "i-heroicons-cog-8-tooth", + to: "/settings" + }, { label: 'Benutzer', icon: 'i-heroicons-user-group', @@ -180,127 +196,255 @@ const userMenuItems = ref([ } ]) +const links = [[{ + label: 'Profil', + avatar: { + alt: userProfile ? userProfile.fullName : "XY" + } +},{ + label: "Dashboard", + to: "/", + icon: "i-heroicons-home" +}], [{ + label: "Aufgaben", + to: "/tasks", + icon: "i-heroicons-rectangle-stack" +}, + { + label: "Plantafel", + to: "/calendar/timeline", + icon: "i-heroicons-calendar-days" + }, + { + label: "Kalender", + to: "/calendar/grid", + icon: "i-heroicons-calendar-days" + }, + { + label: "Dokumente", + to: "/documents", + icon: "i-heroicons-document" + }, + { + label: "E-Mail", + to: "/email", + icon: "i-heroicons-envelope" + }],[{ + label: "Kunden", + to: "/customers", + icon: "i-heroicons-user-group" +}, + { + label: "Lieferanten", + to: "/vendors", + icon: "i-heroicons-truck" + }, + { + label: "Ansprechpartner", + to: "/contacts", + icon: "i-heroicons-user-group" + }], [{ + label: "Belege", + to: "/receipts", + icon: "i-heroicons-document-text" +}, + { + label: "Bank", + to: "/banking", + icon: "i-heroicons-currency-euro" + }], [{ + label: "Projekte", + to: "/projects", + icon: "i-heroicons-clipboard-document-check" +}, + { + label: "Verträge", + to: "/contracts", + icon: "i-heroicons-clipboard-document" + }, + { + label: "Objekte", + to: "/plants", + icon: "i-heroicons-clipboard-document" + }],[{ + label: "Zeiterfassung", + to: "/employees/timetracking", + icon: "i-heroicons-clock" +}, + { + label: "Anwesenheiten", + to: "/workingtimes", + icon: "i-heroicons-clock" + }, + { + label: "Abwesenheiten", + to: "/absenceRequests", + icon: "i-heroicons-document-text" + }],[{ + label: "Steuerung", + to: "/inventory", + icon: "i-heroicons-square-3-stack-3d" +}, + { + label: "Artikelstamm", + to: "/products", + icon: "i-heroicons-puzzle-piece" + }, + { + label: "Lagerplätze", + to: "/spaces", + icon: "i-heroicons-square-3-stack-3d" + }, + { + label: "Fahrzeuge", + to: "/vehicles", + icon: "i-heroicons-truck" + }, { + label: "Inventar", + to: "/inventoryitems", + icon: "i-heroicons-puzzle-piece" + },] +] + - -
- +
\ No newline at end of file diff --git a/spaces/package.json b/spaces/package.json index 4313d9f..f59c861 100644 --- a/spaces/package.json +++ b/spaces/package.json @@ -43,7 +43,7 @@ "@vicons/ionicons5": "^0.12.0", "@vuepic/vue-datepicker": "^7.4.0", "@zip.js/zip.js": "^2.7.32", - "axios": "^1.6.2", + "axios": "^1.6.7", "base64-arraybuffer": "^1.0.2", "buffer": "^6.0.3", "client-oauth2": "^4.3.3", diff --git a/spaces/pages/absenceRequests/[mode]/[[id]].vue b/spaces/pages/absenceRequests/[mode]/[[id]].vue index 443846b..aac8483 100644 --- a/spaces/pages/absenceRequests/[mode]/[[id]].vue +++ b/spaces/pages/absenceRequests/[mode]/[[id]].vue @@ -120,14 +120,6 @@ setupPage() > Bearbeiten - - Archivieren - - diff --git a/spaces/pages/calendar/[mode].vue b/spaces/pages/calendar/[mode].vue index aa7ab4f..22237f3 100644 --- a/spaces/pages/calendar/[mode].vue +++ b/spaces/pages/calendar/[mode].vue @@ -88,6 +88,7 @@ const calendarOptionsGrid = reactive({ nowIndicator: true, height: "80vh", selectable: true, + weekNumbers: true, select: function(info) { console.log(info) /*newEventData.value.resourceId = info.resource.id diff --git a/spaces/pages/contacts/[mode]/[[id]].vue b/spaces/pages/contacts/[mode]/[[id]].vue index ef91e9e..9f412f2 100644 --- a/spaces/pages/contacts/[mode]/[[id]].vue +++ b/spaces/pages/contacts/[mode]/[[id]].vue @@ -1,4 +1,6 @@ + + + + - - - + > + + + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - + - -
+ \ No newline at end of file diff --git a/spaces/pages/index.vue b/spaces/pages/index.vue index 1fc94ec..2ccfd7b 100644 --- a/spaces/pages/index.vue +++ b/spaces/pages/index.vue @@ -1,6 +1,24 @@ @@ -20,5 +38,16 @@ const user = useSupabaseUser() \ No newline at end of file diff --git a/spaces/pages/inventoryitems/[mode]/[[id]].vue b/spaces/pages/inventoryitems/[mode]/[[id]].vue new file mode 100644 index 0000000..c18c8b6 --- /dev/null +++ b/spaces/pages/inventoryitems/[mode]/[[id]].vue @@ -0,0 +1,155 @@ + + + + + \ No newline at end of file diff --git a/spaces/pages/inventoryitems/index.vue b/spaces/pages/inventoryitems/index.vue new file mode 100644 index 0000000..a708f00 --- /dev/null +++ b/spaces/pages/inventoryitems/index.vue @@ -0,0 +1,75 @@ + + + + + \ No newline at end of file diff --git a/spaces/pages/login.vue b/spaces/pages/login.vue index d632d08..289f1cb 100644 --- a/spaces/pages/login.vue +++ b/spaces/pages/login.vue @@ -38,16 +38,15 @@ const fields = [{ const onSubmit = async (data) => { - const { error } = await supabase.auth.signInWithPassword({ + const {error, data:{ user}} = await supabase.auth.signInWithPassword({ email: data.email, password: data.password }) if(error) { console.log(error.toString()) - alert(error.toString()) } else { console.log("Login Successful") - dataStore.changeTenant() + dataStore.initializeData(user.id) router.push("/") diff --git a/spaces/pages/planningBoard.vue b/spaces/pages/planningBoard.vue index fb5965c..49a1d27 100644 --- a/spaces/pages/planningBoard.vue +++ b/spaces/pages/planningBoard.vue @@ -71,6 +71,7 @@ const calendarOptionsTimeline = reactive({ }, initialEvents: events, selectable: true, + weekNumbers: true, select: function (info) { //console.log(info) newEventData.value.resourceId = info.resource.id @@ -97,7 +98,7 @@ const calendarOptionsTimeline = reactive({ slotDuration: {hours: 3}, slotMinTime: "06:00:00", slotMaxTime: "21:00:00", - /*duration: {days:7},*/ + duration: {days:7}, buttonText: "Woche", visibleRange: function(currentDate) { // Generate a new date for manipulating in the next step diff --git a/spaces/pages/plants/[mode]/[[id]].vue b/spaces/pages/plants/[mode]/[[id]].vue index 031f16b..e1cb694 100644 --- a/spaces/pages/plants/[mode]/[[id]].vue +++ b/spaces/pages/plants/[mode]/[[id]].vue @@ -2,6 +2,7 @@ import HistoryDisplay from "~/components/HistoryDisplay.vue"; import DocumentList from "~/components/DocumentList.vue"; import DocumentUpload from "~/components/DocumentUpload.vue"; +import Toolbar from "~/components/Toolbar.vue"; definePageMeta({ middleware: "auth" @@ -15,7 +16,7 @@ const toast = useToast() const id = ref(route.params.id ? route.params.id : null ) const editor = useEditor({ - content: "

I'm running Tiptap with Vue.js. 🎉

", + content: "

Hier kann deine Projektdokumentation stehen

", extensions: [TiptapStarterKit], }); @@ -28,6 +29,8 @@ const itemInfo = ref({}) const tabItems = [ { label: "Informationen" + },{ + label: "Logbuch" },{ label: "Projekte" },{ @@ -47,6 +50,11 @@ const setupPage = () => { if(mode.value === "edit") itemInfo.value = currentItem.value + if(mode.value === "create") { + let query = route.query + if(query.customer) itemInfo.value.customer = Number(query.customer) + + } } @@ -59,156 +67,178 @@ const editItem = async () => { } const cancelEditorCreate = () => { - mode.value = "show" - itemInfo.value = { - id: 0, - infoData: {} + if(currentItem.value) { + router.push(`/plants/show/${currentItem.value.id}`) + } else { + router.push(`/plants`) } + } setupPage() - - - - - - - - - + --> \ No newline at end of file diff --git a/spaces/pages/spaces/[mode]/[[id]].vue b/spaces/pages/spaces/[mode]/[[id]].vue index 7e141a7..d6e7186 100644 --- a/spaces/pages/spaces/[mode]/[[id]].vue +++ b/spaces/pages/spaces/[mode]/[[id]].vue @@ -94,117 +94,112 @@ setupPage()