mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 22:37:28 -08:00
html work, code comments for tomorrow's tasks
This commit is contained in:
parent
327d27591f
commit
b7f6c7df06
|
@ -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 array
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
];
|
|
@ -366,20 +366,27 @@
|
|||
|
||||
<div class="col-md-2">
|
||||
<div style=padding-bottom:5px>
|
||||
<a href="#" class="btn btn-primary">
|
||||
<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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue