Compare commits

..

No commits in common. "4329e6b871b5cceaf8ef01bfa91aa5eadfa990a8" and "cc70e77deecdaa74b41ddcf3e26677af150d2797" have entirely different histories.

17 changed files with 1539 additions and 4633 deletions

View file

@ -20,6 +20,25 @@
set -e
# Pass all environment variables to PHP-FPM
# Path where PHP-FPM pool configs live
PHP_FPM_ENV_CONF="/etc/php/PHP_VERSION/fpm/pool.d/99-env.conf"
# start fresh
echo "; auto-generated env config" > "$PHP_FPM_ENV_CONF"
echo "[www]" >> "$PHP_FPM_ENV_CONF"
echo "clear_env = no" >> "$PHP_FPM_ENV_CONF"
# add all container envs
printenv | while IFS='=' read -r name value; do
case "$name" in
HOSTNAME|PWD|SHLVL|PATH|_*) continue ;;
esac
# write literal value in quotes
echo "env[$name] = \"$value\"" >> "$PHP_FPM_ENV_CONF"
done
# recursive chowns can take a while, so we'll just do it if the owner is wrong
# Chown uploads/ folder if it does not belong to www-data
@ -40,7 +59,7 @@ if [ -d /var/www/html/var/db ]; then
fi
# Start PHP-FPM (the PHP_VERSION is replaced by the configured version in the Dockerfile)
php-fpmPHP_VERSION -F &
service phpPHP_VERSION-fpm start
# Run migrations if automigration is enabled via env variable DB_AUTOMIGRATE

View file

@ -1,8 +1,5 @@
name: Build assets artifact
permissions:
contents: read
on:
push:
branches:
@ -22,7 +19,7 @@ jobs:
APP_ENV: prod
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2

View file

@ -1,8 +1,5 @@
name: Docker Image Build
permissions:
contents: read
on:
#schedule:
# - cron: '0 10 * * *' # everyday at 10am
@ -20,7 +17,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
-
name: Docker meta
id: docker_meta
@ -76,4 +73,4 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max

View file

@ -1,8 +1,5 @@
name: Docker Image Build (FrankenPHP)
permissions:
contents: read
on:
#schedule:
# - cron: '0 10 * * *' # everyday at 10am
@ -20,7 +17,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
-
name: Docker meta
id: docker_meta
@ -77,4 +74,4 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max

View file

@ -1,8 +1,5 @@
name: Static analysis
permissions:
contents: read
on:
push:
branches:
@ -19,7 +16,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
@ -33,20 +30,20 @@ jobs:
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Lint config files
run: ./bin/console lint:yaml config --parse-tags
- name: Lint twig templates
run: ./bin/console lint:twig templates --env=prod
@ -56,13 +53,13 @@ jobs:
- name: Check dependencies for security
uses: symfonycorp/security-checker-action@v5
- name: Check doctrine mapping
run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
# Use the -d option to raise the max nesting level
- name: Generate dev container
run: php -d xdebug.max_nesting_level=1000 ./bin/console cache:clear --env dev
- name: Run PHPstan
run: composer phpstan

View file

@ -1,8 +1,5 @@
name: PHPUnit Tests
permissions:
contents: read
on:
push:
branches:
@ -46,7 +43,7 @@ jobs:
if: matrix.db-type == 'postgres'
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2

View file

@ -1 +1 @@
2.0.2
2.0.0-dev

View file

