awcodes / filament-quick-create

Plugin for Filament Panels that adds a dropdown menu to the header to quickly create new items.
MIT License
168 stars 26 forks source link

Does not fill tenant id for tenant resources #54

Closed damms005 closed 4 months ago

damms005 commented 4 months ago

Filament Version

v3

Plugin Version

v3.4

PHP Version

PHP 8.3.7

Problem description

In a multi-tenant applicaiton, Filament automatically handles populating the tenant id when creating new resources. This plugin does not, resulting in database error when trying to create new entry and the tenant ID is set to NOT NULL.

Screencast:

https://github.com/awcodes/filament-quick-create/assets/9839355/4968ea82-eaa8-4bc4-81d0-acec8518cbd8

Expected behavior

When a new model is created that has tenancy, it should auto-populat the tenant id like Filament does

Steps to reproduce

image

Reproduction repository

No response

Relevant log output

No response

awcodes commented 4 months ago

Will look into this when I can, but if you have an immediate need, I'm willing to accept PRs.

awcodes commented 4 months ago

hey @damms005, can you give me a reproduction repo for this.

I don't have anything set up for tenancy to test with that uses modal creation.

damms005 commented 4 months ago

Oh my apologies. I meant multi-panel.

Just create 2 panels and add quick-create to one and login to it. You should then be able to recreate my screencast above.

damms005 commented 4 months ago

I was not thinking straight when I wrote that previous comment lol 😄

Please find below the repro repo; https://github.com/damms005/delete-me-quick-create

Reproduction: