Skip to content

A free open source IT asset/license management system

fix actions check to update, remove duplicate translation, add is_default to protected cast

Godfrey M80207fa18e59
diff --git a/app/Models/Labels/CustomUserLabel.php b/app/Models/Labels/CustomUserLabel.php
index cb0815f7a9..810f67ed7d 100644
--- a/app/Models/Labels/CustomUserLabel.php
+++ b/app/Models/Labels/CustomUserLabel.php
@@ -26,6 +26,7 @@ class CustomUserLabel extends Model
protected $casts = [
'overrides' => 'array',
'config_snapshot' => 'array',
+ 'is_default' => 'boolean',
];
/**
diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php
index e0fdd56f90..79718d8050 100644
--- a/resources/lang/en-US/general.php
+++ b/resources/lang/en-US/general.php
@@ -396,7 +396,6 @@ return [
'sure_to_delete_var' => 'Are you sure you wish to delete :item?',
'delete_what' => 'Delete :item',
'submit' => 'Submit',
- 'text' => 'Text',
'target' => 'Target',
'time_and_date_display' => 'Time and Date Display',
'total_assets' => 'total assets',
diff --git a/resources/views/livewire/labels/import-label.blade.php b/resources/views/livewire/labels/import-label.blade.php
index 0d2280dee7..c58b1e654f 100644
--- a/resources/views/livewire/labels/import-label.blade.php
+++ b/resources/views/livewire/labels/import-label.blade.php
@@ -40,7 +40,7 @@
class="btn {{ $importMethod === 'text' ? 'btn-primary active' : 'btn-default' }}"
wire:click="setImportMethod('text')"
>
- {{ trans('general.text') }}
+ {{ trans('admin/settings/general.text') }}
</button>
</div>
</div>
diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php
index f0d0fd2e69..34e34d6268 100644
--- a/resources/views/partials/bootstrap-table.blade.php
+++ b/resources/views/partials/bootstrap-table.blade.php
@@ -2636,7 +2636,7 @@
}) + '&nbsp;';
}
- if ((row.available_actions) && (row.available_actions.delete === true)) {
+ 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 hidden-print" data-tooltip="true" title="{{ trans('general.update') }}"><x-icon type="edit" class="fa-fw" /><span class="sr-only">{{ trans('general.update') }}</span></a>&nbsp;';
// use the asset tag if no name is provided