refactor: align codebase with EventCrew domain and trim legacy band stack

- Update API: events, users, policies, routes, resources, migrations
- Remove deprecated models/resources (customers, setlists, invitations, etc.)
- Refresh admin app and docs; remove apps/band

Made-with: Cursor
This commit is contained in:
2026-03-29 23:19:06 +02:00
parent 34e12e00b3
commit 1cb7674d52
1034 changed files with 7453 additions and 8743 deletions

View File

@@ -0,0 +1,54 @@
<script setup lang="ts">
import { useGenerateImageVariant } from '@core/composable/useGenerateImageVariant'
import misc404 from '@images/pages/404.png'
import miscMaskDark from '@images/pages/misc-mask-dark.png'
import miscMaskLight from '@images/pages/misc-mask-light.png'
const authThemeMask = useGenerateImageVariant(miscMaskLight, miscMaskDark)
definePage({
alias: '/pages/misc/not-found/:error(.*)',
meta: {
layout: 'blank',
public: true,
},
})
</script>
<template>
<div class="misc-wrapper">
<ErrorHeader
status-code="404"
title="Page Not Found ⚠️"
description="We couldn't find the page you are looking for."
/>
<VBtn
to="/"
class="mb-11"
>
Back to Home
</VBtn>
<!-- 👉 Image -->
<div class="misc-avatar w-100 text-center">
<VImg
:src="misc404"
alt="error 404"
:max-height="$vuetify.display.smAndDown ? 350 : 500"
class="mx-auto"
/>
</div>
<img
class="misc-footer-img d-none d-md-block"
:src="authThemeMask"
alt="misc-footer-img"
height="320"
>
</div>
</template>
<style lang="scss">
@use "@core/scss/template/pages/misc.scss";
</style>

View File

@@ -0,0 +1,99 @@
<script setup lang="ts">
import { useEvents } from '@/composables/useEvents'
import { useRoute } from 'vue-router'
const route = useRoute()
const { currentEvent, fetchEvent, isLoading } = useEvents()
const eventId = computed(() => route.params.id as string)
watch(() => eventId.value, async () => {
if (eventId.value) {
await fetchEvent(eventId.value)
}
}, { immediate: true })
function getStatusColor(status: string): string {
const colors: Record<string, string> = {
draft: 'secondary',
published: 'info',
registration_open: 'success',
buildup: 'warning',
showday: 'primary',
teardown: 'warning',
closed: 'secondary',
}
return colors[status] || 'secondary'
}
function formatStatusLabel(status: string): string {
return status.replaceAll('_', ' ')
}
</script>
<template>
<div>
<VCard v-if="currentEvent">
<VCardTitle class="d-flex align-center gap-2">
<RouterLink
:to="{ name: 'events' }"
class="text-decoration-none"
>
<VIcon icon="tabler-arrow-left" />
</RouterLink>
<span class="text-h5">{{ currentEvent.name }}</span>
<VChip
:color="getStatusColor(currentEvent.status)"
size="small"
>
{{ formatStatusLabel(currentEvent.status) }}
</VChip>
</VCardTitle>
<VDivider />
<VCardText>
<div class="mb-4">
<div class="text-body-2 text-medium-emphasis mb-1">
Dates
</div>
<div class="text-body-1">
{{ new Date(currentEvent.start_date).toLocaleDateString() }}
{{ new Date(currentEvent.end_date).toLocaleDateString() }}
</div>
</div>
<div class="mb-4">
<div class="text-body-2 text-medium-emphasis mb-1">
Timezone
</div>
<div class="text-body-1">
{{ currentEvent.timezone }}
</div>
</div>
<div
v-if="currentEvent.organisation"
class="mb-4"
>
<div class="text-body-2 text-medium-emphasis mb-1">
Organisation
</div>
<div class="text-body-1">
{{ currentEvent.organisation.name }}
</div>
</div>
</VCardText>
</VCard>
<VCard v-else-if="isLoading">
<VCardText class="text-center py-12">
<VProgressCircular
indeterminate
color="primary"
/>
</VCardText>
</VCard>
</div>
</template>

View File

@@ -0,0 +1,158 @@
<script setup lang="ts">
import { useEvents } from '@/composables/useEvents'
const { events, pagination, organisationId, isLoading, error, fetchEvents } = useEvents()
const page = ref(1)
const itemsPerPage = ref(10)
watch([page, itemsPerPage, organisationId], () => {
if (!organisationId.value) {
return
}
fetchEvents({
page: page.value,
per_page: itemsPerPage.value,
})
}, { immediate: true })
function getStatusColor(status: string): string {
const colors: Record<string, string> = {
draft: 'secondary',
published: 'info',
registration_open: 'success',
buildup: 'warning',
showday: 'primary',
teardown: 'warning',
closed: 'secondary',
}
return colors[status] || 'secondary'
}
function formatStatusLabel(status: string): string {
return status.replaceAll('_', ' ')
}
</script>
<template>
<div>
<VAlert
v-if="!organisationId"
type="warning"
class="mb-4"
>
You need to belong to an organisation to see events. Ask an administrator to invite you.
</VAlert>
<VCard>
<VCardTitle>
<h4 class="text-h4 mb-1">
Events
</h4>
<p class="text-body-2 text-medium-emphasis">
Events for your organisation
</p>
</VCardTitle>
<VDivider />
<div
v-if="isLoading"
class="d-flex justify-center align-center py-12"
>
<VProgressCircular
indeterminate
color="primary"
/>
</div>
<VAlert
v-else-if="error"
type="error"
class="ma-4"
>
{{ error.message }}
</VAlert>
<div
v-else-if="events.length > 0"
class="pa-4"
>
<VRow>
<VCol
v-for="event in events"
:key="event.id"
cols="12"
md="6"
lg="4"
>
<VCard>
<VCardTitle>
<RouterLink
:to="{ name: 'events-view-id', params: { id: event.id } }"
class="text-decoration-none text-high-emphasis"
>
{{ event.name }}
</RouterLink>
</VCardTitle>
<VCardText>
<div class="mb-2">
<VChip
:color="getStatusColor(event.status)"
size="small"
class="mr-2"
>
{{ formatStatusLabel(event.status) }}
</VChip>
</div>
<div class="text-body-2">
{{ new Date(event.start_date).toLocaleDateString() }}
{{ new Date(event.end_date).toLocaleDateString() }}
</div>
<div class="text-body-2 text-medium-emphasis">
{{ event.timezone }}
</div>
</VCardText>
<VCardActions>
<VBtn
:to="{ name: 'events-view-id', params: { id: event.id } }"
variant="text"
>
View details
</VBtn>
</VCardActions>
</VCard>
</VCol>
</VRow>
<div
v-if="pagination && pagination.last_page > 1"
class="d-flex justify-center mt-4"
>
<VPagination
v-model="page"
:length="pagination.last_page"
:total-visible="7"
/>
</div>
</div>
<VCardText
v-else
class="text-center py-12"
>
<VIcon
icon="tabler-calendar-off"
size="64"
class="text-medium-emphasis mb-4"
/>
<p class="text-h6 text-medium-emphasis">
No events yet
</p>
</VCardText>
</VCard>
</div>
</template>

View File

@@ -0,0 +1,25 @@
<template>
<div>
<VCard
class="mb-6"
title="Kick start your project 🚀"
>
<VCardText>All the best for your new project.</VCardText>
<VCardText>
Please make sure to read our <a
href="https://demos.pixinvent.com/vuexy-vuejs-admin-template/documentation/"
target="_blank"
rel="noopener noreferrer"
class="text-decoration-none"
>
Template Documentation
</a> to understand where to go from here and how to use our template.
</VCardText>
</VCard>
<VCard title="Want to integrate JWT? 🔒">
<VCardText>We carefully crafted JWT flow so you can implement JWT with ease and with minimum efforts.</VCardText>
<VCardText>Please read our JWT Documentation to get more out of JWT authentication.</VCardText>
</VCard>
</div>
</template>

View File

