-
Notifications
You must be signed in to change notification settings - Fork 179
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
Enhance/tprm #861
Enhance/tprm #861
Conversation
Mohamed-Hacene
commented
Sep 23, 2024
•
edited
Loading
edited
- Add a "send mail" button to send the internal questionnaire
- Align TPRM permissions with base access control model
- Export the questionnaire
- Allow base audit view for third party
- Add a tag to know if requirements contain questions
- Improve EntityAssessment/Audit ownership
- Improve requirement assessment edit page server complexity
d6060e6
to
d68f8c3
Compare
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.
We should not put model-specific logic and components here, but rather use slots.
|
||
export const load: PageServerLoad = async (event) => { | ||
return loadDetail({ event, model: getModelInfo('entity-assessments'), id: event.params.id }); | ||
}; | ||
|
||
export const actions: Actions = { | ||
mailing: async ({ request, fetch, cookies }) => { |
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.
mailing
is not a very explicit name. Would we not gain better readability if we actually stated what this action does? E.g. emailQuestionnaire
...
The URL of the endpoint should also be more specific than /entity-assessments/mailing
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.
Yes I agree for the name, we'll need to change it anyway to add another action to send the external questionnaire by mail.
However, the endpoint is /compliance-assessments/mailing
because we send the audit and not the entity-assessment. It is not explicit because it could be useful to send other audits than questionnaires in the future with the same endpoint as it is the same process but maybe with a different template.
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.
Was a typo, meant compliance-assessment/mailing.
The point is that the word 'mailing' does not explicitly convey what the endpoint actually does. That is, emailing the questionnaire to the designated representatives
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.
Actually not, the endpoint is sending an audit to its authors so the name cannot be focused on the questionnaire, but it should be more precise I agree, like "send_mail" or "send_audit" maybe
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.
LGTM