Add comments to tasks
Everyone who may change a task's status (attached subcontractors too) comments on it on the job page. Authors edit and remove their own comments; admin and management may remove anyone's (jobs.remove-any-task-comment). Edited comments show when they were edited, and task cards show the number of comments. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Jobs\Domain\Exceptions;
|
||||
|
||||
use App\Modules\Shared\Domain\Exceptions\DomainException;
|
||||
|
||||
/**
|
||||
* Only the author edits a comment; others than the author may remove it
|
||||
* only when they may remove anyone's comments.
|
||||
*/
|
||||
final class NotTaskCommentAuthor extends DomainException
|
||||
{
|
||||
public function __construct(public readonly int $commentId, public readonly int $userId)
|
||||
{
|
||||
parent::__construct("User {$userId} is not the author of comment {$commentId}.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user