kirschbaum-development / nova-inline-relationship

A package to present relationships as inline properties in Nova.
MIT License
198 stars 83 forks source link

Label not get label or singularLabel from Nova Resource #128

Open xpalacinengelsolar opened 9 months ago

xpalacinengelsolar commented 9 months ago

Good morning,

Label not get label or singularLabel from Nova Resource, get name of HasMany passed, my code:

HasMany::make('Direcciones', 'dealer_addresses', DealerAddress::class)
    ->sortable(),

The label displayed is 'Direcciones' but in inline items show 'Direccione' and the label of label or singularLabel not my resource code:

    /**
     * Get the displayable label of the resource.
     *
     * @return string
     */
    public static function label()
    {
        return __('Direcciones del dealer');
    }

    /**
     * Get the displayable singular label of the resource.
     *
     * @return string
     */
    public static function singularLabel()
    {
        return __('Dirección del dealer');
    }

I expect in items inline label the singularLabel() value 'Dirección del dealer'

If on the contrary use simple has many make:

HasMany::make('dealerAddresses')
    ->inline(),

The label displayed is 'dealer_addresses' but in inline items show 'Dealer_address' and I expect in label the value of label method 'Direcciones del dealer' and in items inline label the singularLabel() value 'Dirección del dealer'.

I have installed versions:

"kirschbaum-development/nova-inline-relationship": "^2.1" // 2.1.1
 "laravel/framework": "^10.0", // 10.13.0
"laravel/nova": "~4.0", // 4.24.4

Thanks

luisdalmolin commented 9 months ago

@xpalacinengelsolar We are not currently actively maintaining this project, but we are open to pull requests.