Closed Chirag4904 closed 1 year ago
@RoguedBear I am wondering if it should be handled in frontend or backend. In frontend side I can just add additional checks if all L,T,P hours are equal to 0 then it will not be displayed. Alternatively if in the backend we check if the L,T,P becomes 0 for that alloted subject then that subject should be removed from the allotedSubjects array for that teacher. What do you think?
ideally this should be handled in the backend, when you call the delete teacher api or when the ltp hours reach 0 for a manually added teacher, the backend takes care of all the places to delete that teacher from
Ok let's see if it's too much hassle for now then we will do it in frontend and keep this issue open otherwise fix it in the backend.
completed in #106
Once the teacher is assigned a subject it is stored in alloted Subject array so if the subject is removed from that teacher then the hours are updated to 0 but the object still remains in alloted subjects which is taken by ui and displayed.