| 1 | {"ast":null,"code":"import apiClient from './api';\nconst ENDPOINT = '/appointments';\nexport const appointmentService = {\n getAllAppointments: () => apiClient.get(ENDPOINT),\n getAppointmentById: id => apiClient.get(`${ENDPOINT}/${id}`),\n getAppointmentsForPatient: patientId => apiClient.get(`${ENDPOINT}/patient/${patientId}`),\n getAppointmentsForDoctor: doctorId => apiClient.get(`${ENDPOINT}/doctor/${doctorId}`),\n getDoctorSchedule: (doctorId, date) => apiClient.get(`${ENDPOINT}/doctor/${doctorId}/schedule`, {\n params: {\n date\n }\n }),\n createAppointment: appointment => apiClient.post(ENDPOINT, appointment),\n cancelAppointment: id => apiClient.patch(`${ENDPOINT}/${id}/cancel`),\n completeAppointment: id => apiClient.patch(`${ENDPOINT}/${id}/complete`)\n};","map":{"version":3,"names":["apiClient","ENDPOINT","appointmentService","getAllAppointments","get","getAppointmentById","id","getAppointmentsForPatient","patientId","getAppointmentsForDoctor","doctorId","getDoctorSchedule","date","params","createAppointment","appointment","post","cancelAppointment","patch","completeAppointment"],"sources":["C:/Users/User/Downloads/medora5/frontend/src/services/appointmentService.js"],"sourcesContent":["import apiClient from './api';\n\nconst ENDPOINT = '/appointments';\n\nexport const appointmentService = {\n getAllAppointments: () => apiClient.get(ENDPOINT),\n\n getAppointmentById: (id) => apiClient.get(`${ENDPOINT}/${id}`),\n\n getAppointmentsForPatient: (patientId) => apiClient.get(`${ENDPOINT}/patient/${patientId}`),\n\n getAppointmentsForDoctor: (doctorId) => apiClient.get(`${ENDPOINT}/doctor/${doctorId}`),\n\n getDoctorSchedule: (doctorId, date) => apiClient.get(`${ENDPOINT}/doctor/${doctorId}/schedule`, {\n params: { date }\n }),\n\n createAppointment: (appointment) => apiClient.post(ENDPOINT, appointment),\n\n cancelAppointment: (id) => apiClient.patch(`${ENDPOINT}/${id}/cancel`),\n\n completeAppointment: (id) => apiClient.patch(`${ENDPOINT}/${id}/complete`),\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,OAAO;AAE7B,MAAMC,QAAQ,GAAG,eAAe;AAEhC,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,kBAAkB,EAAEA,CAAA,KAAMH,SAAS,CAACI,GAAG,CAACH,QAAQ,CAAC;EAEjDI,kBAAkB,EAAGC,EAAE,IAAKN,SAAS,CAACI,GAAG,CAAC,GAAGH,QAAQ,IAAIK,EAAE,EAAE,CAAC;EAE9DC,yBAAyB,EAAGC,SAAS,IAAKR,SAAS,CAACI,GAAG,CAAC,GAAGH,QAAQ,YAAYO,SAAS,EAAE,CAAC;EAE3FC,wBAAwB,EAAGC,QAAQ,IAAKV,SAAS,CAACI,GAAG,CAAC,GAAGH,QAAQ,WAAWS,QAAQ,EAAE,CAAC;EAEvFC,iBAAiB,EAAEA,CAACD,QAAQ,EAAEE,IAAI,KAAKZ,SAAS,CAACI,GAAG,CAAC,GAAGH,QAAQ,WAAWS,QAAQ,WAAW,EAAE;IAC9FG,MAAM,EAAE;MAAED;IAAK;EACjB,CAAC,CAAC;EAEFE,iBAAiB,EAAGC,WAAW,IAAKf,SAAS,CAACgB,IAAI,CAACf,QAAQ,EAAEc,WAAW,CAAC;EAEzEE,iBAAiB,EAAGX,EAAE,IAAKN,SAAS,CAACkB,KAAK,CAAC,GAAGjB,QAAQ,IAAIK,EAAE,SAAS,CAAC;EAEtEa,mBAAmB,EAAGb,EAAE,IAAKN,SAAS,CAACkB,KAAK,CAAC,GAAGjB,QAAQ,IAAIK,EAAE,WAAW;AAC3E,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |
|---|