A free open source IT asset/license management system
html work, code comments for tomorrow's tasks
akemidxb7f6c7df06db
diff --git a/app/Models/SavedReport.php b/app/Models/SavedReport.phpindex 417a6ccadf..e3c0009f28 100644--- a/app/Models/SavedReport.php+++ b/app/Models/SavedReport.php@@ -24,6 +24,9 @@ class SavedReport extends Model'options',];+ //we will need a bit to catch and store the name of the report.+ //for now the blip above is creating the name, but can be confusing if multiple are made at once+public function checkmarkValue($property): string{// Assuming we're using the null object pattern,@@ -41,9 +44,10 @@ class SavedReport extends Model{// @todo: this method feels more like "radioShouldBeChecked" or something...- if (array_has($this->options, $property) && $this->options[$property] === $value) {- return $return;- }+// if (array_has($this->options, $property) && $this->options[$property] === $value) {+// return $return;+// }+ // this is currently throwing an error. $property is coming through as a string and it needs to be an arrayreturn null;}diff --git a/resources/lang/en/admin/reports/general.php b/resources/lang/en/admin/reports/general.phpindex 6d0b0e0055..cc87e1334d 100644--- a/resources/lang/en/admin/reports/general.php+++ b/resources/lang/en/admin/reports/general.php@@ -7,8 +7,9 @@ return ['reminder_sent' => 'Reminder sent','acceptance_deleted' => 'Acceptance request deleted','acceptance_request' => 'Acceptance request',+ 'saved_reports' => 'Saved Reports','save_template' => 'Save Template','apply_template' => 'Apply Template',- 'select_template' => 'Select Template',+ 'generate_template' => 'Generate Template','apply_and_generate' => 'Apply and Generate',];\ No newline at end of filediff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.phpindex 0dd623447c..84394981ef 100644--- a/resources/views/reports/custom.blade.php+++ b/resources/views/reports/custom.blade.php@@ -366,20 +366,27 @@<div class="col-md-2"><div style=padding-bottom:5px>- <a href="#" class="btn btn-primary">- {{ trans('admin/reports/general.apply_and_generate') }}</a>+ <button type="submit" class="btn btn-success" style="width: 100%">+ <i class="fas fa-download icon-white" aria-hidden="true"></i>+ {{ trans('general.generate') }}+ </button>+ </div>+ <div style=padding-bottom:5px>+ <a href="#" class="btn btn-primary" style="width: 100%">+ {{ trans('admin/reports/general.apply_and_generate') }}</a></div><div style=padding-bottom:5px><form method="post" id="savetemplateform" action="{{ route("savedreports/store") }}">@csrf- <input type="hidden" id="savetemplateoptions" name="options">- <button class = "btn btn-primary">+ <input type="hidden" id="savetemplateform" name="options">+ {{-- this will be a box to name the report? --}}+ <button class = "btn btn-primary" style="width: 100%">{{ trans('admin/reports/general.save_template') }}</button></form></div><div style=padding-bottom:5px>- <a href="#" class="dropdown-toggle" data-toggle="dropdown" tabindex="-1" >+ <a href="#" class="js-data-ajax" data-toggle="dropdown" tabindex="-1" data-placeholder="{{ trans('admin/reports/general.saved_reports')}}" style="width:100%">{{ trans('admin/reports/general.select_template') }}<strong class="caret"></strong></a>@@ -391,22 +398,6 @@@endforeach</ul></div>--- {{ $fieldname = $report->name }}- <select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('admin/reports/general.select_template') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}{{ (isset($multiple) && ($multiple=='true')) ? " multiple='multiple'" : '' }}>- @if ($report->name!='')- <option value="{{ $fieldname }}" selected="selected" role="option" aria-selected="true" role="option">- @foreach($saved_reports as $report)- <li>- {{ $report->name }}- </li>- @endforeach- </option>- @else- <option value="" role="option">{{ trans('admin/reports/general.select_template') }}</option>- @endif- </select></div></div>