diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index 2c9d29fc16..6d84861fb0 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -218,6 +218,7 @@ class AcceptanceController extends Controller 'item_tag' => $item->asset_tag, 'item_model' => $display_model, 'item_serial' => $item->serial, + 'item_status' => $item->assetstatus?->name, 'eula' => $item->getEula(), 'note' => $request->input('note'), 'check_out_date' => Carbon::parse($acceptance->created_at)->format('Y-m-d'), @@ -308,6 +309,7 @@ class AcceptanceController extends Controller 'item_tag' => $item->asset_tag, 'item_model' => $display_model, 'item_serial' => $item->serial, + 'item_status' => $item->assetstatus?->name, 'note' => $request->input('note'), 'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'), 'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null, diff --git a/app/Http/Controllers/Assets/BulkAssetsController.php b/app/Http/Controllers/Assets/BulkAssetsController.php index 287bc0611b..d58edbacab 100644 --- a/app/Http/Controllers/Assets/BulkAssetsController.php +++ b/app/Http/Controllers/Assets/BulkAssetsController.php @@ -227,7 +227,8 @@ class BulkAssetsController extends Controller * its checkout status. */ - if (($request->filled('purchase_date')) + if (($request->filled('name')) + || ($request->filled('purchase_date')) || ($request->filled('expected_checkin')) || ($request->filled('purchase_cost')) || ($request->filled('supplier_id')) @@ -239,6 +240,7 @@ class BulkAssetsController extends Controller || ($request->filled('status_id')) || ($request->filled('model_id')) || ($request->filled('next_audit_date')) + || ($request->filled('null_name')) || ($request->filled('null_purchase_date')) || ($request->filled('null_expected_checkin_date')) || ($request->filled('null_next_audit_date')) @@ -251,13 +253,14 @@ class BulkAssetsController extends Controller $this->update_array = []; /** - * Leave out model_id and status here because we do math on that later. We have to do some extra - * validation and checks on those two. + * Leave out model_id and status here because we do math on that later. We have to do some + * extra validation and checks on those two. * * It's tempting to make these match the request check above, but some of these values require * extra work to make sure the data makes sense. */ - $this->conditionallyAddItem('purchase_date') + $this->conditionallyAddItem('name') + ->conditionallyAddItem('purchase_date') ->conditionallyAddItem('expected_checkin') ->conditionallyAddItem('order_number') ->conditionallyAddItem('requestable') @@ -271,6 +274,11 @@ class BulkAssetsController extends Controller /** * Blank out fields that were requested to be blanked out via checkbox */ + if ($request->input('null_name')=='1') { + + $this->update_array['name'] = null; + } + if ($request->input('null_purchase_date')=='1') { $this->update_array['purchase_date'] = null; } diff --git a/app/Http/Controllers/Auth/SamlController.php b/app/Http/Controllers/Auth/SamlController.php index 769f903494..6a4c1f65b0 100644 --- a/app/Http/Controllers/Auth/SamlController.php +++ b/app/Http/Controllers/Auth/SamlController.php @@ -99,12 +99,18 @@ class SamlController extends Controller { $saml = $this->saml; $auth = $saml->getAuth(); - $auth->processResponse(); + $saml_exception = false; + try { + $auth->processResponse(); + } catch (\Exception $e) { + Log::warning("Exception caught in SAML login: " . $e->getMessage()); + $saml_exception = true; + } $errors = $auth->getErrors(); - if (! empty($errors)) { - Log::error('There was an error with SAML ACS: '.implode(', ', $errors)); - Log::error('Reason: '.$auth->getLastErrorReason()); + if (!empty($errors) || $saml_exception) { + Log::warning('There was an error with SAML ACS: ' . implode(', ', $errors)); + Log::warning('Reason: ' . $auth->getLastErrorReason()); return redirect()->route('login')->with('error', trans('auth/message.signin.error')); } @@ -132,12 +138,18 @@ class SamlController extends Controller { $auth = $this->saml->getAuth(); $retrieveParametersFromServer = $this->saml->getSetting('retrieveParametersFromServer', false); - $sloUrl = $auth->processSLO(true, null, $retrieveParametersFromServer, null, true); + $saml_exception = false; + try { + $sloUrl = $auth->processSLO(true, null, $retrieveParametersFromServer, null, true); + } catch (\Exception $e) { + Log::warning("Exception caught in SAML single-logout: " . $e->getMessage()); + $saml_exception = true; + } $errors = $auth->getErrors(); - if (! empty($errors)) { - Log::error('There was an error with SAML SLS: '.implode(', ', $errors)); - Log::error('Reason: '.$auth->getLastErrorReason()); + if (!empty($errors) || $saml_exception) { + Log::warning('There was an error with SAML SLS: ' . implode(', ', $errors)); + Log::warning('Reason: ' . $auth->getLastErrorReason()); return view('errors.403'); } diff --git a/app/Http/Requests/Traits/MayContainCustomFields.php b/app/Http/Requests/Traits/MayContainCustomFields.php index 50b239b60e..9a7f85e3a2 100644 --- a/app/Http/Requests/Traits/MayContainCustomFields.php +++ b/app/Http/Requests/Traits/MayContainCustomFields.php @@ -15,8 +15,7 @@ trait MayContainCustomFields $asset_model = AssetModel::find($this->model_id); } if ($this->method() == 'PATCH' || $this->method() == 'PUT') { - // this is dependent on the asset update request PR - $asset_model = $this->asset; + $asset_model = $this->asset->model; } // collect the custom fields in the request $validator->after(function ($validator) use ($asset_model) { @@ -25,7 +24,7 @@ trait MayContainCustomFields }); // if there are custom fields, find the one's that don't exist on the model's fieldset and add an error to the validator's error bag if (count($request_fields) > 0) { - $request_fields->diff($asset_model->fieldset->fields->pluck('db_column')) + $request_fields->diff($asset_model?->fieldset?->fields?->pluck('db_column')) ->each(function ($request_field_name) use ($request_fields, $validator) { if (CustomField::where('db_column', $request_field_name)->exists()) { $validator->errors()->add($request_field_name, trans('validation.custom.custom_field_not_found_on_model')); diff --git a/app/Http/Requests/UpdateAssetRequest.php b/app/Http/Requests/UpdateAssetRequest.php index cc23a65c40..a749e5816b 100644 --- a/app/Http/Requests/UpdateAssetRequest.php +++ b/app/Http/Requests/UpdateAssetRequest.php @@ -2,12 +2,14 @@ namespace App\Http\Requests; +use App\Http\Requests\Traits\MayContainCustomFields; use App\Models\Asset; use Illuminate\Support\Facades\Gate; use Illuminate\Validation\Rule; class UpdateAssetRequest extends ImageUploadRequest { + use MayContainCustomFields; /** * Determine if the user is authorized to make this request. * diff --git a/app/Notifications/AcceptanceAssetAcceptedNotification.php b/app/Notifications/AcceptanceAssetAcceptedNotification.php index db1555b574..7798dbc0d5 100644 --- a/app/Notifications/AcceptanceAssetAcceptedNotification.php +++ b/app/Notifications/AcceptanceAssetAcceptedNotification.php @@ -24,6 +24,7 @@ class AcceptanceAssetAcceptedNotification extends Notification $this->item_tag = $params['item_tag']; $this->item_model = $params['item_model']; $this->item_serial = $params['item_serial']; + $this->item_status = $params['item_status']; $this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'date', false); $this->assigned_to = $params['assigned_to']; $this->note = $params['note']; @@ -65,6 +66,7 @@ class AcceptanceAssetAcceptedNotification extends Notification 'item_tag' => $this->item_tag, 'item_model' => $this->item_model, 'item_serial' => $this->item_serial, + 'item_status' => $this->item_status, 'note' => $this->note, 'accepted_date' => $this->accepted_date, 'assigned_to' => $this->assigned_to, diff --git a/app/Notifications/AcceptanceAssetDeclinedNotification.php b/app/Notifications/AcceptanceAssetDeclinedNotification.php index abdfbbf0c0..0a9d6c211f 100644 --- a/app/Notifications/AcceptanceAssetDeclinedNotification.php +++ b/app/Notifications/AcceptanceAssetDeclinedNotification.php @@ -24,6 +24,7 @@ class AcceptanceAssetDeclinedNotification extends Notification $this->item_tag = $params['item_tag']; $this->item_model = $params['item_model']; $this->item_serial = $params['item_serial']; + $this->item_status = $params['item_status']; $this->declined_date = Helper::getFormattedDateObject($params['declined_date'], 'date', false); $this->note = $params['note']; $this->assigned_to = $params['assigned_to']; @@ -63,6 +64,7 @@ class AcceptanceAssetDeclinedNotification extends Notification 'item_tag' => $this->item_tag, 'item_model' => $this->item_model, 'item_serial' => $this->item_serial, + 'item_status' => $this->item_status, 'note' => $this->note, 'declined_date' => $this->declined_date, 'assigned_to' => $this->assigned_to, diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php index 54b96777fe..77cd6d9b5a 100644 --- a/app/Notifications/CheckinAssetNotification.php +++ b/app/Notifications/CheckinAssetNotification.php @@ -162,6 +162,7 @@ class CheckinAssetNotification extends Notification $message = (new MailMessage)->markdown('notifications.markdown.checkin-asset', [ 'item' => $this->item, + 'status' => $this->item->assetstatus?->name, 'admin' => $this->admin, 'note' => $this->note, 'target' => $this->target, diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index 1c8c901b52..5ebde7e4f7 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -209,6 +209,7 @@ public function toGoogleChat() [ 'item' => $this->item, 'admin' => $this->admin, + 'status' => $this->item->assetstatus?->name, 'note' => $this->note, 'target' => $this->target, 'fields' => $fields, diff --git a/app/Services/Saml.php b/app/Services/Saml.php index 8202868013..860ec76171 100644 --- a/app/Services/Saml.php +++ b/app/Services/Saml.php @@ -337,12 +337,12 @@ class Saml /** * Get a setting. * - * @author Johnson Yi - * * @param string|array|int $key * @param mixed $default * - * @return void + * @return mixed + * @author Johnson Yi + * */ public function getSetting($key, $default = null) { diff --git a/composer.json b/composer.json index 5467e94e32..a72d80839a 100644 --- a/composer.json +++ b/composer.json @@ -78,7 +78,7 @@ "fakerphp/faker": "^1.16", "larastan/larastan": "^2.9", "mockery/mockery": "^1.4", - "nunomaduro/phpinsights": "^2.7", + "nunomaduro/phpinsights": "^2.11", "php-mock/php-mock-phpunit": "^2.10", "phpunit/phpunit": "^10.0", "squizlabs/php_codesniffer": "^3.5", diff --git a/composer.lock b/composer.lock index f7c46672d3..715070df0f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "35c741a2d3300848d758b187554b5b17", + "content-hash": "3819ab4ef72eb77fabe494c0e746b83b", "packages": [ { "name": "alek13/slack", diff --git a/public/css/build/app.css b/public/css/build/app.css index c591513b75..bcc317f062 100644 --- a/public/css/build/app.css +++ b/public/css/build/app.css @@ -701,14 +701,137 @@ body { z-index: 0 !important; } @media print { - a[href]:after { - content: none; + @page { + size: A4; + margin: 0mm; } .tab-content > .tab-pane { display: block !important; opacity: 1 !important; visibility: visible !important; } + .img-responsive { + width: 200px; + } + html, + body { + width: 1024px; + } + body { + margin: 0 auto; + line-height: 1em; + word-spacing: 1px; + letter-spacing: 0.2px; + font: 15px "Times New Roman", Times, serif; + background: white; + color: black; + width: 100%; + float: none; + } + /* avoid page-breaks inside a listingContainer*/ + .listingContainer { + page-break-inside: avoid; + } + h1 { + font: 28px "Times New Roman", Times, serif; + } + h2 { + font: 24px "Times New Roman", Times, serif; + } + h3 { + font: 20px "Times New Roman", Times, serif; + } + /* Improve colour contrast of links */ + a:link, + a:visited { + color: #781351; + } + /* URL */ + a:link, + a:visited { + background: transparent; + color: #333; + text-decoration: none; + } + a[href]:after { + content: "" !important; + } + a[href^="http://"] { + color: #000; + } + #header { + height: 75px; + font-size: 24pt; + color: black; + } + div.row-new-striped { + margin: 0px; + padding: 0px; + } + .pagination-detail, + .fixed-table-toolbar { + visibility: hidden; + } + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 .col-sm-pull-3 .col-sm-push-9 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } +} +.select2-selection__choice__remove { + color: white !important; +} +.select2-selection--multiple { + border-color: #d2d6de !important; + height: 34px; +} +.select2-selection__choice { + border-radius: 0px !important; } img.navbar-brand-img, .navbar-brand > img { @@ -1145,6 +1268,9 @@ input[type="radio"]:checked::before { .select2-container .select2-search--inline .select2-search__field { padding-left: 15px; } +.nav-tabs-custom > .nav-tabs > li.active { + font-weight: bold; +} /** --------------------------------------- **/ /** End checkbox styles to replace iCheck **/ /** --------------------------------------- **/ diff --git a/public/css/build/overrides.css b/public/css/build/overrides.css index a65607c7bc..7b9e7d1b9c 100644 --- a/public/css/build/overrides.css +++ b/public/css/build/overrides.css @@ -334,14 +334,137 @@ body { z-index: 0 !important; } @media print { - a[href]:after { - content: none; + @page { + size: A4; + margin: 0mm; } .tab-content > .tab-pane { display: block !important; opacity: 1 !important; visibility: visible !important; } + .img-responsive { + width: 200px; + } + html, + body { + width: 1024px; + } + body { + margin: 0 auto; + line-height: 1em; + word-spacing: 1px; + letter-spacing: 0.2px; + font: 15px "Times New Roman", Times, serif; + background: white; + color: black; + width: 100%; + float: none; + } + /* avoid page-breaks inside a listingContainer*/ + .listingContainer { + page-break-inside: avoid; + } + h1 { + font: 28px "Times New Roman", Times, serif; + } + h2 { + font: 24px "Times New Roman", Times, serif; + } + h3 { + font: 20px "Times New Roman", Times, serif; + } + /* Improve colour contrast of links */ + a:link, + a:visited { + color: #781351; + } + /* URL */ + a:link, + a:visited { + background: transparent; + color: #333; + text-decoration: none; + } + a[href]:after { + content: "" !important; + } + a[href^="http://"] { + color: #000; + } + #header { + height: 75px; + font-size: 24pt; + color: black; + } + div.row-new-striped { + margin: 0px; + padding: 0px; + } + .pagination-detail, + .fixed-table-toolbar { + visibility: hidden; + } + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 .col-sm-pull-3 .col-sm-push-9 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } +} +.select2-selection__choice__remove { + color: white !important; +} +.select2-selection--multiple { + border-color: #d2d6de !important; + height: 34px; +} +.select2-selection__choice { + border-radius: 0px !important; } img.navbar-brand-img, .navbar-brand > img { @@ -778,6 +901,9 @@ input[type="radio"]:checked::before { .select2-container .select2-search--inline .select2-search__field { padding-left: 15px; } +.nav-tabs-custom > .nav-tabs > li.active { + font-weight: bold; +} /** --------------------------------------- **/ /** End checkbox styles to replace iCheck **/ /** --------------------------------------- **/ diff --git a/public/css/dist/all.css b/public/css/dist/all.css index 67dc0353df..47beba8745 100644 --- a/public/css/dist/all.css +++ b/public/css/dist/all.css @@ -21673,14 +21673,137 @@ body { z-index: 0 !important; } @media print { - a[href]:after { - content: none; + @page { + size: A4; + margin: 0mm; } .tab-content > .tab-pane { display: block !important; opacity: 1 !important; visibility: visible !important; } + .img-responsive { + width: 200px; + } + html, + body { + width: 1024px; + } + body { + margin: 0 auto; + line-height: 1em; + word-spacing: 1px; + letter-spacing: 0.2px; + font: 15px "Times New Roman", Times, serif; + background: white; + color: black; + width: 100%; + float: none; + } + /* avoid page-breaks inside a listingContainer*/ + .listingContainer { + page-break-inside: avoid; + } + h1 { + font: 28px "Times New Roman", Times, serif; + } + h2 { + font: 24px "Times New Roman", Times, serif; + } + h3 { + font: 20px "Times New Roman", Times, serif; + } + /* Improve colour contrast of links */ + a:link, + a:visited { + color: #781351; + } + /* URL */ + a:link, + a:visited { + background: transparent; + color: #333; + text-decoration: none; + } + a[href]:after { + content: "" !important; + } + a[href^="http://"] { + color: #000; + } + #header { + height: 75px; + font-size: 24pt; + color: black; + } + div.row-new-striped { + margin: 0px; + padding: 0px; + } + .pagination-detail, + .fixed-table-toolbar { + visibility: hidden; + } + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 .col-sm-pull-3 .col-sm-push-9 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } +} +.select2-selection__choice__remove { + color: white !important; +} +.select2-selection--multiple { + border-color: #d2d6de !important; + height: 34px; +} +.select2-selection__choice { + border-radius: 0px !important; } img.navbar-brand-img, .navbar-brand > img { @@ -22117,6 +22240,9 @@ input[type="radio"]:checked::before { .select2-container .select2-search--inline .select2-search__field { padding-left: 15px; } +.nav-tabs-custom > .nav-tabs > li.active { + font-weight: bold; +} /** --------------------------------------- **/ /** End checkbox styles to replace iCheck **/ /** --------------------------------------- **/ @@ -22971,14 +23097,137 @@ body { z-index: 0 !important; } @media print { - a[href]:after { - content: none; + @page { + size: A4; + margin: 0mm; } .tab-content > .tab-pane { display: block !important; opacity: 1 !important; visibility: visible !important; } + .img-responsive { + width: 200px; + } + html, + body { + width: 1024px; + } + body { + margin: 0 auto; + line-height: 1em; + word-spacing: 1px; + letter-spacing: 0.2px; + font: 15px "Times New Roman", Times, serif; + background: white; + color: black; + width: 100%; + float: none; + } + /* avoid page-breaks inside a listingContainer*/ + .listingContainer { + page-break-inside: avoid; + } + h1 { + font: 28px "Times New Roman", Times, serif; + } + h2 { + font: 24px "Times New Roman", Times, serif; + } + h3 { + font: 20px "Times New Roman", Times, serif; + } + /* Improve colour contrast of links */ + a:link, + a:visited { + color: #781351; + } + /* URL */ + a:link, + a:visited { + background: transparent; + color: #333; + text-decoration: none; + } + a[href]:after { + content: "" !important; + } + a[href^="http://"] { + color: #000; + } + #header { + height: 75px; + font-size: 24pt; + color: black; + } + div.row-new-striped { + margin: 0px; + padding: 0px; + } + .pagination-detail, + .fixed-table-toolbar { + visibility: hidden; + } + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 .col-sm-pull-3 .col-sm-push-9 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } +} +.select2-selection__choice__remove { + color: white !important; +} +.select2-selection--multiple { + border-color: #d2d6de !important; + height: 34px; +} +.select2-selection__choice { + border-radius: 0px !important; } img.navbar-brand-img, .navbar-brand > img { @@ -23415,6 +23664,9 @@ input[type="radio"]:checked::before { .select2-container .select2-search--inline .select2-search__field { padding-left: 15px; } +.nav-tabs-custom > .nav-tabs > li.active { + font-weight: bold; +} /** --------------------------------------- **/ /** End checkbox styles to replace iCheck **/ /** --------------------------------------- **/ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index e761f866ed..934c1d82b6 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -2,8 +2,8 @@ "/js/build/app.js": "/js/build/app.js?id=da3f7fee4a180ba924f6a3920c94eb71", "/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=f0b08873a06bb54daeee176a9459f4a9", "/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=f4397c717b99fce41a633ca6edd5d1f4", - "/css/build/overrides.css": "/css/build/overrides.css?id=e16bdd56ba78ee0f7247d88d8be191ff", - "/css/build/app.css": "/css/build/app.css?id=da3b545997adf9f04f2fd7dbff40a180", + "/css/build/overrides.css": "/css/build/overrides.css?id=a759aa24710e294392877c5139fda40e", + "/css/build/app.css": "/css/build/app.css?id=b3b3df70f679f45e15a6bcd28a8e87cc", "/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=4ea0068716c1bb2434d87a16d51b98c9", "/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690", "/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=393aaa7b368b0670fc42434c8cca7dc7", @@ -19,7 +19,7 @@ "/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374", "/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=0640e45bad692dcf62873c6e85904899", "/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb", - "/css/dist/all.css": "/css/dist/all.css?id=60b8cb7b38fe12383e530466a7e93705", + "/css/dist/all.css": "/css/dist/all.css?id=7b8e04041af3dfe3de25d73107bfda91", "/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7", "/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7", "/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde", diff --git a/resources/assets/less/overrides.less b/resources/assets/less/overrides.less index 8ef34bb3e2..3717dd477a 100644 --- a/resources/assets/less/overrides.less +++ b/resources/assets/less/overrides.less @@ -363,8 +363,10 @@ body { } @media print { - a[href]:after { - content: none; + + @page { + size: A4; + margin: 0mm; } .tab-content > .tab-pane { @@ -372,8 +374,136 @@ body { opacity: 1 !important; visibility: visible !important; } + + .img-responsive { + width: 200px; + } + + html, body { + width: 1024px; + } + + body { + margin: 0 auto; + line-height: 1em; + word-spacing:1px; + letter-spacing:0.2px; + font: 15px "Times New Roman", Times, serif; + background:white; + color:black; + width: 100%; + float: none; + } + + /* avoid page-breaks inside a listingContainer*/ + .listingContainer { + page-break-inside: avoid; + } + + h1 { + font: 28px "Times New Roman", Times, serif; + } + + h2 { + font: 24px "Times New Roman", Times, serif; + } + + h3 { + font: 20px "Times New Roman", Times, serif; + } + + /* Improve colour contrast of links */ + a:link, a:visited { + color: #781351 + } + + /* URL */ + a:link, a:visited { + background: transparent; + color:#333; + text-decoration:none; + } + + a[href]:after { + content: "" !important; + } + + a[href^="http://"] { + color:#000; + } + + #header { + height:75px; + font-size: 24pt; + color:black + } + + div.row-new-striped { + margin: 0px; + padding: 0px; + } + + .pagination-detail, .fixed-table-toolbar { + visibility: hidden; + } + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 .col-sm-pull-3 .col-sm-push-9 { + float: left; + } + + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666666666666%; + } + .col-sm-10 { + width: 83.33333333333334%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666666666666%; + } + .col-sm-7 { + width: 58.333333333333336%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666666666667%; + } + .col-sm-4 { + width: 33.33333333333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.666666666666664%; + } + .col-sm-1 { + width: 8.333333333333332%; + } + } + +.select2-selection__choice__remove { + color: white !important; +} + +.select2-selection--multiple { + border-color: #d2d6de !important; + height: 34px; +} + +.select2-selection__choice { + border-radius: 0px !important; +} + + img.navbar-brand-img, .navbar-brand>img { float: left; padding: 5px 5px 5px 0; @@ -885,6 +1015,10 @@ input[type="radio"]:checked::before { padding-left:15px; } +.nav-tabs-custom > .nav-tabs > li.active { + font-weight: bold; +} + /** --------------------------------------- **/ /** End checkbox styles to replace iCheck **/ /** --------------------------------------- **/ diff --git a/resources/views/hardware/bulk-delete.blade.php b/resources/views/hardware/bulk-delete.blade.php index df19c9005f..df988f5ad2 100644 --- a/resources/views/hardware/bulk-delete.blade.php +++ b/resources/views/hardware/bulk-delete.blade.php @@ -30,7 +30,7 @@ {{ trans('admin/hardware/table.id') }} - {{ trans('admin/hardware/table.name') }} + {{ trans('general.asset_name') }} {{ trans('admin/hardware/table.location')}} {{ trans('admin/hardware/table.assigned_to') }} diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.php index 371f0c2549..f621d88fa8 100755 --- a/resources/views/hardware/bulk.blade.php +++ b/resources/views/hardware/bulk.blade.php @@ -35,6 +35,25 @@ @endif + +
+ +
+ + {!! $errors->first('name', '') !!} +
+
+ +
+
+ +
diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 16fed07922..a4adb83556 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -133,7 +133,7 @@ @can('update', \App\Models\Asset::class) -
  • +
  • {{ trans('button.upload') }} @@ -176,7 +176,7 @@ @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1')) @if (($asset->assigned_to != '') && ($asset->deleted_at=='')) @can('checkin', \App\Models\Asset::class) -
    +
    model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}> {{ trans('admin/hardware/general.checkin') }} @@ -186,7 +186,7 @@ @endcan @elseif (($asset->assigned_to == '') && ($asset->deleted_at=='')) @can('checkout', \App\Models\Asset::class) -
    +
    model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}> {{ trans('admin/hardware/general.checkout') }} @@ -199,7 +199,7 @@ @if ($asset->deleted_at=='') @can('update', $asset) -
    +
    {{ trans('admin/hardware/general.edit') }} @@ -207,7 +207,7 @@ @endcan @can('audit', \App\Models\Asset::class) -
    +
    model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}> {{ trans('general.audit') }} @@ -218,7 +218,7 @@ @endif @can('create', $asset) -
    +
    {{ trans('admin/hardware/general.clone') }} @@ -226,7 +226,7 @@ @endcan @can('delete', $asset) -
    +
    @if ($asset->deleted_at=='') @@ -247,7 +247,7 @@

    @if (($asset->checkedOutToUser()) && ($asset->assignedTo->present()->gravatar())) - {{ $asset->assignedTo->present()->fullName() }} + {{ $asset->assignedTo->present()->fullName() }} @endif

    {!! $asset->assignedTo->present()->glyph() . ' ' .$asset->assignedTo->present()->nameUrl() !!} @@ -288,7 +288,7 @@
  • @endif
  • - {{ trans('admin/hardware/form.checkout_date') }}: {{ Helper::getFormattedDateObject($asset->last_checkout, 'date', false) }} + {{ trans('admin/hardware/form.checkout_date') }}: {{ Helper::getFormattedDateObject($asset->last_checkout, 'date', false) }}
  • @if (isset($asset->expected_checkin))
  • @@ -324,7 +324,7 @@
    {{ $asset->asset_tag }} -