Compare commits
14 Commits
61786797c8
...
1.6.6
| Author | SHA1 | Date | |
|---|---|---|---|
| bca29b9547 | |||
| 823a781d3a | |||
| 2a9e728354 | |||
| 074c125f8c | |||
| 0b2898d170 | |||
| 12525dbf16 | |||
| 4a17adf687 | |||
| f4e412d792 | |||
| 57587a4a97 | |||
| 2bc2d87b8c | |||
| 278c558c9e | |||
| 98545707b3 | |||
| 57dd053693 | |||
| e57173f835 |
@@ -56,6 +56,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'@global'
|
||||
output='assetic/main.base.dash.js' filter='?uglifyjs2' %}
|
||||
<script src="{{ asset_url }}"></script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDYV8IJGtIoWLfXJQQvIuDQ88n2aEuRgpg&libraries=places"></script>
|
||||
{% endjavascripts %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
@@ -83,13 +83,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{#<div id="newApp" class="container-fluid">
|
||||
<div id="newApp" class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col s12 m12">
|
||||
<p>"Nouveau ! Trouvez un job plus facilement avec notre <a href="http://app.talentstube.com">web application</a>.📲"</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>#}
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-wrapper">
|
||||
<ul class="side-nav collapsible" data-collapsible="accordion" id="mobile-demo">
|
||||
@@ -100,10 +100,10 @@
|
||||
<a class="collapsible-header" title="Talents">Talents</a>
|
||||
<div class="collapsible-body">
|
||||
<ul>
|
||||
<li><ahref="{{ path('ad_search_result') }}" title="Offres d'emploi vidéos">Offres d'emploi</a></li>
|
||||
<li><ahref="{{ path('page_cvVideo') }}" title="Le Cv vidéo">Le CV vidéo</a></li>
|
||||
<li><ahref="{{ path('page_reussirCVvideo') }}" title="Comment faire son CV Vidéo ?">Comment faire son CV Vidéo ?</a></li>
|
||||
<li><ahref="{{ path('page_accompagnementTalent') }}" title="Accompagnement talent">Accompagnement</a></li>
|
||||
<li><a href="{{ path('ad_search_result') }}" title="Offres d'emploi vidéos">Offres d'emploi</a></li>
|
||||
<li><a href="{{ path('page_cvVideo') }}" title="Le Cv vidéo">Le CV vidéo</a></li>
|
||||
<li><a href="{{ path('page_reussirCVvideo') }}" title="Comment faire son CV Vidéo ?">Comment faire son CV Vidéo ?</a></li>
|
||||
<li><a href="{{ path('page_accompagnementTalent') }}" title="Accompagnement talent">Accompagnement</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@@ -114,11 +114,11 @@
|
||||
<a class="collapsible-header" title="Les entreprises de talents">Entreprises</a>
|
||||
<div class="collapsible-body">
|
||||
<ul>
|
||||
<li><ahref="{{ path('company_list') }}" title="Listes entreprises">Listes entreprises</a></li>
|
||||
<li><ahref="{{ path('page_OffreEmploi') }}" title="L'offre d'emploi en vidéo">L'offre d'emploi en vidéo</a></li>
|
||||
<li><ahref="{{ path('page_reussirOffrevideo') }}" title="Comment faire une offre en vidéo">Comment faire une offre en vidéo</a></li>
|
||||
<li><ahref="{{ path('page_MarqueEmployeur') }}" title="Vidéo Marque Employeur">Vidéo Marque Employeur</a></li>
|
||||
<li><ahref="{{ path('page_accompagnementEntreprise') }}" title="Conseils & accompagnement">Conseils & accompagnement</a></li>
|
||||
<li><a href="{{ path('company_list') }}" title="Listes entreprises">Listes entreprises</a></li>
|
||||
<li><a href="{{ path('page_OffreEmploi') }}" title="L'offre d'emploi en vidéo">L'offre d'emploi en vidéo</a></li>
|
||||
<li><a href="{{ path('page_reussirOffrevideo') }}" title="Comment faire une offre en vidéo">Comment faire une offre en vidéo</a></li>
|
||||
<li><a href="{{ path('page_MarqueEmployeur') }}" title="Vidéo Marque Employeur">Vidéo Marque Employeur</a></li>
|
||||
<li><a href="{{ path('page_accompagnementEntreprise') }}" title="Conseils & accompagnement">Conseils & accompagnement</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@@ -126,9 +126,9 @@
|
||||
<a class="collapsible-header" title="Les territoires">Territoires</a>
|
||||
<div class="collapsible-body">
|
||||
<ul>
|
||||
<li><ahref="{{ path('territory_list') }}">Liste des territoires</a></li>
|
||||
<li><ahref="{{ path('page_VideoTerritory') }}">La vidéo territoire</a></li>
|
||||
<li><ahref="{{ path('page_AccompagnementTerritory') }}">Conseils et accompagnement</a></li>
|
||||
<li><a href="{{ path('territory_list') }}">Liste des territoires</a></li>
|
||||
<li><a href="{{ path('page_VideoTerritory') }}">La vidéo territoire</a></li>
|
||||
<li><a href="{{ path('page_AccompagnementTerritory') }}">Conseils et accompagnement</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -18,11 +18,3 @@
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDYV8IJGtIoWLfXJQQvIuDQ88n2aEuRgpg&libraries=places"></script>
|
||||
{% javascripts
|
||||
'@talents'
|
||||
output='assetic/main.dashboard.talent.js' filter='?uglifyjs2' %}
|
||||
<script src="{{ asset_url }}"></script>
|
||||
{% endjavascripts %}
|
||||
{% endblock %}
|
||||
@@ -250,6 +250,7 @@ fos_rest:
|
||||
serialize_null: true
|
||||
format_listener:
|
||||
rules:
|
||||
- { path: '^/api/talent', priorities: ['html'], fallback_format: 'html' }
|
||||
- { path: '^/api/', priorities: ['json'], fallback_format: 'json' }
|
||||
param_fetcher_listener: true
|
||||
exception:
|
||||
@@ -264,6 +265,22 @@ lexik_jwt_authentication:
|
||||
public_key: '%kernel.root_dir%/../app/config/jwt/public.pem' # required for token verification
|
||||
pass_phrase: 'talentstubeforever' # required for token creation, usage of an environment variable is recommended
|
||||
token_ttl: 3600000
|
||||
token_extractors:
|
||||
# look for a token as Authorization Header
|
||||
authorization_header:
|
||||
enabled: true
|
||||
prefix: Bearer
|
||||
name: Authorization
|
||||
|
||||
# check token in a cookie
|
||||
cookie:
|
||||
enabled: false
|
||||
name: BEARER
|
||||
|
||||
# check token in query string parameter
|
||||
query_parameter:
|
||||
enabled: true
|
||||
name: bearer
|
||||
|
||||
nelmio_cors:
|
||||
paths:
|
||||
|
||||
@@ -10,7 +10,7 @@ use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class SendPushCommand extends ContainerAwareCommand
|
||||
{
|
||||
private const defaultEmail = 'thomas.berrod@e-declic.com';
|
||||
private const defaultEmail = 'lognone.gregoire@hotmail.fr';
|
||||
|
||||
|
||||
protected function configure()
|
||||
|
||||
@@ -14,6 +14,8 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use JMS\Serializer\SerializationContext;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class PushController extends FOSRestController
|
||||
{
|
||||
@@ -29,4 +31,29 @@ class PushController extends FOSRestController
|
||||
|
||||
return new JsonResponse(array('isUserSubscribed' => $isUserSubscribed));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Rest\Post("/api/userSubscriptionToPush", name="postUserSubscriptionToPush")
|
||||
* @Rest\View(statusCode=200)
|
||||
*/
|
||||
public function saveSubscription(Request $request)
|
||||
{
|
||||
$user = $this->getUser();
|
||||
$subscription = json_decode($request->getContent(), true);
|
||||
|
||||
if (JSON_ERROR_NONE !== json_last_error()) {
|
||||
throw new BadRequestHttpException(json_last_error_msg());
|
||||
}
|
||||
if (!isset($subscription['endpoint'])) {
|
||||
throw new BadRequestHttpException('Invalid subscription object.');
|
||||
}
|
||||
|
||||
$manager = $this->container->get("app.user_subscription_manager");
|
||||
$subscriptionHash = $manager->hash($subscription['endpoint']);
|
||||
$userSubscription = $manager->getUserSubscription($user, $subscriptionHash)
|
||||
or $userSubscription = $manager->factory($user, $subscriptionHash, $subscription);
|
||||
$manager->save($userSubscription);
|
||||
|
||||
return new JsonResponse(array('success' => true),200);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,14 @@ use FOS\UserBundle\Model\UserInterface;
|
||||
use AppBundle\Entity\Company;
|
||||
use AppBundle\Exception\ResourceValidationException;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use AppBundle\Form\ContactTalentType;
|
||||
use AppBundle\Form\MediaType;
|
||||
use AppBundle\Form\TalentProfileType;
|
||||
use AppBundle\Form\TalentType;
|
||||
use AppBundle\Form\CareersType;
|
||||
use AppBundle\Form\FormationsType;
|
||||
use AppBundle\Form\LanguagesType;
|
||||
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
|
||||
|
||||
class SecurityController extends FOSRestController
|
||||
{
|
||||
@@ -107,18 +115,17 @@ class SecurityController extends FOSRestController
|
||||
*/
|
||||
public function UpdateUser(Request $request)
|
||||
{
|
||||
$userManager = $this->get('fos_user.user_manager');
|
||||
$companyManager = $this->get('app.company_manager');
|
||||
$usr = $this->getUser();
|
||||
$talent = $usr->getCompany();var_dump($talent);
|
||||
$talent = $usr->getCompany();
|
||||
if ($usr !== null){
|
||||
$newLastName = htmlspecialchars($request->request->get('lastname'));
|
||||
$newFirstName = htmlspecialchars($request->request->get('firstname'));
|
||||
$phoneTalent = htmlspecialchars($request->request->get('phone'));
|
||||
$titleTalent = htmlspecialchars($request->request->get('currentJob'));
|
||||
$newLinkedin = htmlspecialchars($request->request->get('linkedin'));
|
||||
$newTwitter = htmlspecialchars($request->request->get('twitter'));
|
||||
$newWebsite = htmlspecialchars($request->request->get('website'));
|
||||
$newLastName = htmlspecialchars($request->get('lastname'));
|
||||
$newFirstName = htmlspecialchars($request->get('firstname'));
|
||||
$phoneTalent = htmlspecialchars($request->get('phone'));
|
||||
$titleTalent = htmlspecialchars($request->get('currentJob'));
|
||||
$newLinkedin = htmlspecialchars($request->get('linkedin'));
|
||||
$newTwitter = htmlspecialchars($request->get('twitter'));
|
||||
$newWebsite = htmlspecialchars($request->get('website'));
|
||||
|
||||
if (!isset($newLastName) || !isset($newFirstName) || $newLastName == null || $newFirstName == null){
|
||||
$message = 'Vous devez rentrer votre nom et votre prénom pour continuer';
|
||||
@@ -135,7 +142,6 @@ class SecurityController extends FOSRestController
|
||||
$talent->setPhoneTalent($phoneTalent);
|
||||
$companyManager->updateTalent($usr);
|
||||
|
||||
|
||||
$status = array('status' => "success");
|
||||
}
|
||||
} else {
|
||||
@@ -144,6 +150,29 @@ class SecurityController extends FOSRestController
|
||||
return new JsonResponse($status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Rest\post(path="/api/update_profile_picture", name="api_update_profile_picture")
|
||||
* @Rest\View
|
||||
*/
|
||||
public function UpdateProfilPicture(Request $request)
|
||||
{
|
||||
$userManager = $this->get('fos_user.user_manager');
|
||||
$usr = $this->getUser();
|
||||
if ($usr !== null){
|
||||
|
||||
$file = $request->files->get('file');
|
||||
$usr->setFile($file);
|
||||
$usr->upload();
|
||||
|
||||
$userManager->updateUser($usr);
|
||||
$status = array('status' => "success", 'file' => $usr->getPhoto());
|
||||
|
||||
} else {
|
||||
$status = array('status' => "failure", 'message' => "Vous n'êtes pas connecté.");
|
||||
}
|
||||
return new JsonResponse($status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Rest\post(path="/api/reset_password", name="reset_password")
|
||||
* @Rest\View
|
||||
@@ -533,4 +562,25 @@ class SecurityController extends FOSRestController
|
||||
$data = json_decode($response);
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Rest\Get(path="/api/talent", name="api_talent")
|
||||
* @Rest\View
|
||||
*/
|
||||
public function goToMonCompte(Request $request)
|
||||
{
|
||||
$user = $this->getUser();
|
||||
$token = new UsernamePasswordToken($user, null, 'main', $user->getRoles());
|
||||
$this->get('security.token_storage')->setToken($token);
|
||||
|
||||
$this->get('session')->set('_security_main', serialize($token));
|
||||
|
||||
$event = new InteractiveLoginEvent($request, $token);
|
||||
$this->get("event_dispatcher")->dispatch("security.interactive_login", $event);
|
||||
|
||||
$view = $this->redirectView($this->generateUrl('talent_dashboard'), 301);
|
||||
|
||||
return $this->handleView($view);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ class CompanyController extends Controller
|
||||
$history->recordIt("Anonymous", "r", 'AppBundle\Entity\Company', $company->getId(), serialize($company));
|
||||
}
|
||||
|
||||
return new JsonResponse(array('code' => "ok"));
|
||||
return new JsonResponse(array('code' => "ok", "user" => $this->getUser()->getUsername()));
|
||||
}
|
||||
|
||||
/***********************
|
||||
|
||||
@@ -49,6 +49,7 @@ class PushController extends Controller
|
||||
|
||||
return new JsonResponse(array('success' => true),200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/push/delete-subscription/", name="delete-subscription")
|
||||
*/
|
||||
|
||||
@@ -229,6 +229,7 @@ class User extends BaseUser
|
||||
$name = md5(uniqid()) . '.' . $this->file->guessExtension();
|
||||
$this->file->move($this->getUploadRootDir(), $name);
|
||||
$this->photo = $name;
|
||||
|
||||
}
|
||||
|
||||
public function getUploadDir()
|
||||
@@ -373,7 +374,12 @@ class User extends BaseUser
|
||||
"lastname" => $this->getLastname(),
|
||||
"email" => $this->getEmail(),
|
||||
"picture" => $this->getPhoto(),
|
||||
"socialPicture" => $this->getSocialPicture()
|
||||
"socialPicture" => $this->getSocialPicture(),
|
||||
"phone" => $this->getCompany()->getExtra()["phoneTalent"],
|
||||
"linkedin" => $this->getCompany()->getExtra()["linkedin"],
|
||||
"twitter" => $this->getCompany()->getExtra()["twitter"],
|
||||
"currentJob" => $this->getCompany()->getExtra()["titleTalent"],
|
||||
"website" => $this->getCompany()->getWebsite(),
|
||||
);
|
||||
return $card;
|
||||
}
|
||||
|
||||
@@ -67,18 +67,18 @@ class UserSubscriptionRepository extends \Doctrine\ORM\EntityRepository
|
||||
) AS decimal) / 15) * 100 ) >= :percent')
|
||||
->setParameters(array('percent' => $completenessPercentage));
|
||||
|
||||
dump($qb->getQuery()->getSql());
|
||||
//dump($qb->getQuery()->getSql());
|
||||
|
||||
$result = $qb->getQuery()->getResult();
|
||||
|
||||
dump($result);
|
||||
//dump($result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function findByTagMatching($tags)
|
||||
{
|
||||
dump($tags);
|
||||
//dump($tags);
|
||||
$config = $this->_em->getConfiguration();
|
||||
$config->addCustomNumericFunction('CAST', 'AppBundle\Repository\Query\CastAs');
|
||||
|
||||
@@ -96,11 +96,11 @@ class UserSubscriptionRepository extends \Doctrine\ORM\EntityRepository
|
||||
}
|
||||
}
|
||||
|
||||
dump($qb->getQuery()->getSql());
|
||||
//dump($qb->getQuery()->getSql());
|
||||
|
||||
$result = $qb->getQuery()->getResult();
|
||||
|
||||
dump($result);
|
||||
//dump($result);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,9 +105,9 @@ class NotificationSender implements ContainerAwareInterface
|
||||
$user = $this->userManager->findUserBy(array('email' => $email));
|
||||
$output->writeln('$user : ' . $user->getFirstname());
|
||||
|
||||
$users = $this->subscriptionManager->getAll();
|
||||
$subscriptions = $this->subscriptionManager->findByEmails(array($email));
|
||||
|
||||
foreach ($users as $subscription) {
|
||||
foreach ($subscriptions as $subscription) {
|
||||
$this->sendNotification($output, $subscription);
|
||||
}
|
||||
|
||||
@@ -142,6 +142,8 @@ class NotificationSender implements ContainerAwareInterface
|
||||
|
||||
private function sendNotification(OutputInterface $output, $subscription)
|
||||
{
|
||||
$output->writeln(' ====== subscription ======');
|
||||
$output->writeln($subscription->getEndpoint());
|
||||
!$output->isVerbose()?:$output->writeln('send to user ---> ' . $subscription->getEndpoint());
|
||||
|
||||
$this->sender->sendNotification(
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
{
|
||||
"parameters": {
|
||||
"pushType": "tags",
|
||||
"keywords": "surf;voile",
|
||||
"profilCompletenessPercentage": "10",
|
||||
"users": "thomas.berrod@e-declic.com;thomas.berrod@e-declic.com;thomas.berrod@e-declic.com"
|
||||
"keywords": "trytodev"
|
||||
},
|
||||
"notification": {
|
||||
"title": "Coriolis composites",
|
||||
@@ -12,7 +10,7 @@
|
||||
"image": "https://i.vimeocdn.com/video/668043830.webp?mw=1100&mh=619&q=70",
|
||||
"tag": "open-window",
|
||||
"data": {
|
||||
"link": "http://localhost/app_dev.php/annonce/7-composites-studies-engineer"
|
||||
"link": "http://localhost/annonce/7-composites-studies-engineer"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"parameters": {
|
||||
"pushType": "tags",
|
||||
"keywords": "surf;voile"
|
||||
"keywords": "trytodev"
|
||||
},
|
||||
"notification": {
|
||||
"title": "D'après vous",
|
||||
|
||||
Reference in New Issue
Block a user