-
Notifications
You must be signed in to change notification settings - Fork 1
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 a curator to profile #1197
base: main
Are you sure you want to change the base?
Add a curator to profile #1197
Conversation
0f65236
to
a6f4ac5
Compare
836a7d7
to
3e945ad
Compare
3e945ad
to
c797b47
Compare
@@ -11,5 +11,7 @@ | |||
"Retirement": "Увольнение", | |||
"Transfer": "Перевод", | |||
"Supplemental: ": "Дополнительно: ", | |||
"Previous names": "Предыдущие ФИО" | |||
"Previous names": "Предыдущие ФИО", | |||
"Curator": "", |
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.
Translations
01efa78
to
f95f3e4
Compare
f95f3e4
to
5d80242
Compare
Screen.mov |
Scr.mov |
e49f023
to
65ebe45
Compare
"Save previous name:": "Сохранить предыдущее ФИО" | ||
"Save previous name:": "Сохранить предыдущее ФИО", | ||
"Curators:": "Кураторы", | ||
"Curator": "" |
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.
Translation
onClose: () => void; | ||
} | ||
|
||
interface UserFormExternalTeamBlockType { |
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.
looks like unnecessary type
const savePreviousName = watch('savePreviousName') ?? false; | ||
|
||
const updateUser = async (data: EditUser) => { | ||
await editUser(data); | ||
onClose(); | ||
}; | ||
|
||
const onCuratorsChange = (users: User[], type: keyof UserFormExternalTeamBlockType) => { | ||
setValue( |
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.
why not just setValue('curatorIds', ...)
?
src/modules/externalUserTypes.ts
Outdated
@@ -2,6 +2,7 @@ export interface ExternalUserUpdate { | |||
email: string; | |||
name?: string; | |||
supervisorId?: string | null; | |||
curators?: string[] | null; |
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.
Curators cannot be saved in external update
src/trpc/router/userRouter.ts
Outdated
}, | ||
{ | ||
name: result.name, | ||
supervisorId: result.supervisorId, | ||
organizationalUnitId: result.organizationUnitId ?? undefined, | ||
email: result.email, | ||
curatorIds: input.curatorIds, |
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.
Getting real list of curators would be more reliable than using input
src/modules/userMethods.ts
Outdated
|
||
if (curatorIds) { | ||
updateUser.curators = { | ||
connect: curatorIds.map((id) => ({ id })), |
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.
but where is disconnect?
f5c208d
to
105db6e
Compare
105db6e
to
c69be93
Compare
S.mov |
PR includes
Related issues
Resolve #1193