From b77a078db7e4332929380a2be4143aa97e11ae2e Mon Sep 17 00:00:00 2001 From: Kamil Date: Thu, 22 Aug 2024 10:00:51 +0200 Subject: [PATCH 1/6] #27 - feat: added faq page --- app/Http/Controllers/Public/FaqController.php | 20 +++++ resources/js/Pages/Public/Course/Index.vue | 9 ++- resources/js/Pages/Public/Faq.vue | 73 +++++++++++++++++++ resources/js/Pages/Public/News/News.vue | 4 +- routes/web.php | 2 + 5 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 app/Http/Controllers/Public/FaqController.php create mode 100644 resources/js/Pages/Public/Faq.vue diff --git a/app/Http/Controllers/Public/FaqController.php b/app/Http/Controllers/Public/FaqController.php new file mode 100644 index 00000000..1eb1da02 --- /dev/null +++ b/app/Http/Controllers/Public/FaqController.php @@ -0,0 +1,20 @@ + $faqs, + ]); + } +} diff --git a/resources/js/Pages/Public/Course/Index.vue b/resources/js/Pages/Public/Course/Index.vue index 67f5f2dd..f325636c 100644 --- a/resources/js/Pages/Public/Course/Index.vue +++ b/resources/js/Pages/Public/Course/Index.vue @@ -2,7 +2,7 @@ import PublicLayout from '@/Layouts/PublicLayout.vue' import BackgroundGrid from '@/Components/BackgroundGrid.vue' import SectionHeader from '@/Components/SectionHeader.vue' -import { ArrowRightCircleIcon } from '@heroicons/vue/24/outline' +import { ArrowRightCircleIcon, NoSymbolIcon } from '@heroicons/vue/24/outline' import TableWrapper from '@/Shared/Components/Table/Public/TableWrapper.vue' import TableHeader from '@/Shared/Components/Table/Public/TableHeader.vue' import TableRow from '@/Shared/Components/Table/Public/TableRow.vue' @@ -76,6 +76,13 @@ defineProps({ + +
+ +

+ Brak kursów +

+
diff --git a/resources/js/Pages/Public/Faq.vue b/resources/js/Pages/Public/Faq.vue new file mode 100644 index 00000000..19ef6e66 --- /dev/null +++ b/resources/js/Pages/Public/Faq.vue @@ -0,0 +1,73 @@ + + + diff --git a/resources/js/Pages/Public/News/News.vue b/resources/js/Pages/Public/News/News.vue index 932496a1..df9360a2 100644 --- a/resources/js/Pages/Public/News/News.vue +++ b/resources/js/Pages/Public/News/News.vue @@ -1,7 +1,7 @@ -
-
+
+
{{ faq.question }}
-
- -
-
- -
-
+

From 1b564a879770987b38161c962d48a80007513730 Mon Sep 17 00:00:00 2001 From: Kamil Date: Fri, 23 Aug 2024 14:41:05 +0200 Subject: [PATCH 4/6] #27 - fix: code review frontend fixes --- resources/js/Pages/Public/Faq.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/resources/js/Pages/Public/Faq.vue b/resources/js/Pages/Public/Faq.vue index ff097fc5..7787131c 100644 --- a/resources/js/Pages/Public/Faq.vue +++ b/resources/js/Pages/Public/Faq.vue @@ -2,7 +2,7 @@ import PublicLayout from '@/Layouts/PublicLayout.vue' import BackgroundGrid from '@/Components/BackgroundGrid.vue' import SectionHeader from '@/Components/SectionHeader.vue' -import { NoSymbolIcon } from '@heroicons/vue/24/outline' +import { NoSymbolIcon, QuestionMarkCircleIcon } from '@heroicons/vue/24/outline' import { Head } from '@inertiajs/inertia-vue3' import DOMPurify from 'dompurify' @@ -28,16 +28,17 @@ defineProps({ -

-
-
-
- {{ faq.question }} +
+
+
+
+ + {{ faq.question }}
-
+
-

+

