Document item edit columns checking name and description column ( #866acb813 )
This commit is contained in:
parent
f040a95118
commit
c58db84339
13
public/css/app.css
vendored
13
public/css/app.css
vendored
@ -62577,6 +62577,11 @@ body{
|
||||
background-color: rgb(101 99 140 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-purple-100:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(238 238 243 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-opacity-100:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
}
|
||||
@ -63827,6 +63832,10 @@ body{
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
|
||||
:is([dir="ltr"] .ltr\:pr-9){
|
||||
padding-right: 2.25rem;
|
||||
}
|
||||
|
||||
:is([dir="ltr"] .ltr\:text-left){
|
||||
text-align: left;
|
||||
}
|
||||
@ -65608,6 +65617,10 @@ body{
|
||||
border-bottom-width: calc(0px * var(--tw-divide-y-reverse));
|
||||
}
|
||||
|
||||
.lg\:overflow-hidden{
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.lg\:overflow-x-hidden{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
29
resources/assets/js/mixins/global.js
vendored
29
resources/assets/js/mixins/global.js
vendored
@ -1296,30 +1296,59 @@ export default {
|
||||
},
|
||||
|
||||
settingsInvoice() {
|
||||
|
||||
if (this.form.item_name == 'custom') {
|
||||
this.item_name_input = true;
|
||||
|
||||
this.onSmallWidthColumn("item_name");
|
||||
} else {
|
||||
this.item_name_input = false;
|
||||
|
||||
this.onFullWidthColumn("item_name");
|
||||
}
|
||||
|
||||
if (this.form.price_name == 'custom') {
|
||||
this.price_name_input = true;
|
||||
|
||||
this.onSmallWidthColumn("price_name");
|
||||
} else {
|
||||
this.price_name_input = false;
|
||||
|
||||
this.onFullWidthColumn("price_name");
|
||||
}
|
||||
|
||||
if (this.form.quantity_name == 'custom') {
|
||||
this.quantity_name_input = true;
|
||||
|
||||
this.onSmallWidthColumn("quantity_name");
|
||||
} else {
|
||||
this.quantity_name_input = false;
|
||||
|
||||
this.onFullWidthColumn("quantity_name");
|
||||
}
|
||||
|
||||
if (this.form.item_name == 'hide' && this.form.hide_item_description === 1) {
|
||||
this.form.hide_item_description = 0;
|
||||
|
||||
let type = 'warning';
|
||||
|
||||
if (this.$notifications.state != undefined && this.$notifications.state.length > 0) {
|
||||
this.$notifications.state.forEach((item, index) => {
|
||||
if (item.message == this.form.item_name_or_description_required) {
|
||||
return;
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
|
||||
this.$notify({
|
||||
verticalAlign: 'bottom',
|
||||
horizontalAlign: 'left',
|
||||
message: this.form.message_name_or_description_required,
|
||||
timeout: 8000,
|
||||
icon: 'error_outline',
|
||||
type
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// set minimum date for date component
|
||||
|
@ -65,6 +65,8 @@ return [
|
||||
'await' => 'Awaiting payment',
|
||||
],
|
||||
],
|
||||
|
||||
'name_or_description_required' => 'Your invoice must show at least one of the <b>:name</b> or <b>:description</b>.',
|
||||
],
|
||||
|
||||
'slider' => [
|
||||
|
@ -7,11 +7,13 @@
|
||||
v-if="{{ $attributes['show'] }}"
|
||||
@endif
|
||||
>
|
||||
<x-form.label for="{{ $name }}">{!! $label !!}</x-form.label>
|
||||
<x-form.label for="{{ $name }}">
|
||||
{!! $label !!}
|
||||
</x-form.label>
|
||||
|
||||
<div class="flex items-center mt-1">
|
||||
@if (empty($attributes['disabled']))
|
||||
<label class="relative w-10 ltr:rounded-tl-lg ltr:rounded-bl-lg rtl:rounded-tr-lg rtl:rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="form.{{ $name }}=1" v-bind:class="[form.{{ $name }} == 1 ? ['bg-green-500','text-white'] : 'bg-black-100']">
|
||||
<label class="relative w-10 ltr:rounded-tl-lg ltr:rounded-bl-lg rtl:rounded-tr-lg rtl:rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="form.{{ $name }}=1; @if(isset($attributes['change'])) {!! $attributes['change'] !!} @endif" v-bind:class="[form.{{ $name }} == 1 ? ['bg-green-500','text-white'] : 'bg-black-100']">
|
||||
{{ empty($enable) ? trans('general.yes') : $enable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
@ -23,7 +25,7 @@
|
||||
@endif
|
||||
|
||||
@if (empty($attributes['disabled']))
|
||||
<label class="relative w-10 ltr:rounded-tr-lg ltr:rounded-br-lg rtl:rounded-tl-lg rtl:rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="form.{{ $name }}=0" v-bind:class="[form.{{ $name }} == 0 ? ['bg-red-500','text-white'] : 'bg-black-100']">
|
||||
<label class="relative w-10 ltr:rounded-tr-lg ltr:rounded-br-lg rtl:rounded-tl-lg rtl:rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="form.{{ $name }}=0; @if(isset($attributes['change'])) {!! $attributes['change'] !!} @endif" v-bind:class="[form.{{ $name }} == 0 ? ['bg-red-500','text-white'] : 'bg-black-100']">
|
||||
{{ empty($disable) ? trans('general.no') : $disable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
|
@ -33,10 +33,11 @@
|
||||
form-group-class="sm:col-span-6 sm:gap-0"
|
||||
/>
|
||||
|
||||
<x-form.group.toggle name="hide_item_description" label="{{ trans('settings.invoice.hide.item_description') }}" :value="$hide_item_description" />
|
||||
<x-form.group.toggle name="hide_item_description" label="{{ trans('settings.invoice.hide.item_description') }}" :value="$hide_item_description" change="settingsInvoice()" />
|
||||
<x-form.group.toggle name="hide_amount" label="{{ trans('settings.invoice.hide.amount') }}" :value="$hide_amount" not-required form-group-class="sm:col-span-6" />
|
||||
|
||||
<x-form.input.hidden name="type" :value="$type" />
|
||||
<x-form.input.hidden name="enabled" value="1" />
|
||||
<x-form.input.hidden name="message_name_or_description_required" :value="trans('invoices.messages.name_or_description_required', ['name' => trans('general.name'), 'description' => trans('general.description')])" />
|
||||
</div>
|
||||
</x-form>
|
||||
|
@ -132,7 +132,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex gap-10">
|
||||
<x-form.group.toggle name="hide_item_description" label="{{ trans('settings.invoice.hide.item_description') }}" :value="setting('invoice.hide_item_description')" not-required form-group-class="sm:col-span-6" />
|
||||
<x-form.group.toggle name="hide_item_description" label="{{ trans('settings.invoice.hide.item_description') }}" :value="setting('invoice.hide_item_description')" change="settingsInvoice()" not-required form-group-class="sm:col-span-6" />
|
||||
|
||||
<x-form.group.toggle name="hide_amount" label="{{ trans('settings.invoice.hide.amount') }}" :value="setting('invoice.hide_amount')" not-required form-group-class="sm:col-span-6" />
|
||||
</div>
|
||||
@ -149,6 +149,7 @@
|
||||
|
||||
<x-form.input.hidden name="_template" :value="setting('invoice.template')" />
|
||||
<x-form.input.hidden name="_prefix" value="invoice" />
|
||||
<x-form.input.hidden name="message_name_or_description_required" :value="trans('invoices.messages.name_or_description_required', ['name' => trans('general.name'), 'description' => trans('general.description')])" />
|
||||
</x-form>
|
||||
</x-form.container>
|
||||
</x-slot>
|
||||
|
Loading…
x
Reference in New Issue
Block a user