Skip to content

Commit

Permalink
Merge pull request #13 from SergeySofronov/module8-task1
Browse files Browse the repository at this point in the history
  • Loading branch information
keksobot authored Jan 23, 2025
2 parents d6f72e3 + dfe6f92 commit 0f05262
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/model/data.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Offer = {
isChecked: boolean;
}

type Offers = [
type RawOffers = [
{
type: EventType;
offers: Offer[];
Expand Down
4 changes: 2 additions & 2 deletions src/presenter/event-presenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export default class EventPresenter {

/** @type {TripEvent} */
#event = null;
/** @type {Offers} */
/** @type {Map<EventType, Offer[]>} */
#offers = null;
/** @type {Destination} */
/** @type {Map<Id, Destination>} */
#destinations = null;

#formMode = '';
Expand Down
3 changes: 3 additions & 0 deletions src/view/event-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ const createEventTemplate = (event, offers, destinations) => {
};

export default class EventView extends AbstractView {
/** @type {TripEvent} */
#event = null;
/** @type {Map<EventType, Offer[]>} */
#offers = null;
/** @type {Map<Id, Destination>} */
#destinations = null;

constructor(event, offers, destinations) {
Expand Down
3 changes: 2 additions & 1 deletion src/view/form-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ const createFormTemplate = (event, destinations, offers, mode) => {
};

export default class FormView extends AbstractStatefulView {
/** @type {Map<EventType, Offer[]>} */
#offers = null;
/** @type {Map<Id, Destination>} */
#destinations = null;
#mode = FormMode.EDIT;
#onFormSubmitCallback = null;
Expand Down Expand Up @@ -233,7 +235,6 @@ export default class FormView extends AbstractStatefulView {
this.createEventListener('.event__input--price', 'change', this.#priceChangeHandler);

this.#initDatepicker();

this.#initSaveButton();
};

Expand Down

0 comments on commit 0f05262

Please sign in to comment.