Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2191 importers #2194

Merged
merged 2 commits into from
Nov 15, 2023
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
3 changes: 2 additions & 1 deletion app/Console/Commands/api/GermanTraits.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ private function createGermanEvent($city): void
"pub_date" => now(),
"created" => now(),
"updated" => now(),
"codeweek_for_all_participation_code" => "cw22-$city",
"codeweek_for_all_participation_code" => "cw23-$city",
"mass_added_for" => "API codeweek_de",
"start_date" => $this->eventStartDate,
"end_date" => $this->eventEndDate,
"longitude" => $this->longitude,
Expand Down
3 changes: 2 additions & 1 deletion app/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class Event extends Model
'picture_detail',
'language',
'location_id',
'leading_teacher_tag'
'leading_teacher_tag',
'mass_added_for'
];

protected $casts = [
Expand Down
3 changes: 2 additions & 1 deletion app/Importers/Eeducation.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public function parse()
"end_date" => Carbon::parse($this->remote->enddate)->toDateTimeString(),
"geoposition" => $this->remote->lat . "," . $this->remote->lng,
"longitude" => $this->remote->lng,
"latitude" => $this->remote->lat
"latitude" => $this->remote->lat,
"mass_added_for" => "RSS Eeducation"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/AppleEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public function model(array $row)
"geoposition" => $row["latitude"] . "," . $row["longitude"],
"longitude" => $row["longitude"],
"latitude" => $row["latitude"],
'language' => strtolower(explode("_", $row['language'])[0])
'language' => strtolower(explode("_", $row['language'])[0]),
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/BulgariaEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public function model(array $row)
"end_date" => $this->parseDate($row['end_date']),
"geoposition" => $row["latitude"] . "," . $row["longitude"],
"longitude" => $row["longitude"],
"latitude" => $row["latitude"]
"latitude" => $row["latitude"],
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/CoderDojoEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public function model(array $row)
"longitude" => $row["longitude"],
"latitude" => $row["latitude"],
"language"=> "nl",
"approved_by"=>19588
"approved_by"=>19588,
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/DutchDanceEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public function model(array $row) {
'geoposition' => $row['longitude'] . ',' . $row['latitude'],
'longitude' => $row['latitude'],
'latitude' => $row['longitude'],
'language' => strtolower($row['language'])
'language' => strtolower($row['language']),
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/DutchMoorlagEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public function model(array $row) {
'geoposition' => $row['longitude'] . ',' . $row['latitude'],
'longitude' => $row['latitude'],
'latitude' => $row['longitude'],
'language' => strtolower($row['language'])
'language' => strtolower($row['language']),
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/DutchSimoneEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public function model(array $row) {
'geoposition' => $row['latitude'] . ',' . $row['longitude'],
'longitude' => $row['longitude'],
'latitude' => $row['latitude'],
'language' => strtolower($row['language'])
'language' => strtolower($row['language']),
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/EventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public function model(array $row)
"end_date" => Carbon::parse($this->parseDate($row["end_date"]))->toDateTimeString(),
"geoposition" => $row["latitude"] . "," . $row["longitude"],
"longitude" => $row["longitude"],
"latitude" => $row["latitude"]
"latitude" => $row["latitude"],
'mass_added_for' => "Excel"
]);


Expand Down
1 change: 1 addition & 0 deletions app/Imports/GenericEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function model(array $row) {
'longitude' => $row['longitude'],
'latitude' => $row['latitude'],
'language' => strtolower($row['language']),
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/HamburgEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public function model(array $row)
"end_date" => $this->parseDate($row['end_date']),
"geoposition" => $row["latitude"] . "," . $row["longitude"],
"longitude" => $row["longitude"],
"latitude" => $row["latitude"]
"latitude" => $row["latitude"],
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/IrelandEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public function model(array $row) {
'geoposition' => $row['latitude'] . ',' . $row['longitude'],
'longitude' => str_replace(',','.',$row['longitude']),
'latitude' => str_replace(',','.',$row['latitude']),
'language' => 'en'
'language' => 'en',
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/LuxembourgEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public function model(array $row) {
'geoposition' => $row['latitude'] . ',' . $row['longitude'],
'longitude' => $row['longitude'],
'latitude' => $row['latitude'],
'language' => strtolower($row['language'])
'language' => strtolower($row['language']),
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
1 change: 1 addition & 0 deletions app/Imports/MagentaEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function model(array $row)
"longitude" => $row["longitude"],
"latitude" => $row["latitude"],
"language" => strtolower($row["language"]),
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
1 change: 1 addition & 0 deletions app/Imports/ReportedEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public function model(array $row) {
'participants_count' => 30,
'average_participant_age' => 10,
'percentage_of_females' => 50,
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/TelerikEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public function model(array $row)
"end_date" => $this->parseDate($row['end_date']),
"geoposition" => $row["latitude"] . "," . $row["longitude"],
"longitude" => $row["longitude"],
"latitude" => $row["latitude"]
"latitude" => $row["latitude"],
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/UKDigitAllCharityEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public function model(array $row) {
'geoposition' => $row['latitude'] . ',' . $row['longitude'],
'longitude' => $row['longitude'],
'latitude' => $row['latitude'],
'language' => strtolower($row['language'])
'language' => strtolower($row['language']),
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/Imports/UKDigitAllEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public function model(array $row) {
'geoposition' => $row['latitude'] . ',' . $row['longitude'],
'longitude' => $row['longitude'],
'latitude' => $row['latitude'],
'language' => strtolower($row['language'])
'language' => strtolower($row['language']),
'mass_added_for' => "Excel"
]);

$event->save();
Expand Down
3 changes: 2 additions & 1 deletion app/MeetAndCodeRSSItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ public function createEvent($user)
"longitude" => $this->lon,
"latitude" => $this->lat,
"geoposition" => $this->lat . "," . $this->lon,
"language" => MeetAndCodeHelper::getLanguage($this->link)
"language" => MeetAndCodeHelper::getLanguage($this->link),
'mass_added_for' => "RSS meet_and_code"
]);

$event->save();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddSubmissionTypeToEvents extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('events', function (Blueprint $table) {
$table->string('mass_added_for')->nullable()->index();
});
}



/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{

Schema::table('events', function (Blueprint $table)
{
$table->dropColumn('mass_added_for');
});
}
}
Loading