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

feat: go to Assignment tab after creation and warn if existing without assigning #14882

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

anikdhabal
Copy link
Contributor

@anikdhabal anikdhabal commented May 5, 2024

What does this PR do?

Fixes #14848

Screenshot 2024-05-09 221817

Copy link

vercel bot commented May 5, 2024

@anikdhabal is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label May 5, 2024
@graphite-app graphite-app bot requested a review from a team May 5, 2024 16:07
Copy link
Contributor

github-actions bot commented May 5, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@github-actions github-actions bot added event-types area: event types, event-types Medium priority Created by Linear-GitHub Sync teams area: teams, round robin, collective, managed event-types ✨ feature New feature or request labels May 5, 2024
@anikdhabal anikdhabal changed the title feat: go to Assignment tab after creation and warn if existing withou… feat: go to Assignment tab after creation and warn if existing without assigning May 5, 2024
Copy link

graphite-app bot commented May 5, 2024

Graphite Automations

"Add community label" took an action on this PR • (05/05/24)

1 label was added to this PR based on Keith Williams's automation.

"Add consumer team as reviewer" took an action on this PR • (05/05/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link
Contributor

github-actions bot commented May 5, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link
Contributor

@supalarry supalarry left a comment

Choose a reason for hiding this comment

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

Great job Anik! I confirm that functionality works as expected, but have some small refactor ideas below. Let me know what you think!

apps/web/components/eventtype/EventTeamTab.tsx Outdated Show resolved Hide resolved
apps/web/components/eventtype/EventTeamTab.tsx Outdated Show resolved Hide resolved
apps/web/components/eventtype/EventTeamTab.tsx Outdated Show resolved Hide resolved
apps/web/components/eventtype/EventTeamTab.tsx Outdated Show resolved Hide resolved
apps/web/components/eventtype/AssignmentWarningDialog.tsx Outdated Show resolved Hide resolved
apps/web/components/eventtype/EventTeamTab.tsx Outdated Show resolved Hide resolved
@anikdhabal
Copy link
Contributor Author

@supalarry @Udit-takkar thanks for your reviews.

@keithwillcode keithwillcode added this to the v4.1 milestone May 8, 2024
supalarry
supalarry previously approved these changes May 9, 2024
Copy link
Contributor

@supalarry supalarry left a comment

Choose a reason for hiding this comment

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

Great work and thank you for the contribution! : )

@ciaranha
Copy link
Member

ciaranha commented May 9, 2024

If you try to exit out of an event type without assigning anyone...

It should only throw this modal when you go to leave the entire event type, not a tab within the event type.

Copy link
Contributor

@keithwillcode keithwillcode left a comment

Choose a reason for hiding this comment

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

Marking as requested changes so we can address @ciaranha's comment about the tab versus page.

@anikdhabal
Copy link
Contributor Author

@keithwillcode I've made the requested changes.

@dosubot dosubot bot removed this from the v4.1 milestone May 9, 2024
Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

Uploading Screen Recording 2024-05-10 at 6.47.15 PM.mov…

You can navigate to other page without saving the hosts

@anikdhabal
Copy link
Contributor Author

Uploading Screen Recording 2024-05-10 at 6.47.15 PM.mov…

You can navigate to other page without saving the hosts

Thanks for the review. I've fixed that.

Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

I still sometimes don't see any modal when i navigate to any other page without assigning team members.

How to reproduce?

  1. Create a collective team event type
  2. Go to event setup tab and change location and click save
    and then navigate to any other page by clicking on 'Bookings'

@dosubot dosubot bot added this to the v4.2 milestone May 15, 2024
if (
eventType.hosts.length === 0 &&
!leaveWithoutAssigningHosts.current &&
(url === "/event-types" || paths[1] !== "event-types")
Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to show warning dialog only when navigating to a non /event-types route, do we need the url === "/event-types" check on line 214?

} = props;
const router = useRouter();
return (
<Dialog open={isOpenAssignmentWarnDialog} onOpenChange={setIsOpenAssignmentWarnDialog}>
Copy link
Contributor

Choose a reason for hiding this comment

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

You know what would be cool, if Go Back and Assign is clicked, that it re-directs to the /event-types/:id?tabName=team to land user on the page where he / she can assign the user. Otherwise the user needs to figure out which tab to press for assignement.

Screenshot 2024-05-17 at 10 15 04

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure Lauris, that's a cool idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

Amazing! Thank you Anik!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Created by Linear-GitHub Sync event-types area: event types, event-types ✨ feature New feature or request Medium priority Created by Linear-GitHub Sync teams area: teams, round robin, collective, managed event-types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3606] Team events: go to Assignment tab after creation and warn if existing without assigning
5 participants