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

Research consent form #1164

Merged
merged 15 commits into from
Jul 26, 2023
Merged

Research consent form #1164

merged 15 commits into from
Jul 26, 2023

Conversation

Maijjay
Copy link
Contributor

@Maijjay Maijjay commented Jul 7, 2023

No description provided.

#[generated_doc]
#[instrument(skip(pool))]
pub async fn post_user_consents(
user_id: web::Path<Uuid>,
Copy link
Member

Choose a reason for hiding this comment

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

user: AuthUser

pub deleted_at: Option<DateTime<Utc>>,
}

pub async fn insert(
Copy link
Member

Choose a reason for hiding this comment

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

upsert

#[generated_doc]
#[instrument(skip(pool))]
pub async fn get_research_consent_by_user_id(
user_id: web::Path<Uuid>,
Copy link
Member

Choose a reason for hiding this comment

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

authuser

@@ -0,0 +1,162 @@
/* eslint-disable i18next/no-literal-string */
Copy link
Member

Choose a reason for hiding this comment

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

Don't disable for the whole file

@@ -25,8 +28,10 @@ const Login: React.FC<React.PropsWithChildren<unknown>> = () => {
const [notification, setNotification] = useState<string | null>(null)
const [email, setEmail] = useState("")
const [password, setPassword] = useState("")
const [userId, setUserId] = useState("")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const [userId, setUserId] = useState("")
const [userId, setUserId] = useState<string | null>(null)

if (consent === undefined && optionSelected) {
setOptionSelected(false)
}
const consentQuery = useQuery({
Copy link
Member

Choose a reason for hiding this comment

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

useToastMutation

router.push(returnTo)
}, [router, uncheckedReturnTo])

const getUserConsent = useQuery({
Copy link
Member

Choose a reason for hiding this comment

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

move to hooks folder


return (
<div>
{/* eslint-disable-next-line i18next/no-literal-string */}
Copy link
Member

Choose a reason for hiding this comment

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

no need

>
<div>{t("research-consent-title")}:</div>
<Button
id={"changeReseachConstent"}
Copy link
Member

Choose a reason for hiding this comment

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

used?

Copy link
Member

Choose a reason for hiding this comment

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

@@ -99,6 +99,7 @@
"to-complete-this-chapter": "Suorittaaksesi tämän luvun",
"translate": "Käännä",
"university-of-helsinki": "Helsingin yliopisto",
"user-settings": "Käyttäjäasetukset",
Copy link
Member

Choose a reason for hiding this comment

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

Käyttäjän asetukset

await page.fill(`label:has-text("Password")`, "student-without-research-consent")
await page.locator("id=login-button").click()
await expect(page.locator("text=Organizations")).toBeVisible()
})
Copy link
Member

Choose a reason for hiding this comment

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

change the setting

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Jul 21, 2023
@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@vectopus/atlas-icons-react 0.0.10 None +0 3.32 MB mosamy19

@nygrenh nygrenh merged commit 4004456 into master Jul 26, 2023
13 checks passed
@nygrenh nygrenh deleted the research-consent-form branch July 26, 2023 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants