Compare commits

...

No commits in common. 'wuff' and 'test1' have entirely different histories.
wuff ... test1

  1. 13
      .editorconfig
  2. 15
      .eslintrc.js
  3. 90
      .gitignore
  4. 3
      .vscode/settings.json
  5. 14
      Dockerfile
  6. 69
      README.md
  7. 35
      assets/css/styles.css
  8. 32
      components/Header.vue
  9. 11
      components/NuxtLogo.vue
  10. 123
      components/Typ.vue
  11. 6
      layouts/default.vue
  12. 65
      nuxt.config.js
  13. 18355
      package-lock.json
  14. 35
      package.json
  15. 11
      pages/index.vue
  16. 7
      pages/typ.vue
  17. BIN
      static/favicon.ico
  18. 10
      store/README.md
  19. 37
      tsconfig.json

13
.editorconfig

@ -0,0 +1,13 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

15
.eslintrc.js

@ -0,0 +1,15 @@
module.exports = {
root: true,
env: {
browser: true,
node: true
},
extends: [
'@nuxtjs/eslint-config-typescript',
'plugin:nuxt/recommended'
],
plugins: [
],
// add your custom rules here
rules: {}
}

90
.gitignore vendored

@ -0,0 +1,90 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE / Editor
.idea
# Service worker
sw.*
# macOS
.DS_Store
# Vim swap files
*.swp

3
.vscode/settings.json vendored

@ -0,0 +1,3 @@
{
"nuxt.isNuxtApp": true
}

14
Dockerfile

@ -0,0 +1,14 @@
FROM node:18.16-alpine
WORKDIR /app
RUN apk update && apk upgrade
RUN apk add git
COPY . .
RUN npm install
RUN npm run build
EXPOSE 80
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=80
CMD ["npm", "start"]

69
README.md

@ -0,0 +1,69 @@
# wdm-web
## Build Setup
```bash
# install dependencies
$ npm install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm run start
# generate static project
$ npm run generate
```
For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org).
## Special Directories
You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality.
### `assets`
The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/assets).
### `components`
The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/components).
### `layouts`
Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/layouts).
### `pages`
This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/get-started/routing).
### `plugins`
The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins).
### `static`
This directory contains your static files. Each file inside this directory is mapped to `/`.
Example: `/static/robots.txt` is mapped as `/robots.txt`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/static).
### `store`
This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store).

35
assets/css/styles.css

@ -0,0 +1,35 @@
.contentcontainer {
margin: 20px;
width: 1600;
}
body {
margin: 0 auto;
}
.resTable {
border: solid 2px;
border-radius: 2px;
background-color: #8c8c8c;
padding: 10px;
margin: 10px;
text-align: center;
}
.resTable td {
padding: 10px;
}
.resTable th {
padding: 10px;
}
.resTable tr {
padding: 10px;
border-top: 1px solid;
}
ul {
list-style-type: none;
}

32
components/Header.vue

@ -0,0 +1,32 @@
<template>
<b-navbar toggleable="lg" sticky type="dark" variant="primary">
<b-navbar-brand href="https://sparg.com">spargcom IT</b-navbar-brand>
<b-nav-text class="ntext">WardrobeMaster Version 0.1.0</b-nav-text>
<b-collapse id="nav-collapse" is-nav>
<b-navbar-nav>
<b-nav-item to="/" :active='$route.name == "index"'>Home</b-nav-item>
<b-nav-item to="/typ" :active='$route.name == "Typ"'>Kleidungs-Typ</b-nav-item>
<b-nav-item to="/tools" :active='$route.name == "tools"'>Tools</b-nav-item>
<b-nav-item to="/ablOrt" :active='$route.name == "ablOrt"'>Ablageort</b-nav-item>
<b-nav-item to="/zert" :active='$route.name == "zert"'>Zertifikate</b-nav-item>
</b-navbar-nav>
</b-collapse>
</b-navbar>
</template>
<script>
// console.log($route.name);
</script>
<style>
.navbar-dark {
background-color: #f7883f!important;
}
.ntext {
color: #baf0ba!important;
font-size: small;
font-weight: 400;
}
</style>

