Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat-zms-2936-initial-setup-webc…
Browse files Browse the repository at this point in the history
…omponent' into feat-zms-2936-initial-setup-webcomponent
  • Loading branch information
lehju committed Nov 21, 2024
2 parents f1bcaaf + 9e1159e commit 716c7ae
Show file tree
Hide file tree
Showing 163 changed files with 24,467 additions and 13,819 deletions.
2 changes: 1 addition & 1 deletion .ddev/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ MYSQL_USER=db
MYSQL_PASSWORD=db

# xdebug
PHP_IDE_CONFIG="serverName=zms.ddev.site"
PHP_IDE_CONFIG="serverName=zms.ddev.site"
35 changes: 35 additions & 0 deletions .github/workflows/maven-node-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Frontend Build

on:
push:

jobs:
build:
runs-on: ubuntu-latest
env:
TZ: Europe/Berlin # timezone
strategy:
fail-fast: false
matrix:
include: # hier müssen die Pfade angegeben werden
- app-path: zmscitizenview
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- if: ${{hashFiles(format('./{0}/package.json', matrix.app-path))!=null}}
id: node
uses: it-at-m/.github/.github/actions/action-npm-build@main
with:
app-path: "${{ matrix.app-path }}"
- if: ${{hashFiles(format('./{0}/pom.xml', matrix.app-path))!=null}}
id: maven
uses: it-at-m/.github/.github/actions/action-maven-build@main
with:
app-path: "${{ matrix.app-path }}"
- uses: it-at-m/.github/.github/actions/action-build-image@main
with:
path: "${{ matrix.app-path }}"
image-name: "${{ matrix.app-path }}"
artifact-name: ${{join(steps.*.outputs.artifact-name)}}
registry-password: ${{ secrets.GITHUB_TOKEN }}
registry-username: ${{ github.actor }}
image-tags: "branch-${{ github.ref_name }}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/
.ddev/.env
.ddev/.env.template
/local/
.DS_Store
.vscode/launch.json
Expand Down
909 changes: 512 additions & 397 deletions CHANGELOG.md

Large diffs are not rendered by default.

21 changes: 6 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This is section is only useful if you want to contribute on this project.
### Use an IDE

Please use an IDE. This will make development with the styling and other guidelines easier.
We recommend the IntelliJ IDE, the Community Edition is enough. Something like Visual Studio Code is
also possible, but not the best for Java.
We recommend the PHPStorm IDE. Something like Visual Studio Code is
also possible, but not the best for PHP.

### Always test your changes

Expand All @@ -21,10 +21,7 @@ If you either want to add a new feature or do some refactoring, please open an i

## Style Guidelines

