Add LOA feature, improve components

This commit is contained in:
2022-02-07 18:59:22 +00:00
parent d6e248b571
commit 23a191deb9
24 changed files with 780 additions and 90442 deletions

View File

@@ -1,45 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAppealsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('appeals', function (Blueprint $table) {
$table->id();
$table->bigInteger('appellant_id')->unsigned();
$table->bigInteger('appeal_assignee')->unsigned();
$table->enum('appeal_type', [
'discord_ban',
'discord_timeout'
]);
$table->text('appeal_reasoning_desc');
$table->enum('appeal_status', [
'IN_REVISION',
'AWAITING_DECISION',
'PUNISHMENT_LIFTED',
'PUNISHMENT_REDUCED',
'PUNISHMENT_MAINTAINED'
]);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('appeals');
}
}

View File

@@ -0,0 +1,47 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAbsencesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('absences', function (Blueprint $table) {
$table->id();
$table->bigInteger('requesterID')->unsigned();
$table->date('start');
$table->date('predicted_end');
$table->boolean('available_assist');
$table->string('reason');
$table->enum('status', ['PENDING', 'APPROVED', 'DECLINED', 'CANCELLED', 'ENDED']);
$table->bigInteger('reviewer')->unsigned()->nullable();
$table->date('reviewed_date')->nullable();
$table->timestamps();
$table->foreign('requesterID')
->references('id')
->on('users');
$table->foreign('reviewer')
->references('id')
->on('users');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('absences');
}
}