From 66d9608af9337c6e003c8e2ce29c81c81ccf9475 Mon Sep 17 00:00:00 2001 From: Kamil Date: Mon, 26 Aug 2024 07:22:43 +0200 Subject: [PATCH 5/6] #27 - feat: added empty state section for public side of the site --- .../js/Pages/Dashboard/ContactInfo/Index.vue | 2 +- resources/js/Pages/Dashboard/Course/Index.vue | 2 +- .../js/Pages/Dashboard/CourseSemester/Index.vue | 2 +- .../Dashboard/CourseSemester/Student/Index.vue | 2 +- resources/js/Pages/Dashboard/FAQ/Index.vue | 2 +- resources/js/Pages/Dashboard/Field/Index.vue | 2 +- resources/js/Pages/Dashboard/News/Index.vue | 2 +- resources/js/Pages/Dashboard/Section/Show.vue | 2 +- resources/js/Pages/Dashboard/Semester/Index.vue | 2 +- resources/js/Pages/Dashboard/Student/Index.vue | 2 +- resources/js/Pages/Public/Course/Index.vue | 9 ++------- resources/js/Pages/Public/Faq.vue | 10 +++------- resources/js/Pages/Public/News/Index.vue | 15 +++++---------- .../Components/{ => EmptyState}/EmptyState.vue | 0 .../Components/EmptyState/Public/EmptyState.vue | 16 ++++++++++++++++ 15 files changed, 36 insertions(+), 34 deletions(-) rename resources/js/Shared/Components/{ => EmptyState}/EmptyState.vue (100%) create mode 100644 resources/js/Shared/Components/EmptyState/Public/EmptyState.vue diff --git a/resources/js/Pages/Dashboard/ContactInfo/Index.vue b/resources/js/Pages/Dashboard/ContactInfo/Index.vue index 4cecf82a..900d3c60 100644 --- a/resources/js/Pages/Dashboard/ContactInfo/Index.vue +++ b/resources/js/Pages/Dashboard/ContactInfo/Index.vue @@ -6,7 +6,7 @@ import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import Pagination from '@/Shared/Components/Pagination.vue' import Button from '@/Shared/Components/Buttons/Button.vue' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import RemoveModal from '@/Shared/Modals/RemoveModal.vue' import { ref } from 'vue' import { PencilSquareIcon, XCircleIcon } from '@heroicons/vue/24/outline' diff --git a/resources/js/Pages/Dashboard/Course/Index.vue b/resources/js/Pages/Dashboard/Course/Index.vue index d6dfb606..c126275b 100644 --- a/resources/js/Pages/Dashboard/Course/Index.vue +++ b/resources/js/Pages/Dashboard/Course/Index.vue @@ -5,7 +5,7 @@ import TableWrapper from '@/Shared/Components/Table/TableWrapper.vue' import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import Button from '@/Shared/Components/Buttons/Button.vue' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import RemoveModal from '@/Shared/Modals/RemoveModal.vue' import { ref } from 'vue' import ManagementHeader from '@/Shared/Components/ManagementHeader.vue' diff --git a/resources/js/Pages/Dashboard/CourseSemester/Index.vue b/resources/js/Pages/Dashboard/CourseSemester/Index.vue index 14ce6972..fc33871b 100644 --- a/resources/js/Pages/Dashboard/CourseSemester/Index.vue +++ b/resources/js/Pages/Dashboard/CourseSemester/Index.vue @@ -5,7 +5,7 @@ import TableWrapper from '@/Shared/Components/Table/TableWrapper.vue' import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import Button from '@/Shared/Components/Buttons/Button.vue' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import RemoveModal from '@/Shared/Modals/RemoveModal.vue' import { ref } from 'vue' import ManagementHeader from '@/Shared/Components/ManagementHeader.vue' diff --git a/resources/js/Pages/Dashboard/CourseSemester/Student/Index.vue b/resources/js/Pages/Dashboard/CourseSemester/Student/Index.vue index a3baa681..09a04157 100644 --- a/resources/js/Pages/Dashboard/CourseSemester/Student/Index.vue +++ b/resources/js/Pages/Dashboard/CourseSemester/Student/Index.vue @@ -6,7 +6,7 @@ import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import Pagination from '@/Shared/Components/Pagination.vue' import Button from '@/Shared/Components/Buttons/Button.vue' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import RemoveModal from '@/Shared/Modals/RemoveModal.vue' import { ref, watch } from 'vue' import { Inertia } from '@inertiajs/inertia' diff --git a/resources/js/Pages/Dashboard/FAQ/Index.vue b/resources/js/Pages/Dashboard/FAQ/Index.vue index 2de00fed..a2a98fd6 100644 --- a/resources/js/Pages/Dashboard/FAQ/Index.vue +++ b/resources/js/Pages/Dashboard/FAQ/Index.vue @@ -5,7 +5,7 @@ import TableWrapper from '@/Shared/Components/Table/TableWrapper.vue' import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import Button from '@/Shared/Components/Buttons/Button.vue' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import RemoveModal from '@/Shared/Modals/RemoveModal.vue' import { ref } from 'vue' import ManagementHeader from '@/Shared/Components/ManagementHeader.vue' diff --git a/resources/js/Pages/Dashboard/Field/Index.vue b/resources/js/Pages/Dashboard/Field/Index.vue index 035d64f9..c07a5f3c 100644 --- a/resources/js/Pages/Dashboard/Field/Index.vue +++ b/resources/js/Pages/Dashboard/Field/Index.vue @@ -5,7 +5,7 @@ import TableWrapper from '@/Shared/Components/Table/TableWrapper.vue' import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import Button from '@/Shared/Components/Buttons/Button.vue' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import RemoveModal from '@/Shared/Modals/RemoveModal.vue' import { ref } from 'vue' import ManagementHeader from '@/Shared/Components/ManagementHeader.vue' diff --git a/resources/js/Pages/Dashboard/News/Index.vue b/resources/js/Pages/Dashboard/News/Index.vue index 995d456f..0203d246 100644 --- a/resources/js/Pages/Dashboard/News/Index.vue +++ b/resources/js/Pages/Dashboard/News/Index.vue @@ -6,7 +6,7 @@ import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import Pagination from '@/Shared/Components/Pagination.vue' import Button from '@/Shared/Components/Buttons/Button.vue' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import RemoveModal from '@/Shared/Modals/RemoveModal.vue' import { ref, watch } from 'vue' import { Inertia } from '@inertiajs/inertia' diff --git a/resources/js/Pages/Dashboard/Section/Show.vue b/resources/js/Pages/Dashboard/Section/Show.vue index e0413428..d24fee68 100644 --- a/resources/js/Pages/Dashboard/Section/Show.vue +++ b/resources/js/Pages/Dashboard/Section/Show.vue @@ -9,7 +9,7 @@ import { useForm } from '@inertiajs/inertia-vue3' import ManagementHeader from '@/Shared/Components/ManagementHeader.vue' import ManagementHeaderItem from '@/Shared/Components/ManagementHeaderItem.vue' import { PencilSquareIcon, XCircleIcon } from '@heroicons/vue/24/outline' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableHeader from '@/Shared/Components/Table/TableHeader.vue' diff --git a/resources/js/Pages/Dashboard/Semester/Index.vue b/resources/js/Pages/Dashboard/Semester/Index.vue index 787b0fd9..f1114241 100644 --- a/resources/js/Pages/Dashboard/Semester/Index.vue +++ b/resources/js/Pages/Dashboard/Semester/Index.vue @@ -5,7 +5,7 @@ import TableWrapper from '@/Shared/Components/Table/TableWrapper.vue' import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import Button from '@/Shared/Components/Buttons/Button.vue' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import RemoveModal from '@/Shared/Modals/RemoveModal.vue' import { ref } from 'vue' import { Method } from '@inertiajs/inertia' diff --git a/resources/js/Pages/Dashboard/Student/Index.vue b/resources/js/Pages/Dashboard/Student/Index.vue index 005b3580..dee5276e 100644 --- a/resources/js/Pages/Dashboard/Student/Index.vue +++ b/resources/js/Pages/Dashboard/Student/Index.vue @@ -6,7 +6,7 @@ import TableRow from '@/Shared/Components/Table/TableRow.vue' import TableCell from '@/Shared/Components/Table/TableCell.vue' import Pagination from '@/Shared/Components/Pagination.vue' import Button from '@/Shared/Components/Buttons/Button.vue' -import EmptyState from '@/Shared/Components/EmptyState.vue' +import EmptyState from '@/Shared/Components/EmptyState/EmptyState.vue' import RemoveModal from '@/Shared/Modals/RemoveModal.vue' import { ref, watch } from 'vue' import { Inertia } from '@inertiajs/inertia' diff --git a/resources/js/Pages/Public/Course/Index.vue b/resources/js/Pages/Public/Course/Index.vue index f325636c..7a4a61a5 100644 --- a/resources/js/Pages/Public/Course/Index.vue +++ b/resources/js/Pages/Public/Course/Index.vue @@ -2,7 +2,7 @@ import PublicLayout from '@/Layouts/PublicLayout.vue' import BackgroundGrid from '@/Components/BackgroundGrid.vue' import SectionHeader from '@/Components/SectionHeader.vue' -import { ArrowRightCircleIcon, NoSymbolIcon } from '@heroicons/vue/24/outline' +import { ArrowRightCircleIcon } from '@heroicons/vue/24/outline' import TableWrapper from '@/Shared/Components/Table/Public/TableWrapper.vue' import TableHeader from '@/Shared/Components/Table/Public/TableHeader.vue' import TableRow from '@/Shared/Components/Table/Public/TableRow.vue' @@ -77,12 +77,7 @@ defineProps({
-
- -

- Brak kursów -

-
+
diff --git a/resources/js/Pages/Public/Faq.vue b/resources/js/Pages/Public/Faq.vue index 7787131c..43522865 100644 --- a/resources/js/Pages/Public/Faq.vue +++ b/resources/js/Pages/Public/Faq.vue @@ -2,9 +2,10 @@ import PublicLayout from '@/Layouts/PublicLayout.vue' import BackgroundGrid from '@/Components/BackgroundGrid.vue' import SectionHeader from '@/Components/SectionHeader.vue' -import { NoSymbolIcon, QuestionMarkCircleIcon } from '@heroicons/vue/24/outline' +import { QuestionMarkCircleIcon } from '@heroicons/vue/24/outline' import { Head } from '@inertiajs/inertia-vue3' import DOMPurify from 'dompurify' +import EmptyState from '@/Shared/Components/EmptyState/Public/EmptyState.vue' defineProps({ faqs: Object, @@ -43,12 +44,7 @@ defineProps({
-
- -

- Brak pytań i odpowiedzi -

-
+
diff --git a/resources/js/Pages/Public/News/Index.vue b/resources/js/Pages/Public/News/Index.vue index e3fbc4d3..8b6f6a27 100644 --- a/resources/js/Pages/Public/News/Index.vue +++ b/resources/js/Pages/Public/News/Index.vue @@ -1,11 +1,11 @@ + + From d195d4552c299cee4294ae745a140372e3a09088 Mon Sep 17 00:00:00 2001 From: Krzysztof Rewak Date: Tue, 10 Sep 2024 15:56:34 +0200 Subject: [PATCH 6/6] - resolving conflicts --- app/Http/Controllers/Public/ContactController.php | 5 ----- resources/js/Pages/Public/Contact.vue | 9 --------- resources/js/Pages/Public/Faq.vue | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/app/Http/Controllers/Public/ContactController.php b/app/Http/Controllers/Public/ContactController.php index 61835275..e22b8ccf 100644 --- a/app/Http/Controllers/Public/ContactController.php +++ b/app/Http/Controllers/Public/ContactController.php @@ -18,12 +18,7 @@ public function __invoke(): Response $contactInfos = ContactInfo::query()->get(); return inertia("Public/Contact", [ - "title" => $settings->teacher_titles, - "name" => $settings->teacher_name, "email" => $settings->teacher_email, - "department" => $settings->department_name, - "university" => $settings->university_name, - "universityLogo" => asset("cwup-full.png"), "contactInfos" => $contactInfos->map(fn(ContactInfo $contactInfo): ContactInfoData => ContactInfoData::fromModel($contactInfo)), ]); } diff --git a/resources/js/Pages/Public/Contact.vue b/resources/js/Pages/Public/Contact.vue index 762ba99d..c46e0e35 100644 --- a/resources/js/Pages/Public/Contact.vue +++ b/resources/js/Pages/Public/Contact.vue @@ -7,15 +7,7 @@ import ContactItem from '@/Shared/Components/ContactItem.vue' import { NoSymbolIcon } from '@heroicons/vue/24/outline' defineProps({ - title: String, - name: String, email: String, - department: String, - university: String, - universityLogo: String, - sectionSettings: Object, - about: Array, - counters: Array, contactInfos: Array, }) @@ -36,7 +28,6 @@ defineProps({ Informacje kontaktowe. -
diff --git a/resources/js/Pages/Public/Faq.vue b/resources/js/Pages/Public/Faq.vue index 43522865..ef076bf2 100644 --- a/resources/js/Pages/Public/Faq.vue +++ b/resources/js/Pages/Public/Faq.vue @@ -25,7 +25,7 @@ defineProps({ FAQ