singleton and embed records

This commit is contained in:
2024-10-05 15:19:53 +03:00
parent 07b72b0a2c
commit 52a1ec5c5a
18 changed files with 262 additions and 148 deletions
@@ -1,5 +1,6 @@
<script>
import {getContext} from "svelte";
import axios from "axios";
const channel = getContext("channel");
export let selected;
@@ -24,7 +25,7 @@
axios
.post(channel.lucentUrl + "/records/status/" + status, {
schemaName: schema.name,
records: selected
records: selected.map((s) => s.id),
})
.then((response) => {
window.location.reload();
@@ -50,20 +51,6 @@
</button
>
{#if filter["status_in"] === "trashed"}
<button
on:click|preventDefault={(e) => changeStatus(e, "published")}
type="button"
class="button">Publish
</button
>
{#if schema.hasDrafts}
<button
on:click|preventDefault={(e) => changeStatus(e, "draft")}
type="button"
class="button">Make Draft
</button
>
{/if}
<button
on:click|preventDefault={deleteRecords}
type="button"