diff --git a/frontend/src/components/AssetRelationships.vue b/frontend/src/components/AssetRelationships.vue
index e82146a..12a0b00 100644
--- a/frontend/src/components/AssetRelationships.vue
+++ b/frontend/src/components/AssetRelationships.vue
@@ -1,686 +1,688 @@
-
-
-
-
-
Loading relationships...
-
-
- No relationships defined.
-
-
-
-
-
-
Outgoing
-
-
-
-
-
- {{ rel.targetasset?.name || rel.targetasset?.assetnumber || 'Unknown' }}
-
-
- {{ rel.relationshiptypename }}
- {{ rel.targetasset?.assettype }}
-
-
{{ rel.notes }}
-
-
-
-
-
-
-
-
-
Incoming
-
-
-
-
-
- {{ rel.sourceasset?.name || rel.sourceasset?.assetnumber || 'Unknown' }}
-
-
- {{ rel.relationshiptypename }}
- {{ rel.sourceasset?.assettype }}
-
-
{{ rel.notes }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
Loading relationships...
+
+
+ No relationships defined.
+
+
+
+
+
+
Outgoing
+
+
+
+
+
+ {{ rel.targetasset?.name || rel.targetasset?.assetnumber || 'Unknown' }}
+
+
+ {{ rel.relationshiptypename }}
+ {{ rel.targetasset?.assettype }}
+
+
{{ rel.notes }}
+
+
+
+
+
+
+
+
+
Incoming
+
+
+
+
+
+ {{ rel.sourceasset?.name || rel.sourceasset?.assetnumber || 'Unknown' }}
+
+
+ {{ rel.relationshiptypename }}
+ {{ rel.sourceasset?.assettype }}
+
+
{{ rel.notes }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/components/ToastHost.vue b/frontend/src/components/ToastHost.vue
new file mode 100644
index 0000000..74b0661
--- /dev/null
+++ b/frontend/src/components/ToastHost.vue
@@ -0,0 +1,75 @@
+
+
+
+
+ {{ t.message }}
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/composables/toast.js b/frontend/src/composables/toast.js
new file mode 100644
index 0000000..6ff949e
--- /dev/null
+++ b/frontend/src/composables/toast.js
@@ -0,0 +1,35 @@
+// Global toast notifications. Import useToast() anywhere and call
+// toast.success('...') / toast.error('...') / toast.info('...'). A single
+// mounted in AppLayout renders the stack.
+import { reactive } from 'vue'
+
+const state = reactive({
+ items: [],
+})
+
+let nextId = 1
+
+function dismiss(id) {
+ const index = state.items.findIndex(t => t.id === id)
+ if (index !== -1) state.items.splice(index, 1)
+}
+
+function push(message, type = 'info', duration = 5000) {
+ if (!message) return
+ const id = nextId++
+ state.items.push({ id, message, type })
+ if (duration > 0) {
+ setTimeout(() => dismiss(id), duration)
+ }
+ return id
+}
+
+export function useToast() {
+ return {
+ items: state.items,
+ dismiss,
+ success: (message, duration) => push(message, 'success', duration),
+ error: (message, duration) => push(message, 'error', duration ?? 8000),
+ info: (message, duration) => push(message, 'info', duration),
+ }
+}
diff --git a/frontend/src/views/AppLayout.vue b/frontend/src/views/AppLayout.vue
index 83bf707..37ed1bc 100644
--- a/frontend/src/views/AppLayout.vue
+++ b/frontend/src/views/AppLayout.vue
@@ -69,12 +69,14 @@
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ asset.name || asset.assetnumber }}
+
+ {{ asset.assettype }}
+
+
+
+
+
+
+ No assets found.
+
+
+
+
+
+
+
+
+
+ Select an asset from the list to place it on the map
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/MapView.vue b/frontend/src/views/MapView.vue
index 08b1338..fd2f139 100644
--- a/frontend/src/views/MapView.vue
+++ b/frontend/src/views/MapView.vue
@@ -1,388 +1,390 @@
-
-
-
-
-
Loading...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ filteredAssets.length }} assets
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
Loading...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ filteredAssets.length }} assets
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/employees/EmployeeDetail.vue b/frontend/src/views/employees/EmployeeDetail.vue
index 272dd9f..b380e6c 100644
--- a/frontend/src/views/employees/EmployeeDetail.vue
+++ b/frontend/src/views/employees/EmployeeDetail.vue
@@ -1,320 +1,322 @@
-
-
-
Loading...
-
{{ error }}
-
-
-
-
-
![]()
-
-
- {{ initials }}
-
-
-
{{ fullName }}
-
- SSO: {{ employee.SSO }}
- {{ employee.Team }}
-
-
-
Role: {{ employee.Role }}
-
-
- Back to Dashboard
-
-
-
-
-
-
-
- Recognitions
- {{ recognitions.length }}
-
-
Loading...
-
- No recognitions yet.
-
-
-
-
-
{{ rec.notification }}
-
-
-
-
-
-
-
-
-
Checked Out USB Devices
-
Loading...
-
- No USB devices currently checked out.
-
-
-
-
-
- | Device |
- Serial Number |
- Checked Out |
- Purpose |
- Actions |
-
-
-
-
- |
-
- {{ device.displayname }}
-
- |
- {{ device.serialnumber }} |
- {{ formatDate(device.checkoutdate) }} |
- {{ device.checkoutpurpose || '-' }} |
-
-
- |
-
-
-
-
-
-
-
-
-
USB Checkout History
-
Loading...
-
- No checkout history.
-
-
-
-
-
- | Device |
- Checked Out |
- Checked In |
- Purpose |
-
-
-
-
- |
-
- {{ record.devicename || `Device #${record.usbdeviceid}` }}
-
- |
- {{ formatDate(record.checkoutdate) }} |
- {{ record.checkindate ? formatDate(record.checkindate) : 'Still out' }} |
- {{ record.purpose || '-' }} |
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
Loading...
+
{{ error }}
+
+
+
+
+
![]()
+
+
+ {{ initials }}
+
+
+
{{ fullName }}
+
+ SSO: {{ employee.SSO }}
+ {{ employee.Team }}
+
+
+
Role: {{ employee.Role }}
+
+
+ Back to Dashboard
+
+
+
+
+
+
+
+ Recognitions
+ {{ recognitions.length }}
+
+
Loading...
+
+ No recognitions yet.
+
+
+
+
+
{{ rec.notification }}
+
+
+
+
+
+
+
+
+
Checked Out USB Devices
+
Loading...
+
+ No USB devices currently checked out.
+
+
+
+
+
+ | Device |
+ Serial Number |
+ Checked Out |
+ Purpose |
+ Actions |
+
+
+
+
+ |
+
+ {{ device.displayname }}
+
+ |
+ {{ device.serialnumber }} |
+ {{ formatDate(device.checkoutdate) }} |
+ {{ device.checkoutpurpose || '-' }} |
+
+
+ |
+
+
+
+
+
+
+
+
+
USB Checkout History
+
Loading...
+
+ No checkout history.
+
+
+
+
+
+ | Device |
+ Checked Out |
+ Checked In |
+ Purpose |
+
+
+
+
+ |
+
+ {{ record.devicename || `Device #${record.usbdeviceid}` }}
+
+ |
+ {{ formatDate(record.checkoutdate) }} |
+ {{ record.checkindate ? formatDate(record.checkindate) : 'Still out' }} |
+ {{ record.purpose || '-' }} |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/network/NetworkDeviceDetail.vue b/frontend/src/views/network/NetworkDeviceDetail.vue
index 7f78140..2cab592 100644
--- a/frontend/src/views/network/NetworkDeviceDetail.vue
+++ b/frontend/src/views/network/NetworkDeviceDetail.vue
@@ -1,369 +1,371 @@
-
-
-
-
-
-
-
{{ device.networkdevice?.hostname || device.name || device.assetnumber }}
-
- Edit
-
-
-
-
- {{ device.statusname || 'Unknown' }}
-
-
- {{ device.networkdevice.networkdevicetypename }}
-
-
- {{ device.networkdevice.vendorname }}
-
-
-
-
- Asset #
- {{ device.assetnumber }}
-
-
- Serial
- {{ device.serialnumber }}
-
-
- Location
- {{ device.locationname }}
-
-
- Business Unit
- {{ device.businessunitname }}
-
-
-
- PoE
- Managed
- {{ device.networkdevice.portcount }} Ports
-
-
-
-
-
-
-
-
-
Network Information
-
-
- Hostname
- {{ device.networkdevice?.hostname || '-' }}
-
-
- Firmware Version
- {{ device.networkdevice?.firmwareversion || '-' }}
-
-
- Port Count
- {{ device.networkdevice?.portcount || '-' }}
-
-
- Rack Unit
- {{ device.networkdevice?.rackunit || '-' }}
-
-
- PoE Capable
- {{ device.networkdevice?.ispoe ? 'Yes' : 'No' }}
-
-
- Managed Device
- {{ device.networkdevice?.ismanaged ? 'Yes' : 'No' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
Notes
-
{{ device.notes }}
-
-
-
-
-
-
-
Asset Information
-
-
- Asset Number
- {{ device.assetnumber }}
-
-
- Name
- {{ device.name || '-' }}
-
-
- Serial Number
- {{ device.serialnumber || '-' }}
-
-
- Gauge Lab Reference
- {{ device.gaugelabreference }}
-
-
- Maintenance Reference
- {{ device.maintenancereference }}
-
-
- Vendor
- {{ device.networkdevice?.vendorname || '-' }}
-
-
- Device Type
- {{ device.networkdevice?.networkdevicetypename || '-' }}
-
-
- Status
-
-
- {{ device.statusname || 'Unknown' }}
-
-
-
-
-
-
-
-
-
-
-
-
Record Info
-
-
- Created
- {{ formatDate(device.datecreated) }}
-
-
- Last Modified
- {{ formatDate(device.datemodified) }}
-
-
-
-
-
-
-
-
-
- Edit Device
-
-
-
-
-
-
-
-
-
Device not found
-
Back to Network Devices
-
-
-
-
-
-
+
+
+
+
+
+
+
{{ device.networkdevice?.hostname || device.name || device.assetnumber }}
+
+ Edit
+
+
+
+
+ {{ device.statusname || 'Unknown' }}
+
+
+ {{ device.networkdevice.networkdevicetypename }}
+
+
+ {{ device.networkdevice.vendorname }}
+
+
+
+
+ Asset #
+ {{ device.assetnumber }}
+
+
+ Serial
+ {{ device.serialnumber }}
+
+
+ Location
+ {{ device.locationname }}
+
+
+ Business Unit
+ {{ device.businessunitname }}
+
+
+
+ PoE
+ Managed
+ {{ device.networkdevice.portcount }} Ports
+
+
+
+
+
+
+
+
+
Network Information
+
+
+ Hostname
+ {{ device.networkdevice?.hostname || '-' }}
+
+
+ Firmware Version
+ {{ device.networkdevice?.firmwareversion || '-' }}
+
+
+ Port Count
+ {{ device.networkdevice?.portcount || '-' }}
+
+
+ Rack Unit
+ {{ device.networkdevice?.rackunit || '-' }}
+
+
+ PoE Capable
+ {{ device.networkdevice?.ispoe ? 'Yes' : 'No' }}
+
+
+ Managed Device
+ {{ device.networkdevice?.ismanaged ? 'Yes' : 'No' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
Notes
+
{{ device.notes }}
+
+
+
+
+
+
+
Asset Information
+
+
+ Asset Number
+ {{ device.assetnumber }}
+
+
+ Name
+ {{ device.name || '-' }}
+
+
+ Serial Number
+ {{ device.serialnumber || '-' }}
+
+
+ Gauge Lab Reference
+ {{ device.gaugelabreference }}
+
+
+ Maintenance Reference
+ {{ device.maintenancereference }}
+
+
+ Vendor
+ {{ device.networkdevice?.vendorname || '-' }}
+
+
+ Device Type
+ {{ device.networkdevice?.networkdevicetypename || '-' }}
+
+
+ Status
+
+
+ {{ device.statusname || 'Unknown' }}
+
+
+
+
+
+
+
+
+
+
+
+
Record Info
+
+
+ Created
+ {{ formatDate(device.datecreated) }}
+
+
+ Last Modified
+ {{ formatDate(device.datemodified) }}
+
+
+
+
+
+
+
+
+
+ Edit Device
+
+
+
+
+
+
+
+
+
Device not found
+
Back to Network Devices
+
+
+
+
+
+
diff --git a/frontend/src/views/settings/BusinessUnitsList.vue b/frontend/src/views/settings/BusinessUnitsList.vue
index b409dac..5f374e0 100644
--- a/frontend/src/views/settings/BusinessUnitsList.vue
+++ b/frontend/src/views/settings/BusinessUnitsList.vue
@@ -1,187 +1,189 @@
-
-
-
-
-
-
Loading...
-
-
-
-
-
-
- | Business Unit |
- Code |
- Description |
- Actions |
-
-
-
-
- | {{ bu.businessunit }} |
- {{ bu.code || '-' }} |
- {{ bu.description || '-' }} |
-
-
-
- |
-
-
- |
- No business units found
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Are you sure you want to delete {{ toDelete?.businessunit }}?
-
-
-
-
-
-
-
-
+
+
+
+
+
+
Loading...
+
+
+
+
+
+
+ | Business Unit |
+ Code |
+ Description |
+ Actions |
+
+
+
+
+ | {{ bu.businessunit }} |
+ {{ bu.code || '-' }} |
+ {{ bu.description || '-' }} |
+
+
+
+ |
+
+
+ |
+ No business units found
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Are you sure you want to delete {{ toDelete?.businessunit }}?
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/settings/CustomFieldsList.vue b/frontend/src/views/settings/CustomFieldsList.vue
index 232cc6e..bc994be 100644
--- a/frontend/src/views/settings/CustomFieldsList.vue
+++ b/frontend/src/views/settings/CustomFieldsList.vue
@@ -114,6 +114,8 @@
diff --git a/frontend/src/views/settings/DashboardDefaultsList.vue b/frontend/src/views/settings/DashboardDefaultsList.vue
index beb46cb..7b0653b 100644
--- a/frontend/src/views/settings/DashboardDefaultsList.vue
+++ b/frontend/src/views/settings/DashboardDefaultsList.vue
@@ -104,6 +104,8 @@
diff --git a/frontend/src/views/settings/EquipmentTypesList.vue b/frontend/src/views/settings/EquipmentTypesList.vue
index d8c586b..6b4d2eb 100644
--- a/frontend/src/views/settings/EquipmentTypesList.vue
+++ b/frontend/src/views/settings/EquipmentTypesList.vue
@@ -76,6 +76,8 @@ import { ref, computed, onMounted } from 'vue'
import { equipmentApi } from '../../api'
import ColorSwatchPicker from '@/components/ColorSwatchPicker.vue'
import { colorStyle } from '@/utils/colorStyle'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const items = ref([])
const showInactive = ref(false)
@@ -136,7 +138,7 @@ async function deleteType(t) {
await equipmentApi.types.remove(t.equipmenttypeid)
loadData()
} catch (err) {
- alert(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
+ toast.error(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
}
}
diff --git a/frontend/src/views/settings/LocationTypesList.vue b/frontend/src/views/settings/LocationTypesList.vue
index a9bc00a..616b262 100644
--- a/frontend/src/views/settings/LocationTypesList.vue
+++ b/frontend/src/views/settings/LocationTypesList.vue
@@ -76,6 +76,8 @@ import { ref, computed, onMounted } from 'vue'
import { locationsApi } from '../../api'
import ColorSwatchPicker from '@/components/ColorSwatchPicker.vue'
import { colorStyle } from '@/utils/colorStyle'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const items = ref([])
const showInactive = ref(false)
@@ -136,7 +138,7 @@ async function deleteType(t) {
await locationsApi.types.remove(t.locationtypeid)
loadData()
} catch (err) {
- alert(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
+ toast.error(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
}
}
diff --git a/frontend/src/views/settings/LocationsList.vue b/frontend/src/views/settings/LocationsList.vue
index 0f55f45..2ac8a98 100644
--- a/frontend/src/views/settings/LocationsList.vue
+++ b/frontend/src/views/settings/LocationsList.vue
@@ -1,385 +1,387 @@
-
-
-
-
-
-
-
-
-
-
-
Loading...
-
-
-
-
-
-
- | Location Name |
- Type |
- Building |
- Floor |
- Room |
- Description |
- Actions |
-
-
-
-
- | {{ loc.locationname }} |
- {{ loc.locationtypename || '-' }} |
- {{ loc.building || '-' }} |
- {{ loc.floor || '-' }} |
- {{ loc.room || '-' }} |
- {{ loc.description || '-' }} |
-
-
-
- |
-
-
- |
- No locations found
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Are you sure you want to delete {{ locationToDelete?.locationname }}?
-
- This may affect machines assigned to this location.
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
+
+
+
+ | Location Name |
+ Type |
+ Building |
+ Floor |
+ Room |
+ Description |
+ Actions |
+
+
+
+
+ | {{ loc.locationname }} |
+ {{ loc.locationtypename || '-' }} |
+ {{ loc.building || '-' }} |
+ {{ loc.floor || '-' }} |
+ {{ loc.room || '-' }} |
+ {{ loc.description || '-' }} |
+
+
+
+ |
+
+
+ |
+ No locations found
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Are you sure you want to delete {{ locationToDelete?.locationname }}?
+
+ This may affect machines assigned to this location.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/settings/MachineTypesList.vue b/frontend/src/views/settings/MachineTypesList.vue
index c79858c..16ca6b5 100644
--- a/frontend/src/views/settings/MachineTypesList.vue
+++ b/frontend/src/views/settings/MachineTypesList.vue
@@ -145,6 +145,8 @@
import { ref, onMounted } from 'vue'
import { machinetypesApi } from '../../api'
import PaginationBar from '../../components/PaginationBar.vue'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const machineTypes = ref([])
const loading = ref(true)
@@ -256,7 +258,7 @@ async function deleteType() {
loadTypes()
} catch (err) {
console.error('Error deleting machine type:', err)
- alert('Failed to delete machine type')
+ toast.error('Failed to delete machine type')
}
}
diff --git a/frontend/src/views/settings/ModelsList.vue b/frontend/src/views/settings/ModelsList.vue
index 4a8f1f6..3b03107 100644
--- a/frontend/src/views/settings/ModelsList.vue
+++ b/frontend/src/views/settings/ModelsList.vue
@@ -1,368 +1,370 @@
-
-
-
-
-
-
-
-
-
-
-
-
Loading...
-
-
-
-
-
-
- | Model |
- Vendor |
- Type |
- Documentation |
- Actions |
-
-
-
-
- |
- {{ m.modelnumber }}
- {{ m.description }}
- |
- {{ m.vendor || '-' }} |
- {{ m.machinetype || '-' }} |
-
-
- View Docs
-
- -
- |
-
-
-
- |
-
-
- |
- No models found
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Are you sure you want to delete {{ modelToDelete?.modelnumber }}?
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
+
+
+
+ | Model |
+ Vendor |
+ Type |
+ Documentation |
+ Actions |
+
+
+
+
+ |
+ {{ m.modelnumber }}
+ {{ m.description }}
+ |
+ {{ m.vendor || '-' }} |
+ {{ m.machinetype || '-' }} |
+
+
+ View Docs
+
+ -
+ |
+
+
+
+ |
+
+
+ |
+ No models found
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Are you sure you want to delete {{ modelToDelete?.modelnumber }}?
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/settings/NetworkTypesList.vue b/frontend/src/views/settings/NetworkTypesList.vue
index f05a9aa..e67ffbe 100644
--- a/frontend/src/views/settings/NetworkTypesList.vue
+++ b/frontend/src/views/settings/NetworkTypesList.vue
@@ -76,6 +76,8 @@ import { ref, computed, onMounted } from 'vue'
import { networkApi } from '../../api'
import ColorSwatchPicker from '@/components/ColorSwatchPicker.vue'
import { colorStyle } from '@/utils/colorStyle'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const items = ref([])
const showInactive = ref(false)
@@ -136,7 +138,7 @@ async function deleteType(t) {
await networkApi.types.remove(t.networkdevicetypeid)
loadData()
} catch (err) {
- alert(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
+ toast.error(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
}
}
diff --git a/frontend/src/views/settings/OperatingSystemsList.vue b/frontend/src/views/settings/OperatingSystemsList.vue
index aeb2bad..4d07911 100644
--- a/frontend/src/views/settings/OperatingSystemsList.vue
+++ b/frontend/src/views/settings/OperatingSystemsList.vue
@@ -1,224 +1,226 @@
-
-
-
-
-
-
Loading...
-
-
-
-
-
-
- | OS Name |
- Version |
- Architecture |
- End of Life |
- Actions |
-
-
-
-
- | {{ os.osname }} |
- {{ os.osversion || '-' }} |
- {{ os.architecture || '-' }} |
-
-
- {{ os.endoflife }}
-
- -
- |
-
-
-
- |
-
-
- |
- No operating systems found
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Are you sure you want to delete {{ toDelete?.osname }}?
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
Loading...
+
+
+
+
+
+
+ | OS Name |
+ Version |
+ Architecture |
+ End of Life |
+ Actions |
+
+
+
+
+ | {{ os.osname }} |
+ {{ os.osversion || '-' }} |
+ {{ os.architecture || '-' }} |
+
+
+ {{ os.endoflife }}
+
+ -
+ |
+
+
+
+ |
+
+
+ |
+ No operating systems found
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Are you sure you want to delete {{ toDelete?.osname }}?
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/settings/PCTypesList.vue b/frontend/src/views/settings/PCTypesList.vue
index 6ceb82f..61e2871 100644
--- a/frontend/src/views/settings/PCTypesList.vue
+++ b/frontend/src/views/settings/PCTypesList.vue
@@ -86,6 +86,8 @@ import { ref, computed, onMounted } from 'vue'
import { computersApi } from '../../api'
import ColorSwatchPicker from '@/components/ColorSwatchPicker.vue'
import { colorStyle } from '@/utils/colorStyle'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const pcTypes = ref([])
const showInactive = ref(false)
@@ -130,7 +132,7 @@ async function deleteType(pt) {
await computersApi.types.remove(pt.computertypeid)
loadData()
} catch (err) {
- alert(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
+ toast.error(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
}
}
diff --git a/frontend/src/views/settings/PrinterDriversList.vue b/frontend/src/views/settings/PrinterDriversList.vue
index ab20aff..3eb5b52 100644
--- a/frontend/src/views/settings/PrinterDriversList.vue
+++ b/frontend/src/views/settings/PrinterDriversList.vue
@@ -97,6 +97,8 @@
diff --git a/frontend/src/views/settings/PrinterTypesList.vue b/frontend/src/views/settings/PrinterTypesList.vue
index 0c172a8..ef05974 100644
--- a/frontend/src/views/settings/PrinterTypesList.vue
+++ b/frontend/src/views/settings/PrinterTypesList.vue
@@ -76,6 +76,8 @@ import { ref, computed, onMounted } from 'vue'
import { printersApi } from '../../api'
import ColorSwatchPicker from '@/components/ColorSwatchPicker.vue'
import { colorStyle } from '@/utils/colorStyle'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const items = ref([])
const showInactive = ref(false)
@@ -136,7 +138,7 @@ async function deleteType(t) {
await printersApi.types.remove(t.printertypeid)
loadData()
} catch (err) {
- alert(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
+ toast.error(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
}
}
diff --git a/frontend/src/views/settings/RelationshipTypesList.vue b/frontend/src/views/settings/RelationshipTypesList.vue
index 1c28062..8a79490 100644
--- a/frontend/src/views/settings/RelationshipTypesList.vue
+++ b/frontend/src/views/settings/RelationshipTypesList.vue
@@ -76,6 +76,8 @@ import { ref, computed, onMounted } from 'vue'
import { relationshipTypesApi } from '../../api'
import ColorSwatchPicker from '@/components/ColorSwatchPicker.vue'
import { colorStyle } from '@/utils/colorStyle'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const items = ref([])
const showInactive = ref(false)
@@ -136,7 +138,7 @@ async function deleteType(t) {
await relationshipTypesApi.remove(t.relationshiptypeid)
loadData()
} catch (err) {
- alert(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
+ toast.error(err.response?.data?.error?.message || err.response?.data?.message || 'Failed to delete')
}
}
diff --git a/frontend/src/views/settings/StatusesList.vue b/frontend/src/views/settings/StatusesList.vue
index 7af9ffa..e1a9129 100644
--- a/frontend/src/views/settings/StatusesList.vue
+++ b/frontend/src/views/settings/StatusesList.vue
@@ -1,315 +1,317 @@
-
-
-
-
-
-
Loading...
-
-
-
-
-
-
- | Status |
- Color |
- Description |
- Actions |
-
-
-
-
- |
-
- {{ s.status }}
-
- |
-
-
- {{ s.color || 'default' }}
- |
- {{ s.description || '-' }} |
-
-
-
- |
-
-
- |
- No statuses found
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Are you sure you want to delete {{ statusToDelete?.status }}?
-
- Cannot delete if assets are using this status.
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
Loading...
+
+
+
+
+
+
+ | Status |
+ Color |
+ Description |
+ Actions |
+
+
+
+
+ |
+
+ {{ s.status }}
+
+ |
+
+
+ {{ s.color || 'default' }}
+ |
+ {{ s.description || '-' }} |
+
+
+
+ |
+
+
+ |
+ No statuses found
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Are you sure you want to delete {{ statusToDelete?.status }}?
+
+ Cannot delete if assets are using this status.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/settings/SubnetsList.vue b/frontend/src/views/settings/SubnetsList.vue
index 6c092bc..0304314 100644
--- a/frontend/src/views/settings/SubnetsList.vue
+++ b/frontend/src/views/settings/SubnetsList.vue
@@ -1,564 +1,566 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
Loading...
-
-
-
-
-
-
- | CIDR |
- Name |
- VLAN |
- Gateway |
- DHCP |
- Location |
- Actions |
-
-
-
-
- | {{ subnet.cidr }} |
- {{ subnet.name }} |
-
-
- VLAN {{ subnet.vlannumber }} - {{ subnet.vlanname }}
-
- -
- |
- {{ subnet.gatewayip || '-' }} |
-
-
- {{ subnet.dhcpenabled ? 'Enabled' : 'Disabled' }}
-
- |
- {{ subnet.locationname || '-' }} |
-
-
-
- |
-
-
- |
- No subnets found
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Are you sure you want to delete subnet {{ subnetToDelete?.cidr }}?
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
+
+
+
+ | CIDR |
+ Name |
+ VLAN |
+ Gateway |
+ DHCP |
+ Location |
+ Actions |
+
+
+
+
+ | {{ subnet.cidr }} |
+ {{ subnet.name }} |
+
+
+ VLAN {{ subnet.vlannumber }} - {{ subnet.vlanname }}
+
+ -
+ |
+ {{ subnet.gatewayip || '-' }} |
+
+
+ {{ subnet.dhcpenabled ? 'Enabled' : 'Disabled' }}
+
+ |
+ {{ subnet.locationname || '-' }} |
+
+
+
+ |
+
+
+ |
+ No subnets found
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Are you sure you want to delete subnet {{ subnetToDelete?.cidr }}?
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/settings/VLANsList.vue b/frontend/src/views/settings/VLANsList.vue
index a8a9952..4f423ae 100644
--- a/frontend/src/views/settings/VLANsList.vue
+++ b/frontend/src/views/settings/VLANsList.vue
@@ -1,374 +1,376 @@
-
-
-
-
-
-
-
-
-
-
-
-
Loading...
-
-
-
-
-
-
- | VLAN # |
- Name |
- Type |
- Description |
- Subnets |
- Actions |
-
-
-
-
- | {{ vlan.vlannumber }} |
- {{ vlan.name }} |
-
-
- {{ vlan.vlantype }}
-
- -
- |
- {{ vlan.description || '-' }} |
-
-
- View Subnets
-
- |
-
-
-
- |
-
-
- |
- No VLANs found
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Are you sure you want to delete VLAN {{ vlanToDelete?.vlannumber }} ({{ vlanToDelete?.name }})?
-
- VLANs with associated subnets cannot be deleted.
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
+
+
+
+ | VLAN # |
+ Name |
+ Type |
+ Description |
+ Subnets |
+ Actions |
+
+
+
+
+ | {{ vlan.vlannumber }} |
+ {{ vlan.name }} |
+
+
+ {{ vlan.vlantype }}
+
+ -
+ |
+ {{ vlan.description || '-' }} |
+
+
+ View Subnets
+
+ |
+
+
+
+ |
+
+
+ |
+ No VLANs found
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Are you sure you want to delete VLAN {{ vlanToDelete?.vlannumber }} ({{ vlanToDelete?.name }})?
+
+ VLANs with associated subnets cannot be deleted.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/usb/USBDetail.vue b/frontend/src/views/usb/USBDetail.vue
index 209111c..7a848f3 100644
--- a/frontend/src/views/usb/USBDetail.vue
+++ b/frontend/src/views/usb/USBDetail.vue
@@ -168,6 +168,8 @@ import { ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { usbApi } from '../../api'
import Modal from '../../components/Modal.vue'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const route = useRoute()
@@ -217,7 +219,7 @@ async function doCheckout() {
await loadDevice()
} catch (error) {
console.error('Checkout error:', error)
- alert(error.response?.data?.message || 'Checkout failed')
+ toast.error(error.response?.data?.message || 'Checkout failed')
}
}
@@ -228,7 +230,7 @@ async function doCheckin() {
await loadDevice()
} catch (error) {
console.error('Checkin error:', error)
- alert(error.response?.data?.message || 'Check in failed')
+ toast.error(error.response?.data?.message || 'Check in failed')
}
}
diff --git a/frontend/src/views/usb/USBList.vue b/frontend/src/views/usb/USBList.vue
index 0c9abda..c6aa94a 100644
--- a/frontend/src/views/usb/USBList.vue
+++ b/frontend/src/views/usb/USBList.vue
@@ -147,6 +147,8 @@ import { usbApi } from '../../api'
import Modal from '../../components/Modal.vue'
import EmployeeSearch from '../../components/EmployeeSearch.vue'
import PaginationBar from '../../components/PaginationBar.vue'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const devices = ref([])
const loading = ref(true)
@@ -241,7 +243,7 @@ async function doCheckout() {
loadDevices()
} catch (error) {
console.error('Checkout error:', error)
- alert(error.response?.data?.message || 'Checkout failed')
+ toast.error(error.response?.data?.message || 'Checkout failed')
}
}
@@ -252,7 +254,7 @@ async function doCheckin() {
loadDevices()
} catch (error) {
console.error('Checkin error:', error)
- alert(error.response?.data?.message || 'Check in failed')
+ toast.error(error.response?.data?.message || 'Check in failed')
}
}
diff --git a/frontend/src/views/vendors/VendorsList.vue b/frontend/src/views/vendors/VendorsList.vue
index d1df70c..6f63483 100644
--- a/frontend/src/views/vendors/VendorsList.vue
+++ b/frontend/src/views/vendors/VendorsList.vue
@@ -186,6 +186,8 @@
import { ref, onMounted } from 'vue'
import { vendorsApi } from '../../api'
import PaginationBar from '../../components/PaginationBar.vue'
+import { useToast } from '../../composables/toast'
+const toast = useToast()
const vendors = ref([])
const loading = ref(true)
@@ -321,7 +323,7 @@ async function deleteVendor() {
loadVendors()
} catch (err) {
console.error('Error deleting vendor:', err)
- alert('Failed to delete vendor')
+ toast.error('Failed to delete vendor')
}
}
diff --git a/frontend/src/views/warranty/WarrantiesList.vue b/frontend/src/views/warranty/WarrantiesList.vue
index aa064b0..faccf36 100644
--- a/frontend/src/views/warranty/WarrantiesList.vue
+++ b/frontend/src/views/warranty/WarrantiesList.vue
@@ -5,6 +5,7 @@
+