first upload all files
This commit is contained in:
7
Modules/Import/Resources/assets/admin/js/main.js
Normal file
7
Modules/Import/Resources/assets/admin/js/main.js
Normal file
@@ -0,0 +1,7 @@
|
||||
$('.btn-actions').on('click', (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
let importType = $('#import_type').val();
|
||||
|
||||
window.location.href = route('admin.download_csv.index', { import_type: importType });
|
||||
});
|
||||
6
Modules/Import/Resources/lang/en/attributes.php
Normal file
6
Modules/Import/Resources/lang/en/attributes.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'csv_file' => 'CSV File',
|
||||
'import_type' => 'Import Type',
|
||||
];
|
||||
11
Modules/Import/Resources/lang/en/importer.php
Normal file
11
Modules/Import/Resources/lang/en/importer.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'importer' => 'Importer',
|
||||
'download_csv' => 'Download CSV',
|
||||
'import' => 'Import',
|
||||
'import_types' => [
|
||||
'product' => 'Product',
|
||||
],
|
||||
'run' => 'Run',
|
||||
];
|
||||
6
Modules/Import/Resources/lang/en/messages.php
Normal file
6
Modules/Import/Resources/lang/en/messages.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'the_importer_has_been_run_successfully' => 'The importer has been run successfully.',
|
||||
'there_was_an_error_on_rows' => 'There was an error on rows (:rows).',
|
||||
];
|
||||
6
Modules/Import/Resources/lang/en/permissions.php
Normal file
6
Modules/Import/Resources/lang/en/permissions.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'index' => 'Index Import',
|
||||
'create' => 'Create Import',
|
||||
];
|
||||
5
Modules/Import/Resources/lang/en/sidebar.php
Normal file
5
Modules/Import/Resources/lang/en/sidebar.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'import' => 'Importer',
|
||||
];
|
||||
@@ -0,0 +1,52 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('import::importer.importer'))
|
||||
|
||||
<li class="active">{{ trans('import::importer.importer') }}</li>
|
||||
@endcomponent
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="btn-group pull-right">
|
||||
<a href="#" class="btn btn-primary btn-actions">
|
||||
{{ trans('import::importer.download_csv') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ route('admin.importer.store') }}" enctype="multipart/form-data" class="form-horizontal">
|
||||
@csrf
|
||||
|
||||
<div class="accordion-content">
|
||||
<div class="accordion-box-content clearfix">
|
||||
<div class="col-md-12">
|
||||
<div class="accordion-box-content">
|
||||
<div class="tab-content clearfix">
|
||||
<div class="tab-pane fade in active">
|
||||
<h3 class="tab-content-title">
|
||||
{{ trans('import::importer.import') }}
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-12">
|
||||
{{ Form::file('csv_file', trans('import::attributes.csv_file'), $errors, null, ['required' => true]) }}
|
||||
{{ Form::select('import_type', trans('import::attributes.import_type'), $errors, trans('import::importer.import_types'), null, ['required' => true]) }}
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-10">
|
||||
<button type="submit" class="btn btn-primary" data-loading>
|
||||
{{ trans('import::importer.run') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user