mirror of
https://github.com/grokability/snipe-it.git
synced 2026-03-12 17:52:00 +08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
@@ -55,6 +55,8 @@ class SendExpirationAlerts extends Command
|
||||
// Expiring Assets
|
||||
$assets = Asset::getExpiringWarrantyOrEol($alert_interval);
|
||||
|
||||
$assets->load(['assignedTo', 'supplier']);
|
||||
|
||||
if ($assets->count() > 0) {
|
||||
|
||||
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $alert_interval));
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Helpers;
|
||||
use App\Models\Accessory;
|
||||
use App\Models\Actionlog;
|
||||
use App\Models\Asset;
|
||||
use App\Models\AssetModel;
|
||||
use App\Models\Component;
|
||||
@@ -1582,6 +1583,19 @@ class Helper
|
||||
'he-IL'
|
||||
]) ? 'rtl' : 'ltr';
|
||||
}
|
||||
public static function getAssetFirstCheckout($assetId) {
|
||||
|
||||
if (!$assetId) {
|
||||
return null;
|
||||
}
|
||||
$first_checkout = Actionlog::where('item_id', $assetId)
|
||||
->where('item_type', Asset::class)
|
||||
->where('action_type', 'checkout')
|
||||
->oldest('created_at')
|
||||
->first();
|
||||
|
||||
return self::getFormattedDateObject($first_checkout?->created_at, 'datetime');
|
||||
}
|
||||
|
||||
|
||||
static public function getRedirectOption($request, $id, $table, $item_id = null) : RedirectResponse
|
||||
@@ -1757,18 +1771,26 @@ class Helper
|
||||
float $baseLabelSize,
|
||||
float $baseFieldSize,
|
||||
float $baseFieldMargin,
|
||||
?string $title = null,
|
||||
float $baseTitleSize = 0.0,
|
||||
float $baseTitleMargin = 0.0,
|
||||
float $baseLabelPadding = 1.5,
|
||||
float $baseGap = 1.5,
|
||||
float $maxScale = 1.8,
|
||||
string $labelFont = 'freesans',
|
||||
|
||||
) : array
|
||||
{
|
||||
$fieldCount = count($fields);
|
||||
$perFieldHeight = max($baseLabelSize, $baseFieldSize) + $baseFieldMargin;
|
||||
$baseHeight = $fieldCount * $perFieldHeight;
|
||||
$baseFieldsHeight = $fieldCount * $perFieldHeight;
|
||||
|
||||
$hasTitle = is_string($title) && trim($title) !== '';
|
||||
$baseTitleHeight = $hasTitle ? ($baseTitleSize + $baseTitleMargin) : 0.0;
|
||||
$baseTotalHeight = $baseTitleHeight + $baseFieldsHeight;
|
||||
$scale = 1.0;
|
||||
if ($baseHeight > 0 && $usableHeight > 0) {
|
||||
$scale = $usableHeight / $baseHeight;
|
||||
if ($baseTotalHeight > 0 && $usableHeight > 0) {
|
||||
$scale = $usableHeight / $baseTotalHeight;
|
||||
}
|
||||
|
||||
$scale = min($scale, $maxScale);
|
||||
@@ -1778,10 +1800,20 @@ class Helper
|
||||
$fieldMargin = $baseFieldMargin * $scale;
|
||||
|
||||
$rowAdvance = max($labelSize, $fieldSize) + $fieldMargin;
|
||||
$titleSize = $hasTitle ? ($baseTitleSize * $scale) : 0.0;
|
||||
$titleMargin = $hasTitle ? ($baseTitleMargin * $scale) : 0.0;
|
||||
$titleAdvance = $hasTitle ? ($titleSize + $titleMargin) : 0.0;
|
||||
|
||||
$pdf->SetFont($labelFont, '', $baseLabelSize);
|
||||
|
||||
$maxLabelWidthPerUnit = 0;
|
||||
foreach ($fields as $field) {
|
||||
$rawLabel = $field['label'] ?? null;
|
||||
|
||||
// If no label, do not include it in label-column sizing
|
||||
if (!is_string($rawLabel) || trim($rawLabel) === '') {
|
||||
continue;
|
||||
}
|
||||
$label = rtrim($field['label'], ':') . ':';
|
||||
$width = $pdf->GetStringWidth($label);
|
||||
$maxLabelWidthPerUnit = max($maxLabelWidthPerUnit, $width / $baseLabelSize);
|
||||
@@ -1796,6 +1828,10 @@ class Helper
|
||||
|
||||
return compact(
|
||||
'scale',
|
||||
'hasTitle',
|
||||
'titleSize',
|
||||
'titleMargin',
|
||||
'titleAdvance',
|
||||
'labelSize',
|
||||
'fieldSize',
|
||||
'fieldMargin',
|
||||
|
||||
@@ -46,6 +46,8 @@ class IconHelper
|
||||
return 'fa-regular fa-envelope';
|
||||
case 'phone':
|
||||
return 'fa-solid fa-phone';
|
||||
case 'fax':
|
||||
return 'fa-solid fa-fax';
|
||||
case 'mobile':
|
||||
return 'fas fa-mobile-screen-button';
|
||||
case 'long-arrow-right':
|
||||
|
||||
@@ -818,7 +818,7 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
if ($request->filled('eol')) {
|
||||
$row[] = ($asset->purchase_date != '') ? $asset->asset_eol_date : '';
|
||||
$row[] = ($asset->asset_eol_date != '') ? $asset->asset_eol_date : '';
|
||||
}
|
||||
|
||||
if ($request->filled('warranty')) {
|
||||
|
||||
@@ -19,6 +19,7 @@ class StoreAccessoryRequest extends ImageUploadRequest
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
parent::prepareForValidation();
|
||||
|
||||
if ($this->category_id) {
|
||||
if ($category = Category::find($this->category_id)) {
|
||||
|
||||
@@ -19,6 +19,7 @@ class StoreConsumableRequest extends ImageUploadRequest
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
parent::prepareForValidation();
|
||||
|
||||
if ($this->category_id) {
|
||||
if ($category = Category::find($this->category_id)) {
|
||||
|
||||
@@ -104,6 +104,7 @@ class AssetsTransformer
|
||||
'next_audit_date' => Helper::getFormattedDateObject($asset->next_audit_date, 'date'),
|
||||
'deleted_at' => Helper::getFormattedDateObject($asset->deleted_at, 'datetime'),
|
||||
'purchase_date' => Helper::getFormattedDateObject($asset->purchase_date, 'date'),
|
||||
'first_checkout' => Helper::getAssetFirstCheckout($asset->id),
|
||||
'age' => $asset->purchase_date ? $asset->purchase_date->locale(app()->getLocale())->diffForHumans() : '',
|
||||
'last_checkout' => Helper::getFormattedDateObject($asset->last_checkout, 'datetime'),
|
||||
'last_checkin' => Helper::getFormattedDateObject($asset->last_checkin, 'datetime'),
|
||||
|
||||
@@ -375,7 +375,7 @@ class Actionlog extends SnipeModel
|
||||
}
|
||||
|
||||
// Show as negative number if the next audit date is before the audit date we're looking at
|
||||
if ($this->created_at > $override_default_next) {
|
||||
if ($this->created_at->toDateString() > $override_default_next->toDateString()) {
|
||||
$next_audit_days = '-'.$next_audit_days;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,17 +96,19 @@ class LabelWriter_11354 extends LabelWriter
|
||||
}
|
||||
|
||||
// Right column
|
||||
if ($record->has('title')) {
|
||||
static::writeText(
|
||||
$pdf, $record->get('title'),
|
||||
$currentX, $currentY,
|
||||
'freesans', 'b', self::TITLE_SIZE, 'L',
|
||||
$usableWidth, self::TITLE_SIZE, true, 0
|
||||
);
|
||||
$currentY += self::TITLE_SIZE + self::TITLE_MARGIN;
|
||||
$title = $record->has('title') ? $record->get('title') : null;
|
||||
$fields = $record->get('fields');
|
||||
$maxFields = $this->getSupportFields();
|
||||
$fields = collect($fields);
|
||||
if ($title) {
|
||||
$maxFields = max(0, $maxFields - 1); // title consumes one row’s worth of space
|
||||
}
|
||||
|
||||
$fields = $record->get('fields');
|
||||
$fields = $fields->take($maxFields)->values();
|
||||
|
||||
$usableHeight = $pa->h
|
||||
- self::TAG_SIZE // bottom tag text
|
||||
- self::BARCODE_MARGIN; // gap between fields and 1D
|
||||
|
||||
$field_layout = Helper::labelFieldLayoutScaling(
|
||||
pdf: $pdf,
|
||||
@@ -117,18 +119,48 @@ class LabelWriter_11354 extends LabelWriter
|
||||
baseLabelSize: self::LABEL_SIZE,
|
||||
baseFieldSize: self::FIELD_SIZE,
|
||||
baseFieldMargin: self::FIELD_MARGIN,
|
||||
title: $title,
|
||||
baseTitleSize: self::TITLE_SIZE,
|
||||
baseTitleMargin: self::TITLE_MARGIN,
|
||||
baseLabelPadding: 1.5,
|
||||
baseGap: 1.5,
|
||||
maxScale: 1.8,
|
||||
labelFont: 'freesans',
|
||||
);
|
||||
|
||||
foreach ($fields as $field) {
|
||||
if ($field_layout['hasTitle']) {
|
||||
static::writeText(
|
||||
$pdf, $field['label'],
|
||||
$pdf, $title,
|
||||
$currentX, $currentY,
|
||||
'freesans', 'b', $field_layout['titleSize'], 'L',
|
||||
$usableWidth, $field_layout['titleSize'], true, 0
|
||||
);
|
||||
$currentY += $field_layout['titleAdvance'];
|
||||
}
|
||||
foreach ($fields as $field) {
|
||||
$rawLabel = $field['label'] ?? null;
|
||||
$value = (string)($field['value'] ?? '');
|
||||
|
||||
// No label: value takes the whole row
|
||||
if (!is_string($rawLabel) || trim($rawLabel) === '') {
|
||||
static::writeText(
|
||||
$pdf, $value,
|
||||
$currentX, $currentY,
|
||||
'freemono', 'B', $field_layout['fieldSize'], 'L',
|
||||
$usableWidth, $field_layout['rowAdvance'], true, 0, 0.01
|
||||
);
|
||||
|
||||
$currentY += $field_layout['rowAdvance'];
|
||||
continue;
|
||||
}
|
||||
|
||||
$labelText = rtrim($field['label'], ':') . ':';
|
||||
|
||||
static::writeText(
|
||||
$pdf, $labelText,
|
||||
$currentX, $currentY,
|
||||
'freesans', '', $field_layout['labelSize'], 'L',
|
||||
$field_layout['labelWidth'], $field_layout['rowAdvance'], true, 0
|
||||
$field_layout['labelWidth'], $field_layout['rowAdvance'], true,
|
||||
);
|
||||
|
||||
static::writeText(
|
||||
@@ -137,7 +169,7 @@ class LabelWriter_11354 extends LabelWriter
|
||||
'freemono', 'B', $field_layout['fieldSize'], 'L',
|
||||
$field_layout['valueWidth'], $field_layout['rowAdvance'], true, 0, 0.01
|
||||
);
|
||||
$currentY += $field_layout['rowAdvance'];
|
||||
$currentY += $field_layout['rowAdvance'];;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,19 +81,18 @@ class LabelWriter_1933081 extends LabelWriter
|
||||
);
|
||||
$currentX += $barcodeSize + self::BARCODE_MARGIN;
|
||||
$usableWidth -= $barcodeSize + self::BARCODE_MARGIN;
|
||||
}
|
||||
|
||||
if ($record->has('title')) {
|
||||
static::writeText(
|
||||
$pdf, $record->get('title'),
|
||||
$currentX, $currentY,
|
||||
'freesans', 'b', self::TITLE_SIZE, 'L',
|
||||
$usableWidth, self::TITLE_SIZE, true, 0
|
||||
);
|
||||
$currentY += self::TITLE_SIZE + self::TITLE_MARGIN;
|
||||
}
|
||||
|
||||
$title = $record->has('title') ? $record->get('title') : null;
|
||||
$fields = $record->get('fields');
|
||||
$maxFields = $this->getSupportFields();
|
||||
$fields = collect($fields);
|
||||
if ($title) {
|
||||
$maxFields = max(0, $maxFields - 1); // title consumes one row’s worth of space
|
||||
}
|
||||
|
||||
$fields = $fields->take($maxFields)->values();
|
||||
|
||||
$usableHeight = $pa->h
|
||||
- self::TAG_SIZE // bottom tag text
|
||||
- self::BARCODE_MARGIN; // gap between fields and 1D
|
||||
@@ -107,20 +106,48 @@ class LabelWriter_1933081 extends LabelWriter
|
||||
baseLabelSize: self::LABEL_SIZE,
|
||||
baseFieldSize: self::FIELD_SIZE,
|
||||
baseFieldMargin: self::FIELD_MARGIN,
|
||||
title: $title,
|
||||
baseTitleSize: self::TITLE_SIZE,
|
||||
baseTitleMargin: self::TITLE_MARGIN,
|
||||
baseLabelPadding: 1.5,
|
||||
baseGap: 1.5,
|
||||
maxScale: 1.8,
|
||||
labelFont: 'freesans',
|
||||
);
|
||||
|
||||
if ($field_layout['hasTitle']) {
|
||||
static::writeText(
|
||||
$pdf, $title,
|
||||
$currentX, $currentY,
|
||||
'freesans', 'b', $field_layout['titleSize'], 'L',
|
||||
$usableWidth, $field_layout['titleSize'], true, 0
|
||||
);
|
||||
$currentY += $field_layout['titleAdvance'];
|
||||
}
|
||||
foreach ($fields as $field) {
|
||||
$rawLabel = $field['label'] ?? null;
|
||||
$value = (string)($field['value'] ?? '');
|
||||
|
||||
// No label: value takes the whole row
|
||||
if (!is_string($rawLabel) || trim($rawLabel) === '') {
|
||||
static::writeText(
|
||||
$pdf, $value,
|
||||
$currentX, $currentY,
|
||||
'freemono', 'B', $field_layout['fieldSize'], 'L',
|
||||
$usableWidth, $field_layout['rowAdvance'], true, 0, 0.01
|
||||
);
|
||||
|
||||
$currentY += $field_layout['rowAdvance'];
|
||||
continue;
|
||||
}
|
||||
|
||||
$labelText = rtrim($field['label'], ':') . ':';
|
||||
|
||||
static::writeText(
|
||||
$pdf, $labelText,
|
||||
$currentX, $currentY,
|
||||
'freesans', '', $field_layout['labelSize'], 'L',
|
||||
$field_layout['labelWidth'], $field_layout['rowAdvance'], true, 0
|
||||
$field_layout['labelWidth'], $field_layout['rowAdvance'], true,
|
||||
);
|
||||
|
||||
static::writeText(
|
||||
@@ -129,7 +156,7 @@ class LabelWriter_1933081 extends LabelWriter
|
||||
'freemono', 'B', $field_layout['fieldSize'], 'L',
|
||||
$field_layout['valueWidth'], $field_layout['rowAdvance'], true, 0, 0.01
|
||||
);
|
||||
$currentY += $field_layout['rowAdvance'];
|
||||
$currentY += $field_layout['rowAdvance'];;
|
||||
}
|
||||
|
||||
if ($record->has('barcode1d')) {
|
||||
|
||||
@@ -83,27 +83,20 @@ class LabelWriter_2112283 extends LabelWriter
|
||||
$usableWidth -= $barcodeSize + self::BARCODE_MARGIN;
|
||||
}
|
||||
|
||||
if ($record->has('title')) {
|
||||
static::writeText(
|
||||
$pdf, $record->get('title'),
|
||||
$currentX, $currentY,
|
||||
'freesans', 'b', self::TITLE_SIZE, 'L',
|
||||
$usableWidth, self::TITLE_SIZE, true, 0
|
||||
);
|
||||
$currentY += self::TITLE_SIZE + self::TITLE_MARGIN;
|
||||
$title = $record->has('title') ? $record->get('title') : null;
|
||||
$fields = $record->get('fields');
|
||||
$maxFields = $this->getSupportFields();
|
||||
$fields = collect($fields);
|
||||
if ($title) {
|
||||
$maxFields = max(0, $maxFields - 1); // title consumes one row’s worth of space
|
||||
}
|
||||
|
||||
$fields = $record->get('fields');
|
||||
// Below rescales the size of the field box to fit, it feels like it could/should be abstracted one class above
|
||||
// to be usable on other labels but im unsure of how to implement that, since it uses a lot of private
|
||||
// constants.
|
||||
|
||||
// Figure out how tall the label fields wants to be
|
||||
$fieldCount = count($fields);
|
||||
$fields = $fields->take($maxFields)->values();
|
||||
|
||||
$usableHeight = $pa->h
|
||||
- self::TAG_SIZE // bottom tag text
|
||||
- self::BARCODE_MARGIN; // gap between fields and 1D
|
||||
|
||||
$field_layout = Helper::labelFieldLayoutScaling(
|
||||
pdf: $pdf,
|
||||
fields: $fields,
|
||||
@@ -113,20 +106,48 @@ class LabelWriter_2112283 extends LabelWriter
|
||||
baseLabelSize: self::LABEL_SIZE,
|
||||
baseFieldSize: self::FIELD_SIZE,
|
||||
baseFieldMargin: self::FIELD_MARGIN,
|
||||
title: $title,
|
||||
baseTitleSize: self::TITLE_SIZE,
|
||||
baseTitleMargin: self::TITLE_MARGIN,
|
||||
baseLabelPadding: 1.5,
|
||||
baseGap: 1.5,
|
||||
maxScale: 1.8,
|
||||
labelFont: 'freesans',
|
||||
);
|
||||
|
||||
if ($field_layout['hasTitle']) {
|
||||
static::writeText(
|
||||
$pdf, $title,
|
||||
$currentX, $currentY,
|
||||
'freesans', 'b', $field_layout['titleSize'], 'L',
|
||||
$usableWidth, $field_layout['titleSize'], true, 0
|
||||
);
|
||||
$currentY += $field_layout['titleAdvance'];
|
||||
}
|
||||
foreach ($fields as $field) {
|
||||
$rawLabel = $field['label'] ?? null;
|
||||
$value = (string)($field['value'] ?? '');
|
||||
|
||||
// No label: value takes the whole row
|
||||
if (!is_string($rawLabel) || trim($rawLabel) === '') {
|
||||
static::writeText(
|
||||
$pdf, $value,
|
||||
$currentX, $currentY,
|
||||
'freemono', 'B', $field_layout['fieldSize'], 'L',
|
||||
$usableWidth, $field_layout['rowAdvance'], true, 0, 0.01
|
||||
);
|
||||
|
||||
$currentY += $field_layout['rowAdvance'];
|
||||
continue;
|
||||
}
|
||||
|
||||
$labelText = rtrim($field['label'], ':') . ':';
|
||||
|
||||
static::writeText(
|
||||
$pdf, $labelText,
|
||||
$currentX, $currentY,
|
||||
'freesans', '', $field_layout['labelSize'], 'L',
|
||||
$field_layout['labelWidth'], $field_layout['rowAdvance'], true, 0
|
||||
$field_layout['labelWidth'], $field_layout['rowAdvance'], true,
|
||||
);
|
||||
|
||||
static::writeText(
|
||||
@@ -135,7 +156,7 @@ class LabelWriter_2112283 extends LabelWriter
|
||||
'freemono', 'B', $field_layout['fieldSize'], 'L',
|
||||
$field_layout['valueWidth'], $field_layout['rowAdvance'], true, 0, 0.01
|
||||
);
|
||||
$currentY += $field_layout['rowAdvance'];
|
||||
$currentY += $field_layout['rowAdvance'];;
|
||||
}
|
||||
if ($record->has('barcode1d')) {
|
||||
static::write1DBarcode(
|
||||
|
||||
@@ -151,6 +151,13 @@ class AssetPresenter extends Presenter
|
||||
'visible' => false,
|
||||
'title' => trans('general.purchase_date'),
|
||||
'formatter' => 'dateDisplayFormatter',
|
||||
], [
|
||||
'field' => 'first_checkout',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'visible' => false,
|
||||
'title' => trans('general.first_checkout'),
|
||||
'formatter' => 'dateDisplayFormatter',
|
||||
], [
|
||||
'field' => 'age',
|
||||
'searchable' => false,
|
||||
|
||||
@@ -387,7 +387,7 @@ return [
|
||||
'label2_template' => 'Template',
|
||||
'label2_template_help' => 'Select which template to use for label generation',
|
||||
'label2_title' => 'Title',
|
||||
'label2_title_help' => 'The title to show on labels that support it',
|
||||
'label2_title_help' => 'The title to show on labels that support it. <br>This will occupy the first Label Field row.',
|
||||
'label2_title_help_phold' => 'The placeholder <code>{COMPANY}</code> will be replaced with the asset's company name',
|
||||
'label2_asset_logo' => 'Use Asset Logo',
|
||||
'label2_asset_logo_help' => 'Use the logo of the asset's assigned company, rather than the value at <code>:setting_name</code>',
|
||||
|
||||
@@ -138,13 +138,13 @@ return [
|
||||
'exclude_archived' => 'Exclude Archived Assets',
|
||||
'exclude_deleted' => 'Exclude Deleted Assets',
|
||||
'example' => 'Example: ',
|
||||
|
||||
'files' => 'Files',
|
||||
'file_name' => 'File Name',
|
||||
'file_type' => 'File Type',
|
||||
'filesize' => 'File Size',
|
||||
'file_uploads' => 'File Uploads',
|
||||
'file_upload' => 'File Upload',
|
||||
'first_checkout' => '1<sup>st</sup> Checkout',
|
||||
'generate' => 'Generate',
|
||||
'generate_labels' => 'Generate Labels',
|
||||
'github_markdown' => 'This field accepts <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>.',
|
||||
|
||||
4
resources/views/blade/box-body.blade.php
Normal file
4
resources/views/blade/box-body.blade.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<!-- Start box-body component -->
|
||||
<div class="box-body">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
23
resources/views/blade/box-footer.blade.php
Normal file
23
resources/views/blade/box-footer.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
@props([
|
||||
'cancel_route' => null,
|
||||
])
|
||||
|
||||
<!-- Start box footer component -->
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<a class="btn btn-link" href="{{ $cancel_route }}">
|
||||
{{ trans('general.cancel') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9 text-right">
|
||||
<x-input.button class="btn-success" id="submit_button">
|
||||
<x-icon type="checkmark" class="icon-white" />
|
||||
{{ trans('general.save') }}
|
||||
</x-input.button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
6
resources/views/blade/box-header.blade.php
Normal file
6
resources/views/blade/box-header.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<!-- Start box-header component -->
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">
|
||||
{{ $slot }}
|
||||
</h2>
|
||||
</div>
|
||||
26
resources/views/blade/box.blade.php
Normal file
26
resources/views/blade/box.blade.php
Normal file
@@ -0,0 +1,26 @@
|
||||
@props([
|
||||
'box_style' => 'default',
|
||||
'header' => false,
|
||||
'footer' => false,
|
||||
|
||||
])
|
||||
|
||||
<!-- Start box component -->
|
||||
<div class="box box-{{ $box_style }}">
|
||||
|
||||
@if ($header)
|
||||
<x-box-header>
|
||||
{{ $header }}
|
||||
</x-box-header>
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
@if ($footer)
|
||||
<x-box-footer>
|
||||
{{ $footer }}
|
||||
</x-box-footer>
|
||||
@endif
|
||||
</div>
|
||||
21
resources/views/blade/container.blade.php
Normal file
21
resources/views/blade/container.blade.php
Normal file
@@ -0,0 +1,21 @@
|
||||
@props([
|
||||
'class' => 'col-md-12',
|
||||
'columns' => 1,
|
||||
])
|
||||
|
||||
<!-- Start container+row component -->
|
||||
<div {{ $attributes->merge(['class' => 'row']) }}>
|
||||
|
||||
<!-- Only one column, so set the general col-md-12 div -->
|
||||
@if ($columns == 1)
|
||||
<x-page-column class="{{ $class }}">
|
||||
{{ $slot }}
|
||||
</x-page-column>
|
||||
|
||||
@else
|
||||
<!-- the page using this should specify column names via the page-column component -->
|
||||
{{ $slot }}
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
7
resources/views/blade/input/button.blade.php
Normal file
7
resources/views/blade/input/button.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
@props([
|
||||
'id' => null,
|
||||
])
|
||||
|
||||
<button type="submit" {{ $attributes->merge(['class' => 'btn']) }} {{ $attributes->merge(['id' => 'submit_button']) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
8
resources/views/blade/page-column.blade.php
Normal file
8
resources/views/blade/page-column.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
@props([
|
||||
'class' => 'col-md-12',
|
||||
])
|
||||
|
||||
<!-- Start column component -->
|
||||
<div class="{{ $class }}">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
@@ -8,11 +8,8 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<x-tables.bulk-actions
|
||||
id_divname='categoriesBulkEditToolbar'
|
||||
@@ -46,10 +43,8 @@
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -8,35 +8,36 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\CompanyPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="companiesTable"
|
||||
data-id-table="companiesTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
data-advanced-search="false"
|
||||
id="companiesTable"
|
||||
data-buttons="companyButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.companies.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-companies-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h2>{{ trans('admin/companies/general.about_companies') }}</h2>
|
||||
<p>{{ trans('admin/companies/general.about_companies_description') }}</p>
|
||||
</div>
|
||||
<x-container columns="2">
|
||||
|
||||
<x-page-column class="col-md-9">
|
||||
<x-box>
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\CompanyPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="companiesTable"
|
||||
data-id-table="companiesTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
data-advanced-search="false"
|
||||
id="companiesTable"
|
||||
data-buttons="companyButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.companies.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-companies-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</x-box>
|
||||
</x-page-column>
|
||||
|
||||
|
||||
<!-- side address column -->
|
||||
<x-page-column class="col-md-3">
|
||||
<h2>{{ trans('admin/companies/general.about_companies') }}</h2>
|
||||
<p>{{ trans('admin/companies/general.about_companies_description') }}</p>
|
||||
</x-page-column>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<x-container>
|
||||
<x-box>
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
|
||||
@@ -22,7 +21,6 @@
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }}
|
||||
{!! ($company->assets()->AssetsForShow()->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($company->assets()->AssetsForShow()->count()).'</span>' : '' !!}
|
||||
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -207,8 +205,8 @@
|
||||
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -8,12 +8,9 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\ConsumablePresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="consumablesTable"
|
||||
@@ -34,11 +31,8 @@
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
</div> <!-- /.col-md-12 -->
|
||||
</div> <!-- /.row -->
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -8,31 +8,28 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\DepartmentPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="departmentsTable"
|
||||
data-id-table="departmentsTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
id="departmentsTable"
|
||||
data-advanced-search="false"
|
||||
data-buttons="departmentButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.departments.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-departments-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\DepartmentPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="departmentsTable"
|
||||
data-id-table="departmentsTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
id="departmentsTable"
|
||||
data-advanced-search="false"
|
||||
data-buttons="departmentButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.departments.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-departments-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</x-box>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -9,40 +9,33 @@
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('departments.edit', ['department' => $department->id]) }}" class="btn btn-sm btn-theme pull-right">{{ trans('admin/departments/table.update') }} </a>
|
||||
<a href="{{ route('departments.edit', ['department' => $department->id]) }}" class="btn btn-sm btn-theme pull-right">{{ trans('general.update') }} </a>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\UserPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="departmentsUsersTable"
|
||||
data-id-table="departmentsUsersTable"
|
||||
data-show-footer="true"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
id="departmentsUsersTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.users.index',['department_id'=> $department->id]) }}"
|
||||
data-export-options='{
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\UserPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="departmentsUsersTable"
|
||||
data-id-table="departmentsUsersTable"
|
||||
data-show-footer="true"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
id="departmentsUsersTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.users.index',['department_id'=> $department->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-departments-{{ str_slug($department->name) }}-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -8,12 +8,11 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<x-container>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table
|
||||
<x-page-column>
|
||||
<x-box>
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\DepreciationPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="depreciationsTable"
|
||||
data-id-table="depreciationsTable"
|
||||
@@ -28,19 +27,12 @@
|
||||
"fileName": "export-depreciations-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.col-md-9-->
|
||||
</table>
|
||||
|
||||
</x-box>
|
||||
</x-page-column>
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h2>{{ trans('admin/depreciations/general.about_asset_depreciations') }}</h2>
|
||||
<p>{{ trans('admin/depreciations/general.about_depreciations') }} </p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -8,16 +8,13 @@
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('groups.create') }}" class="btn btn-primary text-right"> {{ trans('general.create') }}</a>
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-default text-right">{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Content --}}
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<x-container>
|
||||
<x-box>
|
||||
<table
|
||||
data-cookie-id-table="groupsTable"
|
||||
data-side-pagination="server"
|
||||
@@ -47,10 +44,8 @@
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div> <!--.box-body-->
|
||||
</div> <!-- /.box.box-default-->
|
||||
</div> <!-- .col-md-12-->
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'groups-export', 'search' => true])
|
||||
|
||||
@@ -8,20 +8,15 @@
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('groups.edit', ['group' => $group->id]) }}" class="btn btn-primary text-right">{{ trans('admin/groups/titles.update') }} </a>
|
||||
<a href="{{ route('groups.index') }}" class="btn btn-default pull-right">{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<x-container columns="2">
|
||||
<x-page-column class="col-md-9">
|
||||
<x-box>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<table
|
||||
@@ -36,13 +31,11 @@
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</x-box>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</x-page-column>
|
||||
|
||||
<x-page-column class="col-md-3">
|
||||
|
||||
@if (is_array($group->decodePermissions()))
|
||||
<ul class="list-unstyled">
|
||||
@@ -55,8 +48,8 @@
|
||||
<p>{{ trans('admin/groups/titles.no_permissions') }}</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</x-page-column>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -53,16 +53,8 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
@include('partials.asset-bulk-actions', ['status' => $requestStatus])
|
||||
|
||||
@@ -93,13 +85,8 @@
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
</div><!-- ./box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -1105,6 +1105,18 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<strong>
|
||||
{!! trans('general.first_checkout') !!}
|
||||
</strong>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Helper::getAssetFirstCheckout($asset->id)['formatted'] ?? '' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($asset->last_checkin!='')
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
|
||||
@@ -195,6 +195,7 @@
|
||||
input[type="url"],
|
||||
input[type="email"],
|
||||
input[type="password"],
|
||||
input[type="tel"],
|
||||
option:active,
|
||||
option[active],
|
||||
option[selected],
|
||||
|
||||
@@ -9,12 +9,8 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\LicensePresenter::dataTableLayout() }}"
|
||||
@@ -34,13 +30,8 @@
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
<div class="box-footer clearfix">
|
||||
</div>
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -6,38 +6,34 @@
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
@include('partials.locations-bulk-actions')
|
||||
<x-container>
|
||||
<x-box>
|
||||
@include('partials.locations-bulk-actions')
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\LocationPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="locationTable"
|
||||
data-id-table="locationTable"
|
||||
data-toolbar="#locationsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkLocationsEditButton"
|
||||
data-bulk-form-id="#locationsBulkForm"
|
||||
data-side-pagination="server"
|
||||
data-advanced-search="false"
|
||||
data-sort-order="asc"
|
||||
data-buttons="locationButtons"
|
||||
id="locationTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.locations.index', ['company_id'=>e(request('company_id')), 'status' => e(request('status'))]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\LocationPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="locationTable"
|
||||
data-id-table="locationTable"
|
||||
data-toolbar="#locationsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkLocationsEditButton"
|
||||
data-bulk-form-id="#locationsBulkForm"
|
||||
data-side-pagination="server"
|
||||
data-advanced-search="false"
|
||||
data-sort-order="asc"
|
||||
data-buttons="locationButtons"
|
||||
id="locationTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.locations.index', ['company_id'=>e(request('company_id')), 'status' => e(request('status'))]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -9,33 +9,27 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\MaintenancesPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="maintenancesTable"
|
||||
data-side-pagination="server"
|
||||
data-show-footer="true"
|
||||
data-advanced-search="false"
|
||||
id="maintenancesTable"
|
||||
data-buttons="maintenanceButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.maintenances.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-maintenances-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\MaintenancesPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="maintenancesTable"
|
||||
data-side-pagination="server"
|
||||
data-show-footer="true"
|
||||
data-advanced-search="false"
|
||||
id="maintenancesTable"
|
||||
data-buttons="maintenanceButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.maintenances.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-maintenances-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -8,67 +8,61 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if ($manufacturer_count == 0)
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<form action="{{ route('manufacturers.seed') }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<div class="callout callout-info">
|
||||
<p>
|
||||
{{ trans('general.seeding.manufacturers.prompt') }}
|
||||
<button class="btn btn-sm btn-theme hidden-print" rel="noopener">
|
||||
{{ trans('general.seeding.manufacturers.button') }}
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@if ($manufacturer_count == 0)
|
||||
@else
|
||||
<x-tables.bulk-actions
|
||||
id_divname='manufacturersBulkEditToolbar'
|
||||
action_route="{{route('manufacturers.bulk.delete')}}"
|
||||
id_formname="manufacturersBulkForm"
|
||||
id_button="bulkManufacturerEditButton"
|
||||
model_name="manufacturer"
|
||||
>
|
||||
@can('delete', App\Models\Manufacturer::class)
|
||||
<option>{{trans('general.delete')}}</option>
|
||||
@endcan
|
||||
</x-tables.bulk-actions>
|
||||
|
||||
<form action="{{ route('manufacturers.seed') }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<div class="callout callout-info">
|
||||
<p>
|
||||
{{ trans('general.seeding.manufacturers.prompt') }}
|
||||
<button class="btn btn-sm btn-theme hidden-print" rel="noopener">
|
||||
{{ trans('general.seeding.manufacturers.button') }}
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\ManufacturerPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="manufacturersTable"
|
||||
data-id-table="manufacturersTable"
|
||||
data-advanced-search="false"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
id="manufacturersTable"
|
||||
{{-- begin stuff for bulk dropdown --}}
|
||||
data-toolbar="#manufacturersBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkManufacturerEditButton"
|
||||
data-bulk-form-id="#manufacturersBulkForm"
|
||||
{{-- end stuff for bulk dropdown --}}
|
||||
data-buttons="manufacturerButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.manufacturers.index', ['status' => e(request()->input('status')) ]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-manufacturers-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
@else
|
||||
<x-tables.bulk-actions
|
||||
id_divname='manufacturersBulkEditToolbar'
|
||||
action_route="{{route('manufacturers.bulk.delete')}}"
|
||||
id_formname="manufacturersBulkForm"
|
||||
id_button="bulkManufacturerEditButton"
|
||||
model_name="manufacturer"
|
||||
>
|
||||
@can('delete', App\Models\Manufacturer::class)
|
||||
<option>{{trans('general.delete')}}</option>
|
||||
@endcan
|
||||
</x-tables.bulk-actions>
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\ManufacturerPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="manufacturersTable"
|
||||
data-id-table="manufacturersTable"
|
||||
data-advanced-search="false"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
id="manufacturersTable"
|
||||
{{-- begin stuff for bulk dropdown --}}
|
||||
data-toolbar="#manufacturersBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkManufacturerEditButton"
|
||||
data-bulk-form-id="#manufacturersBulkForm"
|
||||
{{-- end stuff for bulk dropdown --}}
|
||||
data-buttons="manufacturerButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.manufacturers.index', ['status' => e(request()->input('status')) ]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-manufacturers-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
@endif
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -15,37 +15,32 @@
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
@include('partials.models-bulk-actions')
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AssetModelPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="asssetModelsTable"
|
||||
data-id-table="asssetModelsTable"
|
||||
data-show-footer="true"
|
||||
data-side-pagination="server"
|
||||
data-footer-style="footerStyle"
|
||||
data-toolbar="#modelsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkModelsEditButton"
|
||||
data-bulk-form-id="#modelsBulkForm"
|
||||
data-sort-order="asc"
|
||||
id="asssetModelsTable"
|
||||
data-buttons="modelButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.models.index', ['status' => e(request('status'))]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-models-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
@include('partials.models-bulk-actions')
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AssetModelPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="asssetModelsTable"
|
||||
data-id-table="asssetModelsTable"
|
||||
data-show-footer="true"
|
||||
data-side-pagination="server"
|
||||
data-footer-style="footerStyle"
|
||||
data-toolbar="#modelsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkModelsEditButton"
|
||||
data-bulk-form-id="#modelsBulkForm"
|
||||
data-sort-order="asc"
|
||||
id="asssetModelsTable"
|
||||
data-buttons="modelButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.models.index', ['status' => e(request('status'))]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-models-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</x-box>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -18,11 +18,8 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\HistoryPresenter::dataTableLayout($serial = true) }}"
|
||||
@@ -40,10 +37,8 @@
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
@@ -8,10 +8,8 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<x-container>
|
||||
<x-box>
|
||||
<table
|
||||
data-cookie-id-table="maintenancesReport"
|
||||
data-show-footer="true"
|
||||
@@ -47,10 +45,8 @@
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -7,38 +7,31 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<x-container>
|
||||
<x-box>
|
||||
@include('partials.asset-bulk-actions')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
@include('partials.asset-bulk-actions')
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="assetsListingTable"
|
||||
data-id-table="assetsListingTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
data-toolbar="#assetsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkAssetEditButton"
|
||||
data-bulk-form-id="#assetsBulkForm"
|
||||
id="assetsListingTable"
|
||||
data-show-columns-search="true"
|
||||
data-buttons="assetButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.assets.index', ['status_id' => $statuslabel->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-assets-{{ str_slug($statuslabel->name) }}-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- ./box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="assetsListingTable"
|
||||
data-id-table="assetsListingTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
data-toolbar="#assetsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkAssetEditButton"
|
||||
data-bulk-form-id="#assetsBulkForm"
|
||||
id="assetsListingTable"
|
||||
data-show-columns-search="true"
|
||||
data-buttons="assetButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.assets.index', ['status_id' => $statuslabel->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-assets-{{ str_slug($statuslabel->name) }}-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -8,15 +8,8 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<x-tables.bulk-actions
|
||||
id_divname='suppliersBulkEditToolbar'
|
||||
@@ -25,10 +18,11 @@
|
||||
id_button="bulkSupplierEditButton"
|
||||
model_name="supplier"
|
||||
>
|
||||
@can('delete', App\Models\Supplier::class)
|
||||
<option>Delete</option>
|
||||
@endcan
|
||||
@can('delete', App\Models\Supplier::class)
|
||||
<option>Delete</option>
|
||||
@endcan
|
||||
</x-tables.bulk-actions>
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\SupplierPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="suppliersTable"
|
||||
@@ -50,12 +44,8 @@
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -27,11 +27,8 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
@include('partials.users-bulk-actions')
|
||||
|
||||
@@ -62,10 +59,8 @@
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
Reference in New Issue
Block a user