You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a data table and I want to make the status updatable based on actions taken by end users. when a new appointment is submitted by the admin I want it to say pending until it is accepted by the end user. once accepted by the end user it should say confirmed. when the end user updates an end time variable the status should be changed to closed. if the appointment is cancelled the status should change to cancelled.
so far I have created the column as : export type AppointmentsColumn = { status: "pending" | "processing" | "success" | "closed" } export const columns: ColumnDef<AppointmentsColumn>[] = [ { accessorKey: "status", header: "Status", },] const AppointmentsPage = async () => { const formattedAppointments: AppointmentsColumn[] = appointment.map( (item) => ({ status: item.status, })
im not totally sure what to do next here and was wondering if I could get some suggestions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hi everyone.
I am working on a data table and I want to make the status updatable based on actions taken by end users. when a new appointment is submitted by the admin I want it to say pending until it is accepted by the end user. once accepted by the end user it should say confirmed. when the end user updates an end time variable the status should be changed to closed. if the appointment is cancelled the status should change to cancelled.
so far I have created the column as :
export type AppointmentsColumn = { status: "pending" | "processing" | "success" | "closed" }
export const columns: ColumnDef<AppointmentsColumn>[] = [ { accessorKey: "status", header: "Status", },]
const AppointmentsPage = async () => { const formattedAppointments: AppointmentsColumn[] = appointment.map( (item) => ({ status: item.status, })
im not totally sure what to do next here and was wondering if I could get some suggestions.
Beta Was this translation helpful? Give feedback.
All reactions