Add view link for hidden event types

pull/115/head
Bailey Pumfleet 2021-04-28 10:27:45 +01:00
parent c320b0f20d
commit 4d585505f7
1 changed files with 2 additions and 0 deletions

View File

@ -154,6 +154,7 @@ export default function Availability(props) {
{eventType.length} minutes
</td>
<td className="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
{eventType.hidden && <Link href={"/" + props.user.username + "/" + eventType.id}><a className="text-blue-600 hover:text-blue-900 mr-2">View</a></Link>}
<Link href={"/availability/event/" + eventType.id}><a className="text-blue-600 hover:text-blue-900">Edit</a></Link>
</td>
</tr>
@ -337,6 +338,7 @@ export async function getServerSideProps(context) {
},
select: {
id: true,
username: true,
startTime: true,
endTime: true
}