Compare commits
23 Commits
61786797c8
...
1.6.75
| Author | SHA1 | Date | |
|---|---|---|---|
| e35cb0c461 | |||
| db084707bb | |||
| 1a9fff778a | |||
| 90a38edb29 | |||
| fc1b4a3e2a | |||
| 94a946e36d | |||
| f06cbe296f | |||
| e2a98aaed3 | |||
| beee2c5635 | |||
| bca29b9547 | |||
| 823a781d3a | |||
| 2a9e728354 | |||
| 074c125f8c | |||
| 0b2898d170 | |||
| 12525dbf16 | |||
| 4a17adf687 | |||
| f4e412d792 | |||
| 57587a4a97 | |||
| 2bc2d87b8c | |||
| 278c558c9e | |||
| 98545707b3 | |||
| 57dd053693 | |||
| e57173f835 |
Executable → Regular
+52
-2
@@ -14,7 +14,28 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ form_start(formUser, {'id': 'formUser'}) }}
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Compte utilisateur</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ form_errors(formUser) }}
|
||||
{{ form_label(formUser.email, 'Email') }}
|
||||
{{ form_widget(formUser.email, {'attr': {'class': 'form-control'}}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<button class="btn btn-success edit-email-user" data-toggle="tooltip" type="submit">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(formUser) }}
|
||||
<br/>
|
||||
{{ form_start(form) }}
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
@@ -37,7 +58,6 @@
|
||||
{{ form_row(form.website) }}
|
||||
{{ form_row(form.tagsComma) }}
|
||||
{{ form_row(form.file) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,3 +86,33 @@
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block javascripts %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
|
||||
$(".edit-email-user").confirm({
|
||||
title: "Êtes vous sûr de modifier l'adresse mail de cet utilisateur ?",
|
||||
content: "Si une erreur de saisie est présente, l'utilisateur ne pourra plus recevoir vos mails.",
|
||||
type: 'ored',
|
||||
boxWidth: '30%',
|
||||
useBootstrap: false,
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Confirmer',
|
||||
action: function() {
|
||||
$("[name='user_company']").submit();
|
||||
return true;
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
text: 'Annuler'
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 %}
|
||||
@@ -106,7 +106,7 @@ fos_user:
|
||||
email:
|
||||
template: email/password_resetting.email.twig
|
||||
from_email:
|
||||
address: noreply@talentstube.com
|
||||
address: noreply@talentstube.io
|
||||
sender_name: talentstube.com
|
||||
service:
|
||||
mailer: fos_user.mailer.twig_swift
|
||||
@@ -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:
|
||||
|
||||
@@ -15,9 +15,9 @@ services:
|
||||
class: AppBundle\Utils\Services\AfterLoginRedirection
|
||||
arguments: ['@router']
|
||||
|
||||
#app.ad_searcher:
|
||||
# class: AppBundle\Utils\Services\AdSearcher
|
||||
# arguments: ['@fos_elastica.finder.ads.adfr']
|
||||
app.ad_searcher:
|
||||
class: AppBundle\Utils\Services\AdSearcher
|
||||
arguments: ['@fos_elastica.finder.ads.adfr']
|
||||
|
||||
app.ad_tags_searcher:
|
||||
class: AppBundle\Utils\Services\AdSearcher
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -309,8 +309,8 @@ class AdController extends Controller
|
||||
} else {
|
||||
$session->remove('contratSearch');
|
||||
}
|
||||
//$adSearcher = $this->get('app.ad_searcher');
|
||||
$ads = array();//$adSearcher->process($data);
|
||||
$adSearcher = $this->get('app.ad_searcher');
|
||||
$ads = $adSearcher->process($data);
|
||||
if(empty($ads)){
|
||||
$ads = $this->getPublishedAds($promoted);
|
||||
$noResults = true;
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace AppBundle\Controller\Admin;
|
||||
use AppBundle\Entity\Company;
|
||||
use AppBundle\Entity\Product;
|
||||
use AppBundle\Form\Admin\CompanyAdminType;
|
||||
use AppBundle\Form\Admin\UserCompanyType;
|
||||
use AppBundle\Form\TokenAddType;
|
||||
use Edeclic\PrestashopBridgeBundle\Event\PrestashopBridgeEvents;
|
||||
use Edeclic\PrestashopBridgeBundle\Event\UserEvent;
|
||||
@@ -36,14 +37,26 @@ class CompanyController extends Controller
|
||||
$user = $company->getUsers()->first();
|
||||
$form = $this->createForm(CompanyAdminType::class, $company);
|
||||
$form->handleRequest($request);
|
||||
|
||||
$formUser = $this->createForm(UserCompanyType::class, $user);
|
||||
$formUser->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$companyManager = $this->get('app.company_manager');
|
||||
$companyManager->updateCompany($company);
|
||||
$event = new UserEvent($user);
|
||||
$this->get('event_dispatcher')->dispatch(PrestashopBridgeEvents::USER_PROFIL_EDIT_SUCCESS, $event);
|
||||
}
|
||||
|
||||
if ($formUser->isSubmitted() && $formUser->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
return $this->render('admin/company_edit.html.twig', array(
|
||||
'form' => $form->createView(),
|
||||
'formUser' => $formUser->createView(),
|
||||
'company' => $company,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace AppBundle\Form\Admin;
|
||||
|
||||
use AppBundle\Entity\User;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class UserCompanyType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('email', null, array('required' => true, 'label' => 'Email'));
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
'data_class' => User::class,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -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(
|
||||
|
||||
@@ -2912,3 +2912,5 @@ a.link-white-underline {
|
||||
|
||||
/*Modules
|
||||
---------------------------------------------------*/
|
||||
|
||||
/*# sourceMappingURL=admin.css.map */
|
||||
|
||||
File diff suppressed because one or more lines are too long
+5867
-10159
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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",
|
||||
|
||||
@@ -20,7 +20,7 @@ $grey6 : #999CA2;
|
||||
$grey7 : #1E2327;
|
||||
|
||||
$orange: #ff9800;
|
||||
$orangeNewApp: #ffe600;
|
||||
$orangeNewApp: #FFCE00;
|
||||
|
||||
$font-1: 'Raleway', sans-serif;
|
||||
$font-2: "Varela Round", sans-serif;
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
.fix-search{
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
top: 89px;
|
||||
width: 100%;
|
||||
-webkit-transition: all 0.5s;
|
||||
-moz-transition: all 0.5s;
|
||||
|
||||
Reference in New Issue
Block a user