Skip to content
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

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

startsev2000
Copy link
Collaborator

No description provided.

Comment on lines 71 to 81
<PrimeColumn
header="№"
header-style="width: 68px"
body-style="width: 68px"
column-key="index"
>
<template #body="{ data }">
{{ students.indexOf(data) + 1 }}
</template>
</PrimeColumn>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давайте подумаем, как это можно красивее сделать. Мб выделить колонку цветом (может более блёкло?), сделать нумерацию всех челов всегда подряд.

А может и вообще отказаться и писать количество сверху

Copy link
Collaborator Author

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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я бы сказал что сначала по взводу, потом по фио, нет?

Copy link
Collaborator Author

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a, b – объекты, а не числа

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Получилось исправить

@@ -362,6 +362,34 @@ class Reference extends VuexModule {
return await getFetchRequest(
getRooms,
data => {
console.log(data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давай сотрём

Comment on lines 388 to 389
if (titleA < titleB) { return -1; }
if (titleA > titleB) { return 1; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем эти две строчки, если localeCompare делает то же самое?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Особенности национального гпт

@startsev2000 startsev2000 merged commit 5b7bd10 into master Sep 27, 2024
2 checks passed
@startsev2000 startsev2000 deleted the feat/students-table-numbers branch September 27, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants