Browse Source

Update with session login

master
Joshua Rubingh 8 months ago
parent
commit
4ca9447456
  1. 2
      README.md
  2. 62
      TODO
  3. 4
      components/contributor/list/item.vue
  4. 43
      components/contributors/deleteButton.vue
  5. 10
      components/contributors/editForm.vue
  6. 2
      components/contributors/inviteButton.vue
  7. 4
      components/contributors/list.vue
  8. 10
      components/navigation.vue
  9. 2
      components/researchStudies/createButton.vue
  10. 24
      components/researchStudies/deleteButton.vue
  11. 14
      components/researchStudies/list.vue
  12. 2
      components/ui/rug/form/action/cancel.vue
  13. 2
      components/ui/rug/form/action/save.vue
  14. 2
      layouts/error.vue
  15. 54
      locales/en.js
  16. 91
      nuxt.config.js
  17. 8
      package.json
  18. 6
      pages/landing.vue
  19. 31
      pages/login.vue
  20. 16
      pages/studies/create.vue
  21. 4
      pages/studies/study/contributors/contributor/edit.vue
  22. 8
      pages/studies/study/contributors/contributor/invite.vue
  23. 16
      pages/studies/study/overview.vue
  24. 2
      yarn.lock

2
README.md

@ -1,7 +1,5 @@ @@ -1,7 +1,5 @@
# vre-web
[![Build Status](https://drones.web.rug.nl/api/badges/VRE/Frontend/status.svg)](https://drones.web.rug.nl/VRE/Frontend)
## Development
```bash

62
TODO

@ -1,75 +1,17 @@ @@ -1,75 +1,17 @@
TODO:
i81n:
routing:
- add locales to generated routes
navigation:
- language navigation
https://lokalise.com/blog/vue-i18n/
https://alecolombo.medium.com/a-simple-multilanguage-site-with-nuxt-js-and-nuxt-i18n-43cce9f9f0fe
forms:
- use backend responses as form error's
automated deployments:
- validate api interface
get https://api-vre.web.rug.nl/api/swagger/?format=openapi
match used routes with snapshot of implementation
if match && test => deploy
BLOCKED:
on 3:
http://localhost:3000/en/researchStudies/6/settings
after delete go back to http://localhost:3000/en/researchStudies
as form
APPS:
Alle dialogs via forms:
alle dialogs met formErrors component
PRIO:
- testrunner => als commit dan run test...
- auth flow
DONE:
navigation:
- create component
routing:
urls:
- remove urls.js in lib folder, and use named routes instead
- typed params XXX NOT POSSIBLE with current templating mechanism, only option is to eject completely...
axios:
- Accept-Language nl_NL en_US
auth:
- auth flow with Surfnet
layout:
- setup the "templates"
- create the default layout a la vuetify
https://vuetifyjs.com/en/features/layouts/#usage
https://vuetifyjs.com/en/getting-started/wireframes/#examples
https://vuetifyjs.com/en/components/application/#default-application-markup
i18n:
- redirect to correct language
- setup translations / js/json / $t
- use navigator.language when no language is known
router:
- use router as config
- set navigation as component
- set template with slots dynamic
- set slots content
- get async data
- children can inherit async data

4
components/contributor/list/item.vue

@ -8,9 +8,9 @@ @@ -8,9 +8,9 @@
{{contributor.researcher.display_name}}
</v-list-item-title>
<v-list-item-subtitle>{{contributor.researcher.email_address}}</v-list-item-subtitle>
<v-list-item-subtitle>Faculty: {{contributor.researcher.faculty.name}}</v-list-item-subtitle>
<v-list-item-subtitle>{{ $t('study.faculty') }}: {{contributor.researcher.faculty.name}}</v-list-item-subtitle>
<v-list-item-subtitle>
Role: {{contributor.role}}<span v-if="contributor.isOwner">, OWNER</span>
{{ $t('contributor.role') }}: {{contributor.role}}<span v-if="contributor.isOwner">, {{ $t('contributor.role.owner') }}</span>
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>

43
components/contributors/deleteButton.vue

@ -17,32 +17,34 @@ @@ -17,32 +17,34 @@
</v-icon>
</template>
<v-card>
<v-card-title>Remove contributor</v-card-title>
<v-card-text>Are you sure you want to remove this contributor?</v-card-text>
<v-card-actions>
<ui-rug-card-form
:form="form"
>
<v-card-title>{{ $t('contributors.inviteButton.modal.title') }}</v-card-title>
<v-card-text>{{ $t('contributors.inviteButton.modal.text') }}</v-card-text>
<span slot="actions">
<v-spacer></v-spacer>
<v-btn
text
@click="dialog = false"
>
No
{{ $t('contributors.inviteButton.modal.negative') }}
</v-btn>
<v-btn
text
@click="clickDelete(contributor)"
type="submit"
>
Yes
{{ $t('contributors.inviteButton.modal.positive') }}
</v-btn>
</v-card-actions>
</v-card>
</span>
</ui-rug-card-form>
</v-dialog>
</v-row>
</template>
<script>
import { mapActions } from 'vuex';
import Form from '@/lib/form';
export default {
props: {
@ -58,19 +60,22 @@ export default { @@ -58,19 +60,22 @@ export default {
data () {
return {
dialog: false,
formData: {
studyId: this.studyId,
contributorId: this.contributor.researcher.id
},
form: new Form({
vm: this,
action: this['studies/deleteContributorFromStudy'],
onResponse() {
this.dialog = false;
this.$nuxt.refresh();
}
}),
}
},
methods: {
...mapActions(['studies/deleteContributorFromStudy']),
clickDelete(contributor) {
this['studies/deleteContributorFromStudy']({
studyId: this.studyId,
contributorId: contributor.researcher.id
}).then(() => {
this.$nuxt.refresh();
this.dialog = false;
})
}
}
}
</script>

10
components/contributors/editForm.vue

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<template>
<v-card>
<v-card>
<v-card-title>
<span class="text-h5">Edit contributor</span>
<span class="text-h5">{{ $t('contributors.editForm.title') }}</span>
</v-card-title>
<contributor-list-item :contributor="contributor" />
@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
item-value="id"
multiple
chips
label="study field"
:label="$t('form.studyField')"
></v-select>
</v-col>
</v-row>
@ -35,14 +35,14 @@ @@ -35,14 +35,14 @@
text
@click="close"
>
Cancel
{{ $t('contributors.editForm.cancel') }}
</v-btn>
<v-btn
color="blue darken-1"
text
@click="save"
>
Save
{{ $t('contributors.editForm.save') }}
</v-btn>
</v-card-actions>
</v-card>

2
components/contributors/inviteButton.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<v-btn @click="goToInviteContributor">
Invite contributor
{{ $t('contributors.inviteButton.button') }}
</v-btn>
</template>

4
components/contributors/list.vue

@ -1,12 +1,12 @@ @@ -1,12 +1,12 @@
<template>
<v-card>
<v-card-title>
Contributors
{{ $t('contributors.title') }}
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="mdi-magnify"
label="Search"
:label="$t('form.search')"
single-line
hide-details
></v-text-field>

10
components/navigation.vue

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
<v-list-item-icon>
<v-icon>mdi-view-list</v-icon>
</v-list-item-icon>
<v-list-item-title>Research studies</v-list-item-title>
<v-list-item-title>{{ $t('link.researchStudies') }}</v-list-item-title>
</v-list-item>
</v-list>
@ -31,28 +31,28 @@ @@ -31,28 +31,28 @@
<v-list-item-icon>
<v-icon>mdi-file-document</v-icon>
</v-list-item-icon>
<v-list-item-title>Overview</v-list-item-title>
<v-list-item-title>{{ $t('link.researchStudies.study.overview') }}</v-list-item-title>
</v-list-item>
<v-list-item link :to="{ name: 'researchStudies.study.contributors', params: { studyId: $route.params.studyId } }">
<v-list-item-icon>
<v-icon>mdi-account-group</v-icon>
</v-list-item-icon>
<v-list-item-title>Contributors</v-list-item-title>
<v-list-item-title>{{ $t('link.researchStudies.study.contributors') }}</v-list-item-title>
</v-list-item>
<v-list-item link :to="{ name: 'researchStudies.study.apps', params: { studyId: $route.params.studyId } }">
<v-list-item-icon>
<v-icon>mdi-desktop-mac</v-icon>
</v-list-item-icon>
<v-list-item-title>Apps</v-list-item-title>
<v-list-item-title>{{ $t('link.researchStudies.study.apps') }}</v-list-item-title>
</v-list-item>
<v-list-item link :to="{ name: 'researchStudies.study.settings', params: { studyId: $route.params.studyId } }">
<v-list-item-icon>
<v-icon>mdi-cog</v-icon>
</v-list-item-icon>
<v-list-item-title>Settings</v-list-item-title>
<v-list-item-title>{{ $t('link.researchStudies.study.settings') }}</v-list-item-title>
</v-list-item>
</v-list-group>

2
components/researchStudies/createButton.vue

@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
:to="{ name: 'researchStudies.create' }"
>
<v-icon>mdi-plus</v-icon>
Create
{{ $t('researchStudies.createButton.button') }}
</v-btn>
</template>

24
components/researchStudies/deleteButton.vue

@ -12,28 +12,28 @@ @@ -12,28 +12,28 @@
v-bind="attrs"
v-on="on"
>
delete study
{{ $t('researchStudies.deleteButton.button') }}
</v-btn>
</template>
<ui-rug-card-form
:form="form"
>
<v-card-title>Remove research study</v-card-title>
<v-card-text>Are you sure you want to remove this research study?</v-card-text>
<v-card-title>{{ $t('researchStudies.deleteButton.modal.title') }}</v-card-title>
<v-card-text>{{ $t('researchStudies.deleteButton.modal.text') }}</v-card-text>
<span slot="actions">
<v-btn
text
@click="dialog = false"
>
No
{{ $t('researchStudies.deleteButton.modal.action.negative') }}
</v-btn>
<v-btn
text
type="submit"
>
Yes
{{ $t('researchStudies.deleteButton.modal.action.positive') }}
</v-btn>
</span>
</ui-rug-card-form>
@ -60,13 +60,13 @@ export default { @@ -60,13 +60,13 @@ export default {
studyId: this.studyId,
},
form: new Form({
vm: this,
action: this['studies/deleteStudy'],
onResponse() {
this.dialog = false;
this.$router.push({ name: 'researchStudies' });
}
}),
vm: this,
action: this['studies/deleteStudy'],
onResponse() {
this.dialog = false;
this.$router.push({ name: 'researchStudies' });
}
}),
}
},
methods: {

14
components/researchStudies/list.vue

@ -1,12 +1,12 @@ @@ -1,12 +1,12 @@
<template>
<v-card>
<v-card-title>
Research Studies
{{ $t('researchStudies.title') }}
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="mdi-magnify"
label="Search"
:label="$t('form.search')"
single-line
hide-details
></v-text-field>
@ -68,23 +68,23 @@ @@ -68,23 +68,23 @@
value: 'image',
},
{
text: 'Name',
text: this.$t('study.name'),
value: 'name'
},
{
text: 'Field',
text: this.$t('study.field'),
value: 'field',
},
{
text: 'Faculty',
text: this.$t('study.faculty'),
value: 'faculty',
},
{
text: 'University',
text: this.$t('study.university'),
value: 'university',
},
{
text: 'Start Date',
text: this.$t('study.startDate'),
value: 'startDate'
},
{

2
components/ui/rug/form/action/cancel.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<v-btn @click="onCancel">
cancel
{{ $t('ui.rug.form.action.cancel') }}
</v-btn>
</template>

2
components/ui/rug/form/action/save.vue

@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
<template>
<v-btn type="submit">Save</v-btn>
<v-btn type="submit">{{ $t('ui.rug.form.action.save') }}</v-btn>
</template>

2
layouts/error.vue

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
{{ otherError }}
</h1>
<NuxtLink to="/">
Home page
{{ $t('link.home') }}
</NuxtLink>
</v-app>
</template>

54
locales/en.js

@ -1,3 +1,55 @@ @@ -1,3 +1,55 @@
export default {
'welcome': 'Hello!',
'page.landing.title': 'The place to conduct your research',
'page.landing.introduction': 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.',
'page.landing.startButton': 'Get Started',
'page.studies.create.title': 'Add new study',
'page.studies.create.privacyStatement.title': 'Privacy statement',
'page.studies.create.privacyStatement.text': 'On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammeled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.',
'page.studies.study.contributors.contributor.invite.title': 'Invite contributor',
'page.studies.study.contributors.contributor.edit.title': 'Edit contributor',
'form.label.studyName': 'Study name',
'form.studyShortDescription': 'Study short description',
'form.projectCode': 'Project code',
'form.usesHumanSubjectData': 'Uses human subject data',
'form.studyField': 'Study field',
'form.contributorName': 'Contributor name',
'form.contributorEmail': 'Contributor email',
'form.role': 'Role',
'form.search': 'Search',
'link.home': 'Home page',
'link.researchStudies': 'Research studies',
'link.researchStudies.study.overview': 'Overview',
'link.researchStudies.study.contributors': 'Contributors',
'link.researchStudies.study.apps': 'Apps',
'link.researchStudies.study.settings': 'Settings',
'study.name': 'Name',
'study.access': 'Access',
'study.access.restricted': 'restricted',
'study.access.public': 'public',
'study.field': 'Field',
'study.faculty': 'Faculty',
'study.university': 'University',
'study.createdAt': 'Created at',
'study.updatedAt': 'Updated at',
'study.startDate': 'Start Date',
'conributor.role': 'Role',
'contributor.role.owner': 'OWNER',
'ui.rug.form.action.save': 'Save',
'ui.rug.form.action.cancel': 'Cancel',
'researchStudies.title': 'Research Studies',
'researchStudies.deleteButton.button': 'delete study',
'researchStudies.deleteButton.modal.title': 'Remove research study',
'researchStudies.deleteButton.modal.text': 'Are you sure you want to remove this research study?',
'researchStudies.deleteButton.modal.action.negative': 'No',
'researchStudies.deleteButton.modal.action.positive': 'Yes',
'researchStudies.createButton.button': 'Create',
'contributors.title': 'Contributors',
'contributors.inviteButton.button': 'Invite contributor',
'contributors.editoFrom.title': 'Edit contributor',
'contributors.editForm.cancel': 'Cancel',
'contributors.editForm.save': 'Save',
'contributors.inviteButton.modal.title': 'Remove contributor',
'contributors.inviteButton.modal.text': 'Are you sure you want to remove this contributor?',
'contributors.inviteButton.modal.negative': 'No',
'contributors.inviteButton.modal.positive': 'Yes'
}

91
nuxt.config.js

@ -23,7 +23,6 @@ export default { @@ -23,7 +23,6 @@ export default {
fetchOnServer: false,
// TODO trun on again, usefull for speed when developing, less rebuilding of code required on changes.
ssr: true,
// Global CSS: https://go.nuxtjs.dev/config-css
@ -76,7 +75,7 @@ export default { @@ -76,7 +75,7 @@ export default {
fallbackLocale: 'en',
// redirectOn: 'root',
useCookie: false,
cookieCrossOrigin: false,
cookieCrossOrigin: false,
cookieDomain: null,
cookieKey: 'i18n_redirected',
cookieSecure: false
@ -106,80 +105,16 @@ export default { @@ -106,80 +105,16 @@ export default {
},
},
/*
oidc: {
scheme: 'openIDConnect',
clientId: 'web-client',
endpoints: {
configuration: 'https://##endpoint##/.well-known/openid-configuration',
},
redirectUri: "/signin-oidc",
logoutRedirectUri: "/signout-callback-oidc",
idToken: {
property: 'id_token',
maxAge: 60 * 60 * 24 * 30,
prefix: '_id_token.',
expirationPrefix: '_id_token_expiration.'
},
responseType: 'code',
grantType: 'authorization_code',
scope: ['openid', 'profile', 'offline_access'],
codeChallengeMethod: 'S256',
}
}
*/
auth: {
cookie: false,
localStorage: false,
strategies: {
// openIDConnect: {
// scheme: 'openIDConnect',
// endpoints: {
// configuration: 'https://connect.test.surfconext.nl/.well-known/openid-configuration',
// },
// clientId: 'vre.web.rug.nl',
// redirectUri: '/redirect',
// idToken: {
// property: 'id_token',
// maxAge: 60 * 60 * 24 * 30,
// prefix: '_id_token.',
// expirationPrefix: '_id_token_expiration.'
// },
// responseType: 'code',
// grantType: 'authorization_code',
// scope: ['openid', 'profile', 'offline_access'],
// codeChallengeMethod: 'S256',
// },
refresh: {
token: {
property: 'access',
global: true,
// required: true,
type: 'JWT',
maxAge: 300,
},
refreshToken: {
property: 'refresh',
data: 'refresh',
maxAge: 60 * 60 * 24,
},
user: {
property: false,
autoFetch: false, // this is done with a store action from within the login component
// to be able to normalize the user profile coming from the server
},
cookie: {
endpoints: {
login: { url: '/api/auth/jwt/create/', method: 'post' },
// logout: { url: '/api/auth/logout', method: 'post' },
login: { url: '/auth/login/', method: 'get' },
user: { url: '/api/v1/researchers/me/', method: 'get' },
refresh: { url: '/api/auth/jwt/refresh', method: 'post' },
},
redirect: {
login: '/login',
logout: '/logout',
callback: false, // '/login',
},
}
}
},
}
},
@ -193,25 +128,13 @@ export default { @@ -193,25 +128,13 @@ export default {
},
proxy: [
'https://api-vre.web.rug.nl/api',
// 'https://api-vre.web.rug.nl/api',
],
// Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
vuetify: {
customVariables: ['~/assets/variables.scss'],
theme: {
// dark: true,
// themes: {
// dark: {
// primary: colors.blue.darken2,
// accent: colors.grey.darken3,
// secondary: colors.amber.darken3,
// info: colors.teal.lighten1,
// warning: colors.amber.base,
// error: colors.deepOrange.accent4,
// success: colors.green.accent3
// }
// }
themes: {
light: {
// https://vuetifyjs.com/en/styles/colors/#material-colors
@ -223,7 +146,7 @@ export default { @@ -223,7 +146,7 @@ export default {
success: colors.green,
warning: colors.orange,
}
}
}
}
},
// Paul: https://c60ba2eccd2e4facbcb88c599b6f5149@o1022157.ingest.sentry.io/5988257

8
package.json

@ -7,17 +7,13 @@ @@ -7,17 +7,13 @@
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "yarn lint:js",
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
"test": "yarn test:unit && yarn test:e2e",
"test:unit": "cross-env TEST=unit ava ./test/specs/**/*",
"test:e2e": "cross-env TEST=e2e ava ./test/e2e/**/*",
"feature:create": "source ./scripts/feature-create.sh",
"feature:merge": "source ./scripts/feature-merge.sh",
"deploy": "source ./scripts/deploy.sh",
"deploy:onserver": "source ./scripts/deploy-on-server.sh"
},
@ -29,8 +25,10 @@ @@ -29,8 +25,10 @@
"ajv-i18n": "^4.1.0",
"core-js": "^3.15.1",
"nuxt": "^2.15.7",
"vue": "^2.6.14",
"vue-types": "^4.1.0",
"vuetify": "^2.5.5"
"vuetify": "^2.5.5",
"vuex": "^3.6.2"
},
"devDependencies": {
"@ava/babel": "^1.0.1",

6
pages/landing.vue

@ -9,16 +9,16 @@ @@ -9,16 +9,16 @@
/>
<v-card-title>
The place to conduct your research
{{ $t('page.landing.title') }}
</v-card-title>
<v-card-text>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
{{ $t('page.landing.introduction') }}
</v-card-text>
<v-card-actions>
<v-btn :to="{ name: 'researchStudies'}">
Get Started
{{ $t('page.landing.startButton') }}
</v-btn>
</v-card-actions>
</v-card>

31
pages/login.vue

@ -6,17 +6,28 @@ @@ -6,17 +6,28 @@
export default {
layout: 'landing',
mounted() {
this.$auth.login({
data: {
"username": "p.scheltema@rug.nl",
"password": "Tralala1!"
}
})
.then(() => {
this.$auth.fetchUser().then((response) => {
this.$auth.setUser(response.data);
this.$auth.loginWith('cookie')
.then(() => {
console.log('cookie', arguments);
this.$auth.fetchUser().then((response) => {
this.$auth.setUser(response.data);
});
})
.catch(() => {
window.location.href = `https://api-vre.web.rug.nl/auth/login/?next=${location.origin}${this.$auth.$state.redirect}`;
});
});
// this.$auth.login({
// data: {
// "username": "p.scheltema@rug.nl",
// "password": "Tralala1!"
// }
// })
// .then(() => {
// this.$auth.fetchUser().then((response) => {
// this.$auth.setUser(response.data);
// });
// });
},
}
</script>

