mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 08:04:09 -08:00
Merge branch 'develop'
This commit is contained in:
commit
8e682c715e
|
@ -380,7 +380,7 @@ class AssetsController extends Controller
|
|||
if ($asset->save()) {
|
||||
// Redirect to the new asset page
|
||||
\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();
|
||||
\Session::flash('errors', $asset->getErrors());
|
||||
|
|
|
@ -52,8 +52,8 @@ class ActionlogsTransformer
|
|||
'type' => e($actionlog->targetType()),
|
||||
] : null,
|
||||
|
||||
'note' => e($actionlog->note),
|
||||
'signature_file' => ($actionlog->accept_signature) ? $actionlog->accept_signature : null,
|
||||
'note' => ($actionlog->note) ? e($actionlog->note): 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(
|
||||
'name' => 'required|string|min:3|max:255',
|
||||
'seats' => 'required|min:1|max:1000000|integer',
|
||||
'license_email' => 'email|min:0|max:120',
|
||||
'license_name' => 'string|min:0|max:100',
|
||||
'note' => 'string',
|
||||
'notes' => 'string|min:0',
|
||||
'license_email' => 'email|nullable|max:120',
|
||||
'license_name' => 'string|nullable|max:100',
|
||||
'note' => 'string|nullable',
|
||||
'notes' => 'string|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",
|
||||
"/css/AdminLTE.css": "/css/AdminLTE.css",
|
||||
"/css/app.css": "/css/app.css",
|
||||
"/css/overrides.css": "/css/overrides.css",
|
||||
"/vue.js.map": "/vue.js.map",
|
||||
"/mix.js.map": "/mix.js.map",
|
||||
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map",
|
||||
"/css/app.css.map": "/css/app.css.map",
|
||||
"/css/overrides.css.map": "/css/overrides.css.map",
|
||||
"public/css/dist/all.css": "public/css/dist/all.css",
|
||||
"public/js/dist/all.js": "public/js/dist/all.js"
|
||||
"/public/css/dist/all.css": "/public/css/dist/all.css",
|
||||
"/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>
|
||||
export default {
|
||||
props: ['file'],
|
||||
props: ['file', 'customFieldUrl', 'importProcessUrl'],
|
||||
data() {
|
||||
return {
|
||||
activeFile: this.file,
|
||||
|
@ -142,6 +142,12 @@ tr {
|
|||
this.populateSelect2ActiveItems();
|
||||
},
|
||||
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() {
|
||||
switch(this.options.importType) {
|
||||
case 'asset':
|
||||
|
@ -156,7 +162,7 @@ tr {
|
|||
},
|
||||
methods: {
|
||||
fetchCustomFields() {
|
||||
this.$http.get('/api/v1/fields')
|
||||
this.$http.get(this.customFieldUrl)
|
||||
.then( ({data}) => {
|
||||
data = data.rows;
|
||||
data.forEach((item) => {
|
||||
|
@ -169,22 +175,22 @@ tr {
|
|||
},
|
||||
postSave() {
|
||||
this.statusText = "Processing...";
|
||||
this.$http.post('/api/v1/imports/process/'+this.file.id, {
|
||||
this.$http.post(this.processUrl, {
|
||||
'import-update': this.options.update,
|
||||
'import-type': this.options.importType,
|
||||
'column-mappings': this.columnMappings
|
||||
}).then( (response) => {
|
||||
}).then( ({body}) => {
|
||||
// Success
|
||||
this.statusText = "Success... Redirecting.";
|
||||
window.location.href = response.body.messages.redirect_url;
|
||||
}, (response) => {
|
||||
window.location.href = body.messages.redirect_url;
|
||||
}, ({body}) => {
|
||||
// Failure
|
||||
if(response.body.status == 'import-errors') {
|
||||
window.eventHub.$emit('importErrors', response.body.messages);
|
||||
if(body.status == 'import-errors') {
|
||||
window.eventHub.$emit('importErrors', body.messages);
|
||||
this.statusText = "Error";
|
||||
} else {
|
||||
this.$emit('alert', {
|
||||
message: response.body.messages,
|
||||
message: body.messages,
|
||||
type: "danger",
|
||||
visible: true,
|
||||
})
|
||||
|
|
|
@ -11,6 +11,8 @@ th {
|
|||
<script>
|
||||
require('blueimp-file-upload');
|
||||
export default {
|
||||
|
||||
props: ['importUrl'],
|
||||
/*
|
||||
* The component's data.
|
||||
*/
|
||||
|
@ -72,7 +74,7 @@ th {
|
|||
|
||||
methods: {
|
||||
fetchFiles() {
|
||||
this.$http.get('/api/v1/imports')
|
||||
this.$http.get(this.importUrl)
|
||||
.then( ({data}) => this.files = data, // Success
|
||||
//Fail
|
||||
(response) => {
|
||||
|
@ -82,7 +84,7 @@ th {
|
|||
});
|
||||
},
|
||||
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.
|
||||
(response) => {// Fail
|
||||
this.alert.type="danger";
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div id="app">
|
||||
<importer inline-template v-cloak>
|
||||
<importer inline-template import-url="{{route('api.imports.index')}}" v-cloak>
|
||||
<div class="row">
|
||||
<alert v-show="alert.visible" :alert-type="alert.type" v-on:hide="alert.visible = false">@{{ alert.message }}</alert>
|
||||
<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>
|
||||
</td>
|
||||
</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>
|
||||
</template>
|
||||
</tbody>
|
||||
|
|
|
@ -625,11 +625,11 @@
|
|||
<footer class="main-footer hidden-print">
|
||||
<div class="pull-right hidden-xs">
|
||||
<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://snipeitapp.com/support/">Report a Bug</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/" rel="noopener">Report a Bug</a>
|
||||
</div>
|
||||
<a target="_blank" href="https://snipeitapp.com">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>.
|
||||
<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" rel="noopener">@snipeyhead</a> under the <a href="https://www.gnu.org/licenses/agpl-3.0.en.html" rel="noopener">AGPL3 license</a>.
|
||||
</footer>
|
||||
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ $('.snipe-table').bootstrapTable({
|
|||
|
||||
function imageFormatter(value, row) {
|
||||
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