Skip to content

Commit

Permalink
Merge pull request #292 from ODOICHON/feat/#291
Browse files Browse the repository at this point in the history
Feat/#291 ๋†๊ฐ€ ๊ฑฐ๋ž˜ ์ž‘์„ฑ ํŽ˜์ด์ง€์— '์ƒ์„ธ ์„ค๋ช…' ๋ชฉ๋ก ์ถ”๊ฐ€ ( ๊ณต์ธ์ค‘๊ฐœ์‚ฌ ์ผ ๋•Œ )
  • Loading branch information
sangminlee98 authored Aug 18, 2024
2 parents c2a1894 + d6e81eb commit ce5f366
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/pages/Trade/Write/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,21 @@ export default function TradeWritePage() {
/>
</div>
)}
{user?.userType === 'AGENT' && (
<div>
<label htmlFor="์ƒ์„ธ ์„ค๋ช…">
์ƒ์„ธ ์„ค๋ช…<span className={styles.essential}>*</span>
</label>
<input
id="์ƒ์„ธ ์„ค๋ช…"
type="text"
placeholder="๋ถ€๋™์‚ฐ์„ ์†Œ๊ฐœํ•  ์ˆ˜ ์žˆ๋Š” ๋งํฌ ์ฒจ๋ถ€"
name="agentDetail"
value={form.agentDetail}
onChange={onChangeForm}
/>
</div>
)}
</div>
</article>
<article className={styles.basicInfoContainer}>
Expand Down
7 changes: 7 additions & 0 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export const checkBeforeTradePost = (
monthlyPrice,
contact,
agentName,
agentDetail,
size,
purpose,
title,
Expand Down Expand Up @@ -196,6 +197,12 @@ export const checkBeforeTradePost = (
alert('์ค‘๊ฐœ์‚ฌ ์ด๋ฆ„์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.');
return false;
}

if (user.userType === 'AGENT' && agentDetail === '') {
alert('์ƒ์„ธ ์„ค๋ช…์„ ์ ์–ด์ฃผ์„ธ์š”.');
return false;
}

if (size === '') {
alert('ํ‰์ˆ˜๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.');
return false;
Expand Down

0 comments on commit ce5f366

Please sign in to comment.