diff --git a/app/Console/Commands/excel/CoderDojoEvents.php b/app/Console/Commands/excel/CoderDojoEvents.php new file mode 100644 index 000000000..bee994274 --- /dev/null +++ b/app/Console/Commands/excel/CoderDojoEvents.php @@ -0,0 +1,49 @@ +parseDate($row["start_date"]))->toDateTimeString()); - //dd(Carbon::createFromFormat("d/m/Y",$row["start_date"])->toDateTimeString()); - Log::info($row); - $event = new Event([ 'status' => 'APPROVED', 'title' => $row['activity_title'], @@ -41,10 +33,11 @@ public function model(array $row): ?Model 'activity_type' => $row['activity_type'], 'location' => isset($row['address']) ? $row['address'] : 'online', 'event_url' => $row['organiser_website'], + 'contact_person' => !empty($row['contact_email']) ? $row['contact_email'] : '', 'user_email' => '', - 'creator_id' => $row['creator_id'], + 'creator_id' => 132942, 'country_iso' => $row['country'], - 'picture' => $row['image_path'], + 'picture' => isset($row['image_path']) ? $row['image_path'] : '', 'pub_date' => now(), 'created' => now(), 'updated' => now(), @@ -54,7 +47,7 @@ public function model(array $row): ?Model 'geoposition' => $row['latitude'].','.$row['longitude'], 'longitude' => $row['longitude'], 'latitude' => $row['latitude'], - 'language' => 'nl', + 'language' => isset($row['language']) ? $row['language'] : 'nl', 'approved_by' => 19588, 'mass_added_for' => 'Excel', ]); diff --git a/resources/excel/20241024 CodeWeek activities NOVEMBER CoderDojo Belgium.xlsx b/resources/excel/20241024 CodeWeek activities NOVEMBER CoderDojo Belgium.xlsx new file mode 100644 index 000000000..5e231277e Binary files /dev/null and b/resources/excel/20241024 CodeWeek activities NOVEMBER CoderDojo Belgium.xlsx differ