-
Notifications
You must be signed in to change notification settings - Fork 4
Updates: Checklist items, comments & task changes. #9
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
Open
AbdullahiAbdulkabir
wants to merge
16
commits into
laravel-enso:master
Choose a base branch
from
AbdullahiAbdulkabir:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7e10f5b
Checklist item & task updates
AbdullahiAbdulkabir 83e14d8
Alter table to tinyinteger
AbdullahiAbdulkabir 2a177c8
Upgrades | Files to add task columns (from, to, muted)
AbdullahiAbdulkabir 8cdb2f6
Changes
AbdullahiAbdulkabir 9959b31
Changes.
AbdullahiAbdulkabir a8433cf
Route fix.
AbdullahiAbdulkabir f9872de
Change.
AbdullahiAbdulkabir a8b1381
Update checklist items files.
AbdullahiAbdulkabir e51af08
Update checklist items relationship name
AbdullahiAbdulkabir a26b49c
Remove permissions.
AbdullahiAbdulkabir 924a63f
Fix failing CI/CD test
AbdullahiAbdulkabir 802d47c
Fix failing CI/CD test
AbdullahiAbdulkabir 96ebf50
Fixed failing CI/CD test
AbdullahiAbdulkabir 1e96573
Chnages
AbdullahiAbdulkabir d61a3dd
Chnages
AbdullahiAbdulkabir 326eb76
Chnages
AbdullahiAbdulkabir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
28 changes: 28 additions & 0 deletions
28
database/migrations/2022_06_29_133122_create_task_checklist_items_table.php
This file contains hidden or 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,28 @@ | ||
<?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->unsignedBigInteger('task_id'); | ||
$table->foreign('task_id')->references('id')->on('tasks'); | ||
|
||
$table->string('name'); | ||
$table->unsignedInteger('order_index')->nullable(); | ||
$table->boolean('is_completed'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists('task_checklist_items'); | ||
} | ||
}; |
20 changes: 20 additions & 0 deletions
20
database/migrations/2022_06_29_133125_create_structure_for_checklist_items.php
This file contains hidden or 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,20 @@ | ||
<?php | ||
|
||
use LaravelEnso\Migrator\Database\Migration; | ||
|
||
class CreateStructureForChecklistItems extends Migration | ||
{ | ||
protected array $permissions = [ | ||
['name' => 'tasks.checklistItems.index', 'description' => 'Show index for task checklist items', 'is_default' => false], | ||
|
||
['name' => 'tasks.checklistItems.store', 'description' => 'Store a new task checklist item', 'is_default' => false], | ||
['name' => 'tasks.checklistItems.update', 'description' => 'Update task checklist item', 'is_default' => false], | ||
['name' => 'tasks.checklistItems.destroy', 'description' => 'Delete task checklist item', 'is_default' => false], | ||
|
||
['name' => 'tasks.checklistItems.options', 'description' => 'Get task checklist item options for select', 'is_default' => false], | ||
]; | ||
|
||
protected array $menu = []; | ||
|
||
protected ?string $parentMenu = null; | ||
} |
31 changes: 31 additions & 0 deletions
31
database/migrations/2022_07_19_134101_create_task_comments_table.php
This file contains hidden or 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,31 @@ | ||
<?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->id(); | ||
$table->unsignedBigInteger('task_id'); | ||
$table->foreign('task_id')->references('id')->on('tasks'); | ||
$table->text('body'); | ||
|
||
$table->unsignedInteger('created_by')->nullable()->index(); | ||
$table->foreign('created_by')->references('id')->on('users'); | ||
|
||
$table->unsignedInteger('updated_by')->nullable()->index(); | ||
$table->foreign('updated_by')->references('id')->on('users'); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists('task_comments'); | ||
} | ||
}; |
13 changes: 13 additions & 0 deletions
13
database/migrations/2022_07_19_141237_create_structure_for_task_comments.php
This file contains hidden or 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,13 @@ | ||
<?php | ||
|
||
use LaravelEnso\Migrator\Database\Migration; | ||
|
||
return new class extends Migration | ||
{ | ||
protected array $permissions = [ | ||
['name' => 'tasks.comments.index', 'description' => 'List task comments for commentable', 'is_default' => true], | ||
['name' => 'tasks.comments.store', 'description' => 'Create task comment', 'is_default' => true], | ||
['name' => 'tasks.comments.update', 'description' => 'Update task edited comment', 'is_default' => true], | ||
['name' => 'tasks.comments.destroy', 'description' => 'Delete task comment', 'is_default' => true], | ||
]; | ||
}; |
This file contains hidden or 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 |
---|---|---|
@@ -1,36 +1,12 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Route; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Count; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Create; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Destroy; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Edit; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\ExportExcel; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Index; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\InitTable; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Store; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\TableData; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Update; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Users; | ||
|
||
Route::middleware(['api', 'auth', 'core']) | ||
->prefix('api/tasks') | ||
->as('tasks.') | ||
->group(function () { | ||
Route::get('create', Create::class)->name('create'); | ||
Route::post('', Store::class)->name('store'); | ||
Route::get('{task}/edit', Edit::class)->name('edit'); | ||
|
||
Route::patch('{task}', Update::class)->name('update'); | ||
|
||
Route::delete('{task}', Destroy::class)->name('destroy'); | ||
|
||
Route::get('initTable', InitTable::class)->name('initTable'); | ||
Route::get('tableData', TableData::class)->name('tableData'); | ||
Route::get('exportExcel', ExportExcel::class)->name('exportExcel'); | ||
|
||
Route::get('count', Count::class)->name('count'); | ||
Route::get('', Index::class)->name('index'); | ||
|
||
Route::get('users', Users::class)->name('users'); | ||
require __DIR__.'/app/comments.php'; | ||
require __DIR__.'/app/tasks.php'; | ||
require __DIR__.'/app/checklistItems.php'; | ||
}); |
This file contains hidden or 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,20 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Route; | ||
use LaravelEnso\Tasks\Http\Controllers\ChecklistItems\Create; | ||
use LaravelEnso\Tasks\Http\Controllers\ChecklistItems\Destroy; | ||
use LaravelEnso\Tasks\Http\Controllers\ChecklistItems\Edit; | ||
use LaravelEnso\Tasks\Http\Controllers\ChecklistItems\Options; | ||
use LaravelEnso\Tasks\Http\Controllers\ChecklistItems\Store; | ||
use LaravelEnso\Tasks\Http\Controllers\ChecklistItems\Update; | ||
|
||
Route::prefix('checklistItems') | ||
->as('checklistItems.') | ||
->group(function () { | ||
Route::get('create', Create::class)->name('create'); | ||
Route::post('', Store::class)->name('store'); | ||
Route::get('{checklistItem}/edit', Edit::class)->name('edit'); | ||
Route::patch('{checklistItem}', Update::class)->name('update'); | ||
Route::delete('{checklistItem}', Destroy::class)->name('destroy'); | ||
Route::get('options', Options::class)->name('options'); | ||
}); |
This file contains hidden or 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 | ||
|
||
use Illuminate\Support\Facades\Route; | ||
use LaravelEnso\Tasks\Http\Controllers\Comments\Destroy; | ||
use LaravelEnso\Tasks\Http\Controllers\Comments\Index; | ||
use LaravelEnso\Tasks\Http\Controllers\Comments\Store; | ||
use LaravelEnso\Tasks\Http\Controllers\Comments\Update; | ||
|
||
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'); | ||
}); |
This file contains hidden or 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\Route; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Count; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Create; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Destroy; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Edit; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\ExportExcel; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Index; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\InitTable; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Options; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Show; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Store; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\TableData; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Update; | ||
use LaravelEnso\Tasks\Http\Controllers\Tasks\Users; | ||
|
||
Route::get('create', Create::class)->name('create'); | ||
Route::post('', Store::class)->name('store'); | ||
Route::get('{task}/edit', Edit::class)->name('edit'); | ||
|
||
Route::patch('{task}', Update::class)->name('update'); | ||
|
||
Route::delete('{task}', Destroy::class)->name('destroy'); | ||
|
||
Route::get('initTable', InitTable::class)->name('initTable'); | ||
Route::get('tableData', TableData::class)->name('tableData'); | ||
Route::get('exportExcel', ExportExcel::class)->name('exportExcel'); | ||
|
||
Route::get('count', Count::class)->name('count'); | ||
Route::get('', Index::class)->name('index'); | ||
|
||
Route::get('users', Users::class)->name('users'); | ||
|
||
Route::get('options', Options::class)->name('options'); | ||
Route::get('{task}', Show::class)->name('show'); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,21 @@ | ||
<?php | ||
|
||
namespace LaravelEnso\Tasks\Enums; | ||
|
||
use LaravelEnso\Enums\Services\Enum; | ||
|
||
class Statuses extends Enum | ||
{ | ||
public const New = 1; | ||
public const InProgress = 2; | ||
public const Finished = 3; | ||
|
||
public static function data(): array | ||
{ | ||
return [ | ||
self::New => 'New', | ||
self::InProgress => 'In Progress', | ||
self::Finished => 'Finished', | ||
]; | ||
} | ||
} |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.