tethys.backend/resources/js/Pages/register-view/register-view-component.ts
Arno Kaimbacher 4714dfdd94
All checks were successful
CI Pipeline / japa-tests (push) Successful in 46s
- use latest prettier 3.0 with eslint-plugin-prettier: 5.0.0-alpha.2
- npm normal updates
- add all xslt and style asstes in extra folder public/assets2
- linting corrections
- delete local .env.test from git tracking: git rm --cached .env.test
- add .env.test into .gitignore file
- add edit functionality for editing by submitter
- npm updates
-added xslt3 packeage for builfing sef files
- added Language.ts class vor language table
- added version to datasetxml2oai-pmh.xslt
2023-07-17 19:13:30 +02:00

70 lines
1.6 KiB
TypeScript

import { Component, Vue, Prop } from 'vue-facing-decorator';
import AuthLayout from '@/Layouts/Auth.vue';
// import { Inertia } from '@inertiajs/inertia';
import { NButton } from 'naive-ui';
import { useForm, InertiaForm, router } from '@inertiajs/vue3';
import FormInput from '@/Components/FormInput.vue'; // @/Components/FormInput.vue'
// import { defineComponent, reactive } from 'vue';
// export default defineComponent({
// layout: AuthLayout,
// components: {
// NButton,
// FormInput,
// },
// setup() {
// // const form = useForm({
// // email: '',
// // password: ''
// // });
// const form = reactive({
// email: null,
// password: null,
// });
// const submit = async () => {
// await Inertia.post('/app/register', form);
// };
// return { form, submit };
// },
// });
export interface IErrorMessage {
[key: string]: Array<string>;
}
@Component({
options: {
layout: AuthLayout,
},
name: 'RegisterViewComponent',
components: {
NButton,
FormInput,
},
})
export default class RegisterViewComponent extends Vue {
// Component Property
@Prop({
type: Object,
default: () => ({}),
})
public errors: IErrorMessage;
// Data Property
public form: InertiaForm<any> = useForm({
email: '',
password: '',
});
public results: Array<any> = [];
// Component method
public async submit(): Promise<void> {
// await Inertia.post('/app/register', this.form);
await router.post('/app/register', this.form);
}
}