mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-09 04:47:38 -08:00
Merge branch 'develop'
This commit is contained in:
commit
8e682c715e
|
@ -380,7 +380,7 @@ class AssetsController extends Controller
|
||||||
if ($asset->save()) {
|
if ($asset->save()) {
|
||||||
// Redirect to the new asset page
|
// Redirect to the new asset page
|
||||||
\Session::flash('success', trans('admin/hardware/message.update.success'));
|
\Session::flash('success', trans('admin/hardware/message.update.success'));
|
||||||
return response()->json(['redirect_url' => route("view/hardware", $assetId)]);
|
return response()->json(['redirect_url' => route("hardware.show", $assetId)]);
|
||||||
}
|
}
|
||||||
\Input::flash();
|
\Input::flash();
|
||||||
\Session::flash('errors', $asset->getErrors());
|
\Session::flash('errors', $asset->getErrors());
|
||||||
|
|
|
@ -52,8 +52,8 @@ class ActionlogsTransformer
|
||||||
'type' => e($actionlog->targetType()),
|
'type' => e($actionlog->targetType()),
|
||||||
] : null,
|
] : null,
|
||||||
|
|
||||||
'note' => e($actionlog->note),
|
'note' => ($actionlog->note) ? e($actionlog->note): null,
|
||||||
'signature_file' => ($actionlog->accept_signature) ? $actionlog->accept_signature : null,
|
'signature_file' => ($actionlog->accept_signature) ? route('log.signature.view', ['filename' => $actionlog->accept_signature ]) : null,
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -31,10 +31,10 @@ class License extends Depreciable
|
||||||
protected $rules = array(
|
protected $rules = array(
|
||||||
'name' => 'required|string|min:3|max:255',
|
'name' => 'required|string|min:3|max:255',
|
||||||
'seats' => 'required|min:1|max:1000000|integer',
|
'seats' => 'required|min:1|max:1000000|integer',
|
||||||
'license_email' => 'email|min:0|max:120',
|
'license_email' => 'email|nullable|max:120',
|
||||||
'license_name' => 'string|min:0|max:100',
|
'license_name' => 'string|nullable|max:100',
|
||||||
'note' => 'string',
|
'note' => 'string|nullable',
|
||||||
'notes' => 'string|min:0',
|
'notes' => 'string|nullable',
|
||||||
'company_id' => 'integer|nullable',
|
'company_id' => 'integer|nullable',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"css/AdminLTE.css","sources":[],"mappings":";;;;;;","sourceRoot":""}
|
{"version":3,"file":"css/AdminLTE.css","sources":[],"mappings":";;;;;;A","sourceRoot":""}
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;","sourceRoot":""}
|
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;A","sourceRoot":""}
|
File diff suppressed because one or more lines are too long
|
@ -1,23 +1,12 @@
|
||||||
{
|
{
|
||||||
"/build/vue.js": "/build/vue.js",
|
|
||||||
"/mix.js": "/mix.js",
|
|
||||||
"/build/app.css": "/build/app.535d8af1016a2377e449920c617f0197.css",
|
|
||||||
"/build/AdminLTE.css": "/build/AdminLTE.3d8a2b2e33baa060b1b324363ad5e1c2.css",
|
|
||||||
"/build/overrides.css": "/build/overrides.617623c6a96be3e0cbd11c5d4039ec10.css",
|
|
||||||
"/css/all.css": "/css/all.css",
|
|
||||||
"/js/all.js": "/js/all.js",
|
|
||||||
"/css/app.css": "/css/app.css",
|
|
||||||
"/css/dist/all.css": "/css/dist/all.css",
|
|
||||||
"/js/dist/all.js": "/js/dist/all.js",
|
|
||||||
"/css/AdminLTE.css": "/css/AdminLTE.css",
|
|
||||||
"/css/overrides.css": "/css/overrides.css",
|
|
||||||
"/css/skin-blue.css": "/css/skin-blue.css",
|
|
||||||
"/vue.js": "/vue.js",
|
"/vue.js": "/vue.js",
|
||||||
|
"/css/AdminLTE.css": "/css/AdminLTE.css",
|
||||||
|
"/css/app.css": "/css/app.css",
|
||||||
|
"/css/overrides.css": "/css/overrides.css",
|
||||||
"/vue.js.map": "/vue.js.map",
|
"/vue.js.map": "/vue.js.map",
|
||||||
"/mix.js.map": "/mix.js.map",
|
|
||||||
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map",
|
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map",
|
||||||
"/css/app.css.map": "/css/app.css.map",
|
"/css/app.css.map": "/css/app.css.map",
|
||||||
"/css/overrides.css.map": "/css/overrides.css.map",
|
"/css/overrides.css.map": "/css/overrides.css.map",
|
||||||
"public/css/dist/all.css": "public/css/dist/all.css",
|
"/public/css/dist/all.css": "/public/css/dist/all.css",
|
||||||
"public/js/dist/all.js": "public/js/dist/all.js"
|
"/public/js/dist/all.js": "/public/js/dist/all.js"
|
||||||
}
|
}
|
64
build/vue.js
64
build/vue.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
public/css/dist/all.css
vendored
BIN
public/css/dist/all.css
vendored
Binary file not shown.
BIN
public/js/dist/all.js
vendored
BIN
public/js/dist/all.js
vendored
Binary file not shown.
|
@ -67,7 +67,7 @@ tr {
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: ['file'],
|
props: ['file', 'customFieldUrl', 'importProcessUrl'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeFile: this.file,
|
activeFile: this.file,
|
||||||
|
@ -142,6 +142,12 @@ tr {
|
||||||
this.populateSelect2ActiveItems();
|
this.populateSelect2ActiveItems();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
processUrl() {
|
||||||
|
// Because we need to pass a parameter to the laravel route function
|
||||||
|
// We get a url 'http://localhost/api/v1/imports/process/DUMMYTEXT'
|
||||||
|
// But we want to customize that to /api/v1/imports/process/this_file
|
||||||
|
return this.importProcessUrl.replace('DUMMYTEXT', this.file.id)
|
||||||
|
},
|
||||||
columns() {
|
columns() {
|
||||||
switch(this.options.importType) {
|
switch(this.options.importType) {
|
||||||
case 'asset':
|
case 'asset':
|
||||||
|
@ -156,7 +162,7 @@ tr {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchCustomFields() {
|
fetchCustomFields() {
|
||||||
this.$http.get('/api/v1/fields')
|
this.$http.get(this.customFieldUrl)
|
||||||
.then( ({data}) => {
|
.then( ({data}) => {
|
||||||
data = data.rows;
|
data = data.rows;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
|
@ -169,22 +175,22 @@ tr {
|
||||||
},
|
},
|
||||||
postSave() {
|
postSave() {
|
||||||
this.statusText = "Processing...";
|
this.statusText = "Processing...";
|
||||||
this.$http.post('/api/v1/imports/process/'+this.file.id, {
|
this.$http.post(this.processUrl, {
|
||||||
'import-update': this.options.update,
|
'import-update': this.options.update,
|
||||||
'import-type': this.options.importType,
|
'import-type': this.options.importType,
|
||||||
'column-mappings': this.columnMappings
|
'column-mappings': this.columnMappings
|
||||||
}).then( (response) => {
|
}).then( ({body}) => {
|
||||||
// Success
|
// Success
|
||||||
this.statusText = "Success... Redirecting.";
|
this.statusText = "Success... Redirecting.";
|
||||||
window.location.href = response.body.messages.redirect_url;
|
window.location.href = body.messages.redirect_url;
|
||||||
}, (response) => {
|
}, ({body}) => {
|
||||||
// Failure
|
// Failure
|
||||||
if(response.body.status == 'import-errors') {
|
if(body.status == 'import-errors') {
|
||||||
window.eventHub.$emit('importErrors', response.body.messages);
|
window.eventHub.$emit('importErrors', body.messages);
|
||||||
this.statusText = "Error";
|
this.statusText = "Error";
|
||||||
} else {
|
} else {
|
||||||
this.$emit('alert', {
|
this.$emit('alert', {
|
||||||
message: response.body.messages,
|
message: body.messages,
|
||||||
type: "danger",
|
type: "danger",
|
||||||
visible: true,
|
visible: true,
|
||||||
})
|
})
|
||||||
|
|
|
@ -11,6 +11,8 @@ th {
|
||||||
<script>
|
<script>
|
||||||
require('blueimp-file-upload');
|
require('blueimp-file-upload');
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
|
props: ['importUrl'],
|
||||||
/*
|
/*
|
||||||
* The component's data.
|
* The component's data.
|
||||||
*/
|
*/
|
||||||
|
@ -72,7 +74,7 @@ th {
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
fetchFiles() {
|
fetchFiles() {
|
||||||
this.$http.get('/api/v1/imports')
|
this.$http.get(this.importUrl)
|
||||||
.then( ({data}) => this.files = data, // Success
|
.then( ({data}) => this.files = data, // Success
|
||||||
//Fail
|
//Fail
|
||||||
(response) => {
|
(response) => {
|
||||||
|
@ -82,7 +84,7 @@ th {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteFile(file, key) {
|
deleteFile(file, key) {
|
||||||
this.$http.delete("/api/v1/imports/"+file.id)
|
this.$http.delete(this.importUrl+"/"+file.id)
|
||||||
.then((response) => this.files.splice(key, 1), // Success, remove file from array.
|
.then((response) => this.files.splice(key, 1), // Success, remove file from array.
|
||||||
(response) => {// Fail
|
(response) => {// Fail
|
||||||
this.alert.type="danger";
|
this.alert.type="danger";
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
{{-- Page content --}}
|
{{-- Page content --}}
|
||||||
@section('content')
|
@section('content')
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<importer inline-template v-cloak>
|
<importer inline-template import-url="{{route('api.imports.index')}}" v-cloak>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<alert v-show="alert.visible" :alert-type="alert.type" v-on:hide="alert.visible = false">@{{ alert.message }}</alert>
|
<alert v-show="alert.visible" :alert-type="alert.type" v-on:hide="alert.visible = false">@{{ alert.message }}</alert>
|
||||||
<errors :errors="importErrors"></errors>
|
<errors :errors="importErrors"></errors>
|
||||||
|
@ -62,7 +62,12 @@
|
||||||
<button class="btn btn-danger" @click="deleteFile(currentFile)"><i class="fa fa-trash icon-white"></i></button>
|
<button class="btn btn-danger" @click="deleteFile(currentFile)"><i class="fa fa-trash icon-white"></i></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<import-file :key="currentFile.id" :file="currentFile" @alert="updateAlert(alert)">
|
<import-file
|
||||||
|
:key="currentFile.id"
|
||||||
|
:file="currentFile"
|
||||||
|
customFieldUrl="{{route('api.customfields.index')}}"
|
||||||
|
importProcessUrl="{{route('api.imports.importFile','DUMMYTEXT')}}"
|
||||||
|
@alert="updateAlert(alert)">
|
||||||
</import-file>
|
</import-file>
|
||||||
</template>
|
</template>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -625,11 +625,11 @@
|
||||||
<footer class="main-footer hidden-print">
|
<footer class="main-footer hidden-print">
|
||||||
<div class="pull-right hidden-xs">
|
<div class="pull-right hidden-xs">
|
||||||
<b>Version</b> {{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
|
<b>Version</b> {{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
|
||||||
<a target="_blank" class="btn btn-default btn-xs" href="https://snipe-it.readme.io/docs/overview">User's Manual</a>
|
<a target="_blank" class="btn btn-default btn-xs" href="https://snipe-it.readme.io/docs/overview" rel="noopener">User's Manual</a>
|
||||||
<a target="_blank" class="btn btn-default btn-xs" href="https://snipeitapp.com/support/">Report a Bug</a>
|
<a target="_blank" class="btn btn-default btn-xs" href="https://snipeitapp.com/support/" rel="noopener">Report a Bug</a>
|
||||||
</div>
|
</div>
|
||||||
<a target="_blank" href="https://snipeitapp.com">Snipe-IT</a> is an open source
|
<a target="_blank" href="https://snipeitapp.com" rel="noopener">Snipe-IT</a> is an open source
|
||||||
project, made with <i class="fa fa-heart" style="color: #a94442; font-size: 10px"></i> by <a href="https://twitter.com/snipeyhead">@snipeyhead</a> under the <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">AGPL3 license</a>.
|
project, made with <i class="fa fa-heart" style="color: #a94442; font-size: 10px"></i> by <a href="https://twitter.com/snipeyhead" rel="noopener">@snipeyhead</a> under the <a href="https://www.gnu.org/licenses/agpl-3.0.en.html" rel="noopener">AGPL3 license</a>.
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,7 @@ $('.snipe-table').bootstrapTable({
|
||||||
|
|
||||||
function imageFormatter(value, row) {
|
function imageFormatter(value, row) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return '<img src="' + value + '" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" data-toggle="lightbox" data-type="image">';
|
return '<a href="' + value + '" data-toggle="lightbox" data-type="image"><img src="' + value + '" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive"></a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue