Delete a course functionality

This commit is contained in:
Rotimi Best
2023-09-10 07:24:06 +01:00
parent 7e74568e74
commit bd2f647ca1
9 changed files with 29 additions and 11 deletions
@@ -5,6 +5,7 @@
import getCurrencyFormatter from '$lib/utils/functions/getCurrencyFormatter';
import OverflowMenuHorizontalIcon from 'carbon-icons-svelte/lib/OverflowMenuHorizontal.svelte';
import ArrowRight from 'carbon-icons-svelte/lib/ArrowRight.svelte';
// import { deleteCourse } from '$lib/utils/services/courses';
export let bannerImage: string | undefined;
export let id = '';
@@ -17,6 +18,7 @@
export let totalLessons = 0;
export let currency = 'NGN';
export let isOnLandingPage = false;
// export let onDelete = (id: string) => {};
let formatter = getCurrencyFormatter(currency);
@@ -37,10 +39,15 @@
}
// {
// label: 'Delete',
// show: () => role_id === ROLE.TUTOR,
// onClick() {
// console.log('Deleting');
// },
// },
// (async () => {
// await deleteCourse(id);
// onDelete(id);
// console.log('Deleting');
// })();
// }
// }
].filter((option) => option.show());
}
</script>