From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Admin orders search

Admin orders search

Alright guys, so we want to do the same thing that we are able to do with products with orders We want to be able to search them and filter them and we want to search by the the name now right now We don't have the name displayed in the table. So I do want to show that So let's actually do that first. So if we go to admin orders page and Let's add a new Let's see, where do we want to put this? So let's put it after the date. So right after the date, let's change that to buyer. And then, let's see, we want to go right after the date, which is right here. And let's have a new table cell. And then we want to show the order.user.name. We should be able to get that. And there we go, so John Doe. OK, now in order for this to work, we have to add to our Get All Orders action, because that needs to account for the query, because that's where we get the data from. So let's go to our Lib Actions, and then we want to go to Order Actions. And let's go to Get All Orders. Just search for Get All…

Contents