-
Notifications
You must be signed in to change notification settings - Fork 4
Updates for checklists items and Comments #8
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
base: master
Are you sure you want to change the base?
Changes from 10 commits
16d954b
589925b
28de41f
a09f02b
b4ed32c
0c45173
3d6bb12
00a4fb5
260ae1b
fcbdef0
831b7b3
f338a38
13417f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration { | ||
public function up() | ||
{ | ||
Schema::create('task_checklist_items', function (Blueprint $table) { | ||
$table->id(); | ||
$table->foreignId('task_id')->constrained('tasks'); | ||
MusahMusah marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$table->string('name'); | ||
$table->unsignedInteger('order_index')->nullable(); | ||
$table->boolean('is_completed'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists('task_checklist_items'); | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
use LaravelEnso\Migrator\Database\Migration; | ||
|
||
return new class extends Migration { | ||
protected array $permissions = [ | ||
['name' => 'tasks.checklistItems.store', 'description' => 'Store a new check list', 'is_default' => false], | ||
['name' => 'tasks.checklistItems.update', 'description' => 'Update check list', 'is_default' => false], | ||
['name' => 'tasks.checklistItems.destroy', 'description' => 'Delete check list', 'is_default' => false], | ||
]; | ||
|
||
protected ?string $parentMenu = ''; | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration { | ||
public function up() | ||
{ | ||
Schema::create('task_comments', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->foreignId('task_id')->constrained(); | ||
$table->text('body'); | ||
|
||
$table->integer('created_by')->unsigned()->nullable()->index(); | ||
$table->foreign('created_by')->references('id')->on('users'); | ||
|
||
$table->integer('updated_by')->unsigned()->nullable(); | ||
$table->foreign('updated_by')->references('id')->on('users'); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists('task_comments'); | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
use LaravelEnso\Migrator\Database\Migration; | ||
|
||
return new class extends Migration { | ||
protected array $permissions = [ | ||
['name' => 'tasks.comments.index', 'description' => 'Show index for comments', 'is_default' => false], | ||
['name' => 'tasks.comments.store', 'description' => 'Store a new comment', 'is_default' => false], | ||
['name' => 'tasks.comments.update', 'description' => 'Update comment', 'is_default' => false], | ||
['name' => 'tasks.comments.destroy', 'description' => 'Delete comment', 'is_default' => false], | ||
]; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Route; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\ChecklistItems\Destroy; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\ChecklistItems\Store; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\ChecklistItems\Update; | ||
|
||
Route::prefix('checklistItems') | ||
->as('checklistItems.') | ||
->group(function () { | ||
Route::post('', Store::class)->name('store'); | ||
Route::patch('{checklistItem}', Update::class)->name('update'); | ||
Route::delete('{checklistItem}', Destroy::class)->name('destroy'); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
use App\Http\Controllers\Tasks\Comments\Destroy; | ||
use App\Http\Controllers\Tasks\Comments\Index; | ||
use App\Http\Controllers\Tasks\Comments\Store; | ||
use App\Http\Controllers\Tasks\Comments\Update; | ||
use Illuminate\Support\Facades\Route; | ||
|
||
Route::prefix('comments') | ||
->as('comments.') | ||
->group(function () { | ||
Route::get('', Index::class)->name('index'); | ||
Route::post('', Store::class)->name('store'); | ||
Route::patch('{comment}', Update::class)->name('update'); | ||
Route::delete('{comment}', Destroy::class)->name('destroy'); | ||
}); |
Uh oh!
There was an error while loading. Please reload this page.