Skip to content

Commit

Permalink
Merge pull request #8 from CityOfPhiladelphia/main
Browse files Browse the repository at this point in the history
adds 2nd phone number
  • Loading branch information
ajrothwell authored Jan 2, 2025
2 parents d32b3b8 + b240837 commit d84566c
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 79 deletions.
136 changes: 67 additions & 69 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 16 additions & 8 deletions src/components/ExpandCollapseContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
</div>

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

Expand Down Expand Up @@ -116,7 +117,6 @@
</div>

<div class="column is-6">

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

</div>
</div>

<h3 v-if="this.hasFocusAreas" class="section-heading">
<h3
v-if="this.hasFocusAreas"

Check warning on line 181 in src/components/ExpandCollapseContent.vue

View workflow job for this annotation

GitHub Actions / build

Unexpected usage of 'this'
class="section-heading"
>
{{ $t('focusArea.plural') }}
</h3>
<div v-if="this.artsAndCulture && this.artsAndCulture.length > 1">

Check warning on line 186 in src/components/ExpandCollapseContent.vue

View workflow job for this annotation

GitHub Actions / build

Unexpected usage of 'this'

Check warning on line 186 in src/components/ExpandCollapseContent.vue

View workflow job for this annotation

GitHub Actions / build

Unexpected usage of 'this'
Expand All @@ -203,7 +205,8 @@
<h3 class="section-heading">
{{ $t('details') }}
</h3>
<div v-html="item.attributes.programdescription" />
<div v-html="item.attributes.servicedesc" />
<!-- <div v-html="item.attributes.programdescription" /> -->

<br>

Expand Down Expand Up @@ -317,14 +320,14 @@ import { fr, vi, ru, es, enUS } from 'date-fns/locale';
import * as zh from 'date-fns/locale/zh-CN/index.js';
import SharedFunctions from '@phila/pinboard/src/components/mixins/SharedFunctions.vue';
import { VueGoodTable } from 'vue-good-table';
// import { VueGoodTable } from 'vue-good-table';
import PrintShareSection from '@phila/pinboard/src/components/PrintShareSection';
export default {
name: 'ExpandCollapseContent',
components: {
VueGoodTable,
// VueGoodTable,
PrintShareSection,
},
mixins: [ SharedFunctions ],
Expand Down Expand Up @@ -567,6 +570,11 @@ export default {
// console.log('ExpandCollapseContent.vue mounted, this.item.attributes.transit_subway.length:', this.item.attributes.transit_subway.length, 'this.item.attributes.transit_subway:', this.item.attributes.transit_subway);
},
methods: {
transformPhone(phoneNumber) {
var s2 = (""+phoneNumber).replace(/\D/g, '');
var m = s2.match(/^(\d{3})(\d{3})(\d{4})$/);
return (!m) ? null : "(" + m[1] + ") " + m[2] + "-" + m[3];
},
getAges(item) {
// console.log('getAges is running, item:', item);
let options = [ 'isUnder5', 'is5to10', 'is11to13', 'is14to18', 'isAbove18' ];
Expand Down
5 changes: 3 additions & 2 deletions src/data-sources/ost.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ export default {
type: 'http-get',
dependent: 'none',
resettable: false,
// url: 'https://stage.cityspan.com:8080/phillyost/service/getall',
url: 'https://api.cityspan.com/phillyost/service/getall',
options: {
success: function(data) {
console.log('ost.js success is running, data:', data);

Check failure on line 10 in src/data-sources/ost.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
let newData = { features: [] };
let newData = { features: []};
for (let datum of data) {
newData.features.push({
attributes: datum,
latlng: [ datum.latitude, datum.longitude ],
})
});
}
return newData;
},
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 d84566c

Please sign in to comment.