This is found in the components domain. Make sure only HTMX routes call
it. Although, I think I put this into the page handlers WHICH IS WRONG.
However, it does work, ish. But it does not load into the DOM properly.
But it seems to display just fine.
If a user is logged into an account that cannot be found, they will be
silently logged out, so they can log back into their account. In the
event that the data becomes stale.
This was a simple update, just missing in the past. I really need to
cleanup the page loading, but that will come when the error displays get
implemented.
Still having the stupid ass nil dereferences, I think I might need to
migrate to using success returns instead of pointers. Because they're
fucked. And even more so now.
We can now use environment values to dictate which values are used for
the DB and the domain. This is a simple solution, but for now, it works!
This will merge into master and we can then see it live in action!
This includes backend updates as well as frontend changes! The backend
also includes a new repository to get a list of jobs via their IDs,
which does respect order!
The list displays for users that are logged in and a small message when
the user is not logged in. The last piece is the recipe of the week
segment, which can be as simple as a DB cron-job. But that will require
stored procedures. Need to learn those next.
Though I want to deploy the application soon, so I need to begin working
on that.
This basically marks the favorites page completed. Updating the recipe
repository to allow the search function to accept a userId and favorites
flag. This flag will toggle a "favorites only" search. Which can be used
to replicate the same functionality from the search page in the
favorites page. This later can serve as a baseline for updating to also
work for activity search.
I am starting to think an ORM is a good idea...I heard Gorm is good, but
for now, there is a bit too much tech debt.
This means we need to pass the user id into the various methods that
call it. But, since it is a pointer, we can use nil if we don't have a
user to check with (this is noted in the service).
The database requirements have been added, as well as the service/repo
architecture. A few small functions have been created, but the system is
not complete by any means. More work is required to mark this task
complete.
The profile list will now properly display the users recipes! The
favorites list does not exist yet, since there is no backend support for
favoriting/saving recipes. So the list displays the same content as the
user recipe list. Same goes for the activity list, not yet implemented.
This loads whenever a page that does not exist is loaded. I would also
like to add some "coming soon" dialog to the few pages that don't exist
yet. Before deploying to the server.
However, this only occurs when the page is loaded WITH filters. If
filters are not found in the cookies, such as when a blank page is
loaded, then a search will only execute on submit.
This means that we can use the cookie data to load the filters when the
search page loads. The final step is making sure the search is complete
and the simple redirection. Which will come in the next commit!
Missing some context storage and better passing of data to allow
between the home page to the search page. Need a way to store the search
results in state so they can be retrieved when the page is reloaded,
etc.
The route will now display real, live data from the DB! Errors are not
handled very well, just returned as JSON for now. Need to implement an
error page for states when errors occur.
This commit also includes lots of documentation for the various
service/repository methods. I am trying to not let docs fall through the
cracks, but I am not perfect lol.
Recipe creation is complete! Some minor issues include the
"eager-validation." It's better than nothing, but a bit harsh. Also, the
redirection and linking to a view page would be nice.
Furthermore, tags and images are not implemented yet. Will need that in
the future!