feat(tags): match add-tag modal to tauri design (preset swatches + active toggle)

- TagsSettingsPage modal: replace native color input with 4 preset
  swatches, add 'وضعیت برچسب' active toggle, update labels and submit
  button to mirror tauri AddPurchaseSubTabModal
- TenantTagController::create now honors an optional 'active' flag
  (defaults true, non-breaking for existing callers)
- tests: backend active-flag case, frontend preset-color + inactive case
- docs/api/tag.md: document the new create 'active' field

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-07-14 15:39:45 +03:30
co-authored by Claude Opus 4.8
parent c9a2db6e9d
commit 7e1d887b72
5 changed files with 91 additions and 21 deletions
@@ -68,6 +68,9 @@ class TenantTagController extends BaseController
}
$tag = new TenantTag($type, $id, $name, $color);
if (array_key_exists('active', $data)) {
$tag->setActive((bool) $data['active']);
}
$this->tagRepo->save($tag);
return $this->success($tag->toArray(), 201);