some changes..

This commit is contained in:
Cüneyt Şentürk
2021-01-09 23:41:01 +03:00
parent 67fca4d5b9
commit 2455ec5d7e
7 changed files with 40 additions and 24 deletions

View File

@ -21,11 +21,15 @@ class MarkDocumentCancelled
{
$this->dispatch(new CancelDocument($event->document));
$type = trans_choice(
config("type.{$event->document->type}.alias", '') .
'general.' . config("type.{$event->document->type}.translation_key"),
1
);
$type_text = '';
if ($alias = config('type.' . $event->document->type . '.alias', '')) {
$type_text .= $alias . '::';
}
$type_text .= 'general.' . config('type.' . $event->document->type .'.translation.prefix');
$type = trans_choice($type_text, 1);
$this->dispatch(
new CreateDocumentHistory(

View File

@ -24,11 +24,15 @@ class MarkDocumentReceived
$event->document->save();
}
$type = trans_choice(
config("type.{$event->document->type}.alias", '') .
'general.' . config("type.{$event->document->type}.translation_key"),
1
);
$type_text = '';
if ($alias = config('type.' . $event->document->type . '.alias', '')) {
$type_text .= $alias . '::';
}
$type_text .= 'general.' . config('type.' . $event->document->type .'.translation.prefix');
$type = trans_choice($type_text, 1);
$this->dispatch(
new CreateDocumentHistory(

View File

@ -24,11 +24,15 @@ class MarkDocumentSent
$event->document->save();
}
$type = trans_choice(
config("type.{$event->document->type}.alias", '') .
'general.' . config("type.{$event->document->type}.translation_key"),
1
);
$type_text = '';
if ($alias = config('type.' . $event->document->type . '.alias', '')) {
$type_text .= $alias . '::';
}
$type_text .= 'general.' . config('type.' . $event->document->type .'.translation.prefix');
$type = trans_choice($type_text, 1);
$this->dispatch(
new CreateDocumentHistory(

View File

@ -29,11 +29,15 @@ class MarkDocumentViewed
$document->status = 'viewed';
$document->save();
$type = trans_choice(
config("type.{$event->document->type}.alias", '') .
'general.' . config("type.{$event->document->type}.translation_key"),
1
);
$type_text = '';
if ($alias = config('type.' . $event->document->type . '.alias', '')) {
$type_text .= $alias . '::';
}
$type_text .= 'general.' . config('type.' . $event->document->type .'.translation.prefix');
$type = trans_choice($type_text, 1);
$this->dispatch(
new CreateDocumentHistory(