Compare commits

...

9 Commits

Author SHA1 Message Date
Sébastien 47d571baae Fix : Button disabled 2020-02-12 09:26:05 +01:00
Sébastien f5f0c39dd7 Feat : Update style of answer page 2020-02-04 08:15:33 +01:00
Grégoire c83b71853b feat and fix : statut of answer last message / add no empty message / delete statut CHAT 2020-01-14 16:05:31 +01:00
Grégoire 8bc3165995 fix : ajaxRecStat on user null for google robot (3) 2020-01-03 11:13:20 +01:00
Grégoire dffcf66ce3 fix : ajaxRecStat on user null for google robot (2) 2020-01-03 11:09:31 +01:00
Grégoire 41c046392e fix : ajaxRecStat on user null for google robot 2020-01-03 10:59:25 +01:00
Grégoire e81e2dce9d fix : problem saving company user parameters
hide birthday field (date issue) /entreprise/me/mon_compte
2020-01-03 10:25:26 +01:00
Grégoire 3ffc3c8d3b fix : sendtime + message video + contact_talent 2020-01-02 15:29:55 +01:00
Grégoire e35cb0c461 fix : link mail answer spontaneous 2019-12-30 16:22:13 +01:00
11 changed files with 41 additions and 23 deletions
@@ -24,7 +24,7 @@
<div class="col-content bg-arrow z-depth-2 p-20">
<div class="row">
<div class="col s12">
<h4 class="color-blue1 p-0"><span class="title-bubble">1</span> Enregistrez votre cv vidéo</h4>
<h4 class="color-blue1 p-0"><span class="title-bubble">1/3</span> Enregistrez votre cv vidéo</h4>
</div>
<div class="col m4 offset-m1 s12">
<video id="myCvVideo" class="video-js vjs-default-skin"></video>
@@ -60,7 +60,7 @@
<div class="col-content bg-arrow z-depth-2 p-20">
<div class="row">
<div class="col s12">
<h4 class="color-blue1 p-0"><span class="title-bubble">2</span> Importez votre CV Vidéo</h4>
<h4 class="color-blue1 p-0"><span class="title-bubble">2/3</span> Importez votre CV Vidéo</h4>
</div>
<div class="col s10 offset-s1 answer-dropzone">
{% include 'media/dropzone.html.twig' with {'deleting': true } %}
@@ -72,7 +72,7 @@
{{ form_row(form.status) }}
<div class="row">
<div class="col s12">
<h4 class="color-blue1 p-0"><span class="title-bubble">3</span> Ajoutez votre commentaire</h4>
<h4 class="color-blue1 p-0"><span class="title-bubble">3/3</span> Ajoutez votre commentaire</h4>
</div>
<div class="col s10 offset-s1">
<div class="row">
@@ -16,7 +16,11 @@
<br/>
<br/>
<div style="text-align:center;">
<a class="btn btn-default" href="{{ absolute_url(path('talent_ad_detail',{'alias': answer.ad.alias,'id': answer.id })) }}">Visionner la réponse vidéo</a>
{% if answer.ad.alias is null %}
<a class="btn btn-default" href="{{ absolute_url(path('talent_ad_detail',{'alias': aliasCompany,'id': answer.id })) }}">Visionner la réponse</a>
{% else %}
<a class="btn btn-default" href="{{ absolute_url(path('talent_ad_detail',{'alias': answer.ad.alias,'id': answer.id })) }}">Visionner la réponse</a>
{% endif %}
</div>
{% else %}
<br />
@@ -26,7 +30,11 @@
<br/>
<br/>
<div style="text-align:center;">
<a class="btn btn-default" href="{{ absolute_url(path('talent_ad_detail',{'alias': answer.ad.alias,'id': answer.id })) }}">Consulter la réponse</a>
{% if answer.ad.alias is null %}
<a class="btn btn-default" href="{{ absolute_url(path('talent_ad_detail',{'alias': aliasCompany,'id': answer.id })) }}">Consulter la réponse</a>
{% else %}
<a class="btn btn-default" href="{{ absolute_url(path('talent_ad_detail',{'alias': answer.ad.alias,'id': answer.id })) }}">Consulter la réponse</a>
{% endif %}
</div>
{% endif %}
<br>
@@ -327,9 +327,11 @@ class AnswerController extends Controller
if ($answer->getAd() == null) {
$type = 'spontaneous';
$title = $answer->getCompany()->getBrandName();
$aliasCompany = $answer->getCompany()->getAlias();
} else {
$type = 'answer';
$title = $answer->getAd()->getTitle();
$aliasCompany = '';
}
$user = $this->getUser();
$form = $this->createForm(ContactTalentType::class);
@@ -365,6 +367,7 @@ class AnswerController extends Controller
'user' => $answer->getUser(),
'video' => $message->getVideo(),
'message' => $message,
'aliasCompany' => $aliasCompany
));
$plainView = $this->renderView('email/contact_talent_plain.html.twig', array(
@@ -22,6 +22,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use JMS\Serializer\SerializationContext;
use AppBundle\Exception\ResourceValidationException;
use AppBundle\Exception\UnknownUserException;
use \DateTime;
class AnswerController extends FOSRestController
{
@@ -136,21 +137,21 @@ class AnswerController extends FOSRestController
$ad = $em->getRepository('AppBundle:Ad')->find($adId);
$answer->setAd($ad);
}
$answer->setVideo($video)
->setCompany($company);
$answer ->setVideo($video)
->setCompany($company)
->setSendTime(new \DateTime());
$em->persist($answer);
$em->flush();
$userCompany = $company->getUsers();
$message = new Message('Candidature', 'Video', $usr, $userCompany{
/*$message = new Message('Candidature', 'Video', $usr, $userCompany{
0}, 'CONTACT_TALENT', $answer);
$message->setVideo($video);
$em->persist($message);
$em->flush();
$status = array('status' => "success", "idAnswer" => $answer->getId(), "idMessage" => $message->getId());
$em->flush();*/
$status = array('status' => "success", "idAnswer" => $answer->getId()/*, "idMessage" => $message->getId()*/);
}
} else {
$message = 'Vous n\'êtes pas connecté en tant qu\'utilisateur.';
@@ -225,7 +226,7 @@ class AnswerController extends FOSRestController
throw new ResourceValidationException($message, $status);
}
if (!isset($messageText)) {
if (empty($messageText)) {
$message = 'Le message est vide.';
$status = 'failure';
throw new ResourceValidationException($message, $status);
@@ -234,7 +235,7 @@ class AnswerController extends FOSRestController
$answerReceipiant = $existAnswer->getAd() !== null ? $existAnswer->getAd()->getCreator()
: $existAnswer->getCompany()->getUsers(){ 0 };
$message = new message('Chat', $messageText, $this->getUser(), $answerReceipiant, 'CHAT', $existAnswer);
$message = new message('Chat', $messageText, $this->getUser(), $answerReceipiant, 'Message du talent', $existAnswer);
$em->persist($message);
$em->flush();
@@ -187,7 +187,13 @@ class CompanyController extends Controller
$history->recordIt("Anonymous", "r", 'AppBundle\Entity\Company', $company->getId(), serialize($company));
}
return new JsonResponse(array('code' => "ok", "user" => $this->getUser()->getUsername()));
if(!$this->getUser() == null){
return new JsonResponse(array('code' => "ok", "user" => $this->getUser()->getUsername()));
} else{
return new JsonResponse(array('code' => "ok"));
}
}
/***********************
@@ -177,7 +177,7 @@ class Answer
$criteria = Criteria::create()
->where(Criteria::expr()->neq('status', "DRAFT"));
return $this->messages->matching($criteria)->last();
return $this->messages->matching($criteria)->first();
}
public function getIsViewed(){
@@ -16,7 +16,7 @@ use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -33,13 +33,13 @@ class UserType extends AbstractType
'label' => 'Nom',
'required' => true,
))
->add('birthday', DateType::class, array(
/*->add('birthday', DateTimeType::class, array(
'widget' => 'single_text',
'label' => 'Date de naissance',
'attr' => array(
'class' => 'calendar'
)
))
))*/
->add('gender', ChoiceType::class, array(
'expanded' => true,
'multiple' => false,
+1 -1
View File
@@ -16539,7 +16539,7 @@ tbody td {
#answerPage #modal-tuto ul li:before {
content: '- '; }
#answerPage .col-content {
margin-bottom: 100px;
margin-bottom: 50px;
background: #FFFFFF; }
#answerPage h4 {
margin: 20px 0 40px 20px; }
File diff suppressed because one or more lines are too long
@@ -4,8 +4,8 @@
<title>Step_arrow</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Interactions" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="square">
<g id="Réponse-offre-d'emploi-:-module_camera" transform="translate(-179.000000, -491.000000)" stroke="#E3E3E3">
<g id="Interactions" stroke="none" stroke-width="3" fill="none" fill-rule="evenodd" stroke-linecap="square">
<g id="Réponse-offre-d'emploi-:-module_camera" transform="translate(-179.000000, -491.000000)" stroke="#D7D7D7">
<g id="Réponse-offre" transform="translate(80.000000, 176.000000)">
<g id="001-camera" transform="translate(30.200000, 21.700000)">
<g id="Group-4">

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -127,7 +127,7 @@
}
}
.col-content{
margin-bottom: 100px;
margin-bottom: 50px;
background: $white;
}