Skip to content

Commit

Permalink
Format all files
Browse files Browse the repository at this point in the history
  • Loading branch information
khkim6040 committed Mar 24, 2024
1 parent 110a2ee commit 0c1f603
Show file tree
Hide file tree
Showing 91 changed files with 3,310 additions and 3,345 deletions.
12 changes: 6 additions & 6 deletions assets/club.type.options.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const ClubTypeOptions = [
{ key: "performance1", text: "공연1", value: "performance1" },
{ key: "performance2", text: "공연2", value: "performance2" },
{ key: "societyAndReligion", text: "사회종교", value: "societyAndReligion" },
{ key: "sports", text: "체육", value: "sports" },
{ key: "hobbyAndExhibition", text: "취미전시", value: "hobbyAndExhibition" },
{ key: "study", text: "학술", value: "study" },
{ key: 'performance1', text: '공연1', value: 'performance1' },
{ key: 'performance2', text: '공연2', value: 'performance2' },
{ key: 'societyAndReligion', text: '사회종교', value: 'societyAndReligion' },
{ key: 'sports', text: '체육', value: 'sports' },
{ key: 'hobbyAndExhibition', text: '취미전시', value: 'hobbyAndExhibition' },
{ key: 'study', text: '학술', value: 'study' },
];
10 changes: 5 additions & 5 deletions assets/owner.options.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const OwnerOptions = [
{ key: "dongyeon", text: "동아리연합회", value: "dongyeon" },
{ key: "dormUnion", text: "생활관자치회", value: "dormUnion" },
{ key: "chonghak", text: "총학생회", value: "chonghak" },
{ key: "saengna", text: "생각나눔", value: "saengna" },
{ key: "others", text: "그 외", value: "others" },
{ key: 'dongyeon', text: '동아리연합회', value: 'dongyeon' },
{ key: 'dormUnion', text: '생활관자치회', value: 'dormUnion' },
{ key: 'chonghak', text: '총학생회', value: 'chonghak' },
{ key: 'saengna', text: '생각나눔', value: 'saengna' },
{ key: 'others', text: '그 외', value: 'others' },
];
10 changes: 5 additions & 5 deletions assets/region.options.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const RegionOptions = [
{ key: "STUDENT_HALL", text: "학생 회관", value: "STUDENT_HALL" },
{ key: "JIGOK_CENTER", text: "지곡 회관", value: "JIGOK_CENTER" },
{ key: "COMMUNITY_CENTER", text: "커뮤니티 센터", value: "COMMUNITY_CENTER" },
{ key: "RESIDENTIAL_COLLEGE", text: "RC", value: "RESIDENTIAL_COLLEGE" },
{ key: "OTHERS", text: "기타", value: "OTHERS" },
{ key: 'STUDENT_HALL', text: '학생 회관', value: 'STUDENT_HALL' },
{ key: 'JIGOK_CENTER', text: '지곡 회관', value: 'JIGOK_CENTER' },
{ key: 'COMMUNITY_CENTER', text: '커뮤니티 센터', value: 'COMMUNITY_CENTER' },
{ key: 'RESIDENTIAL_COLLEGE', text: 'RC', value: 'RESIDENTIAL_COLLEGE' },
{ key: 'OTHERS', text: '기타', value: 'OTHERS' },
];
70 changes: 32 additions & 38 deletions components/board/benefit/affiliate/affiliate.cards.jsx
Original file line number Diff line number Diff line change
@@ -1,50 +1,44 @@
import React, { useState } from 'react'
import { Card, Modal, Grid, Header } from 'semantic-ui-react'
import React, { useState } from 'react';
import { Card, Modal, Grid, Header } from 'semantic-ui-react';

