v0.9.12
This commit is contained in:
commit
e50fe9b0c2
298 files changed
+20885
No files matched your search
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace IriksIT\Manager\Modules\Support;
|
||||
|
||||
use IriksIT\Manager\Modules\BaseModule;
|
||||
use IriksIT\Manager\Support\Helpdesk;
|
||||
use IriksIT\Manager\Support\Names;
|
||||
use IriksIT\Manager\Support\Permission;
|
||||
|
||||
/**
|
||||
* Help from Iriks-IT: a form to ask a question or report a problem, which becomes a ticket at the IriksIT API with a number to follow it by,
|
||||
* and a list of the tickets of the person with what Iriks-IT answered. Only there when the site has an API account (`manager.media.iriksit`).
|
||||
*/
|
||||
class SupportModule extends BaseModule
|
||||
{
|
||||
public function key(): string
|
||||
{
|
||||
return 'support';
|
||||
}
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return 'Help';
|
||||
}
|
||||
|
||||
public function enabledByDefault(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function tables(): array
|
||||
{
|
||||
return ['support_tickets'];
|
||||
}
|
||||
|
||||
public function permissions(): array
|
||||
{
|
||||
return [new Permission('support.use', 'Ask Iriks-IT for help and follow the requests', 'Site')];
|
||||
}
|
||||
|
||||
public function navigation(): array
|
||||
{
|
||||
if (! app(Helpdesk::class)->available()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [['label' => 'Help', 'section' => 'Iriks-IT', 'route' => Names::route('support.index'), 'permission' => 'support.use', 'simple' => true, 'icon' => 'help', 'hint' => 'Ask a question or report a problem', 'order' => 90]];
|
||||
}
|
||||
|
||||
public function actions(): array
|
||||
{
|
||||
return ['support.store' => ['Sent a request for help'], 'support.reply' => ['Answered a request for help']];
|
||||
}
|
||||
|
||||
public function views(): array
|
||||
{
|
||||
return ['support.index' => 'Opened the help page', 'support.show' => 'Opened a request for help'];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user