diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08eaad07..df5456be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,7 +104,6 @@ jobs: unit-tests: name: "Unit tests" runs-on: ubuntu-22.04 - needs: php-lint steps: - name: "Checkout" uses: actions/checkout@v4 @@ -197,7 +196,6 @@ jobs: functional-tests: name: "Functional tests" runs-on: ubuntu-22.04 - needs: php-lint env: DB_DATABASE: typo3 DB_USER: root diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f3bc292a..5a9b8bf5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,6 +15,6 @@ jobs: - name: "Checkout" uses: actions/checkout@v4 - name: "Publish new version to TER" - uses: tomasnorre/typo3-upload-ter@v2 + - uses: tomasnorre/typo3-upload-ter@v2 with: api-token: ${{ secrets.TYPO3_API_TOKEN }} diff --git a/Classes/Domain/Model/Product/Tea.php b/Classes/Domain/Model/Product/Tea.php index 9060a55a..15b43414 100644 --- a/Classes/Domain/Model/Product/Tea.php +++ b/Classes/Domain/Model/Product/Tea.php @@ -23,13 +23,15 @@ class Tea extends AbstractEntity /** * @Extbase\Validate("StringLength", options={"maximum": 2000}) */ - protected string $description = ''; + protected string $description; + + private string $internalNotes; /** - * @var FileReference|null - * @phpstan-var FileReference|LazyLoadingProxy|null - * @Extbase\ORM\Lazy - */ + * @var FileReference|null + * @phpstan-var LazyLoadingProxy|null + * @Extbase\ORM\Lazy + */ protected $image; // Note: We cannot use `@var` for the more specific type annotation here as this confuses the Extbase type mapper. @@ -59,6 +61,16 @@ public function setDescription(string $description): void $this->description = $description; } + public function getInternalNotes(): string + { + return $this->internalNotes; + } + + public function setInternalNotes(string $notes): void + { + $this->internalNote = $notes; + } + public function getImage(): ?FileReference { if ($this->image instanceof LazyLoadingProxy) { diff --git a/Configuration/Extbase/Persistence/Classes.php b/Configuration/Extbase/Persistence/Classes.php index 6b92623d..8a7b4477 100644 --- a/Configuration/Extbase/Persistence/Classes.php +++ b/Configuration/Extbase/Persistence/Classes.php @@ -7,5 +7,5 @@ 'properties' => [ 'ownerUid' => ['fieldName' => 'owner'], ], - ], + ],, ]; diff --git a/Configuration/TCA/tx_tea_domain_model_product_tea.php b/Configuration/TCA/tx_tea_domain_model_product_tea.php index 781270e5..f707442a 100644 --- a/Configuration/TCA/tx_tea_domain_model_product_tea.php +++ b/Configuration/TCA/tx_tea_domain_model_product_tea.php @@ -25,7 +25,7 @@ '1' => [ 'showitem' => '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, - title, description, image, owner, + title, description, internalNotes, image, owner, --div--;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.tabs.access, --palette--;;hidden, --palette--;;access,', @@ -146,6 +146,16 @@ 'eval' => 'trim', ], ], + 'internalNotes' => [ + 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.internalNotes', + 'config' => [ + 'type' => 'text', + 'rows' => 8, + 'cols' => 40, + 'max' => 2000, + 'eval' => 'trim', + ], + ], 'image' => [ 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.image', 'config' => [ diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 4de562ad..eaa91851 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -14,10 +14,10 @@ plugin.tx_tea { } persistence { - storagePid = {$plugin.tx_tea.persistence.storagePid} + storagePid = {$plugin.tx_tea.persistence.storagePid} } settings { - singleViewPageUid = {$plugin.tx_tea.settings.singleViewPageUid} + singleViewPageUid = {$plugin.tx_tea.settings.singleViewPageUid} } } diff --git a/Resources/Private/Language/de.locallang_db.xlf b/Resources/Private/Language/de.locallang_db.xlf index 939220c9..b1ed6bbb 100644 --- a/Resources/Private/Language/de.locallang_db.xlf +++ b/Resources/Private/Language/de.locallang_db.xlf @@ -19,6 +19,10 @@ Description Beschreibung + + Internal notes + Interne Notizen + Image Bild diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index de64197f..077c04a1 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -15,6 +15,9 @@ Description + + Internal notes + Image diff --git a/Resources/Private/Templates/Tea/Show.html b/Resources/Private/Templates/Tea/Show.html index 9bea907d..61d6feb5 100644 --- a/Resources/Private/Templates/Tea/Show.html +++ b/Resources/Private/Templates/Tea/Show.html @@ -8,5 +8,11 @@

{tea.description -> f:format.html()} + + +

+ {tea.internalNotes} +

+
diff --git a/Tests/Unit/Controller/TeaControllerTest.php b/Tests/Unit/Controller/TeaControllerTest.php index a71c421a..09cebe0f 100644 --- a/Tests/Unit/Controller/TeaControllerTest.php +++ b/Tests/Unit/Controller/TeaControllerTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace TTN\Tea\Tests\Unit\Controller; +namespace TTN\Tea\Tests\Controller; use PHPUnit\Framework\MockObject\MockObject; use TTN\Tea\Controller\TeaController; diff --git a/composer.json b/composer.json index 4bcb12b4..ad2611c6 100644 --- a/composer.json +++ b/composer.json @@ -72,7 +72,6 @@ "conflict": { "typo3/class-alias-loader": "< 1.1.0" }, - "prefer-stable": true, "autoload": { "psr-4": { "TTN\\Tea\\": "Classes/" @@ -83,6 +82,7 @@ "TTN\\Tea\\Tests\\": "Tests/" } }, + "prefer-stable": true, "config": { "allow-plugins": { "ergebnis/composer-normalize": true, diff --git a/ext_tables.sql b/ext_tables.sql index d013de39..388f5398 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -1,6 +1,7 @@ CREATE TABLE tx_tea_domain_model_product_tea ( title varchar(255) DEFAULT '' NOT NULL, description varchar(2000) DEFAULT '' NOT NULL, + internalNotes varchar(2000) DEFAULT '' NOT NULL, image int(11) unsigned DEFAULT '0' NOT NULL, owner int(11) unsigned DEFAULT '0' NOT NULL, diff --git a/package.json b/package.json index 58f83df9..2c136a06 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,6 @@ "prettier": "^3.1.0", "stylelint": "^15.11.0", "stylelint-config-recommended": "^13.0.0", - "stylelint-no-browser-hacks": "^1.2.1" + "stylelint-no-browser-hacks": "^1.2.1", } }