diff --git a/src/const.js b/src/const.js index 05f4b9e..7edc280 100644 --- a/src/const.js +++ b/src/const.js @@ -76,7 +76,8 @@ const SortType = [{ }]; export {POINT_EMPTY, - POINT_TYPE, DESTINATION, + POINT_TYPE, + DESTINATION, DESCRIPTION, OFFERS, DESTINATION_COUNT, diff --git a/src/presenter/point-presenter.js b/src/presenter/point-presenter.js index 8d90326..0fc8be5 100644 --- a/src/presenter/point-presenter.js +++ b/src/presenter/point-presenter.js @@ -83,6 +83,7 @@ export default class PointPresenter { resetView() { if (this.#mode !== Mode.DEFAULT) { + this.#pointEditComponent.reset(this.#point); this.#replaceEditToPoint(); } } diff --git a/src/template/editing-form-template.js b/src/template/editing-form-template.js index 15fc8ad..b65d676 100644 --- a/src/template/editing-form-template.js +++ b/src/template/editing-form-template.js @@ -2,6 +2,24 @@ import { POINT_TYPE, OFFERS } from '../const'; import { formatFullDate } from '../utils/day'; import { getRandomValue } from '../utils/common'; +function createPointType() { + return POINT_TYPE.map((type) => `