feat(issues): tipo/categoría de incidencia (defecto/seguridad/calidad/documentación/otro)
- Issue::TYPES + typeLabels() (ES) + accessors type_label/type_color; columna type (string, default 'other') + fillable. - IssueForm: select "Tipo de incidencia" con validación/carga/guardado. - IssueTable: columna Tipo (badge) + SelectFilter por tipo. - IssueDetail: badge de tipo en la cabecera. - Sync offline: issue.create/update aceptan type; bundle (mapIssue) lo incluye. Tests: IssuesEnhancementsTest (create muestra el campo vía HTTP, edición persiste) + MobileApiTest (create con type). Suite 61 passing (solo 2 pre-existentes sqlite). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ class IssueForm extends Component
|
||||
public $description = '';
|
||||
public $status = 'open';
|
||||
public $priority = 'medium';
|
||||
public $type = 'defect';
|
||||
public $assignedTo = '';
|
||||
public $resolutionNotes = '';
|
||||
|
||||
@@ -48,6 +49,7 @@ class IssueForm extends Component
|
||||
$this->description = $issue->description ?? '';
|
||||
$this->status = $issue->status;
|
||||
$this->priority = $issue->priority;
|
||||
$this->type = $issue->type ?? 'defect';
|
||||
$this->assignedTo = $issue->assigned_to ?? '';
|
||||
$this->resolutionNotes = $issue->resolution_notes ?? '';
|
||||
$this->featureId = $issue->feature_id;
|
||||
@@ -77,6 +79,7 @@ class IssueForm extends Component
|
||||
'description' => 'nullable|string',
|
||||
'status' => 'required|in:' . implode(',', Issue::STATUSES),
|
||||
'priority' => 'required|in:' . implode(',', Issue::PRIORITIES),
|
||||
'type' => 'required|in:' . implode(',', Issue::TYPES),
|
||||
'assignedTo' => 'nullable|exists:users,id',
|
||||
'resolutionNotes' => 'nullable|string',
|
||||
];
|
||||
@@ -92,6 +95,7 @@ class IssueForm extends Component
|
||||
'description' => $this->description,
|
||||
'status' => $this->status,
|
||||
'priority' => $this->priority,
|
||||
'type' => $this->type,
|
||||
'feature_id' => $this->featureId,
|
||||
'inspection_id' => $this->inspectionId,
|
||||
'assigned_to' => $this->assignedTo ?: null,
|
||||
|
||||
Reference in New Issue
Block a user