big change Inhaltstabelle und PDF
This commit is contained in:
1 parent
2f6ae7e4a1
commit
d5d1f743bb
58 files changed
+1244
-922
No files matched your search
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Inhaltselement extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name',
|
||||
];
|
||||
}
|
||||
@@ -9,7 +9,7 @@ class Inhaltsverzeichnis extends Model
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'ueberschrift_anzeigen',
|
||||
'tabellen_id',
|
||||
'inhaltselement_id',
|
||||
'textblock_id',
|
||||
'sort',
|
||||
'ordnungszahl',
|
||||
@@ -35,8 +35,8 @@ class Inhaltsverzeichnis extends Model
|
||||
return $this->hasMany(Textblock::class, 'id', 'textblock_id');
|
||||
}
|
||||
|
||||
public function tabellen()
|
||||
public function inhaltselement()
|
||||
{
|
||||
return $this->hasMany(Tabellen::class, 'id', 'tabellen_id');
|
||||
return $this->hasMany(Inhaltselement::class, 'id', 'inhaltselement_id');
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class Plan extends Model
|
||||
{
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'payment',
|
||||
'description',
|
||||
'preis',
|
||||
'limit_user',
|
||||
'limit_auftraggeber',
|
||||
'limit_gutachter',
|
||||
'limit_gutachten',
|
||||
'icon',
|
||||
];
|
||||
|
||||
public static function options()
|
||||
{
|
||||
$arr = Plan::all()->toArray();
|
||||
foreach ($arr as $key => $value) {
|
||||
$str = '<div class="text-primary-500 text-lg">'.$value['payment'].'</div>';
|
||||
$str .= '<div class="text-xl font-black">'.number_format($value['preis'], 2).'€</div>';
|
||||
$str .= '<ol class="font-light text-xs leading-3 m-0 p-3">';
|
||||
$str .= '<li>'.$value['limit_user'].' Benutzer</li>';
|
||||
$str .= '<li>'.$value['limit_gutachter'].' Gutachter</li>';
|
||||
$str .= '</ol>';
|
||||
$arr[$key + 1] = new HtmlString($str);
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
@@ -10,24 +10,20 @@ class ProjektInhaltsverzeichnis extends Model
|
||||
'projekte_id',
|
||||
'name',
|
||||
'ueberschrift_anzeigen',
|
||||
'tabellen_id',
|
||||
'textblock_id',
|
||||
'inhaltselement_id',
|
||||
'sort',
|
||||
'ordnungszahl',
|
||||
'part',
|
||||
'seite',
|
||||
'neue_seite',
|
||||
'seitenzahl_anzeige',
|
||||
'textblock_name',
|
||||
'textblock',
|
||||
'textblock2',
|
||||
];
|
||||
|
||||
public function textblock()
|
||||
public function inhaltselement()
|
||||
{
|
||||
return $this->hasMany(Textblock::class, 'id', 'textblock_id');
|
||||
}
|
||||
|
||||
public function tabellen()
|
||||
{
|
||||
return $this->hasMany(Tabellen::class, 'id', 'tabellen_id');
|
||||
return $this->hasOne(Inhaltselement::class, 'id', 'inhaltselement_id');
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Tabellen extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -10,5 +10,6 @@ class Textblock extends Model
|
||||
'name',
|
||||
'beschreibung',
|
||||
'textblock',
|
||||
'textblock2',
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user