Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9197cfd
Add UK region, tweak text a bit for reuse.
edwh May 25, 2022
d129b55
Change port.
edwh May 25, 2022
ce0ea98
Remove region hack now server work done.
edwh May 25, 2022
d6e7d72
Merge branch 'REP-220_sort_by_distance' into REP-216_reuse_tweaks
edwh May 30, 2022
3014c1e
Allow suppression of address/description using all dots.
edwh May 30, 2022
d987218
Update port number.
edwh Jun 1, 2022
9da0264
Update GA id.
edwh Jun 1, 2022
ddd1250
Only show city for address
ngm Jun 6, 2022
1328535
Move community endorsement
ngm Jun 6, 2022
cb99b11
Update icons
ngm Jun 6, 2022
84c48e2
Merge pull request #33 from TheRestartProject/REP-216_reuse_tweaks
restart-tech Jun 6, 2022
95f719f
Update labels for reuse directory
ngm Jun 6, 2022
205905f
Merge pull request #34 from TheRestartProject/REP-214-labels-for-reus…
restart-tech Jun 6, 2022
5fe8ab0
WIP: style tweaks
ngm Jun 8, 2022
4a69fec
More display tweaks
ngm Jun 21, 2022
76e1037
Merge branch 'develop-reuse' into reuse-directory-style-tweaks
ngm Jun 21, 2022
696dda0
Apply fix from Reuse Directory to Repair Directory, but also fix the …
edwh Jun 28, 2022
c4a020d
Merge branch 'develop-reuse' into REP-238_sharing_fail
edwh Jun 28, 2022
69cf175
Show localArea if present.
edwh Jun 28, 2022
5614b89
Merge pull request #37 from TheRestartProject/reuse-directory-style-t…
ngm Jun 28, 2022
9ac1cd1
Merge pull request #35 from TheRestartProject/REP-238_sharing_fail
edwh Jun 28, 2022
c09bc3f
Merge pull request #36 from TheRestartProject/REP-227_borough_area
edwh Jun 28, 2022
322aab2
Merge branch 'develop' into develop-reuse
edwh Jul 4, 2022
f48b885
Fix icon broken by merge.
edwh Jul 4, 2022
abe04c7
Don't show postcode - introduced in merge.
edwh Jul 4, 2022
da8bd35
Style tweaks.
edwh Jul 4, 2022
b18fa66
Style tweaks.
edwh Jul 4, 2022
4b6d65a
Add secure and samesite flags to Analytics cookies
ngm Oct 11, 2022
2758625
Switch from Google Maps to Leaflet, with Mapbox tiles.
edwh Dec 14, 2022
c7d190e
Nits.
edwh Dec 14, 2022
971832a
Update markers.
edwh Dec 19, 2022
f79eed4
Review feedback.
edwh Feb 1, 2023
5ea705a
Merge branch 'develop' into REP-75_leaflet
ngm Feb 1, 2023
0addda3
Merge branch 'REP-75_leaflet' of github.com:TheRestartProject/repair-…
ngm Feb 1, 2023
df6a999
Shrink map icon.
edwh Feb 8, 2023
0b50a74
Merge remote-tracking branch 'origin/REP-75_leaflet' into REP-75_leaflet
edwh Feb 8, 2023
54ed6aa
Icon shadow not positioned correctly.
edwh Feb 22, 2023
ff23399
Merge pull request #38 from TheRestartProject/REP-75_leaflet
ngm May 23, 2023
afbb67f
Merge branch 'develop-reuse' into develop
ngm May 23, 2023
41ef73d
Merge pull request #41 from TheRestartProject/develop
ngm May 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/images/marker-icon-2x-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/marker-icon-2x-red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 14 additions & 4 deletions components/Business.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
:href="business.website"
@click="trackOutboundLink(business.website)"
>
{{ business.website }}
Visit website
</a>
</p>

Expand All @@ -77,12 +77,14 @@
</a>
</p>