11
components/NuxtLogo.vue

@ -0,0 +1,11 @@
<template>
<svg class="nuxt-logo" viewBox="0 0 45 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24.7203 29.704H41.1008C41.6211 29.7041 42.1322 29.5669 42.5828 29.3061C43.0334 29.0454 43.4075 28.6704 43.6675 28.2188C43.9275 27.7672 44.0643 27.2549 44.0641 26.7335C44.0639 26.2121 43.9266 25.6999 43.6662 25.2485L32.6655 6.15312C32.4055 5.70162 32.0315 5.32667 31.581 5.06598C31.1305 4.8053 30.6195 4.66805 30.0994 4.66805C29.5792 4.66805 29.0682 4.8053 28.6177 5.06598C28.1672 5.32667 27.7932 5.70162 27.5332 6.15312L24.7203 11.039L19.2208 1.48485C18.9606 1.03338 18.5864 0.658493 18.1358 0.397853C17.6852 0.137213 17.1741 0 16.6538 0C16.1336 0 15.6225 0.137213 15.1719 0.397853C14.7213 0.658493 14.3471 1.03338 14.0868 1.48485L0.397874 25.2485C0.137452 25.6999 0.000226653 26.2121 2.8053e-07 26.7335C-0.000226092 27.2549 0.136554 27.7672 0.396584 28.2188C0.656614 28.6704 1.03072 29.0454 1.48129 29.3061C1.93185 29.5669 2.44298 29.7041 2.96326 29.704H13.2456C17.3195 29.704 20.3239 27.9106 22.3912 24.4118L27.4102 15.7008L30.0986 11.039L38.1667 25.0422H27.4102L24.7203 29.704ZM13.0779 25.0374L5.9022 25.0358L16.6586 6.36589L22.0257 15.7008L18.4322 21.9401C17.0593 24.2103 15.4996 25.0374 13.0779 25.0374Z" fill="#00DC82" />
</svg>
</template>
<style>
.nuxt-logo {
height: 180px;
}
</style>

123
components/Typ.vue

@ -0,0 +1,123 @@
<template>
<div>
<div style="margin-bottom: 20px;">
<b-form @reset="onReset">
<b-form-group
id="ip-g-1"
label="Bezeichnung:"
label-for="bezeichnung"
description="Bezeichnung des Kleidungs-Typs:"
>
<b-form-input
id="bezeichnung"
v-model="form.bezeichnung"
required
placeholder="Bezeichnung eingeben"
size="50"
>
</b-form-input>
</b-form-group>
<b-button variant="primary" @click="onSubmit()">Neu eintragen</b-button>
<b-button variant="secondary" @click="onUpdate()">Aktualisieren</b-button>
<b-button variant="danger" @click="onDelete()">Löschen</b-button>
<b-button type="reset" variant="danger">Reset</b-button>
</b-form>
</div>
<div>
<b-table striped hover bordered head-variant="dark" selectable :select-mode="selectMode" :items="certs" :fields="fields" @row-selected="onRowSelect"></b-table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
selectMode: 'single',
componentKey: 0,
certs: [],
form:{
id: "",
bezeichnung: "",
},
fields: [
{
key: 'id',
sortable: true
},
{
key: 'bezeichnung',
sortable: true
},
]
}
},
created() {
this.fetch();
}
,
methods: {
onRowSelect(items) {
this.selected = items;
// alert(JSON.stringify(this.selected));
this.onFill(this.selected);
},
async fetch() {
console.log("fetching...");
this.certs = await fetch(
'http://ubodroid-2:8080/api/v1/typ'
).then(res => res.json())
},
async onSubmit() {
// event.preventDefault();
this.form.id = "";
console.log("submitting...");
await this.$http.$post('http://ubodroid-2:8080/api/v1/typ', this.form);
// return result;
// this.subm(this.form);
this.fetch();
},
async onUpdate() {
// event.preventDefault();
console.log("updating...");
console.log("Laufzeit: ", this.form.laufzeit)
console.log(this.form);
await this.$http.$put('http://ubodroid-2:8080/api/v1/typ/'+this.form.id, this.form);
// return result;
// this.subm(this.form);
this.fetch();
},
async onDelete() {
// event.preventDefault();
console.log("updating...");
await this.$http.$delete('http://ubodroid-2:8080/api/v1/typ/'+this.form.id);
// return result;
// this.subm(this.form);
this.fetch();
},
onReset(event) {
event.preventDefault();
this.form.bezeichnung = '';
},
onFill(item) {
// alert(JSON.stringify(item));
if(item.length !== 0) {
this.form.bezeichnung = item[0].bezeichnung;
this.form.id = item[0].id;
console.log(JSON.stringify(item[0].bezeichnung));
}
}
}
}
</script>

