Cost units can be edited

This commit is contained in:
2026-02-08 20:06:38 +01:00
parent 6fc65e195c
commit bccfc11687
53 changed files with 2021 additions and 29 deletions

View File

@@ -4,6 +4,7 @@ export function useAjax() {
const loading = ref(false)
const error = ref(null)
const data = ref(null)
const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content')
async function request(url, options = {}) {
loading.value = true
@@ -15,6 +16,7 @@ export function useAjax() {
method: options.method || "GET",
headers: {
"Content-Type": "application/json",
'X-CSRF-TOKEN': csrfToken,
...(options.headers || {}),
},
body: options.body ? JSON.stringify(options.body) : null,