add date group field to reports editor

This commit is contained in:
Raphael Owino 2020-07-07 13:36:58 +03:00
parent ff4f70442c
commit ddf04c4c90
2 changed files with 13 additions and 0 deletions

View File

@ -37,6 +37,13 @@
) }} ) }}
@elseif ($type == 'textareaGroup') @elseif ($type == 'textareaGroup')
{{ Form::$type($field['name'], $field['title']) }} {{ Form::$type($field['name'], $field['title']) }}
@elseif ($type == 'dateGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], array_merge([
'data-field' => 'settings',
],
$field['attributes']),
isset($class->model->settings->{$field['name']}) ? $class->model->settings->{$field['name']}: null
) }}
@elseif ($type == 'selectGroup') @elseif ($type == 'selectGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $report->settings->{$field['name']}, array_merge([ {{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $report->settings->{$field['name']}, array_merge([
'data-field' => 'settings' 'data-field' => 'settings'

View File

@ -9,6 +9,12 @@
) }} ) }}
@elseif ($type == 'textareaGroup') @elseif ($type == 'textareaGroup')
{{ Form::$type($field['name'], $field['title']) }} {{ Form::$type($field['name'], $field['title']) }}
@elseif ($type == 'dateGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], array_merge([
'model' => 'form.settings'.'.'.$field['name']
],
$field['attributes'])
) }}
@elseif ($type == 'selectGroup') @elseif ($type == 'selectGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $field['selected'], array_merge([ {{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $field['selected'], array_merge([
'data-field' => 'settings' 'data-field' => 'settings'