Almost finished with the routes which is...hopefully? The last thing?

This commit is contained in:
Brady Wetherington 2021-06-22 16:58:23 -07:00
parent 60538508d4
commit 9456a03a88
13 changed files with 113 additions and 161 deletions

Binary file not shown.

Binary file not shown.

BIN
public/js/dist/all.js vendored

Binary file not shown.

View file

@ -1,5 +1,5 @@
{
"/js/build/app.js": "/js/build/app.js?id=a8ab86a7bec4988cd99d",
"/js/build/app.js": "/js/build/app.js?id=040538f479884513ec7c",
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=83e39e254b7f9035eddc",
"/css/build/overrides.css": "/css/build/overrides.css?id=b9b59d80509972c3b16a",
"/css/build/app.css": "/css/build/app.css?id=1da91ae0ff24d10b7207",
@ -24,9 +24,9 @@
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced",
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced",
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=93c24b4c89490bbfd73e",
"/js/build/vendor.js": "/js/build/vendor.js?id=b93877b4a88a76e1b18b",
"/js/build/vendor.js": "/js/build/vendor.js?id=651427cc4b45d8e68d0c",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=5bbc20d77c1456cfc2ef",
"/js/dist/all.js": "/js/dist/all.js?id=96b6dd9441d8c6c98369",
"/js/dist/all.js": "/js/dist/all.js?id=ae6dedae06d52fe6a798",
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=efda2335fa5243175850",
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=76cd718f22d841ba3632",
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=ec96c42439cdeb022133",

View file

@ -6,7 +6,7 @@ window._ = require('lodash');
* 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');
//window.$ = window.jQuery = require('jquery');
/**
* jQuery UI is loaded here and then the tooltip is assigned another funtion name
@ -26,7 +26,7 @@ require('bootstrap-less');
* and simple, leaving you to focus on building your next great project.
*/
window.Vue = require('vue');
window.Vue = require('vue').default;
window.eventHub = new Vue();
require('vue-resource');
@ -42,6 +42,11 @@ Vue.http.interceptors.push(function (request, next) {
next();
});
// require('admin-lte');
// require('chart.js');
// require('jquery-form-validator'); //says something about dependency
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting

View file

@ -12,7 +12,7 @@
</template>
<script>
require('select2');
//require('select2');
export default {
/*
* The component's data.

View file

@ -1,4 +1,8 @@
// var jQuery = require('jquery');
// window.jQuery = jQuery
// window.$ = jQuery
/**
* Module containing core application logic.
* @param {jQuery} $ Insulated jQuery object

View file

@ -11,29 +11,36 @@ require('./bootstrap');
* the page. Then, you may begin adding components to this application
* or customize the JavaScript scaffolding to fit your unique needs.
*/
import PassportClients from './components/passport/Clients.vue'
import PassportAuthorizedClients from './components/passport/AuthorizedClients.vue'
import PassportPersonalAccessTokens from './components/passport/PersonalAccessTokens.vue'
import Importer from './components/importer/importer.vue'
import FieldsetDefaultValues from './components/forms/asset-models/fieldset-default-values.vue'
Vue.component(
'passport-clients',
require('./components/passport/Clients.vue')
PassportClients
);
Vue.component(
'passport-authorized-clients',
require('./components/passport/AuthorizedClients.vue')
PassportAuthorizedClients
);
Vue.component(
'passport-personal-access-tokens',
require('./components/passport/PersonalAccessTokens.vue')
PassportPersonalAccessTokens
);
Vue.component(
'importer',
require('./components/importer/importer.vue')
Importer
);
Vue.component(
'fieldset-default-values',
require('./components/forms/asset-models/fieldset-default-values.vue')
FieldsetDefaultValues
);
// Commented out currently to avoid trying to load vue everywhere.

View file

@ -74,6 +74,7 @@
};
</script>
<!-- Add laravel routes into javascript Primarily useful for vue.-->
@routes('vue_routes')
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<script src="{{ url(asset('js/html5shiv.js')) }}" nonce="{{ csrf_token() }}"></script>

View file

@ -16,47 +16,40 @@ Route::group(
['prefix' => 'hardware',
'middleware' => ['auth'], ],
function () {
Route::get('bulkaudit', [
'as' => 'assets.bulkaudit',
'uses' => [Assets\AssetsController::class, 'quickScan'],
]);
Route::get('bulkaudit',
[Assets\AssetsController::class, 'quickScan']
)->name('assets.bulkaudit');
// Asset Maintenances
Route::resource('maintenances', AssetMaintenancesController::class, [
'parameters' => ['maintenance' => 'maintenance_id', 'asset' => 'asset_id'],
]);
Route::get('requested', ['as' => 'assets.requested', 'uses' => [Assets\AssetsController::class, 'getRequestedIndex']]);
Route::get('requested', [Assets\AssetsController::class, 'getRequestedIndex'])->name('assets.requested');
Route::get('scan', [
'as' => 'asset.scan',
'uses' => [Assets\AssetsController::class, 'scan'],
]);
Route::get('scan',
[Assets\AssetsController::class, 'scan']
)->name('asset.scan');
Route::get('audit/due', [
'as' => 'assets.audit.due',
'uses' => [Assets\AssetsController::class, 'dueForAudit'],
]);
Route::get('audit/due',
[Assets\AssetsController::class, 'dueForAudit']
)->name('assets.audit.due');
Route::get('audit/overdue', [
'as' => 'assets.audit.overdue',
'uses' => [Assets\AssetsController::class, 'overdueForAudit'],
]);
Route::get('audit/overdue',
[Assets\AssetsController::class, 'overdueForAudit']
)->name('assets.audit.overdue');
Route::get('audit/due', [
'as' => 'assets.audit.due',
'uses' => [Assets\AssetsController::class, 'dueForAudit'],
]);
Route::get('audit/due',
[Assets\AssetsController::class, 'dueForAudit']
)->name('assets.audit.due');
Route::get('audit/overdue', [
'as' => 'assets.audit.overdue',
'uses' => [Assets\AssetsController::class, 'overdueForAudit'],
]);
Route::get('audit/overdue',
[Assets\AssetsController::class, 'overdueForAudit']
)->name('assets.audit.overdue');
Route::get('audit/due', [
'as' => 'assets.audit.due',
'uses' => [Assets\AssetsController::class, 'dueForAudit'],
]);
Route::get('audit/due',
[Assets\AssetsController::class, 'dueForAudit']
)->name('assets.audit.due');
Route::get('audit/overdue', [
'as' => 'assets.audit.overdue',

View file

@ -12,124 +12,69 @@ Route::resource('kits', Kits\PredefinedKitsController::class, [
Route::group(['prefix' => 'kits/{kit_id}', 'middleware' => ['auth']], function () {
// Route::get('licenses',
// [
// 'as' => 'kits.licenses.index',
// 'uses' => [Kits\PredefinedKitsController::class, 'indexLicenses'],
// ]
// );
// [Kits\PredefinedKitsController::class, 'indexLicenses']
// )->name('kits.licenses.index');
Route::post('licenses',
[
'as' => 'kits.licenses.store',
'uses' => [Kits\PredefinedKitsController::class, 'storeLicense'],
]
);
[Kits\PredefinedKitsController::class, 'storeLicense']
)->name('kits.licenses.store');
Route::put('licenses/{license_id}',
[
'as' => 'kits.licenses.update',
'uses' => [Kits\PredefinedKitsController::class, 'updateLicense'],
]
);
[Kits\PredefinedKitsController::class, 'updateLicense']
)->name('kits.licenses.update');
Route::get('licenses/{license_id}/edit',
[
'as' => 'kits.licenses.edit',
'uses' => [Kits\PredefinedKitsController::class, 'editLicense'],
]
);
[Kits\PredefinedKitsController::class, 'editLicense']
)->name('kits.licenses.edit');
Route::delete('licenses/{license_id}',
[
'as' => 'kits.licenses.detach',
'uses' => [Kits\PredefinedKitsController::class, 'detachLicense'],
]
);
[Kits\PredefinedKitsController::class, 'detachLicense']
)->name('kits.licenses.detach');
// Models
Route::put('models/{model_id}',
[
'as' => 'kits.models.update',
'uses' => [Kits\PredefinedKitsController::class, 'updateModel'],
'parameters' => [2 => 'kit_id', 1 => 'model_id'],
]
);
[Kits\PredefinedKitsController::class, 'updateModel']
)->parameters([2 => 'kit_id', 1 => 'model_id'])->name('kits.models.update');
Route::get('models/{model_id}/edit',
[
'as' => 'kits.models.edit',
'uses' => [Kits\PredefinedKitsController::class, 'editModel'],
]
);
[Kits\PredefinedKitsController::class, 'editModel']
)->name('kits.models.edit');
Route::delete('models/{model_id}',
[
'as' => 'kits.models.detach',
'uses' => [Kits\PredefinedKitsController::class, 'detachModel'],
]
);
[Kits\PredefinedKitsController::class, 'detachModel']
)->name('kits.models.detach');
// Consumables
Route::put('consumables/{consumable_id}',
[
'as' => 'kits.consumables.update',
'uses' => [Kits\PredefinedKitsController::class, 'updateConsumable'],
'parameters' => [2 => 'kit_id', 1 => 'consumable_id'],
]
);
[Kits\PredefinedKitsController::class, 'updateConsumable']
)->parameters([2 => 'kit_id', 1 => 'consumable_id'])->name('kits.consumables.update');
Route::get('consumables/{consumable_id}/edit',
[
'as' => 'kits.consumables.edit',
'uses' => [Kits\PredefinedKitsController::class, 'editConsumable'],
]
);
[Kits\PredefinedKitsController::class, 'editConsumable']
)->name('kits.consumables.edit');
Route::delete('consumables/{consumable_id}',
[
'as' => 'kits.consumables.detach',
'uses' => [Kits\PredefinedKitsController::class, 'detachConsumable'],
]
);
[Kits\PredefinedKitsController::class, 'detachConsumable']
)->name('kits.consumables.detach');
// Accessories
Route::put('accessories/{accessory_id}',
[
'as' => 'kits.accessories.update',
'uses' => [Kits\PredefinedKitsController::class, 'updateAccessory'],
'parameters' => [2 => 'kit_id', 1 => 'accessory_id'],
]
);
[Kits\PredefinedKitsController::class, 'updateAccessory']
)->parameters([2 => 'kit_id', 1 => 'accessory_id'])->name('kits.accessories.update');
Route::get('accessories/{accessory_id}/edit',
[
'as' => 'kits.accessories.edit',
'uses' => [Kits\PredefinedKitsController::class, 'editAccessory'],
]
);
[Kits\PredefinedKitsController::class, 'editAccessory']
)->name('kits.accessories.edit');
Route::delete('accessories/{accessory_id}',
[
'as' => 'kits.accessories.detach',
'uses' => [Kits\PredefinedKitsController::class, 'detachAccessory'],
]
);
[Kits\PredefinedKitsController::class, 'detachAccessory']
)->name('kits.accessories.detach');
Route::get('checkout',
[
'as' => 'kits.checkout.show',
'uses' => [Kits\CheckoutKitController::class, 'showCheckout'],
]
);
[Kits\CheckoutKitController::class, 'showCheckout']
)->name('kits.checkout.show');
Route::post('checkout',
[
'as' => 'kits.checkout.store',
'uses' => [Kits\CheckoutKitController::class, 'store'],
]
);
[Kits\CheckoutKitController::class, 'store']
)->name('kits.checkout.store');
}); // kits

