Initial
This commit is contained in:
5
.idea/.gitignore
generated
vendored
Normal file
5
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/spaces.iml" filepath="$PROJECT_DIR$/.idea/spaces.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
12
.idea/spaces.iml
generated
Normal file
12
.idea/spaces.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
25
docu
Normal file
25
docu
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
Passwort Strapi: FsLzFSeX7fB
|
||||||
|
info: fpGUpbQG34
|
||||||
|
|
||||||
|
E-Mail Info@spaces.software
|
||||||
|
PW: 7QdbHmUg4Q7QdbHmUg4Q
|
||||||
|
|
||||||
|
Hetzner PW: iV5HTgj4Xt
|
||||||
|
|
||||||
|
DO PW: 3Rtp39VFEr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Banking Test:
|
||||||
|
|
||||||
|
Default Client:
|
||||||
|
|
||||||
|
Client Id: 73c4321c-0659-4d85-adcf-fcea0efab90b
|
||||||
|
Client Secret: d3a41169-40f4-43f0-b47b-b3a6786cefa0
|
||||||
|
Data Decryption Key: 831cd0c77765f04273d3cad523b15369
|
||||||
|
|
||||||
|
Admin Client:
|
||||||
|
|
||||||
|
Client Id: 7d1d57c6-6368-4aea-811d-9e651fd55a36
|
||||||
|
Client Secret: 30579e3c-8fbb-4684-a344-a521f962fd7c
|
||||||
|
Data Decryption Key: 3598063141d04b3b97c60c15fe4c9099
|
||||||
14
reactnative/.gitignore
vendored
Normal file
14
reactnative/.gitignore
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
node_modules/
|
||||||
|
.expo/
|
||||||
|
dist/
|
||||||
|
npm-debug.*
|
||||||
|
*.jks
|
||||||
|
*.p8
|
||||||
|
*.p12
|
||||||
|
*.key
|
||||||
|
*.mobileprovision
|
||||||
|
*.orig.*
|
||||||
|
web-build/
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
.DS_Store
|
||||||
14
reactnative/README.md
Normal file
14
reactnative/README.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Expo Router Example
|
||||||
|
|
||||||
|
Use [`expo-router`](https://expo.github.io/router) to build native navigation using files in the `app/` directory.
|
||||||
|
|
||||||
|
## 🚀 How to use
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npx create-expo-app -e with-router
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📝 Notes
|
||||||
|
|
||||||
|
- [Expo Router: Docs](https://expo.github.io/router)
|
||||||
|
- [Expo Router: Repo](https://github.com/expo/router)
|
||||||
13
reactnative/app.json
Normal file
13
reactnative/app.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"expo": {
|
||||||
|
"scheme": "acme",
|
||||||
|
"web": {
|
||||||
|
"bundler": "metro"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"expo-router"
|
||||||
|
],
|
||||||
|
"name": "reactnative",
|
||||||
|
"slug": "reactnative"
|
||||||
|
}
|
||||||
|
}
|
||||||
20
reactnative/app/_layout.js
Normal file
20
reactnative/app/_layout.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import {Stack} from "expo-router"
|
||||||
|
import {Tabs} from "expo-router";
|
||||||
|
|
||||||
|
const Layout = () => {
|
||||||
|
return (
|
||||||
|
<Tabs>
|
||||||
|
<Tabs.Screen
|
||||||
|
name="index"
|
||||||
|
/>
|
||||||
|
<Tabs.Screen
|
||||||
|
name="time"
|
||||||
|
options={{
|
||||||
|
href: null
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Tabs>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Layout
|
||||||
30
reactnative/app/index.js
Normal file
30
reactnative/app/index.js
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import {StyleSheet,View, Text, Pressable} from 'react-native'
|
||||||
|
import {Link} from "expo-router";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const Home = () => {
|
||||||
|
return (
|
||||||
|
<View style={styles.container}>
|
||||||
|
<Text>Home</Text>
|
||||||
|
<Link href="/time" asChild>
|
||||||
|
<Pressable>
|
||||||
|
<Text>Zeiten</Text>
|
||||||
|
</Pressable>
|
||||||
|
</Link>
|
||||||
|
<Link href="/projects">Projekte</Link>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: '#fff',
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
export default Home;
|
||||||
44
reactnative/app/projects.js
Normal file
44
reactnative/app/projects.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import {ActivityIndicator, FlatList, Text, View} from "react-native";
|
||||||
|
import {useState, useEffect} from "react";
|
||||||
|
|
||||||
|
export default function Page() {
|
||||||
|
const [isLoading, setLoading] = useState(true);
|
||||||
|
const [data, setData] = useState([]);
|
||||||
|
const getProjects = () => {
|
||||||
|
return fetch('http://192.168.178.129:1337/api/projects?populate=*')
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(json => {
|
||||||
|
setData(json.data);
|
||||||
|
setLoading(false)
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getProjects();
|
||||||
|
})
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={{flex:1,padding: 24}}>
|
||||||
|
{
|
||||||
|
isLoading ? (
|
||||||
|
<ActivityIndicator/>
|
||||||
|
) : (
|
||||||
|
<FlatList
|
||||||
|
data={data}
|
||||||
|
keyExtractor={({id}) => id}
|
||||||
|
renderItem={({item}) => (
|
||||||
|
<View style={{height: "120px", width: '95%', backgroundColor: 'grey', marginTop: 10, borderColor: '#69c350'}}>
|
||||||
|
<Text>{item.attributes.name}</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</View>
|
||||||
|
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
7
reactnative/app/time.js
Normal file
7
reactnative/app/time.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import {Text} from "react-native";
|
||||||
|
|
||||||
|
export default function Page() {
|
||||||
|
return (
|
||||||
|
<Text>Time</Text>
|
||||||
|
)
|
||||||
|
}
|
||||||
11
reactnative/babel.config.js
Normal file
11
reactnative/babel.config.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
module.exports = function (api) {
|
||||||
|
api.cache(true);
|
||||||
|
return {
|
||||||
|
presets: ["babel-preset-expo"],
|
||||||
|
plugins: [
|
||||||
|
"@babel/plugin-proposal-export-namespace-from",
|
||||||
|
"react-native-reanimated/plugin",
|
||||||
|
require.resolve("expo-router/babel"),
|
||||||
|
],
|
||||||
|
};
|
||||||
|
};
|
||||||
1
reactnative/index.js
Normal file
1
reactnative/index.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import "expo-router/entry";
|
||||||
14289
reactnative/package-lock.json
generated
Normal file
14289
reactnative/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
43
reactnative/package.json
Normal file
43
reactnative/package.json
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"name": "reactnative",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"start": "expo start",
|
||||||
|
"android": "expo start --android",
|
||||||
|
"ios": "expo start --ios",
|
||||||
|
"web": "expo start --web"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"axios": "^1.6.2",
|
||||||
|
"expo": "^49.0.3",
|
||||||
|
"expo-constants": "~14.4.2",
|
||||||
|
"expo-font": "^11.6.0",
|
||||||
|
"expo-linking": "~5.0.2",
|
||||||
|
"expo-router": "2.0.0",
|
||||||
|
"expo-splash-screen": "~0.20.4",
|
||||||
|
"expo-status-bar": "~1.6.0",
|
||||||
|
"react": "18.2.0",
|
||||||
|
"react-dom": "18.2.0",
|
||||||
|
"react-native": "0.72.3",
|
||||||
|
"react-native-dotenv": "^3.4.9",
|
||||||
|
"react-native-gesture-handler": "~2.12.0",
|
||||||
|
"react-native-reanimated": "~3.3.0",
|
||||||
|
"react-native-safe-area-context": "4.6.3",
|
||||||
|
"react-native-screens": "~3.22.0",
|
||||||
|
"react-native-web": "~0.19.6"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.19.3",
|
||||||
|
"@babel/plugin-proposal-export-namespace-from": "^7.18.9"
|
||||||
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"metro": "^0.73.7",
|
||||||
|
"metro-resolver": "^0.73.7"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"metro": "^0.73.7",
|
||||||
|
"metro-resolver": "^0.73.7"
|
||||||
|
},
|
||||||
|
"private": true
|
||||||
|
}
|
||||||
24
spaces/.gitignore
vendored
Normal file
24
spaces/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Nuxt dev/build outputs
|
||||||
|
.output
|
||||||
|
.data
|
||||||
|
.nuxt
|
||||||
|
.nitro
|
||||||
|
.cache
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Node dependencies
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
.DS_Store
|
||||||
|
.fleet
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# Local env files
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
75
spaces/README.md
Normal file
75
spaces/README.md
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
# Nuxt 3 Minimal Starter
|
||||||
|
|
||||||
|
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
Make sure to install the dependencies:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm install
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Development Server
|
||||||
|
|
||||||
|
Start the development server on `http://localhost:3000`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm run dev
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn dev
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Production
|
||||||
|
|
||||||
|
Build the application for production:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm run build
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn build
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun run build
|
||||||
|
```
|
||||||
|
|
||||||
|
Locally preview production build:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# npm
|
||||||
|
npm run preview
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
pnpm run preview
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
yarn preview
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun run preview
|
||||||
|
```
|
||||||
|
|
||||||
|
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
||||||
64
spaces/app.vue
Normal file
64
spaces/app.vue
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const user = useStrapiUser()
|
||||||
|
const router = useRouter()
|
||||||
|
const {logout} = useStrapiAuth()
|
||||||
|
|
||||||
|
const userDropdownItems = [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
label: user.value ? user.value.username : "Profil",
|
||||||
|
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
label: "Logout",
|
||||||
|
click: () => {
|
||||||
|
logout()
|
||||||
|
router.push("/login")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<UCard id="page">
|
||||||
|
<template #header>
|
||||||
|
<div id="menu">
|
||||||
|
<router-link to="/tasks" class="mr-2"><UButton>Aufgaben</UButton></router-link>
|
||||||
|
<router-link to="/customers" class="mr-2"><UButton>Kunden</UButton></router-link>
|
||||||
|
<router-link to="/projects" class="mr-2"><UButton>Projekte</UButton></router-link>
|
||||||
|
<router-link to="/vendorinvoices" class="mr-2"><UButton>Eingangsrechnungen</UButton></router-link>
|
||||||
|
<router-link to="/timetracking" class="mr-2"><UButton>Zeiterfassung</UButton></router-link>
|
||||||
|
<router-link to="/products" class="mr-2"><UButton>Artikel</UButton></router-link>
|
||||||
|
<router-link to="/documents" class="mr-2"><UButton>Dokumente</UButton></router-link>
|
||||||
|
<router-link to="/inventory" class="mr-2"><UButton>Inventar</UButton></router-link>
|
||||||
|
<UDropdown :items="userDropdownItems" :popper="{placement: 'bottom-start'}">
|
||||||
|
<UButton color="white" label="Benutzer" trailing-icon="i-heroicons-chevron-down-20-solid" />
|
||||||
|
</UDropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<NuxtPage/>
|
||||||
|
</UCard>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style >
|
||||||
|
|
||||||
|
#page {
|
||||||
|
width: 98vw;
|
||||||
|
height: 95vh;
|
||||||
|
margin:1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listItem {
|
||||||
|
padding: .1em;
|
||||||
|
border: 1px solid grey;
|
||||||
|
border-radius: 15px;
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
.listItem:hover {
|
||||||
|
border: 1px solid #69c350;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
7
spaces/middleware/auth.ts
Normal file
7
spaces/middleware/auth.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
export default defineNuxtRouteMiddleware((to, _from) => {
|
||||||
|
const user = useStrapiUser()
|
||||||
|
if (!user.value) {
|
||||||
|
useCookie('redirect', { path: '/' }).value = to.fullPath
|
||||||
|
return navigateTo('/login')
|
||||||
|
}
|
||||||
|
})
|
||||||
16
spaces/nuxt.config.ts
Normal file
16
spaces/nuxt.config.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
|
export default defineNuxtConfig({
|
||||||
|
devtools: { enabled: true },
|
||||||
|
modules: [
|
||||||
|
'@pinia/nuxt',
|
||||||
|
'@nuxt/ui',
|
||||||
|
'@nuxtjs/strapi'
|
||||||
|
],
|
||||||
|
routeRules: {
|
||||||
|
'/printing': {ssr:false}
|
||||||
|
|
||||||
|
}
|
||||||
|
//Test
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
22254
spaces/package-lock.json
generated
Normal file
22254
spaces/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
30
spaces/package.json
Normal file
30
spaces/package.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"name": "nuxt-app",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"build": "nuxt build",
|
||||||
|
"dev": "nuxt dev",
|
||||||
|
"generate": "nuxt generate",
|
||||||
|
"preview": "nuxt preview",
|
||||||
|
"postinstall": "nuxt prepare"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@nuxt/devtools": "latest",
|
||||||
|
"nuxt": "^3.8.0",
|
||||||
|
"vue": "^3.3.7",
|
||||||
|
"vue-router": "^4.2.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@huntersofbook/naive-ui-nuxt": "^1.2.0",
|
||||||
|
"@nuxt/ui": "^2.10.0",
|
||||||
|
"@nuxtjs/strapi": "^1.9.3",
|
||||||
|
"@pinia/nuxt": "^0.5.1",
|
||||||
|
"@vicons/ionicons5": "^0.12.0",
|
||||||
|
"axios": "^1.6.0",
|
||||||
|
"jsprintmanager": "^6.0.3",
|
||||||
|
"pinia": "^2.1.7",
|
||||||
|
"uuidv4": "^6.2.13",
|
||||||
|
"vue-pdf-embed": "^1.2.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
112
spaces/pages/customers.vue
Normal file
112
spaces/pages/customers.vue
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
<template>
|
||||||
|
<div id="main">
|
||||||
|
<div id="left">
|
||||||
|
|
||||||
|
<UButton @click="showCreateCustomer = true">+ Kunde</UButton>
|
||||||
|
<UModal v-model="showCreateCustomer">
|
||||||
|
<UCard :ui="{ ring: '', divide: 'divide-y divide-gray-100 dark:divide-gray-800' }">
|
||||||
|
<template #header>
|
||||||
|
Kunde erstellen
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<UForm @submit="createCustomer">
|
||||||
|
<UFormGroup label="Name:" required>
|
||||||
|
<UInput v-model="customerInfo.name"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="Kundenummer:" required>
|
||||||
|
<UInput type="number" v-model="customerInfo.customerNumber"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UButton type="submit">
|
||||||
|
Erstellen
|
||||||
|
</UButton>
|
||||||
|
</UForm>
|
||||||
|
|
||||||
|
|
||||||
|
</UCard>
|
||||||
|
</UModal>
|
||||||
|
|
||||||
|
|
||||||
|
<a v-for="item in customers" @click="selectItem(item)">
|
||||||
|
<UCard class="listItem">
|
||||||
|
<UBadge>{{item.attributes.customerNumber}}</UBadge> {{item.attributes.name}}
|
||||||
|
</UCard>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="right">
|
||||||
|
|
||||||
|
<UCard v-if="selectedItem.id">
|
||||||
|
<template #header>
|
||||||
|
<UBadge>{{selectedItem.attributes.customerNumber}}</UBadge> {{selectedItem.attributes.name}}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
Kontakte:<br>
|
||||||
|
<ul>
|
||||||
|
<li v-for="contact in selectedItem.attributes.contacts.data">{{contact.attributes.lastName}}, {{contact.attributes.firstName}}</li>
|
||||||
|
</ul>
|
||||||
|
<!-- {{selectedItem.attributes.contacts.data}}-->
|
||||||
|
<br>
|
||||||
|
Projekte:<br>
|
||||||
|
<ul>
|
||||||
|
<li v-for="project in selectedItem.attributes.projects.data"><router-link :to="'/projects?id=' + project.id">{{project.attributes.name}}</router-link></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</UCard>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
|
||||||
|
const {find,create} = useStrapi4()
|
||||||
|
const customers = (await find('customers',{populate: "*"})).data
|
||||||
|
|
||||||
|
|
||||||
|
let showCreateCustomer = ref(false)
|
||||||
|
let customerInfo = ref({
|
||||||
|
name: "",
|
||||||
|
customerNumber: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
let selectedItem = ref({})
|
||||||
|
|
||||||
|
const selectItem = (item) => {
|
||||||
|
selectedItem.value = item
|
||||||
|
}
|
||||||
|
|
||||||
|
const createCustomer = async () => {
|
||||||
|
await create('customers', customerInfo.value)
|
||||||
|
console.log("Create")
|
||||||
|
customerInfo.value = {}
|
||||||
|
showCreateCustomer.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
#left {
|
||||||
|
width: 25vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
#right {
|
||||||
|
width: 60vw;
|
||||||
|
padding-left: 3vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
281
spaces/pages/documents.vue
Normal file
281
spaces/pages/documents.vue
Normal file
@@ -0,0 +1,281 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="controlHeader">
|
||||||
|
<UButton @click="uploadModalOpen = true">Hochladen</UButton>
|
||||||
|
<UModal
|
||||||
|
v-model="uploadModalOpen"
|
||||||
|
>
|
||||||
|
<UCard class="p-4">
|
||||||
|
|
||||||
|
<template #header>
|
||||||
|
Datei hochladen
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Datei:"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
type="file"
|
||||||
|
id="fileUploadInput"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup
|
||||||
|
label="Name:"
|
||||||
|
class="mt-3"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
v-model="fileUploadFormData.name"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup
|
||||||
|
label="Tags:"
|
||||||
|
class="mt-3"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
multiple
|
||||||
|
searchable
|
||||||
|
searchable-placeholder="Suchen..."
|
||||||
|
:options="tags"
|
||||||
|
v-model="fileUploadFormData.tags"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<UButton
|
||||||
|
class="mt-3"
|
||||||
|
@click="uploadFile"
|
||||||
|
>Hochladen</UButton>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
</UCard>
|
||||||
|
|
||||||
|
</UModal>
|
||||||
|
<!-- <USelectMenu :options="sortOptions"/>-->
|
||||||
|
</div>
|
||||||
|
<div class="documentList">
|
||||||
|
<USlideover
|
||||||
|
v-model="showDocumentModal"
|
||||||
|
fullscreen
|
||||||
|
>
|
||||||
|
<UCard>
|
||||||
|
<template #header>
|
||||||
|
{{selectedDocument.attributes.name}}
|
||||||
|
</template>
|
||||||
|
<!-- <a
|
||||||
|
v-if="selectedDocument.attributes"
|
||||||
|
target="_blank"
|
||||||
|
:href="`http://localhost:1337${selectedDocument.attributes.file.data.attributes.url}`"
|
||||||
|
class="p-2"
|
||||||
|
>
|
||||||
|
Anzeigen
|
||||||
|
|
||||||
|
|
||||||
|
</a>-->
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Tags:"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
v-if="selectedDocument.attributes"
|
||||||
|
multiple
|
||||||
|
searchable
|
||||||
|
searchable-placeholder="Suchen..."
|
||||||
|
:options="tags"
|
||||||
|
v-on:change="update('documents',selectedDocument.id, {tags: selectedDocument.attributes.tags})"
|
||||||
|
v-model="selectedDocument.attributes.tags"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Status:"
|
||||||
|
class="mb-3"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
:options="states"
|
||||||
|
v-model="selectedDocument.attributes.state"
|
||||||
|
v-on:change="update('documents',selectedDocument.id,{state: selectedDocument.attributes.state})"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<VuePDF
|
||||||
|
ref="vuePDFRef"
|
||||||
|
:pdf="pdf"
|
||||||
|
fit-parent
|
||||||
|
:page="page"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="mt-3">
|
||||||
|
<UButton @click="page = page > 1 ? page - 1 : page">
|
||||||
|
Prev
|
||||||
|
</UButton>
|
||||||
|
<span class="mx-3">{{ page }} / {{ pages }}</span>
|
||||||
|
<UButton @click="page = page < pages ? page + 1 : page">
|
||||||
|
Next
|
||||||
|
</UButton>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</UCard>
|
||||||
|
</USlideover>
|
||||||
|
<a
|
||||||
|
v-for="document in documents.filter(doc => doc.attributes.state != 'Archiviert')" class="documentListItem"
|
||||||
|
@click="openDocument(document)"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
{{document.attributes.name}}<br>
|
||||||
|
<UBadge
|
||||||
|
v-for="tag in document.attributes.tags"
|
||||||
|
variant="outline"
|
||||||
|
color="primary"
|
||||||
|
>{{tag}}</UBadge>
|
||||||
|
<UBadge
|
||||||
|
color="rose"
|
||||||
|
variant="outline"
|
||||||
|
>{{document.attributes.state}}</UBadge>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="documentPreview" v-if="selectedDocument.attributes">
|
||||||
|
<UFormGroup
|
||||||
|
label="Tags:"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
v-if="selectedDocument.attributes"
|
||||||
|
multiple
|
||||||
|
searchable
|
||||||
|
searchable-placeholder="Suchen..."
|
||||||
|
:options="tags"
|
||||||
|
v-on:change="update('documents',selectedDocument.id, {tags: selectedDocument.attributes.tags})"
|
||||||
|
v-model="selectedDocument.attributes.tags"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Status:"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
:options="states"
|
||||||
|
v-model="selectedDocument.attributes.state"
|
||||||
|
v-on:change="update('documents',selectedDocument.id,{state: selectedDocument.attributes.state})"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
<h4 v-if="selectedDocument.attributes">{{selectedDocument.attributes.name}}</h4>
|
||||||
|
<!– <embed src="http://localhost:1337/uploads/RE_1748755_cb0b16cd30.pdf">–>
|
||||||
|
{{selectedDocument}}
|
||||||
|
|
||||||
|
</div>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
|
||||||
|
const sortOptions = ['Hinzugefügt',"Bearbeitet","Name"]
|
||||||
|
|
||||||
|
const {find,create, update} = useStrapi4()
|
||||||
|
const client = useStrapiClient()
|
||||||
|
const strapiMediaUrl = useStrapiMedia()
|
||||||
|
const documents = (await find('documents',{populate: "*"})).data
|
||||||
|
|
||||||
|
import { VuePDF, usePDF } from '@tato30/vue-pdf'
|
||||||
|
|
||||||
|
const page = ref(1)
|
||||||
|
const vuePDFRef = ref(null)
|
||||||
|
const pdfSource = ref("https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf")
|
||||||
|
const { pdf, pages } = usePDF(pdfSource)
|
||||||
|
|
||||||
|
const uploadModalOpen = ref(false)
|
||||||
|
let fileUploadData = null
|
||||||
|
const fileUploadFormData = ref({
|
||||||
|
name: "",
|
||||||
|
tags: ["Dokument"]
|
||||||
|
})
|
||||||
|
|
||||||
|
let tags = ["Eingangsrechnung","Ausgangrechnung","Mahnung", "Dokument"]
|
||||||
|
let states = ["Eingang", "Zugeordnet", "Archiviert"]
|
||||||
|
|
||||||
|
const uploadFile = async () => {
|
||||||
|
try {
|
||||||
|
|
||||||
|
fileUploadData = document.getElementById("fileUploadInput").files[0]
|
||||||
|
|
||||||
|
let formData = new FormData()
|
||||||
|
formData.append('files.file', fileUploadData)
|
||||||
|
|
||||||
|
formData.append('data', JSON.stringify(fileUploadFormData.value))
|
||||||
|
|
||||||
|
const {data} = await client("/documents", {
|
||||||
|
method: "POST",
|
||||||
|
body: formData
|
||||||
|
})
|
||||||
|
}
|
||||||
|
catch (error) { alert(error)}
|
||||||
|
|
||||||
|
|
||||||
|
uploadModalOpen.value = false;
|
||||||
|
console.log("test")
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateDocument = async () => {
|
||||||
|
await update('documents', selectedDocument.id, {tags: selectedDocument.attributes.tags, state: selectedDocument.attributes.state})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const selectedDocument = ref({})
|
||||||
|
const showDocumentModal = ref(false)
|
||||||
|
const openDocument = (document) => {
|
||||||
|
selectedDocument.value = document
|
||||||
|
pdfSource.value = `${strapiMediaUrl}${document.attributes.file.data.attributes.url}`
|
||||||
|
showDocumentModal.value = true
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#main {
|
||||||
|
|
||||||
|
padding:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controlHeader {
|
||||||
|
grid-area: headerleft;
|
||||||
|
}
|
||||||
|
|
||||||
|
.documentList {
|
||||||
|
grid-area: main;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: row;
|
||||||
|
max-width: 80vw;
|
||||||
|
min-height: 75vh;
|
||||||
|
margin-right: 5vw;
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.documentListItem {
|
||||||
|
width: 15vw;
|
||||||
|
height: 15vh;
|
||||||
|
margin-right: 1em;
|
||||||
|
padding:1em;
|
||||||
|
border: 1px solid lightgrey;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.documentListItem:hover {
|
||||||
|
border: 1px solid #69c350;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.documentPreview {
|
||||||
|
grid-area: right;
|
||||||
|
width: 30vw;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
11
spaces/pages/forms.vue
Normal file
11
spaces/pages/forms.vue
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
16
spaces/pages/index.vue
Normal file
16
spaces/pages/index.vue
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
const {find} = useStrapi4()
|
||||||
|
const response = await find('customers')
|
||||||
|
console.log(response)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
126
spaces/pages/inventory/index.vue
Normal file
126
spaces/pages/inventory/index.vue
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<script setup>
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
|
||||||
|
const {find,create} = useStrapi4()
|
||||||
|
const spaces = (await find('spaces',{populate: "*"})).data
|
||||||
|
const products = (await find('products',{populate: "*"})).data
|
||||||
|
const movements = (await find('movements',{populate: "*"})).data
|
||||||
|
|
||||||
|
const searchinput = ref("")
|
||||||
|
const mode = ref("")
|
||||||
|
|
||||||
|
const toast = useToast()
|
||||||
|
|
||||||
|
const inventoryChangeData = ref({
|
||||||
|
productId: "",
|
||||||
|
spaceId: "",
|
||||||
|
quantity: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
const createMovement = async () => {
|
||||||
|
if(mode.value === 'incoming'){
|
||||||
|
await create('movements', inventoryChangeData.value)
|
||||||
|
} else if (mode.value === 'outgoing'){
|
||||||
|
inventoryChangeData.value.quantity *= -1
|
||||||
|
await create('movements', inventoryChangeData.value)
|
||||||
|
} else if (mode.value === 'change'){}
|
||||||
|
|
||||||
|
inventoryChangeData.value = {
|
||||||
|
productId: "",
|
||||||
|
spaceId: "",
|
||||||
|
quantity: 0
|
||||||
|
}
|
||||||
|
alert("Created")
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkArticle(productId) {
|
||||||
|
return products.filter(product => product.id === Number(productId)).length > 0;
|
||||||
|
}
|
||||||
|
function checkSpaceId(spaceId) {
|
||||||
|
return spaces.filter(space => space.attributes.spaceNumber === spaceId).length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div id="main">
|
||||||
|
<router-link to="/inventory/spaces"><UButton>Lagerplätze</UButton></router-link>
|
||||||
|
|
||||||
|
<!--<UInput
|
||||||
|
icon="i-heroicons-magnifying-glass-20-solid"
|
||||||
|
variant="outline"
|
||||||
|
color="primary"
|
||||||
|
placeholder="Barcode / Suche"
|
||||||
|
v-model="searchinput"
|
||||||
|
/>-->
|
||||||
|
|
||||||
|
<UButton @click="mode = 'incoming'" class="ml-3" >Wareneingang</UButton>
|
||||||
|
<UButton @click="mode = 'outgoing'" class="ml-1">Warenausgang</UButton>
|
||||||
|
<UButton @click="mode = 'change'" class="ml-1" disabled>Umlagern</UButton>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Artikel:"
|
||||||
|
class="mt-3"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
variant="outline"
|
||||||
|
:color="checkArticle(inventoryChangeData.productId) ? 'primary' : 'rose'"
|
||||||
|
placeholder="Barcode / Suche"
|
||||||
|
v-model="inventoryChangeData.productId"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Lagerplatz:"
|
||||||
|
class="mt-3"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
variant="outline"
|
||||||
|
:color="checkSpaceId(inventoryChangeData.spaceId) ? 'primary' : 'rose'"
|
||||||
|
placeholder="Barcode / Suche"
|
||||||
|
v-model="inventoryChangeData.spaceId"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Anzahl:"
|
||||||
|
class="mt-3"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
variant="outline"
|
||||||
|
color="primary"
|
||||||
|
placeholder="Anzahl"
|
||||||
|
v-model="inventoryChangeData.quantity"
|
||||||
|
type="number"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UButton
|
||||||
|
@click="createMovement"
|
||||||
|
:disabled="mode === '' && checkSpaceId(inventoryChangeData.spaceId) && checkArticle(inventoryChangeData.productId)"
|
||||||
|
class="mt-3"
|
||||||
|
>
|
||||||
|
Bestätigen
|
||||||
|
</UButton>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#main {
|
||||||
|
/*display: flex;
|
||||||
|
flex-direction: row;*/
|
||||||
|
}
|
||||||
|
#left {
|
||||||
|
width: 25vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
#right {
|
||||||
|
width: 60vw;
|
||||||
|
padding-left: 3vw;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
126
spaces/pages/inventory/spaces.vue
Normal file
126
spaces/pages/inventory/spaces.vue
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<script setup>
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
|
||||||
|
const {find,create, update} = useStrapi4()
|
||||||
|
const spaces = (await find('spaces',{populate: "*"})).data
|
||||||
|
const movements = (await find('movements',{populate: "*"})).data
|
||||||
|
const products = (await find('products',{populate: "*"})).data
|
||||||
|
|
||||||
|
|
||||||
|
let selectedItem = ref({})
|
||||||
|
const showCreateSpace = ref(false)
|
||||||
|
|
||||||
|
const selectItem = (item) => {
|
||||||
|
selectedItem.value = item
|
||||||
|
spaceMovements.value = movements.filter(movement => movement.attributes.spaceId === selectedItem.value.attributes.spaceNumber)
|
||||||
|
spaceMovements.value.forEach(movement => {
|
||||||
|
if(!spaceProducts.value.includes(movement.attributes.productId)) spaceProducts.value.push(movement.attributes.productId)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const spaceTypes = ["Regalplatz", "Kiste", "Palettenplatz"]
|
||||||
|
|
||||||
|
const createSpaceData = ref({})
|
||||||
|
const createSpace = async () => {
|
||||||
|
let lastSpaceNumber = 0
|
||||||
|
spaces.forEach(space => {
|
||||||
|
if(space.attributes.spaceNumber > lastSpaceNumber) lastSpaceNumber = space.attributes.spaceNumber
|
||||||
|
})
|
||||||
|
|
||||||
|
await create('spaces', {...createSpaceData.value, spaceNumber: String(Number(lastSpaceNumber)+1)})
|
||||||
|
showCreateSpace.value = false
|
||||||
|
createSpaceData.value = {}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const spaceProducts = ref([])
|
||||||
|
const spaceMovements = ref([])
|
||||||
|
|
||||||
|
function getSpaceProductCount(productId) {
|
||||||
|
let productMovements = spaceMovements.value.filter(movement => movement.attributes.productId === productId)
|
||||||
|
let count = 0;
|
||||||
|
productMovements.forEach(movement => count += movement.attributes.quantity)
|
||||||
|
|
||||||
|
return count
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div id="main">
|
||||||
|
<div id="left">
|
||||||
|
<UButton @click="showCreateSpace = true">
|
||||||
|
Erstellen
|
||||||
|
</UButton>
|
||||||
|
<UModal v-model="showCreateSpace">
|
||||||
|
<UCard>
|
||||||
|
<template #header>
|
||||||
|
Lagerplatz erstellen
|
||||||
|
</template>
|
||||||
|
<UFormGroup
|
||||||
|
label="Beschreibung:"
|
||||||
|
>
|
||||||
|
<UTextarea
|
||||||
|
v-model="createSpaceData.description"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup
|
||||||
|
label="Typ:"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
v-model="createSpaceData.type"
|
||||||
|
:options="spaceTypes"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<UButton @click="createSpace">Erstellen</UButton>
|
||||||
|
</template>
|
||||||
|
</UCard>
|
||||||
|
</UModal>
|
||||||
|
<a v-for="item in spaces" @click="selectItem(item)">
|
||||||
|
<UCard class="listItem">
|
||||||
|
{{item.attributes.spaceNumber}} - {{item.attributes.type}}
|
||||||
|
</UCard>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="right">
|
||||||
|
<UCard v-if="selectedItem.attributes">
|
||||||
|
<template #header>
|
||||||
|
<UBadge class="mr-1">{{selectedItem.attributes.spaceNumber}}</UBadge>{{selectedItem.attributes.type}}
|
||||||
|
</template>
|
||||||
|
{{selectedItem.attributes.description}}
|
||||||
|
|
||||||
|
|
||||||
|
</UCard>
|
||||||
|
|
||||||
|
|
||||||
|
<p class="mt-5">Artikel in diesem Lagerplatz</p>
|
||||||
|
<p v-for="product in spaceProducts">{{products.find(productItem => Number(productItem.id) === Number(product)).attributes.name}} - {{getSpaceProductCount(product)}} {{products.find(productItem => Number(productItem.id) === Number(product)).attributes.unit}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
#main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
#left {
|
||||||
|
width: 25vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
#right {
|
||||||
|
width: 60vw;
|
||||||
|
padding-left: 3vw;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
69
spaces/pages/login.vue
Normal file
69
spaces/pages/login.vue
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<script setup >
|
||||||
|
|
||||||
|
const { login } = useStrapiAuth()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
|
const username = ref("flfeders")
|
||||||
|
const password = ref("Open@all4me!")
|
||||||
|
|
||||||
|
|
||||||
|
const onSubmit = async () => {
|
||||||
|
try {
|
||||||
|
await login({identifier: username.value, password: password.value})
|
||||||
|
console.log("Successfully Logged In")
|
||||||
|
router.push("/tasks")
|
||||||
|
|
||||||
|
} catch(e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const user = useStrapiUser()
|
||||||
|
console.log(user)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div id="loginSite">
|
||||||
|
<div id="loginForm">
|
||||||
|
<UFormGroup
|
||||||
|
label="Username:"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
v-model="username"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup
|
||||||
|
label="Passwort:"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
v-model="password"
|
||||||
|
type="password"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UButton
|
||||||
|
@click="onSubmit"
|
||||||
|
class="mt-3"
|
||||||
|
>
|
||||||
|
Einloggen
|
||||||
|
</UButton>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#loginSite {
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#loginForm {
|
||||||
|
width: 30vw;
|
||||||
|
height: 30vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
69
spaces/pages/printing.vue
Normal file
69
spaces/pages/printing.vue
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<script setup>
|
||||||
|
import * as JSPM from 'jsprintmanager'
|
||||||
|
|
||||||
|
let printers = []
|
||||||
|
|
||||||
|
|
||||||
|
const doPrintZPL = () => {
|
||||||
|
/*if(this.selected_printer === '' && !this.print2default) {
|
||||||
|
alert("You must select a printer");
|
||||||
|
return;
|
||||||
|
}*/
|
||||||
|
let cpj = new JSPM.ClientPrintJob();
|
||||||
|
/*if ( this.print2default ) {
|
||||||
|
cpj.clientPrinter = new JSPM.DefaultPrinter();
|
||||||
|
} else {
|
||||||
|
cpj.clientPrinter = new JSPM.InstalledPrinter(this.selected_printer);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
cpj.clientPrinter = new JSPM.InstalledPrinter("ZebraZD230");
|
||||||
|
let cmds = "^XA";
|
||||||
|
cmds += "^CF0,60";
|
||||||
|
cmds += "^FO20,10^BY4^BC,200,Y,N,,U^FD0012345123451234512^FS";
|
||||||
|
cmds += "^FO20,250^GB650,3,3^FS";
|
||||||
|
cmds += "^CFA,30";
|
||||||
|
cmds += "^FO20,300^FDFederspiel Technology UG^FS";
|
||||||
|
cmds += "^XZ";
|
||||||
|
|
||||||
|
|
||||||
|
cpj.printerCommands = cmds;
|
||||||
|
cpj.sendToClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const getPrinters = () => {
|
||||||
|
return new Promise((ok, err) => {
|
||||||
|
let printers = [];
|
||||||
|
if(JSPM.JSPrintManager.websocket_status == JSPM.WSStatus.Open) {
|
||||||
|
JSPM.JSPrintManager.getPrinters().then(function (myPrinters) {
|
||||||
|
printers = myPrinters;
|
||||||
|
console.log(printers);
|
||||||
|
ok(printers);
|
||||||
|
}).catch((e)=>err(e));
|
||||||
|
} else { console.warn("JSPM WS not open"); ok(printers); }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const initJSPM = () => {
|
||||||
|
JSPM.JSPrintManager.auto_reconnect = true
|
||||||
|
JSPM.JSPrintManager.start();
|
||||||
|
|
||||||
|
JSPM.JSPrintManager.WS.onStatusChanged = () => {
|
||||||
|
console.log("Status Changed")
|
||||||
|
getPrinters().then(p => printers = p)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
initJSPM()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
{{printers}}
|
||||||
|
|
||||||
|
|
||||||
|
<UButton @click="doPrintZPL">Print</UButton>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
198
spaces/pages/products.vue
Normal file
198
spaces/pages/products.vue
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
<template>
|
||||||
|
<div id="main">
|
||||||
|
<div id="left">
|
||||||
|
|
||||||
|
<UButton @click="showCreateProduct = true" >+ Artikel</UButton>
|
||||||
|
<UModal v-model="showCreateProduct">
|
||||||
|
<UCard :ui="{ ring: '', divide: 'divide-y divide-gray-100 dark:divide-gray-800' }">
|
||||||
|
<template #header>
|
||||||
|
Artikel erstellen
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Name:"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
v-model="createProductData.name"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup
|
||||||
|
label="Hersteller:"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
v-model="createProductData.manufacturer"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup
|
||||||
|
label="Einheit:"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
v-model="createProductData.unit"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<UButton @click="createProduct">Erstellen</UButton>
|
||||||
|
</template>
|
||||||
|
</UCard>
|
||||||
|
</UModal>
|
||||||
|
|
||||||
|
<div class="listContainer">
|
||||||
|
<a v-for="item in products" @click="selectItem(item)">
|
||||||
|
<UCard class="listItem">
|
||||||
|
<UBadge>{{item.id}}</UBadge> {{item.attributes.name}} - {{item.attributes.manufacturer}}
|
||||||
|
</UCard>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="right">
|
||||||
|
<div v-if="false">
|
||||||
|
<img
|
||||||
|
v-if="selectedItem.attributes.image"
|
||||||
|
:src="'http://localhost:1337' + selectedItem.attributes.image.data.attributes.url"/>
|
||||||
|
{{selectedItem.attributes.image.data.attributes.url}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<UCard v-if="selectedItem.attributes">
|
||||||
|
<template #header>
|
||||||
|
<UBadge>{{selectedItem.id}}</UBadge> {{selectedItem.attributes.name}}
|
||||||
|
</template>
|
||||||
|
<!-- <UBadge
|
||||||
|
v-for="tag in selectedItem.tags"
|
||||||
|
class="mr-2"
|
||||||
|
>
|
||||||
|
{{tag}}
|
||||||
|
</UBadge>-->
|
||||||
|
<UDivider class="my-3"/>
|
||||||
|
<div v-if="selectedItem.attributes">
|
||||||
|
Hersteller: {{selectedItem.attributes.manufacturer}}<br>
|
||||||
|
Einkaufspreis: {{selectedItem.attributes.purchasePriceNet.toFixed(2)}} €<br>
|
||||||
|
Aufschlag: {{selectedItem.attributes.profitPercentage}} %<br>
|
||||||
|
Verkaufspreis: {{selectedItem.attributes.retailPriceNet.toFixed(2)}} €<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<UDivider class="my-3"/>
|
||||||
|
<p>Verlauf:</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr
|
||||||
|
v-for="item in history"
|
||||||
|
class="historyItem"
|
||||||
|
>
|
||||||
|
<td>
|
||||||
|
{{item.position}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{item.date}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<UBadge>{{item.user}}</UBadge>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{item.message}}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div
|
||||||
|
v-for="item in history"
|
||||||
|
class="historyItem"
|
||||||
|
>
|
||||||
|
<p>{{item.message}}</p>
|
||||||
|
<UBadge>{{item.user}}</UBadge>
|
||||||
|
</div>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</UCard> {{selectedItem}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
|
||||||
|
const {find,create} = useStrapi4()
|
||||||
|
const products = (await find('products',{populate: "*"})).data
|
||||||
|
|
||||||
|
const showCreateProduct = ref(false)
|
||||||
|
const createProductData = ref({})
|
||||||
|
|
||||||
|
|
||||||
|
let selectedItem = ref({})
|
||||||
|
|
||||||
|
const history = ref([
|
||||||
|
{
|
||||||
|
position: 0,
|
||||||
|
message: "Produkt erstellt",
|
||||||
|
date: "2023-11-20",
|
||||||
|
user: "flfeders"
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
const selectItem = (item) => {
|
||||||
|
selectedItem.value = item
|
||||||
|
console.log(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
const createProduct = async () => {
|
||||||
|
await create('products', createProductData.value)
|
||||||
|
showCreateProduct.value = false
|
||||||
|
createProductData.value = {}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
#left {
|
||||||
|
width: 25vw;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#right {
|
||||||
|
width: 60vw;
|
||||||
|
padding-left: 3vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listContainer {
|
||||||
|
height: 75vh;
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 3vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.historyItem >td {
|
||||||
|
border: 0.5px solid grey;
|
||||||
|
border-radius: 15px;
|
||||||
|
padding: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Hide scrollbar for Chrome, Safari and Opera */
|
||||||
|
.listContainer::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide scrollbar for IE, Edge and Firefox */
|
||||||
|
.listContainer {
|
||||||
|
-ms-overflow-style: none; /* IE and Edge */
|
||||||
|
scrollbar-width: none; /* Firefox */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
150
spaces/pages/projects/[id].vue
Normal file
150
spaces/pages/projects/[id].vue
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
<script setup >
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
|
||||||
|
const {find, findOne,create, update} = useStrapi4()
|
||||||
|
const route = useRoute()
|
||||||
|
let project = (await findOne('projects',route.params.id)).data
|
||||||
|
const tabItems = [
|
||||||
|
{
|
||||||
|
key: "phases",
|
||||||
|
label: "Phasen"
|
||||||
|
},{
|
||||||
|
key: "forms",
|
||||||
|
label: "Formulare"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const selectedPhase = ref({})
|
||||||
|
const changesSaved = ref(true)
|
||||||
|
|
||||||
|
|
||||||
|
const updatePhases = async () => {
|
||||||
|
await update('projects', route.params.id, {phases: project.attributes.phases})
|
||||||
|
changesSaved.value = true
|
||||||
|
console.log("Updated")
|
||||||
|
}
|
||||||
|
|
||||||
|
const phaseInfo = ref({
|
||||||
|
name: "XX",
|
||||||
|
notes: ""
|
||||||
|
})
|
||||||
|
|
||||||
|
const addPhase = async (phaseBefore) => {
|
||||||
|
|
||||||
|
|
||||||
|
let posBefore = phaseBefore.position
|
||||||
|
let phases = project.attributes.phases
|
||||||
|
|
||||||
|
phases.splice(posBefore + 1,0,{name: "test", checkboxes: []})
|
||||||
|
|
||||||
|
phases.forEach((phase,index) => {
|
||||||
|
phases[index].position = index
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
await updatePhases()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div id="main">
|
||||||
|
<div id="left">
|
||||||
|
<a
|
||||||
|
v-for="phase in project.attributes.phases"
|
||||||
|
@click="selectedPhase = phase"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="phaseContainer"
|
||||||
|
>
|
||||||
|
<span>{{phase.name}} - {{phase.position}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a class="plusIcon" @click="addPhase(phase)">
|
||||||
|
<!-- <UIcon name="i-heroicons-plus-circle" />-->
|
||||||
|
<UDivider icon="i-heroicons-plus-circle"/>
|
||||||
|
</a>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="right" v-if="selectedPhase.name">
|
||||||
|
<h3>{{selectedPhase.name}}</h3>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="selectedPhase"
|
||||||
|
>
|
||||||
|
<UCheckbox
|
||||||
|
v-for="checkbox in selectedPhase.checkboxes"
|
||||||
|
v-model="checkbox.checked"
|
||||||
|
:label="checkbox.name"
|
||||||
|
v-on:change="updatePhases"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<UTextarea
|
||||||
|
v-model="selectedPhase.notes"
|
||||||
|
variant="outline"
|
||||||
|
color="primary"
|
||||||
|
placeholder="Notizen..."
|
||||||
|
class="notesTextarea"
|
||||||
|
v-on:change="changesSaved = false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<UButton
|
||||||
|
v-if="!changesSaved"
|
||||||
|
@click="updatePhases"
|
||||||
|
>
|
||||||
|
Speichern
|
||||||
|
</UButton>
|
||||||
|
|
||||||
|
{{selectedPhase}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style >
|
||||||
|
|
||||||
|
#main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
#left {
|
||||||
|
width: 25vw;
|
||||||
|
height: 80vh;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#right {
|
||||||
|
width: 65vw;
|
||||||
|
margin-left: 2vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phaseContainer {
|
||||||
|
border: 1px solid grey;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phaseContainer:hover {
|
||||||
|
border: 1px solid #69c350;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notesTextarea {
|
||||||
|
margin-top: 1em
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
color: #69c350;
|
||||||
|
font-size: larger;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plusIcon:hover {
|
||||||
|
color: #69c350;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
81
spaces/pages/projects/index.vue
Normal file
81
spaces/pages/projects/index.vue
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<template>
|
||||||
|
<div id="main">
|
||||||
|
<div id="left">
|
||||||
|
|
||||||
|
<UButton @click="showCreateProject = true">+ Projekt</UButton>
|
||||||
|
<UModal v-model="showCreateProject">
|
||||||
|
<UCard :ui="{ ring: '', divide: 'divide-y divide-gray-100 dark:divide-gray-800' }">
|
||||||
|
|
||||||
|
</UCard>
|
||||||
|
</UModal>
|
||||||
|
|
||||||
|
<router-link v-for="item in projects" :to="`/projects/${item.id}`">
|
||||||
|
<UCard class="listItem">
|
||||||
|
<UBadge>{{item.id}}</UBadge> {{item.attributes.name}}
|
||||||
|
</UCard>
|
||||||
|
</router-link>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="right">
|
||||||
|
{{selectedItem}}
|
||||||
|
<UCard v-if="selectedItem.id">
|
||||||
|
<template #header>
|
||||||
|
<UBadge>{{selectedItem.id}}</UBadge> {{selectedItem.attributes.name}}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
Kunde:<br>
|
||||||
|
{{selectedItem.attributes.customer.data.attributes.name}}<br>
|
||||||
|
|
||||||
|
Notizen: <br>
|
||||||
|
{{selectedItem.attributes.notes}}
|
||||||
|
|
||||||
|
<!-- Lieferantenrechnungen: <br>
|
||||||
|
<UTable :rows="dataStore.getVendorInvoicesByProjectId(selectedItem.id)"></UTable>
|
||||||
|
{{dataStore.getVendorInvoicesByProjectId(selectedItem.id)}}-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</UCard>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
|
||||||
|
const {find,create} = useStrapi4()
|
||||||
|
const projects = (await find('projects',{populate: "*"})).data
|
||||||
|
|
||||||
|
const showCreateProject = ref(false)
|
||||||
|
const projectData = ref({})
|
||||||
|
|
||||||
|
let selectedItem = ref({})
|
||||||
|
|
||||||
|
const selectItem = (item) => {
|
||||||
|
selectedItem.value = item
|
||||||
|
console.log(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
#left {
|
||||||
|
width: 25vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
#right {
|
||||||
|
width: 60vw;
|
||||||
|
padding-left: 3vw;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
288
spaces/pages/tasks.vue
Normal file
288
spaces/pages/tasks.vue
Normal file
@@ -0,0 +1,288 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<UModal
|
||||||
|
v-model="showCreateTask"
|
||||||
|
>
|
||||||
|
<UCard>
|
||||||
|
<template #header>
|
||||||
|
Aufgabe erstellen
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Titel:"
|
||||||
|
class="mt-2"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
v-model="createTaskData.name"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Beschreibung:"
|
||||||
|
class="mt-2"
|
||||||
|
>
|
||||||
|
<UTextarea
|
||||||
|
v-model="createTaskData.description"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Kategorie:"
|
||||||
|
class="mt-2"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
:options="taskCategories"
|
||||||
|
v-model="createTaskData.categorie"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
label="Benutzer:"
|
||||||
|
class="mt-2"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
:options="usersForList"
|
||||||
|
v-model="createTaskData.users"
|
||||||
|
multiple
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<UButton
|
||||||
|
@click="createTask"
|
||||||
|
>
|
||||||
|
Erstellen
|
||||||
|
</UButton>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</UCard>
|
||||||
|
</UModal>
|
||||||
|
|
||||||
|
<UModal
|
||||||
|
v-model="showTaskModal"
|
||||||
|
>
|
||||||
|
<UCard>
|
||||||
|
<template #header>
|
||||||
|
{{taskData.attributes.name}}
|
||||||
|
</template>
|
||||||
|
<p>{{taskData.attributes.description}}</p>
|
||||||
|
<p>Erstellt am: {{taskData.attributes.createdAt}}</p>
|
||||||
|
<UBadge
|
||||||
|
v-for="user in taskData.attributes.users"
|
||||||
|
class="mr-2"
|
||||||
|
>
|
||||||
|
{{user}}
|
||||||
|
</UBadge>
|
||||||
|
<template #footer>
|
||||||
|
<UButton
|
||||||
|
@click="finishTask"
|
||||||
|
>
|
||||||
|
Erledigt
|
||||||
|
</UButton>
|
||||||
|
</template>
|
||||||
|
</UCard>
|
||||||
|
</UModal>
|
||||||
|
|
||||||
|
<div id="menuBar">
|
||||||
|
<UButton
|
||||||
|
class="mb-3 mr-3"
|
||||||
|
@click="showCreateTask = true"
|
||||||
|
>
|
||||||
|
+ Aufgabe
|
||||||
|
</UButton>
|
||||||
|
<USelectMenu
|
||||||
|
:options="usersForList"
|
||||||
|
v-model="usersSelected"
|
||||||
|
multiple
|
||||||
|
placeholder="Benutzer"
|
||||||
|
class="w-40"
|
||||||
|
v-on:change="filterTasks"
|
||||||
|
>
|
||||||
|
<template #label>
|
||||||
|
<span v-if="usersSelected.length" class="truncate">{{ usersSelected.join(', ') }}</span>
|
||||||
|
<span v-else>Benutzer auswählen</span>
|
||||||
|
</template>
|
||||||
|
</USelectMenu>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="taskCatList">
|
||||||
|
<div id="catNew">
|
||||||
|
<h3>Neue Aufgaben</h3>
|
||||||
|
<div class="taskScrollList">
|
||||||
|
<a
|
||||||
|
v-for="taskNew in refTasks.filter(task => task.attributes.categorie == 'Neu')"
|
||||||
|
@click="inspectTask(taskNew)"
|
||||||
|
>
|
||||||
|
<UCard class="listItem">
|
||||||
|
{{taskNew.attributes.name}}
|
||||||
|
<UBadge
|
||||||
|
v-for="user in taskNew.attributes.users"
|
||||||
|
class="mr-2"
|
||||||
|
>
|
||||||
|
{{user}}
|
||||||
|
</UBadge>
|
||||||
|
</UCard>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="catInProgress">
|
||||||
|
<h3>Aufgaben in Bearbeitung</h3>
|
||||||
|
<div class="taskScrollList">
|
||||||
|
<a
|
||||||
|
v-for="taskNew in refTasks.filter(task => task.attributes.categorie == 'In Bearbeitung')"
|
||||||
|
@click="inspectTask(taskNew)"
|
||||||
|
>
|
||||||
|
<UCard class="listItem">
|
||||||
|
{{taskNew.attributes.name}}
|
||||||
|
<UBadge
|
||||||
|
v-for="user in taskNew.attributes.users"
|
||||||
|
class="mr-2"
|
||||||
|
>
|
||||||
|
{{user}}
|
||||||
|
</UBadge>
|
||||||
|
</UCard>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="catUrgent">
|
||||||
|
<h3>Dringende Aufgaben</h3>
|
||||||
|
<div class="taskScrollList">
|
||||||
|
<a
|
||||||
|
v-for="taskNew in refTasks.filter(task => task.attributes.categorie == 'Dringend')"
|
||||||
|
@click="inspectTask(taskNew)"
|
||||||
|
>
|
||||||
|
<UCard class="listItem">
|
||||||
|
{{taskNew.attributes.name}}
|
||||||
|
<UBadge
|
||||||
|
v-for="user in taskNew.attributes.users"
|
||||||
|
class="mr-2"
|
||||||
|
>
|
||||||
|
{{user}}
|
||||||
|
</UBadge>
|
||||||
|
</UCard>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
|
||||||
|
const {find,create, update} = useStrapi4()
|
||||||
|
|
||||||
|
let tasks = (await find('tasks',{populate: "*"})).data
|
||||||
|
|
||||||
|
let refTasks = ref([])
|
||||||
|
|
||||||
|
|
||||||
|
const users = (await find('users',{populate: "*"}))
|
||||||
|
let usersForList = []
|
||||||
|
users.forEach(user => usersForList.push(user.username))
|
||||||
|
const usersSelected = ref([])
|
||||||
|
usersSelected.value = usersForList
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const showCreateTask = ref(false)
|
||||||
|
const taskCategories = ["Neu","In Bearbeitung", "Dringend"]
|
||||||
|
const createTaskData = ref({
|
||||||
|
name: "",
|
||||||
|
description: "",
|
||||||
|
categorie: "Neu",
|
||||||
|
users: []
|
||||||
|
})
|
||||||
|
|
||||||
|
const taskData = ref({})
|
||||||
|
const showTaskModal = ref(false)
|
||||||
|
|
||||||
|
const createTask = async () => {
|
||||||
|
await create('tasks', createTaskData.value)
|
||||||
|
showCreateTask.value = false
|
||||||
|
createTaskData.value = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateTask = async () => {
|
||||||
|
await update('tasks', taskData.value.id, taskData.value.attributes)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const inspectTask = (task) => {
|
||||||
|
taskData.value = task
|
||||||
|
showTaskModal.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const filterTasks = () => {
|
||||||
|
refTasks.value = tasks.filter(task => usersSelected.value.some(user => (task.attributes.users ? (task.attributes.users.includes(user)) : true )))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const finishTask = () => {
|
||||||
|
taskData.value.attributes.categorie = "Erledigt"
|
||||||
|
updateTask()
|
||||||
|
}
|
||||||
|
|
||||||
|
filterTasks()
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
#main {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: large;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menuBar {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
#taskCatList {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
width: 100%;
|
||||||
|
height: 65vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taskScrollList {
|
||||||
|
height: 60vh;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 3px
|
||||||
|
}
|
||||||
|
|
||||||
|
#catNew {
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
#catInProgress {
|
||||||
|
width: 30%;
|
||||||
|
border-left: 2px solid #69c350;
|
||||||
|
margin-left: 1em;
|
||||||
|
padding-left: 1em;
|
||||||
|
|
||||||
|
}
|
||||||
|
#catUrgent {
|
||||||
|
width: 30%;
|
||||||
|
border-left: 2px solid #69c350;
|
||||||
|
margin-left: 1em;
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
25
spaces/pages/timetracking.vue
Normal file
25
spaces/pages/timetracking.vue
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
definePageMeta({
|
||||||
|
middleware: "auth"
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<UButton class="controlButton" disabled>
|
||||||
|
Start
|
||||||
|
</UButton>
|
||||||
|
<UButton class="controlButton" disabled>
|
||||||
|
Stop
|
||||||
|
</UButton>
|
||||||
|
<UButton class="controlButton" disabled>
|
||||||
|
Pause
|
||||||
|
</UButton>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.controlButton {
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
72
spaces/pages/vendorinvoices/edit.vue
Normal file
72
spaces/pages/vendorinvoices/edit.vue
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<template>
|
||||||
|
<div id="main">
|
||||||
|
<UFormGroup label="Lieferant:" required>
|
||||||
|
<UInput />
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UFormGroup label="Rechnungsreferenz:" required>
|
||||||
|
<UInput />
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UFormGroup label="Rechnungsdatum:" required>
|
||||||
|
<UInput />
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
|
<UButton @click="vendorInvoiceData.lineItems.push({})">+ Reihe</UButton>
|
||||||
|
|
||||||
|
|
||||||
|
<div v-for="lineItem in vendorInvoiceData.lineItems" class="lineItemRow">
|
||||||
|
<UFormGroup label="Text:" required>
|
||||||
|
<UInput v-model="lineItem.text"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="Produkt:" required>
|
||||||
|
<UInput v-model="lineItem.productId"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="Projekt:" required>
|
||||||
|
<UInput v-model="lineItem.projectId"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="Anzahl:" required>
|
||||||
|
<UInput v-model="lineItem.quantity"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="Einheit:" required>
|
||||||
|
<UInput v-model="lineItem.unit"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="Einzelpreis:" required>
|
||||||
|
<UInput v-model="lineItem.unitPriceNet"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="USt:" required>
|
||||||
|
<UInput v-model="lineItem.vat"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="Rabatt:" required>
|
||||||
|
<UInput v-model="lineItem.discount"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="Buchungskonto:" required>
|
||||||
|
<UInput v-model="lineItem.skrAccountId"/>
|
||||||
|
</UFormGroup>
|
||||||
|
<UFormGroup label="Positionspreis:" required>
|
||||||
|
<UInput disabled/>
|
||||||
|
</UFormGroup>
|
||||||
|
</div>
|
||||||
|
{{vendorInvoiceData}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
let vendorInvoiceData = ref({
|
||||||
|
reference: "",
|
||||||
|
date: "",
|
||||||
|
vendorId: 0,
|
||||||
|
lineItems: []
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.lineItemRow {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
73
spaces/pages/vendorinvoices/index.vue
Normal file
73
spaces/pages/vendorinvoices/index.vue
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<template>
|
||||||
|
<div id="main">
|
||||||
|
<div id="left">
|
||||||
|
|
||||||
|
<router-link to="/vendorinvoices/edit"><UButton>+ Lieferantenrechnung</UButton></router-link>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a v-for="item in dataStore.getVendorInvoiceList" @click="selectItem(item)">
|
||||||
|
<UCard class="listItem">
|
||||||
|
<UBadge>{{item.id}}</UBadge> {{item.date}}
|
||||||
|
</UCard>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="right">
|
||||||
|
|
||||||
|
<UCard v-if="selectedItem.id">
|
||||||
|
<template #header>
|
||||||
|
<UBadge>{{selectedItem.id}}</UBadge> {{selectedItem.name}}
|
||||||
|
</template>
|
||||||
|
<UTable :rows="selectedItem.lineItems"></UTable>
|
||||||
|
{{selectedItem}}
|
||||||
|
|
||||||
|
|
||||||
|
</UCard>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
import {useDataStore} from "../../store/data";
|
||||||
|
import {storeToRefs} from "pinia"
|
||||||
|
|
||||||
|
|
||||||
|
const showCreateProject = ref(false)
|
||||||
|
const showCreateCustomer = ref(false)
|
||||||
|
const projectData = ref({})
|
||||||
|
|
||||||
|
|
||||||
|
const dataStore = useDataStore()
|
||||||
|
|
||||||
|
const {projects} = storeToRefs(dataStore)
|
||||||
|
const {addCustomer} = dataStore
|
||||||
|
const {addProject} = dataStore
|
||||||
|
let selectedItem = ref({})
|
||||||
|
|
||||||
|
const selectItem = (item) => {
|
||||||
|
selectedItem.value = item
|
||||||
|
console.log(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
#left {
|
||||||
|
width: 25vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
#right {
|
||||||
|
width: 60vw;
|
||||||
|
padding-left: 3vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
BIN
spaces/public/favicon.ico
Normal file
BIN
spaces/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
236
spaces/store/data.ts
Normal file
236
spaces/store/data.ts
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
import {defineStore} from 'pinia'
|
||||||
|
import {CustomerInfo, ProjectInfo, VendorInvoice, ProductInfo} from "@/misc/interfaces";
|
||||||
|
|
||||||
|
export const useDataStore = defineStore('dataStore', {
|
||||||
|
state: () => {
|
||||||
|
return {
|
||||||
|
customers: [
|
||||||
|
{
|
||||||
|
id: 10069,
|
||||||
|
name: "NOA Service GmbH",
|
||||||
|
addresses: [
|
||||||
|
{
|
||||||
|
type: "invoice",
|
||||||
|
street: "Oldenburger Str. ",
|
||||||
|
number: "52",
|
||||||
|
zip: 26340,
|
||||||
|
city: "Zetel"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
contacts: [
|
||||||
|
{
|
||||||
|
name: "Noa",
|
||||||
|
firstname: "Stefanie",
|
||||||
|
role: "Geschäftsführerin",
|
||||||
|
email: ""
|
||||||
|
}, {
|
||||||
|
name: "Kramer",
|
||||||
|
firstname: "Lena",
|
||||||
|
role: "",
|
||||||
|
email: ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 10083,
|
||||||
|
name: "Specht Reepsholt e.K.",
|
||||||
|
addresses: [
|
||||||
|
{
|
||||||
|
type: "invoice",
|
||||||
|
street: "Reepsholter Hauptstr. ",
|
||||||
|
number: "17",
|
||||||
|
zip: 26446,
|
||||||
|
city: "Reepsholt"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
contacts: [
|
||||||
|
{
|
||||||
|
name: "Specht",
|
||||||
|
firstname: "Oliver",
|
||||||
|
role: "",
|
||||||
|
email: ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 10023,
|
||||||
|
name: "M&K Nordsonne GmbH & Co. KG",
|
||||||
|
addresses: [
|
||||||
|
{
|
||||||
|
type: "invoice",
|
||||||
|
street: "Berghamm",
|
||||||
|
number: "1",
|
||||||
|
zip: 26434,
|
||||||
|
city: "Wangerland"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
contacts: [
|
||||||
|
{
|
||||||
|
name: "Mick",
|
||||||
|
firstname: "Martin",
|
||||||
|
role: "Geschäftsführer",
|
||||||
|
email: ""
|
||||||
|
}, {
|
||||||
|
name: "Obst",
|
||||||
|
firstname: "Yvonne",
|
||||||
|
role: "",
|
||||||
|
email: ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
] as CustomerInfo[],
|
||||||
|
projects: [
|
||||||
|
{
|
||||||
|
id: 1001,
|
||||||
|
name: "FRIOS052PV001",
|
||||||
|
customerId: 10069,
|
||||||
|
notes: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1002,
|
||||||
|
name: "WTMRH017PV001",
|
||||||
|
customerId: 10083,
|
||||||
|
notes: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1003,
|
||||||
|
name: "Kamerainstallation WHVAS19",
|
||||||
|
customerId: 10069,
|
||||||
|
notes: ""
|
||||||
|
}
|
||||||
|
] as ProjectInfo[],
|
||||||
|
vendorInvoices: [
|
||||||
|
{
|
||||||
|
id: 230001,
|
||||||
|
vendorId: 10001,
|
||||||
|
date: "2023-11-01",
|
||||||
|
reference: "2023-11-01-1000",
|
||||||
|
lineItems: [
|
||||||
|
{
|
||||||
|
pos: 0,
|
||||||
|
text: "Ja Solar",
|
||||||
|
projectId: 1001,
|
||||||
|
quantity: 10,
|
||||||
|
unit: "Stk",
|
||||||
|
unitPriceNet: 120.50,
|
||||||
|
vat: 19,
|
||||||
|
skrAccountId: 3400
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 230002,
|
||||||
|
vendorId: 10001,
|
||||||
|
date: "2023-10-29",
|
||||||
|
reference: "2023-11-01-1001",
|
||||||
|
lineItems: [
|
||||||
|
{
|
||||||
|
pos: 0,
|
||||||
|
productId: 10003,
|
||||||
|
projectId: 1003,
|
||||||
|
quantity: 3,
|
||||||
|
unit: "Stk",
|
||||||
|
unitPriceNet: 96.00,
|
||||||
|
vat: 19,
|
||||||
|
skrAccountId: 3400
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
] as VendorInvoice[],
|
||||||
|
products: [
|
||||||
|
{
|
||||||
|
id:10001,
|
||||||
|
name: "STP-10SE",
|
||||||
|
manufacturer: "SMA",
|
||||||
|
purchasePriceNet: 1500.00,
|
||||||
|
profitPercentage: 20,
|
||||||
|
retailPriceNet: 1800.00,
|
||||||
|
tags: ["pv","wechselrichter"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:10002,
|
||||||
|
name: "RLC-810A",
|
||||||
|
manufacturer: "Reolink",
|
||||||
|
purchasePriceNet: 80.00,
|
||||||
|
profitPercentage: 20,
|
||||||
|
retailPriceNet: 96.00,
|
||||||
|
tags: ["kamera","outdoor","lan","poe"],
|
||||||
|
optionalProductIds: [10003]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:10003,
|
||||||
|
name: "RLC-510WA",
|
||||||
|
manufacturer: "Reolink",
|
||||||
|
purchasePriceNet: 80.00,
|
||||||
|
profitPercentage: 20,
|
||||||
|
retailPriceNet: 96.00,
|
||||||
|
tags: ["kamera","outdoor","wlan"],
|
||||||
|
optionalProductIds: [10002]
|
||||||
|
}
|
||||||
|
] as ProductInfo[],
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
async getData(){
|
||||||
|
const {data} = await useFetch("/api/customers")
|
||||||
|
console.log(data)
|
||||||
|
// @ts-ignore
|
||||||
|
this.customers = data
|
||||||
|
|
||||||
|
},
|
||||||
|
addCustomer(value: CustomerInfo) {
|
||||||
|
this.customers.push(value)
|
||||||
|
},
|
||||||
|
addProject(value: ProjectInfo){
|
||||||
|
this.projects.push(value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getters: {
|
||||||
|
customerList(state){
|
||||||
|
return state.customers
|
||||||
|
},
|
||||||
|
customersForSelect(state){
|
||||||
|
return state.customers.map((customer:any) => {return {label: customer.name, value: customer.id}})
|
||||||
|
},
|
||||||
|
getCustomerById: (state) => (id:number) => state.customers.find((customer:any) => customer.id === id),
|
||||||
|
projectList(state){
|
||||||
|
return state.projects
|
||||||
|
},
|
||||||
|
getVendorInvoiceList: (state) => state.vendorInvoices,
|
||||||
|
getVendorInvoicesByProjectId: (state) => (id:number) => {
|
||||||
|
let invoices:any[] = []
|
||||||
|
|
||||||
|
state.vendorInvoices.forEach((invoice:any) => {
|
||||||
|
//Store Current Invoice Data
|
||||||
|
let temp:any = {
|
||||||
|
vendorInvoiceId: 0,
|
||||||
|
value: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check if Current Invoice Contains Relevant Data
|
||||||
|
if(invoice.lineItems.filter((lineItem:any) => lineItem.projectId === id).length > 0) {
|
||||||
|
console.log("in if")
|
||||||
|
temp.vendorInvoiceId = invoice.id
|
||||||
|
invoice.lineItems.filter((lineItem:any) => lineItem.projectId === id).forEach((lineItem:any) => {
|
||||||
|
console.log(temp)
|
||||||
|
temp.value = Number(temp.value) + lineItem.quantity * lineItem.unitPriceNet
|
||||||
|
console.log(lineItem)
|
||||||
|
})
|
||||||
|
|
||||||
|
temp.value = String(temp.value.toFixed(2)) + "€"
|
||||||
|
|
||||||
|
invoices.push(temp)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
return invoices
|
||||||
|
},
|
||||||
|
getProductsList: (state) => state.products
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
4
spaces/tsconfig.json
Normal file
4
spaces/tsconfig.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
// https://nuxt.com/docs/guide/concepts/typescript
|
||||||
|
"extends": "./.nuxt/tsconfig.json"
|
||||||
|
}
|
||||||
16
strapi/.editorconfig
Normal file
16
strapi/.editorconfig
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[{package.json,*.yml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
7
strapi/.env.example
Normal file
7
strapi/.env.example
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
HOST=0.0.0.0
|
||||||
|
PORT=1337
|
||||||
|
APP_KEYS="toBeModified1,toBeModified2"
|
||||||
|
API_TOKEN_SALT=tobemodified
|
||||||
|
ADMIN_JWT_SECRET=tobemodified
|
||||||
|
TRANSFER_TOKEN_SALT=tobemodified
|
||||||
|
JWT_SECRET=tobemodified
|
||||||
3
strapi/.eslintignore
Normal file
3
strapi/.eslintignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.cache
|
||||||
|
build
|
||||||
|
**/node_modules/**
|
||||||
27
strapi/.eslintrc
Normal file
27
strapi/.eslintrc
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"parser": "babel-eslint",
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"env": {
|
||||||
|
"commonjs": true,
|
||||||
|
"es6": true,
|
||||||
|
"node": true,
|
||||||
|
"browser": false
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"experimentalObjectRestSpread": true,
|
||||||
|
"jsx": false
|
||||||
|
},
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"strapi": true
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||||
|
"linebreak-style": ["error", "unix"],
|
||||||
|
"no-console": 0,
|
||||||
|
"quotes": ["error", "single"],
|
||||||
|
"semi": ["error", "always"]
|
||||||
|
}
|
||||||
|
}
|
||||||
114
strapi/.gitignore
vendored
Normal file
114
strapi/.gitignore
vendored
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
############################
|
||||||
|
# OS X
|
||||||
|
############################
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
Icon
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
._*
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Linux
|
||||||
|
############################
|
||||||
|
|
||||||
|
*~
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Windows
|
||||||
|
############################
|
||||||
|
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
Desktop.ini
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Packages
|
||||||
|
############################
|
||||||
|
|
||||||
|
*.7z
|
||||||
|
*.csv
|
||||||
|
*.dat
|
||||||
|
*.dmg
|
||||||
|
*.gz
|
||||||
|
*.iso
|
||||||
|
*.jar
|
||||||
|
*.rar
|
||||||
|
*.tar
|
||||||
|
*.zip
|
||||||
|
*.com
|
||||||
|
*.class
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.seed
|
||||||
|
*.so
|
||||||
|
*.swo
|
||||||
|
*.swp
|
||||||
|
*.swn
|
||||||
|
*.swm
|
||||||
|
*.out
|
||||||
|
*.pid
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Logs and databases
|
||||||
|
############################
|
||||||
|
|
||||||
|
.tmp
|
||||||
|
*.log
|
||||||
|
*.sql
|
||||||
|
*.sqlite
|
||||||
|
*.sqlite3
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Misc.
|
||||||
|
############################
|
||||||
|
|
||||||
|
*#
|
||||||
|
ssl
|
||||||
|
.idea
|
||||||
|
nbproject
|
||||||
|
public/uploads/*
|
||||||
|
!public/uploads/.gitkeep
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Node.js
|
||||||
|
############################
|
||||||
|
|
||||||
|
lib-cov
|
||||||
|
lcov.info
|
||||||
|
pids
|
||||||
|
logs
|
||||||
|
results
|
||||||
|
node_modules
|
||||||
|
.node_history
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Tests
|
||||||
|
############################
|
||||||
|
|
||||||
|
coverage
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Strapi
|
||||||
|
############################
|
||||||
|
|
||||||
|
.env
|
||||||
|
license.txt
|
||||||
|
exports
|
||||||
|
*.cache
|
||||||
|
dist
|
||||||
|
build
|
||||||
|
.strapi-updater.json
|
||||||
57
strapi/README.md
Normal file
57
strapi/README.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# 🚀 Getting started with Strapi
|
||||||
|
|
||||||
|
Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/dev-docs/cli) (CLI) which lets you scaffold and manage your project in seconds.
|
||||||
|
|
||||||
|
### `develop`
|
||||||
|
|
||||||
|
Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-develop)
|
||||||
|
|
||||||
|
```
|
||||||
|
npm run develop
|
||||||
|
# or
|
||||||
|
yarn develop
|
||||||
|
```
|
||||||
|
|
||||||
|
### `start`
|
||||||
|
|
||||||
|
Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-start)
|
||||||
|
|
||||||
|
```
|
||||||
|
npm run start
|
||||||
|
# or
|
||||||
|
yarn start
|
||||||
|
```
|
||||||
|
|
||||||
|
### `build`
|
||||||
|
|
||||||
|
Build your admin panel. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-build)
|
||||||
|
|
||||||
|
```
|
||||||
|
npm run build
|
||||||
|
# or
|
||||||
|
yarn build
|
||||||
|
```
|
||||||
|
|
||||||
|
## ⚙️ Deployment
|
||||||
|
|
||||||
|
Strapi gives you many possible deployment options for your project including [Strapi Cloud](https://cloud.strapi.io). Browse the [deployment section of the documentation](https://docs.strapi.io/dev-docs/deployment) to find the best solution for your use case.
|
||||||
|
|
||||||
|
## 📚 Learn more
|
||||||
|
|
||||||
|
- [Resource center](https://strapi.io/resource-center) - Strapi resource center.
|
||||||
|
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation.
|
||||||
|
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community.
|
||||||
|
- [Strapi blog](https://strapi.io/blog) - Official Strapi blog containing articles made by the Strapi team and the community.
|
||||||
|
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements.
|
||||||
|
|
||||||
|
Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome!
|
||||||
|
|
||||||
|
## ✨ Community
|
||||||
|
|
||||||
|
- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team.
|
||||||
|
- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
|
||||||
|
- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub>
|
||||||
17
strapi/config/admin.js
Normal file
17
strapi/config/admin.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
module.exports = ({ env }) => ({
|
||||||
|
auth: {
|
||||||
|
secret: env('ADMIN_JWT_SECRET'),
|
||||||
|
},
|
||||||
|
apiToken: {
|
||||||
|
salt: env('API_TOKEN_SALT'),
|
||||||
|
},
|
||||||
|
transfer: {
|
||||||
|
token: {
|
||||||
|
salt: env('TRANSFER_TOKEN_SALT'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
flags: {
|
||||||
|
nps: env.bool('FLAG_NPS', true),
|
||||||
|
promoteEE: env.bool('FLAG_PROMOTE_EE', true),
|
||||||
|
},
|
||||||
|
});
|
||||||
7
strapi/config/api.js
Normal file
7
strapi/config/api.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
module.exports = {
|
||||||
|
rest: {
|
||||||
|
defaultLimit: 25,
|
||||||
|
maxLimit: 100,
|
||||||
|
withCount: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
92
strapi/config/database.js
Normal file
92
strapi/config/database.js
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = ({ env }) => {
|
||||||
|
const client = env('DATABASE_CLIENT', 'sqlite');
|
||||||
|
|
||||||
|
const connections = {
|
||||||
|
mysql: {
|
||||||
|
connection: {
|
||||||
|
connectionString: env('DATABASE_URL'),
|
||||||
|
host: env('DATABASE_HOST', 'localhost'),
|
||||||
|
port: env.int('DATABASE_PORT', 3306),
|
||||||
|
database: env('DATABASE_NAME', 'strapi'),
|
||||||
|
user: env('DATABASE_USERNAME', 'strapi'),
|
||||||
|
password: env('DATABASE_PASSWORD', 'strapi'),
|
||||||
|
ssl: env.bool('DATABASE_SSL', false) && {
|
||||||
|
key: env('DATABASE_SSL_KEY', undefined),
|
||||||
|
cert: env('DATABASE_SSL_CERT', undefined),
|
||||||
|
ca: env('DATABASE_SSL_CA', undefined),
|
||||||
|
capath: env('DATABASE_SSL_CAPATH', undefined),
|
||||||
|
cipher: env('DATABASE_SSL_CIPHER', undefined),
|
||||||
|
rejectUnauthorized: env.bool(
|
||||||
|
'DATABASE_SSL_REJECT_UNAUTHORIZED',
|
||||||
|
true
|
||||||
|
),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
|
||||||
|
},
|
||||||
|
mysql2: {
|
||||||
|
connection: {
|
||||||
|
host: env('DATABASE_HOST', 'localhost'),
|
||||||
|
port: env.int('DATABASE_PORT', 3306),
|
||||||
|
database: env('DATABASE_NAME', 'strapi'),
|
||||||
|
user: env('DATABASE_USERNAME', 'strapi'),
|
||||||
|
password: env('DATABASE_PASSWORD', 'strapi'),
|
||||||
|
ssl: env.bool('DATABASE_SSL', false) && {
|
||||||
|
key: env('DATABASE_SSL_KEY', undefined),
|
||||||
|
cert: env('DATABASE_SSL_CERT', undefined),
|
||||||
|
ca: env('DATABASE_SSL_CA', undefined),
|
||||||
|
capath: env('DATABASE_SSL_CAPATH', undefined),
|
||||||
|
cipher: env('DATABASE_SSL_CIPHER', undefined),
|
||||||
|
rejectUnauthorized: env.bool(
|
||||||
|
'DATABASE_SSL_REJECT_UNAUTHORIZED',
|
||||||
|
true
|
||||||
|
),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
|
||||||
|
},
|
||||||
|
postgres: {
|
||||||
|
connection: {
|
||||||
|
connectionString: env('DATABASE_URL'),
|
||||||
|
host: env('DATABASE_HOST', 'localhost'),
|
||||||
|
port: env.int('DATABASE_PORT', 5432),
|
||||||
|
database: env('DATABASE_NAME', 'strapi'),
|
||||||
|
user: env('DATABASE_USERNAME', 'strapi'),
|
||||||
|
password: env('DATABASE_PASSWORD', 'strapi'),
|
||||||
|
ssl: env.bool('DATABASE_SSL', false) && {
|
||||||
|
key: env('DATABASE_SSL_KEY', undefined),
|
||||||
|
cert: env('DATABASE_SSL_CERT', undefined),
|
||||||
|
ca: env('DATABASE_SSL_CA', undefined),
|
||||||
|
capath: env('DATABASE_SSL_CAPATH', undefined),
|
||||||
|
cipher: env('DATABASE_SSL_CIPHER', undefined),
|
||||||
|
rejectUnauthorized: env.bool(
|
||||||
|
'DATABASE_SSL_REJECT_UNAUTHORIZED',
|
||||||
|
true
|
||||||
|
),
|
||||||
|
},
|
||||||
|
schema: env('DATABASE_SCHEMA', 'public'),
|
||||||
|
},
|
||||||
|
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
|
||||||
|
},
|
||||||
|
sqlite: {
|
||||||
|
connection: {
|
||||||
|
filename: path.join(
|
||||||
|
__dirname,
|
||||||
|
'..',
|
||||||
|
env('DATABASE_FILENAME', '.tmp/data.db')
|
||||||
|
),
|
||||||
|
},
|
||||||
|
useNullAsDefault: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
connection: {
|
||||||
|
client,
|
||||||
|
...connections[client],
|
||||||
|
acquireConnectionTimeout: env.int('DATABASE_CONNECTION_TIMEOUT', 60000),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
12
strapi/config/middlewares.js
Normal file
12
strapi/config/middlewares.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
module.exports = [
|
||||||
|
'strapi::errors',
|
||||||
|
'strapi::security',
|
||||||
|
'strapi::cors',
|
||||||
|
'strapi::poweredBy',
|
||||||
|
'strapi::logger',
|
||||||
|
'strapi::query',
|
||||||
|
'strapi::body',
|
||||||
|
'strapi::session',
|
||||||
|
'strapi::favicon',
|
||||||
|
'strapi::public',
|
||||||
|
];
|
||||||
10
strapi/config/server.js
Normal file
10
strapi/config/server.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
module.exports = ({ env }) => ({
|
||||||
|
host: env('HOST', '0.0.0.0'),
|
||||||
|
port: env.int('PORT', 1337),
|
||||||
|
app: {
|
||||||
|
keys: env.array('APP_KEYS'),
|
||||||
|
},
|
||||||
|
webhooks: {
|
||||||
|
populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false),
|
||||||
|
},
|
||||||
|
});
|
||||||
0
strapi/database/migrations/.gitkeep
Normal file
0
strapi/database/migrations/.gitkeep
Normal file
BIN
strapi/favicon.png
Normal file
BIN
strapi/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 497 B |
8
strapi/jsconfig.json
Normal file
8
strapi/jsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"moduleResolution": "nodenext",
|
||||||
|
"target": "ES2021",
|
||||||
|
"checkJs": true,
|
||||||
|
"allowJs": true
|
||||||
|
}
|
||||||
|
}
|
||||||
16350
strapi/package-lock.json
generated
Normal file
16350
strapi/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
29
strapi/package.json
Normal file
29
strapi/package.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"name": "strapi",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.1.0",
|
||||||
|
"description": "A Strapi application",
|
||||||
|
"scripts": {
|
||||||
|
"develop": "strapi develop",
|
||||||
|
"start": "strapi start",
|
||||||
|
"build": "strapi build",
|
||||||
|
"strapi": "strapi"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@strapi/plugin-i18n": "4.15.0",
|
||||||
|
"@strapi/plugin-users-permissions": "4.15.0",
|
||||||
|
"@strapi/strapi": "4.15.0",
|
||||||
|
"better-sqlite3": "8.6.0"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"name": "A Strapi developer"
|
||||||
|
},
|
||||||
|
"strapi": {
|
||||||
|
"uuid": "8bfc6dcb-22af-44e6-a2cf-62bab851e57c"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0 <=20.x.x",
|
||||||
|
"npm": ">=6.0.0"
|
||||||
|
},
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
3
strapi/public/robots.txt
Normal file
3
strapi/public/robots.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# To prevent search engines from seeing the site altogether, uncomment the next two lines:
|
||||||
|
# User-Agent: *
|
||||||
|
# Disallow: /
|
||||||
0
strapi/public/uploads/.gitkeep
Normal file
0
strapi/public/uploads/.gitkeep
Normal file
39
strapi/src/admin/app.example.js
Normal file
39
strapi/src/admin/app.example.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
const config = {
|
||||||
|
locales: [
|
||||||
|
// 'ar',
|
||||||
|
// 'fr',
|
||||||
|
// 'cs',
|
||||||
|
// 'de',
|
||||||
|
// 'dk',
|
||||||
|
// 'es',
|
||||||
|
// 'he',
|
||||||
|
// 'id',
|
||||||
|
// 'it',
|
||||||
|
// 'ja',
|
||||||
|
// 'ko',
|
||||||
|
// 'ms',
|
||||||
|
// 'nl',
|
||||||
|
// 'no',
|
||||||
|
// 'pl',
|
||||||
|
// 'pt-BR',
|
||||||
|
// 'pt',
|
||||||
|
// 'ru',
|
||||||
|
// 'sk',
|
||||||
|
// 'sv',
|
||||||
|
// 'th',
|
||||||
|
// 'tr',
|
||||||
|
// 'uk',
|
||||||
|
// 'vi',
|
||||||
|
// 'zh-Hans',
|
||||||
|
// 'zh',
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const bootstrap = (app) => {
|
||||||
|
console.log(app);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
config,
|
||||||
|
bootstrap,
|
||||||
|
};
|
||||||
9
strapi/src/admin/webpack.config.example.js
Normal file
9
strapi/src/admin/webpack.config.example.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/* eslint-disable no-unused-vars */
|
||||||
|
module.exports = (config, webpack) => {
|
||||||
|
// Note: we provide webpack above so you should not `require` it
|
||||||
|
// Perform customizations to webpack config
|
||||||
|
// Important: return the modified config
|
||||||
|
return config;
|
||||||
|
};
|
||||||
0
strapi/src/api/.gitkeep
Normal file
0
strapi/src/api/.gitkeep
Normal file
40
strapi/src/api/contact/content-types/contact/schema.json
Normal file
40
strapi/src/api/contact/content-types/contact/schema.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "contacts",
|
||||||
|
"info": {
|
||||||
|
"singularName": "contact",
|
||||||
|
"pluralName": "contacts",
|
||||||
|
"displayName": "Contacts",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"firstName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "email"
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"customer": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "manyToOne",
|
||||||
|
"target": "api::customer.customer",
|
||||||
|
"inversedBy": "contacts"
|
||||||
|
},
|
||||||
|
"vendor": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "manyToOne",
|
||||||
|
"target": "api::vendor.vendor",
|
||||||
|
"inversedBy": "contacts"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
strapi/src/api/contact/controllers/contact.js
Normal file
9
strapi/src/api/contact/controllers/contact.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* contact controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::contact.contact');
|
||||||
9
strapi/src/api/contact/routes/contact.js
Normal file
9
strapi/src/api/contact/routes/contact.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* contact router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::contact.contact');
|
||||||
9
strapi/src/api/contact/services/contact.js
Normal file
9
strapi/src/api/contact/services/contact.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* contact service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::contact.contact');
|
||||||
34
strapi/src/api/customer/content-types/customer/schema.json
Normal file
34
strapi/src/api/customer/content-types/customer/schema.json
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "customers",
|
||||||
|
"info": {
|
||||||
|
"singularName": "customer",
|
||||||
|
"pluralName": "customers",
|
||||||
|
"displayName": "Customers",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"contacts": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "oneToMany",
|
||||||
|
"target": "api::contact.contact",
|
||||||
|
"mappedBy": "customer"
|
||||||
|
},
|
||||||
|
"customerNumber": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"projects": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "oneToMany",
|
||||||
|
"target": "api::project.project",
|
||||||
|
"mappedBy": "customer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
strapi/src/api/customer/controllers/customer.js
Normal file
9
strapi/src/api/customer/controllers/customer.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* customer controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::customer.customer');
|
||||||
9
strapi/src/api/customer/routes/customer.js
Normal file
9
strapi/src/api/customer/routes/customer.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* customer router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::customer.customer');
|
||||||
9
strapi/src/api/customer/services/customer.js
Normal file
9
strapi/src/api/customer/services/customer.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* customer service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::customer.customer');
|
||||||
44
strapi/src/api/document/content-types/document/schema.json
Normal file
44
strapi/src/api/document/content-types/document/schema.json
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "documents",
|
||||||
|
"info": {
|
||||||
|
"singularName": "document",
|
||||||
|
"pluralName": "documents",
|
||||||
|
"displayName": "Documents",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file": {
|
||||||
|
"type": "media",
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"allowedTypes": [
|
||||||
|
"images",
|
||||||
|
"files",
|
||||||
|
"videos",
|
||||||
|
"audios"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "oneToOne",
|
||||||
|
"target": "api::project.project"
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"type": "json",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"state": {
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"default": "Eingang"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
strapi/src/api/document/controllers/document.js
Normal file
9
strapi/src/api/document/controllers/document.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* document controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::document.document');
|
||||||
9
strapi/src/api/document/routes/document.js
Normal file
9
strapi/src/api/document/routes/document.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* document router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::document.document');
|
||||||
9
strapi/src/api/document/services/document.js
Normal file
9
strapi/src/api/document/services/document.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* document service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::document.document');
|
||||||
18
strapi/src/api/form/content-types/form/schema.json
Normal file
18
strapi/src/api/form/content-types/form/schema.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "forms",
|
||||||
|
"info": {
|
||||||
|
"singularName": "form",
|
||||||
|
"pluralName": "forms",
|
||||||
|
"displayName": "Forms"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": true
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"fields": {
|
||||||
|
"type": "json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
strapi/src/api/form/controllers/form.js
Normal file
9
strapi/src/api/form/controllers/form.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::form.form');
|
||||||
9
strapi/src/api/form/routes/form.js
Normal file
9
strapi/src/api/form/routes/form.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::form.form');
|
||||||
9
strapi/src/api/form/services/form.js
Normal file
9
strapi/src/api/form/services/form.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::form.form');
|
||||||
25
strapi/src/api/movement/content-types/movement/schema.json
Normal file
25
strapi/src/api/movement/content-types/movement/schema.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "movements",
|
||||||
|
"info": {
|
||||||
|
"singularName": "movement",
|
||||||
|
"pluralName": "movements",
|
||||||
|
"displayName": "Movements",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": true
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"productId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"spaceId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"quantity": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
strapi/src/api/movement/controllers/movement.js
Normal file
9
strapi/src/api/movement/controllers/movement.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* movement controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::movement.movement');
|
||||||
9
strapi/src/api/movement/routes/movement.js
Normal file
9
strapi/src/api/movement/routes/movement.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* movement router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::movement.movement');
|
||||||
9
strapi/src/api/movement/services/movement.js
Normal file
9
strapi/src/api/movement/services/movement.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* movement service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::movement.movement');
|
||||||
56
strapi/src/api/product/content-types/product/schema.json
Normal file
56
strapi/src/api/product/content-types/product/schema.json
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "products",
|
||||||
|
"info": {
|
||||||
|
"singularName": "product",
|
||||||
|
"pluralName": "products",
|
||||||
|
"displayName": "Products",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"manufacturer": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"purchasePriceNet": {
|
||||||
|
"type": "decimal"
|
||||||
|
},
|
||||||
|
"profitPercentage": {
|
||||||
|
"type": "decimal"
|
||||||
|
},
|
||||||
|
"retailPriceNet": {
|
||||||
|
"type": "decimal"
|
||||||
|
},
|
||||||
|
"optionalProducts": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "oneToMany",
|
||||||
|
"target": "api::product.product"
|
||||||
|
},
|
||||||
|
"image": {
|
||||||
|
"type": "media",
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
|
"allowedTypes": [
|
||||||
|
"images",
|
||||||
|
"files",
|
||||||
|
"videos",
|
||||||
|
"audios"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"type": "json"
|
||||||
|
},
|
||||||
|
"history": {
|
||||||
|
"type": "json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
strapi/src/api/product/controllers/product.js
Normal file
9
strapi/src/api/product/controllers/product.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* product controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::product.product');
|
||||||
9
strapi/src/api/product/routes/product.js
Normal file
9
strapi/src/api/product/routes/product.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* product router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::product.product');
|
||||||
9
strapi/src/api/product/services/product.js
Normal file
9
strapi/src/api/product/services/product.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* product service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::product.product');
|
||||||
31
strapi/src/api/project/content-types/project/schema.json
Normal file
31
strapi/src/api/project/content-types/project/schema.json
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "projects",
|
||||||
|
"info": {
|
||||||
|
"singularName": "project",
|
||||||
|
"pluralName": "projects",
|
||||||
|
"displayName": "Projects",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"notes": {
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
"customer": {
|
||||||
|
"type": "relation",
|
||||||
|
"relation": "manyToOne",
|
||||||
|
"target": "api::customer.customer",
|
||||||
|
"inversedBy": "projects"
|
||||||
|
},
|
||||||
|
"phases": {
|
||||||
|
"type": "json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
strapi/src/api/project/controllers/project.js
Normal file
9
strapi/src/api/project/controllers/project.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* project controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::project.project');
|
||||||
9
strapi/src/api/project/routes/project.js
Normal file
9
strapi/src/api/project/routes/project.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* project router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::project.project');
|
||||||
9
strapi/src/api/project/services/project.js
Normal file
9
strapi/src/api/project/services/project.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* project service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::project.project');
|
||||||
26
strapi/src/api/space/content-types/space/schema.json
Normal file
26
strapi/src/api/space/content-types/space/schema.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "spaces",
|
||||||
|
"info": {
|
||||||
|
"singularName": "space",
|
||||||
|
"pluralName": "spaces",
|
||||||
|
"displayName": "Spaces",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"description": {
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"spaceNumber": {
|
||||||
|
"type": "string",
|
||||||
|
"unique": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
strapi/src/api/space/controllers/space.js
Normal file
9
strapi/src/api/space/controllers/space.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* space controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::space.space');
|
||||||
9
strapi/src/api/space/routes/space.js
Normal file
9
strapi/src/api/space/routes/space.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* space router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::space.space');
|
||||||
9
strapi/src/api/space/services/space.js
Normal file
9
strapi/src/api/space/services/space.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* space service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::space.space');
|
||||||
28
strapi/src/api/task/content-types/task/schema.json
Normal file
28
strapi/src/api/task/content-types/task/schema.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "tasks",
|
||||||
|
"info": {
|
||||||
|
"singularName": "task",
|
||||||
|
"pluralName": "tasks",
|
||||||
|
"displayName": "Tasks",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": false
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
"categorie": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"users": {
|
||||||
|
"type": "json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
strapi/src/api/task/controllers/task.js
Normal file
9
strapi/src/api/task/controllers/task.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* task controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreController } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreController('api::task.task');
|
||||||
9
strapi/src/api/task/routes/task.js
Normal file
9
strapi/src/api/task/routes/task.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* task router
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreRouter('api::task.task');
|
||||||
9
strapi/src/api/task/services/task.js
Normal file
9
strapi/src/api/task/services/task.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* task service
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { createCoreService } = require('@strapi/strapi').factories;
|
||||||
|
|
||||||
|
module.exports = createCoreService('api::task.task');
|
||||||
21
strapi/src/api/tenant/content-types/tenant/schema.json
Normal file
21
strapi/src/api/tenant/content-types/tenant/schema.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "tenants",
|
||||||
|
"info": {
|
||||||
|
"singularName": "tenant",
|
||||||
|
"pluralName": "tenants",
|
||||||
|
"displayName": "Tenants"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"draftAndPublish": true
|
||||||
|
},
|
||||||
|
"pluginOptions": {},
|
||||||
|
"attributes": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"short": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user