diff --git a/src/components/Common/TagInput.vue b/src/components/Common/TagInput.vue
new file mode 100644
index 0000000..1d176c8
--- /dev/null
+++ b/src/components/Common/TagInput.vue
@@ -0,0 +1,89 @@
+
+
+
diff --git a/src/components/Eventyay/EventyayEventCheckIn.vue b/src/components/Eventyay/EventyayEventCheckIn.vue
new file mode 100644
index 0000000..3a9a3db
--- /dev/null
+++ b/src/components/Eventyay/EventyayEventCheckIn.vue
@@ -0,0 +1,153 @@
+
+
+
diff --git a/src/components/Eventyay/EventyayEvents.vue b/src/components/Eventyay/EventyayEvents.vue
new file mode 100644
index 0000000..c9a1c00
--- /dev/null
+++ b/src/components/Eventyay/EventyayEvents.vue
@@ -0,0 +1,136 @@
+
+
+
diff --git a/src/components/Eventyay/EventyayLeedLogin.vue b/src/components/Eventyay/EventyayLeedLogin.vue
new file mode 100644
index 0000000..c093893
--- /dev/null
+++ b/src/components/Eventyay/EventyayLeedLogin.vue
@@ -0,0 +1,70 @@
+
+
+
diff --git a/src/components/Eventyay/EventyaySearchCheckIn.vue b/src/components/Eventyay/EventyaySearchCheckIn.vue
new file mode 100644
index 0000000..5e8b99f
--- /dev/null
+++ b/src/components/Eventyay/EventyaySearchCheckIn.vue
@@ -0,0 +1,121 @@
+
+
diff --git a/src/components/Eventyay/LeadScanning.vue b/src/components/Eventyay/LeadScanning.vue
new file mode 100644
index 0000000..2fba854
--- /dev/null
+++ b/src/components/Eventyay/LeadScanning.vue
@@ -0,0 +1,163 @@
+
+
+
diff --git a/src/components/LoginForm.vue b/src/components/LoginForm.vue
index 2a30444..32b0d08 100644
--- a/src/components/LoginForm.vue
+++ b/src/components/LoginForm.vue
@@ -4,21 +4,36 @@ import { useRouter } from 'vue-router'
import { useLoadingStore } from '@/stores/loading'
import { useAuthStore } from '@/stores/auth'
import { useUserStore } from '@/stores/user'
+import { useEventyayApi } from '@/stores/eventyayapi'
import StandardButton from '@/components/Common/StandardButton.vue'
// stores
const loadingStore = useLoadingStore()
const authStore = useAuthStore()
const userStore = useUserStore()
+const processApi = useEventyayApi()
const email = ref('')
const password = ref('')
+const server = ref('')
const showError = ref(false)
-
+const showServerError = ref(false)
+const errmessage = ref('')
+const DEFAULT_SERVER_VALUE = 'Select a Server'
// router
const router = useRouter()
async function submitLogin() {
+ if (server.value === '' || server.value === DEFAULT_SERVER_VALUE) {
+ showServerError.value = true
+ return
+ }
+ if (server.value === 'Eventyay') {
+ errmessage.value = 'Please Register a Device for Eventyay'
+ showServerError.value = true
+ return
+ }
+ showServerError.value = false
loadingStore.contentLoading()
showError.value = false
@@ -42,6 +57,28 @@ async function submitLogin() {
loadingStore.contentLoaded()
}
+function registerDevice() {
+ if (server.value === '' || server.value === 'Select a Server') {
+ errmessage.value = 'Please select a server first'
+ showServerError.value = true
+ return
+ }
+ if (server.value === 'Open-Event') {
+ errmessage.value = 'Please Login with credentials for Open-Event'
+ showServerError.value = true
+ return
+ }
+ showServerError.value = false
+ router.push({
+ name: 'device'
+ })
+}
+
+function handleRoleSelection(role) {
+ processApi.setRole(role)
+ registerDevice() // Store the selected role in the store
+}
+
onMounted(() => {
if (authStore.isAuthenticated) {
router.push({
@@ -56,58 +93,44 @@ onMounted(() => {
diff --git a/src/components/Registration/Device/Device.vue b/src/components/Registration/Device/Device.vue
new file mode 100644
index 0000000..f8b6da0
--- /dev/null
+++ b/src/components/Registration/Device/Device.vue
@@ -0,0 +1,30 @@
+
+
+
diff --git a/src/components/Utilities/QRCamera.vue b/src/components/Utilities/QRCamera.vue
index bbd1348..11dd544 100644
--- a/src/components/Utilities/QRCamera.vue
+++ b/src/components/Utilities/QRCamera.vue
@@ -1,15 +1,25 @@
+
{
import.meta.env.MODE === 'production'
? import.meta.env.VITE_PROD_API_URL
: import.meta.env.VITE_TEST_API_URL
-
+
let instance = mande(apiUrl)
function setToken() {
diff --git a/src/stores/attendees.js b/src/stores/attendees.js
index 3b89e3f..f021885 100644
--- a/src/stores/attendees.js
+++ b/src/stores/attendees.js
@@ -24,7 +24,10 @@ export const useAttendeesStore = defineStore('attendees', () => {
route += `email=${value}`
}
try {
- const res = await apiStore.get(true, `events/${eventId}/attendees/search?sort=firstname&${route}`)
+ const res = await apiStore.get(
+ true,
+ `events/${eventId}/attendees/search?sort=firstname&${route}`
+ )
attendees.value = res.attendees.map((attendee) => ({
id: attendee.id,
name: attendee.firstname + ' ' + attendee.lastname,
diff --git a/src/stores/eventyayEvent.js b/src/stores/eventyayEvent.js
new file mode 100644
index 0000000..445a2fc
--- /dev/null
+++ b/src/stores/eventyayEvent.js
@@ -0,0 +1,27 @@
+import { mande } from 'mande'
+import { defineStore } from 'pinia'
+import { ref } from 'vue'
+
+export const useEventyayEventStore = defineStore('eventyayEvent', () => {
+ const events = ref([])
+ const error = ref(null)
+
+ async function fetchEvents(url, apiToken, organizer) {
+ error.value = null
+
+ try {
+ const api = mande(url, { headers: { authorization: `Device ${apiToken}` } })
+ const response = await api.get(`/api/v1/organizers/${organizer}/events/`)
+ events.value = response.results
+ console.log(response)
+ } catch (err) {
+ error.value = err.message
+ }
+ }
+
+ return {
+ events,
+ error,
+ fetchEvents
+ }
+})
diff --git a/src/stores/eventyayapi.js b/src/stores/eventyayapi.js
new file mode 100644
index 0000000..35b4204
--- /dev/null
+++ b/src/stores/eventyayapi.js
@@ -0,0 +1,74 @@
+import { defineStore } from 'pinia'
+import { ref } from 'vue'
+
+export const useEventyayApi = defineStore(
+ 'processApi',
+ () => {
+ const apitoken = ref('')
+ const url = ref('')
+ const organizer = ref('')
+ const eventSlug = ref('')
+ const eventname = ref('')
+ const exikey = ref('')
+ const selectedRole = ref('')
+ const exhiname = ref('')
+ const boothname = ref('')
+ const boothid = ref('')
+
+ function $reset() {
+ apitoken.value = ''
+ url.value = ''
+ organizer.value = ''
+ eventSlug.value = ''
+ eventname.value = ''
+ exikey.value = ''
+ selectedRole.value = ''
+ exhiname.value = ''
+ boothname.value = ''
+ boothid.value = ''
+ }
+
+ function setApiCred(newToken, newUrl, newOrg) {
+ apitoken.value = newToken
+ url.value = newUrl
+ organizer.value = newOrg
+ }
+
+ function setEvent(slug, name) {
+ eventSlug.value = slug
+ eventname.value = name
+ }
+
+ function setExhibitor(key, name, booth, bid) {
+ exikey.value = key
+ exhiname.value = name
+ boothname.value = booth
+ boothid.value = bid
+ }
+
+ function setRole(role) {
+ selectedRole.value = role
+ }
+
+ return {
+ $reset,
+ setApiCred,
+ setEvent,
+ setExhibitor,
+ selectedRole,
+ setRole,
+ apitoken,
+ url,
+ organizer,
+ eventSlug,
+ eventname,
+ exikey,
+ exhiname,
+ boothname,
+ boothid
+ }
+ },
+ {
+ persist: true
+ }
+)
diff --git a/src/stores/leadscan.js b/src/stores/leadscan.js
new file mode 100644
index 0000000..8e5eb92
--- /dev/null
+++ b/src/stores/leadscan.js
@@ -0,0 +1,184 @@
+import { useCameraStore } from '@/stores/camera'
+import { useEventyayApi } from '@/stores/eventyayapi'
+
+import { mande } from 'mande'
+import { defineStore } from 'pinia'
+import { ref } from 'vue'
+
+export const useLeadScanStore = defineStore('processLeadScan', () => {
+ const cameraStore = useCameraStore()
+ const message = ref('')
+ const showSuccess = ref(false)
+ const showError = ref(false)
+ const currentLeadId = ref('')
+
+ function $reset() {
+ message.value = ''
+ showSuccess.value = false
+ showError.value = false
+ }
+
+ function showErrorMsg(msg) {
+ message.value = msg
+ showSuccess.value = false
+ showError.value = true
+ }
+
+ function showSuccessMsg(msg) {
+ message.value = msg
+ showSuccess.value = true
+ showError.value = false
+ }
+
+ async function scanLead() {
+ const qrData = JSON.parse(cameraStore.qrCodeValue)
+ const processApi = useEventyayApi()
+ const { apitoken, url, organizer, eventSlug, exikey, exhiname, boothid, boothname } = processApi
+ const requestBody = {
+ lead: qrData.lead,
+ scanned: 'null',
+ scan_type: 'lead',
+ device_name: 'Test'
+ }
+
+ try {
+ const headers = {
+ Authorization: `Device ${apitoken}`,
+ Accept: 'application/json',
+ Exhibitor: exikey
+ }
+
+ const api = mande(`${url}/api/v1/event/${organizer}/${eventSlug}/exhibitors/lead/create`, {
+ headers: headers
+ })
+
+ const response = await api.post(requestBody)
+ console.log('here', response)
+
+ if (response.success) {
+ showSuccessMsg({
+ message: 'Lead Scanned Successfully!',
+ attendee: response.attendee
+ })
+ currentLeadId.value = qrData.lead
+ }
+ } catch (err) {
+ console.log('Error details:', err.body)
+
+ if (err.response && err.response.status === 409) {
+ showErrorMsg({
+ message: err.body.error || 'Lead Already Scanned!',
+ attendee: err.body.attendee
+ })
+ currentLeadId.value = qrData.lead
+ } else {
+ showErrorMsg({
+ message: 'Check-in failed: ' + (err.body?.error || err.message || 'Unknown error'),
+ attendee: null
+ })
+ }
+ }
+ }
+
+ function downloadCSV(leads) {
+ console.log('Downloading CSV')
+ const csvData = convertToCSV(leads)
+ const blob = new Blob([csvData], { type: 'text/csv;charset=utf-8;' })
+ const url = URL.createObjectURL(blob)
+ const link = document.createElement('a')
+ link.setAttribute('href', url)
+ link.setAttribute('download', `leads-${new Date().toISOString().split('T')[0]}.csv`)
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
+ URL.revokeObjectURL(url) // Clean up the URL object
+ }
+
+ function convertToCSV(leads) {
+ console.log('Converting to CSV')
+ const formatDate = (date) => new Date(date).toISOString().split('T')[0]
+ const formatTime = (date) => new Date(date).toISOString().split('T')[1].split('.')[0]
+ const headers = [
+ 'ID',
+ 'Exhibitor',
+ 'Pseudonymization ID',
+ 'Scanned Date',
+ 'Scan Time',
+ 'Scan Type',
+ 'Device Name',
+ 'Booth ID',
+ 'Booth Name',
+ 'Attendee Name',
+ 'Email',
+ 'Note',
+ 'Tags'
+ ]
+
+ // Convert leads to rows
+ const rows = leads.map((lead) => [
+ lead.id,
+ lead.exhibitor_name,
+ lead.pseudonymization_id,
+ formatDate(lead.scanned),
+ formatTime(lead.scanned),
+ lead.scan_type,
+ lead.device_name,
+ lead.booth_id,
+ lead.booth_name,
+ lead.attendee.name,
+ lead.attendee.email || '',
+ lead.attendee.note || '',
+ lead.attendee.tags.join('; ')
+ ])
+
+ // Combine headers and rows
+ const csvContent = [
+ headers.join(','),
+ ...rows.map((row) =>
+ row
+ .map((cell) => {
+ // Escape commas and quotes in cell content
+ const cellContent = String(cell).replace(/"/g, '""')
+ return cellContent.includes(',') ? `"${cellContent}"` : cellContent
+ })
+ .join(',')
+ )
+ ].join('\n')
+
+ // Add BOM for Excel UTF-8 compatibility
+ return '\uFEFF' + csvContent
+ }
+
+ async function exportLeads() {
+ console.log('Exporting leads')
+ const processApi = useEventyayApi()
+ const { apitoken, url, organizer, eventSlug, exikey } = processApi
+
+ try {
+ const headers = {
+ Authorization: `Device ${apitoken}`,
+ Accept: 'application/json',
+ Exhibitor: exikey
+ }
+ const api = mande(`${url}/api/v1/event/${organizer}/${eventSlug}/exhibitors/lead/retrieve`, {
+ headers: headers
+ })
+ const response = await api.get()
+ if (response.success) {
+ downloadCSV(response.leads)
+ }
+ } catch (error) {
+ console.error('Failed to fetch tags:', error)
+ }
+ }
+
+ return {
+ message,
+ showSuccess,
+ showError,
+ currentLeadId,
+ scanLead,
+ exportLeads,
+ $reset
+ }
+})
diff --git a/src/stores/leedauth.js b/src/stores/leedauth.js
new file mode 100644
index 0000000..cb3df39
--- /dev/null
+++ b/src/stores/leedauth.js
@@ -0,0 +1,37 @@
+import { useEventyayApi } from '@/stores/eventyayapi'
+import { mande } from 'mande'
+import { defineStore } from 'pinia'
+
+export const useleedauth = defineStore('leedauth', () => {
+ const processApi = useEventyayApi()
+ const { apitoken, url, organizer, eventSlug } = processApi
+
+ async function leedlogin(payload) {
+ try {
+ const headers = {
+ Authorization: `Device ${apitoken}`,
+ Accept: 'application/json'
+ }
+ const api = mande(url, { headers: headers })
+ const response = await api.post(
+ `/api/v1/event/${organizer}/${eventSlug}/exhibitors/auth`,
+ payload
+ )
+ console.log(response)
+ if (response.success) {
+ processApi.setExhibitor(
+ payload.key,
+ response.exhibitor_name,
+ response.booth_name,
+ response.booth_id
+ )
+ }
+
+ return response
+ } catch (error) {
+ console.log('error')
+ }
+ }
+
+ return { leedlogin }
+})
diff --git a/src/stores/processDevice.js b/src/stores/processDevice.js
new file mode 100644
index 0000000..5746df7
--- /dev/null
+++ b/src/stores/processDevice.js
@@ -0,0 +1,95 @@
+import { useApiStore } from '@/stores/api'
+import { useCameraStore } from '@/stores/camera'
+import { useEventyayApi } from '@/stores/eventyayapi'
+
+import { mande } from 'mande'
+import { defineStore } from 'pinia'
+import { computed, ref } from 'vue'
+import { useRouter } from 'vue-router'
+
+export const useProcessDeviceStore = defineStore('processDevice', () => {
+ const router = useRouter()
+ const cameraStore = useCameraStore()
+ const apiStore = useApiStore()
+ const processApi = useEventyayApi()
+
+ const message = ref('')
+ const showSuccess = ref(false)
+ const showError = ref(false)
+
+ function $reset() {
+ message.value = ''
+ showSuccess.value = false
+ showError.value = false
+ }
+
+ const response = computed(() => {
+ let classType = ''
+ if (showSuccess.value) {
+ classType = 'text-success'
+ }
+ if (showError.value) {
+ classType = 'text-danger'
+ }
+ return {
+ message: message.value,
+ class: classType
+ }
+ })
+
+ function showErrorMsg() {
+ showSuccess.value = false
+ showError.value = true
+ }
+
+ function showSuccessMsg() {
+ showSuccess.value = true
+ showError.value = false
+ }
+
+ async function authDevice() {
+ try {
+ const qrData = JSON.parse(cameraStore.qrCodeValue)
+ if (qrData.handshake_version > 1) {
+ message.value = 'Unsupported handshake version'
+ showErrorMsg()
+ return
+ }
+
+ const payload = {
+ token: qrData.token,
+ hardware_brand: 'Test',
+ hardware_model: 'test',
+ os_name: 'Test',
+ os_version: '2.3.6',
+ software_brand: 'check-in',
+ software_version: 'x.x'
+ }
+ let url = qrData.url
+ const port = import.meta.env.VITE_LOCAL_PORT || 8000
+ if (url.includes('localhost')) {
+ url = `${url}:${port}` // Add your desired port number here
+ }
+ const api = mande(url, { headers: { 'Content-Type': 'application/json' } })
+ const response = await api.post('/api/v1/device/initialize', payload)
+ if (response) {
+ apiStore.newSession(true)
+ const data = response
+ showSuccessMsg()
+ console.log(data)
+ processApi.setApiCred(data.api_token, url, data.organizer)
+ router.push({ name: 'eventyayevents' })
+ } else {
+ showErrorMsg()
+ }
+ } catch (error) {
+ showErrorMsg()
+ }
+ }
+
+ return {
+ response,
+ $reset,
+ authDevice
+ }
+})
diff --git a/src/stores/processEventyayCheckIn.js b/src/stores/processEventyayCheckIn.js
new file mode 100644
index 0000000..6040c98
--- /dev/null
+++ b/src/stores/processEventyayCheckIn.js
@@ -0,0 +1,187 @@
+import { useCameraStore } from '@/stores/camera'
+import { useEventyayApi } from '@/stores/eventyayapi'
+
+import { mande } from 'mande'
+import { defineStore } from 'pinia'
+import { ref } from 'vue'
+
+export const useProcessEventyayCheckInStore = defineStore('processEventyayCheckIn', () => {
+ const cameraStore = useCameraStore()
+ const message = ref('')
+ const showSuccess = ref(false)
+ const showError = ref(false)
+ const badgeUrl = ref('')
+ const isGeneratingBadge = ref(false)
+
+ function $reset() {
+ message.value = ''
+ showSuccess.value = false
+ showError.value = false
+ badgeUrl.value = ''
+ isGeneratingBadge.value = false
+ }
+
+ function showErrorMsg(msg) {
+ message.value = msg
+ showSuccess.value = false
+ showError.value = true
+ }
+
+ function showSuccessMsg(msg) {
+ message.value = msg
+ showSuccess.value = true
+ showError.value = false
+ }
+
+ // Function to generate a random nonce
+ function generateNonce(length = 32) {
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
+ let result = ''
+ for (let i = 0; i < length; i++) {
+ result += chars.charAt(Math.floor(Math.random() * chars.length))
+ }
+ return result
+ }
+
+ async function getlist() {
+ const processApi = useEventyayApi()
+ const { apitoken, url, organizer, eventSlug } = processApi
+ const api = mande(url, { headers: { Authorization: `Device ${apitoken}` } })
+
+ // Fetch the check-in lists
+ const response = await api.get(
+ `/api/v1/organizers/${organizer}/events/${eventSlug}/checkinlists/`
+ )
+
+ // Extract all IDs from the results
+ const listIds = response.results.map((list) => list.id.toString())
+ return listIds
+ }
+
+ async function getBadgeStatus(badgeUrl) {
+ const processApi = useEventyayApi()
+ const { apitoken, url } = processApi
+
+ try {
+ const api = mande(`${url}${badgeUrl}`, {
+ headers: {
+ Authorization: `Device ${apitoken}`,
+ }
+ })
+
+ const response = await api.get()
+ return response
+ } catch (error) {
+ if (error.response?.status === 406) {
+ return null
+ }
+ throw error
+ }
+ }
+
+ async function printBadge(badgeUrl) {
+ isGeneratingBadge.value = true
+
+ try {
+ let badgeResponse = await getBadgeStatus(badgeUrl)
+ if (!badgeResponse) {
+ for (let i = 0; i < 5; i++) {
+ await new Promise((resolve) => setTimeout(resolve, 1000))
+ badgeResponse = await getBadgeStatus(badgeUrl)
+ if (badgeResponse) break
+ }
+ }
+
+ if (badgeResponse) {
+ const blob = new Blob([badgeResponse], { type: 'application/pdf' })
+ const blobUrl = URL.createObjectURL(blob)
+
+ const printWindow = window.open(blobUrl, '_blank')
+ if (printWindow) {
+ printWindow.onload = function () {
+ printWindow.print()
+ URL.revokeObjectURL(blobUrl)
+ }
+ }
+ }
+ } catch (error) {
+ console.error('Error printing badge:', error)
+ showErrorMsg({
+ message: 'Failed to print badge!',
+ attendee: message.value?.attendee || 'Unknown Attendee'
+ })
+ } finally {
+ isGeneratingBadge.value = false
+ }
+ }
+
+ async function checkIn() {
+ console.log('Check-in')
+ const qrData = JSON.parse(cameraStore.qrCodeValue)
+ const processApi = useEventyayApi()
+ const { apitoken, url, organizer, eventSlug } = processApi
+
+ const checkInList = await getlist()
+ const nonce = generateNonce()
+
+ const requestBody = {
+ secret: qrData.ticket,
+ source_type: 'barcode',
+ lists: checkInList,
+ force: false,
+ ignore_unpaid: false,
+ nonce: nonce,
+ datetime: null,
+ questions_supported: false
+ }
+
+ try {
+ const headers = {
+ Authorization: `Device ${apitoken}`,
+ Accept: 'application/json'
+ }
+ const api = mande(`${url}/api/v1/organizers/${organizer}/checkin/redeem/`, {
+ headers: headers
+ })
+ const response = await api.post(requestBody)
+ console.log('Response:', response)
+
+ if (response && (response.status === 'ok' || response.status === 'redeemed')) {
+ const badgeDownload = response.position.downloads.find(
+ (download) => download.output === 'badge'
+ )
+
+ if (badgeDownload) {
+ badgeUrl.value = badgeDownload.url
+ }
+
+ showSuccessMsg({
+ message: 'Check-in successful!',
+ attendee: response.position.attendee_name
+ })
+ } else {
+ showErrorMsg({
+ message: 'Check-in failed!',
+ attendee: response.position?.attendee_name || 'Unknown Attendee'
+ })
+ }
+ } catch (error) {
+ console.error('Fetch error:', error)
+ showErrorMsg({
+ message: 'Check-in Failed!',
+ attendee: 'Unknown Attendee'
+ })
+ }
+ }
+
+ return {
+ message,
+ showSuccess,
+ showError,
+ badgeUrl,
+ isGeneratingBadge,
+ checkIn,
+ printBadge,
+ $reset
+ }
+})
diff --git a/src/stores/tags.js b/src/stores/tags.js
new file mode 100644
index 0000000..afbb72d
--- /dev/null
+++ b/src/stores/tags.js
@@ -0,0 +1,71 @@
+import { useEventyayApi } from '@/stores/eventyayapi'
+import { mande } from 'mande'
+import { defineStore } from 'pinia'
+import { ref } from 'vue'
+
+export const useTagStore = defineStore('tags', () => {
+ const availableTags = ref([])
+ const currentTags = ref([])
+ const inputValue = ref('')
+
+ async function fetchTags() {
+ const processApi = useEventyayApi()
+ const { url, organizer, eventSlug, apitoken, exikey } = processApi
+
+ try {
+ const api = mande(`${url}/api/v1/event/${organizer}/${eventSlug}/exhibitors/tags`, {
+ headers: {
+ Authorization: `Device ${apitoken}`,
+ Accept: 'application/json',
+ Exhibitor: exikey
+ }
+ })
+
+ const response = await api.get()
+ if (response.success) {
+ availableTags.value = response.tags
+ }
+ } catch (error) {
+ console.error('Failed to fetch tags:', error)
+ }
+ }
+
+ function addTag(tag) {
+ const trimmedTag = tag.trim()
+ if (trimmedTag && !currentTags.value.includes(trimmedTag)) {
+ currentTags.value = [...currentTags.value, trimmedTag]
+ }
+ }
+
+ function removeTag(index) {
+ currentTags.value = currentTags.value.filter((_, i) => i !== index)
+ }
+
+ function handleCommaInput(value) {
+ if (value.endsWith(',')) {
+ const tag = value.slice(0, -1).trim()
+ if (tag) {
+ addTag(tag)
+ inputValue.value = ''
+ }
+ } else {
+ inputValue.value = value
+ }
+ }
+
+ function reset() {
+ currentTags.value = []
+ inputValue.value = ''
+ }
+
+ return {
+ availableTags,
+ currentTags,
+ inputValue,
+ fetchTags,
+ addTag,
+ removeTag,
+ handleCommaInput,
+ reset
+ }
+})
diff --git a/vite.config.js b/vite.config.js
index 7f022ab..7283adc 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,13 +1,11 @@
+import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
-
import { defineConfig } from 'vite'
-import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
- plugins: [
- vue(),
- ],
+ base: '/eventyay-checkin/',
+ plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))