Skip to content

Conversation

gaspergrom
Copy link
Contributor

@gaspergrom gaspergrom commented Sep 6, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at fe64d49

This pull request adds a new feature to the frontend that allows users to merge two organizations from different places in the UI. It introduces four new components: organization-list-toolbar, organization-dropdown, organization-merge-dialog, and organization-selection-dropdown that handle the UI and logic for the merge feature. It also adds two new methods to the organization-service.js file that make API calls to the backend for merging and not merging two organizations.

🤖 Generated by Copilot at fe64d49

Sing, O Muse, of the skillful code that merged the organizations
With organization-merge-dialog, a wondrous component divine
That showed the users in a modal the options and the details
And called the OrganizationService to execute the merge sublime

Why

How

🤖 Generated by Copilot at fe64d49

  • Add a new feature to merge two organizations in the frontend and backend (link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Create a new component organization-merge-dialog that displays a modal dialog for merging two organizations (link)
    • Use props, emits, slots, and reactive variables to handle the merge logic and UI (link)
    • Use the OrganizationService.mergeOrganizations method to make the API call to the backend (link, link)
    • Use two child components app-organization-merge-suggestions-details and app-organization-selection-dropdown to show the details and options of the organizations to merge (link)
  • Create a new component organization-selection-dropdown that displays a dropdown input for selecting an organization to merge with (link)
    • Use props, emits, and reactive variables to fetch and select the organization (link)
    • Use the OrganizationService.listAutocomplete and OrganizationService.find methods to get the list of options and the details of the selected organization (link)
    • Use the app-autocomplete-one-input and app-avatar components to render the dropdown input and the option slot (link)
  • Add a new dropdown item to the organization-list-toolbar component that allows the user to merge two selected organizations (link)
    • Use a command object with the action 'mergeOrganizations' to trigger the merge logic (link)
    • Use a new method handleMergeOrganizations to call the OrganizationService.mergeOrganizations method and refresh the organization list (link, link)
    • Use conditions to show or hide the dropdown item based on the user permission and the data source (link)
  • Add a new dropdown item to the organization-dropdown component that allows the user to merge the current organization with another one (link)
    • Use a command object with the action 'organizationMerge' and the organization as the current one to trigger the merge logic (link)
    • Use a new emit option to emit a 'merge' event to the parent component (link, link)
  • Add a new attribute to the organization-dropdown component in the organization-view-header component that listens to the 'merge' event and assigns the current organization to the isMergeDialogOpen variable (link)
  • Add a new component to the organization-view-header component that renders the organization-merge-dialog component with a v-model that binds to the isMergeDialogOpen variable (link, link)
  • Add a new reactive variable to the organization-view-header component that holds the value of the organization to merge with, or null if none is selected (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@gaspergrom gaspergrom added the Feature Created by Linear-GitHub Sync label Sep 6, 2023
@gaspergrom gaspergrom self-assigned this Sep 6, 2023
@gaspergrom gaspergrom changed the base branch from main to feature/organizations-merge September 7, 2023 07:28
@epipav epipav force-pushed the feature/organizations-merge branch from 0bfc226 to 10b4328 Compare September 7, 2023 07:29
@gaspergrom gaspergrom changed the base branch from feature/organizations-merge to main September 7, 2023 07:30
@gaspergrom gaspergrom changed the base branch from main to feature/organizations-merge September 7, 2023 07:30
@gaspergrom gaspergrom changed the base branch from feature/organizations-merge to main September 7, 2023 07:41
@gaspergrom gaspergrom changed the base branch from main to feature/organizations-merge September 7, 2023 11:10
@gaspergrom gaspergrom merged commit b7ba598 into feature/organizations-merge Sep 7, 2023
@gaspergrom gaspergrom deleted the feature/merge-organizations-fe branch September 7, 2023 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants