Merge pull request #1742 from cuneytsenturk/master

Add Document/Transaction/Contact types to the config vol 2
This commit is contained in:
Cüneyt Şentürk
2021-01-12 00:28:19 +03:00
committed by GitHub
26 changed files with 1456 additions and 1093 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(