Skip to content
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

Большие перемены (часть 1) #6

Merged
merged 17 commits into from
Oct 18, 2024

Conversation

Talurion
Copy link
Contributor

@Talurion Talurion commented Oct 9, 2024

@keksobot keksobot changed the title Module5 task1 и Module5 task2 Большие перемены (часть 1) Oct 9, 2024
Copy link

github-actions bot commented Oct 9, 2024

Ваш пулреквест опубликован. Посмотреть можно здесь

github-actions bot pushed a commit that referenced this pull request Oct 9, 2024
Copy link

Ваш пулреквест опубликован. Посмотреть можно здесь

github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
Copy link

Ваш пулреквест опубликован. Посмотреть можно здесь

github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
Copy link

@aimenin aimenin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Посмотри что по id в моках, если там все на nanoid, то может съехать
  2. По поводу datepicker, насколько я помню мы его делаем на уровне presenter. Сегодня вечером посмотрю как мы это делали в других работах и скину в чатик

'id': `${id }4c3e4e6-9053-42ce-b747-e281314baa31`,
'title': `Upgrade ${ id}`,
'price': getRandomNumber(19,499)
'id': nanoid(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

так вот здесь чуть чуть не понял, а как ты мапишь потом по id, если они у тебя рандомно генерятся?


return Array.from(new Map(mergedEvents.map((event) => [event.id, event])).values());
};
const EVENTS_COUNT = 5;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я бы вынес в файл с константами, но если это только для моков - то можно оставить здесь, главное потом не забыть удалить

evt.preventDefault();

const offerId = evt.currentTarget.dataset.offerId;
const offers = new Map (this._state.offers);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не очень понял зачем здесь делать новую мапу из стейта?

};

removeEventListeners() {
this.#rollupButton.removeEventListener('click', this.#clickHandler);
this.#formElement.removeEventListener('submit', this.#submitHandler);
}

#setDatepicker() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

насколько я помню, экземпляр datepicker мы делаем на уровне презентера, и передаем уже сюда

@keksobot keksobot merged commit 14c032d into htmlacademy-ecmascript:master Oct 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants