content and edit record
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<script>
|
||||
import Switch from "../../common/Switch.svelte";
|
||||
|
||||
export let status = "draft";
|
||||
export let record;
|
||||
function updateStatus(e) {
|
||||
|
||||
if(e.target.checked){
|
||||
status = "published";
|
||||
}else{
|
||||
status = "draft";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
{#if record.status !== "trashed"}
|
||||
<Switch value="published" on:change={updateStatus} checked={record.status === "published"}></Switch>
|
||||
{/if}
|
||||
{#if record.status === "published"}
|
||||
Published
|
||||
{:else if record.status === "draft"}
|
||||
Draft
|
||||
{:else if record.status === "trashed"}
|
||||
Trashed
|
||||
{/if}
|
||||
Reference in New Issue
Block a user