Skip to content

Conversation

@marcbon
Copy link
Collaborator

@marcbon marcbon commented Mar 8, 2023

Created Priority dropdown component in src/common/components/BugDetail.

Features:

  • Retrieves all the priorities and display them as select options (GET /campaigns/cid/priorities)
  • On select, edit the bug setting the selected priority (PATCH /campaigns/cid/bugs/big)
  • Show labels and icons

@marcbon marcbon temporarily deployed to Staging March 9, 2023 10:23 — with GitHub Actions Inactive
Copy link
Member

@iacopolea iacopolea left a comment

Choose a reason for hiding this comment

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

We could have had a better typing from api and avoid casting so much, but otherwise great work.

cpPriorities.map((priority) => ({
id: priority.id,
slug: priority.name,
text: getPriorityInfo(priority.name as Priority, t).text ?? '',
Copy link
Member

Choose a reason for hiding this comment

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

It's really a pity we couldn't get the real type from the api because of course priority.name is not a string but a union type 'highest' | 'high' | 'medium' | 'low' | 'lowest'

@marcbon marcbon temporarily deployed to Staging March 9, 2023 11:43 — with GitHub Actions Inactive
@cannarocks cannarocks merged commit c1110b0 into develop Mar 10, 2023
@cannarocks cannarocks deleted the UN-627-priority-dropdown branch March 10, 2023 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants