graphs
This commit is contained in:
Vendored
+170
File diff suppressed because one or more lines are too long
Vendored
-172
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"main.js": {
|
||||
"file": "assets/main.a36ff043.js",
|
||||
"file": "assets/main.48f7042c.js",
|
||||
"src": "main.js",
|
||||
"isEntry": true,
|
||||
"css": [
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import Icon from "../../common/Icon.svelte";
|
||||
import SortFields from "./SortFields.svelte";
|
||||
import AppliedFilter from "./AppliedFilter.svelte";
|
||||
import {getContext,createEventDispatcher} from "svelte";
|
||||
import {getContext, createEventDispatcher} from "svelte";
|
||||
|
||||
const channel = getContext("channel");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
let csvUrl = url.pathname + "/csv?" + url.searchParams.toString();
|
||||
|
||||
function search(e){
|
||||
function search(e) {
|
||||
e.preventDefault();
|
||||
const data = new FormData(e.target);
|
||||
let filterKey = data.keys().next().value;
|
||||
@@ -38,6 +38,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function uploadComplete(e) {
|
||||
records = e.detail;
|
||||
}
|
||||
@@ -66,14 +67,14 @@
|
||||
on:refresh
|
||||
/>
|
||||
|
||||
<form method="GET" on:submit={search}>
|
||||
<form method="GET" on:submit={search}>
|
||||
{#if schema.fields[0]?.name}
|
||||
<input type="search" name="filter[data.{schema.fields[0].name }_regex]" placeholder="Search"
|
||||
class="form-control" required>
|
||||
{:else}
|
||||
{:else}
|
||||
<input type="search" name="filter[_file.originalName_regex]" placeholder="Search"
|
||||
class="form-control" required>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
</form>
|
||||
|
||||
@@ -107,20 +108,33 @@
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
href={csvUrl}
|
||||
>Export to CSV</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
href="{channel.lucentUrl}/content/{schema.name}?filter[status_in]=trashed"
|
||||
>View trashed records</a
|
||||
>
|
||||
</li>
|
||||
{#if filter["status_in"] === "trashed"}
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
href="{channel.lucentUrl}/content/{schema.name}/emptyTrash"
|
||||
>
|
||||
Empty trash
|
||||
</a>
|
||||
</li>
|
||||
{:else}
|
||||
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
href={csvUrl}
|
||||
>Export to CSV</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
href="{channel.lucentUrl}/content/{schema.name}?filter[status_in]=trashed"
|
||||
>View trashed records</a
|
||||
>
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user