Skip to content
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

Merged
merged 24 commits into from
Mar 22, 2024
Merged

Conversation

fPolic
Copy link
Contributor

@fPolic fPolic commented Mar 15, 2024

What

  • request return flow

Copy link

changeset-bot bot commented Mar 15, 2024

⚠️ No Changeset found

Latest commit: 1dc549f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Mar 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2024 4:40pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Mar 22, 2024 4:40pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Mar 22, 2024 4:40pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Mar 22, 2024 4:40pm

Comment on lines 51 to 53
defaultValues: {
quantity: {},
},
Copy link
Contributor

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
@fPolic fPolic marked this pull request as ready for review March 18, 2024 19:44
@fPolic fPolic requested review from a team as code owners March 18, 2024 19:44
Copy link
Contributor

@kasperkristensen kasperkristensen left a 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

Comment on lines 175 to 199
<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>
)
}}
/>
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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 😅

# Conflicts:
#	packages/admin-next/dashboard/public/locales/en-US/translation.json
#	packages/admin-next/dashboard/src/providers/router-provider/v1.tsx
@kodiakhq kodiakhq bot merged commit 2ae8eaa into develop Mar 22, 2024
24 checks passed
@kasperkristensen kasperkristensen deleted the feat/admin-3.0-returns branch March 24, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants