From 3658372271f194043567c748793a286662242ab7 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 25 Nov 2025 17:09:11 +0100 Subject: [PATCH 01/40] intermediate commit. optical adjustments to mass edit ... functional adjustments pending --- .gitea/workflows/auto-tag.yml | 99 +++ src/frontend/index.html | 2 +- src/frontend/src/App.vue | 2 +- src/frontend/src/components/UI/BasicBadge.vue | 14 +- src/frontend/src/components/UI/Checkbox.vue | 4 + .../src/components/UI/CircleBadge.vue | 127 ++++ .../layout/bulkedit/BulkEditRow.vue | 654 ++++++++++++------ .../calculation/CalculationListItem.vue | 3 +- .../components/layout/edit/MaterialEdit.vue | 7 +- .../components/layout/edit/PackagingEdit.vue | 15 + .../src/components/layout/edit/PriceEdit.vue | 35 +- src/frontend/src/main.js | 9 +- .../src/pages/CalculationMassEdit.vue | 107 ++- .../src/pages/CalculationSingleEdit.vue | 7 + src/frontend/src/store/notification.js | 2 +- src/frontend/src/store/premiseEdit.js | 152 ++-- .../controller/GlobalExceptionHandler.java | 2 +- .../premise/DestinationRepository.java | 5 +- .../lcc/service/access/PremisesService.java | 1 - .../bulk/BulkOperationExecutionService.java | 18 +- .../excelMapper/MaterialFastExcelMapper.java | 14 +- 21 files changed, 934 insertions(+), 345 deletions(-) create mode 100644 .gitea/workflows/auto-tag.yml create mode 100644 src/frontend/src/components/UI/CircleBadge.vue diff --git a/.gitea/workflows/auto-tag.yml b/.gitea/workflows/auto-tag.yml new file mode 100644 index 0000000..3ffc041 --- /dev/null +++ b/.gitea/workflows/auto-tag.yml @@ -0,0 +1,99 @@ +name: Auto-Tag Release + +on: + push: + branches: + - main + +jobs: + tag-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Alle Tags holen + + - name: Determine version bump + id: bump_type + run: | + # Hole die letzten Commits seit dem letzten Tag + LATEST_TAG=$(git tag -l "v*" --sort=-v:refname | head -n 1) + + if [ -z "$LATEST_TAG" ]; then + echo "bump=minor" >> $GITHUB_OUTPUT + echo "Kein Tag vorhanden, starte mit minor" + exit 0 + fi + + # Analysiere Commits seit letztem Tag + COMMITS=$(git log ${LATEST_TAG}..HEAD --pretty=format:"%s") + + echo "=== Commits seit ${LATEST_TAG} ===" + echo "$COMMITS" + echo "==================================" + + # Prüfe auf Breaking Changes / Major Updates + if echo "$COMMITS" | grep -qiE "^BREAKING CHANGE:|^[^:]+!:|breaking:|major:"; then + echo "bump=major" >> $GITHUB_OUTPUT + echo "✓ Breaking Change gefunden → MAJOR" + # Prüfe auf Features / Minor Updates + elif echo "$COMMITS" | grep -qiE "^feat:|^feature:|minor:"; then + echo "bump=minor" >> $GITHUB_OUTPUT + echo "✓ Feature gefunden → MINOR" + # Prüfe auf Bugfixes + elif echo "$COMMITS" | grep -qiE "^fix:|bugfix:"; then + echo "bump=patch" >> $GITHUB_OUTPUT + echo "✓ Bugfix gefunden → PATCH" + # Prüfe auf Chores/Docs/etc + elif echo "$COMMITS" | grep -qiE "^chore:|^docs:|^style:|^refactor:|^test:|^build:|^ci:"; then + echo "bump=patch" >> $GITHUB_OUTPUT + echo "✓ Chore/Docs gefunden → PATCH" + # Fallback: Kein Pattern erkannt → PATCH + else + echo "bump=patch" >> $GITHUB_OUTPUT + echo "⚠ Kein Pattern erkannt → PATCH (Fallback)" + fi + + - name: Calculate new tag + id: get_tag + run: | + LATEST_TAG=$(git tag -l "v*" --sort=-v:refname | head -n 1) + + if [ -z "$LATEST_TAG" ]; then + NEW_TAG="v1.0.0" + else + VERSION=${LATEST_TAG#v} + MAJOR=$(echo $VERSION | cut -d. -f1) + MINOR=$(echo $VERSION | cut -d. -f2) + PATCH=$(echo $VERSION | cut -d. -f3) + + case ${{ steps.bump_type.outputs.bump }} in + major) + MAJOR=$((MAJOR + 1)) + MINOR=0 + PATCH=0 + ;; + minor) + MINOR=$((MINOR + 1)) + PATCH=0 + ;; + patch) + PATCH=$((PATCH + 1)) + ;; + esac + + NEW_TAG="v${MAJOR}.${MINOR}.${PATCH}" + fi + + echo "new_tag=${NEW_TAG}" >> $GITHUB_OUTPUT + echo "Neues Tag: ${NEW_TAG}" + + - name: Create and push tag + run: | + git config user.name "Gitea Actions" + git config user.email "actions@gitea.local" + + git tag -a ${{ steps.get_tag.outputs.new_tag }} -m "Release ${{ steps.get_tag.outputs.new_tag }}" + git push origin ${{ steps.get_tag.outputs.new_tag }} \ No newline at end of file diff --git a/src/frontend/index.html b/src/frontend/index.html index 581899e..3d59eac 100644 --- a/src/frontend/index.html +++ b/src/frontend/index.html @@ -4,7 +4,7 @@ - LCC + Logistics Cost Calculation Tool
diff --git a/src/frontend/src/App.vue b/src/frontend/src/App.vue index b99c352..ef68e40 100644 --- a/src/frontend/src/App.vue +++ b/src/frontend/src/App.vue @@ -44,7 +44,7 @@ export default { html { font-size: 62.5%; - font-family: 'Poppins', sans-serif; + font-family: 'Arial', sans-serif; } body { diff --git a/src/frontend/src/components/UI/BasicBadge.vue b/src/frontend/src/components/UI/BasicBadge.vue index 3f2abf4..0d443ee 100644 --- a/src/frontend/src/components/UI/BasicBadge.vue +++ b/src/frontend/src/components/UI/BasicBadge.vue @@ -23,6 +23,11 @@ export default{ type: String, default: 'primary', validator: (value) => ['primary', 'secondary', 'grey', 'exception', 'skeleton'].includes(value) + }, + size: { + type: String, + default: 'default', + validator: (value) => ['default', 'compact'].includes(value) } }, computed: { @@ -31,7 +36,8 @@ export default{ }, batchClasses() { return [ - `batch--${this.variant}` + `batch--${this.variant}`, + `batch--${this.size}` ] }, iconComponent() { @@ -65,6 +71,12 @@ export default{ height: 2.4rem; } +.batch-container.batch--compact { + padding: 0.2rem 0.4rem; + gap: 0.4rem; + height: 2rem; +} + .batch--primary { background-color: #5AF0B4; color: #002F54; diff --git a/src/frontend/src/components/UI/Checkbox.vue b/src/frontend/src/components/UI/Checkbox.vue index ac246cb..d1189b6 100644 --- a/src/frontend/src/components/UI/Checkbox.vue +++ b/src/frontend/src/components/UI/Checkbox.vue @@ -2,6 +2,7 @@