16
pages/studies/create.vue

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<ui-rug-card-form :form="form">
<ui-rug-card-title>
Add new study
{{ $t('page.studies.create.title') }}
</ui-rug-card-title>
<v-card-text class="d-flex flex-row mb-6">
@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
id="formData.name"
v-model="formData.name"
:error-messages="form.getError('formData.name')"
label="Study name"
:label="$t('form.studyName')"
@blur="form.onBlur"
></v-text-field>
@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
id="formData.description"
v-model="formData.description"
:error-messages="form.getError('formData.description')"
label="Study short description"
:label="$t('form.studyShortDescription')"
@blur="form.onBlur"
></v-text-field>
@ -27,13 +27,13 @@ @@ -27,13 +27,13 @@
id="formData.code"
v-model="formData.code"
:error-messages="form.getError('formData.code')"
label="Project code"
:label="$t('form.projectCode')"
@blur="form.onBlur"
></v-text-field>
<v-switch
v-model="formData.human_subject"
:label="`Uses human subject data`"
:label="$t('form.usesHumanSubjectData')"
></v-switch>
<v-select
@ -43,14 +43,14 @@ @@ -43,14 +43,14 @@
:items="studyFields"
item-text="name"
item-value="id"
label="Study field"
:label="$t('form.studyField')"
></v-select>
</div>
<div class="pa-2">
<h2>Privacy statement</h2>
<p>On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammeled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.</p>
<h2>{{ $t('page.studies.create.privacyStatement.title') }}</h2>
<p>{{ $t('page.studies.create.privacyStatement.text') }}</p>
</div>
</v-card-text>

4
pages/studies/study/contributors/contributor/edit.vue

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<v-container>
<ui-rug-card-form :form="form">
<ui-rug-card-title>
Edit contributor
{{ $t('page.studies.study.contributors.contributor.edit.title') }}
</ui-rug-card-title>
<v-card-text class="flex-row mb-6">
@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
:items="roles"
item-text="name"
item-value="id"
label="Role"
:label="$t('form.role')"
></v-select>
</v-card-text>

8
pages/studies/study/contributors/contributor/invite.vue

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
>
<ui-rug-card-form :form="form">
<ui-rug-card-title>
Invite contributor
{{ $t('page.studies.study.contributors.contributor.invite.title') }}
</ui-rug-card-title>
<v-card-text class="flex-row mb-6">
@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
id="formData.name"
v-model="formData.name"
:error-messages="form.getError('formData.name')"
label="Contributor name"
:label="$t('form.contributorName')"
@blur="form.onBlur"
></v-text-field>
@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
id="formData.email"
v-model="formData.email"
:error-messages="form.getError('formData.email')"
label="Contributor email"
:label="$t('form.contributorName')"
@blur="form.onBlur"
></v-text-field>
@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
:items="studyFields"
item-text="name"
item-value="id"
label="Study field"
:label="$t('form.studyField')"
></v-select>
</v-card-text>