6
layouts/default.vue

@ -0,0 +1,6 @@
<template>
<div>
<Header />
<Nuxt />
</div>
</template>

65
nuxt.config.js

@ -0,0 +1,65 @@
export default {
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
ssr: false,
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'wdm-web',
htmlAttrs: {
lang: 'en'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
'~/assets/css/styles.css'
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/typescript
'@nuxt/typescript-build'
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/bootstrap
'bootstrap-vue/nuxt',
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
'@nuxt/http'
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {
// Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
//baseURL: '/',
//browserBaseURL: '/',
proxy: true
},
proxy: {
'/api/v1/': { target: 'http://10.1.1.13:8081/', changeOrigin: true },
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
}
}

18355
package-lock.json generated

File diff suppressed because it is too large Load Diff

35
package.json

@ -0,0 +1,35 @@
{
"name": "wdm-web",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint:js": "eslint --ext \".js,.ts,.vue\" --ignore-path .gitignore .",
"lint": "npm run lint:js",
"lintfix": "npm run lint:js -- --fix"
},
"dependencies": {
"@nuxt/http": "^0.6.4",
"@nuxtjs/axios": "^5.13.6",
"bootstrap": "^4.6.2",
"bootstrap-vue": "^2.22.0",
"core-js": "^3.25.3",
"nuxt": "^2.15.8",
"vue": "^2.7.10",
"vue-server-renderer": "^2.7.10",
"vue-template-compiler": "^2.7.10"
},
"devDependencies": {
"@babel/eslint-parser": "^7.19.1",
"@nuxt/types": "^2.15.8",
"@nuxt/typescript-build": "^2.1.0",
"@nuxtjs/eslint-config-typescript": "^11.0.0",
"@nuxtjs/eslint-module": "^3.1.0",
"eslint": "^8.24.0",
"eslint-plugin-nuxt": "^4.0.0",
"eslint-plugin-vue": "^9.5.1"
}
}

11
pages/index.vue

@ -0,0 +1,11 @@
<template>
<h1>HOME</h1>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
name: 'IndexPage'
})
</script>

7
pages/typ.vue

@ -0,0 +1,7 @@
<template>
<div class="contentcontainer">
<h1>Typ</h1>
<Typ />
</div>
</template>

BIN
static/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

10
store/README.md

@ -0,0 +1,10 @@
# STORE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Vuex Store files.
Vuex Store option is implemented in the Nuxt.js framework.
Creating a file in this directory automatically activates the option in the framework.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).

37
tsconfig.json

@ -0,0 +1,37 @@
{
"compilerOptions": {
"target": "ES2018",
"module": "ESNext",
"moduleResolution": "Node",
"lib": [
"ESNext",
"ESNext.AsyncIterable",
"DOM"
],
"esModuleInterop": true,
"allowJs": true,
"sourceMap": true,
"strict": true,
"noEmit": true,
"experimentalDecorators": true,
"baseUrl": ".",
"paths": {
"~/*": [
"./*"
],
"@/*": [
"./*"
]
},
"types": [
"@nuxt/types",
"@nuxtjs/axios",
"@types/node"
]
},
"exclude": [
"node_modules",
".nuxt",
"dist"
]
}
Loading…
Cancel
Save