Refactor HTML generation in activities
This commit is contained in:
parent
2c40adca8d
commit
7aed55178c
2 changed files with 2 additions and 12 deletions
|
|
@ -13,7 +13,6 @@ namespace App\Models;
|
|||
|
||||
use App\DataMapper\ClientSettings;
|
||||
use App\DataMapper\CompanySettings;
|
||||
use App\Designs\Designer;
|
||||
use App\Filters\QueryFilters;
|
||||
use App\Models\Design;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
|
@ -176,15 +175,6 @@ class BaseModel extends Model
|
|||
->where('id', $this->decodePrimaryKey($value))->firstOrFail();
|
||||
}
|
||||
|
||||
public function getEntityDesigner()
|
||||
{
|
||||
$design = Design::find($this->decodePrimaryKey($this->client->getSetting('invoice_design_id')));
|
||||
|
||||
$entity = strtolower(class_basename($this));
|
||||
|
||||
return new Designer($this, $design, $this->client->getSetting('pdf_variables'), $entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class ActivityRepository extends BaseRepository
|
|||
$entity_design_id = $entity->design_id ? $entity->design_id : $this->decodePrimaryKey($entity->client->getSetting($entity_design_id));
|
||||
|
||||
$design = Design::find($entity_design_id);
|
||||
$html = new HtmlEngine($invitation);
|
||||
$html = new HtmlEngine($entity->invitations->first());
|
||||
|
||||
if ($design->is_custom) {
|
||||
$options = [
|
||||
|
|
@ -147,5 +147,5 @@ class ActivityRepository extends BaseRepository
|
|||
->getCompiledHTML(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue