-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3단계 - 행운의 로또 미션] 지그(송지은) 미션 제출합니다. #64
Merged
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
6385769
[1단계 - 행운의 로또 미션] 티케(조은현) 미션 제출합니다 (#26)
devhyun637 1be66e6
Merge branch 'zigsong' of https://github.com/woowacourse/javascript-l…
zigsong 71cb30a
docs: make step3 todos
zigsong f731765
test: show purchase-type select butons
zigsong 398fb2d
feat: show purchase-type select butons
zigsong cdca062
refactor: rename lotto-input-nums to lotto-winning-nums
zigsong 8daa689
test: switch purchase-type button color
zigsong 45e24fe
feat: switch purchase-type button
zigsong 472a630
test: show manual input form when choose manual purchase
zigsong e3920bd
refactor: rename dom to selector
zigsong 08ca044
feat: show manual input form when choose manual purchase
zigsong e1fef16
test: alert when type duplicate numbers in manual input
zigsong 7823ca7
feat: alert when type duplicate numbers in manual input
zigsong 9607d94
test: show confirmed lotto ticket if typed manul numbers correctly
zigsong da9f3d5
feat: create & show confirmed lotto ticket if typed manul numbers cor…
zigsong f311083
test: show confirm alert when manual input count is lesser than price
zigsong b928fd3
feat: show confirm alert when manual input count is lesser than price
zigsong 9b04090
test: process auto purchase when agree to auto purchase confirm
zigsong b1238d5
feat: process auto purchase when agree to auto purchase confirm
zigsong 64aa134
fix: remove wrong classname and unnecessary index
zigsong 8728c0f
feat: process manual purchase when typed all manual inputs
zigsong dd3f2ab
fix: fix bugs when switching between auto/manual purchase
zigsong 6329e9d
fix: resolve conflicts with step2 merge commit
zigsong cecda97
refactor: update getRandomNumber logic
zigsong d6a3dc2
refactor: remove unnecessary classnames & add lotto number constant
zigsong 910947d
refactor: typos in cypress
zigsong 60f0ba5
feat: add auto-convert caption in manual input view
zigsong 62aaf02
feat: move focus to next input in manual input view
zigsong 3682f7e
refactor:
zigsong f7858e1
refactor:
zigsong 964f5e6
fix: fix binding events bug on manualInputView
zigsong 18d57c1
refactor: update array loop logic in manualInputView
zigsong b6db430
refactor: separate method checking if last number input (prevent movi…
zigsong 8afe5e5
refactor: update showAllConfirmButton logic
zigsong f98aa76
refactor:
zigsong 043299b
fix: reset to autoPurchase when click restart in manual purchase step
zigsong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -17,40 +17,39 @@ export default class ManualInputView extends View { | |
} | ||
|
||
createManualLottos() { | ||
const lottoTicekts = [...Array(this.count)] | ||
.map( | ||
(_, idx) => ` | ||
<li id="manual-wrapper-${idx}" class="mx-1 my-2 text-4xl manual-wrapper"> | ||
<form class="d-flex items-center justify-between manual-input-form"> | ||
<span class="lotto-icon">🎟️ </span> | ||
${this.createManualInput()} | ||
<button type="submit" class="btn btn-cyan btn-small manual-input-btn">확정</button> | ||
</form> | ||
</li> | ||
` | ||
) | ||
.join(''); | ||
// const lottoTickets = Array.from({length: this.count}, (_, idx) => `<li>....</li>`).join('') | ||
|
||
const lottoTicekts = Array.from( | ||
{ length: this.count }, | ||
(_, idx) => | ||
`<li id="manual-wrapper-${idx}" class="mx-1 my-2 text-4xl manual-wrapper"> | ||
<form class="d-flex items-center justify-between manual-input-form"> | ||
<span class="lotto-icon">🎟️ </span> | ||
${this.createManualInput()} | ||
<button type="submit" class="btn btn-cyan btn-small manual-input-btn">확정</button> | ||
</form> | ||
</li> | ||
` | ||
).join(''); | ||
this.$element.innerHTML = lottoTicekts; | ||
$('#input-price-form').insertAdjacentElement('afterend', this.$element); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이제는 자주 사용하게 된 |
||
} | ||
|
||
createManualInput() { | ||
return [...Array(LOTTO_NUMBERS.LOTTO_MANUAL_COUNT)] | ||
.map( | ||
(_, i) => ` | ||
<input | ||
type="number" | ||
class="manual-number mx-1 text-center" | ||
aria-label="manual-number-${i}" | ||
data-manual-index="${i}" | ||
required | ||
min="1" | ||
max="45" | ||
/> | ||
` | ||
) | ||
.join(''); | ||
return Array.from( | ||
{ length: LOTTO_NUMBERS.LOTTO_MANUAL_COUNT }, | ||
(_, i) => | ||
`<input | ||
type="number" | ||
class="manual-number mx-1 text-center" | ||
aria-label="manual-number-${i}" | ||
data-manual-index="${i}" | ||
required | ||
min="1" | ||
max="45" | ||
/> | ||
` | ||
).join(''); | ||
} | ||
|
||
bindManualInputEvent() { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
실수로 올라갔네요 😂 다음 커밋에서 지웠습니다!