dashboard employee names + GE monogram fallback + kiosk startup sweep

This commit is contained in:
2026-07-28 18:24:19 -04:00
parent 3ed3857d4f
commit cf7b8bc49a
4 changed files with 63 additions and 25 deletions

View File

@@ -14,7 +14,7 @@
<div class="header-right">
<div class="clock">{{ currentTime }}</div>
<select v-model="businessUnit" class="filter-select" @change="loadData">
<option value="">All Business Units</option>
<option value="">All Locations</option>
<option v-for="bu in businessUnits" :key="bu.businessunitid" :value="bu.businessunitid">
{{ bu.businessunit }}
</option>
@@ -55,8 +55,8 @@
/>
<img
v-else
:src="siteLogo"
alt="Site logo"
:src="employeePhotoFallback"
alt="No photo"
class="recognition-photo ge-logo-fallback"
/>
</div>
@@ -99,8 +99,8 @@
/>
<img
v-else
:src="siteLogo"
alt="Site logo"
:src="employeePhotoFallback"
alt="No photo"
class="recert-photo ge-logo-fallback"
/>
<div class="recert-name">{{ rec.employeename || rec.employeesso }}</div>
@@ -193,6 +193,10 @@ import { withBase } from '@/utils/basePath'
const loading = ref(true)
const facilityName = ref('ShopDB')
const siteLogo = ref(withBase('/ge-aerospace-logo.svg'))
// Employee photo placeholder: the shipped GE monogram (square avatar). Kept
// separate from siteLogo so a blank/broken site_logo setting never leaves an
// employee tile with no image.
const employeePhotoFallback = ref(withBase('/ge-monogram.svg'))
// ServiceNow ticket-link config; loaded on mount. Empty/disabled = plain text.
const servicenowConfig = ref({ enabled: true, incidentUrl: '', changeUrl: '' })
const businessUnit = ref('')
@@ -436,7 +440,11 @@ function getTicketUrl(ticketnumber) {
}
function handlePhotoError(e) {
e.target.src = siteLogo.value
// Photo URL 404'd (e.g. no photo file for this SSO): fall back to the GE
// monogram. Guard against a loop if the fallback itself fails to load.
if (e.target.dataset.fellback) { return }
e.target.dataset.fellback = '1'
e.target.src = employeePhotoFallback.value
e.target.classList.add('ge-logo-fallback')
}
</script>