feat: initial commit - Band Management application

This commit is contained in:
2026-01-06 03:11:46 +01:00
commit 34e12e00b3
24543 changed files with 3991790 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
export const $api = $fetch.create({
// Request interceptor
async onRequest({ options }) {
// Set baseUrl for all API calls
options.baseURL = useRuntimeConfig().public.apiBaseUrl || '/api'
const accessToken = useCookie('accessToken').value
if (accessToken) {
options.headers = {
...options.headers,
Authorization: `Bearer ${accessToken}`,
}
}
},
})

View File

@@ -0,0 +1 @@
export const COOKIE_MAX_AGE_1_YEAR = 365 * 24 * 60 * 60

View File

@@ -0,0 +1,6 @@
export const paginationMeta = (options, total) => {
const start = (options.page - 1) * options.itemsPerPage + 1
const end = Math.min(options.page * options.itemsPerPage, total)
return `Showing ${total === 0 ? 0 : start} to ${end} of ${total} entries`
}