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 contact creation in POI form #3196

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jarlhengstmengel
Copy link
Contributor

Short description

This PR adds the creation of contacts with a collapsible box in the POI form.

Proposed changes

  • Add collapsibele box with a contact form in POI form
  • Add view for the box
  • Trigger creation of a contact with clicking at publish and setting the location automatically to the POI that is created parallel

Side effects

  • None

Resolved issues

Fixes: #3088


Pull Request Review Guidelines

@MizukiTemma
Copy link
Member

The new typescript file "contact_box.ts" needs to be added in "index.ts", otherwise it can't bring its effects 😿

@jarlhengstmengel
Copy link
Contributor Author

The new typescript file "contact_box.ts" needs to be added in "index.ts", otherwise it can't bring its effects 😿

Thank you for the hint! That would have been my question.

@MizukiTemma
Copy link
Member

@jarlhengstmengel
I'll join to implementation of this PR ➕

@MizukiTemma MizukiTemma force-pushed the feature/add_contact_creation_in_poi_form branch from 9970b17 to fa84fc1 Compare January 7, 2025 16:04
@MizukiTemma
Copy link
Member

MizukiTemma commented Jan 9, 2025

This PR implements only the first step (see this)

The second step will be a separate issue (#3322 )

@MizukiTemma MizukiTemma added deadline Needs to be fixed in the given time prio: high Needs to be resolved ASAP. labels Jan 9, 2025
@JoeyStk JoeyStk self-assigned this Jan 10, 2025
Copy link
Contributor

@JoeyStk JoeyStk left a comment

Choose a reason for hiding this comment

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

Thank you a lot to the both of you!
This is a really good step forward. I have a few questions, but other than those it looks already very good :)


#: cms/templates/pois/poi_form_sidebar/related_contacts_box.html
msgid "The new contact was successfully created."
msgstr "Ein neuer Kontakt wurde erfolgreich erstellt."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
msgstr "Ein neuer Kontakt wurde erfolgreich erstellt."
msgstr "Der neue Kontakt wurde erfolgreich erstellt."

This is very nit picky, but I think we should keep the definitive article to stay consistent to the English version, but yes, it doesn't sound as good

@@ -104,6 +104,8 @@ import "./js/menu";
import "./js/poi-categories/poicategory-colors-icons";
import "./js/dashboard/broken-links";

import "./js/contact_box";

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

{% for contact in contacts %}
<a href="{% url 'edit_contact' contact_id=contact.id region_slug=request.region.slug %}"
class="block pt-2 hover:underline">
<i icon-name="pen-square" class="mr-2"></i> {{ contact.label_in_reference_list }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<i icon-name="pen-square" class="mr-2"></i> {{ contact.label_in_reference_list }}
<i icon-name="pencil" class="mr-2"></i> {{ contact.label_in_reference_list }}

At least for the list views we changed the icon to the pencil, but maybe it's okay for this view because the context is slightly different? (And also: we still use this icon still in a few places)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deadline Needs to be fixed in the given time prio: high Needs to be resolved ASAP.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2024-11-07] Add a button to create a contact in the POI form.
3 participants