From c37729c866d4f35cdb35d9df30b26209fa55d79f Mon Sep 17 00:00:00 2001 From: Kamieljv Date: Fri, 1 Mar 2024 11:56:26 +0100 Subject: [PATCH 01/47] Add scope for active announcements; display only those in header --- app/Models/Announcement.php | 5 +++++ resources/views/partials/header.blade.php | 2 +- resources/views/partials/home-header.blade.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Models/Announcement.php b/app/Models/Announcement.php index de960194..1d6c3cdb 100755 --- a/app/Models/Announcement.php +++ b/app/Models/Announcement.php @@ -10,4 +10,9 @@ public function users() { return $this->belongsToMany(User::class); } + + public function scopeActive($query) + { + return $query->where('status', 'ACTIVE'); + } } diff --git a/resources/views/partials/header.blade.php b/resources/views/partials/header.blade.php index ee7de268..16a59173 100755 --- a/resources/views/partials/header.blade.php +++ b/resources/views/partials/header.blade.php @@ -23,7 +23,7 @@ @endif @php - $announcement = \App\Models\Announcement::orderby('created_at', 'DESC')->first(); + $announcement = \App\Models\Announcement::orderby('created_at', 'DESC')->active()->first(); $slug = basename(parse_url(url()->current(), PHP_URL_PATH)); @endphp @if($announcement && trim($announcement->url, '/') != $slug) diff --git a/resources/views/partials/home-header.blade.php b/resources/views/partials/home-header.blade.php index 9885f3f1..b3ac30ca 100755 --- a/resources/views/partials/home-header.blade.php +++ b/resources/views/partials/home-header.blade.php @@ -1,5 +1,5 @@ @php - $announcement = \App\Models\Announcement::orderby('created_at', 'DESC')->first(); + $announcement = \App\Models\Announcement::orderby('created_at', 'DESC')->active()->first(); $slug = basename(parse_url(url()->current(), PHP_URL_PATH)); $show_announcement = $announcement && trim($announcement->url, '/') != $slug @endphp From 92b427a8be45efbbbfe6a51538043358efa9183b Mon Sep 17 00:00:00 2001 From: Kamieljv Date: Fri, 8 Mar 2024 12:24:19 +0100 Subject: [PATCH 02/47] Attempted fix for email html/css issues --- resources/views/vendor/mail/html/button.blade.php | 2 +- resources/views/vendor/mail/html/message.blade.php | 2 +- resources/views/vendor/mail/html/themes/default.css | 13 +++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/resources/views/vendor/mail/html/button.blade.php b/resources/views/vendor/mail/html/button.blade.php index bf35c791..2d173db5 100755 --- a/resources/views/vendor/mail/html/button.blade.php +++ b/resources/views/vendor/mail/html/button.blade.php @@ -7,7 +7,7 @@
- {{ $slot }} + {{ $slot }}
diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index aea89600..f2eac112 100755 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -2,7 +2,7 @@ {{-- Header --}} @slot('header') @component('mail::header', ['url' => config('app.url')]) - @svg('custom-logo-full', ['style' => 'fill: var(--wkid-pink); height: 100%; width: 180px;']) + @svg('custom-logo-full', ['style' => 'fill: #f30060; height: 100%; width: 180px;']) @endcomponent @endslot diff --git a/resources/views/vendor/mail/html/themes/default.css b/resources/views/vendor/mail/html/themes/default.css index e61d02dd..7b25786f 100755 --- a/resources/views/vendor/mail/html/themes/default.css +++ b/resources/views/vendor/mail/html/themes/default.css @@ -13,13 +13,10 @@ body { background-color: #f5f8fa; color: #74787E; height: 100%; - hyphens: auto; line-height: 1.4; margin: 0; - -moz-hyphens: auto; -ms-word-break: break-all; width: 100% !important; - -webkit-hyphens: auto; -webkit-text-size-adjust: none; word-break: break-all; word-break: break-word; @@ -223,11 +220,11 @@ img { } .button-blue, .button-primary { - background-color: var(--wkid-blue); - border-top: 10px solid var(--wkid-blue); - border-right: 18px solid var(--wkid-blue); - border-bottom: 10px solid var(--wkid-blue); - border-left: 18px solid var(--wkid-blue); + background-color: #0081ff; + border-top: 10px solid #0081ff; + border-right: 18px solid #0081ff; + border-bottom: 10px solid #0081ff; + border-left: 18px solid #0081ff; } .button-green { From 20e28c142bd330af585e6665c08797bbf02d30ef Mon Sep 17 00:00:00 2001 From: Kamieljv Date: Fri, 8 Mar 2024 12:32:29 +0100 Subject: [PATCH 03/47] Small fix in secondary button borders --- resources/views/assets/sass/app.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/assets/sass/app.scss b/resources/views/assets/sass/app.scss index 61a04394..a9da8f70 100755 --- a/resources/views/assets/sass/app.scss +++ b/resources/views/assets/sass/app.scss @@ -99,10 +99,10 @@ @apply flex justify-center px-4 py-2 text-sm font-medium cursor-pointer text-white transition duration-150 ease-in-out border border-transparent rounded-md bg-blue-600 hover:bg-blue-500 focus:outline-none active:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed; } &.secondary { - @apply flex justify-center px-4 py-2 text-sm font-medium cursor-pointer text-blue-600 transition duration-150 ease-in-out border border-transparent rounded-md border-blue-600 hover:bg-blue-200; + @apply flex justify-center px-4 py-2 text-sm font-medium cursor-pointer text-blue-600 transition duration-150 ease-in-out border rounded-md border-blue-600 hover:bg-blue-200; } &.secondary-white { - @apply flex justify-center px-4 py-2 text-sm font-medium cursor-pointer text-white transition duration-150 ease-in-out border border-transparent rounded-md border-white hover:bg-white hover:bg-opacity-30; + @apply flex justify-center px-4 py-2 text-sm font-medium cursor-pointer text-white transition duration-150 ease-in-out border rounded-md border-white hover:bg-white hover:bg-opacity-30; } &.gray { @apply flex justify-center px-4 py-2 text-sm font-medium cursor-pointer text-gray-600 transition duration-150 ease-in-out border border-transparent rounded-md bg-gray-200 hover:bg-gray-300; From 3b568762aebe1236bfbc2a6a2c0b0847510b0710 Mon Sep 17 00:00:00 2001 From: Pieter Date: Fri, 15 Mar 2024 18:04:46 +0100 Subject: [PATCH 04/47] Migration en form fields interface --- .../2024_03_15_101716_update_acties_table.php | 38 +++++++++++++++++++ .../js/components/formfields/FormField.vue | 1 + .../assets/js/components/forms/ActieForm.vue | 33 +++++++++++----- 3 files changed, 62 insertions(+), 10 deletions(-) create mode 100644 database/migrations/2024_03_15_101716_update_acties_table.php diff --git a/database/migrations/2024_03_15_101716_update_acties_table.php b/database/migrations/2024_03_15_101716_update_acties_table.php new file mode 100644 index 00000000..156cc502 --- /dev/null +++ b/database/migrations/2024_03_15_101716_update_acties_table.php @@ -0,0 +1,38 @@ +date('start_date')->after('time_start')->nullable(); + $table->time('start_time')->after('start_date')->nullable(); + $table->date('end_date')->after('time_end')->nullable(); + $table->time('end_time')->after('end_date')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('acties', function(Blueprint $table){ + $table->dropColumn('start_date'); + $table->dropColumn('start_time'); + $table->dropColumn('end_date'); + $table->dropColumn('end_time'); + }); + } +}; diff --git a/resources/views/assets/js/components/formfields/FormField.vue b/resources/views/assets/js/components/formfields/FormField.vue index 398ebf23..96ffccc7 100644 --- a/resources/views/assets/js/components/formfields/FormField.vue +++ b/resources/views/assets/js/components/formfields/FormField.vue @@ -81,6 +81,7 @@ 'number', 'email', 'date', + 'time', 'datetime-local', ].includes(value); }, diff --git a/resources/views/assets/js/components/forms/ActieForm.vue b/resources/views/assets/js/components/forms/ActieForm.vue index 5e654627..22ab8004 100644 --- a/resources/views/assets/js/components/forms/ActieForm.vue +++ b/resources/views/assets/js/components/forms/ActieForm.vue @@ -99,21 +99,34 @@
- + + +
From b4d227d6a2e435f490060c1c10555dcdb94ed9c7 Mon Sep 17 00:00:00 2001 From: Pieter Date: Fri, 15 Mar 2024 18:16:13 +0100 Subject: [PATCH 05/47] Update view: removed reuired and fixed name of input field --- resources/views/assets/js/components/forms/ActieForm.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/views/assets/js/components/forms/ActieForm.vue b/resources/views/assets/js/components/forms/ActieForm.vue index 22ab8004..bc7f056f 100644 --- a/resources/views/assets/js/components/forms/ActieForm.vue +++ b/resources/views/assets/js/components/forms/ActieForm.vue @@ -111,7 +111,6 @@ label="Tijdstip begin van de actie" name="BeginTijd" type="time" - required /> From af3a7c5e24a34ed4e6c11b03e7fecd4d62185772 Mon Sep 17 00:00:00 2001 From: Pieter Date: Fri, 15 Mar 2024 21:51:18 +0100 Subject: [PATCH 06/47] changes in front end --- resources/views/assets/js/components/forms/ActieForm.vue | 3 ++- resources/views/assets/js/validations.js | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/views/assets/js/components/forms/ActieForm.vue b/resources/views/assets/js/components/forms/ActieForm.vue index bc7f056f..92451a3c 100644 --- a/resources/views/assets/js/components/forms/ActieForm.vue +++ b/resources/views/assets/js/components/forms/ActieForm.vue @@ -118,7 +118,8 @@ label="Datum einde van de actie" name="EindDatum" type="date" - rules="" + rules="afterIncluding:@BeginDatum" + required /> new Date(value) >= new Date(target), + message: 'Kies een datum vanaf {target}.', +}, { + hasTarget: true +}); + extend('afterToday', { validate: (value) => new Date(value) > new Date(), message: 'Kies een datum na vandaag.', From 49dd6d8bf478fa4380c3166d20289a08255f0473 Mon Sep 17 00:00:00 2001 From: Pieter Date: Fri, 15 Mar 2024 21:52:50 +0100 Subject: [PATCH 07/47] changes new mysql fields in php --- app/Http/Controllers/ActieController.php | 2 +- app/Http/Controllers/ReportController.php | 21 +++++--- app/Http/Controllers/WidgetController.php | 2 +- app/Models/Actie.php | 14 ++--- app/Models/Report.php | 6 ++- database/seeders/ActiesTableSeeder.php | 54 ++++++++++++------- database/seeders/ReportsTableSeeder.php | 18 ++++--- resources/lang/nl/reports.php | 6 ++- .../{form.blade.php => __form.blade.php} | 0 .../vendor/voyager/acties/edit-add.blade.php | 18 +++++-- 10 files changed, 94 insertions(+), 47 deletions(-) rename resources/views/reports/{form.blade.php => __form.blade.php} (100%) diff --git a/app/Http/Controllers/ActieController.php b/app/Http/Controllers/ActieController.php index e94c1cd4..440002ca 100755 --- a/app/Http/Controllers/ActieController.php +++ b/app/Http/Controllers/ActieController.php @@ -114,7 +114,7 @@ public function search(Request $request) $query->whereRaw("ST_Distance_Sphere(location, ST_GeomFromText('POINT({$coordinates[1]} {$coordinates[0]})')) <= {$radius}"); } - $query->published()->orderBy('time_start'); + $query->published()->orderBy('start_date')->orderBy('start_time'); if ($request->show_past === 'false') { $query->toekomstig(); diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index a55c45a9..5acc9dfb 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -86,8 +86,12 @@ public function create(Request $request) 'title' => $request->report['title'], 'body' => $request->report['body'] ?? null, 'externe_link' => $request->report['externe_link'], - 'time_start' => Date::parse($request->report['time_start'])->format('Y-m-d\TH:i'), - 'time_end' => Date::parse($request->report['time_end'])->format('Y-m-d\TH:i'), + + //'time_start' => Date::parse($request->report['time_start'])->format('Y-m-d\TH:i'), + //'time_end' => Date::parse($request->report['time_end'])->format('Y-m-d\TH:i'), + + 'start_time' => Date::parse($request->report['start_time'])->format('H:i'), + 'end_time' => Date::parse($request->report['end_time'])->format('H:i'), 'location' => isset($request->report['location']) ? DB::raw("ST_GeomFromText('POINT({$request->report['location']['lng']} {$request->report['location']['lat']})')") : null, 'location_human' => $request->report['location_human'], @@ -183,8 +187,10 @@ public function approve($id) 'title' => $report->title, 'body' => $report->body, 'externe_link' => $report->externe_link, - 'time_start' => $report->time_start, - 'time_end' => $report->time_end, + 'start_data' => $report->start_date, + 'start_time' => $report->start_time, + 'end_date' => $report->end_date, + 'end_time' => $report->end_time, 'location' => $report->coordinates ? DB::raw("ST_GeomFromText('POINT({$report->coordinates['lng']} {$report->coordinates['lat']})')") : null, 'location_human' => $report->location_human, 'image' => $report->image ? $newImagePath : '', @@ -231,8 +237,11 @@ protected function validator(array $data) 'report.title' => 'required|string|max:255', 'report.body' => 'required|string|max:16000', 'report.externe_link' => ['required', 'string', 'max:500', new Website()], - 'report.time_start' => 'required|date_format:Y-m-d\TH:i|after_or_equal:today', - 'report.time_end' => 'required|date_format:Y-m-d\TH:i|after:time_start', + 'report.start_date' => 'required|date_format:Y-m-d|after_or_equal:today', + 'report.start_time' => 'date_format:H:i', + 'report.end_date' => 'date_format:Y-m-d|after_or_equal:today', + 'report.end_time' => 'date_format:H:i', + 'report.location' => 'array:lat,lng', 'report.location_human' => 'required|string|max:200', 'report.image' => '', diff --git a/app/Http/Controllers/WidgetController.php b/app/Http/Controllers/WidgetController.php index 4599c996..7b7813b6 100755 --- a/app/Http/Controllers/WidgetController.php +++ b/app/Http/Controllers/WidgetController.php @@ -47,7 +47,7 @@ public function index(Request $request) $query->whereRaw("ST_Distance_Sphere(location, ST_GeomFromText('POINT({$coordinates[1]} {$coordinates[0]})')) <= {$radius}"); } - $query->published()->orderBy('time_start'); + $query->published()->orderBy('start_date')->orderBy('start_time'); if ($request->show_past === 'false') { $query->toekomstig(); diff --git a/app/Models/Actie.php b/app/Models/Actie.php index f6c4ea75..89e94b17 100755 --- a/app/Models/Actie.php +++ b/app/Models/Actie.php @@ -31,8 +31,10 @@ class Actie extends Model 'title', 'body', 'externe_link', - 'time_start', - 'time_end', + 'start_date', + 'start_time', + 'end_date', + 'end_time', 'location', 'location_human', 'slug', @@ -93,9 +95,9 @@ public function getLinkAttribute() public function getStartEndAttribute() { - if ($this->time_start && $this->time_end) { - $start = Date::parse($this->time_start); - $end = Date::parse($this->time_end); + if ($this->start_date && $this->end_date) { + $start = Date::parse($this->start_date); + $end = Date::parse($this->end_date); if ($start->format('Y-m-d') == $end->format('Y-m-d')) { // start and end on same day @@ -114,7 +116,7 @@ public function getStartEndAttribute() public function getStartUnixAttribute() { - return Date::parse($this->time_start)->timestamp; + return Date::parse($this->start_date . " " . $this->start_time)->timestamp; } public function getPageviewsTextAttribute() diff --git a/app/Models/Report.php b/app/Models/Report.php index aaef402c..770461ab 100755 --- a/app/Models/Report.php +++ b/app/Models/Report.php @@ -30,8 +30,10 @@ class Report extends Model 'title', 'body', 'externe_link', - 'time_start', - 'time_end', + 'start_date', + 'start_time', + 'end_date', + 'end_time', 'location', 'location_human', 'image', diff --git a/database/seeders/ActiesTableSeeder.php b/database/seeders/ActiesTableSeeder.php index da9902ce..7f9a6cf2 100644 --- a/database/seeders/ActiesTableSeeder.php +++ b/database/seeders/ActiesTableSeeder.php @@ -27,8 +27,10 @@ public function run() 'excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis venenatis nibh, dapibus tempus ex ultrices sit amet.', 'body' => '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis venenatis nibh, dapibus tempus ex ultrices sit amet. Donec bibendum purus venenatis sapien semper volutpat. Aliquam tincidunt convallis iaculis. Donec at ligula ac arcu fringilla lacinia sed id erat. Vestibulum non ex gravida, pretium urna eu, luctus justo. Pellentesque gravida porta scelerisque. Curabitur nulla neque, tristique eu ipsum at, gravida tempor nisl. Proin non iaculis magna. Praesent sed lectus vel nunc egestas pulvinar. Integer tincidunt sem in vehicula commodo.

', 'externe_link' => '#', - 'time_start' => '2025-02-06 15:45:00', - 'time_end' => '2025-02-06 16:45:00', + 'start_date' => '2025-02-06', + 'start_time' => '15:45:00', + 'end_date' => '2025-02-06', + 'end_time' => '16:45:00', 'location' => DB::raw("ST_GeomFromText('POINT (5.1065183336479 52.088538312124)')"), 'location_human' => 'De Dam, Amsterdam', 'image' => null, @@ -49,8 +51,10 @@ public function run() 'body' => '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus vel leo massa. Suspendisse pharetra justo ut turpis suscipit, in auctor tellus dignissim. Donec orci tortor, aliquam eu mauris vitae, vestibulum porta mi. Ut leo augue, elementum nec malesuada sed, euismod vel nunc. Sed tincidunt dolor porttitor eros suscipit, in dignissim erat mollis. Vestibulum in rhoncus mauris, sit amet rutrum orci. Vestibulum at pulvinar nisl.

Ut hendrerit augue nec suscipit interdum. In auctor purus sem. Nullam quis lorem eu turpis euismod cursus. Maecenas varius, nisi ut bibendum gravida, quam massa aliquet quam, a imperdiet leo nulla at magna. Donec sollicitudin congue rhoncus. Phasellus et semper nisl. Nulla facilisi. Praesent eget ipsum laoreet, convallis sapien id, fringilla dui. Donec volutpat odio nec molestie efficitur. Cras finibus vulputate mauris. Suspendisse potenti. Praesent ac vestibulum felis. Nulla mollis tellus a odio tincidunt tincidunt. Nullam tempor, metus quis vulputate consectetur, quam ex elementum mi, id posuere tellus nisl non orci.

', 'externe_link' => '#', - 'time_start' => '2025-02-06 15:45:00', - 'time_end' => '2025-02-06 15:45:00', + 'start_date' => '2025-02-06', + 'start_time' => '15:45:00', + 'end_date' => '2025-02-06', + 'end_time' => '15:45:00', 'location' => null, 'location_human' => 'De Dam, Amsterdam', 'image' => 'acties/pexels-paddy-o-sullivan-2369217-resize-500.jpg', @@ -71,8 +75,10 @@ public function run() 'body' => '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eu felis sodales, ullamcorper diam quis, condimentum velit. Vestibulum nisl augue, mattis ultricies laoreet a, maximus vitae tellus. Aenean imperdiet, mauris vitae ornare convallis, sem massa hendrerit diam, auctor aliquet est augue scelerisque elit. Nam volutpat mi eget fringilla dignissim. Integer varius sagittis nisi vel viverra. Etiam sit amet feugiat ligula. Donec quis hendrerit purus. Duis placerat iaculis massa, ac imperdiet nisi luctus eget. Praesent vel massa vel arcu efficitur bibendum non a arcu. Quisque ornare facilisis enim dapibus auctor. Fusce laoreet nunc non massa auctor, sit amet blandit urna bibendum. Aliquam efficitur porttitor justo, a mollis orci egestas ac.

Phasellus aliquam laoreet nibh id auctor. Nulla auctor, nisl vel dictum tristique, lacus felis lacinia ligula, ac mollis velit justo ut magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec elit magna, maximus id egestas in, elementum id turpis. Sed vitae neque vestibulum, auctor lacus elementum, elementum purus. Ut aliquet justo et lacus consequat hendrerit eget ac elit. Morbi rhoncus a dolor vel vehicula. Aliquam erat volutpat. Vivamus pulvinar mi sit amet libero finibus, ut sodales sapien gravida. Aliquam erat volutpat.

', 'externe_link' => '#', - 'time_start' => '2025-02-08 09:00:00', - 'time_end' => '2025-02-09 15:00:00', + 'start_date' => '2025-02-08', + 'start_time' => '09:00:00', + 'end_date' => '2025-02-09', + 'end_time' => '15:00:00', 'location' => null, 'location_human' => 'De Dam, Amsterdam', 'image' => 'acties/pexels-markus-spiske-3039036-resize-500.jpg', @@ -92,8 +98,10 @@ public function run() 'excerpt' => null, 'body' => '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ultrices tortor in auctor pulvinar. In enim enim, tristique a erat quis, venenatis facilisis dui. Maecenas eget ligula ut ipsum lobortis tristique in non diam. Pellentesque quis orci tempus, accumsan velit a, sodales sem. Ut elementum nunc viverra augue imperdiet euismod. Praesent venenatis tempus dolor. Maecenas venenatis laoreet sem et ultricies. Sed augue sapien, mollis a eros at, bibendum placerat arcu. Phasellus vitae dui gravida, semper augue non, sagittis lacus. Curabitur non metus eget quam consequat tincidunt. Duis feugiat dignissim felis. In egestas ante arcu, nec scelerisque quam suscipit sit amet. Aliquam et ex at sapien sodales pharetra nec at leo. Donec hendrerit pulvinar ipsum sit amet elementum. Pellentesque placerat enim ligula, cursus vulputate augue mollis vel.

', 'externe_link' => '#', - 'time_start' => '2025-01-15 18:59:00', - 'time_end' => '2025-01-24 19:00:00', + 'start_date' => '2025-01-15', + 'start_time' => '18:59:00', + 'end_date' => '2025-01-24', + 'end_time' => '19:00:00', 'location' => null, 'location_human' => 'De Dam, Amsterdam', 'image' => 'acties/pexels-karolina-grabowska-8106775-resize-500.jpg', @@ -113,8 +121,10 @@ public function run() 'excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis venenatis nibh, dapibus tempus ex ultrices sit amet.', 'body' => '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis venenatis nibh, dapibus tempus ex ultrices sit amet. Donec bibendum purus venenatis sapien semper volutpat. Aliquam tincidunt convallis iaculis. Donec at ligula ac arcu fringilla lacinia sed id erat. Vestibulum non ex gravida, pretium urna eu, luctus justo. Pellentesque gravida porta scelerisque. Curabitur nulla neque, tristique eu ipsum at, gravida tempor nisl. Proin non iaculis magna. Praesent sed lectus vel nunc egestas pulvinar. Integer tincidunt sem in vehicula commodo.

', 'externe_link' => '#', - 'time_start' => '2025-02-06 15:45:00', - 'time_end' => '2025-02-06 15:45:00', + 'start_date' => '2025-02-06', + 'start_time' => '15:45:00', + 'end_date' => '2025-02-06', + 'end_time' => '15:45:00', 'location' => null, 'location_human' => 'Jaarbeursplein, Utrecht', 'image' => null, @@ -134,8 +144,10 @@ public function run() 'excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis venenatis nibh, dapibus tempus ex ultrices sit amet.', 'body' => '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis venenatis nibh, dapibus tempus ex ultrices sit amet. Donec bibendum purus venenatis sapien semper volutpat. Aliquam tincidunt convallis iaculis. Donec at ligula ac arcu fringilla lacinia sed id erat. Vestibulum non ex gravida, pretium urna eu, luctus justo. Pellentesque gravida porta scelerisque. Curabitur nulla neque, tristique eu ipsum at, gravida tempor nisl. Proin non iaculis magna. Praesent sed lectus vel nunc egestas pulvinar. Integer tincidunt sem in vehicula commodo.

', 'externe_link' => '#', - 'time_start' => '2025-02-06 15:45:00', - 'time_end' => '2025-02-06 15:45:00', + 'start_date' => '2025-02-06', + 'start_time' => '15:45:00', + 'end_date' => '2025-02-06', + 'end_time' => '15:45:00', 'location' => null, 'location_human' => 'Valkhofpark, Nijmegen', 'image' => null, @@ -156,8 +168,10 @@ public function run() 'body' => '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus vel leo massa. Suspendisse pharetra justo ut turpis suscipit, in auctor tellus dignissim. Donec orci tortor, aliquam eu mauris vitae, vestibulum porta mi. Ut leo augue, elementum nec malesuada sed, euismod vel nunc. Sed tincidunt dolor porttitor eros suscipit, in dignissim erat mollis. Vestibulum in rhoncus mauris, sit amet rutrum orci. Vestibulum at pulvinar nisl.

Ut hendrerit augue nec suscipit interdum. In auctor purus sem. Nullam quis lorem eu turpis euismod cursus. Maecenas varius, nisi ut bibendum gravida, quam massa aliquet quam, a imperdiet leo nulla at magna. Donec sollicitudin congue rhoncus. Phasellus et semper nisl. Nulla facilisi. Praesent eget ipsum laoreet, convallis sapien id, fringilla dui. Donec volutpat odio nec molestie efficitur. Cras finibus vulputate mauris. Suspendisse potenti. Praesent ac vestibulum felis. Nulla mollis tellus a odio tincidunt tincidunt. Nullam tempor, metus quis vulputate consectetur, quam ex elementum mi, id posuere tellus nisl non orci.

', 'externe_link' => 'https://utrecht.nl', - 'time_start' => '2025-02-06 15:45:00', - 'time_end' => '2025-02-06 15:45:00', + 'start_date' => '2025-02-06', + 'start_time' => '15:45:00', + 'end_date' => '2025-02-06', + 'end_time' => '15:45:00', 'location' => null, 'location_human' => 'Jaarbeursplein, Utrecht', 'image' => null, @@ -178,8 +192,10 @@ public function run() 'body' => '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus vel leo massa. Suspendisse pharetra justo ut turpis suscipit, in auctor tellus dignissim. Donec orci tortor, aliquam eu mauris vitae, vestibulum porta mi. Ut leo augue, elementum nec malesuada sed, euismod vel nunc. Sed tincidunt dolor porttitor eros suscipit, in dignissim erat mollis. Vestibulum in rhoncus mauris, sit amet rutrum orci. Vestibulum at pulvinar nisl.

Ut hendrerit augue nec suscipit interdum. In auctor purus sem. Nullam quis lorem eu turpis euismod cursus. Maecenas varius, nisi ut bibendum gravida, quam massa aliquet quam, a imperdiet leo nulla at magna. Donec sollicitudin congue rhoncus. Phasellus et semper nisl. Nulla facilisi. Praesent eget ipsum laoreet, convallis sapien id, fringilla dui. Donec volutpat odio nec molestie efficitur. Cras finibus vulputate mauris. Suspendisse potenti. Praesent ac vestibulum felis. Nulla mollis tellus a odio tincidunt tincidunt. Nullam tempor, metus quis vulputate consectetur, quam ex elementum mi, id posuere tellus nisl non orci.

', 'externe_link' => 'https://nijmegen.nl', - 'time_start' => '2023-02-06 15:45:00', - 'time_end' => '2023-02-06 15:45:00', + 'start_date' => '2023-02-06', + 'start_time' => '15:45:00', + 'end_date' => '2023-02-06', + 'end_time' => '15:45:00', 'location' => null, 'location_human' => 'Valkhofpark, Nijmegen', 'image' => null, @@ -199,8 +215,10 @@ public function run() 'excerpt' => null, 'body' => '

Dit is de beschrijving. Lorem Ipsum lorem ipsum

', 'externe_link' => 'https://partijvoordedieren.nl', - 'time_start' => '2023-02-17 10:02:00', - 'time_end' => '2023-02-17 10:02:00', + 'start_date' => '2023-02-17', + 'start_time' => '10:02:00', + 'end_date' => '2023-02-17', + 'end_time' => '10:02:00', 'location' => null, 'location_human' => 'Museumplein, Amsterdam', 'image' => 'acties/pexels-karolina-grabowska-8106775-resize-500.jpg', diff --git a/database/seeders/ReportsTableSeeder.php b/database/seeders/ReportsTableSeeder.php index eaf7ca37..b634bf6c 100644 --- a/database/seeders/ReportsTableSeeder.php +++ b/database/seeders/ReportsTableSeeder.php @@ -27,8 +27,10 @@ public function run() 'title' => 'Test report', 'body' => '

Dit is een test

', 'externe_link' => '#', - 'time_start' => '2022-01-19 17:22:00', - 'time_end' => '2022-01-19 17:22:00', + 'start_date' => '2022-01-19', + 'start_time' => '17:22:00', + 'end_date' => '2022-01-19', + 'end_time' => '17:22:00', 'location' => null, 'location_human' => 'Loc', 'image' => null, @@ -44,8 +46,10 @@ public function run() 'title' => 'Test report 2', 'body' => '

Dit is een test

', 'externe_link' => '#', - 'time_start' => '2022-01-19 17:22:00', - 'time_end' => '2022-01-19 17:22:00', + 'start_date' => '2022-01-19', + 'start_time' => '17:22:00', + 'end_date' => '2022-01-19', + 'end_time' => '17:22:00', 'location' => null, 'location_human' => 'Loc', 'image' => null, @@ -61,8 +65,10 @@ public function run() 'title' => 'Test report 3', 'body' => '

Dit is een test

', 'externe_link' => '#', - 'time_start' => '2022-01-19 17:22:00', - 'time_end' => '2022-01-19 17:22:00', + 'start_date' => '2022-01-19', + 'start_time' => '17:22:00', + 'end_date' => '2022-01-19', + 'end_time' => '17:22:00', 'location' => null, 'location_human' => 'Loc', 'image' => null, diff --git a/resources/lang/nl/reports.php b/resources/lang/nl/reports.php index 5cbc2352..01825f9f 100644 --- a/resources/lang/nl/reports.php +++ b/resources/lang/nl/reports.php @@ -16,8 +16,10 @@ 'title' => 'Titel', 'body' => 'Beschrijving', 'externe_link' => 'Link naar actiepagina (van de organisator)', - 'time_start' => 'Begin van de actie', - 'time_end' => 'Eind van de actie', + 'start_date' => 'Begin datum van de actie', + 'start_time' => 'Begin tijd van de actie', + 'end_date' => 'Eind datum van de actie', + 'end_time' => 'Tijdstip einde', 'location' => 'Locatie op de kaart', 'location_human' => 'Locatienaam (bijv. "Museumplein, Amsterdam")', 'organizer' => 'Organisator', diff --git a/resources/views/reports/form.blade.php b/resources/views/reports/__form.blade.php similarity index 100% rename from resources/views/reports/form.blade.php rename to resources/views/reports/__form.blade.php diff --git a/resources/views/vendor/voyager/acties/edit-add.blade.php b/resources/views/vendor/voyager/acties/edit-add.blade.php index bcf70375..fc086b54 100755 --- a/resources/views/vendor/voyager/acties/edit-add.blade.php +++ b/resources/views/vendor/voyager/acties/edit-add.blade.php @@ -171,18 +171,26 @@
@foreach($dataTypeRows as $row) - @if ($row->field === 'time_start') + @if ($row->field === 'start_date') - @elseif ($row->field === 'time_end') + @elseif ($row->field === 'start_time') + + @elseif ($row->field === 'end_date') + diff --git a/resources/views/assets/js/components/forms/ActieForm.vue b/resources/views/assets/js/components/forms/ActieForm.vue index 5e654627..89395ef4 100644 --- a/resources/views/assets/js/components/forms/ActieForm.vue +++ b/resources/views/assets/js/components/forms/ActieForm.vue @@ -82,11 +82,18 @@ + > + + +
    +
  • + {{ actionUrl.name }} +
  • +
@@ -156,6 +163,13 @@ export default { mixins: [ caseHelper, ], + data: () => { + return { + actionUrls:[ + { name: 'ok' } + ] + }; + }, props: { defaultCenter: { type: Array, @@ -168,8 +182,18 @@ export default { report: { type: Object, required: true - } + }, }, + methods: { + addActionUrl(){ + if( typeof this.actionUrls.find( + ( o ) => { return o.name == this.report.externe_link } + ) + == 'undefined' ) + + this.actionUrls.push( {name: this.report.externe_link }); + } + } } diff --git a/resources/views/assets/sass/app.scss b/resources/views/assets/sass/app.scss index 61a04394..66bd03c7 100755 --- a/resources/views/assets/sass/app.scss +++ b/resources/views/assets/sass/app.scss @@ -195,6 +195,18 @@ h6 { } } +input[name=link]{ + float: left; + width:calc(100% - 3em); +} + +button.plus-btn{ + float: left; + font-size: 3em; + line-height: 0.75em; + padding: 0 0.2em; +} + svg { width: 100%; } From 65f3cf3a9e0142d6f73aa369cb942ee8b661bbed Mon Sep 17 00:00:00 2001 From: Pieter Date: Sun, 17 Mar 2024 19:52:08 +0100 Subject: [PATCH 21/47] Formfield link is now links[] --- .../assets/js/components/forms/ActieForm.vue | 27 +++++++++++-------- resources/views/assets/sass/app.scss | 12 ++++++++- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/resources/views/assets/js/components/forms/ActieForm.vue b/resources/views/assets/js/components/forms/ActieForm.vue index 89395ef4..ebfb2a19 100644 --- a/resources/views/assets/js/components/forms/ActieForm.vue +++ b/resources/views/assets/js/components/forms/ActieForm.vue @@ -77,23 +77,30 @@

Waar kunnen bezoekers meer informatie over deze actie vinden?

-
+
- + -
    -
  • - {{ actionUrl.name }} -
  • -
+
+
    +
  • + + + {{ actionUrl.name }} + +
  • +
+
@@ -165,9 +172,7 @@ export default { ], data: () => { return { - actionUrls:[ - { name: 'ok' } - ] + actionUrls:[] }; }, props: { diff --git a/resources/views/assets/sass/app.scss b/resources/views/assets/sass/app.scss index 66bd03c7..d356aa43 100755 --- a/resources/views/assets/sass/app.scss +++ b/resources/views/assets/sass/app.scss @@ -195,7 +195,7 @@ h6 { } } -input[name=link]{ +.has-element-right input{ float: left; width:calc(100% - 3em); } @@ -207,6 +207,16 @@ button.plus-btn{ padding: 0 0.2em; } +.plus-btn span{ + background-color: var(--wkid-pink); + color: white; + font-size: 0.35em; + border-radius: 0.75em; + width: 1.5em; + line-height: 1.5; + top:1em; +} + svg { width: 100%; } From 3f539bf5ad692cacc10e49c06733ae2b0aead251 Mon Sep 17 00:00:00 2001 From: Kamieljv Date: Fri, 22 Mar 2024 17:04:09 +0100 Subject: [PATCH 22/47] Limit loading images in media manager --- resources/views/vendor/voyager/media/manager.blade.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/views/vendor/voyager/media/manager.blade.php b/resources/views/vendor/voyager/media/manager.blade.php index aead0ca5..aa041f2e 100644 --- a/resources/views/vendor/voyager/media/manager.blade.php +++ b/resources/views/vendor/voyager/media/manager.blade.php @@ -442,6 +442,10 @@ type: Boolean, default: true, }, + maxToLoad: { + type: Number, + default: 20, + }, }, data: function() { return { @@ -477,6 +481,7 @@ var vm = this; vm.is_loading = true; $.post('{{ route('voyager.media.files') }}', { folder: vm.current_folder, _token: '{{ csrf_token() }}', details: vm.details }, function(data) { + data = data.slice(0, vm.maxToLoad) vm.files = []; for (var i = 0, file; file = data[i]; i++) { if (vm.filter(file) && (file.type == 'folder' || vm.search(file, vm.query))) { @@ -607,7 +612,6 @@ return false; }, search: function(file, query) { - console.log(file.name.toLowerCase(), query.toLowerCase()) if (file.name.toLowerCase().includes(query.toLowerCase())) { return true; } else { From f26783ad9adcef1a8bbec74cb532b6bb98c747f4 Mon Sep 17 00:00:00 2001 From: Kamieljv Date: Mon, 1 Apr 2024 21:05:25 +0200 Subject: [PATCH 23/47] Quick fix for search in media manager --- resources/views/vendor/voyager/media/manager.blade.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/views/vendor/voyager/media/manager.blade.php b/resources/views/vendor/voyager/media/manager.blade.php index aa041f2e..d9ed55bb 100644 --- a/resources/views/vendor/voyager/media/manager.blade.php +++ b/resources/views/vendor/voyager/media/manager.blade.php @@ -96,7 +96,7 @@
    -
  • +