mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
61c6160b98
* Move importer to an inline-template, allows for translations and easier passing of data from laravel to vue. * Pull the modal out into a dedicated partial, move importer to views/importer. * Add document of CSV->importer mappings. Reorganize some code. Progress. * Add header_row and first_row to imports table, and process upon uploading a file * Use an expandable table row instead of a modal for import processing. This should allow for field mapping interaction easier. * Fix import processing after moving method. * Frontend importer mapping improvements. Invert display so we show found columns and allow users to select an importer field to map to. Also implement sample data based on first row of csv. * Update select2. Maintain selected items properly. * Backend support for importing. Only works on the web importer currently. Definitely needs testing and polish. * We no longer use vue-modal plugin. * Add a column to track field mappings to the imports table. * Cleanup/rename methods+refactor * Save field mappings and import type when attempting an import, and repopulate these values when returning to the page. * Update debugbar to fix a bug in the debugbar code. * Fix asset tag detection. Also rename findMatch to be a bit clearer as to what it does. Remove logging to file of imports for http imports because it eats an incredible amouint of memory. This commit also moves imports out of the hardware namespace and into their own webcontroller and route prefix, remove dead code from AssetController as a result. * Dynamically limit options for select2 based on import type selected, and group them by item type. * Add user importer. Still need to implement emailing of passwords to new users, and probably test a bit more. This also bumps the memory limit for web imports up as well, I need to profile memory usage here before too long. * Query the db to find user matches rather than search the array. Performance is much much better. * Speed/memory improvements in importers. Move to querying the db rather than maintaining an array for all importers. Also only store the id of items when we import, rather than the full model. It saves a decent amount of memory. * Remove grouping of items in select2 With the values being set dynamically, the grouping is redundant. It also caused a regression with automatically guessing/matching field names. This is starting to get close. * Remove debug line on every create. * Switch migration to be text field instead of json field for compatibility with older mysql/mariadb * Fix asset import regression matching email address. * Rearrange travis order in attempt to fix null settings. * Use auth::id instead of fetching it off the user. Fixes a null object reference during seeding.
49 lines
1.3 KiB
JavaScript
Executable file
49 lines
1.3 KiB
JavaScript
Executable file
|
|
window._ = require('lodash');
|
|
|
|
/**
|
|
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
|
* for JavaScript based Bootstrap features such as modals and tabs. This
|
|
* code may be modified to fit the specific needs of your application.
|
|
*/
|
|
|
|
window.$ = window.jQuery = require('jquery');
|
|
require('bootstrap-less');
|
|
|
|
/**
|
|
* Vue is a modern JavaScript library for building interactive web interfaces
|
|
* using reactive data binding and reusable components. Vue's API is clean
|
|
* and simple, leaving you to focus on building your next great project.
|
|
*/
|
|
|
|
window.Vue = require('vue');
|
|
window.eventHub = new Vue();
|
|
require('vue-resource');
|
|
|
|
/**
|
|
* We'll register a HTTP interceptor to attach the "CSRF" header to each of
|
|
* the outgoing requests issued by this application. The CSRF middleware
|
|
* included with Laravel will automatically verify the header's value.
|
|
*/
|
|
|
|
Vue.http.interceptors.push((request, next) => {
|
|
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
|
|
|
|
next();
|
|
});
|
|
|
|
/**
|
|
* Echo exposes an expressive API for subscribing to channels and listening
|
|
* for events that are broadcast by Laravel. Echo and event broadcasting
|
|
* allows your team to easily build robust real-time web applications.
|
|
*/
|
|
|
|
// import Echo from "laravel-echo"
|
|
|
|
// window.Echo = new Echo({
|
|
// broadcaster: 'pusher',
|
|
// key: 'your-pusher-key'
|
|
// });
|
|
|
|
|