<p v-if="business.address" class="business-detail">
<p v-if="showAddress" class="business-detail">
<client-only>
<v-icon name="map-marker" class="icon" />
</client-only>
<span>{{ business.address }}, {{ business.city }}</span>
<span v-if="business.postcode">{{ business.postcode }}</span>
<span v-if="business.localAreaName">
{{ business.localAreaName }},
</span>
<span>{{ business.city }}</span>
</p>
</div>
</div>
Expand Down Expand Up @@ -124,6 +126,14 @@ export default {
}
},
computed: {
showAddress() {
// We have a special value of all dots to indicate this should be omitted.
return (
this.business && this.business.address
// eslint-disable-next-line
//this.business.address.replaceAll('.', '').length
)
},
distance() {
const location = this.$store.getters['businesses/searchLocation']

Expand Down
50 changes: 40 additions & 10 deletions components/BusinessModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
>({{ $t('source') }})</a
>
</p>
<p v-if="business.description" class="m-0 description">
<p v-if="showDescription" class="m-0 description">
{{ business.description }}
</p>
</div>
Expand Down Expand Up @@ -99,10 +99,12 @@
</a>
</p>

<p v-if="business.address">
<p v-if="showAddress">
<v-icon name="map-marker" class="fa-fw icon" />
<span>{{ business.address }}, {{ business.city }}</span>
<span v-if="business.postcode">{{ business.postcode }}</span>
<span v-if="business.localAreaName">
{{ business.localAreaName }},
</span>
<span>{{ business.city }}</span>
<span v-if="distance" class="text-muted text-small">
({{ roundedPlural(distance) }})</span
>
Expand All @@ -114,17 +116,29 @@
</p>

<div v-if="business.qualifications" class="mt-2 mb-2 d-flex">
<v-icon name="graduation-cap" class="fa-fw icon mr-1" />
<v-icon name="laptop" class="fa-fw icon mr-1 mt-1" />
<div v-if="html">
{{ $t('qualifications') }}:
<strong>{{ $t('qualifications') }}</strong
>:
<!-- eslint-disable-next-line-->
<div
v-html="business.qualifications" />
</div>
<div v-else>
{{ $t('qualifications') }}: {{ business.qualifications }}
<strong>{{ $t('qualifications') }}</strong
>: {{ business.qualifications }}
</div>
</div>

<p v-if="business.communityEndorsement">
<v-icon name="user" class="fa-fw icon" />
<span>
<strong>{{ $t('endorsement') }}</strong
>:
{{ business.communityEndorsement }}
</span>
</p>

<p>
<v-icon name="calendar" class="fa-fw icon" />
<span>{{ $t('lastUpdated') }}: {{ updated }}</span>
Expand Down Expand Up @@ -163,6 +177,24 @@ export default {
business() {
return this.id ? this.$store.getters['businesses/get'](this.id) : null
},
showDescription() {
// We have a special value of all dots to indicate this should be omitted.
return (
this.business &&
this.business.description &&
// eslint-disable-next-line
this.business.description.replaceAll('.', '').length
)
},
showAddress() {
// We have a special value of all dots to indicate this should be omitted.
return (
this.business &&
this.business.address &&
// eslint-disable-next-line
this.business.address.replaceAll('.', '').length
)
},
distance() {
const location = this.$store.getters['businesses/searchLocation']

Expand Down Expand Up @@ -206,9 +238,7 @@ export default {
},
completeAddress() {
return this.business
? [this.business.address, this.business.city, this.business.postcode]
.filter(Boolean)
.join(', ')
? [this.business.address, this.business.city].filter(Boolean).join(', ')
: null
},
html() {
Expand Down
48 changes: 41 additions & 7 deletions components/BusinessPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ import { mapGetters } from 'vuex'
import Map from '@/components/Map'
import BusinessList from '@/components/BusinessList'
import {
BOUNDS_LONDON,
BOUNDS_UK,
BOUNDS_WALES,
REGION_LONDON,
REGION_WALES,
SEARCH_HINT_UK,
SEARCH_HINT_LONDON,
SEARCH_HINT_WALES,
} from '@/regions'
Expand Down Expand Up @@ -191,7 +193,7 @@ export default {
break
}
default: {
bounds = BOUNDS_LONDON
bounds = BOUNDS_UK
break
}
}
Expand Down Expand Up @@ -268,7 +270,7 @@ export default {
]
break
}
default: {
case REGION_LONDON: {
ret = [
{
value: 1,
Expand All @@ -293,6 +295,35 @@ export default {
]
break
}
default: {
ret = [
{
value: 1,
text: '1 ' + this.$t('mile'),
},
{
value: 2,
text: '2 ' + this.$t('miles'),
},
{
value: 5,
text: '5 ' + this.$t('miles'),
},
{
value: 10,
text: '10 ' + this.$t('miles'),
},
{
value: 20,
text: '20 ' + this.$t('miles'),
},
{
value: 2000,
text: this.$t('allLondon'),
},
]
break
}
}

return ret
Expand All @@ -305,10 +336,14 @@ export default {
ret = SEARCH_HINT_WALES
break
}
default: {
case REGION_LONDON: {
ret = SEARCH_HINT_LONDON
break
}
default: {
ret = SEARCH_HINT_UK
break
}
}

return ret
Expand Down Expand Up @@ -414,9 +449,7 @@ export default {

// Track the select.
const business = this.$store.getters['businesses/get'](uid)
const value = [business.name, business.address, business.postcode].join(
', '
)
const value = [business.name, business.address].join(', ')
this.$ga.event('map', 'select_' + this.region, value)
},
showMoreInfo() {
Expand Down Expand Up @@ -509,6 +542,7 @@ export default {

.business-list-container {
background-color: #f7f5ed;
margin-top: 10px;
}

.business-list-container__results-header {
Expand Down
Loading