mirror of
https://github.com/JonasunderscoreJones/K-Comebacks.git
synced 2025-10-23 09:59:20 +02:00
Fixed name
'type' >> 'types' as it is more suitable
This commit is contained in:
parent
2dd4d557a3
commit
b23050cc85
1 changed files with 9 additions and 9 deletions
|
@ -38,10 +38,10 @@
|
||||||
.includes(searchTitle.toLowerCase());
|
.includes(searchTitle.toLowerCase());
|
||||||
const releaseTypeMatch =
|
const releaseTypeMatch =
|
||||||
selectedRelease === "" ||
|
selectedRelease === "" ||
|
||||||
(release.type === null
|
(release.types === null
|
||||||
? "Unknown"
|
? "Unknown"
|
||||||
: release.type) === selectedRelease ||
|
: release.types) === selectedRelease ||
|
||||||
release.type.includes(selectedRelease);
|
release.types.includes(selectedRelease);
|
||||||
const dateMatch =
|
const dateMatch =
|
||||||
(!startDate || new Date(release.date) >= startDate) &&
|
(!startDate || new Date(release.date) >= startDate) &&
|
||||||
(!endDate || new Date(release.date) <= endDate);
|
(!endDate || new Date(release.date) <= endDate);
|
||||||
|
@ -82,10 +82,10 @@
|
||||||
|
|
||||||
// Extract unique release types from the releases array
|
// Extract unique release types from the releases array
|
||||||
releaseTypes = Array.from(new Set(releases.map(release => {
|
releaseTypes = Array.from(new Set(releases.map(release => {
|
||||||
return release.type === null ? 'Unknown' : release.type;
|
return release.types === null ? 'Unknown' : release.types;
|
||||||
})));
|
})));
|
||||||
|
|
||||||
// releaseTypes should be an array of all elements of all the release.type lists of all releases
|
// releaseTypes should be an array of all elements of all the release.types lists of all releases
|
||||||
releaseTypes = releaseTypes.flat();
|
releaseTypes = releaseTypes.flat();
|
||||||
|
|
||||||
// eliminate duplicates
|
// eliminate duplicates
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
<th on:click={() => sortByColumn("date")}>Date</th>
|
<th on:click={() => sortByColumn("date")}>Date</th>
|
||||||
<th on:click={() => sortByColumn("artist")}>Artist</th>
|
<th on:click={() => sortByColumn("artist")}>Artist</th>
|
||||||
<th on:click={() => sortByColumn("title")}>Title</th>
|
<th on:click={() => sortByColumn("title")}>Title</th>
|
||||||
<th on:click={() => sortByColumn("type")}>Release Type</th>
|
<th on:click={() => sortByColumn("type")}>Release Types</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -229,10 +229,10 @@
|
||||||
<td>{release.artist}</td>
|
<td>{release.artist}</td>
|
||||||
<td>{release.title}</td>
|
<td>{release.title}</td>
|
||||||
<td
|
<td
|
||||||
>{release.type === null
|
>{release.types === null
|
||||||
? "Unknown"
|
? "Unknown"
|
||||||
// show the release.type list as a comma separated string
|
// show the release.types list as a comma separated string
|
||||||
: release.type.join(", ")}</td
|
: release.types.join(", ")}</td
|
||||||
>
|
>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue