Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 34088bcc17 | |||
| 5e2dba5483 | |||
| e781c170f3 | |||
| 43dfbd3d21 | |||
| 073c9f5f7c | |||
| f9d67dd431 | |||
| a2ea4c7fd0 | |||
| 251851ec6a | |||
| 049a669186 | |||
| a0358e32d7 | |||
| d29f13bae9 | |||
| c2023c5c56 | |||
| c758355df9 | |||
| 43c310c82d | |||
| 79d97a83af | |||
| 939a0c44dc | |||
| 85bd47c240 | |||
| 2b9cf1663b | |||
| 0a29e90701 | |||
| d1be13e7d4 | |||
| 049a777ca8 | |||
| 0dcaa83a3e | |||
| db706269e6 | |||
| 473ead9616 | |||
| 4f72505dc3 | |||
| 340f8b73a5 | |||
| 6c6b37000a | |||
| b5c79624c6 | |||
| cf2850933c | |||
| 49d66dedf4 | |||
| ff2564c57a | |||
| ebbcdbc864 | |||
| a18691c09f | |||
| 245b0b0f8f | |||
| 1d3b0478f9 | |||
| a5d0307532 | |||
| 91d3848246 | |||
| 7daecdd53f | |||
| 667b4a49c3 | |||
| 2518e60a5e | |||
| 9ff8b62cee | |||
| 5086c80658 | |||
| cb852fc20f | |||
| fb3b34e0f6 | |||
| c031f0b45e | |||
| 8d4fc07f63 | |||
| a0514ad8c1 | |||
| 4e03e525a4 | |||
| 0efdebcfd8 | |||
| c7835d2d1d | |||
| 3e3bc0a347 | |||
| 184a22828f | |||
| f26e27d23e | |||
| e717f1e780 | |||
| d1085a0f46 | |||
| 2e0913bb3b | |||
| 851ae46ea9 | |||
| 89a52b7551 | |||
| 25fdde1807 | |||
| a26279e0b9 | |||
| e408b902f0 |
+1
-1
@@ -3328,7 +3328,7 @@
|
||||
},
|
||||
{
|
||||
"login": "36864",
|
||||
"name": 36864,
|
||||
"name": "36864",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/109086466?v=4",
|
||||
"profile": "https://github.com/36864",
|
||||
"contributions": [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Snipe-IT Docker image build for hub.docker.com
|
||||
name: Docker ARM64 images (Ubuntu)
|
||||
name: Docker cross-platform images (Ubuntu and Alpine)
|
||||
|
||||
# Run this Build for all pushes to 'master' or develop branch, or tagged releases.
|
||||
# Also run for PRs to ensure PR doesn't break Docker build process
|
||||
@@ -19,10 +19,10 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
docker-ubuntu-arm:
|
||||
docker-ubuntu:
|
||||
# Ensure this job never runs on forked repos. It's only executed for 'grokability/snipe-it'
|
||||
if: github.repository == 'grokability/snipe-it'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
|
||||
# For a new commit on default branch (master), use the literal tag 'latest' on Docker image.
|
||||
@@ -77,17 +77,17 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/arm64
|
||||
platforms: linux/arm64,linux/amd64
|
||||
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
|
||||
# but we ONLY do an image push to DockerHub if it's NOT a PR
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
# Use tags / labels provided by 'docker/metadata-action' above
|
||||
tags: ${{ steps.meta_build.outputs.tags }}
|
||||
labels: ${{ steps.meta_build.outputs.labels }}
|
||||
docker-alpine-arm:
|
||||
docker-alpine:
|
||||
# Ensure this job never runs on forked repos. It's only executed for 'grokability/snipe-it'
|
||||
if: github.repository == 'grokability/snipe-it'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
|
||||
# For a new commit on default branch (master), use the literal tag 'latest' on Docker image.
|
||||
@@ -142,7 +142,7 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.alpine
|
||||
platforms: linux/arm64
|
||||
platforms: linux/arm64,linux/amd64
|
||||
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
|
||||
# but we ONLY do an image push to DockerHub if it's NOT a PR
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace App\Http\Controllers\Api;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Transformers\ActionlogsTransformer;
|
||||
use App\Models\Actionlog;
|
||||
use App\Models\Company;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
@@ -18,10 +20,11 @@ class ReportsController extends Controller
|
||||
*/
|
||||
public function index(Request $request) : JsonResponse | array
|
||||
{
|
||||
$this->authorize('reports.view');
|
||||
$this->authorize('activity.view');
|
||||
|
||||
$actionlogs = Actionlog::with('item', 'user', 'adminuser', 'target', 'location');
|
||||
|
||||
|
||||
if ($request->filled('search')) {
|
||||
$actionlogs = $actionlogs->TextSearch(e($request->input('search')));
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use \Illuminate\Contracts\View\View;
|
||||
use \Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class AssetCheckinController extends Controller
|
||||
{
|
||||
@@ -40,6 +41,15 @@ class AssetCheckinController extends Controller
|
||||
if (!$asset->model) {
|
||||
return redirect()->route('hardware.show', $asset->id)->with('error', trans('admin/hardware/general.model_invalid_fix'));
|
||||
}
|
||||
|
||||
// Validate custom fields on existing asset
|
||||
$validator = Validator::make($asset->toArray(), $asset->customFieldValidationRules());
|
||||
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('hardware.edit', $asset)
|
||||
->withErrors($validator);
|
||||
}
|
||||
|
||||
$target_option = match ($asset->assigned_type) {
|
||||
'App\Models\Asset' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.asset_previous')]),
|
||||
'App\Models\Location' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.location')]),
|
||||
|
||||
@@ -12,6 +12,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use \Illuminate\Contracts\View\View;
|
||||
use \Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class AssetCheckoutController extends Controller
|
||||
{
|
||||
@@ -36,6 +37,14 @@ class AssetCheckoutController extends Controller
|
||||
->with('error', trans('admin/hardware/general.model_invalid_fix'));
|
||||
}
|
||||
|
||||
// Validate custom fields on existing asset
|
||||
$validator = Validator::make($asset->toArray(), $asset->customFieldValidationRules());
|
||||
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('hardware.edit', $asset)
|
||||
->withErrors($validator);
|
||||
}
|
||||
|
||||
if ($asset->availableForCheckout()) {
|
||||
return view('hardware/checkout', compact('asset'))
|
||||
->with('statusLabel_list', Helper::deployableStatusLabelList())
|
||||
|
||||
@@ -877,10 +877,19 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
|
||||
public function audit(Asset $asset)
|
||||
public function audit(Asset $asset): View | RedirectResponse
|
||||
{
|
||||
$settings = Setting::getSettings();
|
||||
$this->authorize('audit', Asset::class);
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
// Validate custom fields on existing asset
|
||||
$validator = Validator::make($asset->toArray(), $asset->customFieldValidationRules());
|
||||
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('hardware.edit', $asset)
|
||||
->withErrors($validator);
|
||||
}
|
||||
|
||||
$dt = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
|
||||
return view('hardware/audit')->with('asset', $asset)->with('item', $asset)->with('next_audit_date', $dt)->with('locations_list');
|
||||
}
|
||||
|
||||
@@ -83,30 +83,30 @@ class CustomFieldsController extends Controller
|
||||
{
|
||||
$this->authorize('create', CustomField::class);
|
||||
|
||||
$show_in_email = $request->get("show_in_email", 0);
|
||||
$display_in_user_view = $request->get("display_in_user_view", 0);
|
||||
$show_in_email = $request->input("show_in_email", 0);
|
||||
$display_in_user_view = $request->input("display_in_user_view", 0);
|
||||
|
||||
// Override the display settings if the field is encrypted
|
||||
if ($request->get("field_encrypted") == '1') {
|
||||
if ($request->input("field_encrypted") == '1') {
|
||||
$show_in_email = '0';
|
||||
$display_in_user_view = '0';
|
||||
}
|
||||
|
||||
|
||||
$field = new CustomField([
|
||||
"name" => trim($request->get("name")),
|
||||
"element" => $request->get("element"),
|
||||
"help_text" => $request->get("help_text"),
|
||||
"field_values" => $request->get("field_values"),
|
||||
"field_encrypted" => $request->get("field_encrypted", 0),
|
||||
"name" => trim($request->input("name")),
|
||||
"element" => $request->input("element"),
|
||||
"help_text" => $request->input("help_text"),
|
||||
"field_values" => $request->input("field_values"),
|
||||
"field_encrypted" => $request->input("field_encrypted", 0),
|
||||
"show_in_email" => $show_in_email,
|
||||
"is_unique" => $request->get("is_unique", 0),
|
||||
"is_unique" => $request->input("is_unique", 0),
|
||||
"display_in_user_view" => $display_in_user_view,
|
||||
"auto_add_to_fieldsets" => $request->get("auto_add_to_fieldsets", 0),
|
||||
"show_in_listview" => $request->get("show_in_listview", 0),
|
||||
"show_in_requestable_list" => $request->get("show_in_requestable_list", 0),
|
||||
"display_checkin" => $request->get("display_checkin", 0),
|
||||
"display_checkout" => $request->get("display_checkout", 0),
|
||||
"display_audit" => $request->get("display_audit", 0),
|
||||
"auto_add_to_fieldsets" => $request->input("auto_add_to_fieldsets", 0),
|
||||
"show_in_listview" => $request->input("show_in_listview", 0),
|
||||
"show_in_requestable_list" => $request->input("show_in_requestable_list", 0),
|
||||
"display_checkin" => $request->input("display_checkin", 0),
|
||||
"display_checkout" => $request->input("display_checkout", 0),
|
||||
"display_audit" => $request->input("display_audit", 0),
|
||||
"created_by" => auth()->id()
|
||||
]);
|
||||
|
||||
@@ -238,8 +238,8 @@ class CustomFieldsController extends Controller
|
||||
$display_in_user_view = '0';
|
||||
}
|
||||
|
||||
$field->name = trim(e($request->get("name")));
|
||||
$field->element = e($request->get("element"));
|
||||
$field->name = trim($request->get("name"));
|
||||
$field->element = $request->get("element");
|
||||
$field->field_values = $request->get("field_values");
|
||||
$field->created_by = auth()->id();
|
||||
$field->help_text = $request->get("help_text");
|
||||
@@ -254,9 +254,9 @@ class CustomFieldsController extends Controller
|
||||
$field->display_audit = $request->get("display_audit", 0);
|
||||
|
||||
if ($request->get('format') == 'CUSTOM REGEX') {
|
||||
$field->format = e($request->get('custom_format'));
|
||||
$field->format = $request->get('custom_format');
|
||||
} else {
|
||||
$field->format = e($request->get('format'));
|
||||
$field->format = $request->get('format');
|
||||
}
|
||||
|
||||
if ($field->element == 'checkbox' || $field->element == 'radio'){
|
||||
|
||||
@@ -485,7 +485,7 @@ class ReportsController extends Controller
|
||||
$header[] = trans('admin/hardware/table.purchase_date');
|
||||
}
|
||||
|
||||
if (($request->filled('purchase_cost')) || ($request->filled('depreciation'))) {
|
||||
if ($request->filled('purchase_cost')) {
|
||||
$header[] = trans('admin/hardware/table.purchase_cost');
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +155,7 @@ class AssetsTransformer
|
||||
'clone' => Gate::allows('create', Asset::class) ? true : false,
|
||||
'restore' => ($asset->deleted_at!='' && Gate::allows('create', Asset::class)) ? true : false,
|
||||
'update' => ($asset->deleted_at=='' && Gate::allows('update', Asset::class)) ? true : false,
|
||||
'audit' => Gate::allows('audit', Asset::class) ? true : false,
|
||||
'delete' => ($asset->deleted_at=='' && $asset->assigned_to =='' && Gate::allows('delete', Asset::class) && ($asset->deleted_at == '')) ? true : false,
|
||||
];
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@ class CheckoutableListener
|
||||
default => null,
|
||||
};
|
||||
|
||||
if (!$category->checkin_email) {
|
||||
if (!$category?->checkin_email) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -79,6 +79,9 @@ class CustomField extends Model
|
||||
'auto_add_to_fieldsets',
|
||||
'show_in_listview',
|
||||
'show_in_email',
|
||||
'display_checkout',
|
||||
'display_checkin',
|
||||
'display_audit',
|
||||
'show_in_requestable_list',
|
||||
];
|
||||
|
||||
@@ -183,7 +186,44 @@ class CustomField extends Model
|
||||
{
|
||||
return $this->belongsToMany(\App\Models\CustomFieldset::class);
|
||||
}
|
||||
|
||||
|
||||
public function displayFieldInCheckinForm()
|
||||
{
|
||||
if ($this->display_checkin == '1') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function displayFieldInCheckoutForm()
|
||||
{
|
||||
if ($this->display_checkout == '1') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function displayFieldInAuditForm()
|
||||
{
|
||||
if ($this->display_audit == '1') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function displayFieldInCurrentForm($form_type = null)
|
||||
{
|
||||
switch ($form_type) {
|
||||
case 'audit':
|
||||
return $this->displayFieldInAuditForm();
|
||||
case 'checkin':
|
||||
return $this->displayFieldInCheckinForm();
|
||||
case 'checkout':
|
||||
return $this->displayFieldInCheckoutForm();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function assetModels()
|
||||
{
|
||||
return $this->fieldset()->with('models')->get()->pluck('models')->flatten()->unique('id');
|
||||
|
||||
@@ -71,6 +71,25 @@ class CustomFieldset extends Model
|
||||
return $this->belongsTo(\App\Models\User::class); //WARNING - not all CustomFieldsets have a User!!
|
||||
}
|
||||
|
||||
public function displayAnyFieldsInForm($form_type = null)
|
||||
{
|
||||
if ($this->fields) {
|
||||
|
||||
switch ($form_type) {
|
||||
case 'audit':
|
||||
return $this->fields->where('display_audit', '1')->count() > 0;
|
||||
case 'checkin':
|
||||
return $this->fields->where('display_checkin', '1')->count() > 0;
|
||||
case 'checkout':
|
||||
return $this->fields->where('display_checkout', '1')->count() > 0;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the validation rules we should apply based on the
|
||||
* custom field format
|
||||
|
||||
+15
-11
@@ -76,28 +76,32 @@ class Group extends SnipeModel
|
||||
*
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @since [v1.0]
|
||||
* @return array
|
||||
* @return array | \stdClass
|
||||
*/
|
||||
public function decodePermissions()
|
||||
{
|
||||
// Set default to empty JSON if the value is null
|
||||
// If the permissions are an array, convert it to JSON
|
||||
if (is_array($this->permissions)) {
|
||||
$this->permissions = json_encode($this->permissions);
|
||||
}
|
||||
|
||||
$permissions = json_decode($this->permissions ?? '{}', JSON_OBJECT_AS_ARRAY);
|
||||
|
||||
// If there are no permissions, return an empty array
|
||||
if (!$permissions) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Otherwise, loop through the permissions and cast the values as integers
|
||||
foreach ($permissions as $permission => $value) {
|
||||
$permissions[$permission] = (int) $value;
|
||||
if ((is_array($permissions)) && ($permissions)) {
|
||||
foreach ($permissions as $permission => $value) {
|
||||
|
||||
if (!is_integer($permission)) {
|
||||
$permissions[$permission] = (int) $value;
|
||||
} else {
|
||||
\Log::info('Weird data here - skipping it');
|
||||
unset($permissions[$permission]);
|
||||
}
|
||||
}
|
||||
return $permissions ?: new \stdClass;
|
||||
}
|
||||
return new \stdClass;
|
||||
|
||||
|
||||
return $permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -70,27 +70,38 @@ class TZe_24mm_D extends TZe_24mm
|
||||
}
|
||||
|
||||
foreach ($record->get('fields') as $field) {
|
||||
// Write label and value on the same line
|
||||
// Calculate label width with proportional character spacing
|
||||
$labelWidth = $pdf->GetStringWidth($field['label'], 'freemono', '', self::LABEL_SIZE);
|
||||
$charCount = strlen($field['label']);
|
||||
$spacingPerChar = 0.5;
|
||||
$totalSpacing = $charCount * $spacingPerChar;
|
||||
$adjustedWidth = $labelWidth + $totalSpacing;
|
||||
if (!empty($field['label']) && $field['label'] !== "\u{200B}") {
|
||||
// Write label and value on the same line
|
||||
// Calculate label width with proportional character spacing
|
||||
$labelWidth = $pdf->GetStringWidth($field['label'], 'freemono', '', self::LABEL_SIZE);
|
||||
$charCount = strlen($field['label']);
|
||||
$spacingPerChar = 0.5;
|
||||
$totalSpacing = $charCount * $spacingPerChar;
|
||||
$adjustedWidth = $labelWidth + $totalSpacing;
|
||||
|
||||
static::writeText(
|
||||
$pdf, $field['label'],
|
||||
$currentX, $currentY,
|
||||
'freemono', 'B', self::LABEL_SIZE, 'L',
|
||||
$adjustedWidth, self::LABEL_SIZE, true, 0, $spacingPerChar
|
||||
);
|
||||
static::writeText(
|
||||
$pdf, $field['label'],
|
||||
$currentX, $currentY,
|
||||
'freemono', 'B', self::LABEL_SIZE, 'L',
|
||||
$adjustedWidth, self::LABEL_SIZE, true, 0, $spacingPerChar
|
||||
);
|
||||
|
||||
static::writeText(
|
||||
$pdf, $field['value'],
|
||||
$currentX + $adjustedWidth + 2, $currentY,
|
||||
'freemono', 'B', self::FIELD_SIZE, 'L',
|
||||
$usableWidth - $adjustedWidth - 2, self::FIELD_SIZE, true, 0, 0.3
|
||||
);
|
||||
static::writeText(
|
||||
$pdf, $field['value'],
|
||||
$currentX + $adjustedWidth + 2, $currentY,
|
||||
'freemono', 'B', self::FIELD_SIZE, 'L',
|
||||
$usableWidth - $adjustedWidth - 2, self::FIELD_SIZE, true, 0, 0.3
|
||||
);
|
||||
} else {
|
||||
|
||||
// Label is empty, so write value only.
|
||||
static::writeText(
|
||||
$pdf, $field['value'],
|
||||
$currentX, $currentY, // No offset
|
||||
'freemono', 'B', self::FIELD_SIZE, 'L',
|
||||
$usableWidth, self::FIELD_SIZE, true, 0, 0.3
|
||||
);
|
||||
}
|
||||
|
||||
$currentY += max(self::LABEL_SIZE, self::FIELD_SIZE) + self::FIELD_MARGIN;
|
||||
}
|
||||
|
||||
+24
-12
@@ -746,24 +746,36 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decode JSON permissions into array
|
||||
*
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @since [v1.0]
|
||||
* @return array | \stdClass
|
||||
*/
|
||||
public function decodePermissions()
|
||||
{
|
||||
// Set default to empty JSON if the value is null
|
||||
// If the permissions are an array, convert it to JSON
|
||||
if (is_array($this->permissions)) {
|
||||
$this->permissions = json_encode($this->permissions);
|
||||
}
|
||||
|
||||
$permissions = json_decode($this->permissions ?? '{}', JSON_OBJECT_AS_ARRAY);
|
||||
|
||||
// If there are no permissions, return an empty array
|
||||
if (!$permissions) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Otherwise, loop through the permissions and cast the values as integers
|
||||
foreach ($permissions as $permission => $value) {
|
||||
$permissions[$permission] = (int) $value;
|
||||
if ((is_array($permissions)) && ($permissions)) {
|
||||
foreach ($permissions as $permission => $value) {
|
||||
|
||||
if (!is_integer($permission)) {
|
||||
$permissions[$permission] = (int) $value;
|
||||
} else {
|
||||
\Log::info('Weird data here - skipping it');
|
||||
unset($permissions[$permission]);
|
||||
}
|
||||
}
|
||||
return $permissions ?: new \stdClass;
|
||||
}
|
||||
|
||||
|
||||
return $permissions;
|
||||
return new \stdClass;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@ class LocationPresenter extends Presenter
|
||||
'switchable' => true,
|
||||
'title' => trans('general.company'),
|
||||
'visible' => false,
|
||||
'formatter' => 'locationCompanyObjFilterFormatter'
|
||||
'formatter' => 'companiesLinkObjFormatter'
|
||||
],
|
||||
[
|
||||
'field' => 'name',
|
||||
|
||||
@@ -168,6 +168,15 @@ class AuthServiceProvider extends ServiceProvider
|
||||
}
|
||||
});
|
||||
|
||||
// -----------------------------------------
|
||||
// Activity
|
||||
// -----------------------------------------
|
||||
Gate::define('activity.view', function ($user) {
|
||||
if (($user->hasAccess('reports.view')) || ($user->hasAccess('admin'))) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// -----------------------------------------
|
||||
// Self
|
||||
// -----------------------------------------
|
||||
|
||||
@@ -74,7 +74,8 @@ class BreadcrumbsServiceProvider extends ServiceProvider
|
||||
|
||||
Breadcrumbs::for('hardware.edit', fn (Trail $trail, Asset $asset) =>
|
||||
$trail->parent('hardware.index', route('hardware.index'))
|
||||
->push(trans('general.breadcrumb_button_actions.edit_item', ['name' => $asset->asset_tag]), route('hardware.edit', $asset))
|
||||
->push($asset->present()->fullName(), route('hardware.show', $asset))
|
||||
->push(trans('admin/hardware/general.edit'))
|
||||
);
|
||||
|
||||
|
||||
@@ -384,6 +385,7 @@ class BreadcrumbsServiceProvider extends ServiceProvider
|
||||
|
||||
Breadcrumbs::for('locations.edit', fn (Trail $trail, Location $location) =>
|
||||
$trail->parent('locations.index', route('locations.index'))
|
||||
->push($location->name, route('locations.show', $location))
|
||||
->push(trans('general.breadcrumb_button_actions.edit_item', ['name' => $location->name]), route('locations.edit', $location))
|
||||
);
|
||||
|
||||
|
||||
@@ -65,6 +65,10 @@ class SettingsServiceProvider extends ServiceProvider
|
||||
return 'assets/';
|
||||
});
|
||||
|
||||
\App::singleton('audits_upload_path', function () {
|
||||
return 'audits/';
|
||||
});
|
||||
|
||||
\App::singleton('accessories_upload_path', function () {
|
||||
return 'public/uploads/accessories/';
|
||||
});
|
||||
|
||||
+4
-1
@@ -177,10 +177,13 @@ class Label implements View
|
||||
// The end result of this will be in this format:
|
||||
// {labelOne} {valueOne} | {labelTwo} {valueTwo} | {labelThree} {valueThree}
|
||||
$previous['value'] = trim(implode(' | ', [
|
||||
implode(' ', [null, $previous['value']]),
|
||||
implode(' ', [$previous['label'], $previous['value']]),
|
||||
implode(' ', [$current['label'], $current['value']]),
|
||||
]));
|
||||
|
||||
// We'll set the label to an empty string since we
|
||||
// injected the label into the value field above.
|
||||
$previous['label'] = '';
|
||||
return $previous;
|
||||
});
|
||||
|
||||
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v8.1.0',
|
||||
'full_app_version' => 'v8.1.0 - build 17855-gd81788345',
|
||||
'build_version' => '17855',
|
||||
'app_version' => 'v8.1.2',
|
||||
'full_app_version' => 'v8.1.2 - build 17914-g251851ec6',
|
||||
'build_version' => '17914',
|
||||
'prerelease_version' => '',
|
||||
'hash_version' => 'gd81788345',
|
||||
'full_hash' => 'v8.1.0-657-gd81788345',
|
||||
'hash_version' => 'g251851ec6',
|
||||
'full_hash' => 'v8.1.2-32-g251851ec6',
|
||||
'branch' => 'master',
|
||||
);
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+16
-16
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"/js/build/app.js": "/js/build/app.js?id=f69d05a80165b5bbf6b0f4691edfd24e",
|
||||
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=d34ae2483cbe2c77478c45f4006eba55",
|
||||
"/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=6bf62cdec2477f3176df196fd0c99662",
|
||||
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=91f610c0a38bf0eddee0f250c24a1255",
|
||||
"/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=fdaa5177e6734465ddb849bad6facbf7",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=4db745985e0eef8cd209114c605b552f",
|
||||
"/css/build/app.css": "/css/build/app.css?id=d1fe702237ab0106011dd7c51be0ceb2",
|
||||
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=a67bd93bed52e6a29967fe472de66d6c",
|
||||
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=fc7adb943668ac69fe4b646625a7571f",
|
||||
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=53edc92eb2d272744bc7404ec259930e",
|
||||
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=9ceaa50f5ba5a951806ffa121208b499",
|
||||
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=b9a74ec0cd68f83e7480d5ae39919beb",
|
||||
"/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=cdbb4f543fb448f03617c7ed9d2cbec3",
|
||||
"/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=7936c81fcf96a6b70f84a4092e0615ac",
|
||||
"/css/dist/skins/skin-purple.css": "/css/dist/skins/skin-purple.css?id=cf6c8c340420724b02d6e787ef9bded5",
|
||||
"/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=cfa51820f16533fd62b3c3d720e368ec",
|
||||
"/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=04fe8c1ee6958857598c84d2e751fa55",
|
||||
"/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=268041e902b019730c23ee3875838005",
|
||||
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=98bd6927e46418c642fdd33fe56f4f26",
|
||||
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=4afd7894387dd2c11d353187155aa94e",
|
||||
"/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=b48f4d8af0e1ca5621c161e93951109f",
|
||||
"/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=16dc04eb54142bd3c32c2768d365d988",
|
||||
"/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=cdd26052a29ecf30a634448b1bb0691f",
|
||||
"/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=f0fbbb0ac729ea092578fb05ca615460",
|
||||
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=091d9625203be910caca3e229afe438f",
|
||||
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=18787b3f00a3be7be38ee4e26cbd2a07",
|
||||
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=62c68acb30ef60605d582d831d36cd89",
|
||||
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=1f33ca3d860461c1127ec465ab3ebb6b",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=850d7cc68e3bdeb8436d71453fb7ea0f",
|
||||
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
@@ -92,21 +92,21 @@
|
||||
"/css/webfonts/fa-v4compatibility.woff2": "/css/webfonts/fa-v4compatibility.woff2?id=331c85bd61ffa93af09273d1bc2add5a",
|
||||
"/js/dist/bootstrap-table-locale-all.min.js": "/js/dist/bootstrap-table-locale-all.min.js?id=5e93ef0a1889bed3f92a705dc1e92c9b",
|
||||
"/js/dist/bootstrap-table-en-US.min.js": "/js/dist/bootstrap-table-en-US.min.js?id=c0f21fb7e62d6f0a0153f1cdbf26782a",
|
||||
"/css/dist/skins/_all-skins.min.css": "/css/dist/skins/_all-skins.min.css?id=6bf62cdec2477f3176df196fd0c99662",
|
||||
"/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=d34ae2483cbe2c77478c45f4006eba55",
|
||||
"/css/dist/skins/_all-skins.min.css": "/css/dist/skins/_all-skins.min.css?id=fdaa5177e6734465ddb849bad6facbf7",
|
||||
"/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=91f610c0a38bf0eddee0f250c24a1255",
|
||||
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=1f33ca3d860461c1127ec465ab3ebb6b",
|
||||
"/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=18787b3f00a3be7be38ee4e26cbd2a07",
|
||||
"/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=62c68acb30ef60605d582d831d36cd89",
|
||||
"/css/dist/skins/skin-blue.min.css": "/css/dist/skins/skin-blue.min.css?id=091d9625203be910caca3e229afe438f",
|
||||
"/css/dist/skins/skin-contrast.min.css": "/css/dist/skins/skin-contrast.min.css?id=f0fbbb0ac729ea092578fb05ca615460",
|
||||
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=16dc04eb54142bd3c32c2768d365d988",
|
||||
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=cdd26052a29ecf30a634448b1bb0691f",
|
||||
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=b48f4d8af0e1ca5621c161e93951109f",
|
||||
"/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=98bd6927e46418c642fdd33fe56f4f26",
|
||||
"/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=4afd7894387dd2c11d353187155aa94e",
|
||||
"/css/dist/skins/skin-orange.min.css": "/css/dist/skins/skin-orange.min.css?id=268041e902b019730c23ee3875838005",
|
||||
"/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=cfa51820f16533fd62b3c3d720e368ec",
|
||||
"/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=04fe8c1ee6958857598c84d2e751fa55",
|
||||
"/css/dist/skins/skin-purple.min.css": "/css/dist/skins/skin-purple.min.css?id=cf6c8c340420724b02d6e787ef9bded5",
|
||||
"/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=cdbb4f543fb448f03617c7ed9d2cbec3",
|
||||
"/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=7936c81fcf96a6b70f84a4092e0615ac",
|
||||
"/css/dist/skins/skin-red.min.css": "/css/dist/skins/skin-red.min.css?id=b9a74ec0cd68f83e7480d5ae39919beb",
|
||||
"/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=53edc92eb2d272744bc7404ec259930e",
|
||||
"/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=9ceaa50f5ba5a951806ffa121208b499",
|
||||
"/css/dist/skins/skin-yellow.min.css": "/css/dist/skins/skin-yellow.min.css?id=fc7adb943668ac69fe4b646625a7571f",
|
||||
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=54d676a6ea8677dd48f6c4b3041292cf",
|
||||
"/js/build/vendor.js": "/js/build/vendor.js?id=89dffa552c6e3abe3a2aac6c9c7b466b",
|
||||
|
||||
@@ -311,10 +311,7 @@ input[type=text], input[type=search] {
|
||||
.search-highlight, .search-highlight:hover{
|
||||
background-color: var(--back-sub) !important;
|
||||
}
|
||||
.input-group, .input-group-addon {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
@@ -298,10 +298,6 @@ input[type=text], input[type=search] {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main);
|
||||
}
|
||||
.input-group, .input-group-addon {
|
||||
background-color: var(--back-sub)!important;
|
||||
color: var(--text-main);
|
||||
}
|
||||
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
||||
color: var(--text-main);
|
||||
}
|
||||
@@ -380,7 +376,7 @@ input[type=text], input[type=search] {
|
||||
background-color: var(--back-sub);
|
||||
}
|
||||
.table-striped>tbody>tr:nth-of-type(even){
|
||||
background-color: var(--back-sub-alt);
|
||||
background-color: var(--back-main);
|
||||
}
|
||||
#webui>div>div>div>div>div>table>tbody>tr>td>a>i.fa, .box-body, .box-footer, .box-header {
|
||||
color: var(--text-main);
|
||||
@@ -404,7 +400,16 @@ a {
|
||||
}
|
||||
}
|
||||
#customFieldsTable a[href*='/models'] {
|
||||
color: var(--back-sub);
|
||||
background-color: var(--back-sub-alt);
|
||||
color: var(--link);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:hover {
|
||||
background-color: var(--text-sub);
|
||||
color: var(--button-hover);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:visited {
|
||||
background-color: var(--background);
|
||||
color: var(--visited-link);
|
||||
}
|
||||
#customFieldsTable a[href*='/fieldsets']{
|
||||
background-color: transparent;
|
||||
|
||||
@@ -289,10 +289,6 @@ input[type=text], input[type=search] {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main);
|
||||
}
|
||||
.input-group, .input-group-addon {
|
||||
background-color: var(--back-sub)!important;
|
||||
color: var(--text-main);
|
||||
}
|
||||
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
||||
color: var(--text-main);
|
||||
}
|
||||
@@ -391,7 +387,16 @@ a {
|
||||
}
|
||||
}
|
||||
#customFieldsTable a[href*='/models'] {
|
||||
color: var(--back-sub);
|
||||
background-color: var(--back-sub-alt);
|
||||
color: var(--link);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:hover {
|
||||
background-color: var(--text-sub);
|
||||
color: var(--button-hover);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:visited {
|
||||
background-color: var(--background);
|
||||
color: var(--visited-link);
|
||||
}
|
||||
#customFieldsTable a[href*='/fieldsets']{
|
||||
background-color: transparent;
|
||||
|
||||
@@ -297,10 +297,6 @@ input[type=text], input[type=search] {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main);
|
||||
}
|
||||
.input-group, .input-group-addon {
|
||||
background-color: var(--back-sub)!important;
|
||||
color: var(--text-main);
|
||||
}
|
||||
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
||||
color: var(--text-main);
|
||||
}
|
||||
@@ -389,7 +385,16 @@ input[type=text], input[type=search] {
|
||||
border-bottom: #000;
|
||||
}
|
||||
#customFieldsTable a[href*='/models'] {
|
||||
color: var(--back-sub);
|
||||
background-color: var(--back-sub-alt);
|
||||
color: var(--link);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:hover {
|
||||
background-color: var(--text-sub);
|
||||
color: var(--button-hover);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:visited {
|
||||
background-color: var(--background);
|
||||
color: var(--visited-link);
|
||||
}
|
||||
#customFieldsTable a[href*='/fieldsets']{
|
||||
background-color: transparent;
|
||||
|
||||
@@ -297,10 +297,6 @@ input[type=text], input[type=search] {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main);
|
||||
}
|
||||
.input-group, .input-group-addon {
|
||||
background-color: var(--back-sub)!important;
|
||||
color: var(--text-main);
|
||||
}
|
||||
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
||||
color: var(--text-main);
|
||||
}
|
||||
@@ -414,6 +410,18 @@ a {
|
||||
display: table;
|
||||
|
||||
}
|
||||
#customFieldsTable a[href*='/models'] {
|
||||
background-color: var(--back-sub-alt);
|
||||
color: var(--link);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:hover {
|
||||
background-color: var(--text-sub);
|
||||
color: var(--button-hover);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:visited {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--visited-link);
|
||||
}
|
||||
|
||||
.row-striped .row:nth-of-type(odd) div {
|
||||
background-color: var(--back-sub);
|
||||
|
||||
@@ -298,10 +298,6 @@ input[type=text], input[type=search] {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main);
|
||||
}
|
||||
.input-group, .input-group-addon {
|
||||
background-color: var(--back-sub)!important;
|
||||
color: var(--text-main);
|
||||
}
|
||||
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
||||
color: var(--text-main);
|
||||
}
|
||||
@@ -409,7 +405,16 @@ a {
|
||||
}
|
||||
}
|
||||
#customFieldsTable a[href*='/models'] {
|
||||
color: var(--back-sub);
|
||||
background-color: var(--back-sub-alt);
|
||||
color: var(--link);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:hover {
|
||||
background-color: var(--text-sub);
|
||||
color: var(--button-hover);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:visited {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--visited-link);
|
||||
}
|
||||
#customFieldsTable a[href*='/fieldsets']{
|
||||
background-color: transparent;
|
||||
|
||||
@@ -289,10 +289,6 @@ input[type=text], input[type=search] {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main);
|
||||
}
|
||||
.input-group, .input-group-addon {
|
||||
background-color: var(--back-sub)!important;
|
||||
color: var(--text-main);
|
||||
}
|
||||
#licensesTable>tbody>tr>td>nobr>a>i.fa {
|
||||
color: var(--text-main);
|
||||
}
|
||||
@@ -383,6 +379,18 @@ tr th div.th-inner {
|
||||
.box-header.with-border {
|
||||
border-bottom: #000;
|
||||
}
|
||||
#customFieldsTable a[href*='/models'] {
|
||||
background-color: var(--back-sub-alt);
|
||||
color: var(--link);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:hover {
|
||||
background-color: var(--text-sub);
|
||||
color: var(--button-hover);
|
||||
}
|
||||
#customFieldsTable a[href*='/models']:visited {
|
||||
background-color: var(--background);
|
||||
color: var(--visited-link);
|
||||
}
|
||||
|
||||
.row-striped {
|
||||
vertical-align: top;
|
||||
|
||||
@@ -390,6 +390,8 @@ return [
|
||||
'new_license' => 'New License',
|
||||
'new_accessory' => 'New Accessory',
|
||||
'new_consumable' => 'New Consumable',
|
||||
'new_component' => 'New Component',
|
||||
'new_user' => 'New User',
|
||||
'collapse' => 'Collapse',
|
||||
'assigned' => 'Assigned',
|
||||
'asset_count' => 'Asset Count',
|
||||
|
||||
@@ -172,6 +172,7 @@ return [
|
||||
'url' => 'The :attribute field must be a valid URL.',
|
||||
'ulid' => 'The :attribute field must be a valid ULID.',
|
||||
'uuid' => 'The :attribute field must be a valid UUID.',
|
||||
'fmcs_location' => 'Full multiple company support and location scoping is enabled in the Admin Settings, and the selected location and selected company are not compatible.',
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -292,8 +292,8 @@ Form::macro('skin', function ($name = 'skin', $selected = null, $class = null) {
|
||||
'black-dark' => trans('general.skins.black_dark'),
|
||||
'purple' => trans('general.skins.purple'),
|
||||
'purple-dark' => trans('general.skins.purple_dark'),
|
||||
'yellow' => trans('general.skins.yellow_dark'),
|
||||
'yellow-dark' => trans('general.skins.yellow'),
|
||||
'yellow' => trans('general.skins.yellow'),
|
||||
'yellow-dark' => trans('general.skins.yellow_dark'),
|
||||
'contrast' => trans('general.skins.high_contrast'),
|
||||
];
|
||||
|
||||
|
||||
@@ -702,9 +702,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /consumables-tab -->
|
||||
<div class="tab-pane" id="test">
|
||||
<p>fdlkgjljg</p>
|
||||
</div>
|
||||
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- nav-tabs-custom -->
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
<th data-sortable="true" data-visible="false" data-searchable="false" class="text-center"
|
||||
data-tooltip="{{ trans('admin/custom_fields/general.display_audit') }}">
|
||||
<x-icon type="due" />
|
||||
<x-icon type="audit" />
|
||||
<span class="sr-only">
|
||||
{{ trans('admin/custom_fields/general.display_audit') }}
|
||||
</span>
|
||||
|
||||
@@ -172,26 +172,36 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
@can('create', \App\Models\Asset::class)
|
||||
<a class="btn bg-teal" style="width: 100%" href="{{ route('hardware.create') }}">{{ trans('general.new_asset') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
@can('create', \App\Models\License::class)
|
||||
<a class="btn bg-maroon" style="width: 100%" href="{{ route('licenses.create') }}">{{ trans('general.new_license') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
@can('create', \App\Models\Accessory::class)
|
||||
<a class="btn bg-orange" style="width: 100%" href="{{ route('accessories.create') }}">{{ trans('general.new_accessory') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
@can('create', \App\Models\Consumable::class)
|
||||
<a class="btn bg-purple" style="width: 100%" href="{{ route('consumables.create') }}">{{ trans('general.new_consumable') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@can('create', \App\Models\Component::class)
|
||||
<a class="btn bg-yellow" style="width: 100%" href="{{ route('components.create') }}">{{ trans('general.new_component') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@can('create', \App\Models\User::class)
|
||||
<a class="btn bg-light-blue" style="width: 100%" href="{{ route('users.create') }}">{{ trans('general.new_user') }}</a>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -282,7 +292,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
@if ($snipeSettings->full_multiple_companies_support=='1')
|
||||
@if ((($snipeSettings->scope_locations_fmcs!='1') && ($snipeSettings->full_multiple_companies_support=='1')))
|
||||
<!-- Companies -->
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
<th data-switchable="true" data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="name" data-formatter="groupsAdminLinkFormatter" data-visible="true">{{ trans('admin/groups/table.name') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="users_count" data-visible="true"><x-icon type="user" /><span class="sr-only">{{ trans('admin/groups/table.users') }}</span></th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="created_at" data-visible="true" data-formatter="dateDisplayFormatter">{{ trans('general.created_at') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="notes" data-visible="true">{{ trans('general.notes') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="created_at" data-visible="true" data-formatter="dateDisplayFormatter">{{ trans('general.created_at') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="true" data-field="created_by" data-formatter="usersLinkObjFormatter">{{ trans('general.created_by') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" data-formatter="groupsActionsFormatter">{{ trans('table.actions') }}</th>
|
||||
|
||||
|
||||
@@ -115,12 +115,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom fields -->
|
||||
@include("models/custom_fields_form", [
|
||||
'model' => $asset->model,
|
||||
'show_display_checkout_fields' => 'true'
|
||||
])
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group{{ $errors->has('note') ? ' has-error' : '' }}">
|
||||
@@ -136,6 +130,12 @@
|
||||
<!-- Audit Image -->
|
||||
@include ('partials.forms.edit.image-upload', ['help_text' => trans('general.audit_images_help')])
|
||||
|
||||
<!-- Custom fields -->
|
||||
@include("models/custom_fields_form", [
|
||||
'model' => $asset->model,
|
||||
'show_custom_fields_type' => 'audit'
|
||||
])
|
||||
|
||||
|
||||
</div> <!--/.box-body-->
|
||||
<div class="box-footer">
|
||||
|
||||
@@ -139,29 +139,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
<label for="note" class="col-md-3 control-label">
|
||||
{{ trans('general.notes') }}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note" @required($snipeSettings->require_checkinout_notes)
|
||||
name="note">{{ old('note', $asset->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Custom fields -->
|
||||
@include("models/custom_fields_form", [
|
||||
'model' => $asset->model,
|
||||
'show_display_checkin_fields' => 'true'
|
||||
'show_custom_fields_type' => 'checkin'
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
<label for="note" class="col-md-3 control-label">
|
||||
{{ trans('general.notes') }}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note" @required($snipeSettings->require_checkinout_notes)
|
||||
name="note">{{ old('note', $asset->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div> <!--/.box-body-->
|
||||
</div> <!--/.box-body-->
|
||||
|
||||
|
||||
@@ -142,12 +142,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom fields -->
|
||||
@include("models/custom_fields_form", [
|
||||
'model' => $asset->model,
|
||||
'show_display_checkout_fields' => 'true'
|
||||
])
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
<label for="note" class="col-md-3 control-label">
|
||||
@@ -156,10 +150,18 @@
|
||||
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note" @required($snipeSettings->require_checkinout_notes)
|
||||
name="note">{{ old('note', $asset->note) }}</textarea>
|
||||
name="note">{{ old('note', $asset->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom fields -->
|
||||
@include("models/custom_fields_form", [
|
||||
'model' => $asset->model,
|
||||
'show_custom_fields_type' => 'checkout'
|
||||
])
|
||||
|
||||
|
||||
|
||||
@if ($asset->requireAcceptance() || $asset->getEula() || ($snipeSettings->webhook_endpoint!=''))
|
||||
<div class="form-group notification-callout">
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
@if (($model) && ($model->fieldset))
|
||||
@if (($model) && ($model->fieldset) && $model->fieldset->displayAnyFieldsInForm($show_custom_fields_type ?? ''))
|
||||
<div class="col-md-12 col-sm-12">
|
||||
|
||||
<fieldset name="custom-fields" class="bottom-padded">
|
||||
<legend class="highlight">
|
||||
{{ trans('admin/custom_fields/general.custom_fields') }}
|
||||
</legend>
|
||||
|
||||
@foreach($model->fieldset->fields AS $field)
|
||||
@if (
|
||||
((!isset($show_display_checkin_fields))
|
||||
|| (($field->display_checkin == '1')
|
||||
&& ($show_display_checkin_fields =='true'))) &&
|
||||
((!isset($show_display_checkout_fields))
|
||||
|| (($field->display_checkout == '1')
|
||||
&& ($show_display_checkout_fields =='true')))
|
||||
)
|
||||
@foreach($model->fieldset->fields as $field)
|
||||
@if (!isset($show_custom_fields_type) || ($field->displayFieldInCurrentForm($show_custom_fields_type)))
|
||||
|
||||
|
||||
<div class="form-group{{ $errors->has($field->db_column_name()) ? ' has-error' : '' }}">
|
||||
|
||||
|
||||
<label for="{{ $field->db_column_name() }}" class="col-md-3 control-label">
|
||||
{{ $field->name }}
|
||||
|
||||
</label>
|
||||
|
||||
<div class="col-md-7 col-sm-12">
|
||||
@@ -105,9 +101,8 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
@@ -371,6 +371,10 @@
|
||||
actions += '<a href="{{ config('app.url') }}/' + dest + '/' + row.id + '/clone" class="actions btn btn-sm btn-info" data-tooltip="true" title="{{ trans('general.clone_item') }}"><x-icon type="clone" /><span class="sr-only">{{ trans('general.clone_item') }}</span></a> ';
|
||||
}
|
||||
|
||||
if ((row.available_actions) && (row.available_actions.audit === true)) {
|
||||
actions += '<a href="{{ config('app.url') }}/' + dest + '/' + row.id + '/audit" class="actions btn btn-sm btn-primary" data-tooltip="true" title="{{ trans('general.audit') }}"><x-icon type="audit" /><span class="sr-only">{{ trans('general.audit') }}</span></a> ';
|
||||
}
|
||||
|
||||
if ((row.available_actions) && (row.available_actions.update === true)) {
|
||||
actions += '<a href="{{ config('app.url') }}/' + dest + '/' + row.id + '/edit" class="actions btn btn-sm btn-warning" data-tooltip="true" title="{{ trans('general.update') }}"><x-icon type="edit" /><span class="sr-only">{{ trans('general.update') }}</span></a> ';
|
||||
} else {
|
||||
|
||||
@@ -1,28 +1,29 @@
|
||||
<!-- Image stuff - kept in /resources/views/partials/forms/edit/image-upload.blade.php -->
|
||||
<!-- Image Delete -->
|
||||
@if (isset($item) && ($item->{($fieldname ?? 'image')}))
|
||||
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" name="image_delete" value="1" @checked(old('image_delete')) aria-label="image_delete">
|
||||
{{ trans('general.image_delete') }}
|
||||
@if (isset($image_path))
|
||||
@if (isset($item) && ($item->{($fieldname ?? 'image')}))
|
||||
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" name="image_delete" value="1" @checked(old('image_delete')) aria-label="image_delete">
|
||||
{{ trans('general.image_delete') }}
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<img src="{{ Storage::disk('public')->url($image_path.e($item->{($fieldname ?? 'image')})) }}" class="img-responsive">
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<img src="{{ Storage::disk('public')->url($image_path.e($item->{($fieldname ?? 'image')})) }}" class="img-responsive">
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<!-- Image Upload and preview -->
|
||||
|
||||
<div class="form-group {{ $errors->has((isset($fieldname) ? $fieldname : 'image')) ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="{{ (isset($fieldname) ? $fieldname : 'image') }}">{{ trans('general.image_upload') }}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-8">
|
||||
|
||||
<input type="file" id="{{ (isset($fieldname) ? $fieldname : 'image') }}" name="{{ (isset($fieldname) ? $fieldname : 'image') }}" aria-label="{{ (isset($fieldname) ? $fieldname : 'image') }}" class="sr-only">
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="form-group {{ $errors->has('warranty_months') ? ' has-error' : '' }}">
|
||||
<label for="warranty_months" class="col-md-3 control-label">{{ trans('admin/hardware/form.warranty') }}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group col-md-3" style="padding-left: 0px;">
|
||||
<div class="input-group col-md-4 col-sm-6" style="padding-left: 0px;">
|
||||
<input class="form-control" type="text" name="warranty_months" id="warranty_months" value="{{ old('warranty_months', $item->warranty_months) }}" maxlength="3" />
|
||||
<span class="input-group-addon">{{ trans('admin/hardware/form.months') }}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user