- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dashboard) admin 3.0 return creation #6713
Conversation
…d some labels, align UI with the design
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
defaultValues: { | ||
quantity: {}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: make sure to initialize a default value for every value in a form. Otherwise, React will throw warnings for the fields because the change from being unmanaged to managed, and the form will initialize as being dirty, meaning that the user will see the prompt that they have unsaved changes even if they haven't touched the form.
# Conflicts: # packages/admin-next/dashboard/public/locales/en-US/translation.json # packages/admin-next/dashboard/src/providers/router-provider/router-provider.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some minor things that should be addressed before merging
packages/admin-next/dashboard/public/locales/en-US/translation.json
Outdated
Show resolved
Hide resolved
...next/dashboard/src/routes/orders/returns-create/components/create-returns/create-returns.tsx
Outdated
Show resolved
Hide resolved
<Form.Field | ||
control={form.control} | ||
name="location" | ||
render={({ field: { onChange, ref, ...field } }) => { | ||
return ( | ||
<Form.Item> | ||
<Form.Control> | ||
<Select onValueChange={onChange} {...field}> | ||
<Select.Trigger className="bg-ui-bg-base" ref={ref}> | ||
<Select.Value /> | ||
</Select.Trigger> | ||
<Select.Content> | ||
{stock_locations.map((l) => ( | ||
<Select.Item key={l.id} value={l.id}> | ||
{l.name} | ||
</Select.Item> | ||
))} | ||
</Select.Content> | ||
</Select> | ||
</Form.Control> | ||
<Form.ErrorMessage /> | ||
</Form.Item> | ||
) | ||
}} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edge case, but I think we need to disable this and wrap it in a tooltip in the case that there isn't any return shipping options for the region.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean disable select for shipping options, or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, meant shipping options, marked the wrong part 😅
...n-next/dashboard/src/routes/orders/returns-create/components/create-returns/returns-form.tsx
Outdated
Show resolved
Hide resolved
...in-next/dashboard/src/routes/orders/returns-create/components/create-returns/return-item.tsx
Outdated
Show resolved
Hide resolved
...next/dashboard/src/routes/orders/returns-create/components/create-returns/create-returns.tsx
Outdated
Show resolved
Hide resolved
...in-next/dashboard/src/routes/orders/returns-create/components/create-returns/return-item.tsx
Outdated
Show resolved
Hide resolved
...in-next/dashboard/src/routes/orders/returns-create/components/create-returns/return-item.tsx
Outdated
Show resolved
Hide resolved
...next/dashboard/src/routes/orders/returns-create/components/create-returns/create-returns.tsx
Outdated
Show resolved
Hide resolved
...next/dashboard/src/routes/orders/returns-create/components/create-returns/create-returns.tsx
Outdated
Show resolved
Hide resolved
...next/dashboard/src/routes/orders/returns-create/components/create-returns/create-returns.tsx
Outdated
Show resolved
Hide resolved
...n-next/dashboard/src/routes/orders/returns-create/components/create-returns/returns-form.tsx
Outdated
Show resolved
Hide resolved
...n-next/dashboard/src/routes/orders/returns-create/components/create-returns/returns-form.tsx
Outdated
Show resolved
Hide resolved
...n-next/dashboard/src/routes/orders/returns-create/components/create-returns/returns-form.tsx
Outdated
Show resolved
Hide resolved
...n-next/dashboard/src/routes/orders/returns-create/components/create-returns/returns-form.tsx
Outdated
Show resolved
Hide resolved
# Conflicts: # packages/admin-next/dashboard/public/locales/en-US/translation.json # packages/admin-next/dashboard/src/providers/router-provider/v1.tsx
What