Skip to content

Commit

Permalink
Built assets
Browse files Browse the repository at this point in the history
Signed-off-by: snipe <[email protected]>
  • Loading branch information
snipe committed Jan 14, 2025
1 parent 1c8d94c commit 0bb2e98
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
15 changes: 9 additions & 6 deletions public/js/build/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ If you want to pass additional variables to the modal (In the Category Create on
$(function () {
var baseUrl = $('meta[name="baseUrl"]').attr('content');
//handle modal-add-interstitial calls
var model, select, refreshSelector;
var model, select, refreshSelector, hasnopayload;
if ($('#createModal').length == 0) {
$('body').append('<div class="modal fade" id="createModal"></div><!-- /.modal -->');
}
Expand All @@ -623,6 +623,7 @@ $(function () {
model = link.data("dependency");
select = link.data("select");
refreshSelector = link.data("refresh");
hasnopayload = link.data("hasnopayload");
$('#createModal').load(link.attr('href'), function () {
// this sets the focus to be the name field
$('#modal-name').focus();
Expand Down Expand Up @@ -692,11 +693,13 @@ $(function () {
$('#modal_error_msg').html(error_message).show();
return false;
}
var id = result.payload.id;
var name = result.payload.name || result.payload.first_name + " " + result.payload.last_name;
if (!id || !name) {
console.error("Could not find resulting name or ID from modal-create. Name: " + name + ", id: " + id);
return false;
if (!hasnopayload) {
var id = result.payload.id;
var name = result.payload.name || result.payload.first_name + " " + result.payload.last_name;
if (!id || !name) {
console.error("Could not find resulting name or ID from modal-create. Name: " + name + ", id: " + id);
return false;
}
}
$('#createModal').modal('hide');
$('#createModal').html("");
Expand Down
15 changes: 9 additions & 6 deletions public/js/dist/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -59547,7 +59547,7 @@ If you want to pass additional variables to the modal (In the Category Create on
$(function () {
var baseUrl = $('meta[name="baseUrl"]').attr('content');
//handle modal-add-interstitial calls
var model, select, refreshSelector;
var model, select, refreshSelector, hasnopayload;
if ($('#createModal').length == 0) {
$('body').append('<div class="modal fade" id="createModal"></div><!-- /.modal -->');
}
Expand All @@ -59556,6 +59556,7 @@ $(function () {
model = link.data("dependency");
select = link.data("select");
refreshSelector = link.data("refresh");
hasnopayload = link.data("hasnopayload");
$('#createModal').load(link.attr('href'), function () {
// this sets the focus to be the name field
$('#modal-name').focus();
Expand Down Expand Up @@ -59625,11 +59626,13 @@ $(function () {
$('#modal_error_msg').html(error_message).show();
return false;
}
var id = result.payload.id;
var name = result.payload.name || result.payload.first_name + " " + result.payload.last_name;
if (!id || !name) {
console.error("Could not find resulting name or ID from modal-create. Name: " + name + ", id: " + id);
return false;
if (!hasnopayload) {
var id = result.payload.id;
var name = result.payload.name || result.payload.first_name + " " + result.payload.last_name;
if (!id || !name) {
console.error("Could not find resulting name or ID from modal-create. Name: " + name + ", id: " + id);
return false;
}
}
$('#createModal').modal('hide');
$('#createModal').html("");
Expand Down
4 changes: 2 additions & 2 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/js/build/app.js": "/js/build/app.js?id=65d7af7b9fa7fd0e05737526a0d1d282",
"/js/build/app.js": "/js/build/app.js?id=578c0308b8a324cc78c7786da9406022",
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=06c13e817cc022028b3f4a33c0ca303a",
"/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=e71ef4171dee5da63af390966ac60ffc",
"/css/build/overrides.css": "/css/build/overrides.css?id=776ca1fc6f89c40adc7050439f107f50",
Expand Down Expand Up @@ -111,5 +111,5 @@
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=c384582a6ba08903af353be861ffe74e",
"/js/build/vendor.js": "/js/build/vendor.js?id=89dffa552c6e3abe3a2aac6c9c7b466b",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=b4c3069f1a292527a96c058b77b28d69",
"/js/dist/all.js": "/js/dist/all.js?id=21e041dec60e0785db6d64961b13a9b0"
"/js/dist/all.js": "/js/dist/all.js?id=eeeac92878ac0b207ad7f39d593f62c3"
}
19 changes: 10 additions & 9 deletions resources/views/hardware/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@
@endif
@endif

<!-- Add notes -->
@can('update', \App\Models\Asset::class)
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
<a href='{{ route('modal.show', 'add-note') }}?type=asset&id={{$asset->id}}' style="width: 100%" data-toggle="modal" data-target="#createModal" data-select='add-note_select_id' data-refresh="assetHistory" data-hasnopayload="true" class="btn btn-sm btn-primary btn-block btn-social hidden-print">
<x-icon type="note" />
{{ trans('general.add_note') }}</a>
</div>
@endcan




@can('audit', \App\Models\Asset::class)
Expand Down Expand Up @@ -253,15 +263,6 @@
{{ Form::close() }}
</div>

<!-- Add notes -->
@can('update', \App\Models\Asset::class)
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
<a href='{{ route('modal.show', 'add-note') }}?type=asset&id={{$asset->id}}' style="width: 100%" data-toggle="modal" data-target="#createModal" data-select='add-note_select_id' data-refresh="assetHistory" data-hasnopayload="true" class="btn btn-sm btn-primary btn-block btn-social hidden-print">
<x-icon type="note" />
{{ trans('general.add_note') }}</a>
</div>
@endcan

@can('delete', $asset)
<div class="col-md-12 hidden-print" style="padding-top: 30px; padding-bottom: 30px;">

Expand Down

0 comments on commit 0bb2e98

Please sign in to comment.