| | |
| | | package com.pollex.pam.web.rest; |
| | | |
| | | import com.pollex.pam.service.dto.AppointmentDTO; |
| | | import com.pollex.pam.domain.Appointment; |
| | | import com.pollex.pam.service.SendMsgService; |
| | | import com.pollex.pam.service.dto.AppointmentUpdateDTO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Autowired |
| | | SatisfactionService satisfactionService; |
| | | |
| | | @Autowired |
| | | SendMsgService sendMsgService; |
| | | |
| | | @PutMapping("") |
| | | public ResponseEntity<Void> updateAppointment(@RequestBody AppointmentDTO appointment) { |
| | | public ResponseEntity<Void> updateAppointment(@RequestBody AppointmentUpdateDTO appointment) { |
| | | appointmentService.updateAppointment(appointment); |
| | | return ResponseEntity.noContent().build(); |
| | | } |
| | |
| | | |
| | | @PostMapping("/customer/create") |
| | | public void clientCreateAppointment(@RequestBody AppointmentCreateDTO appointmentCreateDTO) { |
| | | appointmentService.customerCreateAppointment(appointmentCreateDTO); |
| | | } |
| | | Appointment appointment = appointmentService.customerCreateAppointment(appointmentCreateDTO); |
| | | appointmentService.sendAppointmentNotify(appointment); |
| | | } |
| | | |
| | | @PostMapping("/markAsContacted/{appointmentId}") |
| | | public void markAsContacted(@PathVariable Long appointmentId) { |