Skip to content

Commit

Permalink
Merge pull request #21 from AjouThonTeam6/feat/container
Browse files Browse the repository at this point in the history
Real finish
  • Loading branch information
WooHyunKing committed Mar 19, 2023
2 parents e74f4d3 + 97678ca commit 4ef7513
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 73 deletions.
1 change: 0 additions & 1 deletion ajouthon/src/components/ClubTale/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function Search({ onSubmit }: any) {
<Input name="filter" />

<Button>Search</Button>
<Button>Submit</Button>
<FileLabel htmlFor="file">
<FileContainer>File Upload</FileContainer>
</FileLabel>
Expand Down
37 changes: 17 additions & 20 deletions ajouthon/src/components/acrivityWrite/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import styled from 'styled-components';
import WriteDetailForm from './DetailForm';
import OptionForm from './OptionForm';
import React, { useState } from "react";
import styled from "styled-components";
import WriteDetailForm from "./DetailForm";
import OptionForm from "./OptionForm";
const Container = styled.div`
width: 60rem;
height: 40rem;
Expand All @@ -17,7 +17,7 @@ const StlyedButton = styled.button`
border-radius: 2px;
color: #ffffff;
margin: 0.5rem 0 1.5rem 0.5rem;
font-family: 'Roboto';
font-family: "Roboto";
font-style: normal;
font-weight: 400;
font-size: 14px;
Expand All @@ -37,12 +37,12 @@ const FormbuttonContainer = styled.div`

const ActivityWriteForm = () => {
const [Inputs, setInputs] = useState({
topic: '',
startdate: '',
enddate: '',
topic: "",
startdate: "",
enddate: "",
participants: 0,
place: '',
content: '',
place: "",
content: "",
});

const onChange = (e) => {
Expand All @@ -60,11 +60,11 @@ const ActivityWriteForm = () => {
onSubmit={async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault(); // 제출 폼 백엔드 연동 필요
console.log(Inputs);
await fetch('http://localhost:8000/activity', {
method: 'POST',
await fetch("http://localhost:8000/activity", {
method: "POST",
headers: {
accept: 'application/json',
'Content-Type': 'application/json',
accept: "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify(Inputs),
})
Expand All @@ -86,12 +86,9 @@ const ActivityWriteForm = () => {
{/* <StlyedButton>저장</StlyedButton> */}
<StlyedButton
onClick={async () => {
await fetch('http://localhost:8000/activity/upload', {
method: 'POST',
headers: {
accept: 'application/json',
'Content-Type': 'application/json',
},
await fetch("http://localhost:8000/activity/upload", {
method: "POST",

body: JSON.stringify({
topic: Inputs.topic,
content: Inputs.content,
Expand Down
4 changes: 2 additions & 2 deletions ajouthon/src/components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ const Header = () => {
<NavigationText>소학회 활동 관리</NavigationText>
</NavigationButton>
</Link>
<Link to="/">
{/* <Link to="/">
<NavigationButton>
<FiEdit size="18px" />
<NavigationText>기록</NavigationText>
</NavigationButton>
</Link>
</Link> */}
<Link to="/help">
<NavigationButton>
<TfiHelpAlt size="18px" />
Expand Down
127 changes: 77 additions & 50 deletions ajouthon/src/pages/member/memberClub/MemberClub.tsx
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
import React from 'react';
import { Outlet } from 'react-router-dom';
import InfoBox from '../../../components/infobox/InfoBox';
import styled from 'styled-components';
import ClubTable from '../../../components/ClubTale';
import { studentClubColumn } from '../../../model/tableModel';
import React from "react";
import { Outlet } from "react-router-dom";
import InfoBox from "../../../components/infobox/InfoBox";
import styled from "styled-components";
import ClubTable from "../../../components/ClubTale";
import { studentClubColumn } from "../../../model/tableModel";

export const dummyData = [
{
학번: '202220791',
성명: '강민수',
가입일자: '2021-08-03 01:14:47',
학부: '소프트웨어융합대학',
전공: '소프트웨어학과',
핸드폰번호: '010-4244-7765',
이메일: 'minsookang03@ajou.ac.kr',
학번: "202220791",
성명: "강민수",
가입일자: "2021-08-03 01:14:47",
학부: "소프트웨어융합대학",
전공: "소프트웨어학과",
핸드폰번호: "010-4244-7765",
이메일: "minsookang03@ajou.ac.kr",
},
{
학번: '202220799',
성명: '강수빈',
가입일자: '2021-08-03 01:14:47',
학부: '소프트웨어융합대학',
전공: '소프트웨어학과',
핸드폰번호: '010-3902-6789',
이메일: 'emma030209@ajou.ac.kr',
학번: "202220799",
성명: "강수빈",
가입일자: "2021-08-03 01:14:47",
학부: "소프트웨어융합대학",
전공: "소프트웨어학과",
핸드폰번호: "010-3902-6789",
이메일: "emma030209@ajou.ac.kr",
},
{
학번: '202322051',
성명: '곽민서',
가입일자: '2021-08-03 01:14:47',
학부: '소프트웨어융합대학',
전공: '소프트웨어학과',
핸드폰번호: '010-9062-8436',
이메일: 'mkms0222@ajou.ac.kr',
학번: "202322051",
성명: "곽민서",
가입일자: "2021-08-03 01:14:47",
학부: "소프트웨어융합대학",
전공: "소프트웨어학과",
핸드폰번호: "010-9062-8436",
이메일: "mkms0222@ajou.ac.kr",
},
{
학번: '202322054',
성명: '권민재',
가입일자: '2021-08-03 01:14:47',
학부: '소프트웨어융합대학',
전공: '소프트웨어학과',
핸드폰번호: '010-9973-3661',
이메일: 'minjaekwon@ajou.ac.kr',
학번: "202322054",
성명: "권민재",
가입일자: "2021-08-03 01:14:47",
학부: "소프트웨어융합대학",
전공: "소프트웨어학과",
핸드폰번호: "010-9973-3661",
이메일: "minjaekwon@ajou.ac.kr",
},
{
학번: '202220781',
성명: '권세빈',
가입일자: '2021-08-03 01:14:47',
학부: '소프트웨어융합대학',
전공: '소프트웨어학과',
핸드폰번호: '010-8727-8413',
이메일: 'a856412@ajou.ac.kr',
학번: "202220781",
성명: "권세빈",
가입일자: "2021-08-03 01:14:47",
학부: "소프트웨어융합대학",
전공: "소프트웨어학과",
핸드폰번호: "010-8727-8413",
이메일: "a856412@ajou.ac.kr",
},
];

Expand All @@ -68,14 +68,24 @@ const InfoBoxContainer = styled.div`
width: 90%;
`;

const buttonSytle = {
backgroundColor: '#ff1818',
color: 'white',
borderRadius: '5px',
height: '2.5rem',
width: '5rem',
fontWeight: 'bold',
};
const Button = styled.button`
background-color: #ff1818;
color: white;
border-radius: 5px;
height: 3rem;
width: 8rem;
margin: 0 10px;
font-size: 15px;
font-weight: bold;
`;

const SubmitButton = styled(Button)`
background-color: #1890ff;
`;

const ButtonArea = styled.div`
display: flex;
`;

const MemberClub = () => {
//동아리 회원 관리 페이지
Expand All @@ -91,7 +101,24 @@ const MemberClub = () => {
needCheckBox={true}
></ClubTable>
<Outlet></Outlet>
<button style={buttonSytle}>삭제</button>
<ButtonArea>
<SubmitButton
onClick={async () => {
await fetch("http://localhost:8000/upload/sheet", {
method: "POST",
headers: {
accept: "application/json",
"Content-Type": "application/json",
},
})
.then((res) => res.json())
.then((data) => console.log(data));
}}
>
학사서비스 등록
</SubmitButton>
<Button>삭제</Button>
</ButtonArea>
</OuterContainer>
);
};
Expand Down

0 comments on commit 4ef7513

Please sign in to comment.