Skip to content

Commit

Permalink
Merge Shipping Order (#98)
Browse files Browse the repository at this point in the history
* use useForm where it seems useful

* Fix: No support for ghcr.io in github actions

* Change: Workflow runs on pull request only

* Change: Ansible should use git docker package

* BUGFIX: Build errors

* Update documentation in deployment file

* Fix pull_request double

* Added build step in dockerfile

* Change: Docker image name

* update model in services

* move model into one file

* links instead of router push

* Changed node image to alpine and error fix

* Fix: Inbox view and labels. Bugs #56 also #47

* Updated start script with relative path alpine

* Reset image to node14 because of node env issue

* Address #57 and fix wrong component name

* Refactoring navigation extracted to own component

* Added shipping order form link #18

* Fixes #59

* Add basic page and form for shipment tracking

* Basis-layout ohne Abfrage

* Minor UI changes

* Wired inputs and status widget to query params

* Dockerignore ergänzt #47

* Fix: Added Add Goods Button. Bug #47

* Fixed imports

* Added mockups auditor view

* Added drawio file as diagram source for wireframes

* fixed Add-Goods-Button

* Mockups updated and extended with alerts screen

* Added jest as test framework

* Created Modules

* Fix Abhängigkeiten babel-jest und config-Dateien

* Changed transaction ordering to match story

* Fixed wrong wireframe

* Times adjusted to reflect realistic scenario

Co-authored-by: Andreas Huber <j7ha0873@unibw.de>
Co-authored-by: Razvan Hrestic <razvanhrestic@INF8-MBHRESTIC.local>
Co-authored-by: Razvan Hrestic <razvanhrestic@INF8-MBHRESTIC.fritz.box>
Co-authored-by: devF4B1J <fabian.jost.1998@googlemail.com>
  • Loading branch information
5 people authored Dec 2, 2021
1 parent f516ab8 commit 59e53c0
Show file tree
Hide file tree
Showing 79 changed files with 26,308 additions and 4,344 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["next/babel"]
}
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.next/
node_modules/
Dockerfile
.env*
.env*
*test*
14 changes: 6 additions & 8 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Docker

on:
push:
pull_request:
types: [opened , synchronize]
# Publish `dev` as Docker `latest` image.
branches:
- dev
Expand All @@ -10,12 +11,8 @@ on:
tags:
- v*

# Run tests for any PRs.
pull_request:

env:
# TODO: Change variable to your image's name.
IMAGE_NAME: image
IMAGE_NAME: producerdashboard

jobs:
# Run tests.
Expand All @@ -37,6 +34,7 @@ jobs:
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
# The preview repository (ghcr.io) is not yet available
push:
# Ensure test job passes before pushing image.
needs: test
Expand All @@ -50,11 +48,11 @@ jobs:
run: docker build . --file Dockerfile --tag $IMAGE_NAME

- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin

- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository }}/$IMAGE_NAME
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ COPY ["package.json", "package-lock.json*", "./"]

# RUN rm -rf node_modules
RUN rm -rf .next && rm package-lock.json
RUN apt-get update && apt install git -y && git --version && npm install --silent
RUN npm install --silent
# We need to build the dashboard itself so if there are any errors the docker image publishing will fail
RUN npm run build
RUN chmod u+x ./start.sh
EXPOSE 3000

Expand Down
2 changes: 1 addition & 1 deletion deployment/containerenv.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NEXT_PUBLIC_COMPANY_NAME=BrangusMSP
NEXT_PUBLIC_COMPANY_NAME=DeoniMSP
NEXT_PUBLIC_API_URL=http://137.193.65.47:8080
NEXT_PUBLIC_USE_MOCKED_BACKEND=FALSE
NEXT_PUBLIC_PROMETHEUS_API_URL=http://137.193.65.44:9090
6 changes: 4 additions & 2 deletions deployment/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
- name: "Login to GitHub GHCR repository"
become: yes
become_user: deploy
command: "docker login ghcr.io -u {{ ghcr_user }} --password-stdin"
command: "docker login docker.pkg.github.com -u {{ ghcr_user }} --password-stdin"
args:
stdin: "{{ ghcr_password }}"

Expand All @@ -127,9 +127,11 @@
become_user: deploy
docker_container:
name: deoni-dashboard
image: ghcr.io/codingsincethe80s/producerdashboard:dev-latest
image: docker.pkg.github.com/nutrisafe-dlt/producer-dashboard/producerdashboard:merge
state: started
recreate: yes
auto_remove: yes
pull: yes
container_default_behavior: compatibility
env_file: /home/deploy/containerenv.prod
networks:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions documentation/AuditorView.drawio

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
collectCoverageFrom: [
'**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
],
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': './node_modules/babel-jest'
},
transformIgnorePatterns: [
'/node_modules/',
'^.+\\.module\\.(css|sass|scss)$',
],
moduleNameMapper: {
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
},
}
Loading

0 comments on commit 59e53c0

Please sign in to comment.