Add gauge lab + maintenance asset references with enable/disable toggles

Dedicated assets.gaugelabreference and assets.maintenancereference columns
(distinct from assetnumber), surfaced on equipment. Add global per-identifier
enable/disable settings (gauge/maintenance/FQDN) read via a shared composable
and toggled in System Settings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-06-26 08:35:03 -04:00
parent f1b3b65532
commit 4626280dc4
5 changed files with 172 additions and 1 deletions

View File

@@ -375,6 +375,60 @@
</router-link>
</div>
</div>
<!-- Asset Identifiers Section -->
<div class="section-card">
<h2 class="section-title">Asset Identifiers</h2>
<div class="setting-group">
<p class="setting-description">
Enable or disable optional asset identifiers. When disabled, the identifier
is hidden from asset forms and detail pages across the system.
</p>
<div class="setting-row">
<label class="toggle-label">
<span>Gauge Lab Reference</span>
<button
class="toggle-btn"
:class="{ active: settings.identifier_gaugelabreference_enabled }"
@click="toggleSetting('identifier_gaugelabreference_enabled')"
:disabled="saving"
>
<span class="toggle-slider"></span>
</button>
</label>
</div>
<div class="setting-row">
<label class="toggle-label">
<span>Maintenance Reference</span>
<button
class="toggle-btn"
:class="{ active: settings.identifier_maintenancereference_enabled }"
@click="toggleSetting('identifier_maintenancereference_enabled')"
:disabled="saving"
>
<span class="toggle-slider"></span>
</button>
</label>
</div>
<div class="setting-row">
<label class="toggle-label">
<span>FQDN / Hostname</span>
<button
class="toggle-btn"
:class="{ active: settings.identifier_fqdn_enabled }"
@click="toggleSetting('identifier_fqdn_enabled')"
:disabled="saving"
>
<span class="toggle-slider"></span>
</button>
</label>
</div>
</div>
</div>
</div>
<div v-if="error" class="error-message">{{ error }}</div>
@@ -409,7 +463,11 @@ const settings = reactive({
saml_acs_url: '',
saml_allow_local_login: true,
saml_auto_create_users: true,
saml_admin_group: ''
saml_admin_group: '',
// Asset identifiers
identifier_gaugelabreference_enabled: true,
identifier_maintenancereference_enabled: true,
identifier_fqdn_enabled: true
})
const loading = ref(true)