Skip to content

Commit 7a93c6c

Browse files
committed
Hide abbreviation and color on create dialog as requested
1 parent ae4ac45 commit 7a93c6c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

frontend/src/components/collaborator/CollaboratorCreate.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
class="mb-2"
2626
/>
2727

28-
<CollaboratorForm :collaboration="entityData" />
28+
<CollaboratorForm :collaboration="entityData" variant="create" />
2929
</DetailPane>
3030
</template>
3131

@@ -51,17 +51,15 @@ export default {
5151
},
5252
data() {
5353
return {
54-
entityProperties: ['abbreviation', 'camp', 'color', 'inviteEmail', 'role'],
54+
entityProperties: ['camp', 'inviteEmail', 'role'],
5555
entityUri: '',
5656
}
5757
},
5858
watch: {
5959
showDialog: function (showDialog) {
6060
if (showDialog) {
6161
this.setEntityData({
62-
abbreviation: '',
6362
camp: this.camp._meta.self,
64-
color: '',
6563
inviteEmail: '',
6664
role: DEFAULT_INVITE_ROLE,
6765
})

frontend/src/components/collaborator/CollaboratorForm.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,17 @@
7777
</e-select>
7878

7979
<e-text-field
80+
v-if="variant === 'edit'"
8081
v-model="localCollaboration.abbreviation"
8182
path="abbreviation"
8283
vee-rules="oneEmojiOrTwoCharacters"
8384
/>
8485

85-
<e-color-picker v-model="localCollaboration.color" path="color" />
86+
<e-color-picker
87+
v-if="variant === 'edit'"
88+
v-model="localCollaboration.color"
89+
path="color"
90+
/>
8691
</e-form>
8792
</template>
8893

@@ -93,6 +98,7 @@ export default {
9398
collaboration: { type: Object, required: true },
9499
status: { type: [String, Boolean], required: false, default: false },
95100
readonlyRole: { type: [String, Boolean], required: false, default: false },
101+
variant: { type: String, required: false, default: 'edit' },
96102
},
97103
computed: {
98104
items() {

0 commit comments

Comments
 (0)