Niza
Niza
NNuxt
Created by lav on 6/8/2024 in #❓・help
Repository patern backend & disadvantage backend in another directory
For readability purposes
export default defineNitroPlugin((nitroApp) => {
const clients = useRuntimeConfig().public.openFetch

Object.entries(clients).forEach(([name, client]) => {
// @ts-expect-error - This is a dynamic property
nitroApp[$${name}] = createOpenFetch(client)
})
})
export default defineNitroPlugin((nitroApp) => {
const clients = useRuntimeConfig().public.openFetch

Object.entries(clients).forEach(([name, client]) => {
// @ts-expect-error - This is a dynamic property
nitroApp[$${name}] = createOpenFetch(client)
})
})
7 replies
NNuxt
Created by Niza on 5/3/2024 in #❓・help
Manipulate Row Values in a Nuxt UI's UTable
I managed to solve the issue in this way:
<UTable :rows="latestAppointments" :columns="appointmentColumns">
<template #date-data="{ row }">
<span class="">{{ new Date(row.date).toLocaleString('en-GB') }}</span>
</template>
<template #reason-data="{ row }">
<span class="">{{ row.reason }}</span>
</template>
</UTable>
<UTable :rows="latestAppointments" :columns="appointmentColumns">
<template #date-data="{ row }">
<span class="">{{ new Date(row.date).toLocaleString('en-GB') }}</span>
</template>
<template #reason-data="{ row }">
<span class="">{{ row.reason }}</span>
</template>
</UTable>
11 replies
NNuxt
Created by Niza on 5/3/2024 in #❓・help
Manipulate Row Values in a Nuxt UI's UTable
With the help of it, I have learnt something new about UTable in the Nuxt UI library.
11 replies
NNuxt
Created by Niza on 5/3/2024 in #❓・help
Manipulate Row Values in a Nuxt UI's UTable
I've attempted to implement your suggestion
11 replies
NNuxt
Created by Niza on 5/3/2024 in #❓・help
Manipulate Row Values in a Nuxt UI's UTable
Thank you so much for responding
11 replies
NNuxt
Created by Niza on 5/3/2024 in #❓・help
Manipulate Row Values in a Nuxt UI's UTable
Hi
11 replies
NNuxt
Created by Niza on 5/3/2024 in #❓・help
Manipulate Row Values in a Nuxt UI's UTable
No description
11 replies
NNuxt
Created by Niza on 5/3/2024 in #❓・help
Manipulate Row Values in a Nuxt UI's UTable
No description
11 replies
NNuxt
Created by Niza on 5/3/2024 in #❓・help
Manipulate Row Values in a Nuxt UI's UTable
No description
11 replies
NNuxt
Created by Niza on 5/3/2024 in #❓・help
Manipulate Row Values in a Nuxt UI's UTable
I want to date format to be something like this
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
P.S I am using Nuxt-Mongoose
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
Right from the source of it
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
Solved it by processing it on an api endpoint
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
import { AppointmentType } from "~/types/Appointment";

export default defineEventHandler(async (event) => {
const query = getQuery(event)

if (query.userid) {
try {
let data: any = await appointmentsModel.find({ userid: query.userid });
if (query.latestAppointmentsOnly == "true") {
let appointments: AppointmentType[] = data as unknown as AppointmentType[];
data = appointments.filter(appointment => appointment.date.getTime() > (new Date()).getTime());
return { data };
}
return { data }
}
catch (error) {
return error
}
}
})
import { AppointmentType } from "~/types/Appointment";

export default defineEventHandler(async (event) => {
const query = getQuery(event)

if (query.userid) {
try {
let data: any = await appointmentsModel.find({ userid: query.userid });
if (query.latestAppointmentsOnly == "true") {
let appointments: AppointmentType[] = data as unknown as AppointmentType[];
data = appointments.filter(appointment => appointment.date.getTime() > (new Date()).getTime());
return { data };
}
return { data }
}
catch (error) {
return error
}
}
})
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
No description
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
No description
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
Let me check
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
oh
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
No description
11 replies
NNuxt
Created by Niza on 4/26/2024 in #❓・help
Typescript Function & Method calls bring 500 error
No description
11 replies