Skip to content
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

Add author updated feature to submission #4380

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sandeepsajan0
Copy link
Member

@sandeepsajan0 sandeepsajan0 commented Feb 6, 2025

Fixes #4192

Staff can update the submission's author. Flow is similar to the Lead update but the button is a bit hidden in more actions.

Test Steps

  • Staff should find an option to 'Change Author' on the submission detail page in sidebar(More action).
  • Staff can select any applicant and assign them as an author of that submission.
  • New applicant should be notified about new assignment.
  • A slack notification should be there, like which user has replaced {old applicant} from {new_applicant}.
  • The new applicant's name should be updated in all the places on submission.

@sandeepsajan0 sandeepsajan0 marked this pull request as ready for review February 6, 2025 04:47
Copy link
Member

@frjo frjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well but can be simplified I think.

label=_("Applicants"),
required=False,
)
author.widget.attrs.update({"data-placeholder": "Select..."})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this author.widget.attrs.update({"data-placeholder": "Select...", "data-js-choices": ""})?

allowHTML: true,
});
});
</script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With setting data-js-choices above I believe this script snippet is not needed.


{% url 'funds:submissions:change_author' pk=object.pk as author_update_url %}
{% include 'funds/includes/dialog_form_base.html' with form=form value=value %}
</form>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "lead" modal is much simpler, no form in form. Here there seems to be two htmx calls, is that needed?

I see that the partner modal looks like above, I suspect that is overcomplicated as well.

</dl>
</div>

{% url 'funds:submissions:change_author' pk=object.pk as author_update_url %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this is used anywhere.

@frjo frjo added Type: Feature This is something new (not an enhancement of an existing thing). Type: Patch Mini change, used in release drafter labels Feb 6, 2025
@frjo frjo marked this pull request as draft February 6, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature This is something new (not an enhancement of an existing thing). Type: Patch Mini change, used in release drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow staff to change applicant/author of an application
2 participants