feat(dashboard, medusa, medusa-js, medusa-react, icons): DataGrid, partial Product domain, and ProductVariant hook (#6428)
The PR for the Products section is growing quite large, so I would like to merge this PR that contains a lot of the ground work before moving onto finalizing the rest of the domain. **Note** Since the PR contains changes to the core, that the dashboard depends on, the staging env will not work. To preview this PR, you will need to run it locally. ## `@medusajs/medusa` **What** - Adds missing query params to `GET /admin/products/:id/variants` - `options.values` has been added to the default relations of admin product endpoints. ## `medusa-react` **What** - Adds missing hook for `GET /admin/products/:id/variants` ## `@medusajs/dashboard` - Adds base implementation for `DataGrid` component (formerly `BulkEditor`) (WIP) - Adds `/products` overview page - Adds partial `/products/create` page for creating new products (WIP - need to go over design w/ Ludvig before continuing) - Adds `/products/:id` details page - Adds `/products/:id/gallery` page for inspecting a products images in fullscreen. - Adds `/products/:id/edit` page for editing the general information of a product - Adds `/products/:id/attributes` page for editing the attributes information of a product - Adds `/products/:id/sales-channels` page for editing which sales channels a product is available in - Fixes a bug in `DataTable` where a table with two fixed columns would not display correctly For the review its not important to test the DataGrid, as it is still WIP, and I need to go through some minor changes to the behaviour with Ludvig, as virtualizing it adds some constraints. ## `@medusajs/icons` **What** - Pulls latest icons from Figma ## TODO in next PR - [ ] Fix the typing of POST /admin/products/:id as it is currently not possible to delete any of the nullable fields once they have been added. Be aware of this when reviewing this PR. - [ ] Wrap up `/products/create` page - [ ] Add `/products/:id/media` page for managing media associated with the product. - [ ] Add `/products/id/options` for managing product options (need Ludvig to rethink this as the current API is very limited and we can implement the current design as is.) - [ ] Add `/products/:id/variants/:id` page for editing a variant. (Possibly concat all of these into one BulkEditor page?)
This commit is contained in:
@@ -48,14 +48,47 @@
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"continue": "Continue",
|
||||
"edit": "Edit"
|
||||
"edit": "Edit",
|
||||
"download": "Download"
|
||||
},
|
||||
"errorBoundary": {
|
||||
"badRequestTitle": "Bad request",
|
||||
"badRequestMessage": "The request was invalid.",
|
||||
"notFoundTitle": "Not found",
|
||||
"notFoundMessage": "The page you are looking for does not exist.",
|
||||
"internalServerErrorTitle": "Internal server error",
|
||||
"internalServerErrorMessage": "An error occurred on the server.",
|
||||
"defaultTitle": "An error occurred",
|
||||
"defaultMessage": "An error occurred while rendering this page."
|
||||
},
|
||||
"products": {
|
||||
"domain": "Products",
|
||||
"createProductTitle": "Create Product",
|
||||
"createProductHint": "Create a new product to sell in your store.",
|
||||
"deleteWarning": "You are about to delete the product {{title}}. This action cannot be undone.",
|
||||
"variants": "Variants",
|
||||
"attributes": "Attributes",
|
||||
"editProduct": "Edit Product",
|
||||
"editAttributes": "Edit Attributes",
|
||||
"organization": "Organization",
|
||||
"editOrganization": "Edit Organization",
|
||||
"options": "Options",
|
||||
"editOptions": "Edit Options",
|
||||
"media": "Media",
|
||||
"editMedia": "Edit Media",
|
||||
"deleteMedia_one": "You are about to delete {{count}} media item. This action cannot be undone.",
|
||||
"deleteMedia_other": "You are about to delete {{count}} media items. This action cannot be undone.",
|
||||
"deleteMediaAndThumbnail_one": "You are about to delete {{count}} media item including the thumbnail. This action cannot be undone.",
|
||||
"deleteMediaAndThumbnail_other": "You are about to delete {{count}} media items including the thumbnail. This action cannot be undone.",
|
||||
"gallery": "Gallery",
|
||||
"titleHint": "Give your product a short and clear title.<0/>50-60 characters is the recommended length for search engines.",
|
||||
"descriptionHint": "Give your product a short and clear description.<0/>120-160 characters is the recommended length for search engines.",
|
||||
"handleTooltip": "The handle is used to reference the product in your storefront. If not specified, the handle will be generated from the product title.",
|
||||
"availableInSalesChannels": "Available in <0>{{x}}</0> of <1>{{y}}</1> sales channels",
|
||||
"noSalesChannels": "Not available in any sales channels",
|
||||
"variantCount_one": "{{count}} variant",
|
||||
"variantCount_other": "{{count}} variants",
|
||||
"deleteVariantWarning": "You are about to delete the variant {{title}}. This action cannot be undone.",
|
||||
"productStatus": {
|
||||
"draft": "Draft",
|
||||
"published": "Published",
|
||||
@@ -365,6 +398,17 @@
|
||||
"tag": "Tag",
|
||||
"dateIssued": "Date issued",
|
||||
"issuedDate": "Issued date",
|
||||
"expiryDate": "Expiry date"
|
||||
"expiryDate": "Expiry date",
|
||||
"height": "Height",
|
||||
"width": "Width",
|
||||
"length": "Length",
|
||||
"weight": "Weight",
|
||||
"midCode": "MID Code",
|
||||
"hsCode": "HS Code",
|
||||
"countryOfOrigin": "Country of Origin",
|
||||
"material": "Material",
|
||||
"thumbnail": "Thumbnail",
|
||||
"sku": "SKU",
|
||||
"managedInventory": "Managed inventory"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user