const AffiliateCards = ({affiliates}) => {
const AffiliateCards = ({ affiliates }) => {
const initialFlags = Array.from({ length: affiliates.length }, () => false);
const [flags, setFlags] = useState(initialFlags);
const toggleFlag = (index) => {
setFlags(prevFlags => {
setFlags((prevFlags) => {
const newFlags = [...prevFlags];
newFlags[index] = !newFlags[index];
return newFlags;
});
};

return (
<Grid stackable columns={4} >
{
affiliates.map((affiliate, idx) =>
<Grid.Column key={idx}>
<Modal
closeIcon
open={flags[idx]}
trigger={
<Card color='pink' style={{minHeight:"160px"}}>
<Card.Content>
<Card.Header>{affiliate.title}</Card.Header>
<Card.Description>
{affiliate.meta_content}
</Card.Description>
</Card.Content>
</Card>
}
onClose={() => toggleFlag(idx)}
onOpen={() => toggleFlag(idx)}
>
<Header icon='paperclip' content={affiliate.title} />
<Modal.Content>
<p style={{ whiteSpace: "pre-line" }}>
{affiliate.content}
</p>
</Modal.Content>
</Modal>
</Grid.Column>
)
}
<Grid stackable columns={4}>
{affiliates.map((affiliate, idx) => (
<Grid.Column key={idx}>
<Modal
closeIcon
open={flags[idx]}
trigger={
<Card color="pink" style={{ minHeight: '160px' }}>
<Card.Content>
<Card.Header>{affiliate.title}</Card.Header>
<Card.Description>{affiliate.meta_content}</Card.Description>
</Card.Content>
</Card>
}
onClose={() => toggleFlag(idx)}
onOpen={() => toggleFlag(idx)}
>
<Header icon="paperclip" content={affiliate.title} />
<Modal.Content>
<p style={{ whiteSpace: 'pre-line' }}>{affiliate.content}</p>
</Modal.Content>
</Modal>
</Grid.Column>
))}
</Grid>
)
}
);
};

export default AffiliateCards
export default AffiliateCards;
70 changes: 28 additions & 42 deletions components/board/benefit/affiliate/affiliate.table.jsx
Original file line number Diff line number Diff line change
@@ -1,54 +1,40 @@
import React from 'react'
import Link from "next/link";
import moment from 'moment'
import { Table } from 'semantic-ui-react'
import React from 'react';
import Link from 'next/link';
import moment from 'moment';
import { Table } from 'semantic-ui-react';

const AffiliateTable = ({ affiliateList }) => {

return (
<Table
celled selectable
textAlign={'center'}>
<Table celled selectable textAlign={'center'}>
<Table.Header>
<Table.Row>
<Table.HeaderCell width={1}>
id
</Table.HeaderCell>
<Table.HeaderCell width={2}>
업체명
</Table.HeaderCell>
<Table.HeaderCell width={4}>
짤은 설명
</Table.HeaderCell>
<Table.HeaderCell width={6}>
설명
</Table.HeaderCell>
<Table.HeaderCell width={2}>
생성일
</Table.HeaderCell>
<Table.HeaderCell width={1}>id</Table.HeaderCell>
<Table.HeaderCell width={2}>업체명</Table.HeaderCell>
<Table.HeaderCell width={4}>짤은 설명</Table.HeaderCell>
<Table.HeaderCell width={6}>설명</Table.HeaderCell>
<Table.HeaderCell width={2}>생성일</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
{
affiliateList.map((affiliate) => (
<Link href={`benefit/affiliate/update/${affiliate.id}`} key={affiliate.id}>
<Table.Row>
<Table.Cell>{affiliate.id}</Table.Cell>
<Table.Cell>{affiliate.title}</Table.Cell>
<Table.Cell>{affiliate.content_short}</Table.Cell>
<Table.Cell>{affiliate.content}</Table.Cell>
<Table.Cell>
{
moment(affiliate.created_at).format('YYYY-MM-DD HH:mm')
}
</Table.Cell>
</Table.Row>
</Link>
))
}
{affiliateList.map((affiliate) => (
<Link
href={`benefit/affiliate/update/${affiliate.id}`}
key={affiliate.id}
>
<Table.Row>
<Table.Cell>{affiliate.id}</Table.Cell>
<Table.Cell>{affiliate.title}</Table.Cell>
<Table.Cell>{affiliate.content_short}</Table.Cell>
<Table.Cell>{affiliate.content}</Table.Cell>
<Table.Cell>
{moment(affiliate.created_at).format('YYYY-MM-DD HH:mm')}
</Table.Cell>
</Table.Row>
</Link>
))}
</Table.Body>
</Table>
)
}
);
};

export default AffiliateTable;
92 changes: 49 additions & 43 deletions components/board/benefit/discount/discount.cards.jsx
Original file line number Diff line number Diff line change
@@ -1,54 +1,60 @@
import React, { useState } from 'react'
import { Card, Modal, Grid, Header, Divider, Icon } from 'semantic-ui-react'
import React, { useState } from 'react';
import { Card, Modal, Grid, Header, Divider, Icon } from 'semantic-ui-react';

const DiscountOfferCards = ({discountOffers}) => {
const initialFlags = Array.from({ length: discountOffers.length }, () => false);
const DiscountOfferCards = ({ discountOffers }) => {
const initialFlags = Array.from(
{ length: discountOffers.length },
() => false,
);
const [flags, setFlags] = useState(initialFlags);
const toggleFlag = (index) => {
setFlags(prevFlags => {
setFlags((prevFlags) => {
const newFlags = [...prevFlags];
newFlags[index] = !newFlags[index];
return newFlags;
});
};

return (
<Grid stackable columns={4} >
{
discountOffers.map((discountOffer, idx) =>
<Grid.Column key={idx}>
<Modal
closeIcon
open={flags[idx]}
trigger={
<Card color='pink' style={{minHeight:"160px"}}>
<Card.Content>
<Card.Header>{discountOffer.title}</Card.Header>
<Card.Description>
{discountOffer.content}
</Card.Description>
</Card.Content>
</Card>
}
onClose={() => toggleFlag(idx)}
onOpen={() => toggleFlag(idx)}
>
<Header icon='pin' content={discountOffer.title} />
<Modal.Content>
<p><Icon name='clock outline'/>영업 시간: {discountOffer.open_hour}</p>
<p><Icon name='phone'/>가게 번호: {discountOffer.phone}</p>
<Divider/>
<p><Icon name='star'/>할인 내용</p>
<p style={{ whiteSpace: "pre-line" }}>
{discountOffer.content}
</p>
</Modal.Content>
</Modal>
</Grid.Column>
)
}
<Grid stackable columns={4}>
{discountOffers.map((discountOffer, idx) => (
<Grid.Column key={idx}>
<Modal
closeIcon
open={flags[idx]}
trigger={
<Card color="pink" style={{ minHeight: '160px' }}>
<Card.Content>
<Card.Header>{discountOffer.title}</Card.Header>
<Card.Description>{discountOffer.content}</Card.Description>
</Card.Content>
</Card>
}
onClose={() => toggleFlag(idx)}
onOpen={() => toggleFlag(idx)}
>
<Header icon="pin" content={discountOffer.title} />
<Modal.Content>
<p>
<Icon name="clock outline" />
영업 시간: {discountOffer.open_hour}
</p>
<p>
<Icon name="phone" />
가게 번호: {discountOffer.phone}
</p>
<Divider />
<p>
<Icon name="star" />
할인 내용
</p>
<p style={{ whiteSpace: 'pre-line' }}>{discountOffer.content}</p>
</Modal.Content>
</Modal>
</Grid.Column>
))}
</Grid>
)
}
);
};

export default DiscountOfferCards
export default DiscountOfferCards;
Loading

0 comments on commit 0c1f603

Please sign in to comment.