Type conversion to string for UUID
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
let adventureToEdit: Adventure;
|
||||
let isEditModalOpen: boolean = false;
|
||||
|
||||
function deleteAdventure(event: CustomEvent<number>) {
|
||||
function deleteAdventure(event: CustomEvent<string>) {
|
||||
adventures = adventures.filter((adventure) => adventure.id !== event.detail);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
function deleteCollection(event: CustomEvent<number>) {
|
||||
function deleteCollection(event: CustomEvent<string>) {
|
||||
collections = collections.filter((collection) => collection.id !== event.detail);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
let collectionToEdit: Collection;
|
||||
let isEditModalOpen: boolean = false;
|
||||
|
||||
function deleteAdventure(event: CustomEvent<number>) {
|
||||
function deleteAdventure(event: CustomEvent<string>) {
|
||||
collections = collections.filter((adventure) => adventure.id !== event.detail);
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
value="name"
|
||||
hidden
|
||||
/>
|
||||
<button type="submit" class="btn btn-success btn-primary mt-4">Filter</button>
|
||||
<button type="submit" class="btn btn-success btn-primary mt-4">Sort</button>
|
||||
</form>
|
||||
<div class="divider"></div>
|
||||
<button
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function deleteAdventure(event: CustomEvent<number>) {
|
||||
function deleteAdventure(event: CustomEvent<string>) {
|
||||
adventures = adventures.filter((a) => a.id !== event.detail);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function changeType(event: CustomEvent<number>) {
|
||||
function changeType(event: CustomEvent<string>) {
|
||||
adventures = adventures.map((adventure) => {
|
||||
if (adventure.id == event.detail) {
|
||||
if (adventure.type == 'visited') {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
export let data: PageData;
|
||||
|
||||
function deleteAdventure(event: CustomEvent<number>) {
|
||||
function deleteAdventure(event: CustomEvent<string>) {
|
||||
myAdventures = myAdventures.filter((adventure) => adventure.id !== event.detail);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user