2023-10-02 23:10:49 +03:00
|
|
|
<script>
|
2026-04-20 21:07:35 +03:00
|
|
|
import { getContext, onMount } from "svelte";
|
|
|
|
|
import RecordRow from "./RecordRow.svelte";
|
2023-10-02 23:10:49 +03:00
|
|
|
|
|
|
|
|
const channel = getContext("channel");
|
|
|
|
|
let records = [];
|
|
|
|
|
let graph = null;
|
|
|
|
|
let users = [];
|
|
|
|
|
onMount(() => {
|
|
|
|
|
axios
|
|
|
|
|
.get(channel.lucentUrl + "/home/records")
|
|
|
|
|
.then((response) => {
|
|
|
|
|
records = response.data.records;
|
|
|
|
|
graph = response.data.graph;
|
|
|
|
|
users = response.data.users;
|
|
|
|
|
})
|
|
|
|
|
.catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
2024-08-15 14:44:53 +03:00
|
|
|
<h3 class="header-small mb-4 mt-5">Latest Content changes</h3>
|
|
|
|
|
{#if records.length > 0}
|
|
|
|
|
<div class="table">
|
|
|
|
|
<table class="">
|
|
|
|
|
<tbody>
|
2026-04-20 21:07:35 +03:00
|
|
|
{#each records as record (record.id)}
|
|
|
|
|
<tr>
|
|
|
|
|
<RecordRow {graph} {record} {users} />
|
|
|
|
|
</tr>
|
|
|
|
|
{/each}
|
2024-08-15 14:44:53 +03:00
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|