Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
Merge pull request #228 from CampusDual/BFS42024-283
Browse files Browse the repository at this point in the history
Actualizada la vista de estudiantes para que se vea el nombre del tutor
  • Loading branch information
javi2004 authored Jan 9, 2025
2 parents f6d44ea + d116af5 commit 367590f
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</div>
<div class="tutor">
<label for="tutor">{{'LTUTOR' | oTranslate}} :</label>
<p class="pmydata">{{form.getDataValue('tutor').value}}</p>
<p class="pmydata">{{form.getDataValue('tutor_name_surname').value}}</p>
</div>
<div class="fctStart">
<label for="LFCT_START">{{'LFCT_START' | oTranslate}} :</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ throw new Error('Method not implemented.');
};

const columns = ['id','name', 'surname1', 'surname2', 'dni', 'phone', 'employment_status_id',
'birth_date', 'location', 'campus_email', 'personal_email', 'fct_school', 'tutor',
'birth_date', 'location', 'campus_email', 'personal_email', 'fct_school', 'tutor_name_surname',
'fct_start', 'fct_end', 'udemy', 'github_user','user_id','usr_photo','employment_status'
];

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
DROP VIEW IF EXISTS v_students_with_bootcamps;

CREATE OR REPLACE VIEW public.v_students_with_bootcamps
as SELECT st.id,
st.name,
st.surname1,
st.personal_email,
st.dni,
st.surname2,
st.birth_date,
st.phone,
st.campus_email,
st.fct_school,
st.fct_start,
st.fct_end,
st.tutor,
concat(t.name, ' ', t.surname1, ' ', t.surname2) as tutor_name_surname,
st.udemy,
st.github_user,
st.notes,
st.email,
st.surnames,
st.spain_comunity,
st.location,
st.employment_status_id,
st.user_id,
st.student_status_id,
st.linkedin,
uu.usr_id,
uu.usr_login,
uu.usr_name,
uu.usr_surname,
uu.usr_email,
uu.usr_password,
uu.usr_notes,
uu.usr_phone,
uu.usr_creation_date,
uu.usr_down_date,
uu.usr_photo,
ss.status,
vres.employment_status,
vres.v_employment_status_id,
concat(concat('|', string_agg(sb.bootcamp_id::text, '|'::text)), '|') AS bootcamps_id,
bot_activ.validos
FROM students st
LEFT JOIN usr_user uu ON st.user_id = uu.usr_id
LEFT JOIN employment_status es ON st.employment_status_id = es.id
LEFT JOIN student_status ss ON st.student_status_id = ss.id
LEFT JOIN v_recent_employment_status vres ON st.id = vres.student_id
LEFT JOIN student_bootcamp sb ON sb.student_id = st.id
left join tutors t on t.id=st.tutor
LEFT JOIN ( SELECT count(*) AS validos,
sb_1.student_id
FROM student_bootcamp sb_1
JOIN bootcamps b ON b.id = sb_1.bootcamp_id
WHERE b.end_date >= CURRENT_DATE
GROUP BY sb_1.student_id) bot_activ ON st.id = bot_activ.student_id
GROUP BY t.name,t.surname1, t.surname2 , st.id, ss.status, vres.employment_status, vres.v_employment_status_id, uu.usr_id, bot_activ.student_id, bot_activ.validos
ORDER BY (st.name COLLATE "es-ES-x-icu");

0 comments on commit 367590f

Please sign in to comment.