- prepare messages
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
messages: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<InertiaHead title="Wiadomości" />
|
||||
<div class="p-4">
|
||||
@@ -5,30 +14,42 @@
|
||||
<h1 class="text-3xl font-roboto font-light">Wiadomości</h1>
|
||||
</header>
|
||||
<div class="overflow-x-auto">
|
||||
<table v-if="cvs.data.length" class="w-full min-w-[600px] border-separate border-spacing-y-2 cursor-pointer">
|
||||
<table v-if="messages.data.length" class="table-fixed w-full min-w-[600px] border-separate border-spacing-y-2 cursor-pointer">
|
||||
<colgroup>
|
||||
<col class="w-min" />
|
||||
<col class="w-[40px] max-w-[60px]" />
|
||||
<col class="w-[250px]" />
|
||||
<col class="w-auto" />
|
||||
<col class="w-[50px]" />
|
||||
</colgroup>
|
||||
<thead class="text-left bg-gray-100">
|
||||
<th class="p-2 text-center">ID</th>
|
||||
<th class="p-2">Wysyłający</th>
|
||||
<th class="w-[100px] p-2 whitespace-nowrap">E-mail</th>
|
||||
<th class="p-2"></th>
|
||||
<th class="w-[40px] max-w-[60px] p-2 text-center">ID</th>
|
||||
<th class="w-[250px] p-2">Wysyłający</th>
|
||||
<th class="p-2">E-mail</th>
|
||||
<th class="w-[50px] p-2"></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- <InertiaLink
|
||||
<InertiaLink
|
||||
as="tr"
|
||||
v-for="(cv, key) in cvs.data"
|
||||
v-for="(message, key) in messages.data"
|
||||
:key="key"
|
||||
class="px-3 py-2 bg-white hover:bg-neutral-200 rounded-md z-10"
|
||||
:href="`/dashboard/message/${cv.token}`">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</InertiaLink> -->
|
||||
:href="`/dashboard/message/${message.id}`">
|
||||
<td class="p-2 w-[60px] text-center">#{{ message.id }}</td>
|
||||
<td class="p-2 whitespace-nowrap overflow-hidden overflow-ellipsis">{{ message.sender }}</td>
|
||||
<td class="p-2">{{ message.email }}</td>
|
||||
<td class="flex items-center justify-end gap-2 p-3 z-50">
|
||||
<InertiaLink
|
||||
as="button"
|
||||
class="px-3 py-3 text-red-600 hover:text-red-800"
|
||||
:href="`/dashboard/message/${message.id}/delete`"
|
||||
title="Usuń projekt z listy"><FontAwesomeIcon :icon="['fas', 'trash']" /></InertiaLink>
|
||||
</td>
|
||||
</InertiaLink>
|
||||
</tbody>
|
||||
</table>
|
||||
<div v-else>
|
||||
Lista pusta!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@@ -27,9 +27,8 @@ defineProps({
|
||||
</InertiaLink>
|
||||
<nav>
|
||||
<ul class="flex gap-3 items-center font-bold">
|
||||
<li><InertiaLink class="text-white active:text-kamilcraft-green hover:text-black hover:underline" href="/dashboard">Dashboard</InertiaLink></li>
|
||||
<li><InertiaLink class="text-white active:text-kamilcraft-green hover:text-black hover:underline" href="/dashboard/cv">CV</InertiaLink></li>
|
||||
<li><InertiaLink class="text-white active:text-kamilcraft-green hover:text-black hover:underline" href="/dashboard/message">Wiadomości</InertiaLink></li>
|
||||
<li><InertiaLink class="text-white active:text-kamilcraft-green hover:text-black hover:underline" href="/dashboard/message">Msg</InertiaLink></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user