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:
@@ -321,11 +321,12 @@ class MobileApiTest extends TestCase
|
||||
$uuid = (string) Str::uuid();
|
||||
$this->postJson('/api/v1/sync', ['operations' => [[
|
||||
'entity' => 'issue', 'op' => 'create', 'uuid' => $uuid,
|
||||
'data' => ['project_id' => $project->id, 'title' => 'Grieta', 'priority' => 'high'],
|
||||
'data' => ['project_id' => $project->id, 'title' => 'Grieta', 'priority' => 'high', 'type' => 'safety'],
|
||||
]]])->assertOk()->assertJsonPath('results.0.status', 'applied');
|
||||
|
||||
$issue = Issue::where('uuid', $uuid)->firstOrFail();
|
||||
$this->assertEquals('open', $issue->status);
|
||||
$this->assertEquals('safety', $issue->type);
|
||||
|
||||
// update (resolve) → resolved_at set
|
||||
$this->postJson('/api/v1/sync', ['operations' => [[
|
||||
|
||||
Reference in New Issue
Block a user