View file

@ -5,42 +5,38 @@ use Illuminate\Support\Facades\Route;
// Licenses
Route::group(['prefix' => 'licenses', 'middleware' => ['auth']], function () {
Route::get('{licenseId}/clone', ['as' => 'clone/license', 'uses' => [Licenses\LicensesController::class, 'getClone']]);
Route::get('{licenseId}/clone', [Licenses\LicensesController::class, 'getClone'])->name('clone/license');
Route::get('{licenseId}/freecheckout', [
'as' => 'licenses.freecheckout',
'uses' => [Licenses\LicensesController::class, 'getFreeLicense'],
]);
Route::get('{licenseId}/checkout/{seatId?}', [
'as' => 'licenses.checkout',
'uses' => [Licenses\LicenseCheckoutController::class, 'create'],
]);
Route::get('{licenseId}/freecheckout',
[Licenses\LicensesController::class, 'getFreeLicense']
)->name('licenses.freecheckout');
Route::get('{licenseId}/checkout/{seatId?}',
[Licenses\LicenseCheckoutController::class, 'create']
)->name('licenses.checkout');
Route::post(
'{licenseId}/checkout/{seatId?}',
['as' => 'licenses.checkout', 'uses' => [Licenses\LicenseCheckoutController::class, 'store']]
);
Route::get('{licenseSeatId}/checkin/{backto?}', [
'as' => 'licenses.checkin',
'uses' => [Licenses\LicenseCheckinController::class, 'create'],
]);
[Licenses\LicenseCheckoutController::class, 'store']
); //name() would duplicate here, so we skip it.
Route::get('{licenseSeatId}/checkin/{backto?}',
[Licenses\LicenseCheckinController::class, 'create']
)->name('licenses.checkin');
Route::post('{licenseId}/checkin/{backto?}', [
'as' => 'licenses.checkin.save',
'uses' => [Licenses\LicenseCheckinController::class, 'store'],
]);
Route::post('{licenseId}/checkin/{backto?}',
[Licenses\LicenseCheckinController::class, 'store']
)->name('licenses.checkin.save');
Route::post(
'{licenseId}/upload',
['as' => 'upload/license', 'uses' => [Licenses\LicenseFilesController::class, 'store']]
);
[Licenses\LicenseFilesController::class, 'store']
)->name('upload/license');
Route::delete(
'{licenseId}/deletefile/{fileId}',
['as' => 'delete/licensefile', 'uses' => [Licenses\LicenseFilesController::class, 'destroy']]
);
[Licenses\LicenseFilesController::class, 'destroy']
)->name('delete/licensefile');
Route::get(
'{licenseId}/showfile/{fileId}/{download?}',
['as' => 'show.licensefile', 'uses' => [Licenses\LicenseFilesController::class, 'show']]
);
[Licenses\LicenseFilesController::class, 'show']
)->name('show.licensefile');
});
Route::resource('licenses', Licenses\LicensesController::class, [

View file

@ -48,11 +48,11 @@ mix
// Combine main SnipeIT JS files
mix.js(
[
'./resources/assets/js/vue.js',
'./resources/assets/js/vue.js', // require()s vue, and require()s bootstrap.js
'./resources/assets/js/snipeit.js', //this is the actual Snipe-IT JS
'./resources/assets/js/snipeit_modals.js'
],
'./public/js/build/app.js'
'./public/js/build/app.js' //because of compiling - this does not work very well :(
).vue();
// Convert the skins to CSS
@ -91,7 +91,9 @@ mix.combine(
*/
mix
.combine(
[
[ // lots of node_modules here - should this be subsumed by require()?
'./node_modules/jquery/dist/jquery.js',
'./node_modules/select2/dist/js/select2.full.min.js',
'./node_modules/admin-lte/dist/js/adminlte.min.js',
'./node_modules/tether/dist/js/tether.js',
'./node_modules/jquery-ui-bundle/jquery-ui.js',
@ -101,14 +103,14 @@ mix
'./node_modules/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js',
'./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
'./node_modules/ekko-lightbox/dist/ekko-lightbox.js',
'./node_modules/icheck/icheck.js',
'./node_modules/icheck/icheck.js', //definite problem here :(
'./resources/assets/js/extensions/pGenerator.jquery.js',
'./node_modules/chart.js/dist/Chart.js',
'./resources/assets/js/signature_pad.js',
'./node_modules/jquery-form-validator/form-validator/jquery.form-validator.js',
'./node_modules/jquery-form-validator/form-validator/jquery.form-validator.js', //problem?
'./node_modules/list.js/dist/list.js'
],
'public/js/build/vendor.js'
'public/js/build/vendor.js' // this file seems OK!
);
@ -138,9 +140,8 @@ mix
mix.combine(
[
'./public/js/build/app.js',
'./public/js/build/vendor.js'
'./public/js/build/vendor.js',
'./public/js/build/app.js'
],
'./public/js/dist/all.js'
).version();