-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 233: Admin Quick Actions #275
Conversation
…s (working: Antrag genehmigen, Anrechenbar markieren, AEP bestanden markieren)
# Conflicts: # client/src/components/admin/UsersList.vue # client/src/utils/gateways.ts # server/src/controllers/internship.ts # server/src/routes/internship.ts
[del] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -78,7 +79,7 @@ export async function getRandomInternship( | |||
let user; | |||
try { | |||
user = await getUserWithInternshipModule(req.user?.email); | |||
} catch (e: any) { | |||
} catch (e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
geht das jetzt doch ohne den typ any zu setzen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ja, im catch-Block ist das kein Problem, da der Error ja einfach weitergegeben wird. Und das vermeidet dann, das ESLint über das any meckert :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh achso. Gute zu wissen!
propsObject.supervisorEmailAddress !== undefined | ||
) { | ||
internshipProps["supervisor"] = {}; | ||
if (propsObject.supervisorFullName !== undefined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reicht hier auch if (propsObject.supervisorFullName)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auch bei den anderen undefined vergleichen. ich mein wenn's null ist ist auch doof. null braucht man nur beim patchen denk ich
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Die Methode wird ja für POST und PATCH gleichermaßen verwendet, deswegen hab ich das so gebastelt. Und im Backend dürfen die Properties ja auch auf null gesetzt werden, von daher sind's gültige Werte.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok verstehe
); | ||
|
||
internshipRouter.patch( | ||
"/:id/approve", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mich stört noch ein bisschen dass in der url etwas anderes als nur entities stehen (also auch ein verb) aber ich wüsste gerade auch nicht wie man's anders machen könnte. höchstens vlt `?status=approve". Hm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wär ne Möglichkeit, aber dann müsste man in updateInternship
wieder zwischen den einzelnen Requests unterscheiden und die entsprechende Action ausführen, anstatt auf Router-Ebene direkt auf die richtige Action zu verweisen. Ich find beides nicht optimal, aber das hier ein bisschen einfacher 😅 Deswegen würde ich es so lassen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok :)
Fixes #233