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: products crud ui #161

Merged
merged 14 commits into from
Apr 26, 2024
Merged

feat: products crud ui #161

merged 14 commits into from
Apr 26, 2024

Conversation

joelhooks
Copy link
Collaborator

@joelhooks joelhooks commented Apr 25, 2024

shopping

Copy link

vercel bot commented Apr 25, 2024

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

Name Status Preview Comments Updated (UTC)
course-builder-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2024 6:29pm
course-builder-poc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2024 6:29pm
pro-aws ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2024 6:29pm

still need to actually do the round trip update to stripe product and price
})

return (
<EditProductFormDesktop
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Product is fairly similar to a ContentResource but is it's own database table so here I'm just copying it to get this running and will probably be able to merge the two in the near future

Comment on lines +9 to +24
export function CreateProductCard({
onCreate,
createProduct,
}: {
onCreate: (product: Product) => Promise<void>
createProduct: (values: NewProduct) => Promise<Product | null>
}) {
return (
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2"></CardHeader>
<CardContent>
<CreateProductForm onCreate={onCreate} createProduct={createProduct} />
</CardContent>
</Card>
)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the general resource CRUD forms absolutely should handle these but duplication made it simpler for now

Comment on lines +7 to +9
import { EventDetails } from '@/pricing/event-details'
import { EventPricingWidget } from '@/pricing/event-pricing-widget'
import { PriceCheckProvider } from '@/pricing/pricing-check-context'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

migrated all the components/methods out of here and into an upper level module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant