Editable Entra ids, machine maintenance and printer capabilities

This commit is contained in:
2026-09-02 07:53:37 -04:00
parent a0ba4dfc6a
commit 19cf25fb24
3 changed files with 120 additions and 2 deletions

View File

@@ -223,6 +223,28 @@
</div>
</div>
<!-- Capabilities. On the detail page since they were added but never
editable, so a wrong one needed database access to correct.
Nothing writes these automatically - the collector reports queues
and supplies, not capabilities - so a person is the only source. -->
<div class="form-group">
<label>Capabilities</label>
<div class="capability-list">
<label class="capability-item">
<input type="checkbox" v-model="form.iscolor" />
<span>Colour</span>
</label>
<label class="capability-item">
<input type="checkbox" v-model="form.isduplex" />
<span>Duplex</span>
</label>
<label class="capability-item">
<input type="checkbox" v-model="form.isnetwork" />
<span>Network</span>
</label>
</div>
</div>
<div class="form-group">
<label for="installpath">Driver Install Path</label>
<input
@@ -361,7 +383,12 @@ const form = ref({
ipaddress: '',
csfname: '',
installpath: '',
pin: ''
pin: '',
iscolor: false,
isduplex: false,
// true to match the create default in the API; most printers here are
// networked and a new record that claimed otherwise would be wrong.
isnetwork: true
})
const printerTypes = ref([])
@@ -559,6 +586,9 @@ onMounted(async () => {
modelnumberid: ext.modelnumberid || '',
locationid: printer.locationid || '',
notes: printer.notes || '',
iscolor: !!printer.printer?.iscolor,
isduplex: !!printer.printer?.isduplex,
isnetwork: printer.printer?.isnetwork !== false,
mapx: printer.mapx ?? null,
mapy: printer.mapy ?? null,
levelid: printer.levelid ?? null,
@@ -652,6 +682,9 @@ async function savePrinter() {
installpath: form.value.installpath || null,
pin: form.value.pin || null,
ipaddress: form.value.ipaddress || null,
iscolor: !!form.value.iscolor,
isduplex: !!form.value.isduplex,
isnetwork: !!form.value.isnetwork,
mapx: form.value.mapx,
mapy: form.value.mapy
}
@@ -688,6 +721,9 @@ async function savePrinter() {
</script>
<style scoped>
.capability-list { display: flex; flex-wrap: wrap; gap: 1rem; }
.capability-item { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: normal; }
.map-location-control {
display: flex;
align-items: center;