<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="//cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css" type="text/css"/>
    <style>
        table {
            font-family: arial, sans-serif;
            border-collapse: collapse;
            width: 100%;
        }

        td, th {
            border: 1px solid #dddddd;
            text-align: left;
            padding: 8px;
        }

        tr:nth-child(even) {
            background-color: #dddddd;
        }
    </style>
</head>
<body>
<table style="width: 100%">
    <thead>
    <tr>
        <th>id</th>
        <th>Name</th>
        <th>Contact person</th>
        <th>Email</th>
        <th>Document</th>
        <th>Member list</th>
        <th>Type</th>
        <th>created at</th>
    </tr>
    </thead>
    <tbody>
        @foreach($data as $form)
            <tr>
                <td>{{$form->id}}</td>
                <td>{{$form->name}}</td>
                <td>{{$form->contactPerson}}</td>
                <td>{{$form->email}}</td>
                <td> @if($form->documentId) <a href="/api/upload-form/get-file/{{$form->documentId}}" target="_blank">Download</a> @endif </td>
                <td> @if($form->memberListId) <a href="/api/upload-form/get-file/{{$form->memberListId}}" target="_blank">Download</a> @endif </td>
                <td>{{$form->type == 0 ? "VvE beheerder" : "VvE"}}</td>
                <td>{{$form->created_at}}</td>
            </tr>
        @endforeach
    </tbody>


</table>
</body>
<script src="https://code.jquery.com/jquery-3.4.1.min.js" type="text/javascript"></script>
<script src="//cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script>
    $(document).ready( function () {
        $('table').DataTable();
    } );
</script>
</html>