16
pages/studies/study/overview.vue

@ -23,19 +23,19 @@ @@ -23,19 +23,19 @@
{{ study.description }}
</v-card-subtitle>
<v-card-text>
Access:
<span v-if="study.human_subject" class="warning--text">restricted</span>
<span v-else>public</span>
{{ $t('study.access') }}:
<span v-if="study.human_subject" class="warning--text">{{ $t('study.access.restricted') }}</span>
<span v-else>{{ $t('study.access.public') }}</span>
<br />
Field: {{ study.field.name }}
{{ $t('study.field') }}: {{ study.field.name }}
<br />
Faculty: {{ study.field.faculty.name }}
{{ $t('study.faculty') }}: {{ study.field.faculty.name }}
<br />
University: {{ study.field.faculty.university.name }}
{{ $t('study.university') }}: {{ study.field.faculty.university.name }}
<br />
Created at: {{ $d(new Date(study.created_at), 'long') }}
{{ $t('study.createdAt') }}: {{ $d(new Date(study.created_at), 'long') }}
<br />
Updated at: {{ $d(new Date(study.updated_at), 'long') }}
{{ $t('study.updatedAt') }}: {{ $d(new Date(study.updated_at), 'long') }}
</v-card-text>
</v-card>
</v-card-text>

2
yarn.lock

@ -10627,7 +10627,7 @@ vue-types@^4.1.0: @@ -10627,7 +10627,7 @@ vue-types@^4.1.0:
dependencies:
is-plain-object "5.0.0"
vue@^2.6.12:
vue@^2.6.12, vue@^2.6.14:
version "2.6.14"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235"
integrity sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==

Loading…
Cancel
Save