Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
O
OSMyBiz
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
35
Issues
35
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
2
Merge Requests
2
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
geometalab
OSMyBiz
Commits
6f88fb93
Commit
6f88fb93
authored
Aug 08, 2019
by
Seemann Benjamin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proper tagging for OSM opening hours
parent
b904ef21
Pipeline
#75327182
passed with stages
in 2 minutes and 30 seconds
Changes
6
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
frontend/osmybiz/src/api/osmybizApi.js
frontend/osmybiz/src/api/osmybizApi.js
+0
-1
frontend/osmybiz/src/components/detail/DetailForm.vue
frontend/osmybiz/src/components/detail/DetailForm.vue
+1
-1
frontend/osmybiz/src/store/detail.js
frontend/osmybiz/src/store/detail.js
+5
-2
frontend/osmybiz/src/store/update.js
frontend/osmybiz/src/store/update.js
+0
-1
frontend/osmybiz/src/util/osmApiUtils.js
frontend/osmybiz/src/util/osmApiUtils.js
+3
-4
frontend/osmybiz/src/util/overPassNodeUtils.js
frontend/osmybiz/src/util/overPassNodeUtils.js
+1
-1
No files found.
frontend/osmybiz/src/api/osmybizApi.js
View file @
6f88fb93
...
...
@@ -27,7 +27,6 @@ export function addOrUpdateUser(userId, displayName) {
}
export
function
fetchBusinessPOIs
(
userId
)
{
console
.
log
(
'
fetchbusinessPOIS called by update.js
'
);
if
(
fakeOsmybizApi
)
{
return
mockFetchBusinessPOIs
(
userId
);
}
...
...
frontend/osmybiz/src/components/detail/DetailForm.vue
View file @
6f88fb93
...
...
@@ -55,7 +55,7 @@
type="text"
v-on:blur="blurOpeningHours()"
id="openingHoursURL"
v-model="details.opening_
hours_
url"
v-model="details.opening_url"
:placeholder="$t('detail.placeholders.opening_hours_url')">
<span
v-show=
"errors.has('website')"
...
...
frontend/osmybiz/src/store/detail.js
View file @
6f88fb93
...
...
@@ -29,7 +29,7 @@ const initialState = {
},
name
:
''
,
opening_hours
:
''
,
opening_
hours_
url
:
''
,
opening_url
:
''
,
phone
:
''
,
email
:
''
,
website
:
''
,
...
...
@@ -89,6 +89,9 @@ function constructSuccessMessage(response, isNote) {
}
function
parseTagToString
(
tag
,
value
,
initialValue
,
additionalText
)
{
if
(
tag
===
'
opening_url
'
)
{
tag
=
'
opening_hours:url
'
;
}
if
(
deepEqual
(
value
,
initialValue
))
{
if
(
value
)
{
return
`
${
additionalText
}${
tag
}
=
${
value
}
\n`
;
...
...
@@ -194,7 +197,7 @@ export function clearDetails() {
},
name
:
''
,
opening_hours
:
''
,
opening_
hours_
url
:
''
,
opening_url
:
''
,
phone
:
''
,
email
:
''
,
website
:
''
,
...
...
frontend/osmybiz/src/store/update.js
View file @
6f88fb93
...
...
@@ -49,7 +49,6 @@ const actions = {
resolve
(
subscribedBusinessPOI
);
}
});
promise
.
then
(()
=>
{
if
(
isNoteWithoutOsmElement
(
subscribedBusinessPOI
.
id
))
{
subscribedBusinessPOI
.
tags
=
{};
...
...
frontend/osmybiz/src/util/osmApiUtils.js
View file @
6f88fb93
...
...
@@ -7,7 +7,7 @@ function parseDetails(businessPOITags) {
const
tags
=
[
'
name
'
,
'
opening_hours
'
,
'
opening_hours
_
url
'
,
'
opening_hours
:
url
'
,
'
phone
'
,
'
email
'
,
'
website
'
,
...
...
@@ -129,8 +129,8 @@ function createDetailTags(businessPOI) {
if
(
businessPOI
.
details
.
opening_hours
.
length
!==
0
)
{
text
+=
`<tag k="opening_hours" v="
${
businessPOI
.
details
.
opening_hours
}
"/>`
;
}
if
(
businessPOI
.
details
.
opening_hours
_url
.
length
!==
0
)
{
text
+=
`<tag k="opening_hours:url" v="
${
businessPOI
.
details
.
opening_
hours_
url
}
"/>`
;
if
(
businessPOI
.
opening
_url
.
length
!==
0
)
{
text
+=
`<tag k="opening_hours:url" v="
${
businessPOI
.
details
.
opening_url
}
"/>`
;
}
if
(
businessPOI
.
details
.
phone
.
length
!==
0
)
{
text
+=
`<tag k="phone" v="
${
businessPOI
.
details
.
phone
}
"/>`
;
...
...
@@ -239,7 +239,6 @@ function extractId(businessPOIDiff) {
return
getAttributes
(
diffJson
).
new_id
;
}
export
default
{
parseUser
,
constructUpload
,
...
...
frontend/osmybiz/src/util/overPassNodeUtils.js
View file @
6f88fb93
...
...
@@ -65,7 +65,7 @@ function createNoteFromBusinessPOI(businessPOI) {
category
:
getBizCategory
(
businessPOI
),
name
:
extractTag
(
businessPOI
,
'
name
'
),
opening_hours
:
extractTag
(
businessPOI
,
'
opening_hours
'
),
opening_
hours_url
:
extractTag
(
businessPOI
,
'
opening_hours_
url
'
),
opening_
url
:
extractTag
(
businessPOI
,
'
opening_hours:
url
'
),
phone
:
extractTag
(
businessPOI
,
'
phone
'
),
email
:
extractTag
(
businessPOI
,
'
email
'
),
website
:
extractTag
(
businessPOI
,
'
website
'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment