default sorting on schemas
This commit is contained in:
@@ -14,7 +14,8 @@
|
|||||||
|
|
||||||
// export let visibleFields;
|
// export let visibleFields;
|
||||||
export let systemFields;
|
export let systemFields;
|
||||||
export let sort;
|
export let sortParam;
|
||||||
|
export let sortField;
|
||||||
export let operators;
|
export let operators;
|
||||||
export let filter;
|
export let filter;
|
||||||
export let limit;
|
export let limit;
|
||||||
@@ -42,7 +43,8 @@
|
|||||||
.get(newUrl)
|
.get(newUrl)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
records = response.data.records;
|
records = response.data.records;
|
||||||
sort = response.data.sort;
|
sortParam = response.data.sortParam;
|
||||||
|
sortField = response.data.sortField;
|
||||||
operators = response.data.operators;
|
operators = response.data.operators;
|
||||||
filter = response.data.filter;
|
filter = response.data.filter;
|
||||||
skip = response.data.skip;
|
skip = response.data.skip;
|
||||||
@@ -70,7 +72,8 @@
|
|||||||
bind:schema
|
bind:schema
|
||||||
bind:records
|
bind:records
|
||||||
{systemFields}
|
{systemFields}
|
||||||
{sort}
|
{sortParam}
|
||||||
|
{sortField}
|
||||||
{operators}
|
{operators}
|
||||||
{filter}
|
{filter}
|
||||||
{inModal}
|
{inModal}
|
||||||
@@ -85,7 +88,8 @@
|
|||||||
{records}
|
{records}
|
||||||
{graph}
|
{graph}
|
||||||
{schema}
|
{schema}
|
||||||
{sort}
|
{sortParam}
|
||||||
|
{sortField}
|
||||||
{systemFields}
|
{systemFields}
|
||||||
{inModal}
|
{inModal}
|
||||||
{users}
|
{users}
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
export let users;
|
export let users;
|
||||||
export let graph;
|
export let graph;
|
||||||
export let record;
|
export let record;
|
||||||
export let sort;
|
export let sortParam;
|
||||||
|
export let sortField;
|
||||||
export let visibleColumns;
|
export let visibleColumns;
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
{#each visibleColumns as field, index}
|
{#each visibleColumns as field, index}
|
||||||
<td
|
<td
|
||||||
class="field-ui-{field.info.name}"
|
class="field-ui-{field.info.name}"
|
||||||
class:is-sort={"-" + field.name == sort || field.name == sort}
|
class:is-sort={field.name === sortField.name}
|
||||||
>
|
>
|
||||||
<RenderField {record} {schema} {graph} {field}/>
|
<RenderField {record} {schema} {graph} {field}/>
|
||||||
</td>
|
</td>
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
{#if schema.visible.includes("status")}
|
{#if schema.visible.includes("status")}
|
||||||
<td
|
<td
|
||||||
class="text-center"
|
class="text-center"
|
||||||
class:is-sort={"-status" == sort || "status" == sort}
|
class:is-sort={"-status" == sortParam || "status" == sortParam}
|
||||||
>
|
>
|
||||||
<Status status={record.status}/>
|
<Status status={record.status}/>
|
||||||
</td>
|
</td>
|
||||||
@@ -33,7 +34,7 @@
|
|||||||
{#if schema.visible.includes("_sys.createdBy")}
|
{#if schema.visible.includes("_sys.createdBy")}
|
||||||
<td
|
<td
|
||||||
class="text-center"
|
class="text-center"
|
||||||
class:is-sort={"-_sys.createdBy" == sort || "_sys.createdBy" == sort}
|
class:is-sort={"-_sys.createdBy" == sortParam || "_sys.createdBy" == sortParam}
|
||||||
>
|
>
|
||||||
<Avatar name={usernameById(users, record._sys.createdBy)} side={24}/>
|
<Avatar name={usernameById(users, record._sys.createdBy)} side={24}/>
|
||||||
</td>
|
</td>
|
||||||
@@ -41,18 +42,18 @@
|
|||||||
{#if schema.visible.includes("_sys.updatedBy")}
|
{#if schema.visible.includes("_sys.updatedBy")}
|
||||||
<td
|
<td
|
||||||
class="text-center"
|
class="text-center"
|
||||||
class:is-sort={"-_sys.updatedBy" == sort || "_sys.updatedBy" == sort}
|
class:is-sort={"-_sys.updatedBy" == sortParam || "_sys.updatedBy" == sortParam}
|
||||||
>
|
>
|
||||||
<Avatar name={usernameById(users, record._sys.updatedBy)} side={24}/>
|
<Avatar name={usernameById(users, record._sys.updatedBy)} side={24}/>
|
||||||
</td>
|
</td>
|
||||||
{/if}
|
{/if}
|
||||||
{#if schema.visible.includes("_sys.createdAt")}
|
{#if schema.visible.includes("_sys.createdAt")}
|
||||||
<td class:is-sort={"-_sys.createdAt" == sort || "_sys.createdAt" == sort}>
|
<td class:is-sort={"-_sys.createdAt" == sortParam || "_sys.createdAt" == sortParam}>
|
||||||
{friendlyDate(record._sys.createdAt)}
|
{friendlyDate(record._sys.createdAt)}
|
||||||
</td>
|
</td>
|
||||||
{/if}
|
{/if}
|
||||||
{#if schema.visible.includes("_sys.updatedAt")}
|
{#if schema.visible.includes("_sys.updatedAt")}
|
||||||
<td class:is-sort={"-_sys.updatedAt" == sort || "_sys.updatedAt" == sort}>
|
<td class:is-sort={"-_sys.updatedAt" == sortParam || "_sys.updatedAt" == sortParam}>
|
||||||
{friendlyDate(record._sys.updatedAt)}
|
{friendlyDate(record._sys.updatedAt)}
|
||||||
</td>
|
</td>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
export let records;
|
export let records;
|
||||||
export let graph;
|
export let graph;
|
||||||
export let systemFields;
|
export let systemFields;
|
||||||
export let sort;
|
export let sortParam;
|
||||||
|
export let sortField;
|
||||||
export let inModal;
|
export let inModal;
|
||||||
export let isWritable;
|
export let isWritable;
|
||||||
export let selected = [];
|
export let selected = [];
|
||||||
@@ -61,8 +62,7 @@
|
|||||||
{#each visibleColumns as field}
|
{#each visibleColumns as field}
|
||||||
<th
|
<th
|
||||||
class="field-ui-{field.ui}"
|
class="field-ui-{field.ui}"
|
||||||
class:is-sort={"-" + field.name == sort ||
|
class:is-sort={field.name === sortField.name}
|
||||||
field.name == sort}
|
|
||||||
scope="col"
|
scope="col"
|
||||||
title={field.help}
|
title={field.help}
|
||||||
data-bs-toggle="tooltip"
|
data-bs-toggle="tooltip"
|
||||||
@@ -125,8 +125,8 @@
|
|||||||
{graph}
|
{graph}
|
||||||
{schema}
|
{schema}
|
||||||
{visibleColumns}
|
{visibleColumns}
|
||||||
{sort}
|
{sortParam}
|
||||||
{systemFields}
|
{sortField}
|
||||||
{inModal}
|
{inModal}
|
||||||
{users}
|
{users}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -4,24 +4,22 @@
|
|||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
export let schema;
|
export let schema;
|
||||||
export let sort;
|
export let sortParam;
|
||||||
|
export let sortField;
|
||||||
export let inModal;
|
export let inModal;
|
||||||
export let modalUrl;
|
export let modalUrl;
|
||||||
export let systemFields = [];
|
export let systemFields = [];
|
||||||
|
|
||||||
$: activeField = [...schema.fields, ...systemFields].find(
|
|
||||||
(f) => f.name === sort || "-" + f.name === sort || "data." + f.name === sort || "-data." + f.name === sort
|
|
||||||
);
|
|
||||||
|
|
||||||
$: sortableFields = schema.fields.filter(
|
$: sortableFields = schema.fields.filter(
|
||||||
(f) => !["reference", "file", "json", "id", "tab"].includes(f.ui)
|
(f) => !["reference", "file", "json", "id", "rich", "markdown", "block"].includes(f.info.name)
|
||||||
);
|
);
|
||||||
$: systemFieldsFiltered = systemFields;
|
$: systemFieldsFiltered = systemFields;
|
||||||
$: if (schema.type === "collection") {
|
$: if (schema.type === "collection") {
|
||||||
systemFieldsFiltered = systemFields.filter((f) => f.files === false);
|
systemFieldsFiltered = systemFields.filter((f) => f.files === false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sortField(fieldSort) {
|
|
||||||
|
function triggerSortField(fieldSort) {
|
||||||
const url = new URL(modalUrl ?? window.location.href);
|
const url = new URL(modalUrl ?? window.location.href);
|
||||||
url.searchParams.set("sort", fieldSort);
|
url.searchParams.set("sort", fieldSort);
|
||||||
if (inModal) {
|
if (inModal) {
|
||||||
@@ -33,14 +31,14 @@
|
|||||||
|
|
||||||
function sortAsc(e, field) {
|
function sortAsc(e, field) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let prefix = systemFields.includes(el => el.name === field.name) ? "" : "data.";
|
let prefix = systemFields.map((el) => el.name).includes(field.name) ? "" : "data.";
|
||||||
return sortField(prefix + field.name);
|
return triggerSortField(prefix + field.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sortDesc(e, field) {
|
function sortDesc(e, field) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let prefix = systemFields.includes(el => el.name === field.name) ? "" : "data.";
|
let prefix = systemFields.map((el) => el.name).includes(field.name) ? "" : "data.";
|
||||||
return sortField("-" + prefix + field.name);
|
return triggerSortField("-" + prefix + field.name);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -52,12 +50,12 @@
|
|||||||
data-bs-auto-close="outside"
|
data-bs-auto-close="outside"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
>
|
>
|
||||||
{#if sort.startsWith("-")}
|
{#if sortParam.startsWith("-")}
|
||||||
<Icon icon="arrow-down-wide-short"/>
|
<Icon icon="arrow-down-wide-short"/>
|
||||||
{:else}
|
{:else}
|
||||||
<Icon icon="arrow-up-short-wide"/>
|
<Icon icon="arrow-up-short-wide"/>
|
||||||
{/if}
|
{/if}
|
||||||
<span class="ms-1">{activeField.label}</span>
|
<span class="ms-1">{sortField.label}</span>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" style="width:auto;max-width:800px;">
|
<div class="dropdown-menu" style="width:auto;max-width:800px;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -67,7 +65,7 @@
|
|||||||
<button
|
<button
|
||||||
on:click={(e) => sortAsc(e, field)}
|
on:click={(e) => sortAsc(e, field)}
|
||||||
title="Sort Ascending"
|
title="Sort Ascending"
|
||||||
class="btn btn-sm {field.name == sort
|
class="btn btn-sm {field.name == sortField.name && !sortParam.startsWith("-")
|
||||||
? 'btn-primary'
|
? 'btn-primary'
|
||||||
: 'btn-outline-primary'} "
|
: 'btn-outline-primary'} "
|
||||||
>
|
>
|
||||||
@@ -76,7 +74,7 @@
|
|||||||
<button
|
<button
|
||||||
on:click={(e) => sortDesc(e, field)}
|
on:click={(e) => sortDesc(e, field)}
|
||||||
title="Sort Descending"
|
title="Sort Descending"
|
||||||
class="btn btn-sm {'-' + field.name == sort
|
class="btn btn-sm {field.name == sortField.name && sortParam.startsWith("-")
|
||||||
? 'btn-primary'
|
? 'btn-primary'
|
||||||
: 'btn-outline-primary'} "
|
: 'btn-outline-primary'} "
|
||||||
>
|
>
|
||||||
@@ -102,7 +100,7 @@
|
|||||||
<button
|
<button
|
||||||
on:click={(e) => sortAsc(e, field)}
|
on:click={(e) => sortAsc(e, field)}
|
||||||
title="Sort Ascending"
|
title="Sort Ascending"
|
||||||
class="btn btn-sm {field.name == sort
|
class="btn btn-sm {field.name == sortParam
|
||||||
? 'btn-primary'
|
? 'btn-primary'
|
||||||
: 'btn-outline-primary'} "
|
: 'btn-outline-primary'} "
|
||||||
>
|
>
|
||||||
@@ -111,7 +109,7 @@
|
|||||||
<button
|
<button
|
||||||
on:click={(e) => sortDesc(e, field)}
|
on:click={(e) => sortDesc(e, field)}
|
||||||
title="Sort Descending"
|
title="Sort Descending"
|
||||||
class="btn btn-sm {'-' + field.name == sort
|
class="btn btn-sm {'-' + field.name == sortParam
|
||||||
? 'btn-primary'
|
? 'btn-primary'
|
||||||
: 'btn-outline-primary'} "
|
: 'btn-outline-primary'} "
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
const channel = getContext("channel");
|
const channel = getContext("channel");
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
export let sort;
|
export let sortParam;
|
||||||
|
export let sortField;
|
||||||
export let schema;
|
export let schema;
|
||||||
export let operators;
|
export let operators;
|
||||||
export let filter;
|
export let filter;
|
||||||
@@ -50,7 +51,8 @@
|
|||||||
|
|
||||||
<SortFields
|
<SortFields
|
||||||
{schema}
|
{schema}
|
||||||
{sort}
|
{sortParam}
|
||||||
|
{sortField}
|
||||||
{systemFields}
|
{systemFields}
|
||||||
{inModal}
|
{inModal}
|
||||||
{modalUrl}
|
{modalUrl}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration {
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('records', function (Blueprint $table) {
|
||||||
|
$table->dropIndex(['schema', 'status']);
|
||||||
|
$table->index(['schema', '_sys->updatedAt','status']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('records', function (Blueprint $table) {
|
||||||
|
|
||||||
|
$table->dropIndex(['schema', '_sys->updatedAt','status']);
|
||||||
|
$table->index(['schema', 'status']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -13,6 +13,7 @@ use Lucent\Query\Query;
|
|||||||
use Lucent\Record\Manager;
|
use Lucent\Record\Manager;
|
||||||
use Lucent\Record\QueryRecord;
|
use Lucent\Record\QueryRecord;
|
||||||
use Lucent\Record\RecordService;
|
use Lucent\Record\RecordService;
|
||||||
|
use Lucent\Schema\FieldInterface;
|
||||||
use Lucent\Schema\System;
|
use Lucent\Schema\System;
|
||||||
use Lucent\Schema\Validator\ValidatorException;
|
use Lucent\Schema\Validator\ValidatorException;
|
||||||
use Lucent\Svelte\Svelte;
|
use Lucent\Svelte\Svelte;
|
||||||
@@ -37,7 +38,7 @@ class RecordController extends Controller
|
|||||||
{
|
{
|
||||||
$schemaName = $request->route("schemaName");
|
$schemaName = $request->route("schemaName");
|
||||||
|
|
||||||
if(!in_array($schemaName,$this->accountService->currentReadableSchemas())){
|
if (!in_array($schemaName, $this->accountService->currentReadableSchemas())) {
|
||||||
return $this->svelte->render(
|
return $this->svelte->render(
|
||||||
layout: "channel",
|
layout: "channel",
|
||||||
view: "recordNotFound",
|
view: "recordNotFound",
|
||||||
@@ -48,7 +49,7 @@ class RecordController extends Controller
|
|||||||
$users = $this->accountService->all();
|
$users = $this->accountService->all();
|
||||||
$schema = $this->channelService->getSchema($schemaName)->get();
|
$schema = $this->channelService->getSchema($schemaName)->get();
|
||||||
$urlParams = $request->all();
|
$urlParams = $request->all();
|
||||||
$sort = data_get($urlParams, "sort") ?? "-_sys.updatedAt";
|
$sort = data_get($urlParams, "sort") ?? $schema->sortBy;
|
||||||
$filter = data_get($urlParams, "filter") ?? [];
|
$filter = data_get($urlParams, "filter") ?? [];
|
||||||
|
|
||||||
$arguments = array_merge([
|
$arguments = array_merge([
|
||||||
@@ -84,13 +85,14 @@ class RecordController extends Controller
|
|||||||
"graph" => toArray($graph),
|
"graph" => toArray($graph),
|
||||||
"systemFields" => array_values(System::list()),
|
"systemFields" => array_values(System::list()),
|
||||||
"operators" => array_values(Operator::list()),
|
"operators" => array_values(Operator::list()),
|
||||||
"sort" => $sort,
|
"sortParam" => $sort,
|
||||||
|
"sortField" => $schema->fields->merge(array_values(System::list()))->firstWhere(fn($field) => $field->name === $sort || "-" . $field->name === $sort || "data." . $field->name === $sort || "-data." . $field->name === $sort),
|
||||||
"limit" => $limit,
|
"limit" => $limit,
|
||||||
"skip" => $skip,
|
"skip" => $skip,
|
||||||
"total" => $graph->total ?? 0,
|
"total" => $graph->total ?? 0,
|
||||||
"filter" => $request->input("filter") ?? [],
|
"filter" => $request->input("filter") ?? [],
|
||||||
"inModal" => true,
|
"inModal" => true,
|
||||||
"isWritable" => in_array($schemaName,$this->accountService->currentWritableSchemas())
|
"isWritable" => in_array($schemaName, $this->accountService->currentWritableSchemas())
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($request->ajax()) {
|
if ($request->ajax()) {
|
||||||
@@ -151,7 +153,7 @@ class RecordController extends Controller
|
|||||||
|
|
||||||
public function new(Request $request)
|
public function new(Request $request)
|
||||||
{
|
{
|
||||||
if(!in_array($request->input("schema"),$this->accountService->currentWritableSchemas())){
|
if (!in_array($request->input("schema"), $this->accountService->currentWritableSchemas())) {
|
||||||
return $this->svelte->render(
|
return $this->svelte->render(
|
||||||
layout: "channel",
|
layout: "channel",
|
||||||
view: "recordNotFound",
|
view: "recordNotFound",
|
||||||
@@ -172,7 +174,7 @@ class RecordController extends Controller
|
|||||||
"record" => $queryRecord,
|
"record" => $queryRecord,
|
||||||
"recordHistory" => $recordHistory,
|
"recordHistory" => $recordHistory,
|
||||||
"isCreateMode" => true,
|
"isCreateMode" => true,
|
||||||
"isWritable" => in_array($record->schema,$this->accountService->currentWritableSchemas())
|
"isWritable" => in_array($record->schema, $this->accountService->currentWritableSchemas())
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -180,7 +182,7 @@ class RecordController extends Controller
|
|||||||
|
|
||||||
public function newInline(Request $request)
|
public function newInline(Request $request)
|
||||||
{
|
{
|
||||||
if(!in_array($request->input("schema"),$this->accountService->currentWritableSchemas())){
|
if (!in_array($request->input("schema"), $this->accountService->currentWritableSchemas())) {
|
||||||
return $this->svelte->render(
|
return $this->svelte->render(
|
||||||
layout: "channel",
|
layout: "channel",
|
||||||
view: "recordNotFound",
|
view: "recordNotFound",
|
||||||
@@ -224,7 +226,7 @@ class RecordController extends Controller
|
|||||||
|
|
||||||
$record = $graph->records->first();
|
$record = $graph->records->first();
|
||||||
|
|
||||||
if(!in_array($record->schema,$this->accountService->currentReadableSchemas())){
|
if (!in_array($record->schema, $this->accountService->currentReadableSchemas())) {
|
||||||
return $this->svelte->render(
|
return $this->svelte->render(
|
||||||
layout: "channel",
|
layout: "channel",
|
||||||
view: "recordNotFound",
|
view: "recordNotFound",
|
||||||
@@ -244,7 +246,7 @@ class RecordController extends Controller
|
|||||||
"record" => toArray($record),
|
"record" => toArray($record),
|
||||||
"users" => $this->accountService->all(),
|
"users" => $this->accountService->all(),
|
||||||
"recordHistory" => $recordHistory,
|
"recordHistory" => $recordHistory,
|
||||||
"isWritable" => in_array($record->schema,$this->accountService->currentWritableSchemas())
|
"isWritable" => in_array($record->schema, $this->accountService->currentWritableSchemas())
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ final class Query
|
|||||||
}
|
}
|
||||||
|
|
||||||
$query = $this->orderByQuery($query);
|
$query = $this->orderByQuery($query);
|
||||||
|
|
||||||
return $query->get()->map(function ($r) {
|
return $query->get()->map(function ($r) {
|
||||||
$r->isRoot = true;
|
$r->isRoot = true;
|
||||||
return $r;
|
return $r;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class CollectionSchema implements Schema
|
|||||||
public Collection $fields,
|
public Collection $fields,
|
||||||
public bool $isEntry = false,
|
public bool $isEntry = false,
|
||||||
public string $color = "",
|
public string $color = "",
|
||||||
|
public string $sortBy = "-_sys.updatedAt",
|
||||||
public string $titleTemplate = "",
|
public string $titleTemplate = "",
|
||||||
public int $revisions = 0,
|
public int $revisions = 0,
|
||||||
public array $read = [],
|
public array $read = [],
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class FilesSchema implements Schema
|
|||||||
public string $path,
|
public string $path,
|
||||||
public array $groups,
|
public array $groups,
|
||||||
public bool $isEntry = false,
|
public bool $isEntry = false,
|
||||||
|
public string $sortBy = "-_sys.updatedAt",
|
||||||
public string $color = "",
|
public string $color = "",
|
||||||
public string $titleTemplate = "",
|
public string $titleTemplate = "",
|
||||||
public int $revisions = 0,
|
public int $revisions = 0,
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class SchemaService
|
|||||||
fields: (new Collection($schemaArr["fields"]))->map([$this, 'mapFields']),
|
fields: (new Collection($schemaArr["fields"]))->map([$this, 'mapFields']),
|
||||||
isEntry: $schemaArr["isEntry"] ?? false,
|
isEntry: $schemaArr["isEntry"] ?? false,
|
||||||
color: $schemaArr["color"] ?? "",
|
color: $schemaArr["color"] ?? "",
|
||||||
|
sortBy: $schemaArr["sortBy"] ?? "-_sys.updatedAt",
|
||||||
titleTemplate: $schemaArr["titleTemplate"] ?? "",
|
titleTemplate: $schemaArr["titleTemplate"] ?? "",
|
||||||
revisions: $schemaArr["revisions"] ?? 0,
|
revisions: $schemaArr["revisions"] ?? 0,
|
||||||
read: $schemaArr["read"] ?? [],
|
read: $schemaArr["read"] ?? [],
|
||||||
@@ -36,6 +37,7 @@ class SchemaService
|
|||||||
path: $schemaArr["path"] ?? $schemaArr["name"],
|
path: $schemaArr["path"] ?? $schemaArr["name"],
|
||||||
groups: $schemaArr["groups"] ?? [],
|
groups: $schemaArr["groups"] ?? [],
|
||||||
isEntry: $schemaArr["isEntry"] ?? false,
|
isEntry: $schemaArr["isEntry"] ?? false,
|
||||||
|
sortBy: $schemaArr["sortBy"] ?? "-_sys.updatedAt",
|
||||||
color: $schemaArr["color"] ?? "",
|
color: $schemaArr["color"] ?? "",
|
||||||
titleTemplate: $schemaArr["titleTemplate"] ?? "",
|
titleTemplate: $schemaArr["titleTemplate"] ?? "",
|
||||||
revisions: $schemaArr["revisions"] ?? 0,
|
revisions: $schemaArr["revisions"] ?? 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user