Skip to content

Commit

Permalink
fix filter stories
Browse files Browse the repository at this point in the history
  • Loading branch information
cedrikv committed Nov 13, 2023
1 parent 6f2e3f8 commit d70f000
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/stories/smart-components/filter-aoe-actor.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,19 @@ export const Default: Story = {
api: 'https://dev-actoren.onroerenderfgoed.be',
id: 'my-id',
},
render: () => ({
components: {
FilterAOEActor,
},
setup() {
const api = 'https://dev-actoren.onroerenderfgoed.be';
const getSsoToken = async () => 'vul hier bearer token in';
return { api, getSsoToken };
},
template: `
<div>
<filter-a-o-e-actor :api="api" :get-sso-token="getSsoToken" />
</div>
`,
}),
};
20 changes: 20 additions & 0 deletions src/stories/smart-components/filter-gemeente.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import '@/scss/main.scss';
import FilterGemeente from '../../components/smart/FilterGemeente.vue';
import type { IGemeente } from '../../models';
import type { Meta, StoryObj } from '@storybook/vue3';

// More on how to set up stories at: https://storybook.js.org/docs/vue/writing-stories/introduction
Expand Down Expand Up @@ -42,6 +43,25 @@ const meta: Meta<typeof FilterGemeente> = {
},
},
},
render: (args) => ({
components: { FilterGemeente },
inheritAttrs: false,
setup() {
return { args };
},
template: `
<div>
<Suspense>
<FilterGemeente v-bind="args" @update:value="onUpdateGemeente" />
</Suspense>
</div>
`,
methods: {
onUpdateGemeente(payload: IGemeente) {
args.value = payload.niscode;
},
},
}),
};

export default meta;
Expand Down
20 changes: 20 additions & 0 deletions src/stories/smart-components/filter-provincie.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import '@/scss/main.scss';
import FilterProvincie from '../../components/smart/FilterProvincie.vue';
import type { IProvincie } from '../../models';
import type { Meta, StoryObj } from '@storybook/vue3';

// More on how to set up stories at: https://storybook.js.org/docs/vue/writing-stories/introduction
Expand Down Expand Up @@ -42,6 +43,25 @@ const meta: Meta<typeof FilterProvincie> = {
},
},
},
render: (args) => ({
components: { FilterProvincie },
inheritAttrs: false,
setup() {
return { args };
},
template: `
<div>
<Suspense>
<FilterProvincie v-bind="args" @update:value="onUpdateProvincie" />
</Suspense>
</div>
`,
methods: {
onUpdateProvincie(payload: IProvincie) {
args.value = payload.niscode;
},
},
}),
};

export default meta;
Expand Down

0 comments on commit d70f000

Please sign in to comment.