feat(helpdesk): add handover protocol schema editor to software products
Add a JSON-based schema editor as a new tab on the software product edit page. Admins can define protocol fields (heading, paragraph, text, textarea, number, date, checkbox, select) via a structured UI with add/remove/reorder controls. The schema is stored as a versioned JSON column on the product row. Includes DB migration, server-side validation (type whitelist, key uniqueness, key format, max 50 fields, select option checks), i18n (DE+EN), CSS, and 10 PHPUnit tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -92,6 +92,21 @@ class SoftwareProductRepository
|
||||
];
|
||||
}
|
||||
|
||||
public function updateHandoverSchema(string $code, ?string $schemaJson): bool
|
||||
{
|
||||
if (trim($code) === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = DB::update(
|
||||
'UPDATE helpdesk_software_products SET handover_protocol_schema = ? WHERE code = ?',
|
||||
$schemaJson,
|
||||
$code
|
||||
);
|
||||
|
||||
return $result !== false;
|
||||
}
|
||||
|
||||
public function updateName(string $code, string $name): bool
|
||||
{
|
||||
if (trim($code) === '') {
|
||||
|
||||
Reference in New Issue
Block a user