-
Notifications
You must be signed in to change notification settings - Fork 123
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
Fix(Sales): Resolve "characters not found" issue #462
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a little nitpick comment and thought the rest of this looked good!
But I also noticed in the description you felt like this was a band-aid solution so I did a little poking around and I think another option might be to update the relationship on Sales
for the SalesCharacter to be this:
$this->hasMany('App\Models\Sales\SalesCharacter', 'sales_id')->has('character')`
So it would never return SalesCharacters as a part of the collection at all, if their character is undefined. The downside to that though, is then there's no messaging to the user that a character was deleted and that's why it's missing. 🤔 Not sure which would be more preferable.
Yeah I had the idea to have better checking on the interface itself so that the information entered pertinent to the sale was still accessible; ideally I think this would be the case for both the admin and public-facing interfaces so that records are maintained, just replacing relevant bits with [deleted character] or somesuch as is done for e.g. logs. |
@AW0005, @itinerare had personally told me they'd look things over and work on it, so I'm leaving it 100% up to them from here. |
Yeah I had some bold thoughts about getting character info by virtue of it being soft-deleted rather than deleted-deleted... though tbh this probably wouldn't work as well as I'd like considering that iirc the core character is the only thing to which that applies and not e.g. the info on the image object, traits, etc, which are kinda the relevant bits of info that would contextualize the sale info. At this rate probably what I would end up doing is just cleaning up the display in line w my comment above. |
Just refreshing the branch by putting all the new stuff in.. |
..Hrm, I have an idea how to do this the way Merc maybe wants, but I think I need #615 resolved first. It might help the process along.. So I'm converting this to draft for now. |
…fix/missing-character-sale aka feat(sales): use character image at the time a character is added to a sale (corowne#615)
…fix/missing-character-sale
Don't know if still needed, but I've opted to at least push the dev branch in for now, resolving the one conflict |
..Scratch that. Looking at the changes that have been done and the two edits in here do not even get reached anymore. Closing PR. |
Referring to Issue #459 that is-
I feel like this is a form of band-aid solution, but it should look and work decently. Please look it over thoroughly.