Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wellheor1 committed Sep 19, 2023
1 parent 4caf8b7 commit 6ecdfc0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
6 changes: 3 additions & 3 deletions education/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def get_applications_by_card(card_pk):
entrance_exam_data = Subjects.objects.filter(pk__in=SUBJECTS_ENTRANCE_EXAM)
current_application = -1
columns = [
{"field": 'pk', "key": 'pk', "title": '№'},
{"field": 'date', "key": 'date', "title": 'Дата'},
{"field": 'pk', "key": 'pk', "title": '№', "width": 50},
{"field": 'date', "key": 'date', "title": 'Дата', "width": 50},
{"field": 'speciality', "key": 'speciality', "title": 'Специальность'},
]
template_applications = {
Expand All @@ -175,7 +175,7 @@ def get_applications_by_card(card_pk):
"speciality": '',
}
for i in entrance_exam_data:
columns.append({"field": i.synonym, "key": i.synonym, "title": i.short_title})
columns.append({"field": i.synonym, "key": i.synonym, "title": i.short_title, "width": 50})
template_applications[i.synonym] = 0

temp_applications = template_applications.copy()
Expand Down
12 changes: 9 additions & 3 deletions l2-frontend/src/modals/EnrolleesApplication.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,16 @@ const getApplications = async () => {
const achievements = ref([]);
const achievementsColumns = ref([
{ field: 'pk', key: 'pk', title: '' },
{
field: 'pk', key: 'pk', title: '', width: 50,
},
{ field: 'title', key: 'title', title: 'Название' },
{ field: 'date', key: 'date', title: 'Статус' },
{ field: 'grade', key: 'grade', title: 'Оценка' },
{
field: 'date', key: 'date', title: 'Дата', width: 50,
},
{
field: 'grade', key: 'grade', title: 'Оценка', width: 50,
},
]);
const getAchievements = async () => {
const data = await api('/education/get-achievements-by-card', { card_pk: props.card_pk });
Expand Down
16 changes: 8 additions & 8 deletions l2-frontend/src/pages/Education/EnrolleesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ const getInternalBase = async () => {
basePk.value = baseData.bases[0].pk;
};
const openCard = (cardPk) => {
window.open(`/ui/directions?card_pk=${cardPk}&base_pk=${this.basePk}`);
window.open(`/ui/directions?card_pk=${cardPk}&base_pk=${basePk.value}`);
};
const openInfo = (cardPk, fio) => {
this.showInfoModal = true;
this.selectedCardPk = cardPk;
this.selectedFio = fio;
showInfoModal.value = true;
selectedCardPk.value = cardPk;
selectedFio.value = fio;
};
const openContract = (contractPk) => {
window.open(`/ui/results/descriptive#{"pk":${contractPk}}`);
Expand Down Expand Up @@ -132,13 +132,13 @@ const getColumns = async () => {
h('div', { class: $style.action }, [
h(
'button',
{ class: $style.transparentButton },
[h('i', { class: 'fa-solid fa-user-graduate', 'aria-hidden': true, on: { click: () => { openCard(row.card); } } })],
{ class: $style.transparentButton, on: { click: () => { openCard(row.card); } } },
[h('i', { class: 'fa-solid fa-user-graduate', 'aria-hidden': true })],
),
h(
'button',
{ class: $style.transparentButton },
[h('i', { class: 'fa fa-info-circle', 'aria-hidden': true, on: { click: () => { openInfo(row.card, row.fio); } } })],
{ class: $style.transparentButton, on: { click: () => { openInfo(row.card, row.fio); } } },
[h('i', { class: 'fa fa-info-circle', 'aria-hidden': true })],
),
])
),
Expand Down

0 comments on commit 6ecdfc0

Please sign in to comment.