inspheric / nova-indicator-field

A colour-coded indicator field for Laravel Nova

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Works with INT field values?

msassa opened this issue · comments

I have a integer field in the database that indicate the status, and only see a blank field in the nova resource.

I used as:

Indicator::make('status')
                ->labels(
                    [
                        '0'   => 'Pendiente',
                        '1'   => 'En proceso',
                        '2'   => 'Completa',
                        '3'   => 'Cerrada',
                        '4'   => 'Vencida',
                        '100' => 'Eliminada',
                        '101' => 'Sin Proveedores',
                    ]
                ),

Also I try:

Indicator::make('status')
                ->labels(
                    [
                        0   => 'Pendiente',
                        1   => 'En proceso',
                        2   => 'Completa',
                        3   => 'Cerrada',
                        4   => 'Vencida',
                        100 => 'Eliminada',
                        101 => 'Sin Proveedores',
                    ]
                ),

and only get this:
image

Hi @msassa

I have set up the same field definition as you and the field is displayed with no problems:

image
image

Have you made sure to run php artisan nova:publish?

Yes, I have publish the nova assets.
Now is working! I think my mistake was I wasn't full reload the page.
Sorry!