Skip to content

Commit 6d80cc0

Browse files
authored
Merge pull request #1 from JoaoSCoelho/remove-matricula
update
2 parents 314ce62 + 4c99011 commit 6d80cc0

File tree

8 files changed

+6
-26
lines changed

8 files changed

+6
-26
lines changed

src/contexts/AccountContext.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export interface IAccount {
1818
id: number;
1919
isAdmin: boolean;
2020
isTeacher: boolean;
21-
matricula: string;
2221
concludedActivities: number[];
2322
isLeader: boolean;
2423
}

src/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function MyApp({ Component, pageProps }) {
1818
fontSize: "1.1rem",
1919
}}
2020
>
21-
v1.0
21+
v1.0.1
2222
</span>
2323
</AccountProvider>
2424
);

src/pages/admin.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ interface INewAccount {
1414
isAdmin?: boolean;
1515
isLeader?: boolean;
1616
isTeacher?: boolean;
17-
matricula?: string;
1817
}
1918

2019
interface INewMatter {
@@ -42,8 +41,7 @@ export default function Admin() {
4241
!newAccount.surname ||
4342
newAccount.isAdmin === undefined ||
4443
newAccount.isLeader === undefined ||
45-
newAccount.isTeacher === undefined ||
46-
!newAccount.matricula
44+
newAccount.isTeacher === undefined
4745
)
4846
return alert("Preencha todos os campos");
4947

@@ -160,16 +158,6 @@ export default function Admin() {
160158
}
161159
/>
162160
</div>
163-
<div className={styles.inputContainer}>
164-
<strong>Matrícula</strong>
165-
<input
166-
type="text"
167-
className={styles.matricula}
168-
onChange={(e) =>
169-
setNewAccount({ ...newAccount, matricula: e.target.value })
170-
}
171-
/>
172-
</div>
173161

174162
<div className={styles.inputContainer}>
175163
<strong>Administrador</strong>

src/pages/api/account.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export default async (req: IncomingMessage, res: ServerResponse) => {
7878
if (req.body.isTeacher === undefined)
7979
// @ts-ignore
8080
return res.status(400).send("Bad request!"); // @ts-ignore
81-
if (!req.body.matricula) return res.status(400).send("Bad request!"); // @ts-ignore
8281
// @ts-ignore
8382
if (!account) return res.status(400).send("Bad request!"); // @ts-ignore
8483
if (!account.isAdmin) return res.status(400).send("Bad request!");
@@ -95,7 +94,6 @@ export default async (req: IncomingMessage, res: ServerResponse) => {
9594
isAdmin: req.body.isAdmin, // @ts-ignore
9695
isLeader: req.body.isLeader, // @ts-ignore
9796
isTeacher: req.body.isTeacher, // @ts-ignore
98-
matricula: req.body.matricula, // @ts-ignore
9997
middleName: req.body.middleName, // @ts-ignore
10098
surname: req.body.surname,
10199
});

src/pages/my.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,7 @@ export default function My() {
6666
{account?.id}
6767
</td>
6868
</tr>
69-
<tr>
70-
<th>Matrícula</th>
71-
<td className={`${styles.number} ${styles.matricula}`}>
72-
{account?.matricula}
73-
</td>
74-
</tr>
69+
7570
<tr>
7671
<th>Turma</th>
7772
<td className={`${styles.number}`}>

src/pages/panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ export default function Panel() {
376376
<span className={styles.firstName}>{account?.firstName}</span>
377377
<span className={styles.surname}>{account?.surname}</span>
378378
</strong>
379-
<p className={styles.matricula}>{account?.matricula}</p>
379+
<p className={styles.accountId}>{account?.id}</p>
380380
</div>
381381
</label>
382382

src/styles/pages/My.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
}
5656

5757
.mainContainer .profile > table .id,
58-
.mainContainer .profile > table .matricula,
58+
.mainContainer .profile > table .accountId,
5959
.mainContainer .profile > table .class,
6060
.mainContainer .profile > table .yes,
6161
.mainContainer .profile > table .no,

src/styles/pages/Panel.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
gap: 0.3rem;
151151
}
152152

153-
.pageHeader .headerProfile .matricula {
153+
.pageHeader .headerProfile .accountId {
154154
font-size: 1rem;
155155
}
156156

0 commit comments

Comments
 (0)