reinit whereinputadvanced in /add , and init only/also online mechanism, various fixes: admin edit place; bug in nominatim display_name when place in certain nominatim_class, init refactor geocoding related code in services/geocoding/provider; init MapEdit component

This commit is contained in:
sedum
2023-02-17 00:23:35 +01:00
parent 6aceaba7f7
commit 79ebec9116
21 changed files with 1558 additions and 255 deletions

View File

@@ -401,6 +401,7 @@ const eventController = {
multidate: body.multidate,
start_datetime: body.start_datetime,
end_datetime: body.end_datetime,
locations: body.locations,
recurrent,
// publish this event only if authenticated
is_visible: !!req.user
@@ -485,6 +486,7 @@ const eventController = {
multidate: body.multidate,
start_datetime: body.start_datetime || event.start_datetime,
end_datetime: body.end_datetime || null,
locations: body.locations,
recurrent
}

View File

@@ -29,6 +29,8 @@ const defaultSettings = {
allow_multidate_event: true,
allow_recurrent_event: false,
recurrent_event_visible: false,
allow_event_only_online: false,
allow_event_also_online: false,
allow_geolocation: false,
geocoding_provider_type: 'Nominatim',
geocoding_provider: 'https://nominatim.openstreetmap.org/search',

View File

@@ -100,6 +100,7 @@ module.exports = () => {
* @param {string} [query] - search for this string
* @param {array} [tags] - List of tags
* @param {array} [places] - List of places id
* @param {array} [locations] - List of locations
* @param {integer} [max] - Limit events
* @param {boolean} [show_recurrent] - Show also recurrent events (default: as choosen in admin settings)
* @param {integer} [page] - Pagination

View File

@@ -37,7 +37,8 @@ module.exports = (sequelize, DataTypes) => {
is_visible: DataTypes.BOOLEAN,
recurrent: DataTypes.JSON,
likes: { type: DataTypes.JSON, defaultValue: [] },
boost: { type: DataTypes.JSON, defaultValue: [] }
boost: { type: DataTypes.JSON, defaultValue: [] },
locations: { type: DataTypes.JSON, defaultValue: [] }
})
Event.prototype.toAP = function (username, locale, to = []) {