Add helpdesk import progress, category model, article metadata columns, and ticket pagination controls

This commit is contained in:
SitiWeb
2026-04-29 13:21:52 +02:00
parent 3c4572bb12
commit 01aa115a49
7 changed files with 234 additions and 33 deletions

View File

@@ -19,12 +19,28 @@ class ImportHelpdeskArticlesCommand extends Command
$limitOption = $this->option('limit');
$limit = is_numeric($limitOption) ? (int) $limitOption : null;
$bar = null;
$result = $service->import(
(string) $this->option('base-url'),
(bool) $this->option('dry-run'),
$limit
$limit,
function (int $processed, int $total, string $url, string $status) use (&$bar): void {
if ($bar === null) {
$bar = $this->output->createProgressBar($total);
$bar->start();
}
$bar->advance();
$bar->setMessage("{$status}: {$url}");
}
);
if ($bar !== null) {
$bar->finish();
$this->newLine(2);
}
$this->info('Helpdesk import finished.');
$this->table(
['Metric', 'Value'],