Code Monkey home page Code Monkey logo

Comments (7)

lukas-frey avatar lukas-frey commented on September 4, 2024

Hi, thanks a lot for the bug report! I'll try to work on a fix as soon as I can. You're also welcome to make a PR if you want.

from filament-nested-resources.

acepoblete avatar acepoblete commented on September 4, 2024

@lukas-frey nice work on the plugin, it is super helpful. Had a question about the route names. Looks like the parameters from the route slug are not being removed. Using the example from this issue, they appear like this

admin.projects.{projectRecord?}.project-sp-natures.{project sp natureRecord?}.building-blocks.create

when normally I believe they are like this

admin.projects.project-sp-natures.building-blocks.create

Just wondering if this was by design or if it might change in future releases.

from filament-nested-resources.

lukas-frey avatar lukas-frey commented on September 4, 2024

@acepoblete Great catch! It's not by design, I didn't really know it did that until now. Are you actually interacting directly with these slugs in your app?

I will fix it in the next release.

from filament-nested-resources.

tobias-grasse avatar tobias-grasse commented on September 4, 2024

I can confirm @niccolofavari 's report. My parent resource is named JobCampaign, which results in the route admin/job-campaigns/{job campaignRecord?}/child-resource/{record} and produces a 404.

I believe the root cause is using Filament's get_model_label helper in this package's get_model_route_parameter helper, which produces a space-separated version of the model class name. I assume that the Filament helper get_model_label is intended for UI/display labels, and not for route parameters. I'll look into possible fixes as well :-)

from filament-nested-resources.

acepoblete avatar acepoblete commented on September 4, 2024

@acepoblete Great catch! It's not by design, I didn't really know it did that until now. Are you actually interacting directly with these slugs in your app?

I will fix it in the next release.

I have a custom tab component for navigating between child resources. It's not very smart, so I have to manually generate the URLs for each tab. I noticed that route parameters when trying to figure out what route names to use for the child resources. I'll have a PR for this fix shortly.

moved this to issue #5

from filament-nested-resources.

github-actions avatar github-actions commented on September 4, 2024

🎉 This issue has been resolved in version 1.0.0-alpha.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

from filament-nested-resources.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.