Clients - Vue Updates - #361
Conversation
7e0699e to
c88c558
Compare
|
Good call on skipping the margin issue for now, this PR is already big enough |
| password: form.password.value ?? '', | ||
| confirmPassword: form.confirmPassword.value ?? '', | ||
| } | ||
| register(createAccountInput) |
There was a problem hiding this comment.
Shouldn't form validation handle this and we should just be able to pass the form to the API call? Why do we need to manually extract each field?
There was a problem hiding this comment.
This is a known bad interaction between tn-forms and typescript.
Even after validating the form, the type of the form value fields are <type> | undefined
Ideally, after form validation, the form.value should have the right required field types
I'm pushing for a good TS update to tn-forms but I don't think it is something that will come soon 😅
There was a problem hiding this comment.
Yea the issue is that the actual definition of the form field values in the form is
<type>|undefined
Because value is an optional field
In addition to Dami's work I was thinking we could just add a type caster to avoid the issue
| const loginForm = reactive(new LoginForm({})) | ||
| const forgotPasswordForm = reactive(new EmailForgotPasswordForm({})) | ||
| const resetPasswordForm = reactive(new ResetPasswordForm({})) | ||
| const registerForm = reactive(new AccountForm({})) |
There was a problem hiding this comment.
ahh need to fix this, we dont need to use the FormLevelValidator here and can just add it as it was
| Welcome to {{ cookiecutter.project_name }}! | ||
| </h1> | ||
| <h1 class="text-4xl font-bold tracking-tight text-gray-900 sm:text-6xl">Welcome to vuets!</h1> | ||
| <p class="mt-6 text-lg leading-8 text-gray-600"> |
There was a problem hiding this comment.
I think you accidentally replaced the cookiecutter bindings with your project
paribaker
left a comment
There was a problem hiding this comment.
Some of the bindings changed, can we also add the updated tn-models here with the .readonly
|
For tn models upgrade check #369 |
|
I assume we'll merge #369 first, and then rebase and merge this PR. |
08de420 to
855a49c
Compare
|
@lakardion I like the changes you've made! The SFCs are a big improvement and I've been wanting to make the use of arrow functions consistent so thank you!! Looks like it's mostly been reviewed already so just adding this tiny note on the styling, I'm assuming it'll be picked up in the margin/padding PR though
|
## Checklist - [x] Move to SFCs (more concise and the current tendency) - [x] Use Typescript for real in vue components - [x] Move any JS to TS - [x] Remove class-based styling, instead componentize and use tailwind - ~Erradicate use of margins. Use paddings instead.~ I think I'm gonna leave this for another PR

Checklist
Erradicate use of margins. Use paddings instead.I think I'm gonna leave this for another PR