Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RepeatableEntry on HasMany Relations not working #14372

Open
KamranBiglari opened this issue Sep 27, 2024 · 3 comments
Open

RepeatableEntry on HasMany Relations not working #14372

KamranBiglari opened this issue Sep 27, 2024 · 3 comments
Labels

Comments

@KamranBiglari
Copy link

KamranBiglari commented Sep 27, 2024

Package

filament/filament

Package Version

latest

Laravel Version

v3.2.115

Livewire Version

No response

PHP Version

PHP 8.3

Problem description

I have SalesOrderLines which is a HasMany relation. The RepeatableEntry doesn't show the data in infolist.

dd($infolist->record->SalesOrderLines()->get()); // I can confirm that there are items in it and it's not empty

public static function infolist(Infolist $infolist): Infolist
    {
        // dd($infolist->record->SalesOrderLines()->get());
        return $infolist
            ->schema([
                ...self::getSalesOrderInfoListSchema($infolist),
                \Filament\Infolists\Components\RepeatableEntry::make('SalesOrderLines')
                    ->columns(5)
                    ->schema([
                        Infolists\Components\TextEntry::make('ItemCode')
                            ->label(__('panel.itemcode'))
                            ->inlineLabel(),
                        Infolists\Components\TextEntry::make('ItemDescription')
                            ->label(__('panel.itemdescription'))
                            ->inlineLabel(),
                        Infolists\Components\TextEntry::make('Quantity')
                            ->label(__('panel.quantity'))
                            ->inlineLabel(),
                        Infolists\Components\TextEntry::make('AmountDC')
                            ->label(__('panel.amountdc'))
                            ->inlineLabel(),
                        Infolists\Components\TextEntry::make('AmountFC')
                            ->label(__('panel.amountfc'))
                            ->inlineLabel(),
                    ]),
            ]);
    }

Expected behavior

Show all related data

Steps to reproduce

public function SalesOrderLines():  HasMany
    {
        return $this->hasMany(SalesOrderLine::class, 'OrderID', 'OrderID');
    }

Reproduction repository (issue will be closed if this is not valid)

https://github.com/KamranBiglari/mattech-hub3

Relevant log output

No response

Donate 💰 to fund this issue

  • You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
  • 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
  • Thank you in advance for helping us make maintenance sustainable!
Fund with Polar
@leandrocfe
Copy link
Contributor

@KamranBiglari the repo is not available..

@KamranBiglari
Copy link
Author

@KamranBiglari the repo is not available..

Sorry, but it's not public!

@leandrocfe
Copy link
Contributor

I don’t think this is a Filament issue. There may be something wrong with your project. Please provide a minimal repository to reproduce the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants