-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
installed trainings in PressPanelProvider
- Loading branch information
1 parent
58607d8
commit dd21cc1
Showing
16 changed files
with
455 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
return [ | ||
'navigation_sort' => 2001, | ||
|
||
// Wire with one or more user models | ||
'user_models' => [ | ||
'App Users' => \App\Models\User::class, | ||
], | ||
|
||
// Disable manual action buttons in UI | ||
// and queue the provided jobs instead | ||
'create_trainings_action' => true, | ||
'training_invitations_collect_action' => true, | ||
'training_invitations_send_action' => true, | ||
]; |
30 changes: 30 additions & 0 deletions
30
database/migrations/2024_07_12_084847_create_training_dateables_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('training_dateables', function (Blueprint $table) { | ||
$table->unsignedBigInteger('training_date_id'); | ||
$table->unsignedBigInteger('training_dateable_id'); | ||
$table->string('training_dateable_type'); | ||
|
||
$table->index('training_dateable_id'); | ||
$table->index('training_dateable_type'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('training_dateables'); | ||
} | ||
}; |
36 changes: 36 additions & 0 deletions
36
database/migrations/2024_07_12_084848_create_training_dates_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('training_dates', function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->unsignedBigInteger('training_invitation_id'); | ||
$table->dateTime('begin'); | ||
$table->dateTime('end'); | ||
$table->set('type', ['onsite', 'teams', 'webex', 'slack', 'zoom']); | ||
$table->string('link')->nullable(); | ||
$table->string('location')->nullable(); | ||
$table->integer('min_participants')->nullable(); | ||
$table->integer('max_participants')->nullable(); | ||
$table->dateTime('sent_at')->nullable(); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('training_dates'); | ||
} | ||
}; |
30 changes: 30 additions & 0 deletions
30
database/migrations/2024_07_12_084849_create_training_invitationables_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('training_invitationables', function (Blueprint $table) { | ||
$table->unsignedBigInteger('training_invitation_id'); | ||
$table->unsignedBigInteger('training_invitationable_id'); | ||
$table->string('training_invitationable_type'); | ||
|
||
$table->index('training_invitationable_id'); | ||
$table->index('training_invitationable_type'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('training_invitationables'); | ||
} | ||
}; |
32 changes: 32 additions & 0 deletions
32
database/migrations/2024_07_12_084850_create_training_invitations_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('training_invitations', function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->unsignedBigInteger('training_id'); | ||
$table->string('title'); | ||
$table->string('slug'); | ||
$table->text('content')->nullable(); | ||
$table->string('status'); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('training_invitations'); | ||
} | ||
}; |
30 changes: 30 additions & 0 deletions
30
database/migrations/2024_07_12_084851_create_training_types_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('training_types', function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->string('title'); | ||
$table->string('slug'); | ||
$table->text('description')->nullable(); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('training_types'); | ||
} | ||
}; |
30 changes: 30 additions & 0 deletions
30
database/migrations/2024_07_12_084852_create_trainingables_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('trainingables', function (Blueprint $table) { | ||
$table->unsignedBigInteger('training_id'); | ||
$table->unsignedBigInteger('trainingable_id'); | ||
$table->string('trainingable_type'); | ||
|
||
$table->index('trainingable_id'); | ||
$table->index('trainingable_type'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('trainingables'); | ||
} | ||
}; |
52 changes: 52 additions & 0 deletions
52
database/migrations/2024_07_12_084853_create_trainings_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('trainings', function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->string('title'); | ||
$table->string('slug'); | ||
$table->text('description')->nullable(); | ||
$table->integer('duration'); | ||
$table->string('link'); | ||
$table->dateTime('due_at'); | ||
$table | ||
->set('cycle', [ | ||
'annually', | ||
'half-yearly', | ||
'quarterly', | ||
'monthly', | ||
'every 2 years', | ||
'every 3 years', | ||
'every 4 years', | ||
'every 5 years', | ||
]) | ||
->default('annually'); | ||
$table->foreignId('source_id'); | ||
$table->unsignedBigInteger('training_type_id'); | ||
$table->unsignedBigInteger('trainingable_id'); | ||
$table->string('trainingable_type'); | ||
|
||
$table->index('trainingable_id'); | ||
$table->index('trainingable_type'); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('trainings'); | ||
} | ||
}; |
32 changes: 32 additions & 0 deletions
32
database/migrations/2024_07_12_084854_foreigns_for_training_dateables_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::table('training_dateables', function (Blueprint $table) { | ||
$table | ||
->foreign('training_date_id') | ||
->references('id') | ||
->on('training_dates') | ||
->onUpdate('CASCADE') | ||
->onDelete('CASCADE'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::table('training_dateables', function (Blueprint $table) { | ||
$table->dropForeign(['training_date_id']); | ||
}); | ||
} | ||
}; |
32 changes: 32 additions & 0 deletions
32
database/migrations/2024_07_12_084855_foreigns_for_training_dates_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::table('training_dates', function (Blueprint $table) { | ||
$table | ||
->foreign('training_invitation_id') | ||
->references('id') | ||
->on('training_invitations') | ||
->onUpdate('CASCADE') | ||
->onDelete('CASCADE'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::table('training_dates', function (Blueprint $table) { | ||
$table->dropForeign(['training_invitation_id']); | ||
}); | ||
} | ||
}; |
32 changes: 32 additions & 0 deletions
32
database/migrations/2024_07_12_084856_foreigns_for_training_invitationables_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::table('training_invitationables', function (Blueprint $table) { | ||
$table | ||
->foreign('training_invitation_id') | ||
->references('id') | ||
->on('training_invitations') | ||
->onUpdate('CASCADE') | ||
->onDelete('CASCADE'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::table('training_invitationables', function (Blueprint $table) { | ||
$table->dropForeign(['training_invitation_id']); | ||
}); | ||
} | ||
}; |
Oops, something went wrong.