Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ OPENAI_API_KEY=!ChangeMe!
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
###< symfony/messenger ###

###> symfony/line-notify-notifier ###
# LINE_NOTIFY_DSN=linenotify://TOKEN@default
###< symfony/line-notify-notifier ###
1 change: 1 addition & 0 deletions .idea/app-sf.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions assets/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,36 @@ html {
font-size: 14px;
}

.app-footer {
@extend .mt-5;

&__links {
display: inline;
list-style: none;
padding: 0;
margin: 0;

li {
display: inline;
}

li:not(:last-child)::after {
content: "|";
}

li > a {
color: inherit;
text-decoration: none;
}

li > a:hover {
span {
text-decoration: underline;
}
}
}
}

// utils
.v-center {
height: 100vh;
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@
"symfony/framework-bundle": "7.2.*",
"symfony/http-client": "7.2.*",
"symfony/intl": "7.2.*",
"symfony/line-notify-notifier": "7.2.*",
"symfony/lock": "7.2.*",
"symfony/mailer": "7.2.*",
"symfony/messenger": "7.2.*",
"symfony/mime": "7.2.*",
"symfony/monolog-bundle": "^3.0",
"symfony/notifier": "7.2.*",
"symfony/password-hasher": "7.2.*",
"symfony/process": "7.2.*",
"symfony/runtime": "7.2.*",
Expand Down
151 changes: 150 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions config/packages/notifier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
framework:
notifier:
chatter_transports:
linenotify: "%env(LINE_NOTIFY_DSN)%"
texter_transports:
channel_policy:
urgent: ["chat/linenotify"]
high: ["chat/linenotify"]
medium: ["chat/linenotify"]
low: ["chat/linenotify"]
admin_recipients:
- { email: [email protected] }
5 changes: 5 additions & 0 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ security:
# login page
- { route: app_login, roles: PUBLIC_ACCESS }

# feedback page
# Note that we provide the feedback form in login page,
# so we need to allow public access to this page.
- { route: app_feedback, roles: PUBLIC_ACCESS }

# admin
- { path: ^/admin, roles: ROLE_ADMIN }

Expand Down
41 changes: 41 additions & 0 deletions migrations/Version20241006071505.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20241006071505 extends AbstractMigration
{
public function getDescription(): string
{
return 'Feedback Entity';
}

public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE feedback (id UUID NOT NULL, sender_id INT DEFAULT NULL, title TEXT NOT NULL, description TEXT NOT NULL, type VARCHAR(255) NOT NULL, metadata JSON NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, contact TEXT DEFAULT NULL, status VARCHAR(255) NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_D2294458F624B39D ON feedback (sender_id)');
$this->addSql('CREATE INDEX IDX_D22944588CDE5729 ON feedback (type)');
$this->addSql('CREATE INDEX IDX_D2294458F624B39D8CDE5729 ON feedback (sender_id, type)');
$this->addSql('CREATE INDEX IDX_D22944587B00651C ON feedback (status)');
$this->addSql('COMMENT ON COLUMN feedback.id IS \'(DC2Type:ulid)\'');
$this->addSql('COMMENT ON COLUMN feedback.created_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN feedback.updated_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('ALTER TABLE feedback ADD CONSTRAINT FK_D2294458F624B39D FOREIGN KEY (sender_id) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE feedback DROP CONSTRAINT FK_D2294458F624B39D');
$this->addSql('DROP TABLE feedback');
}
}
4 changes: 4 additions & 0 deletions src/Controller/Admin/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use App\Entity\Comment;
use App\Entity\CommentLikeEvent;
use App\Entity\Feedback;
use App\Entity\Group;
use App\Entity\HintOpenEvent;
use App\Entity\LoginEvent;
Expand Down Expand Up @@ -56,5 +57,8 @@ public function configureMenuItems(): iterable
yield MenuItem::linkToCrud('SolutionVideoEvent', 'fa fa-video', SolutionVideoEvent::class);
yield MenuItem::linkToCrud('HintOpenEvent', 'fa fa-lightbulb', HintOpenEvent::class);
yield MenuItem::linkToCrud('LoginEvent', 'fa fa-sign-in', LoginEvent::class);

yield MenuItem::section('Feedback');
yield MenuItem::linkToCrud('Feedback', 'fa fa-comments', Feedback::class);
}
}
Loading