Skip to content

Commit

Permalink
formatering..
Browse files Browse the repository at this point in the history
forandret etikett for profil siden, neste steg er å kunne gå til ander sine profiler

Lagt til navnet mitt på webkom siden. (#2230)

🔥 Remove boomtown (#2233)

Fix weird images (#2234)

change href for happening tab (#2235)

added name (#2236)

Ekstern link til påmelding + navn i webkom medlemsliste (#2232)

Update dependency jsdom to v25 (#2202)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency @tailwindcss/forms to v0.5.9 (#2229)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency @testing-library/react to v16.0.1 (#2217)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency @sanity/icons to v3.4.0 (#2194)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency tsx to v4.19.0 (#2198)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency @types/node to v20.16.5 (#2218)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency tsx to v4.19.1 (#2242)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

added tidspunkt to csv

Update dependency @types/pg to v8.11.9 (#2237)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency @tailwindcss/typography to v0.5.15 (#2216)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update pnpm to v9.10.0 (#2192)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Karo/phd (#2246)

Update dependency @types/react to v18.3.5 (#2238)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency postcss to v8.4.45 (#2240)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency remove-markdown to v0.5.5 (#2241)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency tailwindcss to v3.4.11 (#2244)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency eslint-plugin-react to v7.36.1 (#2239)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency framer-motion to v11.5.4 (#2193)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update dependency @playwright/test to v1.47.1 (#2248)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Add renovate schedule

Update dependency styled-components to v6.1.13 (#2243)

Update dependency eslint-plugin-jsx-a11y to v6.10.0 (#2251)

Update dependency vite to ^5.4.5 (#2245)

Update dependency eslint-plugin-import to v2.30.0 (#2250)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Update robots
  • Loading branch information
Herwal committed Sep 27, 2024
1 parent cf76f82 commit 8a118c2
Show file tree
Hide file tree
Showing 41 changed files with 876 additions and 901 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ NEXTAUTH_SECRET="foobar"
NEXTAUTH_URL="http://localhost:3000"


# --- Boomtown
# The hostname of the boomtown server
#NEXT_PUBLIC_BOOMTOWN_HOSTNAME="localhost:8080"

# --- Kaffe (can be found in the nano repository)
# The URL of the Kaffe server
#NEXT_PUBLIC_KAFFE_URL="http://localhost:8002"
Expand Down
1 change: 1 addition & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"labels": ["dependencies :handshake:"],
"commitMessageAction": "Update",
"rangeStrategy": "bump",
"schedule": ["every weekend"],
"packageRules": [
{
"matchPackagePatterns": ["^@echo-webkom/", "eslint-config-custom", "tsconfig"],
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ NB: "Backenden" til Drizzle vil kjøre på [http://localhost:4983](http://localh

## Relaterte prosjekter

- [boomtown](https://github.com/echo-webkom/boomtown) - Systemet for live oppdatering av påmeldinger på arrangementer.
- [nano](https://github.com/echo-webkom/nano) - Nano-services for siden.

## Dokumentasjon
Expand Down
6 changes: 3 additions & 3 deletions apps/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@echo-webkom/lib": "workspace:*",
"@sanity/client": "6.21.3",
"@sanity/icons": "3.3.1",
"@sanity/icons": "3.4.0",
"@sanity/ui": "2.8.9",
"@sanity/vision": "3.56.0",
"nanoid": "5.0.7",
Expand All @@ -33,12 +33,12 @@
"sanity-plugin-markdown": "4.1.2",
"sanity-plugin-media": "2.3.2",
"slugify": "1.6.6",
"styled-components": "6.1.12"
"styled-components": "6.1.13"
},
"devDependencies": {
"@echo-webkom/tsconfig": "workspace:*",
"@sanity/eslint-config-studio": "4.0.0",
"@types/react": "18.3.4",
"@types/react": "18.3.5",
"@types/styled-components": "5.1.34",
"dotenv": "16.4.5",
"eslint": "8.57.0",
Expand Down
14 changes: 14 additions & 0 deletions apps/cms/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,13 @@
},
"optional": false
},
"endDate": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"registrationStartGroups": {
"type": "objectAttribute",
"value": {
Expand Down Expand Up @@ -1914,6 +1921,13 @@
},
"optional": true
},
"externalLink": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"body": {
"type": "objectAttribute",
"value": {
Expand Down
5 changes: 5 additions & 0 deletions apps/cms/schemas/happening.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ export default defineType({
}),
],
}),
defineField({
name: "externalLink",
type: "url",
hidden: ({ document }) => document?.happeningType !== "external",
}),
defineField({
name: "body",
title: "Brødtekst",
Expand Down
1 change: 1 addition & 0 deletions apps/cms/schemas/job-ad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const YEARS = [
{ title: "3. året", value: "THIRD" },
{ title: "4. året", value: "FOURTH" },
{ title: "5. året", value: "FIFTH" },
{ title: "PhD", value: "PHD" },
];

export default defineType({
Expand Down
4 changes: 2 additions & 2 deletions apps/cms/schemas/objects/spot-range.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ export default defineType({
name: "minYear",
title: "Minste trinn",
type: "number",
validation: (Rule) => Rule.required().min(1).max(5),
validation: (Rule) => Rule.required().min(1).max(6),
}),
defineField({
name: "maxYear",
title: "Største trinn",
type: "number",
validation: (Rule) => Rule.required().min(Rule.valueOfField("minYear")).max(5),
validation: (Rule) => Rule.required().min(Rule.valueOfField("minYear")).max(6),
}),
defineField({
name: "spots",
Expand Down
22 changes: 11 additions & 11 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"clsx": "2.1.1",
"date-fns": "3.6.0",
"drizzle-orm": "0.33.0",
"framer-motion": "11.3.29",
"framer-motion": "11.5.4",
"groq": "3.56.0",
"ics": "^3.7.6",
"nanoid": "5.0.7",
Expand All @@ -60,31 +60,31 @@
"react-markdown": "9.0.1",
"react-use-websocket": "^4.8.1",
"remark-gfm": "4.0.0",
"remove-markdown": "0.5.2",
"remove-markdown": "0.5.5",
"sharp": "0.33.0",
"tailwind-merge": "2.5.2",
"zod": "3.23.8"
},
"devDependencies": {
"@echo-webkom/tsconfig": "workspace:*",
"@tailwindcss/forms": "0.5.8",
"@tailwindcss/typography": "0.5.14",
"@testing-library/react": "16.0.0",
"@types/node": "20.16.1",
"@types/react": "18.3.4",
"@tailwindcss/forms": "0.5.9",
"@tailwindcss/typography": "0.5.15",
"@testing-library/react": "16.0.1",
"@types/node": "20.16.5",
"@types/react": "18.3.5",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react": "4.3.1",
"autoprefixer": "10.4.20",
"dotenv-cli": "7.4.2",
"eslint": "8.57.0",
"eslint-config-webkom": "workspace:*",
"jsdom": "24.1.1",
"postcss": "8.4.41",
"jsdom": "25.0.0",
"postcss": "8.4.45",
"server-only": "^0.0.1",
"tailwindcss": "3.4.10",
"tailwindcss": "3.4.11",
"tailwindcss-animate": "1.0.7",
"typescript": "5.5.4",
"vite": "^5.4.2",
"vite": "^5.4.5",
"vite-tsconfig-paths": "4.3.1",
"vitest": "2.0.5"
},
Expand Down
5 changes: 0 additions & 5 deletions apps/web/src/actions/deregister.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { answers, registrations } from "@echo-webkom/db/schemas";
import { DeregistrationNotificationEmail } from "@echo-webkom/email";
import { emailClient } from "@echo-webkom/email/client";

import { pingBoomtown } from "@/api/boomtown";
import { revalidateRegistrations } from "@/data/registrations/revalidate";
import { getUser } from "@/lib/get-user";
import { getContactsBySlug } from "@/sanity/utils/contacts";
Expand Down Expand Up @@ -73,10 +72,6 @@ export const deregister = async (id: string, payload: z.infer<typeof deregisterP

revalidateRegistrations(id, user.id);

void (async () => {
await pingBoomtown(id);
})();

return {
success: true,
message: "Du er nå avmeldt",
Expand Down
5 changes: 0 additions & 5 deletions apps/web/src/actions/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
type SpotRange,
} from "@echo-webkom/db/schemas";

import { pingBoomtown } from "@/api/boomtown";
import { revalidateRegistrations } from "@/data/registrations/revalidate";
import { isUserBannedFromBedpres } from "@/lib/ban-info";
import { getUser } from "@/lib/get-user";
Expand Down Expand Up @@ -304,10 +303,6 @@ export const register = async (id: string, payload: z.infer<typeof registrationF
isWaitlisted,
});

void (async () => {
await pingBoomtown(id);
})();

return {
success: true,
message: isWaitlisted ? "Du er nå på venteliste" : "Du er nå påmeldt arrangementet",
Expand Down
15 changes: 0 additions & 15 deletions apps/web/src/api/boomtown.ts

This file was deleted.

3 changes: 1 addition & 2 deletions apps/web/src/app/(default)/auth/user/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export default async function ProfilePage({ params }: { params: { id: string } }

return (
<div className="max-w-2xl space-y-4">
<Heading level={2}>Din profil</Heading>

<Heading level={2}>{`${user.name?.split(" ")[0]} sin profil`}</Heading>
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-6 md:flex-row">
<UploadProfilePicture name={user.name ?? "Bo Bakseter"} image={user.image} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const YearFilter = ({ yearFilter, setYearFilter }: YearFilterProps) => {
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">5+</option>
</Select>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const getColumns = (questions: Array<Question>) => {

columns.push(...questions.map((question) => question.title));
columns.push("Status");
columns.push("Tidspunkt");

return columns.filter((header) => header !== undefined).filter((header) => header.trim() !== "");
};
6 changes: 3 additions & 3 deletions apps/web/src/app/(default)/hjem/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export default async function Home() {
className="flex space-y-8 md:grid md:grid-cols-3 md:grid-rows-2 md:gap-8 md:space-y-0"
>
<ComingHappenings
title="Kommende arrangementer"
href="/for-studenter/arrangementer"
title="Arrangementer"
href="/for-studenter/arrangementer?type=event"
types={["external", "event"]}
n={7}
className="col-span-1 row-span-2"
/>
<ComingHappenings
title="Kommende bedpres"
title="Bedpresser"
href="/for-studenter/arrangementer?type=bedpres"
types={["bedpres"]}
n={3}
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/app/(default)/webkom/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,15 @@ export default function WebkomPage() {
</UnorderedList>

{/* --- V24 --- */}
<UnorderedList className="list-none p-0 text-lg">
<ListItem>Jesper Kierulf Hammer</ListItem>
</UnorderedList>

{/* --- H24 --- */}
<UnorderedList className="list-none p-0 text-lg">
<ListItem>Andreas Drevdal</ListItem>
<ListItem>Birk Monsen</ListItem>
</UnorderedList>
</div>
</Container>
);
Expand Down
18 changes: 14 additions & 4 deletions apps/web/src/app/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@ import { type MetadataRoute } from "next";

export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: "*",
disallow: "/",
},
rules: [
{
userAgent: "*",
allow: "/",
},
{
userAgent: "*",
disallow: "/dashboard",
},
{
userAgent: "*",
disallow: "/admin",
},
],
};
}
21 changes: 13 additions & 8 deletions apps/web/src/components/happening-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ export const HappeningSidebar = async ({ event }: EventSidebarProps) => {
<SidebarItemContent key={range.id}>
{range.spots || "Uendelig"} plasser for
{range.minYear === range.maxYear ? (
<span> {range.minYear}. trinn</span>
<span> {range.minYear === 6 ? "5+." : range.minYear + "."} trinn</span>
) : (
<span>
{" "}
{range.minYear} - {range.maxYear}. trinn
{range.minYear} - {range.maxYear === 6 ? "5+." : range.maxYear + "."} trinn
</span>
)}
</SidebarItemContent>
Expand All @@ -311,12 +311,7 @@ export const HappeningSidebar = async ({ event }: EventSidebarProps) => {
<SidebarItem>
<SidebarItemTitle>Påmeldte:</SidebarItemTitle>
<SidebarItemContent>
<RegistrationCount
happeningId={event._id}
maxCapacity={maxCapacity}
initialRegistaredCount={registeredCount}
initialWaitlistCount={waitlistCount}
/>
<RegistrationCount registeredCount={registeredCount} maxCapacity={maxCapacity} />
</SidebarItemContent>
</SidebarItem>
)}
Expand Down Expand Up @@ -463,6 +458,16 @@ export const HappeningSidebar = async ({ event }: EventSidebarProps) => {
<Countdown toDate={userRegistrationStart} />
</SidebarItem>
)}

{event.externalLink && (
<SidebarItem>
<Button asChild fullWidth>
<a href={event.externalLink} target="_blank" rel="noopener noreferrer">
Til påmelding
</a>
</Button>
</SidebarItem>
)}
</div>
</Sidebar>
{/**
Expand Down
Loading

0 comments on commit 8a118c2

Please sign in to comment.