Post by viciouslothario on Jan 26, 2024 11:21:59 GMT 1
I'm the developer of this game, I hit a major roadblock where the code started to be a bit a messy, the app is fully working at this point but I have no host at the moment to host the game. And some features aren't working as intended. Still have a long path ahead.
Post by viciouslothario on Jan 26, 2024 11:25:21 GMT 1
Entry #35: And one of the happiest ones
Today I spent major part of the day working on the filters, and yii2 likes to escape certain characters, mostly because of security vulnerabilities they present, but it's not the case in this part and there should be a option to not escape this characters like >, >=... Etc...
All of this comes from my morning talk with Mongo. I had to redo the entire view, because sorting and filtering was breaking... I needed to build the table from the contracts table and not from the workers table despite that I want to show workers that are contracted... Well a contract is the junction between a fed and a worker, so it makes total sense now, to be the central part of it.
Managed to get everything to sort correctly, even the string like Major Star, Star etc, a lot of code and headache into there, a lot of research as well, to build those fields and custom ordering.
Now I wanted to give the ability to users to filter for skills greater than, greater than or equal, equal, lesser than or equal, lesser than. So instead of having a modal or some stupid window in the way...
The user now just needs to type '>'50 with the brackets... or the user can do it with ">"50. And that's because if the user inputs a direct >... Yii escapes that character, php escapes that character in the url that builds the query params. Weird isn't it?
Here's a working example, just 8 workers show up for WWF, which is quite usual at this point, 1992. BUT IT WORKS! YOU DON'T NEED EXTRA CLICKS, just need to type. I will also put a reminder of that at the top of the grid, and that's it. OH and all the fields can be filtered and sorted unlike it was before. A lot of work and research went here. But this part is completed. Now I need to work on what happens when you click on the plus sign... ahahah. Oh and fix that speed being a decimal/float number and convert it to a int.
I've been working on wrestler details, in other words on what you see when you click expand row... And did something like this for the gimmick change... Apart from a single bug where I don't make an initial request to populate the information, which I can do in a bit. Here it is.
And if you click close or x button it hides the modal completely. so it's quite easy to change gimmick or alignment of your wrestlers.