A free open source IT asset/license management system
fixes the statuslabeltypeforatter instead of the model
Godfrey M6b94ef6adc5c
diff --git a/app/Models/Statuslabel.php b/app/Models/Statuslabel.phpindex 66f22ada9c..0f8a0b6075 100755--- a/app/Models/Statuslabel.php+++ b/app/Models/Statuslabel.php@@ -74,14 +74,14 @@ class Statuslabel extends SnipeModelpublic function getStatuslabelType(){if (($this->pending == '1') && ($this->archived == '0') && ($this->deployable == '0')) {- return trans('admin/statuslabels/table.pending');+ return 'pending';} elseif (($this->pending == '0') && ($this->archived == '1') && ($this->deployable == '0')) {- return trans('admin/statuslabels/table.archived');+ return 'archived';} elseif (($this->pending == '0') && ($this->archived == '0') && ($this->deployable == '0')) {- return trans('admin/statuslabels/table.undeployable');+ return 'undeployable';}- return trans('admin/statuslabels/table.deployable');+ return 'deployable';}/**diff --git a/package-lock.json b/package-lock.jsonindex 649581f940..234e74450c 100644--- a/package-lock.json+++ b/package-lock.json@@ -17392,7 +17392,7 @@"performance-now": {"version": "2.1.0","resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",- "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=","optional": true},"picocolors": {@@ -18500,7 +18500,7 @@"rgbcolor": {"version": "1.0.1","resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz",- "integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==",+ "integrity": "sha1-1lBezbMEplldom+ktDMHMGd1lF0=","optional": true},"rimraf": {diff --git a/resources/views/statuslabels/index.blade.php b/resources/views/statuslabels/index.blade.phpindex 1f24d32d9a..21ba2d7947 100755--- a/resources/views/statuslabels/index.blade.php+++ b/resources/views/statuslabels/index.blade.php@@ -111,25 +111,39 @@}function statusLabelTypeFormatter (row, value) {+switch (value.type) {case 'deployed':text_color = 'blue';icon_style = 'fa-circle';+ trans = '{{ strtolower(trans('general.deployed')) }}';break;case 'deployable':text_color = 'green';icon_style = 'fa-circle';+ trans = '{{ strtolower(trans('admin/hardware/general.deployable')) }}';+break;case 'pending':text_color = 'orange';icon_style = 'fa-circle';+ trans = '{{ strtolower(trans('general.deployed')) }}';++ break;+ case 'undeployable':+ text_color = 'orange';+ icon_style = 'fa-circle';+ trans ='{{ trans('admin/statuslabels/table.undeployable') }}';+break;default:text_color = 'red';icon_style = 'fa-times';+ trans = '{{ strtolower(trans('general.archived')) }}';+}- var typename_lower = value.type;+ var typename_lower = trans;var typename = typename_lower.charAt(0).toUpperCase() + typename_lower.slice(1);return '<i class="fa ' + icon_style + ' text-' + text_color + '"></i> ' + typename;