From 28a4ea45d536381cc782a91be1f24e64d3297935 Mon Sep 17 00:00:00 2001 From: Florin Zarafu <48326563+FlorinZarafu@users.noreply.github.com> Date: Wed, 28 Jun 2023 15:25:05 +0300 Subject: [PATCH] Projects Map, Articles, Gale Regionale (#62) * update regional controller * added texts * update articles pages * update regional pages * added map component * update cards components * added components --- app/Http/Controllers/RegionalController.php | 56 +++--- resources/js/Components/cards/ArticleCard.vue | 2 +- resources/js/Components/cards/Edition.vue | 57 ++++++ resources/js/Components/cards/ProjectCard.vue | 2 +- .../js/Components/cards/RegionalProject.vue | 2 +- resources/js/Components/maps/Map.vue | 146 +++++++++++++++ .../js/Components/modals/ModalAction.vue | 16 +- resources/js/Components/timers/Countdown.vue | 7 + .../js/Pages/Public/Articles/Article.vue | 2 +- .../js/Pages/Public/Articles/Articles.vue | 2 +- .../js/Pages/Public/Projects/Projects.vue | 56 +++++- .../js/Pages/Public/Regional/LastEdition.vue | 2 +- .../js/Pages/Public/Regional/Regional.vue | 167 +++--------------- resources/js/locales/ro.js | 6 +- 14 files changed, 332 insertions(+), 191 deletions(-) create mode 100644 resources/js/Components/cards/Edition.vue create mode 100644 resources/js/Components/maps/Map.vue diff --git a/app/Http/Controllers/RegionalController.php b/app/Http/Controllers/RegionalController.php index e7940930..0b9d2141 100644 --- a/app/Http/Controllers/RegionalController.php +++ b/app/Http/Controllers/RegionalController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers; +use App\Models\County; use App\Models\Project; use Inertia\Inertia; @@ -26,33 +27,42 @@ public function index() ], ]; - $articles = [ + $regions = [ [ 'id' => 1, - 'img' => '/images/project_img.png', - 'author' => 'Ion Popescu', - 'name' => 'Importanța educației remediare în România în timpul pandemiei', - 'team' => 'Echipa BCR', - 'content' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto accusantium praesentium eius, ut atque fuga culpa, similique sequi cum eos quis dolorum.', - 'date' => '15.02.2022', + 'cover_image' => '/images/project_img.png', + 'status' => 'registration', + 'name' => 'Galele Regionale Muntenia', ], [ 'id' => 2, - 'img' => '/images/project_img.png', - 'author' => 'Ion Popescu', - 'name' => 'Importanța educației remediare în România în timpul pandemiei', - 'team' => 'Echipa BCR', - 'content' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto accusantium praesentium eius, ut atque fuga culpa, similique sequi cum eos quis dolorum.', - 'date' => '15.02.2022', + 'cover_image' => '/images/project_img.png', + 'status' => 'finished', + 'name' => 'Galele Regionale Muntenia', ], [ 'id' => 3, - 'img' => '/images/project_img.png', - 'author' => 'Ion Popescu', - 'name' => 'Importanța educației remediare în România în timpul pandemiei', - 'team' => 'Echipa BCR', - 'content' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto accusantium praesentium eius, ut atque fuga culpa, similique sequi cum eos quis dolorum.', - 'date' => '15.02.2022', + 'cover_image' => '/images/project_img.png', + 'status' => 'winners', + 'name' => 'Galele Regionale Muntenia', + ], + [ + 'id' => 4, + 'cover_image' => '/images/project_img.png', + 'status' => 'registration', + 'name' => 'Galele Regionale Muntenia', + ], + [ + 'id' => 5, + 'cover_image' => '/images/project_img.png', + 'status' => 'finished', + 'name' => 'Galele Regionale Muntenia', + ], + [ + 'id' => 6, + 'cover_image' => '/images/project_img.png', + 'status' => 'winners', + 'name' => 'Galele Regionale Muntenia', ], ]; @@ -96,7 +106,7 @@ public function index() return Inertia::render('Public/Regional/Regional', [ 'query' => $projects, 'editions' => $editions, - 'articles' => $articles, + 'regions' => $regions, 'parteners' => $parteners, 'registration' => $registration, 'faqs' => $faqs, @@ -109,15 +119,15 @@ public function edition() $editions = [ [ 'href' => '1', - 'name' => 'Campionatul de bine 2020', + 'name' => 'Gale Regionale 2020', ], [ 'href' => '2', - 'name' => 'Campionatul de bine 2019', + 'name' => 'Gale Regionale 2021', ], [ 'href' => '3', - 'name' => 'Campionatul de bine 2018', + 'name' => 'Gale Regionale 2022', ], ]; diff --git a/resources/js/Components/cards/ArticleCard.vue b/resources/js/Components/cards/ArticleCard.vue index af41a376..02ad3849 100644 --- a/resources/js/Components/cards/ArticleCard.vue +++ b/resources/js/Components/cards/ArticleCard.vue @@ -13,7 +13,7 @@

{{ data.name }}

-

{{ data.content }}

+

{{ data.date }}

diff --git a/resources/js/Components/cards/Edition.vue b/resources/js/Components/cards/Edition.vue new file mode 100644 index 00000000..5abbf3c3 --- /dev/null +++ b/resources/js/Components/cards/Edition.vue @@ -0,0 +1,57 @@ + + + diff --git a/resources/js/Components/cards/ProjectCard.vue b/resources/js/Components/cards/ProjectCard.vue index 99acda5f..56326df8 100644 --- a/resources/js/Components/cards/ProjectCard.vue +++ b/resources/js/Components/cards/ProjectCard.vue @@ -176,7 +176,7 @@ import {computed, onMounted} from "vue"; }); onMounted(() => { - console.log(props.data); + }); const percentage = computed(() => { diff --git a/resources/js/Components/cards/RegionalProject.vue b/resources/js/Components/cards/RegionalProject.vue index f0a9f214..2a863b59 100644 --- a/resources/js/Components/cards/RegionalProject.vue +++ b/resources/js/Components/cards/RegionalProject.vue @@ -4,7 +4,7 @@ >
diff --git a/resources/js/Components/maps/Map.vue b/resources/js/Components/maps/Map.vue new file mode 100644 index 00000000..b7c5641a --- /dev/null +++ b/resources/js/Components/maps/Map.vue @@ -0,0 +1,146 @@ + + + diff --git a/resources/js/Components/modals/ModalAction.vue b/resources/js/Components/modals/ModalAction.vue index 8185f2a7..2bf3cac8 100644 --- a/resources/js/Components/modals/ModalAction.vue +++ b/resources/js/Components/modals/ModalAction.vue @@ -13,11 +13,11 @@ -
+
-
+
+ class="relative px-4 pt-5 pb-4 overflow-hidden text-left transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:w-full sm:max-w-lg sm:p-6">
-
@@ -47,7 +47,7 @@
@@ -55,7 +55,7 @@ @@ -102,8 +102,6 @@ const props = defineProps({ /** Local state. */ const open = ref(false); -console.log(props.actionType) - /** Delete action. */ const action = () => { /** Initialize inertia from Object. */ diff --git a/resources/js/Components/timers/Countdown.vue b/resources/js/Components/timers/Countdown.vue index d8da9392..d85c6ec6 100644 --- a/resources/js/Components/timers/Countdown.vue +++ b/resources/js/Components/timers/Countdown.vue @@ -29,6 +29,11 @@

Perioada de înscriere a luat sfârșit. Gala va avea loc pe

{{ dates.end }}

+ +
+

Gala s-a incheiat! Vezi mai jos

+

Proiectele Castigatoare

+
@@ -51,6 +56,8 @@ const show = computed(() => { return 'ended'; } else if ((current >= start) && (current <= end)) { return 'now'; + } else { + return 'winners'; } }); diff --git a/resources/js/Pages/Public/Articles/Article.vue b/resources/js/Pages/Public/Articles/Article.vue index 622b669b..571112da 100644 --- a/resources/js/Pages/Public/Articles/Article.vue +++ b/resources/js/Pages/Public/Articles/Article.vue @@ -1,7 +1,7 @@ @@ -371,12 +258,7 @@ import ArticleCard from '@/Components/cards/ArticleCard.vue'; import ChampionshipModal from '@/Components/modals/ChampionshipModal.vue'; import ProjectSummaryCard from '@/Components/cards/ProjectSummaryCard.vue'; - import Countdown from '@/Components/timers/Countdown.vue'; - import Faqs from '@/Components/faqs/Faqs.vue'; - import PaginatedGrid from '@/Components/templates/PaginatedGrid.vue'; - import Sort from '@/Components/filters/Sort.vue'; - import SearchFilter from '@/Components/filters/SearchFilter.vue'; - import MultiSelectObjectFilter from '@/Components/filters/MultiSelectObjectFilter.vue'; + import EditionCard from '@/Components/cards/Edition.vue'; const about_championship = 'Purus morbi dignissim senectus mattis adipiscing. Amet, massa quam varius orci dapibus volutpat cras. In amet eu ridiculus leo sodales cursus tristique. Tincidunt sed tempus ut viverra ridiculus non molestie. Gravida quis fringilla amet eget dui tempor dignissim. Facilisis auctor venenatis varius nunc, congue erat ac. Cras fermentum convallis quam.' @@ -384,13 +266,12 @@ const props = defineProps({ query: Object, championship: Object, - testimonials: Array, editions: Array, - articles: Array, registration: Object, parteners: Array, faqs: Array, - countries: Array + countries: Array, + regions: Array }); /** Active filter state. */ diff --git a/resources/js/locales/ro.js b/resources/js/locales/ro.js index 3729094f..f3dcf1ba 100644 --- a/resources/js/locales/ro.js +++ b/resources/js/locales/ro.js @@ -328,5 +328,9 @@ export default { 'volunteers_rejected': 'Voluntari respinși', 'volunteers_approved': 'Voluntarii mei', 'volunteers_pending': 'Voluntari în așteptare', - + "regional_registration": "Etapa inscrieri proiecte", + "regional_winners": "Etapa desemnare castigatori", + "regional_finished": "Editie incheiata", + "articles_title": "Articole", + "article_title": "Articol" }