-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
3,310 additions
and
3,345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.