From e3dd7ba360e288e022e95de1b9e270234cdb53e7 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 12 May 2024 00:03:34 +0000 Subject: [PATCH] bug fixes --- .github/workflows/greetings.yml | 2 +- Admin/Install/Media.install.json | 16 ------------- Admin/Install/Tag.install.json | 23 +++++++++++++++++++ Admin/Install/{Media.php => Tag.php} | 6 ++--- Controller/ApiController.php | 2 +- .../Attribute/ContractAttributeTypeMapper.php | 2 +- info.json | 4 ++-- 7 files changed, 31 insertions(+), 24 deletions(-) delete mode 100755 Admin/Install/Media.install.json create mode 100644 Admin/Install/Tag.install.json rename Admin/Install/{Media.php => Tag.php} (85%) mode change 100755 => 100644 diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index adb8716..75cb759 100755 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -9,5 +9,5 @@ jobs: - uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: 'Thank you for createing this issue. We will check it as soon as possible.' + issue-message: 'Thank you for creating this issue. We will check it as soon as possible.' pr-message: 'Thank you for your pull request. We will check it as soon as possible.' diff --git a/Admin/Install/Media.install.json b/Admin/Install/Media.install.json deleted file mode 100755 index ab03a33..0000000 --- a/Admin/Install/Media.install.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "type": "type", - "name": "contract", - "l11n": [ - { - "title": "Contract", - "lang": "en" - }, - { - "title": "Vertrag", - "lang": "de" - } - ] - } -] \ No newline at end of file diff --git a/Admin/Install/Tag.install.json b/Admin/Install/Tag.install.json new file mode 100644 index 0000000..e8f6c28 --- /dev/null +++ b/Admin/Install/Tag.install.json @@ -0,0 +1,23 @@ +[ + { + "name": "contract", + "l11n": { + "en": "Contract", + "de": "Vertrag" + } + }, + { + "name": "leasing", + "l11n": { + "en": "Leasing", + "de": "Leasing" + } + }, + { + "name": "insurance", + "l11n": { + "en": "Insurance", + "de": "Versicherung" + } + } +] diff --git a/Admin/Install/Media.php b/Admin/Install/Tag.php old mode 100755 new mode 100644 similarity index 85% rename from Admin/Install/Media.php rename to Admin/Install/Tag.php index 1d68565..2c01b1e --- a/Admin/Install/Media.php +++ b/Admin/Install/Tag.php @@ -17,14 +17,14 @@ namespace Modules\ContractManagement\Admin\Install; use phpOMS\Application\ApplicationAbstract; /** - * Media class. + * Tag class. * * @package Modules\ContractManagement\Admin\Install * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ -class Media +class Tag { /** * Install media providing @@ -38,6 +38,6 @@ class Media */ public static function install(ApplicationAbstract $app, string $path) : void { - \Modules\Media\Admin\Installer::installExternal($app, ['path' => __DIR__ . '/Media.install.json']); + \Modules\Tag\Admin\Installer::installExternal($app, ['path' => __DIR__ . '/Tag.install.json']); } } diff --git a/Controller/ApiController.php b/Controller/ApiController.php index d785368..859db76 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -175,7 +175,7 @@ final class ApiController extends Controller virtualPath: $path, pathSettings: PathSettings::FILE_PATH, readContent: true, - type: $request->getDataInt('type'), + tag: $request->getDataInt('tag'), rel: $contract->id, mapper: ContractMapper::class, field: 'files' diff --git a/Models/Attribute/ContractAttributeTypeMapper.php b/Models/Attribute/ContractAttributeTypeMapper.php index 2731bd6..f00cb27 100644 --- a/Models/Attribute/ContractAttributeTypeMapper.php +++ b/Models/Attribute/ContractAttributeTypeMapper.php @@ -42,7 +42,7 @@ final class ContractAttributeTypeMapper extends DataMapperFactory 'contractmgmt_attr_type_datatype' => ['name' => 'contractmgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'], 'contractmgmt_attr_type_fields' => ['name' => 'contractmgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'], 'contractmgmt_attr_type_custom' => ['name' => 'contractmgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'], - 'contractmgmt_attr_type_repeatable' => ['name' => 'contractmgmt_attr_type_repeatable', 'type' => 'bool', 'internal' => 'repeatable'], + 'contractmgmt_attr_type_repeatable' => ['name' => 'contractmgmt_attr_type_repeatable', 'type' => 'bool', 'internal' => 'isRepeatable'], 'contractmgmt_attr_type_internal' => ['name' => 'contractmgmt_attr_type_internal', 'type' => 'bool', 'internal' => 'isInternal'], 'contractmgmt_attr_type_pattern' => ['name' => 'contractmgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'], 'contractmgmt_attr_type_required' => ['name' => 'contractmgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'], diff --git a/info.json b/info.json index 3e6a4a1..2642d51 100755 --- a/info.json +++ b/info.json @@ -26,8 +26,8 @@ "providing": { "Navigation": "*", "Admin": "*", - "Media": "*", - "Search": "*" + "Search": "*", + "Tag": "*" }, "load": [ {