got career name and slug from joint
All checks were successful
CodyOps Core Builder / build-conteiner (pull_request) Successful in 2m55s

This commit is contained in:
Luciano Giacchetta 2025-08-13 19:57:46 -03:00
parent dea6ab6823
commit 8a2a533772
2 changed files with 10 additions and 5 deletions

View File

@ -42,12 +42,15 @@ const { course }: Props = Astro.props;
</div>
</div>
</div>
<div class="mt-3">
<h3>Incluido en Carreras:</h3>
</div>
<div class="d-flex gap-2 mt-3">
<p>-Faltan Carreras-</p>
{course.carrers && course.carrers.map((carrer: any) => (
<div class="btn btn-outline-success mb-1">{carrer}</div>
{course.codyops_careers.map((carrer: any) => (
<a class="btn btn-outline-success mb-1" href={`/carreras/${carrer.codyops_careers_id.slug}/`}>
{carrer.codyops_careers_id.name}
</a>
))}
</div>
</div>
</div>
<style>

View File

@ -6,7 +6,9 @@ export const courses = await directus.request(
fields: [
'*',
'user_created.*',
'modules.*'
'modules.*',
'codyops_careers.codyops_careers_id.name',
'codyops_careers.codyops_careers_id.slug',
]}
)
);