Completion of APIs except for user progress
This commit is contained in:
@@ -260,10 +260,17 @@
|
||||
|
||||
<script setup>
|
||||
import { useToast } from "vue-toastification";
|
||||
const { authUser } = useAuth();
|
||||
console.log('user', authUser.value === null);
|
||||
const props = defineProps(["props"], ["access"]);
|
||||
const toast = useToast()
|
||||
const router = useRouter()
|
||||
const paymentHandler = (id) => {
|
||||
|
||||
if (authUser.value === null) {
|
||||
return router.push({
|
||||
path: '/login'
|
||||
})
|
||||
}
|
||||
const data = useFetch("/api/user/registerCourse", {
|
||||
method: "POST",
|
||||
body: {
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
|
||||
<div class="flex gap-[1vw] basis-1/6 md:basis-1/6 w-full text-end justify-end md:pe-[2vw]">
|
||||
<svg
|
||||
class="h-[4.615vw] w-[4.615vw] md:h-[1.25vw] md:w-[1.25vw]"
|
||||
@click="download('دانلود')"
|
||||
class="cursor-pointer h-[4.615vw] w-[4.615vw] md:h-[1.25vw] md:w-[1.25vw]"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -95,7 +96,8 @@
|
||||
</svg>
|
||||
|
||||
<svg
|
||||
class="h-[4.615vw] w-[4.615vw] md:h-[1.25vw] md:w-[1.25vw]"
|
||||
@click="download('مشاهده')"
|
||||
class="cursor-pointer h-[4.615vw] w-[4.615vw] md:h-[1.25vw] md:w-[1.25vw]"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -143,8 +145,10 @@
|
||||
|
||||
|
||||
<script setup>
|
||||
import { useToast } from 'vue-toastification'
|
||||
const toast = useToast()
|
||||
const props = defineProps(['props'])
|
||||
|
||||
const download = (val) => toast.warning(`برای ${val} باید در دوره شرکت کنید`);
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user