@@ -0,0 +1,269 @@
<script setup lang="ts">
import { VForm } from 'vuetify/components/VForm'
import AuthProvider from '@/views/pages/authentication/AuthProvider.vue'
import { useGenerateImageVariant } from '@core/composable/useGenerateImageVariant'
import authV2LoginIllustrationBorderedDark from '@images/pages/auth-v2-login-illustration-bordered-dark.png'
import authV2LoginIllustrationBorderedLight from '@images/pages/auth-v2-login-illustration-bordered-light.png'
import authV2LoginIllustrationDark from '@images/pages/auth-v2-login-illustration-dark.png'
import authV2LoginIllustrationLight from '@images/pages/auth-v2-login-illustration-light.png'
import authV2MaskDark from '@images/pages/misc-mask-dark.png'
import authV2MaskLight from '@images/pages/misc-mask-light.png'
import { VNodeRenderer } from '@layouts/components/VNodeRenderer'
import { themeConfig } from '@themeConfig'
import { apiClient } from '@/lib/api-client'
import { emailValidator, requiredValidator } from '@core/utils/validators'
definePage({
meta: {
layout: 'blank',
public: true,
},
})
const route = useRoute()
const router = useRouter()
const form = ref({
email: '',
password: '',
remember: false,
})
const isPasswordVisible = ref(false)
const isLoading = ref(false)
const errors = ref<Record<string, string>>({})
const refVForm = ref<VForm>()
const authThemeImg = useGenerateImageVariant(
authV2LoginIllustrationLight,
authV2LoginIllustrationDark,
authV2LoginIllustrationBorderedLight,
authV2LoginIllustrationBorderedDark,
true)
const authThemeMask = useGenerateImageVariant(authV2MaskLight, authV2MaskDark)
async function handleLogin() {
errors.value = {}
isLoading.value = true
try {
const { data } = await apiClient.post('/auth/login', {
email: form.value.email,
password: form.value.password,
})
if (data.success && data.data) {
// Store token in cookie (api-client reads from accessToken cookie)
document.cookie = `accessToken=${data.data.token}; path=/`
// Store user data in cookie if needed
if (data.data.user) {
document.cookie = `userData=${JSON.stringify(data.data.user)}; path=/`
}
// Redirect to home or the 'to' query parameter
await nextTick(() => {
const redirectTo = route.query.to ? String(route.query.to) : '/'
router.replace(redirectTo)
})
}
} catch (err: any) {
console.error('Login error:', err)
// Handle API errors
if (err.response?.data) {
const errorData = err.response.data
if (errorData.errors) {
// Validation errors
errors.value = {
email: errorData.errors.email?.[0],
password: errorData.errors.password?.[0],
}
} else if (errorData.message) {
// General error message
errors.value = {
email: errorData.message,
}
} else {
errors.value = {
email: 'Invalid email or password',
}
}
} else {
errors.value = {
email: 'An error occurred. Please try again.',
}
}
} finally {
isLoading.value = false
}
}
function onSubmit() {
refVForm.value?.validate()
.then(({ valid: isValid }) => {
if (isValid) {
handleLogin()
}
})
}
</script>
<template>
<a href="javascript:void(0)">
<div class="auth-logo d-flex align-center gap-x-3">
<VNodeRenderer :nodes="themeConfig.app.logo" />
<h1 class="auth-title">
{{ themeConfig.app.title }}
</h1>
</div>
</a>
<VRow
no-gutters
class="auth-wrapper bg-surface"
>
<VCol
md="8"
class="d-none d-md-flex"
>
<div class="position-relative bg-background w-100 me-0">
<div
class="d-flex align-center justify-center w-100 h-100"
style="padding-inline: 6.25rem;"
>
<VImg
max-width="613"
:src="authThemeImg"
class="auth-illustration mt-16 mb-2"
/>
</div>
<img
class="auth-footer-mask flip-in-rtl"
:src="authThemeMask"
alt="auth-footer-mask"
height="280"
width="100"
>
</div>
</VCol>
<VCol
cols="12"
md="4"
class="auth-card-v2 d-flex align-center justify-center"
>
<VCard
flat
:max-width="500"
class="mt-12 mt-sm-0 pa-6"
>
<VCardText>
<h4 class="text-h4 mb-1">
Welcome to <span class="text-capitalize">{{ themeConfig.app.title }}</span>! 👋🏻
</h4>
<p class="mb-0">
Please sign-in to your account and start the adventure
</p>
</VCardText>
<VCardText>
<VForm
ref="refVForm"
@submit.prevent="onSubmit"
>
<VRow>
<!-- email -->
<VCol cols="12">
<AppTextField
v-model="form.email"
autofocus
label="Email"
type="email"
placeholder="johndoe@email.com"
:rules="[requiredValidator, emailValidator]"
:error-messages="errors.email"
/>
</VCol>
<!-- password -->
<VCol cols="12">
<AppTextField
v-model="form.password"
label="Password"
placeholder="············"
:type="isPasswordVisible ? 'text' : 'password'"
autocomplete="password"
:rules="[requiredValidator]"
:error-messages="errors.password"
:append-inner-icon="isPasswordVisible ? 'tabler-eye-off' : 'tabler-eye'"
@click:append-inner="isPasswordVisible = !isPasswordVisible"
/>
<div class="d-flex align-center flex-wrap justify-space-between my-6">
<VCheckbox
v-model="form.remember"
label="Remember me"
/>
<a
class="text-primary"
href="javascript:void(0)"
>
Forgot Password?
</a>
</div>
<VBtn
block
type="submit"
:loading="isLoading"
>
Login
</VBtn>
</VCol>
<!-- create account -->
<VCol
cols="12"
class="text-body-1 text-center"
>
<span class="d-inline-block">
New on our platform?
</span>
<a
class="text-primary ms-1 d-inline-block text-body-1"
href="javascript:void(0)"
>
Create an account
</a>
</VCol>
<VCol
cols="12"
class="d-flex align-center"
>
<VDivider />
<span class="mx-4">or</span>
<VDivider />
</VCol>
<!-- auth providers -->
<VCol
cols="12"
class="text-center"
>
<AuthProvider />
</VCol>
</VRow>
</VForm>
</VCardText>
</VCard>
</VCol>
</VRow>
</template>
<style lang="scss">
@use "@core/scss/template/pages/page-auth";
</style>