Make dynamic invoice settings for documents

This commit is contained in:
Burak Çakırel
2021-02-22 17:21:04 +03:00
parent 35fa63bf42
commit 8aac5fe433
12 changed files with 163 additions and 53 deletions

View File

@@ -15,11 +15,11 @@
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
@if (!$hideDocumentTitle)
{{ Form::textGroup('title', trans('settings.invoice.title'), 'font', ['data-field' => 'setting'], setting($type . '.title'), 'col-md-12') }}
{{ Form::textGroup('title', trans('settings.invoice.title'), 'font', ['data-field' => 'setting'], $titleSetting, 'col-md-12') }}
@endif
@if (!$hideDocumentSubheading)
{{ Form::textGroup('subheading', trans('settings.invoice.subheading'), 'font', ['data-field' => 'setting'], setting($type . '.subheading'), 'col-md-12') }}
{{ Form::textGroup('subheading', trans('settings.invoice.subheading'), 'font', ['data-field' => 'setting'], $subheadingSetting, 'col-md-12') }}
@endif
@if (!$hideCompanyEdit)

View File

@@ -29,6 +29,7 @@
hide-document-title="{{ $hideDocumentTitle }}"
hide-document-subheading="{{ $hideDocumentSubheading }}"
hide-company-edit="{{ $hideCompanyEdit }}"
title-setting="{{ $titleSetting }}"
/>
@endif
@@ -67,12 +68,14 @@
text-amount="{{ $textAmount }}"
is-sale-price="{{ $isSalePrice }}"
is-purchase-price="{{ $isPurchasePrice }}"
notes-setting="{{ $notesSetting }}"
/>
@if (!$hideFooter)
<x-documents.form.footer
type="{{ $type }}"
:document="$document"
footer-setting="{{ $footerSetting }}"
/>
@endif

View File

@@ -6,7 +6,7 @@
</div>
<div id="accordion-footer-body" class="collapse hide" aria-labelledby="accordion-footer-header">
{{ Form::textareaGroup('footer', '', '', setting($type . '.footer'), ['rows' => '3'], 'embed-acoordion-textarea') }}
{{ Form::textareaGroup('footer', '', '', $footerSetting, ['rows' => '3'], 'embed-acoordion-textarea') }}
</div>
</div>
</div>
</div>

View File

@@ -54,6 +54,7 @@
<x-documents.form.note
type="{{ $type }}"
:document="$document"
notes-setting="{{ $notesSetting }}"
/>
</div>
</div>

View File

@@ -1,3 +1,3 @@
<div class="row embed-card-body-footer">
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2), '', setting($type . '.notes'), ['rows' => '3', 'class' => 'form-control embed-card-body-footer-textarea'], 'col-md-12 embed-acoordion-textarea') }}
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2), '', $notesSetting, ['rows' => '3', 'class' => 'form-control embed-card-body-footer-textarea'], 'col-md-12 embed-acoordion-textarea') }}
</div>

View File

@@ -10,23 +10,22 @@
'novalidate' => true,
]) !!}
<div class="row">
{{ Form::invoice_text('item_name', trans('settings.invoice.item_name'), 'font', $item_names, setting($type . '.item_name'), [], 'item_name_input', setting($type . '.item_name_input', null), 'col-md-12') }}
{{ Form::invoice_text('item_name', trans('settings.invoice.item_name'), 'font', $item_names, $item_name, [], 'item_name_input', $item_name_input, 'col-md-12') }}
{{ Form::invoice_text('price_name', trans('settings.invoice.price_name'), 'font', $price_names, setting($type . '.price_name'), [], 'price_name_input', setting($type . '.price_name_input', null), 'col-md-12') }}
{{ Form::invoice_text('price_name', trans('settings.invoice.price_name'), 'font', $price_names, $price_name, [], 'price_name_input', $price_name_input, 'col-md-12') }}
{{ Form::invoice_text('quantity_name', trans('settings.invoice.quantity_name'), 'font', $quantity_names, setting($type . '.quantity_name'), [], 'quantity_name_input', setting($type . '.quantity_name_input', null), 'col-md-12') }}
{{ Form::invoice_text('quantity_name', trans('settings.invoice.quantity_name'), 'font', $quantity_names, $quantity_name, [], 'quantity_name_input', $quantity_name_input, 'col-md-12') }}
{{ Form::radioGroup('hide_item_name', trans('settings.invoice.hide.item_name'), setting($type . '.hide_item_name', null)) }}
{{ Form::radioGroup('hide_item_name', trans('settings.invoice.hide.item_name'), $hide_item_name) }}
{{ Form::radioGroup('hide_item_description', trans('settings.invoice.hide.item_description'), setting($type . '.hide_item_description', null)) }}
{{ Form::radioGroup('hide_item_description', trans('settings.invoice.hide.item_description'), $hide_item_description) }}
{{ Form::radioGroup('hide_quantity', trans('settings.invoice.hide.quantity'), setting($type . '.hide_quantity', null)) }}
{{ Form::radioGroup('hide_quantity', trans('settings.invoice.hide.quantity'), $hide_quantity) }}
{{ Form::radioGroup('hide_price', trans('settings.invoice.hide.price'), setting($type . '.hide_price', null)) }}
{{ Form::radioGroup('hide_price', trans('settings.invoice.hide.price'), $hide_price) }}
{{ Form::radioGroup('hide_amount', trans('settings.invoice.hide.amount'), setting($type . '.hide_amount', null)) }}
{{ Form::radioGroup('hide_amount', trans('settings.invoice.hide.amount'), $hide_amount) }}
{!! Form::hidden('type', $type) !!}
{!! Form::hidden('_prefix', $type) !!}
</div>
{!! Form::close() !!}