import { graphql } from '@/graphql/graphql'; import { DashboardRouteDefinition, DetailPageButton, ListPage } from '@vendure/dashboard'; const getReviewList = graphql(` query GetProductReviews($options: ProductReviewListOptions) { productReviews(options: $options) { items { id createdAt updatedAt product { id name } productVariant { id name sku } summary body rating authorName authorLocation upvotes downvotes state response responseCreatedAt customFields { reviewerName } } } } `); export const reviewList: DashboardRouteDefinition = { navMenuItem: { sectionId: 'catalog', id: 'reviews', url: '/reviews', title: 'Product Reviews', }, path: '/reviews', loader: () => ({ breadcrumb: 'Reviews', }), component: route => ( { return ; }, }, product: { header: 'Product', cell: ({ row }) => { return ; }, }, reviewerName: { header: 'Reviewer Name', cell: ({ row }) => { return
{row.original.customFields?.reviewerName}
; }, }, }} /> ), };