Skip to content

Commit

Permalink
Merge pull request #53 from CityOfPhiladelphia/main
Browse files Browse the repository at this point in the history
fixes business licenses
  • Loading branch information
ajrothwell authored Jan 9, 2025
2 parents dfcb9c6 + 48b6d6b commit bfd044f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev_push_to_s3_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: dev Push to S3 dev bucket
on:
push:
branches:
- feature/use-old-cyclomedia
- fix/li-records-issue
jobs:
build:

Expand Down
5 changes: 4 additions & 1 deletion src/stores/LiStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,19 +412,22 @@ export const useLiStore = defineStore('LiStore', {
let baseUrl = 'https://phl.carto.com/api/v2/sql?q=';
const eclipse_location_id = feature.properties.eclipse_location_id.replace(/\|/g, "', '");
const streetaddress = feature.properties.street_address;
const opaQuery = feature.properties.opa_account_num ? ` AND opa_account_num IN ('${ feature.properties.opa_account_num}')` : ``;
const opaQuery = feature.properties.opa_account_num ? ` OR opa_account_num IN ('${ feature.properties.opa_account_num}')` : ``;
const pwd_parcel_id = feature.properties.pwd_parcel_id;
const addressId = feature.properties.li_address_key.replace(/\|/g, "', '");

let query;
if (eclipse_location_id) {
query = `SELECT * FROM BUSINESS_LICENSES WHERE ( addressobjectid IN ('`+ eclipse_location_id +`') AND addressed_license = 'Yes' \
OR address = '${streetaddress}' AND addressed_license = 'Yes' \
OR addressobjectid IN ('${ addressId }') AND addressed_license = 'Yes' \
OR parcel_id_num IN ( '${ pwd_parcel_id }' ) AND addressed_license = 'Yes' ) \
${opaQuery } \
ORDER BY licensetype`;
} else {
query = `SELECT * FROM BUSINESS_LICENSES WHERE ( address = '${streetaddress}' AND addressed_license = 'Yes' \
OR parcel_id_num IN ( '${ pwd_parcel_id }' ) AND addressed_license = 'Yes' ) \
OR addressobjectid IN ('${ addressId }') AND addressed_license = 'Yes' \
${opaQuery } \
ORDER BY licensetype`;
}
Expand Down

0 comments on commit bfd044f

Please sign in to comment.