From cebd5f27558565f0cb9941e8325483a48b76ac73 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 9 Oct 2023 22:06:38 +0000 Subject: [PATCH] update --- Admin/Installer.php | 2 +- Controller/ApiAttributeController.php | 3 ++- Theme/Backend/Lang/ar.lang.php | 8 ++++---- Theme/Backend/Lang/cs.lang.php | 8 ++++---- Theme/Backend/Lang/da.lang.php | 8 ++++---- Theme/Backend/Lang/el.lang.php | 8 ++++---- Theme/Backend/Lang/es.lang.php | 8 ++++---- Theme/Backend/Lang/fi.lang.php | 8 ++++---- Theme/Backend/Lang/fr.lang.php | 8 ++++---- Theme/Backend/Lang/hu.lang.php | 8 ++++---- Theme/Backend/Lang/it.lang.php | 8 ++++---- Theme/Backend/Lang/ja.lang.php | 8 ++++---- Theme/Backend/Lang/ko.lang.php | 8 ++++---- Theme/Backend/Lang/no.lang.php | 8 ++++---- Theme/Backend/Lang/pl.lang.php | 8 ++++---- Theme/Backend/Lang/pt.lang.php | 8 ++++---- Theme/Backend/Lang/ru.lang.php | 8 ++++---- Theme/Backend/Lang/sv.lang.php | 8 ++++---- Theme/Backend/Lang/th.lang.php | 8 ++++---- Theme/Backend/Lang/tr.lang.php | 8 ++++---- Theme/Backend/Lang/uk.lang.php | 8 ++++---- Theme/Backend/Lang/zh.lang.php | 8 ++++---- .../Controller/Api/ApiControllerAttributeTrait.php | 14 +++++++------- .../Controller/Api/ApiControllerContractTrait.php | 4 ++-- .../Api/ApiControllerContractTypeTrait.php | 4 ++-- 25 files changed, 94 insertions(+), 93 deletions(-) diff --git a/Admin/Installer.php b/Admin/Installer.php index 6211996..324a179 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -90,7 +90,7 @@ final class Installer extends InstallerAbstract $module->apiContractTypeCreate($request, $response); - $responseData = $response->get(''); + $responseData = $response->getData(''); if (!\is_array($responseData)) { continue; } diff --git a/Controller/ApiAttributeController.php b/Controller/ApiAttributeController.php index 7164c97..865fef1 100644 --- a/Controller/ApiAttributeController.php +++ b/Controller/ApiAttributeController.php @@ -61,7 +61,8 @@ final class ApiAttributeController extends Controller return; } - $attribute = $this->createAttributeFromRequest($request); + $type = ContractAttributeTypeMapper::get()->where('id', (int) $request->getData('type'))->execute(); + $attribute = $this->createAttributeFromRequest($request, $type); $this->createModel($request->header->account, $attribute, ContractAttributeMapper::class, 'attribute', $request->getOrigin()); $this->createStandardCreateResponse($request, $response, $attribute); } diff --git a/Theme/Backend/Lang/ar.lang.php b/Theme/Backend/Lang/ar.lang.php index 80ef66d..4851489 100755 --- a/Theme/Backend/Lang/ar.lang.php +++ b/Theme/Backend/Lang/ar.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'اتفافية', 'ContractTypes' => '', 'Contracts' => 'انكماش', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/cs.lang.php b/Theme/Backend/Lang/cs.lang.php index 6c30429..8a481c5 100755 --- a/Theme/Backend/Lang/cs.lang.php +++ b/Theme/Backend/Lang/cs.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Smlouva', 'ContractTypes' => '', 'Contracts' => 'Smlouvy', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/da.lang.php b/Theme/Backend/Lang/da.lang.php index 9b0e8ea..3152de0 100755 --- a/Theme/Backend/Lang/da.lang.php +++ b/Theme/Backend/Lang/da.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Kontrakt', 'ContractTypes' => '', 'Contracts' => 'Kontrakter', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/el.lang.php b/Theme/Backend/Lang/el.lang.php index c5241d5..7f28592 100755 --- a/Theme/Backend/Lang/el.lang.php +++ b/Theme/Backend/Lang/el.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Σύμβαση', 'ContractTypes' => '', 'Contracts' => 'Συμβάσεις', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/es.lang.php b/Theme/Backend/Lang/es.lang.php index 59dc79b..9340859 100755 --- a/Theme/Backend/Lang/es.lang.php +++ b/Theme/Backend/Lang/es.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Contrato', 'ContractTypes' => '', 'Contracts' => 'Contrato', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/fi.lang.php b/Theme/Backend/Lang/fi.lang.php index e50be12..c935283 100755 --- a/Theme/Backend/Lang/fi.lang.php +++ b/Theme/Backend/Lang/fi.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Sopimus', 'ContractTypes' => '', 'Contracts' => 'Sopimukset', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/fr.lang.php b/Theme/Backend/Lang/fr.lang.php index 477bfd4..94ec772 100755 --- a/Theme/Backend/Lang/fr.lang.php +++ b/Theme/Backend/Lang/fr.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Contracter', 'ContractTypes' => '', 'Contracts' => 'Contrats', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/hu.lang.php b/Theme/Backend/Lang/hu.lang.php index 87c78ab..c5524ed 100755 --- a/Theme/Backend/Lang/hu.lang.php +++ b/Theme/Backend/Lang/hu.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Szerződés', 'ContractTypes' => '', 'Contracts' => 'Szerződések', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/it.lang.php b/Theme/Backend/Lang/it.lang.php index 314cb96..4f3387a 100755 --- a/Theme/Backend/Lang/it.lang.php +++ b/Theme/Backend/Lang/it.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Contrarre', 'ContractTypes' => '', 'Contracts' => 'Contratti', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/ja.lang.php b/Theme/Backend/Lang/ja.lang.php index 32f9750..4770df1 100755 --- a/Theme/Backend/Lang/ja.lang.php +++ b/Theme/Backend/Lang/ja.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => '契約', 'ContractTypes' => '', 'Contracts' => '契約', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/ko.lang.php b/Theme/Backend/Lang/ko.lang.php index 6ec3194..fc3e8d0 100755 --- a/Theme/Backend/Lang/ko.lang.php +++ b/Theme/Backend/Lang/ko.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => '계약', 'ContractTypes' => '', 'Contracts' => '계약서', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/no.lang.php b/Theme/Backend/Lang/no.lang.php index 29b9848..ee3fc04 100755 --- a/Theme/Backend/Lang/no.lang.php +++ b/Theme/Backend/Lang/no.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Kontrakt', 'ContractTypes' => '', 'Contracts' => 'Kontrakter', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/pl.lang.php b/Theme/Backend/Lang/pl.lang.php index 4ba5cd8..73f6060 100755 --- a/Theme/Backend/Lang/pl.lang.php +++ b/Theme/Backend/Lang/pl.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Kontrakt', 'ContractTypes' => '', 'Contracts' => 'Kontrakty', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/pt.lang.php b/Theme/Backend/Lang/pt.lang.php index f496d1d..7548298 100755 --- a/Theme/Backend/Lang/pt.lang.php +++ b/Theme/Backend/Lang/pt.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Contrato', 'ContractTypes' => '', 'Contracts' => 'Contratos', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/ru.lang.php b/Theme/Backend/Lang/ru.lang.php index 747a72c..c58dc8d 100755 --- a/Theme/Backend/Lang/ru.lang.php +++ b/Theme/Backend/Lang/ru.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Договор', 'ContractTypes' => '', 'Contracts' => 'Контракты', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/sv.lang.php b/Theme/Backend/Lang/sv.lang.php index 610756f..ed3dfa2 100755 --- a/Theme/Backend/Lang/sv.lang.php +++ b/Theme/Backend/Lang/sv.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Avtal', 'ContractTypes' => '', 'Contracts' => 'Kontrakt', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/th.lang.php b/Theme/Backend/Lang/th.lang.php index 37e7bef..a3c63f5 100755 --- a/Theme/Backend/Lang/th.lang.php +++ b/Theme/Backend/Lang/th.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'สัญญา', 'ContractTypes' => '', 'Contracts' => 'สัญญา', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/tr.lang.php b/Theme/Backend/Lang/tr.lang.php index 684deae..525afe6 100755 --- a/Theme/Backend/Lang/tr.lang.php +++ b/Theme/Backend/Lang/tr.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Sözleşme', 'ContractTypes' => '', 'Contracts' => 'Sözleşme', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/uk.lang.php b/Theme/Backend/Lang/uk.lang.php index f50f3d2..950b46f 100755 --- a/Theme/Backend/Lang/uk.lang.php +++ b/Theme/Backend/Lang/uk.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => 'Договір', 'ContractTypes' => '', 'Contracts' => 'Контракти', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/Theme/Backend/Lang/zh.lang.php b/Theme/Backend/Lang/zh.lang.php index 2082624..39646f5 100755 --- a/Theme/Backend/Lang/zh.lang.php +++ b/Theme/Backend/Lang/zh.lang.php @@ -13,17 +13,17 @@ declare(strict_types=1); return ['ContractManagement' => [ - 'Account' => '#VALUE!', + 'Account' => '', 'AutoRenewal' => '', 'Contract' => '合同', 'ContractTypes' => '', 'Contracts' => '合同', 'Costs' => '', 'Description' => '', - 'End' => '#VALUE!', - 'Files' => '#VALUE!', + 'End' => '', + 'Files' => '', 'Name' => '', - 'Overview' => '#VALUE!', + 'Overview' => '', 'Parties' => '', 'Start' => '', 'Termination' => '', diff --git a/tests/Controller/Api/ApiControllerAttributeTrait.php b/tests/Controller/Api/ApiControllerAttributeTrait.php index 99fecbb..af49e8f 100644 --- a/tests/Controller/Api/ApiControllerAttributeTrait.php +++ b/tests/Controller/Api/ApiControllerAttributeTrait.php @@ -38,7 +38,7 @@ trait ApiControllerAttributeTrait $request->setData('language', ISO639x1Enum::_EN); $this->attrModule->apiContractAttributeTypeCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** @@ -56,7 +56,7 @@ trait ApiControllerAttributeTrait $request->setData('language', ISO639x1Enum::_DE); $this->attrModule->apiContractAttributeTypeL11nCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** @@ -76,7 +76,7 @@ trait ApiControllerAttributeTrait $request->setData('country', ISO3166TwoEnum::_DEU); $this->attrModule->apiContractAttributeValueCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** @@ -95,7 +95,7 @@ trait ApiControllerAttributeTrait $request->setData('country', ISO3166TwoEnum::_DEU); $this->attrModule->apiContractAttributeValueCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** @@ -114,7 +114,7 @@ trait ApiControllerAttributeTrait $request->setData('country', ISO3166TwoEnum::_DEU); $this->attrModule->apiContractAttributeValueCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** @@ -133,7 +133,7 @@ trait ApiControllerAttributeTrait $request->setData('country', ISO3166TwoEnum::_DEU); $this->attrModule->apiContractAttributeValueCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** @@ -151,7 +151,7 @@ trait ApiControllerAttributeTrait $request->setData('type', '1'); $this->attrModule->apiContractAttributeCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** diff --git a/tests/Controller/Api/ApiControllerContractTrait.php b/tests/Controller/Api/ApiControllerContractTrait.php index 3996c65..f60cb3e 100644 --- a/tests/Controller/Api/ApiControllerContractTrait.php +++ b/tests/Controller/Api/ApiControllerContractTrait.php @@ -39,7 +39,7 @@ trait ApiControllerContractTrait $request->setData('type', '1'); $this->module->apiContractCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** @@ -86,7 +86,7 @@ trait ApiControllerContractTrait ]); $this->module->apiContractDocumentCreate($request, $response); - self::assertCount(1, $response->get('')['response']); + self::assertCount(1, $response->getDataArray('')['response']); } /** diff --git a/tests/Controller/Api/ApiControllerContractTypeTrait.php b/tests/Controller/Api/ApiControllerContractTypeTrait.php index a3cfcfb..2c916af 100644 --- a/tests/Controller/Api/ApiControllerContractTypeTrait.php +++ b/tests/Controller/Api/ApiControllerContractTypeTrait.php @@ -36,7 +36,7 @@ trait ApiControllerContractTypeTrait $request->setData('language', ISO639x1Enum::_EN); $this->typeModule->apiContractTypeCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** @@ -70,7 +70,7 @@ trait ApiControllerContractTypeTrait $request->setData('language', ISO639x1Enum::_DE); $this->typeModule->apiContractTypeL11nCreate($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /**