@@ -18,33 +18,3 @@ |
||
18 | 18 | public function toArray($request) |
19 | 19 | { |
20 | 20 | $typeBadge = sprintf(<<<'html' |
21 | - <span class="badge badge-%s"> |
|
22 | - <i class="fa fa-%s"></i> %s |
|
23 | - </span> |
|
24 | - html, |
|
25 | - $this->resource->type->isCoin() ? 'danger' : 'success', |
|
26 | - $this->resource->type->isCoin() ? 'coins' : 'money-bill', |
|
27 | - $this->resource->type->label |
|
28 | - ); |
|
29 | - |
|
30 | - return [ |
|
31 | - 'checkbox' => view('components.datatables.checkbox', [ |
|
32 | - 'value' => $this->resource->getKey(), |
|
33 | - ])->render(), |
|
34 | - 'name' => $this->resource->name, |
|
35 | - 'value' => $this->resource->value, |
|
36 | - 'type' => $typeBadge, |
|
37 | - 'quantity_per_bundle' => $this->resource->quantity_per_bundle, |
|
38 | - 'action' => view('components.datatables.button-group', [ |
|
39 | - 'elements' => [ |
|
40 | - view('components.datatables.link-show', [ |
|
41 | - 'url' => route('admin.denomination.edit', $this->resource), |
|
42 | - ])->render(), |
|
43 | - view('components.datatables.link-destroy', [ |
|
44 | - 'url' => route('admin.denomination.destroy', $this->resource), |
|
45 | - ])->render(), |
|
46 | - ], |
|
47 | - ])->render(), |
|
48 | - ]; |
|
49 | - } |
|
50 | -} |
@@ -18,33 +18,3 @@ |
||
18 | 18 | public function toArray($request) |
19 | 19 | { |
20 | 20 | $typeBadge = sprintf(<<<'html' |
21 | - <span class="badge badge-%s"> |
|
22 | - <i class="fa fa-%s"></i> %s |
|
23 | - </span> |
|
24 | - html, |
|
25 | - $this->resource->type->isCoin() ? 'danger' : 'success', |
|
26 | - $this->resource->type->isCoin() ? 'coins' : 'money-bill', |
|
27 | - $this->resource->type->label |
|
28 | - ); |
|
29 | - |
|
30 | - return [ |
|
31 | - 'checkbox' => view('components.datatables.checkbox', [ |
|
32 | - 'value' => $this->resource->getKey(), |
|
33 | - ])->render(), |
|
34 | - 'name' => $this->resource->name, |
|
35 | - 'value' => $this->resource->value, |
|
36 | - 'type' => $typeBadge, |
|
37 | - 'quantity_per_bundle' => $this->resource->quantity_per_bundle, |
|
38 | - 'action' => view('components.datatables.button-group', [ |
|
39 | - 'elements' => [ |
|
40 | - view('components.datatables.link-show', [ |
|
41 | - 'url' => route('admin.denomination.edit', $this->resource), |
|
42 | - ])->render(), |
|
43 | - view('components.datatables.link-destroy', [ |
|
44 | - 'url' => route('admin.denomination.destroy', $this->resource), |
|
45 | - ])->render(), |
|
46 | - ], |
|
47 | - ])->render(), |
|
48 | - ]; |
|
49 | - } |
|
50 | -} |
@@ -43,24 +43,3 @@ |
||
43 | 43 | { |
44 | 44 | if ($this->is_active) { |
45 | 45 | return sprintf(<<<'html' |
46 | - <div class="badge badge-success">%s</div> |
|
47 | - html, trans('Active')); |
|
48 | - } |
|
49 | - |
|
50 | - return sprintf(<<<'html' |
|
51 | - <div class="badge badge-danger">%s</div> |
|
52 | - html, trans('Not Active')); |
|
53 | - } |
|
54 | - |
|
55 | - /** |
|
56 | - * Return "role" attribute value. |
|
57 | - * |
|
58 | - * @return string |
|
59 | - */ |
|
60 | - public function getRoleAttribute(): string |
|
61 | - { |
|
62 | - $this->load('roles:id,name'); |
|
63 | - |
|
64 | - return $this->roles->first()->name; |
|
65 | - } |
|
66 | -} |
@@ -43,24 +43,3 @@ |
||
43 | 43 | { |
44 | 44 | if ($this->is_active) { |
45 | 45 | return sprintf(<<<'html' |
46 | - <div class="badge badge-success">%s</div> |
|
47 | - html, trans('Active')); |
|
48 | - } |
|
49 | - |
|
50 | - return sprintf(<<<'html' |
|
51 | - <div class="badge badge-danger">%s</div> |
|
52 | - html, trans('Not Active')); |
|
53 | - } |
|
54 | - |
|
55 | - /** |
|
56 | - * Return "role" attribute value. |
|
57 | - * |
|
58 | - * @return string |
|
59 | - */ |
|
60 | - public function getRoleAttribute(): string |
|
61 | - { |
|
62 | - $this->load('roles:id,name'); |
|
63 | - |
|
64 | - return $this->roles->first()->name; |
|
65 | - } |
|
66 | -} |