-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
2,852 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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
22 changes: 22 additions & 0 deletions
22
src/pages/acceptInvitation/AcceptInvitationCreateUserAccount.vue
This file contains 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,22 @@ | ||
<template> | ||
<field-text v-bind="store.usernameField" @change="store.usernameChange" /> | ||
<br /> | ||
<field-text v-bind="store.passwordField" @change="store.passwordChange" /> | ||
</template> | ||
|
||
<script setup> | ||
import {defineProps} from 'vue'; | ||
import FieldText from '@/components/Form/fields/FieldText.vue'; | ||
import {useAcceptInvitationPageStore} from './AcceptInvitationPageStore'; | ||
defineProps({ | ||
section: { | ||
type: Object, | ||
default() { | ||
return null; | ||
}, | ||
}, | ||
}); | ||
const store = useAcceptInvitationPageStore(); | ||
</script> |
20 changes: 20 additions & 0 deletions
20
src/pages/acceptInvitation/AcceptInvitationCreateUserForms.vue
This file contains 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,20 @@ | ||
<template> | ||
<pkp-form | ||
v-if="section.type === 'form'" | ||
v-bind="section.form" | ||
ref="autosaveForms" | ||
class="userInvitation__stepForm" | ||
@set="store.updateAutosaveForm" | ||
></pkp-form> | ||
</template> | ||
|
||
<script setup> | ||
import {defineProps} from 'vue'; | ||
import PkpForm from '@/components/Form/Form.vue'; | ||
import {useAcceptInvitationPageStore} from './AcceptInvitationPageStore'; | ||
defineProps({ | ||
section: {type: Object, required: true}, | ||
}); | ||
const store = useAcceptInvitationPageStore(); | ||
</script> |
This file contains 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,17 @@ | ||
<template> | ||
<h1 ref="wrapper" class="app__pageHeading"> | ||
{{ pageTitle }} | ||
</h1> | ||
<p> | ||
{{ pageTitleDescription }} | ||
</p> | ||
</template> | ||
|
||
<script setup> | ||
import {defineProps} from 'vue'; | ||
defineProps({ | ||
pageTitle: {type: String, required: true}, | ||
pageTitleDescription: {type: String, required: true}, | ||
}); | ||
</script> |
This file contains 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,9 @@ | ||
import {Primary, Controls, Stories, Meta, ArgTypes} from '@storybook/blocks'; | ||
|
||
import * as AcceptInvitationPage from './AcceptInvitationPage.stories.js'; | ||
|
||
<Meta of={AcceptInvitationPage} /> | ||
|
||
# User Invitation page | ||
|
||
<ArgTypes /> |
28 changes: 28 additions & 0 deletions
28
src/pages/acceptInvitation/AcceptInvitationPage.stories.js
This file contains 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,28 @@ | ||
import AcceptInvitationPage from './AcceptInvitationPage.vue'; | ||
import {http, HttpResponse} from 'msw'; | ||
import PageInitConfigMock from './mocks/pageInitConfig'; | ||
|
||
export default { | ||
title: 'Pages/AcceptInvitation', | ||
component: AcceptInvitationPage, | ||
}; | ||
|
||
export const Init = { | ||
render: (args) => ({ | ||
components: {AcceptInvitationPage}, | ||
setup() { | ||
return {args}; | ||
}, | ||
template: '<AcceptInvitationPage v-bind="args" />', | ||
}), | ||
parameters: { | ||
msw: { | ||
handlers: [ | ||
http.post('https://mock/index.php/publicknowledge/api/v1/users', () => { | ||
return HttpResponse.json('accept invitation successfully'); | ||
}), | ||
], | ||
}, | ||
}, | ||
args: PageInitConfigMock, | ||
}; |
Oops, something went wrong.