Skip to content

Commit

Permalink
uses staging endpoint, adds 2nd phone number and transformPhone
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrothwell committed Jan 21, 2025
1 parent 1af097b commit 203e07e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
21 changes: 15 additions & 6 deletions src/components/ExpandCollapseContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ const makeTwitterHandle = (url) => {
return value;
};
const transformPhone = (value) => {
var s2 = (""+value).replace(/\D/g, '');
var m = s2.match(/^(\d{3})(\d{3})(\d{4})$/);
return (!m) ? null : "(" + m[1] + ") " + m[2] + "-" + m[3];
}
</script>

<template>
Expand All @@ -408,14 +414,15 @@ const makeTwitterHandle = (url) => {
</div>

<div
v-if="item.properties.PHONE"
v-if="item.properties.program_phone"
class="columns is-mobile"
>
<div class="column is-1">
<font-awesome-icon icon="phone" />
</div>
<div class="column is-11">
{{ item.properties.PHONE }}
<b>{{ $t('phone_org') }}:</b> {{ transformPhone(item.properties.PHONE) }}<br>
<b>{{ $t('phone_program') }}:</b> {{ transformPhone(item.properties.program_phone) }}
</div>
</div>

Expand Down Expand Up @@ -505,7 +512,6 @@ const makeTwitterHandle = (url) => {
</div>

<div class="column is-6">

<div
v-if="item.properties.RemoteProgrammingSelect"
class="columns is-mobile"
Expand Down Expand Up @@ -563,11 +569,13 @@ const makeTwitterHandle = (url) => {
<b>{{ $t('timeOffered') }}:</b> {{ item.properties.ProgramDirectoryStartTimeSelect }} - {{ item.properties.ProgramDirectoryEndTimeSelect }}
</div>
</div>

</div>
</div>

<h3 v-if="hasFocusAreas" class="section-heading">
<h3
v-if="hasFocusAreas"
class="section-heading"
>
{{ $t('focusArea.plural') }}
</h3>
<div v-if="artsAndCulture && artsAndCulture.value > 1">
Expand All @@ -592,7 +600,8 @@ const makeTwitterHandle = (url) => {
<h3 class="section-heading">
{{ $t('details') }}
</h3>
<div v-html="item.properties.programdescription" />
<div v-html="item.properties.servicedesc" />
<!-- <div v-html="item.properties.programdescription" /> -->

<br>

Expand Down
3 changes: 2 additions & 1 deletion src/data-sources/ost.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ export default {
type: 'http-get',
dependent: 'none',
resettable: false,
url: 'https://api.cityspan.com/phillyost/service/getall',
url: 'https://stage.cityspan.com:8080/phillyost/service/getall',
// url: 'https://api.cityspan.com/phillyost/service/getall',
options: {
success: function(data) {
if (import.meta.env.VITE_DEBUG) console.log('ost.js success is running, data:', data);
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/en-us.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export default {
all: 'Search by address, zipcode, or program name',
},
},
phone_org: 'Organization Phone',
phone_program: 'Activity Phone',
eligibility: 'Eligibility',
pickupDetails: 'Pickup details',
beforeYouGo: 'Before you go',
Expand Down

0 comments on commit 203e07e

Please sign in to comment.