sajjad 3 years ago
parent 0766a74afb
commit 38ba7962e3

@ -1,14 +1,6 @@
<template> <template>
<div> <div>
<div class="wa__program__images"> <div class="wa__program__images">
<!-- <div
class="wa__program__image"
:style="{
backgroundImage: `url('${
program.thumbnail ? program.thumbnail : `http://via.placeholder.com/200`
}')`,
}"
></div> -->
<img <img
class="wa__program__image w-100" class="wa__program__image w-100"
:src=" :src="
@ -18,14 +10,6 @@
/> />
<div class="wa__program__image__button"> <div class="wa__program__image__button">
<div class="wa__program__image__button--icon"> <div class="wa__program__image__button--icon">
<!-- <RectangleButton
v-if="role === 'admin'"
@click.native="verifyProgram(program.id)"
size="large"
class="custom-btn ml-1"
height="32"
:icon="program.verified ? 'WMi-cancel' : 'WMi-ok'"
/> -->
<router-link <router-link
class="text-decoration-none" class="text-decoration-none"
:to="{ name: 'programSeries', params: { id: program.id } }" :to="{ name: 'programSeries', params: { id: program.id } }"
@ -61,21 +45,22 @@
</div> </div>
</div> </div>
</div> </div>
<div class="title__box">
<div class="d-flex align-center mt-1">
<div class="program__title"> <div class="program__title">
{{ program.title }} {{ program.title }}
<span </div>
><v-checkbox <v-checkbox
v-model="program.verified" v-model="program.verified"
v-if="role === 'admin'" v-if="role === 'admin'"
@click.native="verifyProgram(program.id)" @click.native="verify"
hide-details hide-details
class="shrink mr-2 mt-0" class="shrink pt-1 mt-0"
color="red" color="white"
></v-checkbox ></v-checkbox>
></span>
{{ program.verified }}
</div> </div>
<div class="program__sub-title">{{ program.description }}</div> <div class="program__sub-title">{{ program.description }}</div>
</div>
<div> <div>
<Chip <Chip
color="gray" color="gray"
@ -117,12 +102,16 @@ export default {
this.deleteProgram(id); this.deleteProgram(id);
}); });
}, },
async verify() {
await this.verifyProgram(this.program.id);
this.program.verified = !this.program.verified;
},
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.v-image { .title__box {
border-radius: 20px; line-height: 15px;
} }
.program__title { .program__title {
font-family: "montserrat-medium"; font-family: "montserrat-medium";
@ -139,6 +128,7 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
word-wrap: break-word; word-wrap: break-word;
overflow: hidden; overflow: hidden;
margin-top: -2px;
} }
.wa__program__images { .wa__program__images {
@ -170,3 +160,9 @@ export default {
width: max-content; width: max-content;
} }
</style> </style>
<style>
.shrink .v-input__slot i {
color: var(--color-white);
font-size: 20px;
}
</style>

Loading…
Cancel
Save