From 76b474dfbf9a2eeeaa51beb0d32beec76c4aef4d Mon Sep 17 00:00:00 2001 From: Nikita Bystritsky Date: Tue, 24 Dec 2024 13:12:02 +0500 Subject: [PATCH 1/3] =?UTF-8?q?feat:=201.8.=20=D0=92=D1=80=D0=B5=D0=BC?= =?UTF-8?q?=D1=8F=20=D1=80=D0=B0=D0=B7=D0=B1=D0=B8=D0=B2=D0=B0=D1=82=D1=8C?= =?UTF-8?q?=20=D0=BA=D0=B0=D0=BC=D0=BD=D0=B8=20done?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/tip-event-list-view.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/view/tip-event-list-view.js b/src/view/tip-event-list-view.js index 4c398d9..462d4fb 100644 --- a/src/view/tip-event-list-view.js +++ b/src/view/tip-event-list-view.js @@ -1,5 +1,4 @@ import {createElement} from '../render'; - const createTipEventListViewTemplate = () => ''; export default class TipEventList { getTemplate() { From 0fb96fce2fcf44deebf7f4d3b24fb6a64d9907be Mon Sep 17 00:00:00 2001 From: Nikita Bystritsky Date: Tue, 24 Dec 2024 13:55:12 +0500 Subject: [PATCH 2/3] =?UTF-8?q?feat:=202.10.=20=D0=A8=D0=B0=D0=B1=D0=BB?= =?UTF-8?q?=D0=BE=D0=BD=D0=B8=D0=B7=D0=B8=D1=80=D1=83=D0=B9=20=D1=8D=D1=82?= =?UTF-8?q?=D0=BE=20done?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 7 + package.json | 1 + src/main.js | 17 +- src/mock/const.js | 78 +++++++++ src/mock/destination.js | 11 ++ src/mock/offer.js | 10 ++ src/mock/point.js | 11 ++ src/model/destination-model.js | 13 ++ src/model/offers-model.js | 13 ++ src/model/point-model.js | 13 ++ src/presenter/board-presenter.js | 38 +++-- src/service/mock-service.js | 54 +++++++ src/utils.js | 43 +++++ src/view/edit-point-view.js | 153 ------------------ src/view/event-list-view.js | 2 +- src/view/event-point-view.js | 68 ++++++-- src/view/filter-view.js | 2 +- src/view/new-point-view.js | 268 +++++++++++++++---------------- src/view/sort-view.js | 2 +- src/view/tip-event-list-view.js | 2 +- 20 files changed, 479 insertions(+), 327 deletions(-) create mode 100644 src/mock/const.js create mode 100644 src/mock/destination.js create mode 100644 src/mock/offer.js create mode 100644 src/mock/point.js create mode 100644 src/model/destination-model.js create mode 100644 src/model/offers-model.js create mode 100644 src/model/point-model.js create mode 100644 src/service/mock-service.js create mode 100644 src/utils.js delete mode 100644 src/view/edit-point-view.js diff --git a/package-lock.json b/package-lock.json index bbf4ed1..f22c2f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@babel/preset-env": "^7.26.0", "babel-loader": "^9.2.1", "copy-webpack-plugin": "^12.0.2", + "dayjs": "^1.11.13", "html-webpack-plugin": "^5.6.3", "webpack": "^5.79.0", "webpack-cli": "^5.0.1", @@ -3068,6 +3069,12 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/dayjs": { + "version": "1.11.13", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", + "license": "MIT" + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", diff --git a/package.json b/package.json index d9f698b..0fce38e 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@babel/preset-env": "^7.26.0", "babel-loader": "^9.2.1", "copy-webpack-plugin": "^12.0.2", + "dayjs": "^1.11.13", "html-webpack-plugin": "^5.6.3", "webpack": "^5.79.0", "webpack-cli": "^5.0.1", diff --git a/src/main.js b/src/main.js index 9f77613..0992185 100644 --- a/src/main.js +++ b/src/main.js @@ -1,6 +1,19 @@ -import BoardPresenter from './presenter/board-presenter'; +import BoardPresenter from './presenter/board-presenter.js'; +import DestinationModel from './model/destination-model.js'; +import OfferModel from './model/offers-model.js'; +import PointModel from './model/point-model.js'; +import MockService from './service/mock-service.js'; const bodyElement = document.querySelector('body'); -const boardPresenterElement = new BoardPresenter({boardContainer: bodyElement}); +const mockService = new MockService(); +const destinationsModel = new DestinationModel(mockService); +const pointsModel = new PointModel(mockService); +const offersModel = new OfferModel(mockService); +const boardPresenterElement = new BoardPresenter({ + boardContainer: bodyElement, + destinationsModel, + offersModel, + pointsModel +}); boardPresenterElement.init(); diff --git a/src/mock/const.js b/src/mock/const.js new file mode 100644 index 0000000..2d051d7 --- /dev/null +++ b/src/mock/const.js @@ -0,0 +1,78 @@ +export const DATE_FORMAT = 'MMM D'; +export const TIME_FORMAT = 'HH:mm'; +export const FULL_TIME_FOMAT = 'YYYY-MM-DDTHH:mm'; +export const SLASH_TIME_FOMAT = 'DD/MM/YY HH:mm'; +export const MILLISECONDS_IN_DAY = 86400000; +export const MILLISECONDS_IN_HOUR = 3600000; +export const DESTINATION_COUNT = 4; +export const POINT_COUNT = 4; +export const OFFER_COUNT = 7; +export const BooleanValues = [ + true, + false +]; +export const POINT_EMPTY = { + basePrice: 0, + dateFrom: null, + dateTo: null, + destination: null, + ifFavorite: false, + offers: [], + type: 'flight', +}; +export const DESCRIPTION = [ + 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.', + 'Aenean commodo ligula eget dolor. Aenean mass.', + 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.', + 'Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.', + 'Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.', + 'In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. ' +]; +export const OFFERS = [ + 'Close But No Cigar', + 'On the Same Page', + 'Jaws of Death', + 'Every Cloud Has a Silver Lining', + 'Jig Is Up', + 'In a Pickle', + 'What Goes Up Must Come Down', + 'Break The Ice', + 'In the Red', +]; +export const ROUTE_TYPE = [ + 'Taxi', + 'Bus', + 'Train', + 'Ship', + 'Drive', + 'Flight', + 'Check-in', + 'Sightseeing', + 'Restaurant' +]; +export const CITIES = [ + 'Salisbury', + 'Kingston upon Hull', + 'Ripon', + 'Liverpool', + 'Carlisle', + 'Oxford', + 'Manchester', + 'Chelmsford', + 'Carlisle' +]; +export const DATES = [ + '2019-07-10T22:55:56.845Z', + '2019-07-11T22:55:56.845Z', + '2019-07-12T22:55:56.845Z', + '2019-07-13T22:55:56.845Z', + '2019-07-14T22:55:56.845Z' +]; +export const id = [ + 'zpJruf3vmWw-8MUyZPWx', + 'stg9-c9zrK0pu2n99OUe', + 'YT-SMjFHc7S_uEnU61Th', + '-gDk1GeiUafeZJJQ-dpE', + 'QqbAXKJ_Couc3bhn-ba8', + 'bcpicZLm9rLOUZ85Y4M_' +]; diff --git a/src/mock/destination.js b/src/mock/destination.js new file mode 100644 index 0000000..b180126 --- /dev/null +++ b/src/mock/destination.js @@ -0,0 +1,11 @@ +import {getRandomArrayElement, getPicturesArray} from '../utils.js'; +import {CITIES, DESCRIPTION} from './const.js'; +export const generateDestination = () => { + const city = getRandomArrayElement(CITIES); + return { + id: crypto.randomUUID(), + description: getRandomArrayElement(DESCRIPTION), + name: city, + pictures: getPicturesArray(city) + }; +}; diff --git a/src/mock/offer.js b/src/mock/offer.js new file mode 100644 index 0000000..333e9a9 --- /dev/null +++ b/src/mock/offer.js @@ -0,0 +1,10 @@ +import {getRandomArrayElement, getRandomInt} from '../utils.js'; +import {OFFERS} from './const.js'; +export const generateOffer = () => ({ + offers: + { + id: crypto.randomUUID(), + title: getRandomArrayElement(OFFERS), + price: getRandomInt() + } +}); diff --git a/src/mock/point.js b/src/mock/point.js new file mode 100644 index 0000000..bae8fec --- /dev/null +++ b/src/mock/point.js @@ -0,0 +1,11 @@ +import {getRandomInt, getRandomBulValue} from '../utils.js'; +export const generatePoint = (offerType, destinationId, offerIds) => ({ + id: crypto.randomUUID(), + basePrice: getRandomInt(), + dateFrom: '2019-01-10T20:55:56.845Z', + dateTo: '2019-01-12T22:55:56.845Z', + destination: destinationId, + isFavorite: getRandomBulValue(), + offers: offerIds, + type: offerType +}); diff --git a/src/model/destination-model.js b/src/model/destination-model.js new file mode 100644 index 0000000..1a1810d --- /dev/null +++ b/src/model/destination-model.js @@ -0,0 +1,13 @@ +export default class DestinationModel { + constructor(service){ + this.destinations = service.getDestinations(); + } + + get() { + return this.destinations; + } + + getById(id) { + return this.destinations.find((destinations) => destinations.id === id); + } +} diff --git a/src/model/offers-model.js b/src/model/offers-model.js new file mode 100644 index 0000000..f316e94 --- /dev/null +++ b/src/model/offers-model.js @@ -0,0 +1,13 @@ +export default class OfferModel { + constructor(service){ + this.offers = service.getOffers(); + } + + get() { + return this.offers; + } + + getByType(type) { + return this.offers.find((offers) => offers.type === type).offers; + } +} diff --git a/src/model/point-model.js b/src/model/point-model.js new file mode 100644 index 0000000..8739f4d --- /dev/null +++ b/src/model/point-model.js @@ -0,0 +1,13 @@ +export default class PointModel { + constructor(service) { + this.points = service.getPoints(); + } + + get() { + return this.points; + } + + getById(id) { + return this.points.find((points) => points.id === id); + } +} diff --git a/src/presenter/board-presenter.js b/src/presenter/board-presenter.js index b8f0ce8..2964a51 100644 --- a/src/presenter/board-presenter.js +++ b/src/presenter/board-presenter.js @@ -1,15 +1,18 @@ -import {render} from '../render'; -import FilterView from '../view/filter-view'; -import SortView from '../view/sort-view'; -import NewPointView from '../view/new-point-view'; -import PointListView from '../view/event-point-view'; -import EventListView from '../view/event-list-view'; - -const POINT_COUNT = 3; +import {render} from '../render.js'; +import FilterView from '../view/filter-view.js'; +import SortView from '../view/sort-view.js'; +import NewPointView from '../view/new-point-view.js'; +import EventPointView from '../view/event-point-view.js'; +import EventListView from '../view/event-list-view.js'; export default class BoardPresenter { - constructor({boardContainer}) { + constructor({boardContainer, destinationsModel, offersModel, pointsModel}) { this.boardContainer = boardContainer; + this.destinationsModel = destinationsModel; + this.offersModel = offersModel; + this.pointsModel = pointsModel; + + this.points = [...pointsModel.get()]; } eventList = new EventListView(); @@ -21,10 +24,21 @@ export default class BoardPresenter { render(new FilterView(), tripControlFiltersElement); render(new SortView(), tripEventsElement); render(this.eventList, tripEventsElement); - render(new NewPointView(), this.eventList.getElement()); - for (let i = 0; i < POINT_COUNT; i++) { - render(new PointListView(), this.eventList.getElement()); + render(new NewPointView({ + point: this.points[0], + pointDestination: this.destinationsModel.get(), + pointOffers: this.offersModel.get() + }), + this.eventList.getElement()); + + this.points.slice(1, this.points.length).forEach((point) => { + render(new EventPointView({ + point: point, + pointDestination: this.destinationsModel.getById(point.id), + pointOffers: this.offersModel.getByType(point.type) + }), this.eventList.getElement()); } + ); } } diff --git a/src/service/mock-service.js b/src/service/mock-service.js new file mode 100644 index 0000000..1d20521 --- /dev/null +++ b/src/service/mock-service.js @@ -0,0 +1,54 @@ +import {generateDestination} from '../mock/destination.js'; +import {generateOffer} from '../mock/offer.js'; +import {generatePoint} from '../mock/point.js'; +import {getRandomIntFromRange, getRandomArrayElement, getRandomBulValue} from '../utils.js'; +import {DESTINATION_COUNT, ROUTE_TYPE, OFFER_COUNT, POINT_COUNT} from '../mock/const.js'; + +export default class MockService { + destinations = []; + offers = []; + points = []; + + constructor() { + this.destinations = this.generateDestinations(); + this.offers = this.generateOffers(); + this.points = this.generatePoints(); + } + + getDestinations() { + return this.destinations; + } + + getOffers() { + return this.offers; + } + + getPoints() { + return this.points; + } + + generateDestinations() { + return Array.from({length: DESTINATION_COUNT}, () => generateDestination()); + } + + generateOffers() { + return ROUTE_TYPE.map((type) => ({ + type, + offers: Array.from({length: getRandomIntFromRange(0, OFFER_COUNT)}, () => generateOffer()) + })); + } + + generatePoints() { + return Array.from({length: POINT_COUNT}, () => { + const type = getRandomArrayElement(ROUTE_TYPE); + const destination = getRandomArrayElement(this.destinations); + const hasOffers = getRandomBulValue(); + const offersByType = this.offers.find((offerByType) => offerByType.type === type); + const offerIds = (hasOffers) + ? offersByType.offers.slice(getRandomIntFromRange(0, offersByType.offers.length)) + : []; + + return generatePoint(type, destination, offerIds); + }); + } +} diff --git a/src/utils.js b/src/utils.js new file mode 100644 index 0000000..1071caa --- /dev/null +++ b/src/utils.js @@ -0,0 +1,43 @@ +import dayjs from 'dayjs'; +import {DATE_FORMAT, TIME_FORMAT, FULL_TIME_FOMAT, MILLISECONDS_IN_DAY, MILLISECONDS_IN_HOUR, BooleanValues, SLASH_TIME_FOMAT} from './mock/const'; + +// eslint-disable-next-line no-undef +const duration = require('dayjs/plugin/duration'); +dayjs.extend(duration); + +export const formatToDate = (dueDate) => dueDate ? dayjs(dueDate).format(FULL_TIME_FOMAT) : ''; + +export const formatToTime = (dueDate) => dueDate ? dayjs(dueDate).format(TIME_FORMAT) : ''; + +export const formatToShortDate = (time) => time ? dayjs(time).format(DATE_FORMAT) : ''; + +export const formatToSlashDate = (time) => time ? dayjs(time).format(SLASH_TIME_FOMAT) : ''; + +export const ispointExpired = (dueDate) => dueDate && dayjs().isAfter(dueDate, 'D'); + +export const getRandomArrayElement = (items) => items[Math.floor(Math.random() * items.length)]; + +export const getRandomInt = () => Math.floor(Math.random() * 1000); + +export const getRandomIntFromRange = (min, max) => Math.floor(Math.random() * (max - min) + min); + +export const getRandomBulValue = () => getRandomArrayElement(BooleanValues); + +export const getPointDuration = (dateFrom, dateTo) => { + const timeDifference = dayjs(dateTo).diff(dayjs(dateFrom)); + + if (timeDifference >= MILLISECONDS_IN_DAY) { + return dayjs.duration(timeDifference).format('DD[D] HH[H] mm[M]'); + } else if (timeDifference >= MILLISECONDS_IN_HOUR) { + return dayjs.duration(timeDifference).format('HH[H] mm[M]'); + } else if (timeDifference < MILLISECONDS_IN_HOUR) { + return dayjs.duration(timeDifference).format('mm[M]'); + } +}; + +export const getRandomPictureElement = (city) => ({ + src: `https://loremflickr.com/248/152?random=${getRandomInt()}`, + description: `${city} description` +}); + +export const getPicturesArray = (city) => Array.from({length: getRandomIntFromRange(0, 5)}, () => getRandomPictureElement(city)); diff --git a/src/view/edit-point-view.js b/src/view/edit-point-view.js deleted file mode 100644 index aacbc72..0000000 --- a/src/view/edit-point-view.js +++ /dev/null @@ -1,153 +0,0 @@ -import {createElement} from '../render'; - -const createEditPointTemplate = () => `
  • -
    -
    -
    - - -
    -
    - Event type -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    -
    - - - - - - - -
    -
    - - - — - - -
    -
    - - -
    - - - -
    -
    -
    -

    Offers

    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    -

    Destination

    -

    Chamonix-Mont-Blanc (usually shortened to Chamonix) is a resort area near the junction of France, Switzerland and Italy. At the base of Mont Blanc, the highest summit in the Alps, it's renowned for its skiing.

    -
    -
    -
    -
  • `; -export default class EditPointView { - getTemplate() { - return createEditPointTemplate(); - } - - getElement() { - if (!this.element) { - this.element = createElement(this.getTemplate()); - } - return this.element; - } - - removeElement() { - this.element = null; - } -} diff --git a/src/view/event-list-view.js b/src/view/event-list-view.js index a22674b..4a5c3cb 100644 --- a/src/view/event-list-view.js +++ b/src/view/event-list-view.js @@ -1,4 +1,4 @@ -import {createElement} from '../render'; +import {createElement} from '../render.js'; const createEventListTemplate = () => ''; export default class EventListView { diff --git a/src/view/event-point-view.js b/src/view/event-point-view.js index 19edb7c..623f9c8 100644 --- a/src/view/event-point-view.js +++ b/src/view/event-point-view.js @@ -1,32 +1,54 @@ -import {createElement} from '../render'; +import {createElement} from '../render.js'; +import {formatToTime, formatToDate, formatToShortDate, getPointDuration} from '../utils.js'; +import {POINT_EMPTY} from '../mock/const.js'; -const createEventPointTemplate = () => `
  • +const isFavoriteShow = (isFavorite) => (isFavorite) + ? 'event__favorite-btn--active' + : ''; + +const offerShow = (offersArray) => { + if (offersArray.length !== 0) { + let offerElements = ''; + + offersArray.forEach((offer) => { + offerElements += `
  • + ${offer.offers.title} + +€  + ${offer.offers.price} +
  • `; + }); + + return offerElements; + } + return ''; +}; + +const createEventPointTemplate = ({point, pointOffers}) => { + const {basePrice, dateFrom, dateTo, isFavorite, type, destination} = point; + + return (`
  • - +
    - Event type icon + ${type} icon
    -

    Taxi Amsterdam

    +

    ${type} ${destination.name}

    - + — - +

    -

    30M

    +

    ${getPointDuration(dateFrom, dateTo)}

    - € 20 + € ${basePrice}

    Offers:

      -
    • - Order Uber - +€  - 20 -
    • + ${offerShow(pointOffers)}
    -
    -
  • `; +`); +}; export default class EventPointView { + constructor({point = POINT_EMPTY, pointDestination, pointOffers}) { + this.point = point; + this.pointDestination = pointDestination; + this.pointOffers = pointOffers; + } + getTemplate() { - return createEventPointTemplate(); + return createEventPointTemplate({ + point: this.point, + pointDestination: this.pointDestination, + pointOffers: this.pointOffers + }); } getElement() { if (!this.element) { this.element = createElement(this.getTemplate()); } + return this.element; } diff --git a/src/view/filter-view.js b/src/view/filter-view.js index ed6d782..8f7a706 100644 --- a/src/view/filter-view.js +++ b/src/view/filter-view.js @@ -1,4 +1,4 @@ -import {createElement} from '../render'; +import {createElement} from '../render.js'; const createFilterTemplate = () => `
    diff --git a/src/view/new-point-view.js b/src/view/new-point-view.js index 93deb3d..2b5d296 100644 --- a/src/view/new-point-view.js +++ b/src/view/new-point-view.js @@ -1,155 +1,145 @@ -import {createElement} from '../render'; - -const createNewPointTemplate = () => `
  • - -
    -
    - - -
    -
    - Event type -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    -
    - - - - - - - -
    -
    - - - — - - -
    -
    - - -
    - - -
    -
    -
    -

    Offers

    +import {createElement} from '../render.js'; +import {formatToSlashDate} from '../utils.js'; +import {POINT_EMPTY} from '../mock/const.js'; + +const getPicrtureArrayElement = (picturesArray) => { + let tapeElements = ''; + + picturesArray.forEach((picture) => { + tapeElements += `${picture.description}`; + }); + + return tapeElements; +}; + +const getOffersArrayElement = (offersArray) => { + if (offersArray.length !== 0) { + let offersElements = `
    +

    Offers

    `; + + offersArray.forEach((offer, i) => { + offersElements += `
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - +
    + + +
    `; + }); + + offersElements += '
    '; + + return offersElements; + } else { + return ''; + } +}; + +const getEventTypeElements = (typeArray) => { + let typeElements = ''; + + typeArray.forEach((type) => { + typeElements += `
    + + +
    `; + }); + + return typeElements; +}; + +const createNewPointTemplate = ({point, pointOffers}) => { + const {basePrice, dateFrom, dateTo, offers, type} = point; + + return `
  • + +
    +
    + + + +
    +
    + Event type + ${getEventTypeElements(pointOffers)} +
    -
  • -
    -

    Destination

    -

    Geneva is a city in Switzerland that lies at the southern tip of expansive Lac Léman (Lake Geneva). Surrounded by the Alps and Jura mountains, the city has views of dramatic Mont Blanc.

    -
    -
    - Event photo - Event photo - Event photo - Event photo - Event photo -
    + +
    + + + + + + + +
    + +
    + + + — + +
    + +
    + + +
    + + + + +
    + ${getOffersArrayElement(offers)} +
    +

    Destination

    +

    ${point.destination.description}

    + +
    +
    + ${getPicrtureArrayElement(point.destination.pictures)} +
    +
    +
    -
    - -
  • `; + + `; +}; + export default class NewPointView { + constructor({point = POINT_EMPTY, pointDestination, pointOffers}) { + this.point = point; + this.pointDestination = pointDestination; + this.pointOffers = pointOffers; + } + getTemplate() { - return createNewPointTemplate(); + return createNewPointTemplate({ + point: this.point, + pointDestination: this.pointDestination, + pointOffers: this.pointOffers + }); } getElement() { if (!this.element) { this.element = createElement(this.getTemplate()); } + return this.element; } diff --git a/src/view/sort-view.js b/src/view/sort-view.js index 3e05301..96bc342 100644 --- a/src/view/sort-view.js +++ b/src/view/sort-view.js @@ -1,4 +1,4 @@ -import {createElement} from '../render'; +import {createElement} from '../render.js'; const createSortTemplate = () => `
    diff --git a/src/view/tip-event-list-view.js b/src/view/tip-event-list-view.js index 462d4fb..f4a5672 100644 --- a/src/view/tip-event-list-view.js +++ b/src/view/tip-event-list-view.js @@ -1,4 +1,4 @@ -import {createElement} from '../render'; +import {createElement} from '../render.js'; const createTipEventListViewTemplate = () => '
      '; export default class TipEventList { getTemplate() { From a4012c65adc80ba09fb3d433fc89ec976a4a0efe Mon Sep 17 00:00:00 2001 From: Nikita Bystritsky Date: Tue, 24 Dec 2024 13:56:26 +0500 Subject: [PATCH 3/3] =?UTF-8?q?feat:=202.10.=20=D0=A8=D0=B0=D0=B1=D0=BB?= =?UTF-8?q?=D0=BE=D0=BD=D0=B8=D0=B7=D0=B8=D1=80=D1=83=D0=B9=20=D1=8D=D1=82?= =?UTF-8?q?=D0=BE=20done?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mock/const.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mock/const.js b/src/mock/const.js index 2d051d7..e58ede9 100644 --- a/src/mock/const.js +++ b/src/mock/const.js @@ -22,7 +22,7 @@ export const POINT_EMPTY = { }; export const DESCRIPTION = [ 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.', - 'Aenean commodo ligula eget dolor. Aenean mass.', + 'Aenean commodo ligula eget dolor. Aenean mass', 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.', 'Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.', 'Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.',