-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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): claims first implementation #8468
Conversation
# Conflicts: # packages/admin-next/dashboard/src/providers/router-provider/route-map.tsx # packages/admin-next/dashboard/src/routes/orders/order-create-return/return-create.tsx # packages/admin-next/dashboard/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
|
@riqwan, I would be OK with merging this to |
@olivermrbl yes, much prefer that. Don't know why this was introduced. |
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.
Overall LGTM, left a few comments and questions
// TODO: GET /claims/:id is not implemented | ||
// const { claim } = useClaim(activeClaimId, undefined, { | ||
// enabled: !!activeClaimId, | ||
// }) |
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.
todo: This was introduced yesterday. Maybe just replace it in a follow-up PR
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.
Its already replaced here
className="flex-shrink" | ||
variant="transparent" | ||
onClick={() => { | ||
onUpdate({ reason_id: null }) // TODO BE: we should be able to set to unset reason here |
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.
todo: Should be possible as of yesterday
variant="transparent" | ||
onClick={() => { | ||
onUpdate({ reason_id: null }) // TODO BE: we should be able to set to unset reason here | ||
form.setValue(`inbound_items.${index}.reason_id`, "") |
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.
nit:
form.setValue(`inbound_items.${index}.reason_id`, "") | |
form.setValue(`inbound_items.${index}.reason_id`, null) |
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.
I'll keep this here as is, its changed in my current PR
), | ||
outbound_items: z.array( | ||
z.object({ | ||
item_id: z.string(), // TODO: variant id? |
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.
comment: Yeah I think we need to be able to pass variants here. We don't have the item ID upfront, as far as I can see. We can tackle that when we add support for outbound items.
limit: 999, | ||
fields: "*prices,+service_zone.fulfillment_set.location.id", | ||
/** | ||
* TODO: this should accept filter for location_id |
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.
question: Do we have a ticket for this?
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.
Just created it now
) | ||
|
||
return Promise.resolve({ | ||
inbound_items: previewItems.map((i) => ({ |
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.
question: Will likely need outbound items too when added right?
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, haven't gotten to outbound yet.
if (!item.variant_id) { | ||
return undefined | ||
} | ||
return await sdk.admin.product.retrieveVariant( |
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/though: can we use list
?
@olivermrbl Will port over the changes to the current branch i'm working on 🤞🏻 |
what: