-
Notifications
You must be signed in to change notification settings - Fork 74
Add a team selection step when deploying blueprints #6099
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e88525c
Add a team selection step when deploying blueprints
cstns f0cc215
Make `has-team-step` conditional based on the route in createInstance…
cstns bf2f0a4
filter out hidden steps
cstns 5f05373
Update frontend/src/components/multi-step-forms/instance/steps/TeamSt…
knolleary 5f27d2f
Merge branch 'main' into team-selection-when-deploying-a-blueprint
cstns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
frontend/src/components/multi-step-forms/instance/steps/TeamStep.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<template> | ||
<section class="ff-select-team-step text-center flex flex-col gap-4 pt-6" data-step="team"> | ||
<h2>Choose a Team</h2> | ||
|
||
<p>Select the team you want tto deploy the blueprint to</p> | ||
|
||
<ul class="max-w-2xl w-full m-auto text-left flex flex-col gap-4"> | ||
<li | ||
v-for="(teamOption, $key) in teams" | ||
:key="$key" | ||
class="team-tile flex flex-col gap-2" | ||
:class="{selected: teamOption.id === team?.id}" | ||
data-el="team-item" | ||
@click="selectTeam(teamOption)" | ||
> | ||
<div class="header flex justify-between gap-2 items-center"> | ||
<h5 class="title truncate"> | ||
{{ teamOption.name }} | ||
</h5> | ||
</div> | ||
</li> | ||
</ul> | ||
</section> | ||
</template> | ||
|
||
<script> | ||
import { mapGetters } from 'vuex' | ||
|
||
export default { | ||
name: 'TeamStep', | ||
props: { | ||
slug: { | ||
required: true, | ||
type: String | ||
} | ||
}, | ||
emits: ['next-step', 'step-updated'], | ||
computed: { | ||
...mapGetters('account', ['team', 'teams']) | ||
}, | ||
mounted () { | ||
this.$emit('step-updated', { | ||
[this.slug]: { | ||
hasErrors: false, | ||
errors: {} | ||
} | ||
}) | ||
}, | ||
methods: { | ||
selectTeam (team) { | ||
return this.$store.dispatch('account/setTeam', team.slug) | ||
.then(() => this.$emit('next-step')) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.ff-select-team-step { | ||
.team-tile { | ||
padding: 12px; | ||
border: 2px solid $ff-grey-300; | ||
width: 100%; | ||
border-radius: 6px; | ||
cursor: pointer; | ||
transition: ease-in-out .3s; | ||
|
||
&:hover { | ||
border-color: $ff-indigo-400; | ||
} | ||
|
||
&.selected { | ||
border-color: $ff-indigo-600; | ||
} | ||
|
||
.header { | ||
.title { | ||
|
||
} | ||
|
||
.counters { | ||
color: $ff-grey-400; | ||
font-size: $ff-funit-xs; | ||
} | ||
} | ||
|
||
.description { | ||
color: $ff-grey-400; | ||
font-size: $ff-funit-sm; | ||
} | ||
} | ||
} | ||
</style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.