profcomff / profcomff/webapp-ui
Компонент списка групп пользователя
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 15
- Forks
- 2
- Avg merge
- 3m
- Merged PRs (30d)
- 8
Description
Issue open by Roman Dyakov via telegram message.
Пользователь может быть в группах. Каждый пользователь может узнать список своих групп, а администраторы могут посмотреть список групп любого пользователя или изменить его. Группы бывают вложенными: пользователь может состоять в группе напрямую (direct) или быть в вложенной группе, как в подпапке (indirect).
Нужно показывать на странице пользователя список его групп. Для администраторов показывать так же список indirect-групп.
- Делаем простую отрисовку групп
- Создать новый Vue-файл в папке Components
- Добавить файлу входную модель: показываемого пользователя. Документация и пример: https://vuejs.org/guide/components/v-model
- Добавить компонент на экран профиля, передать в него переменную
meв качестве модели. Куда добавлять: https://github.com/profcomff/webapp-ui/blob/main/src/views/profile/ProfileView.vue - Отрисовать список групп в виде "чипсов" через
v-for. Документация и примеры: https://vuetifyjs.com/en/components/chips/#usage
- Добавляем список групп для администраторов
- Повторить блок с отрисовкой списка групп, но взять список IndirectGroups
- Спрятать его внутрь AccessRestricted с необходимыми правами
auth.group.read. Пример: https://github.com/profcomff/webapp-ui/blob/main/src/views/admin/AdminView.vue#L96-L98
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/views/profile/ProfileView.vue and the Components directory, then review the Vue v-model and Vuetify chips examples linked in the issue. Add the group-list component to the profile using me as its model, and add the IndirectGroups list for administrators inside AccessRestricted, following the pattern in src/views/admin/AdminView.vue. Done means direct groups are shown to users and indirect groups are additionally shown to authorized administrators.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100