Anpassung
Dienstplan als Endlosdatei für Appanbindung
This commit is contained in:
parent
ce55c66371
commit
c948934ca4
@ -291,9 +291,12 @@ class ServiceController extends PostController
|
||||
$model = $this->newModel()
|
||||
->select('posts.*', 'tags3.name as serviceType', 'posts.type')
|
||||
->isPublished()
|
||||
->where('posts.type', $this->modelType)
|
||||
->where(DB::raw('year(datetime)'), $year)
|
||||
->join('post_tag as post_tag1', function($join){
|
||||
->where('posts.type', $this->modelType);
|
||||
if(strtolower($year) != "app")
|
||||
{
|
||||
$model = $model->where(DB::raw('year(datetime)'), $year);
|
||||
}
|
||||
$model = $model->join('post_tag as post_tag1', function($join){
|
||||
$join->on('posts.id', 'post_tag1.post_id');
|
||||
})
|
||||
->join('tags as tags1', function($join) use($department){
|
||||
@ -327,12 +330,12 @@ class ServiceController extends PostController
|
||||
{
|
||||
$department = TagHelper::getTagNameByType($model[0], 'abteilung');
|
||||
$instance = TagHelper::getTagNameByType($model[0], 'instanz');
|
||||
$year = Carbon::parse($model[0]->datetime)->format('Y');
|
||||
$year2 = Carbon::parse($model[0]->datetime)->format('Y');
|
||||
$model = $this->getNextService($model, $department, $instance, $year);
|
||||
}
|
||||
$this->prepareModel2($model);
|
||||
$model->type = $this->modelType;
|
||||
$model->year = $year;
|
||||
$model->year = $year2;
|
||||
$model->department = $department;
|
||||
$model->instance = $instance;
|
||||
$model->isMainPost = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user