ArchonsDev / react-pointwatch-web

1 stars 1 forks source link

Regulate term selection based on department #46

Closed cxrvxxxx closed 4 months ago

cxrvxxxx commented 4 months ago

In Employee dashboard, the terms to display should only be those applicable for their Department image

In adding an SWTD, same rule applies. image

cxrvxxxx commented 4 months ago

This might also be applicable to staff/admin dashboards since it just renders the employee dashboard in a nested level

mssjcksn commented 4 months ago

Again, we don't have a set of fixed names for the terms after asking like twice or thrice? I kept asking over and over if we should follow how AIMS handles terms and receiving zero response about it hahahahahahahahahahahahahahahah

It's easier to check based on how the term is named and without the fixed set, we have to consider the variations ("1st Semester" and "First Semester") and possible user errors (i.e. typos) for naming such term bc the PUT/DELETE methods are not implemented (⁠•⁠‿⁠•⁠)

cxrvxxxx commented 4 months ago

You have access to the term dates

cxrvxxxx commented 4 months ago

I can do it for you if you want.

mssjcksn commented 4 months ago

Access term dates and then what? Check if it's less than 5 months = semester?????? If that's the case, I'm supposed to

Is there a way to add like some column or additional table (term id, department id/name) where the admin can just assign departments (since you also have that list in ur backend code) for a term?

for ex. First/Second Semester

Mid Year

and all that jazz 🎺

cxrvxxxx commented 4 months ago

One option would be to add a discriminator property for the term: i.ie. Term.type: "SEMESTER" | "YEAR"

mssjcksn commented 4 months ago

cant we at least edit the term at least name lang what if typo 😭

cxrvxxxx commented 4 months ago

Do check: https://github.com/ArchonsDev/flask-pointwatch-api/commit/f60736836aa4c53a1e35be5267eeb2e11f4a8581

Also, unrelated but for socketio CORS: https://github.com/ArchonsDev/flask-pointwatch-api/commit/57d8756c74cc299a386db8202cbda1135b505902

mssjcksn commented 4 months ago

This "is_sem" thing, does this mean I have to check if the term name contains a "Semester" word or starts with "Sem" and pass true?

cxrvxxxx commented 4 months ago

It's a field filled by the admin on term creation, so might as well add a field on the add term form

mssjcksn commented 4 months ago

ok na? Screenshot 2024-05-21 135554 Screenshot 2024-05-21 135632 Screenshot 2024-05-21 135510