fix MkRoleSelectDialog.vue and storybook scenario
This commit is contained in:
parent
216325840d
commit
5a2b11ec17
|
@ -14,6 +14,7 @@ const roles = [
|
|||
role({ displayOrder: 1 }), role({ displayOrder: 1 }), role({ displayOrder: 1 }), role({ displayOrder: 1 }),
|
||||
role({ displayOrder: 2 }), role({ displayOrder: 2 }), role({ displayOrder: 3 }), role({ displayOrder: 3 }),
|
||||
role({ displayOrder: 4 }), role({ displayOrder: 5 }), role({ displayOrder: 6 }), role({ displayOrder: 7 }),
|
||||
role({ displayOrder: 999, name: 'privateRole', isPublic: false }),
|
||||
];
|
||||
|
||||
export const Default = {
|
||||
|
@ -63,6 +64,43 @@ export const InitialIds = {
|
|||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
initialRoleIds: [roles[0].id, roles[1].id, roles[4].id, roles[6].id],
|
||||
initialRoleIds: [roles[0].id, roles[1].id, roles[4].id, roles[6].id, roles[8].id, roles[10].id],
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
||||
export const InfoMessage = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
infoMessage: 'This is a message.',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
||||
export const Title = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
title: 'Select roles',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
||||
export const Full = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
initialRoleIds: roles.map(it => it.id),
|
||||
infoMessage: InfoMessage.args.infoMessage,
|
||||
title: Title.args.title,
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
||||
export const FullWithPrivate = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
initialRoleIds: roles.map(it => it.id),
|
||||
infoMessage: InfoMessage.args.infoMessage,
|
||||
title: Title.args.title,
|
||||
publicOnly: false,
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
|
Loading…
Reference in New Issue