Closed OlivierJM closed 2 months ago
Shouldn't this filtering be done on the back end?
Shouldn't this filtering be done on the back end?
We may need to change to not render on the server so that we individually query these.
@brianmuks can you help out on this? we need to a few endpoints. e.g: for subjects, we need something like this
/subjects?gradeId=23284928329
/units?subjectId=92839231
I will share the end points end of today
Thank you Brian.
- gradeId
For these end points my understanding is this:
fetchSubjectsByGradeId
fetchUnitsBySubjectId
@OlivierJM @mikemtdev please confirm
- gradeId
For these end points my understanding is this:
fetchSubjectsByGradeId
fetchUnitsBySubjectId
@OlivierJM @mikemtdev please confirm
Let's do it for topics as well as media contents. This way it will be easier to find related media contents as well.
At the moment my understanding is that subjects and grades are not linked to topics ,media content and units. We need to implement this too right ?
At the moment my understanding is that subjects and grades are not linked to topics ,media content and units. We need to implement this too right ?
@OlivierJM waiting for your response.
At the moment my understanding is that subjects and grades are not linked to topics ,media content and units. We need to implement this too right ?
@OlivierJM waiting for your response.
Apologies I was at a funeral since yesterday and didn't check my messages sooner. I think it would be good to link grades to media contents/topics.
Otherwise we as long as we maintain this relationship we should be fine Grade ==> Subject ==> Unit ==> Topic ==> Media
and then you should be able to call the children by its parentId
Thanks. This is helpful !
@brianmuks you can ping me when you are ready
@brianmuks this is blocked
@mikemtdev let's focus on finishing this one.
@brianmuks you can ping me when you are ready
Sure
@mikemtdev any progress with this ? or are you blocked in any way ?
@mikemtdev You are still working on this right ?
Yes, I am adding what had remained.
cool, Thanks
@mikemtdev any update on this ? it is still not functioning as intended
@mikemtdev the way we have it like this will be very expensive since it just make calls almost all the time with not much conditions and no caching, we will need to refactor a little bit maybe once this is fixed #225 https://github.com/SparkEdUAB/sparked-next/blob/main/src/app/library/layout.tsx
@OlivierJM Meaning this should only be grade on initial page load then subject after grade has been seleted. And so on and so forth?
Yes
So we load the page we show a list all media limited by a certain amount
subjects should only be fetched when a grade has been selected should be similar all the way down to topic
@YewoMhango thanks for fixing this.
Similar to here https://www.alemhulu.com/ Filters in the library should be dynamic, meaning that if you choose a grade then you should only see subjects under that specific grade on the filter, Then units & topics should be disabled until a Grade & Subject are selected. Also we should make a unit come show up before topic.