/** * @Route("/tocontact/contacted/{id}", name="tocontact_contacted") * @Secure(roles="ROLE_USER") */ public function contactedAction(Intervention $entity) { $em = $this->getDoctrine()->getManager(); $entity->setContactCustomer(true); $em->persist($entity); $em->flush(); return $this->redirect($this->generateUrl('tocontact')); }
protected function _report(Intervention $entity) { if (!$entity instanceof Fixing) { throw new \Exception('entity must be a Fixing'); } $this->ln(3); $this->cellH3('Constat'); $this->cellLi($entity->getObservation()); $this->ln(3); $this->cellH3('Action menée'); $this->cellLi($entity->getReport()); if ($entity->getRest() != null) { $this->ln(15); if ($entity->getAskQuote()) { $this->cellStrong('Nous vous enverrons dans les meilleurs délais, un devis de remise en état concernant les travaux de réparation nécessaire'); // à savoir :'); } elseif ($entity->getWork()) { $this->cellStrong('Nous nous engageons pour le remplacement des pièces nécessaires le plus rapidement possible selon la disponibilité de notre fabriquant'); // à savoir :'); } else { $this->cellStrong('Reste à faire :'); } // $this->ln(3); // $this->cellLiStrong($entity->getRest()); } }
protected function _show(Intervention $entity) { $trustee = $entity->getDoor()->getTrustee(); $this->setX(120); $this->setFont('Arial', 'B', 11); $this->cell(0, 5, $trustee->getName(), 0, 2); $this->setX(120); $this->setFont('Arial', '', 11); $this->multiCell(0, 5, $trustee->getAddress()); $this->ln(10); $this->cellTitle($this->_getTitle()); $this->cellIntro('Nous vous transmettons le rapport d\'intervention du ' . $entity->getLastDate()->format('d/m/Y') . ' qui fait suite à votre demande par ' . $entity->getAskMethod() . ' :'); $this->ln(10); $this->cellH1($entity->getDoor()->getSite() . ''); $this->cellH2($entity->getDoor()->getType() . ' - ' . $entity->getDoor()->getLocation()); }
/** * Finds and displays a Intervention entity. * * @Secure(roles="ROLE_USER") */ public function redirectAction(Intervention $entity, $act) { if (in_array($act, array('show', 'edit', 'close'))) { return $this->redirect($this->generateUrl($entity->getType() . '_' . $act, array('id' => $entity->getId()))); } throw $this->createNotFoundException('Page inexistante'); }
private function _line(Intervention $entity) { $types = array('fixing' => 'Dépannage', 'maintenance' => 'Entretien', 'work' => 'Travaux'); $dayTrans = array('dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'); $datas[0] = $dayTrans[$entity->getClose()->format('w')] . chr(10) . $entity->getClose()->format('d/m/Y'); $datas[1] = $entity->getDoor()->getTrustee(); $datas[2] = $entity->getDoor()->getSite()->getAddress() . ''; $datas[3] = $types[$entity->getType()]; $datas[4] = $entity->getContract() == 'Hors contrat' ? 'HC' : $entity->getDynContract(); $datas[5] = $entity->getReason(); $datas[6] = 'Rapport :' . chr(10) . $entity->getReport(); if ($entity->getRest()) { $datas[6] .= chr(10) . chr(10) . 'Reste à faire :' . chr(10) . $entity->getRest(); } $this->row($datas, 5, 1, false); }