mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
fields appear in preview, but not bulk generate labels
This commit is contained in:
parent
550f9e2afa
commit
b67ceab849
|
@ -165,7 +165,7 @@ class DefaultLabel extends RectangleSheet
|
||||||
if ($settings->labels_display_name && $fieldsDone < $this->getSupportFields()) {
|
if ($settings->labels_display_name && $fieldsDone < $this->getSupportFields()) {
|
||||||
foreach ($record->get('fields') as $field) {
|
foreach ($record->get('fields') as $field) {
|
||||||
static::writeText(
|
static::writeText(
|
||||||
$pdf, $field['label'][0] . ': ' . $field['value'],
|
$pdf, $field['label'][0]. ': ' . $field['value'],
|
||||||
$textX1, $textY,
|
$textX1, $textY,
|
||||||
'freesans', '', $this->textSize, 'L',
|
'freesans', '', $this->textSize, 'L',
|
||||||
$textW, $this->textSize,
|
$textW, $this->textSize,
|
||||||
|
|
|
@ -79,7 +79,6 @@ class Label implements View
|
||||||
$fieldDefinitions = collect(explode(';', $settings->label2_fields))
|
$fieldDefinitions = collect(explode(';', $settings->label2_fields))
|
||||||
->filter(fn($fieldString) => !empty($fieldString))
|
->filter(fn($fieldString) => !empty($fieldString))
|
||||||
->map(fn($fieldString) => Field::fromString($fieldString));
|
->map(fn($fieldString) => Field::fromString($fieldString));
|
||||||
|
|
||||||
// Prepare data
|
// Prepare data
|
||||||
$data = $assets
|
$data = $assets
|
||||||
->map(function ($asset) use ($template, $settings, $fieldDefinitions) {
|
->map(function ($asset) use ($template, $settings, $fieldDefinitions) {
|
||||||
|
@ -154,7 +153,6 @@ class Label implements View
|
||||||
|
|
||||||
return $toAdd ? $myFields->push($toAdd) : $myFields;
|
return $toAdd ? $myFields->push($toAdd) : $myFields;
|
||||||
}, new Collection());
|
}, new Collection());
|
||||||
|
|
||||||
$assetData->put('fields', $fields->take($template->getSupportFields()));
|
$assetData->put('fields', $fields->take($template->getSupportFields()));
|
||||||
|
|
||||||
return $assetData;
|
return $assetData;
|
||||||
|
|
|
@ -255,7 +255,6 @@
|
||||||
{{ Form::hidden('labels_display_model', old('labels_display_model', $setting->labels_display_model)) }}
|
{{ Form::hidden('labels_display_model', old('labels_display_model', $setting->labels_display_model)) }}
|
||||||
{{ Form::hidden('labels_display_company_name', old('labels_display_company_name', $setting->labels_display_company_name)) }}
|
{{ Form::hidden('labels_display_company_name', old('labels_display_company_name', $setting->labels_display_company_name)) }}
|
||||||
@else
|
@else
|
||||||
|
|
||||||
<!-- Legacy settings -->
|
<!-- Legacy settings -->
|
||||||
<div class="form-group{{ $errors->has('labels_per_page') ? ' has-error' : '' }}">
|
<div class="form-group{{ $errors->has('labels_per_page') ? ' has-error' : '' }}">
|
||||||
<div class="col-md-3 text-right">
|
<div class="col-md-3 text-right">
|
||||||
|
@ -378,8 +377,7 @@
|
||||||
{!! $errors->first('labels_pageheight', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
{!! $errors->first('labels_pageheight', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
@if(!$setting->label2_enable)
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-3 text-right">
|
<div class="col-md-3 text-right">
|
||||||
{{ Form::label('labels_display', trans('admin/settings/general.label_fields'), ['class' => 'control-label']) }}
|
{{ Form::label('labels_display', trans('admin/settings/general.label_fields'), ['class' => 'control-label']) }}
|
||||||
|
@ -405,13 +403,9 @@
|
||||||
{{ Form::checkbox('labels_display_company_name', '1', old('labels_display_company_name', $setting->labels_display_company_name),['class' => 'minimal', 'aria-label'=>'labels_display_company_name']) }}
|
{{ Form::checkbox('labels_display_company_name', '1', old('labels_display_company_name', $setting->labels_display_company_name),['class' => 'minimal', 'aria-label'=>'labels_display_company_name']) }}
|
||||||
{{ trans('admin/companies/table.name') }}
|
{{ trans('admin/companies/table.name') }}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div> <!--/.col-md-9-->
|
</div> <!--/.col-md-9-->
|
||||||
</div> <!--/.form-group-->
|
</div> <!--/.form-group-->
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!--/.box-body-->
|
</div> <!--/.box-body-->
|
||||||
|
|
Loading…
Reference in a new issue