mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Merge branch 'develop'
This commit is contained in:
commit
af69f7636b
|
@ -20,9 +20,9 @@ class CategoriesController extends Controller
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$this->authorize('view', Category::class);
|
$this->authorize('view', Category::class);
|
||||||
$allowed_columns = ['id', 'name','category_type','use_default_eula','require_acceptance','checkin_email'];
|
$allowed_columns = ['id', 'name','category_type','use_default_eula','eula_text', 'require_acceptance','checkin_email'];
|
||||||
|
|
||||||
$categories = Category::select(['id', 'created_at', 'updated_at', 'name','category_type','use_default_eula','require_acceptance','checkin_email'])
|
$categories = Category::select(['id', 'created_at', 'updated_at', 'name','category_type','use_default_eula','eula_text', 'require_acceptance','checkin_email'])
|
||||||
->withCount('assets', 'accessories', 'consumables', 'components');
|
->withCount('assets', 'accessories', 'consumables', 'components');
|
||||||
|
|
||||||
if ($request->has('search')) {
|
if ($request->has('search')) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ class CategoriesTransformer
|
||||||
'id' => (int) $category->id,
|
'id' => (int) $category->id,
|
||||||
'name' => e($category->name),
|
'name' => e($category->name),
|
||||||
'type' => e($category->category_type),
|
'type' => e($category->category_type),
|
||||||
'use_default_eula' => ($category->use_default_eula =='1') ? true : false,
|
'eula' => ($category->getEula()) ? true : false,
|
||||||
'checkin_email' => ($category->checkin_email =='1') ? true : false,
|
'checkin_email' => ($category->checkin_email =='1') ? true : false,
|
||||||
'require_acceptance' => ($category->require_acceptance =='1') ? true : false,
|
'require_acceptance' => ($category->require_acceptance =='1') ? true : false,
|
||||||
'assets_count' => $category->assets_count,
|
'assets_count' => $category->assets_count,
|
||||||
|
|
|
@ -62,7 +62,9 @@ class CustomField extends Model
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$platform = Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform();
|
||||||
|
$platform->registerDoctrineTypeMapping('enum', 'string');
|
||||||
|
|
||||||
Schema::table(CustomField::$table_name, function ($table) use ($custom_field) {
|
Schema::table(CustomField::$table_name, function ($table) use ($custom_field) {
|
||||||
$table->renameColumn($custom_field->convertUnicodeDbSlug($custom_field->getOriginal("name")), $custom_field->convertUnicodeDbSlug());
|
$table->renameColumn($custom_field->convertUnicodeDbSlug($custom_field->getOriginal("name")), $custom_field->convertUnicodeDbSlug());
|
||||||
});
|
});
|
||||||
|
|
|
@ -45,13 +45,12 @@ class CheckoutNotification extends Notification
|
||||||
$item = $this->params['item'];
|
$item = $this->params['item'];
|
||||||
|
|
||||||
if (class_basename(get_class($this->params['item']))=='Asset') {
|
if (class_basename(get_class($this->params['item']))=='Asset') {
|
||||||
$notifyBy[] = 'mail';
|
if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance() == '1'))
|
||||||
|
|| (method_exists($item, 'getEula') && ($item->getEula()))
|
||||||
|
) {
|
||||||
|
$notifyBy[] = 'mail';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance()=='1'))
|
|
||||||
// || (method_exists($item, 'getEula') && ($item->getEula()))
|
|
||||||
// ) {
|
|
||||||
// $notifyBy[] = 'mail';
|
|
||||||
// }
|
|
||||||
return $notifyBy;
|
return $notifyBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,20 +63,21 @@ class CategoryPresenter extends Presenter
|
||||||
"title" => trans('general.components'),
|
"title" => trans('general.components'),
|
||||||
"visible" => true
|
"visible" => true
|
||||||
], [
|
], [
|
||||||
"field" => "use_default_eula",
|
"field" => "eula",
|
||||||
"searchable" => false,
|
"searchable" => false,
|
||||||
"sortable" => false,
|
"sortable" => false,
|
||||||
"title" => trans('admin/categories/table.eula_text'),
|
"title" => trans('admin/categories/table.eula_text'),
|
||||||
"visible" => false,
|
"visible" => false,
|
||||||
"formatter" => 'trueFalseFormatter',
|
"formatter" => 'trueFalseFormatter',
|
||||||
], [
|
], [
|
||||||
"field" => "require_acceptance",
|
"field" => "require_acceptance",
|
||||||
"searchable" => false,
|
"searchable" => false,
|
||||||
"sortable" => false,
|
"sortable" => false,
|
||||||
"title" => trans('admin/categories/table.require_acceptance'),
|
"title" => trans('admin/categories/table.require_acceptance'),
|
||||||
"visible" => true,
|
"visible" => true,
|
||||||
"formatter" => 'trueFalseFormatter',
|
"formatter" => 'trueFalseFormatter',
|
||||||
], [
|
],
|
||||||
|
[
|
||||||
"field" => "actions",
|
"field" => "actions",
|
||||||
"searchable" => false,
|
"searchable" => false,
|
||||||
"sortable" => false,
|
"sortable" => false,
|
||||||
|
|
|
@ -55,9 +55,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- .BOX-BODY-->
|
</div> <!-- .BOX-BODY-->
|
||||||
<div class="box-footer text-right">
|
<div class="box-footer">
|
||||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
<a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
||||||
</div>
|
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
|
||||||
|
</div>
|
||||||
</div> <!-- .box-default-->
|
</div> <!-- .box-default-->
|
||||||
</form>
|
</form>
|
||||||
</div> <!-- .col-md-9-->
|
</div> <!-- .col-md-9-->
|
||||||
|
|
|
@ -63,9 +63,10 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div> <!-- .box-body -->
|
</div> <!-- .box-body -->
|
||||||
<div class="box-footer text-right">
|
<div class="box-footer">
|
||||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
<a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
||||||
</div>
|
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -91,16 +91,14 @@
|
||||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-success pull-right"><i
|
<div class="box-footer">
|
||||||
class="fa fa-check icon-white"></i> {{ trans('general.checkin') }}</button>
|
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
||||||
</form>
|
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div> <!--/.col-md-12-->
|
</div> <!--/.col-md-12-->
|
||||||
</div> <!--/.box-body-->
|
</div> <!--/.box-body-->
|
||||||
<div class="box-footer">
|
|
||||||
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
|
||||||
</div>
|
|
||||||
</div> <!--/.box.box-default-->
|
</div> <!--/.box.box-default-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue