-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add student number to table, sort rooms #616
Conversation
<PrimeColumn | ||
header="№" | ||
header-style="width: 68px" | ||
body-style="width: 68px" | ||
column-key="index" | ||
> | ||
<template #body="{ data }"> | ||
{{ students.indexOf(data) + 1 }} | ||
</template> | ||
</PrimeColumn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давайте подумаем, как это можно красивее сделать. Мб выделить колонку цветом (может более блёкло?), сделать нумерацию всех челов всегда подряд.
А может и вообще отказаться и писать количество сверху
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ну смотри, отказаться точно нет - заказчик захотел так. Я сторонник того, что если заказчик хочет и то, что он хочет - не треш, то надо делать. Писать количество сверху - да, можно, но как будто бы страница выглядит нормально и не перегружено, перегружать не хочется от слова совсем.
"сделать нумерацию всех челов всегда подряд" - это я тоже хотел сделать, но чот не получилось. Ещё пробую. Делать блекло не вижу смысла, в других местах эта колонка не блеклая и всё хорошо
@@ -61,13 +61,23 @@ | |||
scrollable | |||
scroll-height="600px" | |||
:value="students" | |||
:sort-field="milgroupField" | |||
:sort-field="fullname" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я бы сказал что сначала по взводу, потом по фио, нет?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если пофикшу коммент выше, то откачу
@@ -362,6 +362,7 @@ class Reference extends VuexModule { | |||
return await getFetchRequest( | |||
getRooms, | |||
data => { | |||
data.sort((a, b) => a - b); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a, b – объекты, а не числа
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Получилось исправить
4bb862f
to
66362f2
Compare
@@ -362,6 +362,34 @@ class Reference extends VuexModule { | |||
return await getFetchRequest( | |||
getRooms, | |||
data => { | |||
console.log(data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давай сотрём
if (titleA < titleB) { return -1; } | ||
if (titleA > titleB) { return 1; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А зачем эти две строчки, если localeCompare делает то же самое?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Особенности национального гпт
No description provided.