@ -75,10 +75,11 @@
request._dt = config.name;
//Try to resolve the original column index when the column was reordered (using the ColReorder plugin)
if (dt.colReorder && dt.colReorder.transpose) {
//Only do this when _ColReorder_iOrigCol is available
if (settings.aoColumns && settings.aoColumns.length && settings.aoColumns[0]._ColReorder_iOrigCol !== undefined) {
if (request.order && request.order.length) {
request.order.forEach(function (order) {
order.column = dt.colReorder.transpose(order.column, "toOriginal");
order.column = settings.aoColumns[order.column]._ColReorder_iOrigCol;
});
}
}

View file

@ -18,7 +18,7 @@ datatables:
>
<'row' <'col mt-2 input-group flex-nowrap' B l > <'col-auto mt-2' < p >>>"
pagingType: 'simple_numbers'
searching: false
searching: true
stateSave: true

View file

@ -69,7 +69,6 @@ when@docker:
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
include_stacktraces: true
channels: ["!deprecation"]
nested:
type: stream
path: "php://stderr"

View file

@ -3,7 +3,6 @@ layout: default
title: Upgrade from Part-DB 1.x to 2.x
nav_order: 1
has_children: false
parent: Upgrade
---
# Upgrade from Part-DB 1.x to 2.x

View file

@ -3,7 +3,6 @@ layout: default
title: Upgrade from legacy Part-DB version (<1.0)
nav_order: 100
redirect_from: /upgrade_legacy
parent: Upgrade
---
# Upgrade from legacy Part-DB version

View file

@ -85,7 +85,6 @@ final class TogglePasswordTypeExtension extends AbstractTypeExtension
}
$controllerName = 'toggle-password';
$controllerValues = [];
$view->vars['attr']['data-controller'] = trim(\sprintf('%s %s', $view->vars['attr']['data-controller'] ?? '', $controllerName));
if (false !== $options['toggle_translation_domain']) {

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,23 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="cs">
<file id="security.en">
<unit id="GrLNa9P" name="user.login_error.user_disabled">
<unit id="aazoCks" name="user.login_error.user_disabled">
<segment state="translated">
<source>user.login_error.user_disabled</source>
<target>Váš účet je deaktivován! Pokud si myslíte, že je to špatně, kontaktujte správce.</target>
</segment>
</unit>
<unit id="IFQ5XrG" name="saml.error.cannot_login_local_user_per_saml">
<unit id="Dpb9AmY" name="saml.error.cannot_login_local_user_per_saml">
<segment state="translated">
<source>saml.error.cannot_login_local_user_per_saml</source>
<target>Přes SSO se nelze přihlásit jako místní uživatel! Místo toho použijte heslo místního uživatele.</target>
</segment>
</unit>
<unit id="wOYPZmb" name="saml.error.cannot_login_saml_user_locally">
<segment state="translated">
<source>saml.error.cannot_login_saml_user_locally</source>
<target>Pro přihlášení jako uživatel SAML nelze použít místní ověření! Místo toho použijte přihlášení SSO.</target>
</segment>
</unit>
</file>
</xliff>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="cs">
<file id="validators.en">
<unit id="cRbk.cm" name="part.master_attachment.must_be_picture">
<unit id="xevSdCK" name="part.master_attachment.must_be_picture">
<notes>
<note category="file-source" priority="1">Part-DB1\src\Entity\Attachments\AttachmentContainingDBElement.php:0</note>
<note category="file-source" priority="1">Part-DB1\src\Entity\Attachments\AttachmentType.php:0</note>
@ -42,7 +42,7 @@
<target>Příloha náhledu musí být platný obrázek!</target>
</segment>
</unit>
<unit id="v8HkcJB" name="structural.entity.unique_name">
<unit id="VJHTkxx" name="structural.entity.unique_name">
<notes>
<note category="file-source" priority="1">Part-DB1\src\Entity\Attachments\AttachmentType.php:0</note>
<note category="file-source" priority="1">Part-DB1\src\Entity\Base\AbstractCompany.php:0</note>
@ -87,7 +87,7 @@
<target>Prvek s tímto názvem již na této úrovni existuje!</target>
</segment>
</unit>
<unit id="dW7b2B_" name="parameters.validator.min_lesser_typical">
<unit id="3ODUtpU" name="parameters.validator.min_lesser_typical">
<notes>
<note category="file-source" priority="1">Part-DB1\src\Entity\Parameters\AbstractParameter.php:0</note>
<note category="file-source" priority="1">Part-DB1\src\Entity\Parameters\AttachmentTypeParameter.php:0</note>
@ -107,7 +107,7 @@
<target>Hodnota musí být menší nebo rovna typické hodnotě ({{ compared_value }}).</target>
</segment>
</unit>
<unit id="Yfp2uC5" name="parameters.validator.min_lesser_max">
<unit id="jDBA_WW" name="parameters.validator.min_lesser_max">
<notes>
<note category="file-source" priority="1">Part-DB1\src\Entity\Parameters\AbstractParameter.php:0</note>
<note category="file-source" priority="1">Part-DB1\src\Entity\Parameters\AttachmentTypeParameter.php:0</note>
@ -127,7 +127,7 @@
<target>Hodnota musí být menší než maximální hodnota ({{ compared_value }}).</target>
</segment>
</unit>
<unit id="P6b.8Ou" name="parameters.validator.max_greater_typical">
<unit id="ygK_e_X" name="parameters.validator.max_greater_typical">
<notes>
<note category="file-source" priority="1">Part-DB1\src\Entity\Parameters\AbstractParameter.php:0</note>
<note category="file-source" priority="1">Part-DB1\src\Entity\Parameters\AttachmentTypeParameter.php:0</note>
@ -147,7 +147,7 @@
<target>Hodnota musí být větší nebo rovna typické hodnotě ({{ compared_value }}).</target>
</segment>
</unit>
<unit id="P41193Y" name="validator.user.username_already_used">
<unit id="isXL.ie" name="validator.user.username_already_used">
<notes>
<note category="file-source" priority="1">Part-DB1\src\Entity\UserSystem\User.php:0</note>
<note priority="1">Part-DB1\src\Entity\UserSystem\User.php:0</note>
@ -157,7 +157,7 @@
<target>Uživatel s tímto jménem již existuje</target>
</segment>
</unit>
<unit id="EKPQiyf" name="user.invalid_username">
<unit id="NcM463r" name="user.invalid_username">
<notes>
<note category="file-source" priority="1">Part-DB1\src\Entity\UserSystem\User.php:0</note>
<note priority="1">Part-DB1\src\Entity\UserSystem\User.php:0</note>
@ -167,203 +167,185 @@
<target>Uživatelské jméno musí obsahovat pouze písmena, číslice, podtržítka, tečky, plusy nebo mínusy!</target>
</segment>
</unit>
<unit id="_v.DMg." name="validator.noneofitschild.self">
<unit id="lZvhKYu" name="validator.noneofitschild.self">
<notes>
<note category="state" priority="1">obsolete</note>
</notes>
<segment state="translated">
<source>validator.noneofitschild.self</source>
<target>Prvek nemůže být svým vlastním rodičem.</target>
<target>Prvek nemůže být svým vlastním rodičem!</target>
</segment>
</unit>
<unit id="W90LyFQ" name="validator.noneofitschild.children">
<unit id="pr07aV4" name="validator.noneofitschild.children">
<notes>
<note category="state" priority="1">obsolete</note>
</notes>
<segment state="translated">
<source>validator.noneofitschild.children</source>
<target>Rodič nemůže být jedním ze svých potomků.</target>
<target>Podřízený prvek nemůže být nadřazeným prvkem!</target>
</segment>
</unit>
<unit id="GAUS.LK" name="validator.select_valid_category">
<unit id="ayNr6QK" name="validator.select_valid_category">
<segment state="translated">
<source>validator.select_valid_category</source>
<target>Vyberte prosím platnou kategorii!</target>
</segment>
</unit>
<unit id="h6qELde" name="validator.part_lot.only_existing">
<unit id="6vIlN5q" name="validator.part_lot.only_existing">
<segment state="translated">
<source>validator.part_lot.only_existing</source>
<target>Úložiště bylo označeno jako "pouze existující", takže do něj nelze přidat novou část.</target>
<target>Do tohoto umístění nelze přidávat nové díly, protože je označeno jako "Pouze existující".</target>
</segment>
</unit>
<unit id="Prriyy0" name="validator.part_lot.location_full.no_increase">
<unit id="3xoKOIS" name="validator.part_lot.location_full.no_increase">
<segment state="translated">
<source>validator.part_lot.location_full.no_increase</source>
<target>Místo je obsazeno. Množství nelze navýšit (nová hodnota musí být menší než {{ old_amount }}).</target>
</segment>
</unit>
<unit id="eeEjB4s" name="validator.part_lot.location_full">
<unit id="R6Ov4Yt" name="validator.part_lot.location_full">
<segment state="translated">
<source>validator.part_lot.location_full</source>
<target>Úložiště bylo označeno jako plné, takže do něj nelze přidat nový díl.</target>
<target>Místo je obsazeno. Nelze do něj přidávat nové díly.</target>
</segment>
</unit>
<unit id="2yWi8eP" name="validator.part_lot.single_part">
<unit id="BNQk2e7" name="validator.part_lot.single_part">
<segment state="translated">
<source>validator.part_lot.single_part</source>
<target>Toto umístění může obsahovat pouze jeden díl, takže do něj nelze přídávat další!</target>
</segment>
</unit>
<unit id="A.TFhbb" name="validator.attachment.must_not_be_null">
<unit id="4gPskOG" name="validator.attachment.must_not_be_null">
<segment state="translated">
<source>validator.attachment.must_not_be_null</source>
<target>Musíte vybrat typ přílohy!</target>
</segment>
</unit>
<unit id=".lqKoij" name="validator.orderdetail.supplier_must_not_be_null">
<unit id="cDDVrWT" name="validator.orderdetail.supplier_must_not_be_null">
<segment state="translated">
<source>validator.orderdetail.supplier_must_not_be_null</source>
<target>Musíte si vybrat dodavatele!</target>
</segment>
</unit>
<unit id="bcNZzK." name="validator.measurement_unit.use_si_prefix_needs_unit">
<unit id="k5DDdB4" name="validator.measurement_unit.use_si_prefix_needs_unit">
<segment state="translated">
<source>validator.measurement_unit.use_si_prefix_needs_unit</source>
<target>Chcete-li povolit předpony SI, musíte nastavit symbol jednotky!</target>
</segment>
</unit>
<unit id="gZ5FFL1" name="part.ipn.must_be_unique">
<unit id="DuzIOCr" name="part.ipn.must_be_unique">
<segment state="translated">
<source>part.ipn.must_be_unique</source>
<target>Interní číslo dílu musí být jedinečné. {{ value }} se již používá!</target>
</segment>
</unit>
<unit id="P31Yg.d" name="validator.project.bom_entry.name_or_part_needed">
<unit id="Z4Kuuo2" name="validator.project.bom_entry.name_or_part_needed">
<segment state="translated">
<source>validator.project.bom_entry.name_or_part_needed</source>
<target>Musíte vybrat díl pro položku BOM dílu nebo nastavit název pro položku BOM bez dílu.</target>
</segment>
</unit>
<unit id="5CEup_N" name="project.bom_entry.name_already_in_bom">
<unit id="WF_v4ih" name="project.bom_entry.name_already_in_bom">
<segment state="translated">
<source>project.bom_entry.name_already_in_bom</source>
<target>Již existuje položka BOM s tímto názvem!</target>
</segment>
</unit>
<unit id="jB3B50E" name="project.bom_entry.part_already_in_bom">
<unit id="5v4p85H" name="project.bom_entry.part_already_in_bom">
<segment state="translated">
<source>project.bom_entry.part_already_in_bom</source>
<target>Tento díl již existuje v tomto BOM!</target>
</segment>
</unit>
<unit id="NdkzP1n" name="project.bom_entry.mountnames_quantity_mismatch">
<unit id="3lM32Tw" name="project.bom_entry.mountnames_quantity_mismatch">
<segment state="translated">
<source>project.bom_entry.mountnames_quantity_mismatch</source>
<target>Počet názvů sestav musí odpovídat počtu komponent v BOM!</target>
</segment>
</unit>
<unit id="8teRCgR" name="project.bom_entry.can_not_add_own_builds_part">
<unit id="x47D5WT" name="project.bom_entry.can_not_add_own_builds_part">
<segment state="translated">
<source>project.bom_entry.can_not_add_own_builds_part</source>
<target>Seznam BOM projektu nelze přidat do BOM.</target>
</segment>
</unit>
<unit id="asBxPxe" name="project.bom_has_to_include_all_subelement_parts">
<unit id="2x2XDI_" name="project.bom_has_to_include_all_subelement_parts">
<segment state="translated">
<source>project.bom_has_to_include_all_subelement_parts</source>
<target>BOM projektu musí obsahovat všechny výrobní díly dílčích projektů. Díl %part_name% projektu %project_name% chybí!</target>
</segment>
</unit>
<unit id="uxaE9Ct" name="project.bom_entry.price_not_allowed_on_parts">
<unit id="U9b1EzD" name="project.bom_entry.price_not_allowed_on_parts">
<segment state="translated">
<source>project.bom_entry.price_not_allowed_on_parts</source>
<target>U položek komponent BOM nelze nastavit cenu. Zadejte cenu samotného dílu.</target>
</segment>
</unit>
<unit id="xZ68Nzl" name="validator.project_build.lot_bigger_than_needed">
<unit id="ID056SR" name="validator.project_build.lot_bigger_than_needed">
<segment state="translated">
<source>validator.project_build.lot_bigger_than_needed</source>
<target>Zvolili jste větší množství pro vychystávání, než je nutné. Odstraňte přebytečné množství</target>
</segment>
</unit>
<unit id="68_.V_X" name="validator.project_build.lot_smaller_than_needed">
<unit id="6hV5UqD" name="validator.project_build.lot_smaller_than_needed">
<segment state="translated">
<source>validator.project_build.lot_smaller_than_needed</source>
<target>Zvolili jste menší množství k odebrání, než je potřeba pro sestavení! Přidejte další množství.</target>
</segment>
</unit>
<unit id="yZGS8uZ" name="part.name.must_match_category_regex">
<unit id="G9ZKt.4" name="part.name.must_match_category_regex">
<segment state="translated">
<source>part.name.must_match_category_regex</source>
<target>Název komponenty neodpovídá regulárnímu výrazu zadanému pro kategorii: %regex%</target>
</segment>
</unit>
<unit id="Q8wP5Jd" name="validator.attachment.name_not_blank">
<unit id="m8kMFhf" name="validator.attachment.name_not_blank">
<segment state="translated">
<source>validator.attachment.name_not_blank</source>
<target>Vyberte hodnotu nebo nahrajte soubor, aby se jeho název automaticky použil jako název této přílohy.</target>
</segment>
</unit>
<unit id="DH0IkNR" name="validator.part_lot.owner_must_match_storage_location_owner">
<unit id="nwGaNBW" name="validator.part_lot.owner_must_match_storage_location_owner">
<segment state="translated">
<source>validator.part_lot.owner_must_match_storage_location_owner</source>
<target>Vlastník inventáře této komponenty a vybrané umístění se musí shodovat (%owner_name%)!</target>
</segment>
</unit>
<unit id="TzySicw" name="validator.part_lot.owner_must_not_be_anonymous">
<unit id="HXSz3nQ" name="validator.part_lot.owner_must_not_be_anonymous">
<segment state="translated">
<source>validator.part_lot.owner_must_not_be_anonymous</source>
<target>Vlastníkem nemůže být anonymní uživatel!</target>
</segment>
</unit>
<unit id="GthNWUb" name="validator.part_association.must_set_an_value_if_type_is_other">
<unit id="N8aA0Uh" name="validator.part_association.must_set_an_value_if_type_is_other">
<segment state="translated">
<source>validator.part_association.must_set_an_value_if_type_is_other</source>
<target>Pokud nastavíte typ na "jiný", musíte pro něj nastavit popisnou hodnotu!</target>
</segment>
</unit>
<unit id="Be4Im81" name="validator.part_association.part_cannot_be_associated_with_itself">
<unit id="9VYNZ4v" name="validator.part_association.part_cannot_be_associated_with_itself">
<segment state="translated">
<source>validator.part_association.part_cannot_be_associated_with_itself</source>
<target>Díl nemůže být spojen sám se sebou!</target>
</segment>
</unit>
<unit id="q5Ej6Xm" name="validator.part_association.already_exists">
<unit id="csc1PNn" name="validator.part_association.already_exists">
<segment state="translated">
<source>validator.part_association.already_exists</source>
<target>Asociace s tímto dílem již existuje!</target>
</segment>
</unit>
<unit id="HbI5bga" name="validator.part_lot.vendor_barcode_must_be_unique">
<unit id="sfW4NYE" name="validator.part_lot.vendor_barcode_must_be_unique">
<segment state="translated">
<source>validator.part_lot.vendor_barcode_must_be_unique</source>
<target>Tato hodnota čárového kódu dodavatele již byla použita v jiném inventáře. Čárový kód musí být jedinečný!</target>
</segment>
</unit>
<unit id="ufQJh7E" name="validator.year_2038_bug_on_32bit">
<unit id="o1qmPUm" name="validator.year_2038_bug_on_32bit">
<segment state="translated">
<source>validator.year_2038_bug_on_32bit</source>
<target>Kvůli technickým omezením není možné na 32bitových systémech vybrat datumpo 19.1.2038!</target>
</segment>
</unit>
<unit id="89nojXY" name="validator.fileSize.invalidFormat">
<segment state="translated">
<source>validator.fileSize.invalidFormat</source>
<target>Neplatný formát velikosti souboru. Použijte celé číslo a jako příponu K, M, G pro kilobajty, megabajty nebo gigabajty.</target>
</segment>
</unit>
<unit id="iXcU7ce" name="validator.invalid_range">
<segment state="translated">
<source>validator.invalid_range</source>
<target>Zadaný rozsah není platný!</target>
</segment>
</unit>
<unit id="m4gp2P_" name="validator.google_code.wrong_code">
<segment state="translated">
<source>validator.google_code.wrong_code</source>
<target>Neplatný kód. Zkontrolujte, zda je vaše ověřovací aplikace správně nastavena a zda je čas správně nastaven jak na serveru, tak na ověřovacím zařízení.</target>
</segment>
</unit>
</file>
</xliff>