‫Let's now upload some sample data to Supabase,
‫so that we have some more real data to actually work with.
‫So here in the data folder, we have three JavaScript files,
‫which contains data about booking, cabins and guests.
‫And then we have this uploader component.
‫So this here does a bunch of stuff.
‫So it has all these different functions to delete
‫and create all of these new resources.
‫But what this does is not really important.
‫What matters is that we can now import this component,
‫and then that will give us two buttons.
‫One will be to upload all sample data,
‫which we'll first delete all of them,
‫and then create new ones.
‫And then we will get a button to only upload the bookings.
‫All right, and so again, that's this,
‫yeah, this uploader component right here.
‫And so we will now include this in our sidebar,
‫so like down here so that during development,
‫we can keep it there,
‫and re-upload our sample data whenever we need it.
‫So here in our sidebar bar,
‫let's include it down here after the navigation.
‫So uploader, and then, there we go.
‫And so let's actually now click on Upload All,
‫and there we get some errors here.
‫And the reason for that is
‫that we didn't set the role-level security policies
‫on the bookings table yet.
‫So let's go do that here in Authentication,
‫and then Policies.
‫And indeed we have this on the cabins and even the settings,
‫but not on the guests and the bookings.
‫And so let's now, again, do all of that.
‫So you'll always start with this template,
‫and Select we already have, so next we use Insert.
‫So then we need to write True and save.
‫And well, it tells me this already exists,
‫but it actually doesn't.
‫So maybe, well, let's try this again.
‫Ah, yeah, I didn't change the name of the policy,
‫so that was the problem.
‫At least, I hope so.
‫And there we go.
‫Now lets add the other ones.
‫And again, we will later then do this only
‫for authenticated users.
‫Okay, and finally to delete as well.
‫And now the same thing on the guests, so Insert.
‫As always, just write True in there.
‫And now only two more to go.
‫And yeah, now we're only missing the delete one.
‫Now, okay.
‫Now let's come back here, let's reload,
‫and let's upload all again.
‫And so that will then delete everything.
‫Then here we get some locks for some reason.
‫And now when I reload this, then beautiful.
‫So we have all of these different bookings here,
‫all in this one table.
‫So basically each cabin has three bookings.
‫And these dates here,
‫they also should be updated to your own dates.
‫So basically these dates here are generated dynamically,
‫and here we can also see the three statuses
‫that a booking can be in.
‫So you see that some of these are checked out,
‫which makes sense because the guest arrived five days ago,
‫but only stayed for three nights,
‫and so by now, they are already gone.
‫Then this one here is checked in
‫because they arrived six days ago,
‫and have a five night stay,
‫which means that they are checking out today,
‫which is actually May 15th right now.
‫Okay, so you can analyze this data if you want.
‫Then here we also have all the eight cabins.
‫Now the images, you need to actually upload them separately,
‫so that doesn't happen automatically,
‫but I believe that we apparently already did that.
‫So otherwise we would get some errors there.
‫And so yeah, indeed, they are here.
‫But if you didn't upload them manually yet,
‫then you need to do that.
‫So our uploader component doesn't do that.
‫But anyway, with this, we are now ready
‫to also implement the Filter and Sort By right here
‫in this bookings table.
‫And so let's now move on and do that.