Skip to content

Commit

Permalink
test into main (#706)
Browse files Browse the repository at this point in the history
* feat(ZMS-3141): optimize user list page

* feat(ZMS-3141): fix test

* feat(ZMS-3141): fix test

* feat(ZMS-3141): fix tests

* feat(ZMS-3141): fix tests

* feat(ZMS-3141): refactoring

* feat(ZMS-3141): fix test

* fix(deps): update dependency phpmailer/phpmailer to v6.9.2 (#623)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#622)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#630)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#631)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ZMS-2970: fully load for the appointment form

* ZMS-2970: fully load for the appointment form

* feat(ZMS-2528): multilanguage ticketprinter

* feat(ZMS-2528): revert unwanted changes

* feat(ZMS-2528): fix tests

* feat(ZMS-2528): fix tests

* feat(ZMS-2528): fix tests

* fix(ZMS-3112): fix custom field validation

* fix(ZMS-3112): fix tests

* fix(ZMS-3112): fix validation

* fix(deps): update dependency league/csv to v9.17.0 (#634)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency firebase/php-jwt to v6.10.1 (#620)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(ZMS-3213): add sortByCallTime function for queueList sorting (#648)

* ZMS-1802 Template-anpassungen, Für den status 'deleted' werden die Links in der Warteschlange entfernt und die Buttons fürs Bearbeiten und Löschen werden auch entfernt

* ZMS-3240 Template-anpassungen, Für den status 'preconfirmed' werden die Links in der Warteschlange entfernt

* feat(ZMS-2778): Monitor logged in sessions by scope and department (#651)

* feat(ZMS-2778): Add three queries to status to monitor active sessions

* feat(ZMS-2778): Update three queries to status to monitor active sessions

* feat(ZMS-2778): Update three queries to status to monitor active sessions

* feat(ZMS-2778): Add token session duration to expiry.

* feat(ZMS-2778): Add to expiry to user table.

* feat(ZMS-2778): Change status query and fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Add update sessionExpiry to updateEntityAuthkey

* feat(ZMS-3150): show called appointments

* feat(ZMS-3150): fix tests

* feat(ZMS-3150): show user queues

* feat(ZMS-3150): fix tests

* feat(ZMS-3150): fix tests

* feat(ZMS-3150): fix tests

* feat(ZMS-3150): fix showing all called appointments for user

* feat(ZMS-3150): fix showing all called appointments for user

* feat(ZMS-2215): Merge user-search-in-user-list into next (#645)

* feat(ZMS-2215): Global user search working

* Feat(ZMS-2215): Cleanup twig stuff

* feat(ZMS-2215): User search for department admin working

* feat(ZMS-2215): Add view users by role

* feat(ZMS-2215): set user rights view by role

* feat(ZMS-2215): fix up api rights and major cleanup

* feat(ZMS-2215): grammar in twig

* feat(ZMS-2215): fix unit test

* feat(ZMS-2215): Rename userAccountSearch.twig to useraccountSearch.twig

* feat(ZMS-2215): Rename userAccountSearchResults.twig to useraccountSearchResults.twig

* feat(ZMS-2215): Update UseraccountSearch.php

* feat(ZMS-2215): Update Useraccount.php

* feat(ZMS-2215): merge next into feature-zms-2215-user-search-in-user-list

* feat(ZMS-2215): cleanup some

* feat(ZMS-2215): re-enable twig cache

* feat(ZMS-2215): sneak in one more improvement

* feat(ZMS-2215): sneak in one more improvement

* fix(ZMS-2215): Fix unit test after next update

* feat(ZMS-2215): Add department id visibility for superusers

---------

Co-authored-by: Thomas Fink <[email protected]>

* feat(ZMS-2563): optimization (#654)

* Next into test (#657)

* feat(ZMS-3141): optimize user list page

* feat(ZMS-3141): fix test

* feat(ZMS-3141): fix test

* feat(ZMS-3141): fix tests

* feat(ZMS-3141): fix tests

* feat(ZMS-3141): refactoring

* feat(ZMS-3141): fix test

* fix(deps): update dependency phpmailer/phpmailer to v6.9.2 (#623)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#622)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#630)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#631)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ZMS-2970: fully load for the appointment form

* ZMS-2970: fully load for the appointment form

* feat(ZMS-2528): multilanguage ticketprinter

* feat(ZMS-2528): revert unwanted changes

* feat(ZMS-2528): fix tests

* feat(ZMS-2528): fix tests

* feat(ZMS-2528): fix tests

* fix(ZMS-3112): fix custom field validation

* fix(ZMS-3112): fix tests

* fix(ZMS-3112): fix validation

* fix(deps): update dependency league/csv to v9.17.0 (#634)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency firebase/php-jwt to v6.10.1 (#620)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(ZMS-3213): add sortByCallTime function for queueList sorting (#648)

* ZMS-1802 Template-anpassungen, Für den status 'deleted' werden die Links in der Warteschlange entfernt und die Buttons fürs Bearbeiten und Löschen werden auch entfernt

* feat(ZMS-2778): Monitor logged in sessions by scope and department (#651)

* feat(ZMS-2778): Add three queries to status to monitor active sessions

* feat(ZMS-2778): Update three queries to status to monitor active sessions

* feat(ZMS-2778): Update three queries to status to monitor active sessions

* feat(ZMS-2778): Add token session duration to expiry.

* feat(ZMS-2778): Add to expiry to user table.

* feat(ZMS-2778): Change status query and fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Add update sessionExpiry to updateEntityAuthkey

* feat(ZMS-2215): Merge user-search-in-user-list into next (#645)

* feat(ZMS-2215): Global user search working

* Feat(ZMS-2215): Cleanup twig stuff

* feat(ZMS-2215): User search for department admin working

* feat(ZMS-2215): Add view users by role

* feat(ZMS-2215): set user rights view by role

* feat(ZMS-2215): fix up api rights and major cleanup

* feat(ZMS-2215): grammar in twig

* feat(ZMS-2215): fix unit test

* feat(ZMS-2215): Rename userAccountSearch.twig to useraccountSearch.twig

* feat(ZMS-2215): Rename userAccountSearchResults.twig to useraccountSearchResults.twig

* feat(ZMS-2215): Update UseraccountSearch.php

* feat(ZMS-2215): Update Useraccount.php

* feat(ZMS-2215): merge next into feature-zms-2215-user-search-in-user-list

* feat(ZMS-2215): cleanup some

* feat(ZMS-2215): re-enable twig cache

* feat(ZMS-2215): sneak in one more improvement

* feat(ZMS-2215): sneak in one more improvement

* fix(ZMS-2215): Fix unit test after next update

* feat(ZMS-2215): Add department id visibility for superusers

---------

Co-authored-by: Thomas Fink <[email protected]>

* feat(ZMS-2563): optimization (#654)

---------

Co-authored-by: Igor Manjencic <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mohamad.daaeboul <[email protected]>
Co-authored-by: Fabian Weiß <[email protected]>
Co-authored-by: MoDaae <[email protected]>
Co-authored-by: Thomas Fink <[email protected]>

* fix(ZMS-2215) Fix spelling

* Next into test correct spelling (#658)

* feat(ZMS-3141): optimize user list page

* feat(ZMS-3141): fix test

* feat(ZMS-3141): fix test

* feat(ZMS-3141): fix tests

* feat(ZMS-3141): fix tests

* feat(ZMS-3141): refactoring

* feat(ZMS-3141): fix test

* fix(deps): update dependency phpmailer/phpmailer to v6.9.2 (#623)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#622)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#630)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#631)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ZMS-2970: fully load for the appointment form

* ZMS-2970: fully load for the appointment form

* feat(ZMS-2528): multilanguage ticketprinter

* feat(ZMS-2528): revert unwanted changes

* feat(ZMS-2528): fix tests

* feat(ZMS-2528): fix tests

* feat(ZMS-2528): fix tests

* fix(ZMS-3112): fix custom field validation

* fix(ZMS-3112): fix tests

* fix(ZMS-3112): fix validation

* fix(deps): update dependency league/csv to v9.17.0 (#634)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency firebase/php-jwt to v6.10.1 (#620)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(ZMS-3213): add sortByCallTime function for queueList sorting (#648)

* ZMS-1802 Template-anpassungen, Für den status 'deleted' werden die Links in der Warteschlange entfernt und die Buttons fürs Bearbeiten und Löschen werden auch entfernt

* feat(ZMS-2778): Monitor logged in sessions by scope and department (#651)

* feat(ZMS-2778): Add three queries to status to monitor active sessions

* feat(ZMS-2778): Update three queries to status to monitor active sessions

* feat(ZMS-2778): Update three queries to status to monitor active sessions

* feat(ZMS-2778): Add token session duration to expiry.

* feat(ZMS-2778): Add to expiry to user table.

* feat(ZMS-2778): Change status query and fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Add update sessionExpiry to updateEntityAuthkey

* feat(ZMS-2215): Merge user-search-in-user-list into next (#645)

* feat(ZMS-2215): Global user search working

* Feat(ZMS-2215): Cleanup twig stuff

* feat(ZMS-2215): User search for department admin working

* feat(ZMS-2215): Add view users by role

* feat(ZMS-2215): set user rights view by role

* feat(ZMS-2215): fix up api rights and major cleanup

* feat(ZMS-2215): grammar in twig

* feat(ZMS-2215): fix unit test

* feat(ZMS-2215): Rename userAccountSearch.twig to useraccountSearch.twig

* feat(ZMS-2215): Rename userAccountSearchResults.twig to useraccountSearchResults.twig

* feat(ZMS-2215): Update UseraccountSearch.php

* feat(ZMS-2215): Update Useraccount.php

* feat(ZMS-2215): merge next into feature-zms-2215-user-search-in-user-list

* feat(ZMS-2215): cleanup some

* feat(ZMS-2215): re-enable twig cache

* feat(ZMS-2215): sneak in one more improvement

* feat(ZMS-2215): sneak in one more improvement

* fix(ZMS-2215): Fix unit test after next update

* feat(ZMS-2215): Add department id visibility for superusers

---------

Co-authored-by: Thomas Fink <[email protected]>

* feat(ZMS-2563): optimization (#654)

* fix(ZMS-2215) Fix spelling

---------

Co-authored-by: Igor Manjencic <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mohamad.daaeboul <[email protected]>
Co-authored-by: Fabian Weiß <[email protected]>
Co-authored-by: MoDaae <[email protected]>
Co-authored-by: Thomas Fink <[email protected]>

* feat(ZMS-3150): fix getting department scopes

* fix(ZMS): improve user department selection

* Next into test (#663)

* feat(ZMS-3141): optimize user list page

* feat(ZMS-3141): fix test

* feat(ZMS-3141): fix test

* feat(ZMS-3141): fix tests

* feat(ZMS-3141): fix tests

* feat(ZMS-3141): refactoring

* feat(ZMS-3141): fix test

* fix(deps): update dependency phpmailer/phpmailer to v6.9.2 (#623)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#622)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#630)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency league/csv to v9.17.0 (#631)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ZMS-2970: fully load for the appointment form

* ZMS-2970: fully load for the appointment form

* feat(ZMS-2528): multilanguage ticketprinter

* feat(ZMS-2528): revert unwanted changes

* feat(ZMS-2528): fix tests

* feat(ZMS-2528): fix tests

* feat(ZMS-2528): fix tests

* fix(ZMS-3112): fix custom field validation

* fix(ZMS-3112): fix tests

* fix(ZMS-3112): fix validation

* fix(deps): update dependency league/csv to v9.17.0 (#634)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency firebase/php-jwt to v6.10.1 (#620)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(ZMS-3213): add sortByCallTime function for queueList sorting (#648)

* ZMS-1802 Template-anpassungen, Für den status 'deleted' werden die Links in der Warteschlange entfernt und die Buttons fürs Bearbeiten und Löschen werden auch entfernt

* feat(ZMS-2778): Monitor logged in sessions by scope and department (#651)

* feat(ZMS-2778): Add three queries to status to monitor active sessions

* feat(ZMS-2778): Update three queries to status to monitor active sessions

* feat(ZMS-2778): Update three queries to status to monitor active sessions

* feat(ZMS-2778): Add token session duration to expiry.

* feat(ZMS-2778): Add to expiry to user table.

* feat(ZMS-2778): Change status query and fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Fix tests

* feat(ZMS-2778): Add update sessionExpiry to updateEntityAuthkey

* feat(ZMS-2215): Merge user-search-in-user-list into next (#645)

* feat(ZMS-2215): Global user search working

* Feat(ZMS-2215): Cleanup twig stuff

* feat(ZMS-2215): User search for department admin working

* feat(ZMS-2215): Add view users by role

* feat(ZMS-2215): set user rights view by role

* feat(ZMS-2215): fix up api rights and major cleanup

* feat(ZMS-2215): grammar in twig

* feat(ZMS-2215): fix unit test

* feat(ZMS-2215): Rename userAccountSearch.twig to useraccountSearch.twig

* feat(ZMS-2215): Rename userAccountSearchResults.twig to useraccountSearchResults.twig

* feat(ZMS-2215): Update UseraccountSearch.php

* feat(ZMS-2215): Update Useraccount.php

* feat(ZMS-2215): merge next into feature-zms-2215-user-search-in-user-list

* feat(ZMS-2215): cleanup some

* feat(ZMS-2215): re-enable twig cache

* feat(ZMS-2215): sneak in one more improvement

* feat(ZMS-2215): sneak in one more improvement

* fix(ZMS-2215): Fix unit test after next update

* feat(ZMS-2215): Add department id visibility for superusers

---------

Co-authored-by: Thomas Fink <[email protected]>

* feat(ZMS-2563): optimization (#654)

* fix(ZMS-2215) Fix spelling

* fix(ZMS): improve user department selection

---------

Co-authored-by: Igor Manjencic <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mohamad.daaeboul <[email protected]>
Co-authored-by: Fabian Weiß <[email protected]>
Co-authored-by: MoDaae <[email protected]>
Co-authored-by: Thomas Fink <[email protected]>

* feat(ZMS-2528): fix buttons translations

* fix(ZMS-2215): Spelling

* ZMS-3258 URL wird aktualisiert wenn der Kunde nicht erschienen oder wenn der Termin geparkt wird

* fix(ZMS-2215): Spelling

* feat(ZMS-2528): fix buttons translations

* feat(ZMS-3150): adjust swagger docu

* feat(ZMS-3150): adjust html id

* feat(ZMS-2184): All scss and js builds in the pipeline and local env (#673)

* feat(ZMS-2184): Add all SCSS and JS builds in the pipeline and local

* feat(ZMS-2184): Delete css and js builds.

* feat(ZMS-2184): remove lock files

* feat(ZMS-2184): remove lock files

* feat(ZMS-2184): fix unit test

* feat(ZMS-2184): remove compiled react js

* feat(ZMS-2184): remove node engine from package.json

* feat(ZMS-2184): remove composer.lock files from gitignore

* feat(ZMS-2184): remove package.lock files from gitignore

---------

Co-authored-by: Thomas Fink <[email protected]>

* cleanup(ZMS-2184): Remove duplicate loop function in cli

* docs(zms): Update CONTRIBUTING.md

* feat(ZMS-3213): call display appointment order (#676)

* feat(ZMS-3213): add sortByCallTime function for queueList sorting

* feat(ZMS-3213): add missing queueListArray initialization

* feat(ZMS-2528): delete custom templates

* feat(ZMS-2528): remove text before button

* feat(ZMS-2528): fix tests

* fix(ZMS-3267): fix calling appointment again

* fix(ZMS-3267): fix calling appointment

* feat(ZMS-2528): revert text before button

* fix(deps): update dependency giggsey/libphonenumber-for-php to v8.13.50 (#661)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ZMS-3190 Felder nur für die Rolle rights.superuser einblinden

* ZMS-3229 Removed Automatic Expansion of New Availabilities, and only the availability whose id or tempId matches this.isExpanded will be expanded

* feat(ZMS-3374): added muc changelog to application

* ZMS-3190 Wartenummernausgabe am Kiosk ist auch nur fuer Superuser

* feat(ZMS-2333): changed message text for username and removed e-mail field

* feat(ZMS-3180): hide certain fields in department and cluster config (#694)

* feat(ZMS-3180): hide certain fields if user is not superuser

* feat(ZMS-3180): hide fields also in cluster config and add description for technical admin

* feat(ZMS-3180): do not display superuser note in bold type

* chore(deps): update dependency postcss to v8.4.49 (#688)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(ZMS-3258): fix typo

---------

Co-authored-by: Igor Manjencic <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mohamad.daaeboul <[email protected]>
Co-authored-by: Fabian Weiß <[email protected]>
Co-authored-by: MoDaae <[email protected]>
Co-authored-by: Thomas Fink <[email protected]>
Co-authored-by: Thomas Fink <[email protected]>
Co-authored-by: Fabian Breitling <[email protected]>
  • Loading branch information
9 people authored Nov 25, 2024
1 parent 83a095e commit 11c9743
Show file tree
Hide file tree
Showing 84 changed files with 24,392 additions and 5,752 deletions.
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,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
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 11c9743

Please sign in to comment.