diff --git a/.github/workflows/dev_push_to_s3.yml b/.github/workflows/dev_push_to_s3.yml index 4bb44bc..057d9a6 100644 --- a/.github/workflows/dev_push_to_s3.yml +++ b/.github/workflows/dev_push_to_s3.yml @@ -6,7 +6,7 @@ name: dev Push to S3 on: push: branches: - - node-cache-2 + - building-cert-fix jobs: build: diff --git a/package-lock.json b/package-lock.json index 3cc3aa3..5c12110 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3837,12 +3837,12 @@ }, "@fortawesome/fontawesome-common-types": { "version": "0.2.36", - "resolved": "https://npm.fontawesome.com/@fortawesome/fontawesome-common-types/-/0.2.36/fontawesome-common-types-0.2.36.tgz", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz", "integrity": "sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg==" }, "@fortawesome/fontawesome-svg-core": { "version": "1.2.36", - "resolved": "https://npm.fontawesome.com/@fortawesome/fontawesome-svg-core/-/1.2.36/fontawesome-svg-core-1.2.36.tgz", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.36.tgz", "integrity": "sha512-YUcsLQKYb6DmaJjIHdDWpBIGCcyE/W+p/LMGvjQem55Mm2XWVAP5kWTMKWLv9lwpCVjpLxPyOMOyUocP1GxrtA==", "requires": { "@fortawesome/fontawesome-common-types": "^0.2.36" @@ -3850,7 +3850,7 @@ }, "@fortawesome/free-regular-svg-icons": { "version": "5.15.4", - "resolved": "https://npm.fontawesome.com/@fortawesome/free-regular-svg-icons/-/5.15.4/free-regular-svg-icons-5.15.4.tgz", + "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.4.tgz", "integrity": "sha512-9VNNnU3CXHy9XednJ3wzQp6SwNwT3XaM26oS4Rp391GsxVYA+0oDR2J194YCIWf7jNRCYKjUCOduxdceLrx+xw==", "requires": { "@fortawesome/fontawesome-common-types": "^0.2.36" @@ -3858,7 +3858,7 @@ }, "@fortawesome/free-solid-svg-icons": { "version": "5.15.4", - "resolved": "https://npm.fontawesome.com/@fortawesome/free-solid-svg-icons/-/5.15.4/free-solid-svg-icons-5.15.4.tgz", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz", "integrity": "sha512-JLmQfz6tdtwxoihXLg6lT78BorrFyCf59SAwBM6qV/0zXyVeDygJVb3fk+j5Qat+Yvcxp1buLTY5iDh1ZSAQ8w==", "requires": { "@fortawesome/fontawesome-common-types": "^0.2.36" @@ -3866,7 +3866,7 @@ }, "@fortawesome/vue-fontawesome": { "version": "2.0.5", - "resolved": "https://npm.fontawesome.com/@fortawesome/vue-fontawesome/-/2.0.5/vue-fontawesome-2.0.5.tgz", + "resolved": "https://registry.npmjs.org/@fortawesome/vue-fontawesome/-/vue-fontawesome-2.0.5.tgz", "integrity": "sha512-BktJiEuZhU+HxANJ37Pek6y+LRVVFgcU5CDd6b+t6XKj30QrYrh3ICsC5FQm5MuAdh3CPpYT99ywjk5v6nWteA==" }, "@humanwhocodes/config-array": { @@ -4329,13 +4329,13 @@ } }, "@phila/mapboard": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/mapboard.git#b07f96e845613cdca8ea104317755b03a0c3280c", - "from": "@phila/mapboard@https://github.com/CityOfPhiladelphia/mapboard#b07f96e", + "version": "git+https://github.com/CityOfPhiladelphia/mapboard.git#edac3fc110b03dda2ff1acfbe01bcd130d00fd9b", + "from": "git+https://github.com/CityOfPhiladelphia/mapboard.git#edac3fc110b03dda2ff1acfbe01bcd130d00fd9b", "requires": { "@mapbox/geo-viewport": "^0.5.0", - "@phila/vue-comps": "@phila/vue-comps@git+https://github.com/CityOfPhiladelphia/phila-vue-comps.git#99dcb81", - "@phila/vue-datafetch": "@phila/vue-datafetch@git+https://github.com/CityOfPhiladelphia/phila-vue-datafetch.git#a314a5b", - "@phila/vue-mapping": "3.1.20", + "@phila/vue-comps": "git+https://github.com/CityOfPhiladelphia/phila-vue-comps.git#604d5f1230d0895b62a4f2b8aa1f18de201ba707", + "@phila/vue-datafetch": "2.2.18", + "@phila/vue-mapping": "3.1.21", "vue": "^2.7.10", "vue-i18n": "^8.22.0", "vue-router": "^3.4.6", @@ -4343,8 +4343,8 @@ } }, "@phila/vue-comps": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/phila-vue-comps.git#99dcb81c2bf7ea1a60907523e14bab3c4549a0fb", - "from": "@phila/vue-comps@git+https://github.com/CityOfPhiladelphia/phila-vue-comps.git#99dcb81", + "version": "git+https://github.com/CityOfPhiladelphia/phila-vue-comps.git#604d5f1230d0895b62a4f2b8aa1f18de201ba707", + "from": "git+https://github.com/CityOfPhiladelphia/phila-vue-comps.git#604d5f1230d0895b62a4f2b8aa1f18de201ba707", "requires": { "@fortawesome/fontawesome-svg-core": "1.2.36", "@fortawesome/free-regular-svg-icons": "5.15.4", @@ -4362,8 +4362,9 @@ } }, "@phila/vue-datafetch": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/phila-vue-datafetch.git#a314a5b196c6961fcad782bc1eaed8bd0e5ef139", - "from": "@phila/vue-datafetch@git+https://github.com/CityOfPhiladelphia/phila-vue-datafetch.git#a314a5b", + "version": "2.2.18", + "resolved": "https://registry.npmjs.org/@phila/vue-datafetch/-/vue-datafetch-2.2.18.tgz", + "integrity": "sha512-y6SuRGF54u+fH4JtNsa8SPuZup8iSwFYImo+dyyYdJky/2IZNDNhxLWFwGUHldCIrFeDQFook5uZNUF278JMsw==", "requires": { "@turf/turf": "^6.5.0", "airtable": "^0.8.1", @@ -4378,9 +4379,9 @@ } }, "@phila/vue-mapping": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/@phila/vue-mapping/-/vue-mapping-3.1.20.tgz", - "integrity": "sha512-O8aW3xm88RvmAJMxC5UtDVAMJhafuKt0i3MBAZ+R7sfBke5Ljwj2vLxPzw+7JxwloG2+eVdeWFSfnQ6YLhdhbw==", + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/@phila/vue-mapping/-/vue-mapping-3.1.21.tgz", + "integrity": "sha512-k+pTNcmd27a/X+O5Ah9jhDsKLI3T4RhKGdSuuB00IlarJSf4nog/aU9ILC2KoWfMG8HwivJtNMBc90rtL0tAJg==", "requires": { "@fortawesome/fontawesome-svg-core": "1.2.36", "@fortawesome/free-regular-svg-icons": "5.15.4", @@ -4388,29 +4389,29 @@ "@fortawesome/vue-fontawesome": "2.0.5", "@mapbox/mapbox-gl-draw": "^1.2.0", "@turf/turf": "^6.5.0", - "Leaflet-PointInPolygon": "Leaflet-PointInPolygon@git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8", + "Leaflet-PointInPolygon": "git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8", "arcgis-to-geojson-utils": "^1.0.1", "axios": "^0.19.0", "blueimp-md5": "^2.19.0", "date-fns": "^2.29.2", "esri-leaflet": "3.0.2", - "esri-leaflet-legend": "esri-leaflet-legend@git+https://github.com/CityOfPhiladelphia/esri-leaflet-legend.git#8fc0a7949b1ce80340261167a1aa4302177bb380", + "esri-leaflet-legend": "git+https://github.com/CityOfPhiladelphia/esri-leaflet-legend.git#8fc0a7949b1ce80340261167a1aa4302177bb380", "esri-leaflet-renderers": "2.0.6", "leaflet": "1.7.1", "leaflet-easybutton": "^2.3.0", - "leaflet-measure": "leaflet-measure@git+https://github.com/CityOfPhiladelphia/leaflet-measure.git#1dd982b2f9c78be2af5f497d9415e66cd3df6216", - "leaflet-omnivore": "leaflet-omnivore@git+https://github.com/CityOfPhiladelphia/leaflet-omnivore.git#f072195b03f7930690d9cbccb9375f0eda50fd41", + "leaflet-measure": "git+https://github.com/CityOfPhiladelphia/leaflet-measure.git#1dd982b2f9c78be2af5f497d9415e66cd3df6216", + "leaflet-omnivore": "git+https://github.com/CityOfPhiladelphia/leaflet-omnivore.git#f072195b03f7930690d9cbccb9375f0eda50fd41", "leaflet-rotatedmarker": "^0.2.0", "leaflet-shape-markers": "^1.0.6", - "leaflet-vector-icon": "leaflet-vector-icon@git+https://github.com/CityOfPhiladelphia/leaflet-vector-icon.git#c37571e92c66ce0003f22058f2d246b31d3941a5", - "leaflet.pointinpolygon": "leaflet.pointinpolygon@git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8", + "leaflet-vector-icon": "git+https://github.com/CityOfPhiladelphia/leaflet-vector-icon.git#c37571e92c66ce0003f22058f2d246b31d3941a5", + "leaflet.pointinpolygon": "git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8", "lodash-es": "^4.17.14", "map-promisified": "^0.4.0", "maplibre-gl": "2.4.0", "maplibregl-mapbox-request-transformer": "0.0.2", "phila-standards": "^1.0.2", "proj4": "^2.8.0", - "sdleafletdraw": "sdleafletdraw@git+https://github.com/CityOfPhiladelphia/SDLeafletDraw.git#b829efb8979a942dec04e4a2849af6b06434c9cf", + "sdleafletdraw": "git+https://github.com/CityOfPhiladelphia/SDLeafletDraw.git#b829efb8979a942dec04e4a2849af6b06434c9cf", "vue": "^2.7.10", "vuex": "^3.5.1" } @@ -8240,8 +8241,8 @@ "dev": true }, "Leaflet-PointInPolygon": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8", - "from": "Leaflet-PointInPolygon@git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8" + "version": "git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8", + "from": "git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8" }, "abab": { "version": "1.0.4", @@ -11216,9 +11217,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.4.tgz", - "integrity": "sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.5.tgz", + "integrity": "sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==", "requires": { "regenerator-runtime": "^0.14.0" } @@ -12684,8 +12685,8 @@ } }, "esri-leaflet-legend": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/esri-leaflet-legend.git#8fc0a7949b1ce80340261167a1aa4302177bb380", - "from": "esri-leaflet-legend@git+https://github.com/CityOfPhiladelphia/esri-leaflet-legend.git#8fc0a7949b1ce80340261167a1aa4302177bb380", + "version": "git+https://github.com/CityOfPhiladelphia/esri-leaflet-legend.git#8fc0a7949b1ce80340261167a1aa4302177bb380", + "from": "git+https://github.com/CityOfPhiladelphia/esri-leaflet-legend.git#8fc0a7949b1ce80340261167a1aa4302177bb380", "requires": { "esri-leaflet": "^2.2.3", "leaflet": "^1.4.0" @@ -13199,8 +13200,8 @@ } }, "file-saver": { - "version": "git+ssh://git@github.com/eligrey/FileSaver.js.git#e865e37af9f9947ddcced76b549e27dc45c1cb2e", - "from": "file-saver@github:eligrey/FileSaver.js#1.3.8" + "version": "github:eligrey/FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e", + "from": "github:eligrey/FileSaver.js#1.3.8" }, "file-uri-to-path": { "version": "1.0.0", @@ -16055,7 +16056,7 @@ "integrity": "sha512-J9X76xnncMw+wIqb15HeWfPMqPwYxSpPY8yWPJ7rAZN/ZDzFkjCSZObryCyUe8zbrVRNiuCnIeQteCzMn7GnWw==", "requires": { "canvg": "1.5.3", - "file-saver": "file-saver@github:eligrey/FileSaver.js#1.3.8", + "file-saver": "github:eligrey/FileSaver.js#1.3.8", "html2canvas": "1.0.0-alpha.12", "omggif": "1.0.7", "promise-polyfill": "8.1.0", @@ -16063,9 +16064,9 @@ } }, "jspdf-autotable": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/jspdf-autotable/-/jspdf-autotable-3.7.1.tgz", - "integrity": "sha512-5fgjqE8nIwUoNz5l/i/aD/uONKofE4yp/kJ097EKBllPVTPGnGV5OWHld30db3+CvNrgzrRl8gmTnKF6vag05g==" + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/jspdf-autotable/-/jspdf-autotable-3.8.0.tgz", + "integrity": "sha512-qNPLTCaslDoTY/IF3+3hZ7ovD0uIX8PKq3urQUDyIYgccXBfRBSlSji2raV2Md3DMHcm9tPWWj+9tl83K1pBvQ==" }, "jsprim": { "version": "1.4.1", @@ -16190,8 +16191,8 @@ } }, "leaflet-measure": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/leaflet-measure.git#1dd982b2f9c78be2af5f497d9415e66cd3df6216", - "from": "leaflet-measure@git+https://github.com/CityOfPhiladelphia/leaflet-measure.git#1dd982b2f9c78be2af5f497d9415e66cd3df6216", + "version": "git+https://github.com/CityOfPhiladelphia/leaflet-measure.git#1dd982b2f9c78be2af5f497d9415e66cd3df6216", + "from": "git+https://github.com/CityOfPhiladelphia/leaflet-measure.git#1dd982b2f9c78be2af5f497d9415e66cd3df6216", "requires": { "@turf/area": "^5.1.5", "@turf/length": "^5.1.5", @@ -16256,8 +16257,8 @@ } }, "leaflet-omnivore": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/leaflet-omnivore.git#f072195b03f7930690d9cbccb9375f0eda50fd41", - "from": "leaflet-omnivore@git+https://github.com/CityOfPhiladelphia/leaflet-omnivore.git#f072195b03f7930690d9cbccb9375f0eda50fd41", + "version": "git+https://github.com/CityOfPhiladelphia/leaflet-omnivore.git#f072195b03f7930690d9cbccb9375f0eda50fd41", + "from": "git+https://github.com/CityOfPhiladelphia/leaflet-omnivore.git#f072195b03f7930690d9cbccb9375f0eda50fd41", "requires": { "brfs": "2.0.2", "corslite": "0.0.7", @@ -16321,12 +16322,12 @@ } }, "leaflet-vector-icon": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/leaflet-vector-icon.git#c37571e92c66ce0003f22058f2d246b31d3941a5", - "from": "leaflet-vector-icon@git+https://github.com/CityOfPhiladelphia/leaflet-vector-icon.git#c37571e92c66ce0003f22058f2d246b31d3941a5" + "version": "git+https://github.com/CityOfPhiladelphia/leaflet-vector-icon.git#c37571e92c66ce0003f22058f2d246b31d3941a5", + "from": "git+https://github.com/CityOfPhiladelphia/leaflet-vector-icon.git#c37571e92c66ce0003f22058f2d246b31d3941a5" }, "leaflet.pointinpolygon": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8", - "from": "leaflet.pointinpolygon@git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8" + "version": "git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8", + "from": "git+https://github.com/CityOfPhiladelphia/Leaflet.PointInPolygon.git#a0d410f69aacf5f9165c4d01ccffeed824ccaed8" }, "left-pad": { "version": "1.3.0", @@ -19857,8 +19858,8 @@ } }, "sdleafletdraw": { - "version": "git+ssh://git@github.com/CityOfPhiladelphia/SDLeafletDraw.git#b829efb8979a942dec04e4a2849af6b06434c9cf", - "from": "sdleafletdraw@git+https://github.com/CityOfPhiladelphia/SDLeafletDraw.git#b829efb8979a942dec04e4a2849af6b06434c9cf", + "version": "git+https://github.com/CityOfPhiladelphia/SDLeafletDraw.git#b829efb8979a942dec04e4a2849af6b06434c9cf", + "from": "git+https://github.com/CityOfPhiladelphia/SDLeafletDraw.git#b829efb8979a942dec04e4a2849af6b06434c9cf", "requires": { "leaflet": "1.7.1" } diff --git a/package.json b/package.json index 81c520e..21e2a8f 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "lintFix": "vue-cli-service lint --fix" }, "dependencies": { - "@phila/mapboard": "https://github.com/CityOfPhiladelphia/mapboard#b07f96e", + "@phila/mapboard": "https://github.com/CityOfPhiladelphia/mapboard#edac3fc110b03dda2ff1acfbe01bcd130d00fd9b", "accounting": "^0.4.1", "vue": "^2.7.10" }, diff --git a/src/topics/li.js b/src/topics/li.js index d964165..22271c2 100644 --- a/src/topics/li.js +++ b/src/topics/li.js @@ -186,69 +186,76 @@ export default { { label: 'Inspection Type', value: function(state, item){ - return item.buildingcerttype; + return item.certification; }, nullValue: 'no type available', }, { - label: 'Date Inspected', + label: 'Status', value: function(state, item){ - return item.inspectiondate; + return item.status; }, - nullValue: 'no date available', - transforms: [ - 'date', - ], - }, - { - label: 'Inspection Result', - value: function(state, item){ - return item.inspectionresult; - }, - }, - { - label: 'Expiration Date', - value: function(state, item){ - return item.expirationdate; - }, - nullValue: 'no date available', - transforms: [ - 'date', - ], + nullValue: 'no type available', }, + // { + // label: 'Date Inspected', + // value: function(state, item){ + // return item.inspectiondate; + // }, + // nullValue: 'no date available', + // transforms: [ + // 'date', + // ], + // }, + // { + // label: 'Inspection Result', + // value: function(state, item){ + // return item.inspectionresult; + // }, + // }, + // { + // label: 'Expiration Date', + // value: function(state, item){ + // return item.expirationdate; + // }, + // nullValue: 'no date available', + // transforms: [ + // 'date', + // ], + // }, ], - sort: { - // this should return the val to sort on - getValue: function(item) { - return item.buildingcerttype; - }, - // asc or desc - order: 'asc', - compare: function(a, b) { - // console.log('compare function, a:', a, 'b:', b); - let result; - let typeA = a.buildingcerttype; - let typeB = b.buildingcerttype; - let dateA = a.inspectiondate; - let dateB = b.inspectiondate; + // sort: { + // // this should return the val to sort on + // getValue: function(item) { + // return item.buildingcerttype; + // }, + // // asc or desc + // order: 'asc', + // compare: function(a, b) { + // // console.log('compare function, a:', a, 'b:', b); + // let result; + // let typeA = a.buildingcerttype; + // let typeB = b.buildingcerttype; + // let dateA = a.inspectiondate; + // let dateB = b.inspectiondate; - if (typeA < typeB) { - result = -1; - } else if (typeB < typeA) { - result = 1; - } else { - // result = 0; - if (dateA < dateB) { - result = 1; - } else if (dateB < dateA) { - result = -1; - } else { - result = 0; - } - } - return result; - }, - }, + // if (typeA < typeB) { + // result = -1; + // } else if (typeB < typeA) { + // result = 1; + // } else { + // // result = 0; + // if (dateA < dateB) { + // result = 1; + // } else if (dateB < dateA) { + // result = -1; + // } else { + // result = 0; + // } + // } + // return result; + // }, + // }, externalLink: { action: function(count, data) { // console.log('building certs count:', count, 'data:', data); @@ -268,13 +275,141 @@ export default { }, }, slots: { - title: 'Building Certifications', + title: 'Building Certification Status', items: function(state) { - var data = state.activeLiBuildingCert; - return data; + let fields = { + 'standpipe_status': 'Standpipe Certification', + 'damper_status': 'Damper Certification', + 'facade_status': 'Facade Report', + 'fire_alarm_status': 'Fire Alarm Certification', + 'fire_escape_status': 'Fire Escape Certification', + 'pier_status': 'Pier Certification', + 'private_bridge_status': 'Private Bridge Certification', + 'special_hazards_status': 'Special Hazards Certification', + 'emer_stdby_pwr_sys_status': 'Emergency Standby Power System Certification', + 'smoke_control_status': 'Smoke Control Certification', + 'sprinkler_status': 'Sprinkler Certification', + }; + let data = {}; + let reconfiguredData = []; + if (state.activeLiBuilding) { + data = state.activeLiBuilding; + for (let datum of Object.keys(data)) { + let item = { + certification: null, + status: null, + }; + if (Object.keys(fields).includes(datum) && data[datum] != null) { + item.certification = fields[datum]; + item.status = data[datum]; + // console.log('li.js building data item:', item); + reconfiguredData.push(item); + } + console.log('li.js building data:', data, 'item:', item); + } + } + return reconfiguredData; }, }, }, + // { + // type: 'horizontal-table', + // options: { + // id: 'liBuildingCerts', + // limit: 100, + // fields: [ + // { + // label: 'Inspection Type', + // value: function(state, item){ + // return item.buildingcerttype; + // }, + // nullValue: 'no type available', + // }, + // { + // label: 'Date Inspected', + // value: function(state, item){ + // return item.inspectiondate; + // }, + // nullValue: 'no date available', + // transforms: [ + // 'date', + // ], + // }, + // { + // label: 'Inspection Result', + // value: function(state, item){ + // return item.inspectionresult; + // }, + // }, + // { + // label: 'Expiration Date', + // value: function(state, item){ + // return item.expirationdate; + // }, + // nullValue: 'no date available', + // transforms: [ + // 'date', + // ], + // }, + // ], + // sort: { + // // this should return the val to sort on + // getValue: function(item) { + // return item.buildingcerttype; + // }, + // // asc or desc + // order: 'asc', + // compare: function(a, b) { + // // console.log('compare function, a:', a, 'b:', b); + // let result; + // let typeA = a.buildingcerttype; + // let typeB = b.buildingcerttype; + // let dateA = a.inspectiondate; + // let dateB = b.inspectiondate; + + // if (typeA < typeB) { + // result = -1; + // } else if (typeB < typeA) { + // result = 1; + // } else { + // // result = 0; + // if (dateA < dateB) { + // result = 1; + // } else if (dateB < dateA) { + // result = -1; + // } else { + // result = 0; + // } + // } + // return result; + // }, + // }, + // externalLink: { + // action: function(count, data) { + // // console.log('building certs count:', count, 'data:', data); + // return 'See all ' + data + ' building certifications for this property at L&I Property History'; + // }, + // data: function(state) { + // // console.log('external link data state.sources.liBuildingCerts.data.length:', state.sources.liBuildingCerts.data.length); + // return state.sources.liBuildingCerts.data.length; + // }, + // forceShow: true, + // name: 'L&I Property History', + // href: function(state) { + // var address = state.geocode.data.properties.street_address; + // var addressEncoded = encodeURIComponent(address); + // return 'https://li.phila.gov/Property-History/search?address=' + addressEncoded; + // }, + // }, + // }, + // slots: { + // title: 'Building Certifications', + // items: function(state) { + // var data = state.activeLiBuildingCert; + // return data; + // }, + // }, + // }, ], }, // end parcel tab options slots: {