We use automated Styling [spotless](https://github.com/diffplug/spotless). Spotless is configured with
the [google-java-format](https://github.com/google/google-java-format). The spotless check is running automatically with
maven verify and will fail if the style does not match. It is recommended to run ```mvn spotless:apply``` for every
push. We strongly recommend the google-java-format Plugin from the IntelliJ Marketplace for local styling.


---

Expand All @@ -37,9 +34,8 @@ Dieser Bereich ist nur für diejenigen, die sich an dem Projekt beteiligen möch
### Benutze eine IDE

Bitte nutze eine moderne IDE. Diese sorgt dafür, dass die Entwicklung in den Style- und sonstigen Richtlinien
vereinfacht wird. Wir empfehlen die IntelliJ IDE, hier reicht die Community Edition aus. Visual Studio Code kann auch
gerne genutzt
werden. Ist aber für Java Projekte nicht so sehr geeignet.
vereinfacht wird. Wir empfehlen die PHPStorm IDE. Visual Studio Code kann auch
gerne genutzt werden. Ist aber für PHP Projekte nicht so sehr geeignet.

### Teste alle Änderungen

Expand All @@ -52,9 +48,4 @@ Wenn du beabsichtigst ein neues größeres Feature oder ein Refactoring zu mache

## Style Richtlinien

Wir nutzen automatisches Styling mittels [spotless](https://github.com/diffplug/spotless). Spotless is
mit [google-java-format](https://github.com/google/google-java-format)
konfiguriert. Die Überprüfung auf die Stylerichtlinien wird bei jedem maven verify ausgeführt. Dieser Schritt schlägt
fehl, sollte das Styling nicht korrekt sein. Es ist zu empfehlen vor jedem push einmal ```mvn spotless:apply```
auszuführen. Dazu empfehlen wir das
google-java-format Plugin im IntelliJ Marktplatz, um hier schon die korrekte Formatierung zu nutzen.

2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
EUPL License

EUROPEAN UNION PUBLIC LICENCE v. 1.2
EUPL © the European Union 2007, 2016

Expand Down
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<div id="top"></div>

<!-- PROJECT SHIELDS -->
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
<!-- [![EUPL License][license-shield]][license-url] -->

# E-Appointment
<!-- <img src="https://it-at-m.github.io/eappointment/zmsapi/public/doc/logo.png" width="150" align="right"> -->

Expand Down Expand Up @@ -94,6 +103,8 @@ BerlinOnline Stadtportal GmbH & Co KG und it@M.
## Getting Started
- `ddev start`
- `ddev exec ./cli modules loop composer install`
- `ddev exec ./cli modules loop npm install`
- `ddev exec ./cli modules loop npm build`

## Import Database
- `ddev import-db --file=.resources/zms.sql`
Expand Down Expand Up @@ -123,7 +134,9 @@ To keep our branch names organized and easily understandable, we follow a specif
- `feature`: For new features or enhancements.
- `bugfix`: For bug fixes.
- `hotfix`: For urgent fixes that need to be applied quickly.
- `cleanup`: For code refactoring, documentation updates, or other maintenance work.
- `cleanup`: For code refactoring, or documentation updates.
- `docs`: For updating documentation such as the README.md CODE_OF_CONDUCT.md LICENSE.md CHANGELOG.md CONTRIBUTING.md. Providing a ticket number or project for docs is optional.
- `chore`: For maintaining and updating dependencies, libraries, PHP/Node/Twig Versions, or other maintenance work.

2. **project**: The project identifier. This should be:
- `zms` for the ZMS project.
Expand All @@ -143,10 +156,32 @@ To keep our branch names organized and easily understandable, we follow a specif
- **Bugfix Branch**: `bugfix-mpdzbs-67890-fix-crash-on-startup`
- **Hotfix Branch**: `hotfix-zms-98765-critical-fix-for-login`
- **Cleanup Branch**: `cleanup-mpdzbs-11111-remove-unused-code`
- **Chore Branch**: `chore-zms-2964-composer-update`
- **Docs Branch**: `docs-zms-0000-update-readme` `docs-zms-release-40-update-changelog`

#### Regular Expression

The branch name must match the following regular expression:
`^(feature|hotfix|bugfix|cleanup)-(zms|mpdzbs)-[0-9]+-[a-z0-9-]+$`
`^(feature|hotfix|bugfix|cleanup|maintenance|docs)-(zms|mpdzbs)-[0-9]+-[a-z0-9-]+$`

**For further commit rules please refer to https://www.conventionalcommits.org/en/v1.0.0-beta.4/**

## Screenshot
![screenshot](https://github.com/user-attachments/assets/54d360e9-c47b-4f3c-b849-5966a8766af9)

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/it-at-m/eappointment.svg?style=for-the-badge
[contributors-url]: https://github.com/it-at-m/eappointment/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/it-at-m/eappointment.svg?style=for-the-badge
[forks-url]: https://github.com/it-at-m/eappointment/network/members
[stars-shield]: https://img.shields.io/github/stars/it-at-m/eappointment.svg?style=for-the-badge
[stars-url]: https://github.com/it-at-m/eappointment/stargazers
[issues-shield]: https://img.shields.io/github/issues/it-at-m/eappointment.svg?style=for-the-badge
[issues-url]: https://github.com/it-at-m/eappointment/issues
[license-shield]: https://img.shields.io/github/license/it-at-m/eappointment.svg?style=for-the-badge
[license-url]: https://github.com/it-at-m/eappointment/blob/main/LICENSE
[product-screenshot]: images/screenshot.png

43 changes: 33 additions & 10 deletions cli
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,6 @@ def cli_modules_reference_libraries(no_symlink: bool):
os.system(f"cd {module_dir} && composer update {' '.join(module_dependencies[module])} --no-scripts --no-plugins 1>/dev/null")


@cli_modules.command("loop")
@click.argument("commands", required=True, nargs=-1)
def cli_modules_loop(commands):
"""loops though all repositories and executes a given command"""
for module in modules:
print_info(f"Repository: {module}")
os.chdir(os.path.join(repo_dir, module))
os.system(" ".join(commands))


@cli_modules.command("check-upgrade")
@click.argument("php_version")
def cli_modules_check_upgrade(php_version):
Expand Down Expand Up @@ -142,6 +132,39 @@ def cli_clean_cache():
for module in modules:
os.system(f"rm -rf {module}/cache/*")
print_info("Cache cleaned")


@cli_modules.command("loop")
@click.argument("commands", required=True, nargs=-1)
def cli_modules_loop(commands):
"""Loops through repositories and executes a given command. Adds --legacy-peer-deps for npm install commands."""
specific_modules = ["zmsadmin", "zmscalldisplay", "zmsstatistic", "zmsticketprinter"]

is_npm_command = commands[0] == "npm"

build_commands = {
"zmsadmin": ["npm run build"],
"zmscalldisplay": ["npm run build"],
"zmsstatistic": ["npm run build"],
"zmsticketprinter": ["npm run build"]
}

target_modules = specific_modules if is_npm_command else modules

for module in target_modules:
print_info(f"Repository: {module}")
module_dir = os.path.join(repo_dir, module)
os.chdir(module_dir)

if is_npm_command and commands[1] == "install":
modified_commands = list(commands) + ["--legacy-peer-deps"]
os.system(" ".join(modified_commands))
elif is_npm_command and len(commands) > 1 and commands[1] == "build":
print_info(f"Running custom npm build commands for {module}")
for build_command in build_commands.get(module, []):
os.system(build_command)
else:
os.system(" ".join(commands))


if __name__ == "__main__":
Expand Down
3 changes: 1 addition & 2 deletions mellon/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config.php
**.swp
tags

.DS_*
/vendor/
composer.lock
coverage
Loading

0 comments on commit 716c7ae

Please sign in to comment.