Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 2415c1a

Browse files
committed
feat(feedback/admin): Allow commenting on feedback
1 parent 95df0f0 commit 2415c1a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/Controller/Admin/FeedbackCrudController.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
1919
use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
2020
use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
21+
use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
2122
use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField;
2223
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
2324
use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator;
@@ -41,15 +42,16 @@ public function configureFields(string $pageName): iterable
4142
{
4243
return [
4344
IdField::new('id')->setDisabled(),
44-
AssociationField::new('sender')->hideWhenUpdating(),
45-
TextField::new('title')->hideWhenUpdating(),
46-
TextEditorField::new('description')->hideWhenUpdating(),
4745
ChoiceField::new('type')->hideWhenUpdating(),
48-
TextField::new('contact')->hideWhenUpdating(),
49-
ArrayField::new('metadata')->hideWhenUpdating(),
46+
AssociationField::new('sender')->hideOnIndex()->hideWhenUpdating(),
47+
TextField::new('title')->hideWhenUpdating(),
48+
TextEditorField::new('description')->hideOnIndex()->hideWhenUpdating(),
49+
TextField::new('contact')->hideOnIndex()->hideWhenUpdating(),
50+
ArrayField::new('metadata')->hideOnIndex()->hideWhenUpdating(),
51+
TextareaField::new('comment', 'feedback.comment')->hideOnIndex(),
5052
ChoiceField::new('status'),
5153
DateTimeField::new('createdAt', 'Created at')->setDisabled(),
52-
DateTimeField::new('updatedAt', 'Updated at')->setDisabled(),
54+
DateTimeField::new('updatedAt', 'Updated at')->hideOnIndex()->setDisabled(),
5355
];
5456
}
5557

translations/messages.zh_TW.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ feedback:
136136
closed: 已關閉
137137

138138
marked: 已經將選擇的回饋標記為「%status%」。
139+
comment: 回饋備註
139140

140141
notification:
141142
on-feedback-created:

0 commit comments

Comments
 (0)