Skip to content

Commit

Permalink
send invitation
Browse files Browse the repository at this point in the history
  • Loading branch information
ipula committed May 29, 2024
1 parent 1ebe948 commit 3971eaa
Show file tree
Hide file tree
Showing 25 changed files with 340 additions and 2,112 deletions.
2 changes: 0 additions & 2 deletions src/components/Container/PageOJS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
import Page from '@/components/Container/Page.vue';
import SubmissionsPage from '@/pages/submissions/SubmissionsPage.vue';
import UserInvitationPage from '@/pages/userInvitation/UserInvitationPage.vue';
import AcceptInvitationPage from '@/pages/acceptInvitation/AcceptInvitationPage.vue';
export default {
components: {
SubmissionsPage,
UserInvitationPage,
AcceptInvitationPage,
},
extends: Page,
};
Expand Down
21 changes: 21 additions & 0 deletions src/composables/useForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export function useForm(_form) {
watch(
payload,
(newPayload) => {
console.log(newPayload);
Object.keys(newPayload).forEach((key) => {
if (doesFieldExist(form.value, key)) {
if (getValue(key) !== newPayload[key]) {
Expand All @@ -49,6 +50,25 @@ export function useForm(_form) {
);
}

function connectWithErrors(errors) {
console.log(errors);
watch(
errors,
(newErrors) => {
console.log(newErrors);
if (!newErrors) {
return;
}
Object.keys(newErrors).forEach((key) => {
if (doesFieldExist(form.value, key)) {
form.value.errors[key] = newErrors[key];
}
});
},
{deep: true},
);
}

function set(key, data) {
Object.keys(data).forEach(function (dataKey) {
form.value[dataKey] = data[dataKey];
Expand Down Expand Up @@ -109,5 +129,6 @@ export function useForm(_form) {
clearForm,
form,
connectWithPayload,
connectWithErrors,
};
}
24 changes: 0 additions & 24 deletions src/pages/acceptInvitation/AcceptInvitationCreateUserAccount.vue

This file was deleted.

20 changes: 0 additions & 20 deletions src/pages/acceptInvitation/AcceptInvitationCreateUserForms.vue

This file was deleted.

17 changes: 0 additions & 17 deletions src/pages/acceptInvitation/AcceptInvitationHeader.vue

This file was deleted.

9 changes: 0 additions & 9 deletions src/pages/acceptInvitation/AcceptInvitationPage.mdx

This file was deleted.

28 changes: 0 additions & 28 deletions src/pages/acceptInvitation/AcceptInvitationPage.stories.js

This file was deleted.

Loading

0 comments on commit 3971eaa

Please sign in to comment.