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

feat(temporary): add an alert for next session #227

Merged
merged 2 commits into from
Mar 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: add temporary alert for next session
pedrofp4444 committed Mar 16, 2024
commit 5750b865d3614cbbbfd91e28697367296e9ecba0
14 changes: 10 additions & 4 deletions apps/app/pages/event/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from "next/link";
import { Alert } from "antd";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import { useAuth } from "@coderdojobraga/ui";
@@ -161,8 +162,7 @@ function EventPage() {
.then(() =>
notifyInfo(
"Info",
`A tua inscrição foi recebida com sucesso - ${
is_available ? "disponível" : "não disponível"
`A tua inscrição foi recebida com sucesso - ${is_available ? "disponível" : "não disponível"
}`
)
)
@@ -190,8 +190,7 @@ function EventPage() {
.then(() =>
notifyInfo(
"Info",
`A tua inscrição foi atualizada com sucesso - ${
is_available ? "disponível" : "não disponível"
`A tua inscrição foi atualizada com sucesso - ${is_available ? "disponível" : "não disponível"
}`
)
)
@@ -215,6 +214,13 @@ function EventPage() {
};
return (
<AppLayout>
<Alert
message="O número total de vagas para a sessão do dia 23 de março foi atingida."
type="warning"
showIcon
closable
style={{ marginBottom: "1rem" }}
/>
<Title level={2}>Detalhes do evento</Title>
<Row align="top" justify="space-between" style={{ marginBottom: "8px" }}>
<Event
9 changes: 8 additions & 1 deletion apps/app/pages/events.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Col, Row, Typography } from "antd";
import { Alert, Col, Row, Typography } from "antd";
import AppLayout from "~/layouts/AppLayout";
import { withAuth } from "~/components/Auth";
import Event from "~/components/Event";
@@ -13,6 +13,13 @@ function Events() {

return (
<AppLayout>
<Alert
message="O número total de vagas para a sessão do dia 23 de março foi atingido."
type="warning"
showIcon
closable
style={{ marginBottom: "1rem" }}
/>
<Title level={2}>Eventos</Title>
<Row className={styles.row} align="top" justify="start" gutter={[16, 16]}>
{events?.map((info) => (
9 changes: 8 additions & 1 deletion apps/app/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
import { Button, Col, Popconfirm, Row, Typography } from "antd";
import { Alert, Button, Col, Popconfirm, Row, Typography } from "antd";
import { useAuth } from "@coderdojobraga/ui";
import { withAuth } from "~/components/Auth/withAuth";
import AppLayout from "~/layouts/AppLayout";
@@ -70,6 +70,13 @@ function Dashboard() {
return (
<>
<AppLayout>
<Alert
message="O número total de vagas para a sessão do dia 23 de março foi atingido."
type="warning"
showIcon
closable
style={{ marginBottom: "1rem" }}
/>
<Title level={2}>Painel Principal</Title>
<Row justify="space-between" gutter={8}>
<Title level={3}>Próximo Evento</Title>