refs #1075
This commit is contained in:
parent
1c0697b266
commit
4bafcaccd6
@ -3,9 +3,7 @@
|
|||||||
namespace App\Http\Controllers\Modals;
|
namespace App\Http\Controllers\Modals;
|
||||||
|
|
||||||
use App\Abstracts\Http\Controller;
|
use App\Abstracts\Http\Controller;
|
||||||
use App\Http\Requests\Setting\Category as Request;
|
|
||||||
use Illuminate\Http\Request as CRequest;
|
use Illuminate\Http\Request as CRequest;
|
||||||
use App\Models\Setting\Category;
|
|
||||||
|
|
||||||
class Categories extends Controller
|
class Categories extends Controller
|
||||||
{
|
{
|
||||||
@ -28,17 +26,9 @@ class Categories extends Controller
|
|||||||
*/
|
*/
|
||||||
public function create(CRequest $request)
|
public function create(CRequest $request)
|
||||||
{
|
{
|
||||||
$type = $request['type'];
|
$type = $request->get('type', 'item');
|
||||||
|
|
||||||
$category_selector = false;
|
$html = view('modals.categories.create', compact('type'))->render();
|
||||||
|
|
||||||
if (request()->has('category_selector')) {
|
|
||||||
$category_selector = request()->get('category_selector');
|
|
||||||
}
|
|
||||||
|
|
||||||
$rand = rand();
|
|
||||||
|
|
||||||
$html = view('modals.categories.create', compact('currencies', 'type', 'category_selector', 'rand'))->render();
|
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => true,
|
'success' => true,
|
||||||
@ -47,28 +37,4 @@ class Categories extends Controller
|
|||||||
'html' => $html,
|
'html' => $html,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Store a newly created resource in storage.
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
*
|
|
||||||
* @return Response
|
|
||||||
*/
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
$request['enabled'] = 1;
|
|
||||||
|
|
||||||
$category = Category::create($request->all());
|
|
||||||
|
|
||||||
$message = trans('messages.success.added', ['type' => trans_choice('general.categories', 1)]);
|
|
||||||
|
|
||||||
return response()->json([
|
|
||||||
'success' => true,
|
|
||||||
'error' => false,
|
|
||||||
'data' => $category,
|
|
||||||
'message' => $message,
|
|
||||||
'html' => 'null',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,16 @@
|
|||||||
|
|
||||||
<el-select v-model="real_model" @input="change" disabled filterable v-if="disabled"
|
<el-select v-model="real_model" @input="change" disabled filterable v-if="disabled"
|
||||||
:placeholder="placeholder">
|
:placeholder="placeholder">
|
||||||
<div v-if="addNew" class="el-select-dropdown__wrap" slot="empty">
|
<div v-if="addNew.status && selectOptions.lenght > 0" class="el-select-dropdown__wrap" slot="empty">
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="selectOptions.lenght <= 0" class="el-select-dropdown__wrap" slot="empty">
|
||||||
|
<span>
|
||||||
|
<li v-if="addNew.status" class="el-select-dropdown__item hover" @click="onAddItem">
|
||||||
|
<span>{{ add_new_text }}</span>
|
||||||
|
</li>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<template slot="prefix">
|
<template slot="prefix">
|
||||||
<span class="el-input__suffix-inner el-select-icon">
|
<span class="el-input__suffix-inner el-select-icon">
|
||||||
@ -35,14 +42,14 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-option-group>
|
</el-option-group>
|
||||||
|
|
||||||
<li v-if="addNew" class="el-select-dropdown__item hover" @click="onAddItem">
|
<li v-if="addNew.status" class="el-select-dropdown__item hover" @click="onAddItem">
|
||||||
<span>{{ add_new_text }}</span>
|
<span>{{ add_new_text }}</span>
|
||||||
</li>
|
</li>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-select v-model="real_model" @input="change" filterable v-if="!disabled && !multiple"
|
<el-select v-model="real_model" @input="change" filterable v-if="!disabled && !multiple"
|
||||||
:placeholder="placeholder">
|
:placeholder="placeholder">
|
||||||
<div v-if="addNew" class="el-select-dropdown__wrap" slot="empty">
|
<div v-if="addNew.status" class="el-select-dropdown__wrap" slot="empty">
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -71,14 +78,14 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-option-group>
|
</el-option-group>
|
||||||
|
|
||||||
<li v-if="addNew" class="el-select-dropdown__item hover" @click="onAddItem">
|
<li v-if="addNew.status" class="el-select-dropdown__item hover" @click="onAddItem">
|
||||||
<span>{{ add_new_text }}</span>
|
<span>{{ add_new_text }}</span>
|
||||||
</li>
|
</li>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-select v-model="real_model" @input="change" filterable v-if="!disabled && multiple && !collapse" multiple
|
<el-select v-model="real_model" @input="change" filterable v-if="!disabled && multiple && !collapse" multiple
|
||||||
:placeholder="placeholder">
|
:placeholder="placeholder">
|
||||||
<div v-if="addNew" class="el-select-dropdown__wrap" slot="empty">
|
<div v-if="addNew.status" class="el-select-dropdown__wrap" slot="empty">
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -107,14 +114,14 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-option-group>
|
</el-option-group>
|
||||||
|
|
||||||
<li v-if="addNew" class="el-select-dropdown__item hover" @click="onAddItem">
|
<li v-if="addNew.status" class="el-select-dropdown__item hover" @click="onAddItem">
|
||||||
<span>{{ add_new_text }}</span>
|
<span>{{ add_new_text }}</span>
|
||||||
</li>
|
</li>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-select v-model="real_model" @input="change" filterable v-if="!disabled && multiple && collapse" multiple collapse-tags
|
<el-select v-model="real_model" @input="change" filterable v-if="!disabled && multiple && collapse" multiple collapse-tags
|
||||||
:placeholder="placeholder">
|
:placeholder="placeholder">
|
||||||
<div v-if="addNew" class="el-select-dropdown__wrap" slot="empty">
|
<div v-if="addNew.status" class="el-select-dropdown__wrap" slot="empty">
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -143,16 +150,26 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-option-group>
|
</el-option-group>
|
||||||
|
|
||||||
<li v-if="addNew" class="el-select-dropdown__item hover" @click="onAddItem">
|
<li v-if="addNew.status" class="el-select-dropdown__item hover" @click="onAddItem">
|
||||||
<span>{{ add_new_text }}</span>
|
<span>{{ add_new_text }}</span>
|
||||||
</li>
|
</li>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
|
<component v-bind:is="add_new_html" @interface="onRedirectConfirm"></component>
|
||||||
</base-input>
|
</base-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Select, Option, OptionGroup } from 'element-ui';
|
import { Select, Option, OptionGroup } from 'element-ui';
|
||||||
|
|
||||||
|
import AkauntingModal from './AkauntingModal';
|
||||||
|
import AkauntingRadioGroup from './forms/AkauntingRadioGroup';
|
||||||
|
import AkauntingSelect from './AkauntingSelect';
|
||||||
|
import AkauntingDate from './AkauntingDate';
|
||||||
|
import AkauntingRecurring from './AkauntingRecurring';
|
||||||
|
|
||||||
|
import Form from './../plugins/form';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "akaunting-select",
|
name: "akaunting-select",
|
||||||
|
|
||||||
@ -183,9 +200,21 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
description: "Prepend icon (left)"
|
description: "Prepend icon (left)"
|
||||||
},
|
},
|
||||||
addNew: false,
|
|
||||||
addNewText: null,
|
addNew: {
|
||||||
addNewPath: null,
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return {
|
||||||
|
text: 'Add New Item',
|
||||||
|
status: false,
|
||||||
|
path: null,
|
||||||
|
type: 'modal', // modal, inline
|
||||||
|
field: 'name'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
description: "Selectbox Add New Item Feature"
|
||||||
|
},
|
||||||
|
|
||||||
group: false,
|
group: false,
|
||||||
multiple:false,
|
multiple:false,
|
||||||
disabled:false,
|
disabled:false,
|
||||||
@ -194,9 +223,10 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
add_new_text: this.addNewText,
|
add_new_text: this.addNew.text,
|
||||||
selectOptions: this.options,
|
selectOptions: this.options,
|
||||||
real_model: this.model,
|
real_model: this.model,
|
||||||
|
add_new_html: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -208,6 +238,8 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
change() {
|
change() {
|
||||||
|
alert('Helooo');
|
||||||
|
|
||||||
this.$emit('change', this.real_model);
|
this.$emit('change', this.real_model);
|
||||||
this.$emit('interface', this.real_model);
|
this.$emit('interface', this.real_model);
|
||||||
},
|
},
|
||||||
@ -216,12 +248,119 @@ export default {
|
|||||||
// Get Select Input value
|
// Get Select Input value
|
||||||
var value = this.$children[0].$children[0].$children[0].$refs.input.value;
|
var value = this.$children[0].$children[0].$children[0].$refs.input.value;
|
||||||
|
|
||||||
|
if (this.addNew.type == 'inline') {
|
||||||
|
this.addInline(value);
|
||||||
|
} else {
|
||||||
|
this.onModal(value);
|
||||||
|
}
|
||||||
|
/*
|
||||||
this.$emit('new_item', {
|
this.$emit('new_item', {
|
||||||
value: value,
|
value: value,
|
||||||
path: this.addNewPath,
|
path: this.addNew.path,
|
||||||
title: this.addNewText,
|
title: this.addNew.text,
|
||||||
});
|
});
|
||||||
}
|
*/
|
||||||
|
},
|
||||||
|
|
||||||
|
addInline(value) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
onModal(value) {
|
||||||
|
let add_new = this.addNew;
|
||||||
|
|
||||||
|
axios.get(this.addNew.path)
|
||||||
|
.then(response => {
|
||||||
|
add_new.modal = true;
|
||||||
|
add_new.html = response.data.html;
|
||||||
|
|
||||||
|
this.add_new_html = Vue.component('add-new-component', function (resolve, reject) {
|
||||||
|
resolve({
|
||||||
|
template: '<div><akaunting-modal :show="addNew.modal" @cancel="addNew.modal = false" :title="addNew.text" :message="addNew.html">' +
|
||||||
|
+ '<template #card-footer>'
|
||||||
|
+ '<div class="float-right">'
|
||||||
|
+ '<button type="button" class="btn btn-outline-secondary">'
|
||||||
|
+ '<span>Cancel</span>'
|
||||||
|
+ '</button>'
|
||||||
|
+ '<button type="button" class="btn btn-success button-submit">'
|
||||||
|
+ '<div class="aka-loader d-none"></div>'
|
||||||
|
+ '<span>Confirm</span>'
|
||||||
|
+ '</button>'
|
||||||
|
+ '</div>'
|
||||||
|
+ '</template>'
|
||||||
|
+ '</akaunting-modal></div>',
|
||||||
|
|
||||||
|
components: {
|
||||||
|
AkauntingRadioGroup,
|
||||||
|
AkauntingSelect,
|
||||||
|
AkauntingModal,
|
||||||
|
AkauntingDate,
|
||||||
|
AkauntingRecurring,
|
||||||
|
},
|
||||||
|
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
form: new Form('form-create-category'),
|
||||||
|
addNew: add_new,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onRedirectConfirm() {
|
||||||
|
let redirect_form = new Form('redirect-form');
|
||||||
|
|
||||||
|
this.$emit('interface', redirect_form);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
this.selectOptions[3] = value;
|
||||||
|
|
||||||
|
let newOption = {
|
||||||
|
value: "3",
|
||||||
|
currentLabel: value,
|
||||||
|
label: value
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$children[0].$children[0].handleOptionSelect(newOption);
|
||||||
|
this.$children[0].$children[0].onInputChange('3');
|
||||||
|
|
||||||
|
this.real_model = "3";
|
||||||
|
|
||||||
|
this.$emit('change', this.real_model);
|
||||||
|
*/
|
||||||
|
})
|
||||||
|
.catch(e => {
|
||||||
|
this.errors.push(e);
|
||||||
|
})
|
||||||
|
.finally(function () {
|
||||||
|
// always executed
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onRedirectConfirm() {
|
||||||
|
this.redirectForm = new Form('redirect-form');
|
||||||
|
|
||||||
|
axios.post(this.redirectForm.action, this.redirectForm.data())
|
||||||
|
.then(response => {
|
||||||
|
if (response.data.redirect) {
|
||||||
|
location = response.data.redirect;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response.data.success) {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.method_show_html = error.message;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
addModal() {
|
||||||
|
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
|
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, setting('default.tax'), []) }}
|
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, setting('default.tax'), ['path' => route('modals.taxes.create')]) }}
|
||||||
|
|
||||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||||
|
|
||||||
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
|
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, []) }}
|
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=item']) }}
|
||||||
|
|
||||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), 'plus') }}
|
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), 'plus') }}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
|
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, $item->tax_id, []) }}
|
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, $item->tax_id, ['path' => route('modals.taxes.create')]) }}
|
||||||
|
|
||||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
|
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $item->category_id, []) }}
|
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $item->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=item']) }}
|
||||||
|
|
||||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
|
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
|
||||||
|
|
||||||
|
@ -1,99 +1,16 @@
|
|||||||
<div class="modal fade create-category-{{ $rand }} d-none" id="modal-create-category">
|
{!! Form::open([
|
||||||
<div class="modal-dialog modal-lg">
|
'id' => 'form-create-category',
|
||||||
<div class="modal-content">
|
'@submit.prevent' => 'onSubmit',
|
||||||
<div class="modal-header">
|
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||||
<h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.categories', 1)]) }}</h4>
|
'role' => 'form',
|
||||||
</div>
|
'class' => 'form-loading-button',
|
||||||
|
'route' => 'categories.store',
|
||||||
|
'novalidate' => true
|
||||||
|
]) !!}
|
||||||
|
<div class="row">
|
||||||
|
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||||
|
|
||||||
<div class="modal-body">
|
{!! Form::hidden('type', $type, []) !!}
|
||||||
{!! Form::open(['id' => 'form-create-category', 'role' => 'form', 'class' => 'form-loading-button']) !!}
|
{!! Form::hidden('enabled', '1', []) !!}
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
|
||||||
|
|
||||||
@stack('color_input_start')
|
|
||||||
<div class="form-group col-md-6 required {{ $errors->has('color') ? 'has-error' : ''}}">
|
|
||||||
{!! Form::label('color', trans('general.color'), ['class' => 'control-label']) !!}
|
|
||||||
<div id="category-color-picker" class="input-group colorpicker-component">
|
|
||||||
<div class="input-group-addon"><i></i></div>
|
|
||||||
{!! Form::text('color', '#00a65a', ['id' => 'color', 'class' => 'form-control', 'required' => 'required']) !!}
|
|
||||||
</div>
|
|
||||||
{!! $errors->first('color', '<p class="help-block">:message</p>') !!}
|
|
||||||
</div>
|
|
||||||
@stack('color_input_end')
|
|
||||||
|
|
||||||
{!! Form::hidden('type', $type, []) !!}
|
|
||||||
{!! Form::hidden('enabled', '1', []) !!}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{!! Form::close() !!}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<div class="pull-left">
|
|
||||||
{!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-category', 'class' => 'btn btn-success button-submit', 'data-loading-text' => trans('general.loading')]) !!}
|
|
||||||
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{!! Form::close() !!}
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function(){
|
|
||||||
$('.create-category-{{ $rand }}#modal-create-category').modal('show');
|
|
||||||
|
|
||||||
$('.create-category-{{ $rand }} #category-color-picker').colorpicker();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click', '.create-category-{{ $rand }} #button-create-category', function (e) {
|
|
||||||
$('.create-category-{{ $rand }}#modal-create-category .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 10em !important; margin-left: 35%;margin-top: 8%;"></i></span>');
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: '{{ url("modals/categories") }}',
|
|
||||||
type: 'POST',
|
|
||||||
dataType: 'JSON',
|
|
||||||
data: $(".create-category-{{ $rand }} #form-create-category").serialize(),
|
|
||||||
beforeSend: function () {
|
|
||||||
$('.create-category-{{ $rand }} #button-create-category').button('loading');
|
|
||||||
|
|
||||||
$(".create-category-{{ $rand }} .form-group").removeClass("has-error");
|
|
||||||
$(".create-category-{{ $rand }} .help-block").remove();
|
|
||||||
},
|
|
||||||
complete: function() {
|
|
||||||
$('.create-category-{{ $rand }} #button-create-category').button('reset');
|
|
||||||
},
|
|
||||||
success: function(json) {
|
|
||||||
var data = json['data'];
|
|
||||||
|
|
||||||
$('.create-category-{{ $rand }} #span-loading').remove();
|
|
||||||
|
|
||||||
$('.create-category-{{ $rand }}#modal-create-category').modal('hide');
|
|
||||||
|
|
||||||
$('#category_id').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
|
||||||
$('#category_id').trigger('change');
|
|
||||||
$('#category_id').select2('refresh');
|
|
||||||
|
|
||||||
@if ($category_selector)
|
|
||||||
$('{{ $category_selector }}').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
|
||||||
$('{{ $category_selector }}').trigger('change');
|
|
||||||
$('{{ $category_selector }}').select2('refresh');
|
|
||||||
@endif
|
|
||||||
},
|
|
||||||
error: function(error, textStatus, errorThrown) {
|
|
||||||
$('.create-category-{{ $rand }} #span-loading').remove();
|
|
||||||
|
|
||||||
if (error.responseJSON.name) {
|
|
||||||
$(".create-category-{{ $rand }}#modal-create-category input[name='name']").parent().parent().addClass('has-error');
|
|
||||||
$(".create-category-{{ $rand }}#modal-create-category input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error.responseJSON.color) {
|
|
||||||
$(".create-category-{{ $rand }}#modal-create-category input[name='color']").parent().parent().addClass('has-error');
|
|
||||||
$(".create-category-{{ $rand }}#modal-create-category input[name='color']").parent().after('<p class="help-block">' + error.responseJSON.color + '</p>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
'class' => 'form-loading-button',
|
'class' => 'form-loading-button',
|
||||||
'route' => 'customers.store',
|
'route' => 'customers.store',
|
||||||
'novalidate' => true
|
'novalidate' => true
|
||||||
|
|
||||||
]) !!}
|
]) !!}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
{!! Form::open([
|
{!! Form::open([
|
||||||
'id' => 'form-create-tax',
|
'id' => 'form-create-tax',
|
||||||
'role' => 'form',
|
'@submit.prevent' => 'onSubmit',
|
||||||
'class' => 'form-loading-button'
|
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||||
|
'role' => 'form',
|
||||||
|
'class' => 'form-loading-button',
|
||||||
|
'route' => 'taxes.store',
|
||||||
|
'novalidate' => true
|
||||||
]) !!}
|
]) !!}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||||
|
112
resources/views/modals/vendors/create.blade.php
vendored
112
resources/views/modals/vendors/create.blade.php
vendored
@ -1,101 +1,23 @@
|
|||||||
<div class="modal fade create-vendor-{{ $rand }} d-none" id="modal-create-vendor">
|
{!! Form::open([
|
||||||
<div class="modal-dialog modal-lg">
|
'id' => 'form-create-vendor',
|
||||||
<div class="modal-content">
|
'@submit.prevent' => 'onSubmit',
|
||||||
<div class="modal-header">
|
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||||
<h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.vendors', 1)]) }}</h4>
|
'role' => 'form',
|
||||||
</div>
|
'class' => 'form-loading-button',
|
||||||
|
'route' => 'vendors.store',
|
||||||
|
'novalidate' => true
|
||||||
|
]) !!}
|
||||||
|
<div class="row">
|
||||||
|
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||||
|
|
||||||
<div class="modal-body">
|
{{ Form::textGroup('email', trans('general.email'), 'envelope', []) }}
|
||||||
{!! Form::open(['id' => 'form-create-vendor', 'role' => 'form', 'class' => 'form-loading-button']) !!}
|
|
||||||
|
|
||||||
<div class="row">
|
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
|
||||||
|
|
||||||
{{ Form::textGroup('email', trans('general.email'), 'envelope', []) }}
|
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('default.currency')) }}
|
||||||
|
|
||||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||||
|
|
||||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('default.currency')) }}
|
{!! Form::hidden('enabled', '1', []) !!}
|
||||||
|
|
||||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
|
||||||
|
|
||||||
{!! Form::hidden('enabled', '1', []) !!}
|
|
||||||
</div>
|
|
||||||
{!! Form::close() !!}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<div class="pull-left">
|
|
||||||
{!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-vendor', 'class' => 'btn btn-success button-submit', 'data-loading-text' => trans('general.loading')]) !!}
|
|
||||||
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{!! Form::close() !!}
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function(){
|
|
||||||
$('.create-vendor-{{ $rand }}#modal-create-vendor').modal('show');
|
|
||||||
|
|
||||||
$(".create-vendor-{{ $rand }}#modal-create-vendor #currency_code").select2({
|
|
||||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click', '.create-vendor-{{ $rand }} #button-create-vendor', function (e) {
|
|
||||||
$('.create-vendor-{{ $rand }}#modal-create-vendor .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 16em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: '{{ url("modals/vendors") }}',
|
|
||||||
type: 'POST',
|
|
||||||
dataType: 'JSON',
|
|
||||||
data: $(".create-vendor-{{ $rand }} #form-create-vendor").serialize(),
|
|
||||||
beforeSend: function () {
|
|
||||||
$('.create-vendor-{{ $rand }} #button-create-vendor').button('loading');
|
|
||||||
|
|
||||||
$(".create-vendor-{{ $rand }} .form-group").removeClass("has-error");
|
|
||||||
$(".create-vendor-{{ $rand }} .help-block").remove();
|
|
||||||
},
|
|
||||||
complete: function() {
|
|
||||||
$('.create-vendor-{{ $rand }} #button-create-vendor').button('reset');
|
|
||||||
},
|
|
||||||
success: function(json) {
|
|
||||||
var data = json['data'];
|
|
||||||
|
|
||||||
$('.create-vendor-{{ $rand }} #span-loading').remove();
|
|
||||||
|
|
||||||
$('.create-vendor-{{ $rand }}#modal-create-vendor').modal('hide');
|
|
||||||
|
|
||||||
$('#contact_id').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
|
||||||
$('#contact_id').trigger('change');
|
|
||||||
$('#contact_id').select2('refresh');
|
|
||||||
|
|
||||||
@if ($contact_selector)
|
|
||||||
$('{{ $contact_selector }}').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
|
||||||
$('{{ $contact_selector }}').trigger('change');
|
|
||||||
$('{{ $contact_selector }}').select2('refresh');
|
|
||||||
@endif
|
|
||||||
},
|
|
||||||
error: function(error, textStatus, errorThrown) {
|
|
||||||
$('.create-vendor-{{ $rand }} #span-loading').remove();
|
|
||||||
|
|
||||||
if (error.responseJSON.name) {
|
|
||||||
$(".create-vendor-{{ $rand }}#modal-create-vendor input[name='name']").parent().parent().addClass('has-error');
|
|
||||||
$(".create-vendor-{{ $rand }}#modal-create-vendor input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error.responseJSON.email) {
|
|
||||||
$(".create-vendor-{{ $rand }}#modal-create-vendor input[name='email']").parent().parent().addClass('has-error');
|
|
||||||
$(".create-vendor-{{ $rand }}#modal-create-vendor input[name='email']").parent().after('<p class="help-block">' + error.responseJSON.email + '</p>');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error.responseJSON.currency_code) {
|
|
||||||
$(".create-vendor-{{ $rand }}#modal-create-vendor select[name='currency_code']").parent().parent().addClass('has-error');
|
|
||||||
$(".create-vendor-{{ $rand }}#modal-create-vendor select[name='currency_code']").parent().after('<p class="help-block">' + error.responseJSON.currency_code + '</p>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
@ -6,26 +6,5 @@
|
|||||||
|
|
||||||
@stack('content_content_end')
|
@stack('content_content_end')
|
||||||
<notifications></notifications>
|
<notifications></notifications>
|
||||||
|
|
||||||
<akaunting-modal
|
|
||||||
v-if="addNew.modal"
|
|
||||||
:show="addNew.modal"
|
|
||||||
:title="addNew.title"
|
|
||||||
:message="addNew.html">
|
|
||||||
|
|
||||||
<template #card-footer>
|
|
||||||
<div class="float-right">
|
|
||||||
<button type="button" class="btn btn-outline-secondary" @click="onCancelNewItem()">
|
|
||||||
<span>{{ trans('general.cancel') }}</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button type="button" class="btn btn-success button-submit" @click="onNewItemSubmit()">
|
|
||||||
<div class="aka-loader d-none"></div>
|
|
||||||
<span>{{ trans('general.confirm') }}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</akaunting-modal>
|
|
||||||
</div>
|
</div>
|
||||||
@stack('content_end')
|
@stack('content_end')
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<script type="text/javascript"><!--
|
<script type="text/javascript"><!--
|
||||||
window.Laravel = <?php echo json_encode([
|
window.Laravel = <?php echo json_encode([
|
||||||
'csrfToken' => csrf_token(),
|
'csrfToken' => csrf_token(),
|
||||||
]); ?>
|
]); ?>;
|
||||||
|
|
||||||
var aka_currency = 'false';
|
var aka_currency = 'false';
|
||||||
|
|
||||||
|
@ -10,15 +10,16 @@
|
|||||||
:value="{{ json_encode(old($name, $selected)) }}"
|
:value="{{ json_encode(old($name, $selected)) }}"
|
||||||
:icon="'{{ $icon }}'"
|
:icon="'{{ $icon }}'"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
:add-new="true"
|
:add-new="{{ json_encode([
|
||||||
:add-new-text="'{{ trans('general.form.add_new', ['field' => $text]) }}'"
|
'status' => true,
|
||||||
|
'text' => trans('general.form.add_new', ['field' => $text]),
|
||||||
|
'path' => isset($attributes['path']) ? $attributes['path']: false,
|
||||||
|
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
|
||||||
|
'field' => isset($attributes['field']) ? $attributes['field'] : 'name'
|
||||||
|
])}}"
|
||||||
@if (!empty($attributes['collapse']))
|
@if (!empty($attributes['collapse']))
|
||||||
:collapse="true"
|
:collapse="true"
|
||||||
@endif
|
@endif
|
||||||
@if (!empty($attributes['path']))
|
|
||||||
:add-new-path="'{{ $attributes['path'] }}'"
|
|
||||||
@endif
|
|
||||||
@new_item="onNewItem($event)"
|
|
||||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
@if (!empty($attributes['change']))
|
@if (!empty($attributes['change']))
|
||||||
@change="{{ $attributes['change'] }}($event)"
|
@change="{{ $attributes['change'] }}($event)"
|
||||||
|
@ -8,13 +8,14 @@
|
|||||||
:options="{{ json_encode($values) }}"
|
:options="{{ json_encode($values) }}"
|
||||||
:value="'{{ old($name, $selected) }}'"
|
:value="'{{ old($name, $selected) }}'"
|
||||||
:icon="'{{ $icon }}'"
|
:icon="'{{ $icon }}'"
|
||||||
:add-new="true"
|
:add-new="{{ json_encode([
|
||||||
:add-new-text="'{{ trans('general.form.add_new', ['field' => $text]) }}'"
|
'status' => true,
|
||||||
@if (!empty($attributes['path']))
|
'text' => trans('general.form.add_new', ['field' => $text]),
|
||||||
:add-new-path="'{{ $attributes['path'] }}'"
|
'path' => isset($attributes['path']) ? $attributes['path']: false,
|
||||||
@endif
|
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
|
||||||
@new_item="onNewItem($event)"
|
'field' => isset($attributes['field']) ? $attributes['field'] : 'name'
|
||||||
@interface="form.{{ $name }} = $event"
|
])}}"
|
||||||
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
@if (!empty($attributes['change']))
|
@if (!empty($attributes['change']))
|
||||||
@change="{{ $attributes['change'] }}($event)"
|
@change="{{ $attributes['change'] }}($event)"
|
||||||
@endif
|
@endif
|
||||||
|
@ -8,10 +8,15 @@
|
|||||||
:options="{{ json_encode($values) }}"
|
:options="{{ json_encode($values) }}"
|
||||||
:value="'{{ old($name, $selected) }}'"
|
:value="'{{ old($name, $selected) }}'"
|
||||||
:icon="'{{ $icon }}'"
|
:icon="'{{ $icon }}'"
|
||||||
:add-new="true"
|
:add-new="{{ json_encode([
|
||||||
:add-new-text="'{{ trans('general.form.add_new', ['field' => $text]) }}'"
|
'status' => true,
|
||||||
|
'text' => trans('general.form.add_new', ['field' => $text]),
|
||||||
|
'path' => isset($attributes['path']) ? $attributes['path']: false,
|
||||||
|
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
|
||||||
|
'field' => isset($attributes['field']) ? $attributes['field'] : 'name'
|
||||||
|
])}}"
|
||||||
:group="true"
|
:group="true"
|
||||||
@interface="form.{{ $name }} = $event"
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
@if (!empty($attributes['change']))
|
@if (!empty($attributes['change']))
|
||||||
@change="{{ $attributes['change'] }}($event)"
|
@change="{{ $attributes['change'] }}($event)"
|
||||||
@endif
|
@endif
|
||||||
|
@ -6,12 +6,5 @@
|
|||||||
|
|
||||||
@stack('content_content_end')
|
@stack('content_content_end')
|
||||||
<notifications></notifications>
|
<notifications></notifications>
|
||||||
|
|
||||||
<akaunting-modal
|
|
||||||
v-if="addNew.modal"
|
|
||||||
:show="addNew.modal"
|
|
||||||
:title="addNew.title"
|
|
||||||
:message="addNew.html">
|
|
||||||
</akaunting-modal>
|
|
||||||
</div>
|
</div>
|
||||||
@stack('content_end')
|
@stack('content_end')
|
||||||
|
@ -19,12 +19,5 @@
|
|||||||
|
|
||||||
@stack('content_content_end')
|
@stack('content_content_end')
|
||||||
<notifications></notifications>
|
<notifications></notifications>
|
||||||
|
|
||||||
<akaunting-modal
|
|
||||||
v-if="addNew.modal"
|
|
||||||
:show="addNew.modal"
|
|
||||||
:title="addNew.title"
|
|
||||||
:message="addNew.html">
|
|
||||||
</akaunting-modal>
|
|
||||||
</div>
|
</div>
|
||||||
@stack('content_end')
|
@stack('content_end')
|
||||||
|
@ -15,11 +15,4 @@
|
|||||||
@stack('content_content_end')
|
@stack('content_content_end')
|
||||||
|
|
||||||
<notifications></notifications>
|
<notifications></notifications>
|
||||||
|
|
||||||
<akaunting-modal
|
|
||||||
v-if="addNew.modal"
|
|
||||||
:show="addNew.modal"
|
|
||||||
:title="addNew.title"
|
|
||||||
:message="addNew.html">
|
|
||||||
</akaunting-modal>
|
|
||||||
@stack('content_end')
|
@stack('content_end')
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, config('general.vendors'), ['required' => 'required', 'change' => 'onChangeContact']) }}
|
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, config('general.vendors'), ['required' => 'required', 'path' => route('modals.vendors.create'), 'change' => 'onChangeContact']) }}
|
||||||
|
|
||||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@
|
|||||||
|
|
||||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.category'), []) }}
|
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense']) }}
|
||||||
|
|
||||||
{{ Form::recurring('create') }}
|
{{ Form::recurring('create') }}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $bill->contact_id, ['required' => 'required', 'change' => 'onChangeContact']) }}
|
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $bill->contact_id, ['required' => 'required', 'path' => route('modals.vendors.create'), 'change' => 'onChangeContact']) }}
|
||||||
|
|
||||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, $bill->currency_code, ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, $bill->currency_code, ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@
|
|||||||
|
|
||||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $bill->category_id) }}
|
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $bill->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense']) }}
|
||||||
|
|
||||||
{{ Form::recurring('edit', $bill) }}
|
{{ Form::recurring('edit', $bill) }}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangeAccount']) }}
|
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangeAccount']) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, setting('default.vendor'), []) }}
|
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, setting('default.vendor'), ['path' => route('modals.vendors.create')]) }}
|
||||||
|
|
||||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||||
|
|
||||||
|
@ -39,11 +39,11 @@
|
|||||||
|
|
||||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $payment->account_id, ['required' => 'required', 'change' => 'onChangeAccount']) }}
|
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $payment->account_id, ['required' => 'required', 'change' => 'onChangeAccount']) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $payment->contact_id, []) }}
|
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $payment->contact_id, ['path' => route('modals.vendors.create')]) }}
|
||||||
|
|
||||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $payment->category_id, ['required' => 'required']) }}
|
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $payment->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense']) }}
|
||||||
|
|
||||||
{{ Form::recurring('edit', $payment) }}
|
{{ Form::recurring('edit', $payment) }}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, config('general.customers'), ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.customers.create')]) }}
|
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, config('general.customers'), ['required' => 'required', 'path' => route('modals.customers.create'), 'change' => 'onChangeContact']) }}
|
||||||
|
|
||||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@
|
|||||||
|
|
||||||
{{ Form::textareaGroup('footer', trans('general.footer'), '', setting('invoice.footer')) }}
|
{{ Form::textareaGroup('footer', trans('general.footer'), '', setting('invoice.footer')) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('defaults.category')) }}
|
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('defaults.category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income']) }}
|
||||||
|
|
||||||
{{ Form::recurring('create') }}
|
{{ Form::recurring('create') }}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $invoice->contact_id, ['required' => 'required', 'change' => 'onChangeContact']) }}
|
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $invoice->contact_id, ['required' => 'required', 'path' => route('modals.customers.create'), 'change' => 'onChangeContact']) }}
|
||||||
|
|
||||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $invoice->currency_code, ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $invoice->currency_code, ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
||||||
|
|
||||||
@ -163,7 +163,7 @@
|
|||||||
|
|
||||||
{{ Form::textareaGroup('footer', trans('general.footer')) }}
|
{{ Form::textareaGroup('footer', trans('general.footer')) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $invoice->category_id) }}
|
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $invoice->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income']) }}
|
||||||
|
|
||||||
{{ Form::recurring('edit', $invoice) }}
|
{{ Form::recurring('edit', $invoice) }}
|
||||||
|
|
||||||
|
@ -26,11 +26,11 @@
|
|||||||
|
|
||||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangeAccount']) }}
|
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangeAccount']) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, setting('default.contact'), []) }}
|
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, setting('default.contact'), ['path' => route('modals.customers.create')]) }}
|
||||||
|
|
||||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.category')) }}
|
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income']) }}
|
||||||
|
|
||||||
{{ Form::recurring('create') }}
|
{{ Form::recurring('create') }}
|
||||||
|
|
||||||
|
@ -39,11 +39,11 @@
|
|||||||
|
|
||||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $revenue->account_id, ['required' => 'required', 'change' => 'onChangeAccount']) }}
|
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $revenue->account_id, ['required' => 'required', 'change' => 'onChangeAccount']) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $revenue->contact_id, []) }}
|
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $revenue->contact_id, ['path' => route('modals.customers.create')]) }}
|
||||||
|
|
||||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||||
|
|
||||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $revenue->category_id) }}
|
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $revenue->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income']) }}
|
||||||
|
|
||||||
{{ Form::recurring('edit', $revenue) }}
|
{{ Form::recurring('edit', $revenue) }}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user