You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some bugs here as well but I feel the generate command needs some attention. At the moment blitz generate all will only provide forms with a LabeledTextField component that works with the string, uuid, json?, and datetime types.
When creating a new app and using the generate command to scaffold an idea, it would be great to have a functioning app without modifying any code.
Without any modifications after generating, the following errors occur:
With int, number, bigint, float, decimal, the form says: Expected number, received string.
WIth boolean, the form says: Expected boolean, received string.
With belongsTo:model, the page fails to compile with error Module not found: Can't resolve 'src/core/components/LabelSelectField'. And an additional error since v2.0.2, in the usePaginatedQuery it uses a get query but uses the /src/model/ directory instead of the new /src/app/model/ directory.
With datetime, it works with the string type if a full ISO 8601 datetime is used. However, this only works after modifying the CreateSchema as there is an extra function call and produces the error TypeError: zod__WEBPACK_IMPORTED_MODULE_0__.z.string(...).datetime(...) is not a function
Possible implementation(s)
I'm suggesting a better defaultCodegenConfig with more starter components. This could include:
working number input
date picker for datetime
simple checkbox input for boolean
select with options for selecting a parent model
cloned form for creating a child while creating a parent
The text was updated successfully, but these errors were encountered:
It would be great to have a best practice generated by the scaffolding to handle boolean fields and fields of type number. In both cases, I struggle with when to transform the data to string … and when to transform it back … and how to create nice Zod schemas / TS for both.
What do you want and why?
There are some bugs here as well but I feel the generate command needs some attention. At the moment
blitz generate all
will only provide forms with a LabeledTextField component that works with the string, uuid, json?, and datetime types.When creating a new app and using the generate command to scaffold an idea, it would be great to have a functioning app without modifying any code.
Without any modifications after generating, the following errors occur:
With int, number, bigint, float, decimal, the form says:
Expected number, received string
.WIth boolean, the form says:
Expected boolean, received string
.With belongsTo:model, the page fails to compile with error
Module not found: Can't resolve 'src/core/components/LabelSelectField'
. And an additional error since v2.0.2, in the usePaginatedQuery it uses a get query but uses the /src/model/ directory instead of the new /src/app/model/ directory.With datetime, it works with the string type if a full ISO 8601 datetime is used. However, this only works after modifying the CreateSchema as there is an extra function call and produces the error
TypeError: zod__WEBPACK_IMPORTED_MODULE_0__.z.string(...).datetime(...) is not a function
Possible implementation(s)
I'm suggesting a better defaultCodegenConfig with more starter components. This could include:
The text was updated successfully, but these errors were encountered: