json(['error' => false, 'data' => $this->noteService->getCustomerNotes($uuid)]); } public function storeCustomerNote(string $uuid, Request $request): JsonResponse { $data = $request->validate(['note' => 'required|string']); $note = $this->noteService->storeCustomerNote($uuid, $data['note'], Auth::id()); return response()->json(['error' => false, 'message' => 'Đã thêm ghi chú', 'data' => $note]); } public function destroyCustomerNote(string $uuid, int $noteId): JsonResponse { $this->noteService->destroyNote($uuid, $noteId); return response()->json(['error' => false, 'message' => 'Đã xoá ghi chú']); } public function getServiceNotes(string $uuid, int $serviceId): JsonResponse { return response()->json(['error' => false, 'data' => $this->noteService->getServiceNotes($uuid, $serviceId)]); } public function storeServiceNote(string $uuid, int $serviceId, Request $request): JsonResponse { $data = $request->validate(['note' => 'required|string']); $note = $this->noteService->storeServiceNote($uuid, $serviceId, $data['note'], Auth::id()); return response()->json(['error' => false, 'message' => 'Đã thêm ghi chú', 'data' => $note]); } public function destroyServiceNote(string $uuid, int $serviceId, int $noteId): JsonResponse { $this->noteService->destroyNote($uuid, $noteId); return response()->json(['error' => false, 'message' => 'Đã xoá ghi chú']); } }