style updates

This commit is contained in:
Mark Gregory
2026-06-23 13:39:02 +01:00
parent e79cadc7f8
commit 3be4ff590f
129 changed files with 482 additions and 404 deletions
@@ -49,7 +49,7 @@ return new class extends Migration
'sort_order' => ($index + 1) * 10,
'created_at' => now(),
'updated_at' => now(),
]
],
);
}
}
@@ -74,7 +74,7 @@ return new class extends Migration
Comment::query()->orderBy('id')->chunkById(100, static function ($comments): void {
foreach ($comments as $comment) {
$guid = $comment->guid ?: (string) Str::uuid();
$unid = $comment->unid ?: strtoupper(hash('sha256', $guid.'|'.$comment->ticket_id.'|'.$comment->id));
$unid = $comment->unid ?: strtoupper(hash('sha256', $guid . '|' . $comment->ticket_id . '|' . $comment->id));
$parent = $comment->parent_id ? Comment::query()->find($comment->parent_id) : null;
$parentUnid = $parent?->unid;
$rootUnid = $parent?->root_unid ?: $parentUnid ?: $unid;
@@ -86,7 +86,7 @@ return new class extends Migration
'unid' => $unid,
'parent_unid' => $parentUnid,
'root_unid' => $rootUnid,
'originator_id' => $comment->originator_id ?: $unid.':1',
'originator_id' => $comment->originator_id ?: $unid . ':1',
'sync_sequence' => $comment->sync_sequence ?: 1,
'sync_hash' => hash('sha256', (string) $comment->body),
'body_text' => trim(strip_tags((string) $comment->body)),
@@ -28,7 +28,7 @@ return new class extends Migration
$plain = trim(preg_replace('/\s+/', ' ', strip_tags((string) ($comment->body_text ?: $comment->body))) ?: '');
$subject = (bool) $comment->is_internal
? 'Internal note'
: ((int) ($comment->parent_id ?? 0) > 0 ? 'RE: ' : '').Str::limit($plain !== '' ? $plain : 'Response', 120, '');
: ((int) ($comment->parent_id ?? 0) > 0 ? 'RE: ' : '') . Str::limit($plain !== '' ? $plain : 'Response', 120, '');
DB::table('helpdesk_comments')
->where('id', $comment->id)
@@ -89,7 +89,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
] as $row) {
Category::query()->updateOrCreate(
['company_id' => null, 'slug' => Str::slug($row['name'])],
$row + ['company_id' => null, 'slug' => Str::slug($row['name'])]
$row + ['company_id' => null, 'slug' => Str::slug($row['name'])],
);
}
}
@@ -119,7 +119,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
'color' => 'blue',
'description' => 'Default support team for triage, ownership and ticket routing.',
'is_default' => true,
]
],
);
Project::query()->updateOrCreate(
@@ -132,7 +132,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
'color' => 'indigo',
'description' => 'Default project for operational helpdesk tickets.',
'is_default' => true,
]
],
);
}
@@ -151,7 +151,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
'description' => 'Default Helpdesk workflow board covering new work through closure.',
'is_default' => true,
'sort_order' => 1,
]
],
);
$statuses = Status::query()
@@ -181,7 +181,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
] as $template) {
WorkflowTemplate::query()->updateOrCreate(
['name' => $template['name'], 'event' => $template['event']],
$template + ['text_body' => null, 'cc' => null, 'bcc' => null, 'is_active' => true]
$template + ['text_body' => null, 'cc' => null, 'bcc' => null, 'is_active' => true],
);
}
}
@@ -207,7 +207,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
'business_hours_only' => false,
'is_default' => true,
'is_active' => true,
]
],
);
CannedResponse::query()->updateOrCreate(
@@ -223,7 +223,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
'body' => '<p>Hello {{ requester.name }},</p><p>Thank you for the update on {{ ticket.reference }}. I am reviewing this now and will come back with the next action shortly.</p><p>Regards,<br>{{ agent.name }}</p>',
'is_active' => true,
'sort_order' => 10,
]
],
);
ChecklistTemplate::query()->updateOrCreate(
@@ -236,7 +236,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
'slug' => 'bug-triage-checklist',
'items' => ['Confirm reproduction steps', 'Check recent deployment/build', 'Identify affected tenant/company', 'Record fix or workaround'],
'is_active' => true,
]
],
);
foreach ([
@@ -245,7 +245,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
] as $tag) {
Tag::query()->updateOrCreate(
['company_id' => null, 'slug' => $tag['slug']],
$tag + ['company_id' => null]
$tag + ['company_id' => null],
);
}
@@ -267,7 +267,7 @@ final class HelpdeskDatabaseSeeder extends Seeder
'release_channel' => 'core',
'description' => 'Default service record for WMS platform support tickets.',
'is_active' => true,
]
],
);
}
}