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

"Accessory checkout" version of checkout accessories to locations #15306

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

uberbrady
Copy link
Collaborator

For being able to 'checkout to ___location' as well as 'checkout to user' for Accessories, a lot of the fundamentals of how those relationships work needs to change. This is one attempt at getting those relationships to sort-of work right.

At this point, I can go into Tinker and, from an Accessory, look at AccessoryCheckouts which can point to users or locations. As well as going the other directions.

The extra level of indirection is a little awkward when running through the relationships, which is why I figured MorphedByMany approach might be better - but, in fact, it's so much worse :(

This is by no means complete, but at least the basic relationships seem to work at the model level.

Copy link

what-the-diff bot commented Aug 15, 2024

PR Summary

  • Comment Addition in Accessory.php
    Added explanatory comments to enhance code readability and clarify functionality.

  • Comment Correction in AccessoryCheckout.php
    Revised a previously incorrect comment to ensure accurate reflection of the function’s purpose.

  • New Method in Location.php
    Added a new method assignedAccessories(). This function expands our program's capabilities by helping track accessories assigned to various locations.

  • Comment Addition in User.php
    Added another comment to clarify the purpose of a block of code, thus boosting overall code maintenance and readability.

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

Successfully merging this pull request may close these issues.

1 participant