some styling..

This commit is contained in:
Cüneyt Şentürk 2021-01-04 18:26:52 +03:00
parent 21e5a3838c
commit 239a1f282a
4 changed files with 110 additions and 87 deletions

View File

@ -1434,3 +1434,10 @@ table .align-items-center td span.badge {
transform: rotateZ(0); transform: rotateZ(0);
} }
/* Akaunting select remove add suffix icon Finish */ /* Akaunting select remove add suffix icon Finish */
.item-add-new .btn-link {
color: #55588b;
}
.item-columns-edit .btn-aka-link {
color: #8688ad;
}

View File

@ -1,6 +1,5 @@
<div class="row document-item-body"> <div class="row document-item-body">
<div class="col-sm-12 p-0" style="table-layout: fixed;"> <div class="col-sm-12 p-0" style="table-layout: fixed;">
@php $item_colspan = in_array(setting('localisation.discount_location', 'total'), ['item', 'both']) ? '6' : '5' @endphp
@if (!$hideEditItemColumns) @if (!$hideEditItemColumns)
<x-edit-item-columns type="{{ $type }}" /> <x-edit-item-columns type="{{ $type }}" />
@endif @endif
@ -73,7 +72,7 @@
@stack('add_item_td_start') @stack('add_item_td_start')
<tr id="addItem"> <tr id="addItem">
<td class="text-right border-bottom-0 p-0" colspan="{{ 7 }}"> <td class="text-right border-bottom-0 p-0" colspan="7">
<x-select-item-button <x-select-item-button
type="{{ $type }}" type="{{ $type }}"
is-sale="{{ $isSalePrice }}" is-sale="{{ $isSalePrice }}"

View File

@ -17,8 +17,8 @@
<tbody> <tbody>
<tr> <tr>
@stack('move_td_start') @stack('move_td_start')
<td class="pb-3 align-middle border-bottom-0" colspan="1" style="color: #8898aa;"> <td class="pl-3 pb-3 align-middle border-bottom-0" style="max-width: 40px;" style="color: #8898aa;">
<div draggable="true"> <div>
<i class="fas fa-grip-vertical"></i> <i class="fas fa-grip-vertical"></i>
</div> </div>
</td> </td>
@ -28,7 +28,7 @@
@if (!$hideItems || (!$hideName && !$hideDescription)) @if (!$hideItems || (!$hideName && !$hideDescription))
@stack('name_td_start') @stack('name_td_start')
@if (!$hideName) @if (!$hideName)
<td class="pb-3 align-middle border-bottom-0" colspan="1"> <td class="pb-3 align-middle border-bottom-0">
<span class="aka-text aka-text--body" tabindex="0" v-html="row.name" v-if="row.item_id"></span> <span class="aka-text aka-text--body" tabindex="0" v-html="row.name" v-if="row.item_id"></span>
<div v-else> <div v-else>
@stack('name_input_start') @stack('name_input_start')
@ -54,7 +54,7 @@
@stack('description_td_start') @stack('description_td_start')
@if (!$hideDescription) @if (!$hideDescription)
<td class="pb-3 border-bottom-0" colspan="1"> <td class="pb-3 border-bottom-0">
<textarea <textarea
class="form-control" class="form-control"
placeholder="Enter item description" placeholder="Enter item description"
@ -73,7 +73,7 @@
@stack('quantity_td_start') @stack('quantity_td_start')
@if (!$hideQuantity) @if (!$hideQuantity)
<td colspan="1" class="pb-3 border-bottom-0" style="padding-right: 5px; padding-left: 5px;"> <td class="pb-3 pl-0 pr-0 border-bottom-0">
<div> <div>
@stack('quantity_input_start') @stack('quantity_input_start')
<input type="text" <input type="text"
@ -98,7 +98,7 @@
@stack('price_td_start') @stack('price_td_start')
@if (!$hidePrice) @if (!$hidePrice)
<td colspan="1" class="pb-3 border-bottom-0" style="padding-right: 5px; padding-left: 5px;"> <td class="pb-3 pl-2 pr-0 border-bottom-0" style="padding-right: 5px; padding-left: 5px;">
<div> <div>
@stack('price_input_start') @stack('price_input_start')
{{ Form::moneyGroup('price', '', '', ['required' => 'required', 'row-input' => 'true', 'v-model' => 'row.price', 'v-error' => 'form.errors.get(\'items.\' + index + \'.price\')', 'v-error-message' => 'form.errors.get(\'items.\' + index + \'.price\')' , 'data-item' => 'price', 'currency' => $currency, 'dynamic-currency' => 'currency', 'change' => 'row.price = $event; form.errors.clear(\'items.\' + index + \'.price\'); onCalculateTotal'], 0.00, 'text-right input-price p-0') }} {{ Form::moneyGroup('price', '', '', ['required' => 'required', 'row-input' => 'true', 'v-model' => 'row.price', 'v-error' => 'form.errors.get(\'items.\' + index + \'.price\')', 'v-error-message' => 'form.errors.get(\'items.\' + index + \'.price\')' , 'data-item' => 'price', 'currency' => $currency, 'dynamic-currency' => 'currency', 'change' => 'row.price = $event; form.errors.clear(\'items.\' + index + \'.price\'); onCalculateTotal'], 0.00, 'text-right input-price p-0') }}
@ -110,7 +110,7 @@
@stack('total_td_start') @stack('total_td_start')
@if (!$hideAmount) @if (!$hideAmount)
<td colspan="1" class="text-right long-texts pb-3 border-bottom-0"> <td class="text-right long-texts pb-3 border-bottom-0">
<div> <div>
{{ Form::moneyGroup('total', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row.total', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }} {{ Form::moneyGroup('total', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row.total', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
</div> </div>
@ -119,7 +119,7 @@
@stack('total_td_end') @stack('total_td_end')
@stack('delete_td_start') @stack('delete_td_start')
<td colspan="1" class="pb-3 align-middle border-bottom-0"> <td class="pb-3 pl-2 align-middle border-bottom-0" style="max-width: 40px;" >
<div> <div>
<button type="button" @click="onDeleteItem(index)" class="btn btn-link btn-delete p-0"> <button type="button" @click="onDeleteItem(index)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i> <i class="far fa-trash-alt"></i>
@ -134,7 +134,7 @@
@stack('item_custom_fields') @stack('item_custom_fields')
</td> </td>
<td class="border-top-0 p-0" colspan="{{ '4' }}"> <td class="border-top-0 p-0" colspan="4">
<table class="w-100"> <table class="w-100">
<colgroup> <colgroup>
<col style="width: 100px;"> <col style="width: 100px;">
@ -142,28 +142,36 @@
<col style="width: 250px;"> <col style="width: 250px;">
<col style="width: 40px;"> <col style="width: 40px;">
</colgroup> </colgroup>
<tbody> <tbody>
@if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both'])) @if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
<tr v-if="!row.add_tax || !row.add_discount"> <tr v-if="!row.add_tax || !row.add_discount">
<td colspan="1" style="border: 0; max-width: 100px; border: 0px; padding-left: 10px;"> <td style="border: 0; max-width: 100px; border: 0px; padding-left: 10px;">
<div style="max-width: 100px;"> <div style="max-width: 100px;">
<button type="button" class="btn btn-link btn-sm p-0" @click="onAddLineDiscount(index)" v-if="!row.add_discount">{{ trans('general.title.add', ['type' => trans('invoices.discount')]) }}</button> <button type="button" class="btn btn-link btn-sm p-0" @click="onAddLineDiscount(index)" v-if="!row.add_discount">
{{ trans('general.title.add', ['type' => trans('invoices.discount')]) }}
</button>
</div> </div>
</td> </td>
<td colspan="1" style="border: 0; max-width: 100px; border: 0px; padding-right: 10px; text-align: right;">
<td style="border: 0; max-width: 100px; border: 0px; padding-right: 10px; text-align: right;">
<div style="max-width: 100px;"> <div style="max-width: 100px;">
<button type="button" class="btn btn-link btn-sm p-0" @click="onAddTax(index)" v-if="!row.add_tax">{{ trans('general.title.add', ['type' => trans_choice('general.taxes', 1)]) }}</button> <button type="button" class="btn btn-link btn-sm p-0" @click="onAddTax(index)" v-if="!row.add_tax">
{{ trans('general.title.add', ['type' => trans_choice('general.taxes', 1)]) }}
</button>
</div> </div>
</td> </td>
<td colspan="1" style="border: 0;" class="text-right total-column border-bottom-0 long-texts">
<td class="text-right total-column border-0 long-texts">
</td> </td>
<td colspan="1" style="border: 0;" class="w-1">
<td class="w-1 border-0">
</td> </td>
</tr> </tr>
<tr v-if="row.add_discount"> <tr v-if="row.add_discount">
<td colspan="2" class="pb-0" style="border: 0px; padding-left: 5px; padding-right: 5px;"> <td colspan="2" class="pb-0 border-0" style="padding-left: 5px; padding-right: 5px;">
<div style="margin-left: -63px; margin-right: 35px;"> <div style="margin-left: -63px; margin-right: 35px;">
<span style="float: left; margin-right: 10px; margin-top: 15px;">{{ trans('invoices.discount') }}</span> <span style="float: left; margin-right: 10px; margin-top: 15px;">{{ trans('invoices.discount') }}</span>
@stack('discount_input_start') @stack('discount_input_start')
@ -195,12 +203,14 @@
@stack('discount_input_end') @stack('discount_input_end')
</div> </div>
</td> </td>
<td colspan="1" style="border: 0;" class="text-right long-texts">
<td class="text-right long-texts border-0">
<div> <div>
{{ Form::moneyGroup('discount', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'value' => 'row.discount', 'data-item' => 'discount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }} {{ Form::moneyGroup('discount', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'value' => 'row.discount', 'data-item' => 'discount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
</div> </div>
</td> </td>
<td colspan="1" style="border: 0;" class="pb-0 align-middle">
<td class="pb-3 pl-2 align-bottom border-0" style="max-width: 40px;" >
<button type="button" @click="onDeleteDiscount(index)" class="btn btn-link btn-delete p-0"> <button type="button" @click="onDeleteDiscount(index)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i> <i class="far fa-trash-alt"></i>
</button> </button>
@ -210,9 +220,11 @@
<tr v-for="(row_tax, row_tax_index) in row.tax_ids" <tr v-for="(row_tax, row_tax_index) in row.tax_ids"
:index="row_tax_index"> :index="row_tax_index">
<td colspan="2" class="pb-0" :class="{'pb-2' : !row.add_tax}" style="border: 0; padding-right: 5px; padding-left: 5px;"> <td colspan="2" class="pl-0 pb-0 border-0" :class="{'pb-2' : !row.add_tax}">
<div style="margin-left: -30px; margin-right: 35px;"> <div>
<span style="float: left; margin-right: 10px; margin-top: 15px;">{{ trans_choice('general.taxes', 1) }}</span> <div style="float: left; margin-top: 15px;">
{{ trans_choice('general.taxes', 1) }}
</div>
@stack('taxes_input_start') @stack('taxes_input_start')
<akaunting-select <akaunting-select
@ -235,12 +247,14 @@
@stack('taxes_input_end') @stack('taxes_input_end')
</div> </div>
</td> </td>
<td colspan="1" style="border: 0;" :class="{'pb-2' : !row.add_tax}" class="pb-0 text-right long-texts">
<td :class="{'pb-2' : !row.add_tax}" class="border-0 pb-0 text-right long-texts">
<div> <div>
{{ Form::moneyGroup('tax', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row_tax.price', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }} {{ Form::moneyGroup('tax', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row_tax.price', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
</div> </div>
</td> </td>
<td colspan="1" style="border: 0;" :class="{'pb-2' : !row.add_tax}" class="pb-0 align-middle">
<td class="pb-3 pl-2 align-bottom border-0" :class="{'pb-2' : !row.add_tax}" style="max-width: 40px;" >
<button type="button" @click="onDeleteTax(index, row_tax_index)" class="btn btn-link btn-delete p-0"> <button type="button" @click="onDeleteTax(index, row_tax_index)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i> <i class="far fa-trash-alt"></i>
</button> </button>
@ -248,11 +262,11 @@
</tr> </tr>
<tr v-if="row.add_tax"> <tr v-if="row.add_tax">
<td colspan="2" style="border: 0; padding-right: 5px; padding-left: 5px;"> <td colspan="2" class="pl-0 border-0">
<div style="margin-left: -30px; margin-right:35px;"> <div>
<span style="float: left; margin-right: 10px; margin-top: 15px;"> <div style="float: left; margin-top: 15px;">
{{ trans_choice('general.taxes', 1) }} {{ trans_choice('general.taxes', 1) }}
</span> </div>
@stack('taxes_input_start') @stack('taxes_input_start')
<akaunting-select <akaunting-select
@ -296,12 +310,14 @@
@stack('taxes_input_end') @stack('taxes_input_end')
</div> </div>
</td> </td>
<td colspan="1" style="border: 0;" class="text-right long-texts align-middle">
<td class="border-0 text-right long-texts align-middle">
<div> <div>
__ __
</div> </div>
</td> </td>
<td colspan="1" style="border: 0;">
<td class="pb-3 pl-2 align-bottom border-0" style="max-width: 40px;" >
@if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both'])) @if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
<button type="button" @click="onDeleteTax(index, 999)" class="btn btn-link btn-delete p-0"> <button type="button" @click="onDeleteTax(index, 999)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i> <i class="far fa-trash-alt"></i>
@ -309,6 +325,7 @@
@endif @endif
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</td> </td>

View File

@ -3,9 +3,9 @@
<div class="table-responsive overflow-x-scroll overflow-y-hidden"> <div class="table-responsive overflow-x-scroll overflow-y-hidden">
<table class="table" id="totals"> <table class="table" id="totals">
<colgroup> <colgroup>
<col style="width: 60%;"> <col style="width: 50%;">
<col style="width: 30%;"> <col style="width: 35%;">
<col style="width: 20%;"> <col style="width: 25%;">
<col style="width: 40px;"> <col style="width: 40px;">
</colgroup> </colgroup>
<tbody id="invoice-total-rows" class="table-padding-05"> <tbody id="invoice-total-rows" class="table-padding-05">