Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e5b511148a |
+10
-4
@@ -86,8 +86,9 @@ publish:dev:
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- docker build . -t "$IMAGE_NAME":latest --build-arg SENTRY_AUTH_TOKEN="$SENTRY_AUTH_TOKEN" --build-arg NEXT_PUBLIC_DEPLOY_ENV=development --build-arg NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api --build-arg NEXT_PUBLIC_SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
- docker info
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build . -t "$IMAGE_NAME":latest --build-arg SENTRY_AUTH_TOKEN="$SENTRY_AUTH_TOKEN" --build-arg NEXT_PUBLIC_DEPLOY_ENV=development --build-arg NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api --build-arg NEXT_PUBLIC_SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
- docker push "$IMAGE_NAME":latest
|
||||
|
||||
publish:prod:
|
||||
@@ -98,8 +99,9 @@ publish:prod:
|
||||
only:
|
||||
- production
|
||||
script:
|
||||
- docker build . -t "$IMAGE_NAME":prod --build-arg SENTRY_AUTH_TOKEN="$SENTRY_AUTH_TOKEN"
|
||||
- docker info
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build . -t "$IMAGE_NAME":prod --build-arg SENTRY_AUTH_TOKEN="$SENTRY_AUTH_TOKEN"
|
||||
- docker push "$IMAGE_NAME":prod
|
||||
|
||||
deploy:dev:
|
||||
@@ -118,9 +120,11 @@ deploy:dev:
|
||||
- echo "$DEV_TLSCACERT" > ~/.docker/ca.pem
|
||||
- echo "$DEV_TLSCERT" > ~/.docker/cert.pem
|
||||
- echo "$DEV_TLSKEY" > ~/.docker/key.pem
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
|
||||
script:
|
||||
- docker stack deploy --with-registry-auth -c stack-compose-dev.yml "$SERVICE_NAME"
|
||||
after_script:
|
||||
- docker logout "$CI_REGISTRY"
|
||||
|
||||
deploy:prod:
|
||||
stage: deploy
|
||||
@@ -138,6 +142,8 @@ deploy:prod:
|
||||
- echo "$TLSCACERT" > ~/.docker/ca.pem
|
||||
- echo "$TLSCERT" > ~/.docker/cert.pem
|
||||
- echo "$TLSKEY" > ~/.docker/key.pem
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
|
||||
script:
|
||||
- docker stack deploy --with-registry-auth -c stack-compose.yml "$SERVICE_NAME"
|
||||
after_script:
|
||||
- docker logout "$CI_REGISTRY"
|
||||
|
||||
+1
-1
@@ -25,5 +25,5 @@ module.exports = withBundleAnalyzer(withSentryConfig({
|
||||
},
|
||||
sentry: {
|
||||
hideSourceMaps: true, // Hide source maps, see: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#configure-source-maps
|
||||
},
|
||||
}
|
||||
}, sentryWebpackPluginOptions));
|
||||
|
||||
Generated
+494
-619
File diff suppressed because it is too large
Load Diff
+40
-1
@@ -1,7 +1,10 @@
|
||||
import {
|
||||
deleteTokenCookies, getAccessTokenCookie, getRefreshTokenCookie, setAccessTokenCookie, setRefreshTokenCookie,
|
||||
} from "@utils/auth";
|
||||
import { APIPath, postBackendAPI } from "./backend";
|
||||
import {
|
||||
APIPath, postBackendAPI, getBackendAPI, putBackendAPI, deleteBackendAPI,
|
||||
API,
|
||||
} from "./backend";
|
||||
|
||||
export type AuthTokenRequest = {
|
||||
username: string;
|
||||
@@ -71,3 +74,39 @@ export const authenticate = async (): Promise<boolean> => {
|
||||
return refreshToken();
|
||||
}
|
||||
};
|
||||
|
||||
export const authedGetBackendAPI = async <ResponseType>({
|
||||
path, urlParams, queryParams, authenticated = true,
|
||||
}: API): Promise<ResponseType> => {
|
||||
if (authenticated) await authenticate();
|
||||
return getBackendAPI<ResponseType>({
|
||||
path, urlParams, queryParams, authenticated,
|
||||
});
|
||||
};
|
||||
|
||||
export const authedPostBackendAPI = async <RequestType, ResponseType>({
|
||||
path, urlParams, queryParams, authenticated = true,
|
||||
}: API, body: RequestType): Promise<ResponseType> => {
|
||||
if (authenticated) await authenticate();
|
||||
return postBackendAPI<RequestType, ResponseType>({
|
||||
path, urlParams, queryParams, authenticated,
|
||||
}, body);
|
||||
};
|
||||
|
||||
export const authedPutBackendAPI = async <RequestType, ResponseType>({
|
||||
path, urlParams, queryParams, authenticated = true,
|
||||
}: API, body: RequestType): Promise<ResponseType> => {
|
||||
if (authenticated) await authenticate();
|
||||
return putBackendAPI<RequestType, ResponseType>({
|
||||
path, urlParams, queryParams, authenticated,
|
||||
}, body);
|
||||
};
|
||||
|
||||
export const authedDeleteBackendAPI = async <ResponseType>({
|
||||
path, urlParams, queryParams, authenticated = true,
|
||||
}: API): Promise<ResponseType> => {
|
||||
if (authenticated) await authenticate();
|
||||
return deleteBackendAPI<ResponseType>({
|
||||
path, urlParams, queryParams, authenticated,
|
||||
});
|
||||
};
|
||||
|
||||
+12
-9
@@ -1,8 +1,11 @@
|
||||
/* eslint-disable no-console */
|
||||
import Event from "@models/Event";
|
||||
import {
|
||||
APIPath, deleteBackendAPI, getBackendAPI, postBackendAPI, putBackendAPI,
|
||||
APIPath,
|
||||
} from "./backend";
|
||||
import {
|
||||
authedGetBackendAPI, authedPostBackendAPI, authedDeleteBackendAPI, authedPutBackendAPI,
|
||||
} from "./auth";
|
||||
|
||||
interface Options {
|
||||
limit?: number;
|
||||
@@ -14,7 +17,7 @@ interface Options {
|
||||
class EventApi {
|
||||
static getEvent = async (id: number, auth = false): Promise<Event> => {
|
||||
try {
|
||||
return await getBackendAPI<Event>({
|
||||
return await authedGetBackendAPI<Event>({
|
||||
path: APIPath.EVENTS, urlParams: { id }, authenticated: auth,
|
||||
});
|
||||
} catch (err) {
|
||||
@@ -24,10 +27,10 @@ class EventApi {
|
||||
};
|
||||
|
||||
static getEvents = async ({
|
||||
since, limit, offset, auth,
|
||||
since, limit, offset, auth = false,
|
||||
}: Options = {}): Promise<Event[]> => {
|
||||
try {
|
||||
return await getBackendAPI<Event[]>({
|
||||
return await authedGetBackendAPI<Event[]>({
|
||||
path: APIPath.EVENTS,
|
||||
queryParams: {
|
||||
since,
|
||||
@@ -44,8 +47,8 @@ class EventApi {
|
||||
|
||||
static createEvent = async (data: Event): Promise<Event> => {
|
||||
try {
|
||||
return await postBackendAPI<Event, Event>({
|
||||
path: APIPath.EVENTS, authenticated: true,
|
||||
return await authedPostBackendAPI<Event, Event>({
|
||||
path: APIPath.EVENTS,
|
||||
}, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@@ -55,8 +58,8 @@ class EventApi {
|
||||
|
||||
static updateEvent = async (data: Event): Promise<Event> => {
|
||||
try {
|
||||
return await putBackendAPI<Event, Event>({
|
||||
path: APIPath.EVENTS, urlParams: { id: data.id }, authenticated: true,
|
||||
return await authedPutBackendAPI<Event, Event>({
|
||||
path: APIPath.EVENTS, urlParams: { id: data.id },
|
||||
}, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@@ -66,7 +69,7 @@ class EventApi {
|
||||
|
||||
static deleteEvent = async (id: number): Promise<void> => {
|
||||
try {
|
||||
await deleteBackendAPI<{ message: "OK" }>({ path: APIPath.EVENTS, urlParams: { id }, authenticated: true });
|
||||
await authedDeleteBackendAPI<{ message: "OK" }>({ path: APIPath.EVENTS, urlParams: { id } });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
|
||||
+12
-9
@@ -1,8 +1,11 @@
|
||||
/* eslint-disable no-console */
|
||||
import Post from "@models/Feed";
|
||||
import {
|
||||
APIPath, deleteBackendAPI, getBackendAPI, postBackendAPI, putBackendAPI,
|
||||
APIPath,
|
||||
} from "./backend";
|
||||
import {
|
||||
authedGetBackendAPI, authedPostBackendAPI, authedDeleteBackendAPI, authedPutBackendAPI,
|
||||
} from "./auth";
|
||||
|
||||
interface Options {
|
||||
limit?: number;
|
||||
@@ -11,9 +14,9 @@ interface Options {
|
||||
}
|
||||
|
||||
class FeedApi {
|
||||
static getPost = async (id: number, auth?: boolean): Promise<Post> => {
|
||||
static getPost = async (id: number, auth = false): Promise<Post> => {
|
||||
try {
|
||||
return await getBackendAPI<Post>({
|
||||
return await authedGetBackendAPI<Post>({
|
||||
path: APIPath.FEED, urlParams: { id }, authenticated: auth,
|
||||
});
|
||||
} catch (err) {
|
||||
@@ -22,9 +25,9 @@ class FeedApi {
|
||||
}
|
||||
};
|
||||
|
||||
static getFeed = async ({ limit, offset, auth }: Options = {}): Promise<Post[]> => {
|
||||
static getFeed = async ({ limit, offset, auth = false }: Options = {}): Promise<Post[]> => {
|
||||
try {
|
||||
return await getBackendAPI<Post[]>({
|
||||
return await authedGetBackendAPI<Post[]>({
|
||||
path: APIPath.FEED,
|
||||
queryParams: {
|
||||
limit,
|
||||
@@ -40,7 +43,7 @@ class FeedApi {
|
||||
|
||||
static createPost = async (data: Post): Promise<Post> => {
|
||||
try {
|
||||
return await postBackendAPI<Post, Post>({ path: APIPath.FEED, authenticated: true }, data);
|
||||
return await authedPostBackendAPI<Post, Post>({ path: APIPath.FEED }, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
@@ -49,8 +52,8 @@ class FeedApi {
|
||||
|
||||
static updatePost = async (data: Post): Promise<Post> => {
|
||||
try {
|
||||
return await putBackendAPI<Post, Post>({
|
||||
path: APIPath.FEED, urlParams: { id: data.id }, authenticated: true,
|
||||
return await authedPutBackendAPI<Post, Post>({
|
||||
path: APIPath.FEED, urlParams: { id: data.id },
|
||||
}, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@@ -60,7 +63,7 @@ class FeedApi {
|
||||
|
||||
static deletePost = async (id: number): Promise<void> => {
|
||||
try {
|
||||
await deleteBackendAPI<{ message: "OK" }>({ path: APIPath.EVENTS, urlParams: { id }, authenticated: true });
|
||||
await authedDeleteBackendAPI<{ message: "OK" }>({ path: APIPath.EVENTS, urlParams: { id } });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
|
||||
+12
-9
@@ -1,8 +1,11 @@
|
||||
/* eslint-disable no-console */
|
||||
import JobAd from "@models/JobAd";
|
||||
import {
|
||||
APIPath, deleteBackendAPI, getBackendAPI, postBackendAPI, putBackendAPI,
|
||||
APIPath,
|
||||
} from "./backend";
|
||||
import {
|
||||
authedGetBackendAPI, authedPostBackendAPI, authedDeleteBackendAPI, authedPutBackendAPI,
|
||||
} from "./auth";
|
||||
|
||||
interface Options {
|
||||
since?: Date;
|
||||
@@ -14,7 +17,7 @@ interface Options {
|
||||
class JobAdApi {
|
||||
static getJobAd = async (id: number, auth = false): Promise<JobAd> => {
|
||||
try {
|
||||
return await getBackendAPI({
|
||||
return await authedGetBackendAPI({
|
||||
path: APIPath.JOBADS, urlParams: { id }, authenticated: auth,
|
||||
});
|
||||
} catch (err) {
|
||||
@@ -24,10 +27,10 @@ class JobAdApi {
|
||||
};
|
||||
|
||||
static getJobAds = async ({
|
||||
since, limit, offset, auth,
|
||||
since, limit, offset, auth = false,
|
||||
}: Options = {}): Promise<JobAd[]> => {
|
||||
try {
|
||||
return await getBackendAPI<JobAd[]>({
|
||||
return await authedGetBackendAPI<JobAd[]>({
|
||||
path: APIPath.JOBADS,
|
||||
queryParams: {
|
||||
since,
|
||||
@@ -44,8 +47,8 @@ class JobAdApi {
|
||||
|
||||
static createJobAd = async (data: JobAd): Promise<JobAd> => {
|
||||
try {
|
||||
return await postBackendAPI<JobAd, JobAd>({
|
||||
path: APIPath.JOBADS, authenticated: true,
|
||||
return await authedPostBackendAPI<JobAd, JobAd>({
|
||||
path: APIPath.JOBADS,
|
||||
}, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@@ -55,8 +58,8 @@ class JobAdApi {
|
||||
|
||||
static updateJobAd = async (data: JobAd): Promise<JobAd> => {
|
||||
try {
|
||||
return await putBackendAPI<JobAd, JobAd>({
|
||||
path: APIPath.JOBADS, urlParams: { id: data.id }, authenticated: true,
|
||||
return await authedPutBackendAPI<JobAd, JobAd>({
|
||||
path: APIPath.JOBADS, urlParams: { id: data.id },
|
||||
}, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@@ -66,7 +69,7 @@ class JobAdApi {
|
||||
|
||||
static deleteJobAd = async (id: number): Promise<void> => {
|
||||
try {
|
||||
await deleteBackendAPI<{ message: "OK" }>({ path: APIPath.JOBADS, urlParams: { id }, authenticated: true });
|
||||
await authedDeleteBackendAPI<{ message: "OK" }>({ path: APIPath.JOBADS, urlParams: { id } });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
|
||||
+18
-15
@@ -1,8 +1,11 @@
|
||||
/* eslint-disable no-console */
|
||||
import { Signup, SignupForm } from "@models/Signup";
|
||||
import {
|
||||
APIPath, deleteBackendAPI, getBackendAPI, postBackendAPI, putBackendAPI,
|
||||
APIPath, postBackendAPI,
|
||||
} from "./backend";
|
||||
import {
|
||||
authedGetBackendAPI, authedPostBackendAPI, authedDeleteBackendAPI, authedPutBackendAPI,
|
||||
} from "./auth";
|
||||
|
||||
export type EmailRequest = {
|
||||
mode: "all" | "actual" | "reserve";
|
||||
@@ -13,8 +16,8 @@ export type EmailRequest = {
|
||||
class SignupApi {
|
||||
static getSignup = async (id: number): Promise<Signup> => {
|
||||
try {
|
||||
return await getBackendAPI<Signup>({
|
||||
path: APIPath.SIGNUPS, urlParams: { id }, authenticated: true,
|
||||
return await authedGetBackendAPI<Signup>({
|
||||
path: APIPath.SIGNUPS, urlParams: { id },
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@@ -37,7 +40,7 @@ class SignupApi {
|
||||
try {
|
||||
const { id } = data;
|
||||
if (!id) throw new Error("SignupId required!");
|
||||
return await putBackendAPI<Signup, Signup>({
|
||||
return await authedPutBackendAPI<Signup, Signup>({
|
||||
path: APIPath.SIGNUPS_EDIT,
|
||||
urlParams: {
|
||||
id,
|
||||
@@ -54,7 +57,7 @@ class SignupApi {
|
||||
|
||||
static getSignupUUID = async (id: number, uuid: string): Promise<Signup> => {
|
||||
try {
|
||||
return await getBackendAPI<Signup>({
|
||||
return await authedGetBackendAPI<Signup>({
|
||||
path: APIPath.SIGNUPS_EDIT,
|
||||
urlParams: {
|
||||
id,
|
||||
@@ -71,7 +74,7 @@ class SignupApi {
|
||||
|
||||
static deleteSignup = async (id: number): Promise<void> => {
|
||||
try {
|
||||
await deleteBackendAPI<{ message: "OK" }>({ path: APIPath.SIGNUPS, urlParams: { id }, authenticated: true });
|
||||
await authedDeleteBackendAPI<{ message: "OK" }>({ path: APIPath.SIGNUPS, urlParams: { id } });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
@@ -80,7 +83,7 @@ class SignupApi {
|
||||
|
||||
static getForm = async (id: number, auth = false): Promise<SignupForm> => {
|
||||
try {
|
||||
return await getBackendAPI<SignupForm>({
|
||||
return await authedGetBackendAPI<SignupForm>({
|
||||
path: APIPath.SIGNUP_FORMS, urlParams: { id }, authenticated: auth,
|
||||
});
|
||||
} catch (err) {
|
||||
@@ -91,7 +94,7 @@ class SignupApi {
|
||||
|
||||
static getForms = async (auth = false): Promise<SignupForm[]> => {
|
||||
try {
|
||||
return await getBackendAPI<SignupForm[]>({
|
||||
return await authedGetBackendAPI<SignupForm[]>({
|
||||
path: APIPath.SIGNUP_FORMS, authenticated: auth,
|
||||
});
|
||||
} catch (err) {
|
||||
@@ -102,8 +105,8 @@ class SignupApi {
|
||||
|
||||
static createForm = async (data: SignupForm): Promise<SignupForm> => {
|
||||
try {
|
||||
return await postBackendAPI<SignupForm, SignupForm>({
|
||||
path: APIPath.SIGNUP_FORMS, authenticated: true,
|
||||
return await authedPostBackendAPI<SignupForm, SignupForm>({
|
||||
path: APIPath.SIGNUP_FORMS,
|
||||
}, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@@ -113,8 +116,8 @@ class SignupApi {
|
||||
|
||||
static updateForm = async (data: SignupForm): Promise<SignupForm> => {
|
||||
try {
|
||||
return await putBackendAPI<SignupForm, SignupForm>({
|
||||
path: APIPath.SIGNUP_FORMS, urlParams: { id: data.id }, authenticated: true,
|
||||
return await authedPutBackendAPI<SignupForm, SignupForm>({
|
||||
path: APIPath.SIGNUP_FORMS, urlParams: { id: data.id },
|
||||
}, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@@ -124,7 +127,7 @@ class SignupApi {
|
||||
|
||||
static deleteForm = async (id: number): Promise<void> => {
|
||||
try {
|
||||
await deleteBackendAPI<{ message: "OK" }>({ path: APIPath.SIGNUP_FORMS, urlParams: { id }, authenticated: true });
|
||||
await authedDeleteBackendAPI<{ message: "OK" }>({ path: APIPath.SIGNUP_FORMS, urlParams: { id } });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
@@ -133,7 +136,7 @@ class SignupApi {
|
||||
|
||||
static signupFormSendEmail = async (data: EmailRequest, id: number): Promise<void> => {
|
||||
try {
|
||||
await postBackendAPI<EmailRequest, { message: "Email sent" }>({ path: APIPath.SIGNUP_FORMS_EMAIL, urlParams: { id }, authenticated: true }, data);
|
||||
await authedPostBackendAPI<EmailRequest, { message: "Email sent" }>({ path: APIPath.SIGNUP_FORMS_EMAIL, urlParams: { id } }, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
@@ -142,7 +145,7 @@ class SignupApi {
|
||||
|
||||
static getSignups = async (id: number): Promise<Signup[]> => {
|
||||
try {
|
||||
return await getBackendAPI<Signup[]>({ path: APIPath.SIGNUP_FORMS_SIGNUPS, urlParams: { id }, authenticated: true });
|
||||
return await authedGetBackendAPI<Signup[]>({ path: APIPath.SIGNUP_FORMS_SIGNUPS, urlParams: { id } });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
|
||||
@@ -28,9 +28,6 @@ const Events: React.FC<EventsProps> = ({ events, lang }) => {
|
||||
const pageLinkText = t("Kaikki tapahtumat");
|
||||
const pageLinkDesc = `${t("löydät tapahtumakalenterista")}\xa0›`;
|
||||
|
||||
const googleCalendarText = t("Lisää killan");
|
||||
const googleCalendarDesc = `${t("Google-kalenteri")}\xa0›`;
|
||||
|
||||
const locale = isFi ? "fi-FI" : "en-GB";
|
||||
|
||||
const filteredEvents = events.map((e) => ({
|
||||
@@ -65,9 +62,6 @@ const Events: React.FC<EventsProps> = ({ events, lang }) => {
|
||||
<PageLink to="/kilta/toiminta#tapahtumat" desc={pageLinkDesc}>
|
||||
{pageLinkText}
|
||||
</PageLink>
|
||||
<PageLink to="https://calendar.google.com/calendar/u/0?cid=Y19mYjhhNWUwMjVjMjhkMTg5YTkzMWYyN2U5N2M4ODBmMGFhNTdmN2M1NDFlYzVhNjdlZDM4NzliYTVhNDEwNWI1QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20" desc={googleCalendarDesc}>
|
||||
{googleCalendarText}
|
||||
</PageLink>
|
||||
</aside>
|
||||
|
||||
</CardSection>
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
"ja hallitukset kuulumiset": "and what the board has been up to",
|
||||
"Kuvia tapahtumista": "Photos from events",
|
||||
"kuvagalleriassa": "in the photo gallery",
|
||||
"Lisää killan": "Add guild's",
|
||||
"Google-kalenteri": "Google-calendar",
|
||||
|
||||
"Hakemaasi sivua":
|
||||
"Page",
|
||||
@@ -53,9 +51,6 @@
|
||||
"Ilmoittautuminen sulkeutuu":
|
||||
"Signup closes at",
|
||||
|
||||
"Ilmoittautuminen onnistui!":
|
||||
"Signup successful!",
|
||||
|
||||
"Ilmoittauminen on umpeutunut!":
|
||||
"Signup has been closed!",
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React, { useState } from "react";
|
||||
import React from "react";
|
||||
import { NextPage, GetStaticProps, GetStaticPaths } from "next";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { ISubmitEvent } from "@rjsf/core";
|
||||
import { toast } from "react-toastify";
|
||||
import axios from "axios";
|
||||
import useSWR from "swr";
|
||||
import useSWR, { mutate } from "swr";
|
||||
import { Signup, SignupForm } from "@models/Signup";
|
||||
import SignupApi from "@api/signupApi";
|
||||
import SignUpPageView from "@views/SignUpPage/SignUpPageView";
|
||||
@@ -25,8 +25,6 @@ const SignUpPage: NextPage<InitialProps> = ({ initialForm }) => {
|
||||
const id = String(initialForm?.id ?? "");
|
||||
const URL = `${FORM_URL}${id}/`;
|
||||
const { data: signupForm, error } = useSWR<SignupForm>(URL, (url) => axios.get(url).then((res) => res.data), { fallbackData: initialForm });
|
||||
const [isSending, setIsSending] = useState(false);
|
||||
const [formSent, setFormSent] = useState(false);
|
||||
|
||||
if (error) {
|
||||
console.error(error);
|
||||
@@ -44,26 +42,18 @@ const SignUpPage: NextPage<InitialProps> = ({ initialForm }) => {
|
||||
}
|
||||
|
||||
const onSubmit = async ({ formData }: ISubmitEvent<string>) => {
|
||||
setIsSending(true);
|
||||
|
||||
const payload: Signup = {
|
||||
signupForm_id: signupForm.id,
|
||||
answer: formData,
|
||||
};
|
||||
|
||||
if (isSending === true) {
|
||||
toast.error("Sign-up form already submitted! No need to spam send. 😟");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await SignupApi.createSignup(payload);
|
||||
toast.success("Sign-up submitted successfully 😎");
|
||||
setFormSent(true);
|
||||
mutate(URL);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
toast.error("Uh oh! Sign-up failed! 😟");
|
||||
setIsSending(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -78,7 +68,6 @@ const SignUpPage: NextPage<InitialProps> = ({ initialForm }) => {
|
||||
formData={{}}
|
||||
onChange={noop}
|
||||
onSubmit={onSubmit}
|
||||
formSent={formSent}
|
||||
/>
|
||||
</PageWrapper>
|
||||
</>
|
||||
|
||||
@@ -111,13 +111,13 @@ const ActualPageView: React.FC<ActualPageViewProps> = ({ events, feed }) => (
|
||||
<div>
|
||||
<h6 id="elepaja">Rakenna kaikkea elektroniikkaan liittyvää</h6>
|
||||
<p>
|
||||
SIK-PAJA on sähköinsinöörikillan ylläpitämä elektroniikkapaja, jossa opiskelijat pääsevät soveltamaan koulussa oppimiaan taitojaan käytännön projekteissa.
|
||||
Elepaja on sähköinsinöörikillan ylläpitämä elektroniikkapaja, jossa opiskelijat pääsevät soveltamaan koulussa oppimiaan taitojaan käytännön projekteissa.
|
||||
Opiskelijat ovat aikojen saatossa rakentaneet pajalla mitä monimuotoisempia projekteja kuten ensimmäisiä ledivilkkujaan, teslakäämejä, robotteja ja radiolähettimiä.
|
||||
Jos elektroniikan rakentelu kiinnostaa tai tarvitset jonkun projektin kanssa apua niin tule ihmeessä käymään elepajalla.
|
||||
Pajan varustukseen kuluu perustyökalut, kolvit, komponentit sekä laaja valikoima mittauslaitteita.
|
||||
Tule tutustumaan toimintaamme Kandidaattikeskuksessa ruokala Alvarin alapuolella sijaitseviin tiloihimme.
|
||||
Pajan varustukseen kuluu perustyökalut, piirilevyn syövytysvälineet, kolvit, komponentit, pylväsporakone sekä laaja valikoima mittauslaitteita.
|
||||
Ota siis kola ja tule nauttimaan elepajan mukavasta ilmapiiristä Elepajan uusissa tiloissa kanditaattikeskuksessa ruokala alvarin alla.
|
||||
{" "}
|
||||
<Link to="https://t.me/sikpaja">Tästä</Link> pääset liittymään pajan Telegram-ryhmään.
|
||||
<Link to="https://elepaja.fi/tg">Tästä</Link> pääset liittymään elepajan Telegram-ryhmään.
|
||||
</p>
|
||||
<h6 id="urheilu">Urheilua ja lajikokeiluja</h6>
|
||||
<p>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"name": "Otto Julkunen",
|
||||
"phone_number": null,
|
||||
"email": "otto.julkunen@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/ottom.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -23,7 +23,7 @@
|
||||
"name": "Karoliina Talvikangas",
|
||||
"phone_number": null,
|
||||
"email": "karoliina.talvikangas@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/karoliina.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -35,7 +35,7 @@
|
||||
"name": "Ville Lairila",
|
||||
"phone_number": null,
|
||||
"email": "ville.lairila@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/ville.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -47,7 +47,7 @@
|
||||
"name": "Aaron Löfgren",
|
||||
"phone_number": null,
|
||||
"email": "aaron.lofgren@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/aaron.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -59,7 +59,7 @@
|
||||
"name": "Kasper Skog",
|
||||
"phone_number": null,
|
||||
"email": "kasper.skog@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/kasper.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -71,7 +71,7 @@
|
||||
"name": "Roni Vallius",
|
||||
"phone_number": null,
|
||||
"email": "roni.vallius@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/roni.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -83,7 +83,7 @@
|
||||
"name": "Elina Huttunen",
|
||||
"phone_number": null,
|
||||
"email": "elina.huttunen@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/elina.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -95,7 +95,7 @@
|
||||
"name": "Julia Pykälä-aho",
|
||||
"phone_number": null,
|
||||
"email": "julia.pykalaaho@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/julia.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -107,7 +107,7 @@
|
||||
"name": "Juulia Härkönen",
|
||||
"phone_number": null,
|
||||
"email": "juulia.harkonen@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/juulia.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -119,7 +119,7 @@
|
||||
"name": "Tommi Sytelä",
|
||||
"phone_number": null,
|
||||
"email": "tommi.sytela@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/tommi.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -131,7 +131,7 @@
|
||||
"name": "Pyry Vaara",
|
||||
"phone_number": null,
|
||||
"email": "pyry.vaara@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/pyry.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -143,7 +143,7 @@
|
||||
"name": "Nette Levijoki",
|
||||
"phone_number": null,
|
||||
"email": "nette.levijoki@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/nette.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -155,7 +155,7 @@
|
||||
"name": "Visa Kurvi",
|
||||
"phone_number": null,
|
||||
"email": "visa.kurvi@sahkoinsinoorikilta.fi",
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/visa.jpg"
|
||||
"image": "https://static.sahkoinsinoorikilta.fi/img/board/placeholder.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -65,9 +65,11 @@ const CorporatePageView: React.FC<CorporatePageViewProps> = ({ jobAds }) => (
|
||||
|
||||
<h6>Potentiaalin Tasaus</h6>
|
||||
<p>
|
||||
Kiltamme viettää perinteikästä vuosijuhlaansa helmikuun kolmantena lauantaina.
|
||||
Kiltamme viettää perinteikkäitä vuosijuhliaan helmikuun kolmantena lauantaina.
|
||||
Potentiaalin Tasaus on kiltamme juhlavin ja rakkain tapahtuma.
|
||||
Yrityksillä on mahdollisuus osallistua vuosijuhliin niin pienellä kuin suurellakin panoksella!
|
||||
Yrityksillä on mahdollisuus osallistua vuosijuhliin niin pienellä kuin suurellakin panoksella.
|
||||
Killan 100-vuotisjuhla PoTa100 lähestyy myös kovaa vauhtia.
|
||||
Jos yrityksesi on kiinnostunut 100-vuotisjuhlasta, kannattaa ohjautua osoitteeseen <Link to="https://sik100.fi">sik100.fi</Link>.
|
||||
</p>
|
||||
|
||||
<h6>Killan nettisivut ja työpaikkamainokset</h6>
|
||||
|
||||
@@ -13,24 +13,24 @@ const FreshmenPageHero: React.FC = () => (
|
||||
<HeroAside bgColor="lightTurquoise">
|
||||
<HeroAsideItem
|
||||
header="Lue killan fuksiopas"
|
||||
link="https://static.sahkoinsinoorikilta.fi/FTMK/Fuksiopas2023.pdf"
|
||||
link="https://static.sahkoinsinoorikilta.fi/FTMK/Fuksiopas2022.pdf"
|
||||
linkText="lue fuksiopas täältä!"
|
||||
/>
|
||||
|
||||
<HeroAsideItem
|
||||
header="Seuraa killan tiedotusta"
|
||||
link="https://t.me/+AB-JMbAxM2c0MDc0"
|
||||
linkText="Liity killan Telegram-ryhmään!"
|
||||
link="https://t.me/+ubTeGSYKTvg3NmVk"
|
||||
linkText="Liity killan Telegram-ryhmiin"
|
||||
/>
|
||||
<HeroAsideItem
|
||||
header="Kaikki kunnossa opiskelua varten?"
|
||||
link="https://www.aalto.fi/fi/ohjelmat/sahkotekniikan-kandidaattiohjelma/opintojen-aloittaminen"
|
||||
link="https://into.aalto.fi/pages/viewpage.action?pageId=1183171"
|
||||
linkText="Lue korkeakoulun tietopaketti"
|
||||
/>
|
||||
<HeroAsideItem
|
||||
header="Fuksiryhmät ja ISOt?"
|
||||
header="ISO-ryhmät ja ISO-henkilöt?"
|
||||
link="#isot"
|
||||
linkText="Tietoa fuksiryhmistä"
|
||||
linkText="Tsekkaa ISO-henkilöiden tiedot"
|
||||
/>
|
||||
</HeroAside>
|
||||
</Hero>
|
||||
|
||||
@@ -7,8 +7,8 @@ import {
|
||||
import FreshmenPageHero from "./FreshmenPageHero";
|
||||
|
||||
const FUKSI_POINTS_LINK = "https://static.sahkoinsinoorikilta.fi/FTMK/Fuksipisteohje.pdf";
|
||||
const TG_GROUP_CHAT_LINK = "https://t.me/+6rAKYPVaCmg4ZTlk";
|
||||
const TG_NOTIFICATIONS_LINK = "https://t.me/+57BnXcTlsuU0YWQ0";
|
||||
const TG_GROUP_CHAT_LINK = "https://t.me/+1PqQHRVMjiAxMTU0";
|
||||
const TG_NOTIFICATIONS_LINK = "https://t.me/+Ln8TvQ-_id9kZTU0";
|
||||
const EMAIL_LINK = "ftmk@sahkoinsinoorikilta.fi";
|
||||
const EMAIL_LINK_MAILTO = `mailto:${EMAIL_LINK}`;
|
||||
|
||||
@@ -58,7 +58,7 @@ const FreshmenPageView: React.FC = () => (
|
||||
|
||||
<ImageContainer>
|
||||
<Image
|
||||
src="https://static.sahkoinsinoorikilta.fi/uus_webi/fuksikipparit-2023.jpg"
|
||||
src="https://static.sahkoinsinoorikilta.fi/uus_webi/fuksikipparit-2022.jpg"
|
||||
alt="Kipparit"
|
||||
layout="responsive"
|
||||
width={100}
|
||||
@@ -69,7 +69,7 @@ const FreshmenPageView: React.FC = () => (
|
||||
|
||||
<h6>Fuksikapteenit</h6>
|
||||
<p>
|
||||
Me olemme fuksikapteenisi <strong>Aaron</strong> ja <strong>Kasper</strong> ja tulemme olemaan tukenasi sekä valvomassa suorituksiasi fuksivuoden seikkailuissa kohti teekkarilakkia, jonka voit ansaita mahdollisesti järjestettävänä Wappuna ensi keväällä.
|
||||
Me olemme fuksikapteenisi <strong>Melisa</strong> ja <strong>Eveliina</strong> ja tulemme olemaan tukenasi sekä valvomassa suorituksiasi fuksivuoden seikkailuissa kohti teekkarilakkia, jonka voit ansaita mahdollisesti järjestettävänä Wappuna ensi keväällä.
|
||||
Jos sinulla on mitään kysymyksiä, ota ihmeessä meihin yhteyttä esimerkiksi <Link to={TG_GROUP_CHAT_LINK} target="_blank">Telegramissa</Link> tai <a href={EMAIL_LINK_MAILTO}>sähköpostitse</a>.
|
||||
</p>
|
||||
|
||||
@@ -79,14 +79,14 @@ const FreshmenPageView: React.FC = () => (
|
||||
Ajan myötä palapelin palat muodostavat sinun näköisesi kuvan ja pääset itse vaikuttamaan siihen, miltä lopputulos näyttää.
|
||||
</p>
|
||||
<p>
|
||||
Orientaatioviikko järjestetään 28.8.-1.9.2023, mutta jo ennen sitä sinulla on mahdollisuus tulla tutustumaan meihin, muihin fuksiehin ja ISOihin rennon Varaslähtöön. Varaslähtö fuksivuoteen järjestetään 19.8.2023. Siitä lisää Telegram-ryhmissä!
|
||||
Orientaatioviikko järjestetään 29.08.2022-02.09.2022, mutta jo ennen sitä sinulla on mahdollisuus tulla tutustumaan meihin, muihin fuksiehin ja ISOihin rennon Varaslähtöön. Varaslähtö fuksivuoteen järjestetään 20.8.2022. Siitä lisää Telegram-ryhmissä!
|
||||
</p>
|
||||
|
||||
<h6>Aaron Löfgren</h6>
|
||||
<p>040 484 5418<br />aaron.lofgren (ät) sahkoinsinoorikilta.fi <br />@aaronlofgren</p>
|
||||
<h6>Melisa Dönmez</h6>
|
||||
<p>044 239 2385 <br />melisa.donmez (ät) sahkoinsinoorikilta.fi <br />@melisadonmez</p>
|
||||
|
||||
<h6>Kasper Skog</h6>
|
||||
<p>040 667 5266<br />kasper.skog (ät) sahkoinsinoorikilta.fi <br />@Skooogi</p>
|
||||
<h6>Eveliina Ahonen</h6>
|
||||
<p>050 911 8818 <br />eveliina.ahonen (ät) sahkoinsinoorikilta.fi <br />@ahoonen</p>
|
||||
</div>
|
||||
<aside>
|
||||
<div>
|
||||
@@ -103,14 +103,14 @@ const FreshmenPageView: React.FC = () => (
|
||||
<div>
|
||||
<InfoBox>
|
||||
<h6>Killan Fuksiopas</h6>
|
||||
<Link to="https://static.sahkoinsinoorikilta.fi/FTMK/Fuksiopas2023.pdf" target="_blank">
|
||||
<Link to="https://static.sahkoinsinoorikilta.fi/FTMK/Fuksiopas2022.pdf" target="_blank">
|
||||
<FopasImage
|
||||
src="https://static.sahkoinsinoorikilta.fi/FTMK/Fuksiopas2023-kansi.png"
|
||||
src="https://static.sahkoinsinoorikilta.fi/FTMK/Fuksiopas2022-kansi.jpg"
|
||||
/>
|
||||
</Link>
|
||||
|
||||
<p>
|
||||
Ennen opintojen alkua on hyvä tutustua killan fuksioppaaseen. Sitä pääset selailemaan <Link to="https://static.sahkoinsinoorikilta.fi/FTMK/Fuksiopas2023.pdf" target="_blank"> tästä.</Link>
|
||||
Ennen opintojen alkua on hyvä tutustua killan fuksioppaaseen. Sitä pääset selailemaan <Link to="https://static.sahkoinsinoorikilta.fi/FTMK/Fuksiopas2022.pdf" target="_blank"> tästä.</Link>
|
||||
</p>
|
||||
<br />
|
||||
<h6>Telegram?</h6>
|
||||
@@ -123,12 +123,12 @@ const FreshmenPageView: React.FC = () => (
|
||||
SIK:n fukseilla on oma Telegram-ryhmä, jonne pääset liitymään tästä:
|
||||
</p>
|
||||
<QRImages
|
||||
src="https://static.sahkoinsinoorikilta.fi/FTMK/sik-fuksit-2023.jpg"
|
||||
src="https://static.sahkoinsinoorikilta.fi/FTMK/sik-fuksit-2022.jpg"
|
||||
/>
|
||||
<p>tai <Link to={TG_GROUP_CHAT_LINK} target="_blank">tästä</Link></p>
|
||||
<p>Liity myös samalla SIK-fuksien tiedotuskanavalle tästä:</p>
|
||||
<QRImages
|
||||
src="https://static.sahkoinsinoorikilta.fi/FTMK/sik-fuksit-2023-tiedotus.jpg"
|
||||
src="https://static.sahkoinsinoorikilta.fi/FTMK/sik-fuksit-2022-tiedotus.jpg"
|
||||
/>
|
||||
<p>tai <Link to={TG_NOTIFICATIONS_LINK} target="_blank">tästä</Link></p>
|
||||
</InfoBox>
|
||||
@@ -144,10 +144,10 @@ const FreshmenPageView: React.FC = () => (
|
||||
</CTASection>
|
||||
|
||||
<TextSection>
|
||||
<h3 id="isot">Fuksiryhmät ja ISO-toiminta</h3>
|
||||
<h3 id="isot">Isoryhmät</h3>
|
||||
<div>
|
||||
<p>
|
||||
SIK:n fuksit nauttivat hurmaavien ISOjen opastuksesta ja hellästä huolenpidosta omissa fuksiryhmissään.
|
||||
SIK:n fuksit nauttivat hurmaavien ISOhenkilöidensä opastuksesta ja hellästä huolenpidosta omissa fuksiryhmissään.
|
||||
</p>
|
||||
<p>
|
||||
ISOt ovat hiukan vanhempia opiskelijoita ja kiltalaisia, joiden tehtävänä on olla tukenasi fuksivuoden ajan. Ensimmäisenä päivänä teidät jaetaan noin kymmenen hengen fuksiryhmiin ja jokaiseen ryhmään kuuluu kolmesta viiteen ISOa, joista yksi toimii opintoISOna. ISOilta voit kysyä mitä vain opiskeluun ja opiskelijaelämään liittyen. Vaikka he eivät tietäisi vastausta, he luultavimmin osaavat auttaa sinua vastausten löytämisessä.
|
||||
|
||||
@@ -84,7 +84,6 @@ const HonoraryPageView: React.FC = () => (
|
||||
<li>2020 Anni Parkkila, Aliisa Pietilä</li>
|
||||
<li>2021 Essi Jukkala</li>
|
||||
<li>2022 Erna Virtanen, Tuukka Syrjänen</li>
|
||||
<li>2023 Emmaleena Ahonen</li>
|
||||
</ul>
|
||||
<h2>Standaari</h2>
|
||||
<p>Standaari voidaan hallituksen päätöksellä lahjoittaa killan toimintaan myönteisesti vaikuttaneille tahoille. Standaarit on numeroitu lahjoittamisjärjestyksessä.</p>
|
||||
@@ -103,7 +102,6 @@ const HonoraryPageView: React.FC = () => (
|
||||
<li>2013 Martti Valtonen</li>
|
||||
<li>2016 ABB Oy</li>
|
||||
<li>2021 Elektroteknologsektionens Kalle Anka-Kommitté</li>
|
||||
<li>2023 Tekniikan akateemiset TEK, Automaatio- ja systeemitekniikan kilta ry</li>
|
||||
</ul>
|
||||
<h2>Kultaiset ansiomerkit</h2>
|
||||
<p>
|
||||
@@ -207,12 +205,6 @@ const HonoraryPageView: React.FC = () => (
|
||||
<li>2022 Sini Huhtinen</li>
|
||||
<li>2022 Ukko Kasvi</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>2023 Sasu Saalasti</li>
|
||||
<li>2023 Ville Kaakinen</li>
|
||||
<li>2023 Mikael Liimatainen</li>
|
||||
<li>2023 Jami Hyytiäinen</li>
|
||||
</ul>
|
||||
<h2>Hopeiset ansiomerkit</h2>
|
||||
<p>Killan hallitus voi myöntää hopeitosen ansiomerkin killan jäsenelle tai perustellusta syystä myös muulle henkilölle tunnustuksena erityisestä kiinnostuksesta kiltaa kohtaan sekä ansioituneesta toiminnasta killan hyväksi.</p>
|
||||
<ul>
|
||||
|
||||
@@ -128,7 +128,7 @@ const InEnglishPageView: React.FC<InEnglishPageViewProps> = ({ events, feed }) =
|
||||
<p>Balance your studies and get connected</p>
|
||||
<div>
|
||||
<h6>Build everything related to electronics</h6>
|
||||
<p>SIK-PAJA is an electronics workshop run by the guild, where students get to apply skills they have learned at school in practical projects. Over time, students have built diverse projects in the workshop, such as their first LED overall badges, tesla windings, robots and radio transmitters. If you are interested in building electronics or you need help with a project, then come visit the workshop located at Otakaari 1 h023b. The workshop is equipped with basic tools such as circuit boards, etching tools, soldering tools, various components and a wide range of measuring equipment. You can join <Link to="https://t.me/sikpaja">sikpaja's Telegram group here</Link>.</p>
|
||||
<p>Elepaja is an electronics workshop run by the guild, where students get to apply skills they have learned at school in practical projects. Over time, students have built diverse projects in the workshop, such as their first LED flashlights, tesla windings, robots and radio transmitters. If you are interested in building electronics or you need help with a project, then come visit the workshop located at Otakaari 1 h023b. The workshop is equipped with basic tools such as circuit boards, etching tools, soldering tools, various components, column drill and a wide range of measuring equipment. You can join <Link to="https://elepaja.fi/tg">elepaja's Telegram group here</Link>.</p>
|
||||
<h6>Sports events</h6>
|
||||
<p>The committee of Well Being runs many things in our guild. One of these is providing sports events to the guild members. In cooperation with other guilds, we regularly organize opportunities to play floorball and other sports. Sports tryouts are available throughout the year and are organized in co-operation with various sports organizations in Otaniemi. Keep your eyes open in the <Link to="#events">events</Link> section and join the <Link to="https://t.me/joinchat/DJRXxkKd0SMj0e9pBPXF1A/"> sports Telegram group.</Link></p>
|
||||
<h6>Culture from culinarism to theater</h6>
|
||||
@@ -186,8 +186,6 @@ const InEnglishPageView: React.FC<InEnglishPageViewProps> = ({ events, feed }) =
|
||||
<h3 id="freshmen">For exchange student</h3>
|
||||
<div>
|
||||
<div>
|
||||
<h6>Telegram group 2023-2024</h6>
|
||||
<p>For starters, we recommend you join the <Link to="https://t.me/+ewiOhvuTXAcwODRk">Telegram-channel</Link> made for new exchange and master's students.</p>
|
||||
<h6>Freshman points</h6>
|
||||
<p>What is student life like in Finland? What are the unique cool things to experience? To find out we recommend collecting the fuksi points (freshman points) to your fuksi point card. It's fun! The point card gives you a guideline to experiencing the student life and allows you to get a diploma with the privilege to wear the teekkari cap. Note that internationals are also fuksis on their first year in Aalto even though they are not really freshmen. Even Finns who change to a different study program get to be a fuksi again.</p>
|
||||
<h6>Overalls</h6>
|
||||
|
||||
@@ -23,7 +23,6 @@ interface SignUpPageViewProps {
|
||||
formData: any;
|
||||
onChange: (e: IChangeEvent<unknown>, es?: ErrorSchema) => unknown;
|
||||
onSubmit: (e: ISubmitEvent<unknown>) => unknown;
|
||||
formSent?: boolean;
|
||||
}
|
||||
|
||||
const StyledSection = styled(TextSection)`
|
||||
@@ -60,7 +59,6 @@ const SignUpPageView: React.FC<SignUpPageViewProps> = ({
|
||||
formData,
|
||||
onChange,
|
||||
onSubmit,
|
||||
formSent = false,
|
||||
}) => {
|
||||
const { i18n, t } = useTranslation();
|
||||
const startDate = new Date(signUpForm?.start_time);
|
||||
@@ -138,7 +136,7 @@ const SignUpPageView: React.FC<SignUpPageViewProps> = ({
|
||||
</h1>
|
||||
|
||||
<div>
|
||||
{ formSent ? <p>{`${t("Ilmoittautuminen onnistui!")}`}</p> : form }
|
||||
{form}
|
||||
</div>
|
||||
{signups}
|
||||
</StyledSection>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Selector } from "testcafe";
|
||||
import {
|
||||
getSiteRoot, getPageUrl, generateTestForm, deleteEvent, deleteForm, doLogin, generateAccessToken, getPostRequestLogger, waitForLogger,
|
||||
getSiteRoot, getPageUrl, generateTestForm, deleteEvent, deleteForm, doLogin, generateAccessToken, getPostRequestLogger,
|
||||
} from "../utils";
|
||||
|
||||
const LOGGER = getPostRequestLogger("events/");
|
||||
@@ -78,8 +78,6 @@ test("Logged in user can create event", async (t) => {
|
||||
await t.click(submit);
|
||||
|
||||
const parsed = JSON.parse(LOGGER.requests[0].response.body as string);
|
||||
|
||||
await waitForLogger(LOGGER);
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
t.fixtureCtx.eventId = parsed.id;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Selector } from "testcafe";
|
||||
import {
|
||||
getSiteRoot, getPageUrl, deleteForm, doLogin, generateAccessToken, getPostRequestLogger, waitForLogger
|
||||
getSiteRoot, getPageUrl, deleteForm, doLogin, generateAccessToken, getPostRequestLogger,
|
||||
} from "../utils";
|
||||
|
||||
const LOGGER = getPostRequestLogger("signupForm/");
|
||||
@@ -97,8 +97,6 @@ test("Logged in user can create signup", async (t) => {
|
||||
await t.click(submit);
|
||||
|
||||
const parsed = JSON.parse(LOGGER.requests[0].response.body as string);
|
||||
|
||||
await waitForLogger(LOGGER);
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
t.fixtureCtx.formId = parsed.id;
|
||||
|
||||
|
||||
@@ -157,12 +157,3 @@ export const generateTestEvent = async (formIds = [], jwt_access: string) => (
|
||||
);
|
||||
|
||||
export const sleep = async (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
export const waitForLogger = async (logger: RequestLogger) => {
|
||||
for (let i = 0; i < 50; i++) {
|
||||
await sleep(100);
|
||||
if (logger.requests.length > 0 ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user