export
This commit is contained in:
parent
bd1489dac6
commit
2f555a798c
|
|
@ -14,17 +14,16 @@
|
|||
<h1>{{ __('admin::app.customers.customers.title') }}</h1>
|
||||
</div>
|
||||
<div class="page-action">
|
||||
<div class="export">
|
||||
<i class="export-icon"></i>
|
||||
<span @click="showModal('downloadDataGrid')">
|
||||
{{ __('admin::app.export.export') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<a href="{{ route('admin.customer.create') }}" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.customers.customers.add-title') }}
|
||||
</a>
|
||||
|
||||
<form method="POST" action="{{ route('admin.datagrid.export') }}">
|
||||
@csrf()
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.customers.customers.export') }}
|
||||
</button>
|
||||
<input type="hidden" name="gridData" value="{{serialize($customer)}}">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -34,5 +33,56 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<modal id="downloadDataGrid" :is-open="modalIds.downloadDataGrid">
|
||||
<h3 slot="header">{{ __('admin::app.export.download') }}</h3>
|
||||
<div slot="body">
|
||||
<export-form></export-form>
|
||||
</div>
|
||||
</modal>
|
||||
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script type="text/x-template" id="export-form-template">
|
||||
<form method="POST" action="{{ route('admin.datagrid.export') }}">
|
||||
|
||||
<div class="page-content">
|
||||
<div class="form-container">
|
||||
@csrf()
|
||||
|
||||
<input type="hidden" name="gridData" value="{{serialize($customer)}}">
|
||||
|
||||
<div class="control-group">
|
||||
<label for="format" class="required">
|
||||
{{ __('admin::app.export.format') }}
|
||||
</label>
|
||||
<select name="format" class="control" v-validate="'required'">
|
||||
<option value="xls">XLS</option>
|
||||
<option value="csv">CSV</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-lg btn-primary" @click="closeModal">
|
||||
{{ __('admin::app.export.export') }}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('export-form', {
|
||||
template: '#export-form-template',
|
||||
methods: {
|
||||
closeModal () {
|
||||
this.$parent.closeModal();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
||||
|
|
|
|||
|
|
@ -14,14 +14,12 @@
|
|||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
|
||||
<div class="export">
|
||||
<i class="export-icon"></i>
|
||||
<span @click="showModal('downloadDataGrid')">
|
||||
{{ __('admin::app.export.export') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue