$codesPostaux = $city->codesPostaux ; | $codesPostaux = $city->codesPostaux ; | ||||
if($context == 'frontend') { | |||||
$label = '<span class="city">'.$city->nom.'</span> <span class="zip">'.$codesPostaux[0].'</span>' ; | |||||
} | |||||
else { | |||||
$label = $city->nom.' - '.$codesPostaux[0] ; | |||||
} | |||||
$return[] = [ | $return[] = [ | ||||
'label' => '<span class="city">'.$city->nom.'</span> <span class="zip">'.$codesPostaux[0].'</span>', | |||||
'label' => $label, | |||||
'city' => $city->nom, | 'city' => $city->nom, | ||||
'value' => $city->code | 'value' => $city->code | ||||
] ; | ] ; |
] ; | ] ; | ||||
$i = 0 ; | $i = 0 ; | ||||
foreach ($users as $user) { | foreach ($users as $user) { | ||||
$paramsTemplate['user'] =$user; | |||||
if(!isset($packageMessagesArray[$i])) { | if(!isset($packageMessagesArray[$i])) { | ||||
$packageMessagesArray[$i] = [] ; | $packageMessagesArray[$i] = [] ; | ||||
} | } | ||||
public function getNewsletter() | public function getNewsletter() | ||||
{ | { | ||||
$newsletter = $this->merchantUtils->getMerchantCurrent()->getNewsletter() ; | $newsletter = $this->merchantUtils->getMerchantCurrent()->getNewsletter() ; | ||||
if($newsletter) { | if($newsletter) { | ||||
return $newsletter ; | return $newsletter ; | ||||
} | } |
<?php | |||||
namespace Lc\ShopBundle\Controller\Backend; | |||||
use Doctrine\ORM\EntityManagerInterface; | |||||
use FOS\UserBundle\Model\UserManagerInterface; | |||||
use Lc\ShopBundle\Services\UtilsManager; | |||||
use Mailjet\MailjetSwiftMailer\SwiftMailer\MailjetTransport; | |||||
use Symfony\Component\Security\Core\Security; | |||||
use Symfony\Contracts\Translation\TranslatorInterface; | |||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; | |||||
class ReductionCartController extends AdminController | |||||
{ | |||||
public function updateReductionCartEntity($entity, $editForm = false) | |||||
{ | |||||
$displayError =false; | |||||
foreach ($entity->getCodes() as $code) { | |||||
$reductionCart = $this->orderUtils->getReductionCartByCode($code); | |||||
if ($reductionCart && $reductionCart->getId() != $entity->getId()) { | |||||
$this->addFlash('error', "Le code " . $code . " est déjà utilisé dans la réduction #" . $reductionCart->getId() . " " . $reductionCart->getTitle()); | |||||
$displayError = true; | |||||
} | |||||
} | |||||
if ($displayError == false) parent::updateEntity($entity); | |||||
} | |||||
/* public function persistProductFamilyEntity($entity, $newForm) | |||||
{ | |||||
$entity = $this->productFamilyUtils->processBeforePersistProductFamily($entity, $newForm); | |||||
$this->em->persist($entity); | |||||
$this->em->flush(); | |||||
}*/ | |||||
} | |||||
use Doctrine\ORM\EntityManagerInterface; | use Doctrine\ORM\EntityManagerInterface; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Event\EasyAdminEvents; | use EasyCorp\Bundle\EasyAdminBundle\Event\EasyAdminEvents; | ||||
use FOS\UserBundle\Model\UserManagerInterface; | use FOS\UserBundle\Model\UserManagerInterface; | ||||
use Lc\ShopBundle\Context\OrderShopInterface; | |||||
use Lc\ShopBundle\Context\UserInterface; | |||||
use Lc\ShopBundle\Form\Backend\Ticket\TicketMessageType; | use Lc\ShopBundle\Form\Backend\Ticket\TicketMessageType; | ||||
use Lc\ShopBundle\Form\Backend\Ticket\TicketStatusType; | use Lc\ShopBundle\Form\Backend\Ticket\TicketStatusType; | ||||
use Lc\ShopBundle\Model\Ticket; | use Lc\ShopBundle\Model\Ticket; | ||||
class TicketController extends AdminController | class TicketController extends AdminController | ||||
{ | { | ||||
protected $ticketUtils; | protected $ticketUtils; | ||||
protected $userUtils; | |||||
public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em, MailjetTransport $mailjetTransport, UtilsManager $utilsManager, TranslatorInterface $translator) | public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em, MailjetTransport $mailjetTransport, UtilsManager $utilsManager, TranslatorInterface $translator) | ||||
{ | { | ||||
$this->ticketUtils = $utilsManager->getTicketUtils(); | $this->ticketUtils = $utilsManager->getTicketUtils(); | ||||
$this->userUtils = $utilsManager->getUserUtils(); | |||||
parent::__construct($security, $userManager, $em, $mailjetTransport, $utilsManager, $translator); | parent::__construct($security, $userManager, $em, $mailjetTransport, $utilsManager, $translator); | ||||
} | } | ||||
public function persistTicketEntity($entity, $form) | |||||
{ | |||||
$entity->setStatus(Ticket::TICKET_STATUS_OPEN); | |||||
$ticket = $this->ticketUtils->createTicket([ | |||||
'user' => $entity->getUser(), | |||||
'type' => $entity->getType(), | |||||
'orderShop' => $entity->getOrderShop(), | |||||
'subject' => $entity->getSubject(), | |||||
'message' => $form->get('message')->getData(), | |||||
'createByAdmin' => true, | |||||
]); | |||||
} | |||||
protected function createListQueryBuilder($entityClass, $sortDirection, $sortField = null, $dqlFilter = null) | protected function createListQueryBuilder($entityClass, $sortDirection, $sortField = null, $dqlFilter = null) | ||||
{ | { | ||||
} | } | ||||
public function ticketStatusAction(){ | |||||
public function ticketStatusAction() | |||||
{ | |||||
$easyadmin = $this->request->attributes->get('easyadmin'); | $easyadmin = $this->request->attributes->get('easyadmin'); | ||||
$ticket = $easyadmin['item']; | $ticket = $easyadmin['item']; | ||||
$formTicketStatusForm->handleRequest($this->request); | $formTicketStatusForm->handleRequest($this->request); | ||||
if ($formTicketStatusForm->isSubmitted() && $formTicketStatusForm->isValid()) { | if ($formTicketStatusForm->isSubmitted() && $formTicketStatusForm->isValid()) { | ||||
$this->em->persist($ticket); | |||||
$this->em->flush(); | |||||
$this->em->persist($ticket); | |||||
$this->em->flush(); | |||||
$this->utils->addFlash('success', 'success.ticket.statusChange'); | |||||
$this->utils->addFlash('success', 'success.ticket.statusChange'); | |||||
} else { | } else { | ||||
$this->utils->addFlash('error', $formTicketStatusForm->getErrors()); | $this->utils->addFlash('error', $formTicketStatusForm->getErrors()); | ||||
} | } | ||||
return new Response(json_encode($response)); | return new Response(json_encode($response)); | ||||
} | } | ||||
public function newMessageTicketAction(){ | |||||
public function newMessageTicketAction() | |||||
{ | |||||
$easyadmin = $this->request->attributes->get('easyadmin'); | $easyadmin = $this->request->attributes->get('easyadmin'); | ||||
$ticket = $easyadmin['item']; | $ticket = $easyadmin['item']; | ||||
if ($formAddTicketMessage->isSubmitted() && $formAddTicketMessage->isValid()) { | if ($formAddTicketMessage->isSubmitted() && $formAddTicketMessage->isValid()) { | ||||
$this->ticketUtils->createTicketMessage(array( | $this->ticketUtils->createTicketMessage(array( | ||||
'ticket'=>$ticket, | |||||
'message'=> $formAddTicketMessage->get('message')->getData(), | |||||
'answerByAdmin'=>true | |||||
'ticket' => $ticket, | |||||
'message' => $formAddTicketMessage->get('message')->getData(), | |||||
'answerByAdmin' => true | |||||
)); | )); | ||||
$this->utils->addFlash('success', 'success.ticket.addMessage'); | $this->utils->addFlash('success', 'success.ticket.addMessage'); | ||||
'id' => $ticket->getId() | 'id' => $ticket->getId() | ||||
]); | ]); | ||||
} | } | ||||
public function newAction() | |||||
{ | |||||
$this->dispatch(EasyAdminEvents::PRE_NEW); | |||||
$entity = $this->executeDynamicMethod('createNew<EntityName>Entity'); | |||||
$easyadmin = $this->request->attributes->get('easyadmin'); | |||||
$easyadmin['item'] = $entity; | |||||
$this->request->attributes->set('easyadmin', $easyadmin); | |||||
$fields = $this->entity['new']['fields']; | |||||
$newForm = $this->executeDynamicMethod('create<EntityName>NewForm', [$entity, $fields]); | |||||
if ($this->request->request->get('user')) { | |||||
$userRepo = $this->em->getRepository(UserInterface::class); | |||||
$newForm->get('user')->setData($userRepo->find($this->request->request->get('user'))); | |||||
} | |||||
if ($this->request->request->get('orderId')) { | |||||
$newForm->get('orderId')->setData($this->request->request->get('orderId')); | |||||
} | |||||
$newForm->handleRequest($this->request); | |||||
if ($newForm->isSubmitted() && $newForm->isValid()) { | |||||
if ($newForm->get('orderId')->getData()) { | |||||
$orderShopRepo = $this->em->getRepository(OrderShopInterface::class); | |||||
$orderShop = $orderShopRepo->find($newForm->get('orderId')->getData()); | |||||
if($orderShop)$entity->setOrderShop($orderShop); | |||||
} | |||||
$this->processUploadedFiles($newForm); | |||||
$this->dispatch(EasyAdminEvents::PRE_PERSIST, ['entity' => $entity]); | |||||
$this->executeDynamicMethod('persist<EntityName>Entity', [$entity, $newForm]); | |||||
$this->dispatch(EasyAdminEvents::POST_PERSIST, ['entity' => $entity]); | |||||
$this->utils->addFlash('success', 'success.ticket.addMessage'); | |||||
if ($this->request->isXmlHttpRequest()) { | |||||
$response['type'] = 'success'; | |||||
$response['flashMessages'] = $this->utils->getFlashMessages(); | |||||
return new Response(json_encode($response)); | |||||
} else { | |||||
return $this->redirectToReferrer(); | |||||
} | |||||
} | |||||
$this->dispatch(EasyAdminEvents::POST_NEW, [ | |||||
'entity_fields' => $fields, | |||||
'form' => $newForm, | |||||
'entity' => $entity, | |||||
]); | |||||
$parameters = [ | |||||
'form' => $newForm->createView(), | |||||
'entity_fields' => $fields, | |||||
'entity' => $entity, | |||||
]; | |||||
if ($this->request->isXmlHttpRequest()) { | |||||
$response['modal'] = $this->renderView('@LcShop/backend/ticket/modal/create.html.twig', $parameters); | |||||
return new Response(json_encode($response)); | |||||
} else { | |||||
return $this->executeDynamicMethod('render<EntityName>Template', ['new', $this->entity['templates']['new'], $parameters]); | |||||
} | |||||
} | |||||
} | } |
use Lc\ShopBundle\Context\FilterMerchantInterface; | use Lc\ShopBundle\Context\FilterMerchantInterface; | ||||
use Lc\ShopBundle\Context\FilterMultipleMerchantsInterface; | use Lc\ShopBundle\Context\FilterMultipleMerchantsInterface; | ||||
use Lc\ShopBundle\Context\ProductFamilyInterface; | |||||
use Lc\ShopBundle\Context\StatusInterface; | use Lc\ShopBundle\Context\StatusInterface; | ||||
use Symfony\Component\DependencyInjection\Container; | use Symfony\Component\DependencyInjection\Container; | ||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||||
}else {*/ | }else {*/ | ||||
if ($entityObject instanceof ProductFamilyInterface) { | |||||
$paginator->nbResultsOnSale = $entityRepo->count(array('saleStatus' =>1, 'status'=> 1, 'merchant'=> $criteria['merchant'])); | |||||
} | |||||
if ($entityObject instanceof StatusInterface) { | if ($entityObject instanceof StatusInterface) { | ||||
for ($status = -1; $status <= 1; $status++) { | for ($status = -1; $status <= 1; $status++) { |
$builder | $builder | ||||
->add('reductionCart', EntityType::class, array( | ->add('reductionCart', EntityType::class, array( | ||||
'class' => $reductionCartClass->getName(), | 'class' => $reductionCartClass->getName(), | ||||
'choices' => $reductionCartRepo->getEligibleReductionCart($entity), | |||||
'choices' => $reductionCartRepo->getOnlineReductionCart(), | |||||
'required' => true, | 'required' => true, | ||||
'mapped'=>false | 'mapped'=>false | ||||
)); | )); |
namespace Lc\ShopBundle\Form\Backend\ProductFamily; | namespace Lc\ShopBundle\Form\Backend\ProductFamily; | ||||
use Doctrine\ORM\EntityManagerInterface; | use Doctrine\ORM\EntityManagerInterface; | ||||
use Doctrine\ORM\EntityRepository; | |||||
use Lc\ShopBundle\Context\ProductInterface; | use Lc\ShopBundle\Context\ProductInterface; | ||||
use Lc\ShopBundle\Context\ReductionCartInterface; | |||||
use Lc\ShopBundle\Context\UnitInterface; | use Lc\ShopBundle\Context\UnitInterface; | ||||
use Lc\ShopBundle\Model\ReductionCart; | |||||
use Lc\ShopBundle\Services\Utils; | use Lc\ShopBundle\Services\Utils; | ||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | use Symfony\Bridge\Doctrine\Form\Type\EntityType; | ||||
use Symfony\Component\Form\Extension\Core\Type\DateType; | use Symfony\Component\Form\Extension\Core\Type\DateType; | ||||
$builder->add('exportNote', TextType::class, array( | $builder->add('exportNote', TextType::class, array( | ||||
'required' =>false | 'required' =>false | ||||
)); | )); | ||||
$reductionCartClass = $this->em->getClassMetadata(ReductionCartInterface::class)->getName(); | |||||
$reductionCartRepo = $this->em->getRepository(ReductionCartInterface::class); | |||||
/* $builder->add('giftVoucherReductionCart', EntityType::class, array( | |||||
'required' =>false, | |||||
'class'=> $reductionCartClass, | |||||
'choices' => $reductionCartRepo->getOnlineReductionCart(), | |||||
));*/ | |||||
} | } | ||||
<?php | |||||
namespace Lc\ShopBundle\Form\Backend\Ticket; | |||||
use App\Entity\Product; | |||||
use Doctrine\ORM\EntityManagerInterface; | |||||
use Lc\ShopBundle\Context\CreditHistoryInterface; | |||||
use Lc\ShopBundle\Context\OrderProductInterface; | |||||
use Lc\ShopBundle\Context\OrderReductionCartInterface; | |||||
use Lc\ShopBundle\Context\OrderShopInterface; | |||||
use Lc\ShopBundle\Context\OrderUtilsInterface; | |||||
use Lc\ShopBundle\Context\ProductInterface; | |||||
use Lc\ShopBundle\Context\ReductionCartInterface; | |||||
use Lc\ShopBundle\Context\ReductionCreditInterface; | |||||
use Lc\ShopBundle\Context\TicketInterface; | |||||
use Lc\ShopBundle\Context\TicketMessageInterface; | |||||
use Lc\ShopBundle\Form\DataTransformer\ProductToIdTransformer; | |||||
use Lc\ShopBundle\Model\CreditHistory; | |||||
use Lc\ShopBundle\Model\Ticket; | |||||
use Lc\ShopBundle\Services\Utils; | |||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | |||||
use Symfony\Component\Form\AbstractType; | |||||
use Symfony\Component\Form\Extension\Core\Type\ButtonType; | |||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | |||||
use Symfony\Component\Form\Extension\Core\Type\DateType; | |||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType; | |||||
use Symfony\Component\Form\Extension\Core\Type\MoneyType; | |||||
use Symfony\Component\Form\Extension\Core\Type\NumberType; | |||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextType; | |||||
use Symfony\Component\Form\FormBuilderInterface; | |||||
use Symfony\Component\Form\FormEvent; | |||||
use Symfony\Component\Form\FormEvents; | |||||
use Symfony\Component\OptionsResolver\OptionsResolver; | |||||
class TicketTypeType extends AbstractType | |||||
{ | |||||
protected $em; | |||||
public function __construct(EntityManagerInterface $em) | |||||
{ | |||||
$this->em = $em; | |||||
} | |||||
public function buildForm(FormBuilderInterface $builder, array $options) | |||||
{ | |||||
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event){ | |||||
$builder = $event->getForm()->getParent(); | |||||
$builder->add('type', ChoiceType::class, [ | |||||
'label' => 'field.Ticket.type', | |||||
'multiple' => false, | |||||
'expanded' => false, | |||||
'choices' => [ | |||||
'field.Ticket.typeOptions.' . Ticket::TYPE_MESSAGE_FROM_PDL => Ticket::TYPE_MESSAGE_FROM_PDL, | |||||
'field.Ticket.typeOptions.' . Ticket::TYPE_GENERAL_QUESTION => Ticket::TYPE_GENERAL_QUESTION, | |||||
'field.Ticket.typeOptions.' . Ticket::TYPE_PRODUCT_UNAVAILABLE => Ticket::TYPE_PRODUCT_UNAVAILABLE, | |||||
'field.Ticket.typeOptions.' . Ticket::TYPE_PRODUCT_ERROR => Ticket::TYPE_PRODUCT_ERROR, | |||||
'field.Ticket.typeOptions.' . Ticket::TYPE_TECHNICAL_PROBLEM => Ticket::TYPE_TECHNICAL_PROBLEM, | |||||
'field.Ticket.typeOptions.' . Ticket::TYPE_POULTRY_BOOKING => Ticket::TYPE_POULTRY_BOOKING, | |||||
], | |||||
'translation_domain' => 'lcshop', | |||||
]); | |||||
}); | |||||
} | |||||
public function configureOptions(OptionsResolver $resolver) | |||||
{ | |||||
$resolver->setDefaults([ | |||||
'data_class' => $this->em->getClassMetadata(TicketInterface::class)->getName(), | |||||
'translation_domain' => 'lcshop' | |||||
]); | |||||
} | |||||
} |
<?php | |||||
namespace Lc\ShopBundle\Form\Frontend; | |||||
use App\Entity\Address; | |||||
use App\Entity\OrderShop; | |||||
use Doctrine\ORM\EntityManagerInterface; | |||||
use Lc\ShopBundle\Model\Ticket; | |||||
use Lc\ShopBundle\Services\UtilsManager; | |||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | |||||
use Symfony\Component\Form\AbstractType; | |||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | |||||
use Symfony\Component\Form\Extension\Core\Type\DateTimeType; | |||||
use Symfony\Component\Form\Extension\Core\Type\DateType; | |||||
use Symfony\Component\Form\Extension\Core\Type\EmailType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextType; | |||||
use Symfony\Component\Form\FormBuilderInterface; | |||||
use Symfony\Component\OptionsResolver\OptionsResolver; | |||||
use Symfony\Component\Security\Core\Security; | |||||
class EditGiftVoucherType extends AbstractType | |||||
{ | |||||
protected $orderShopRepository ; | |||||
protected $security ; | |||||
protected $em ; | |||||
protected $priceUtils ; | |||||
public function buildForm(FormBuilderInterface $builder, array $options) | |||||
{ | |||||
$builder->add('activationDate', DateType::class, [ | |||||
'label' => 'Date d\'activation de votre bon cadeau :', | |||||
'widget'=> 'single_text', | |||||
'help'=> 'Date à partir de laquelle la personne pourra utiliser ce bon cadeau.' | |||||
//'format'=> 'dd/MM/yyyy' | |||||
]) | |||||
->add('title', TextType::class, [ | |||||
'label' => 'Message personnalisé affiché dans le bon cadeau :', | |||||
'help'=> 'Exemple "Joyeux Noël Tata Suzanne !"' | |||||
]) | |||||
->add('email', EmailType::class, [ | |||||
'label' => 'Email de la personne à qui vous souhaitez offrir ce bon cadeau :', | |||||
'help'=> 'Le bon ne sera utilisable qu\'avec cet adresse e-mail' | |||||
]) | |||||
->add('ownerName', TextType::class,[ | |||||
'label' => 'Offert par :', | |||||
'help'=> 'Sera affiché dans le bon cadeau' | |||||
]); | |||||
} | |||||
public function configureOptions(OptionsResolver $resolver) | |||||
{ | |||||
$resolver->setDefaults([ | |||||
// Configure your form options here | |||||
]); | |||||
} | |||||
} |
namespace Lc\ShopBundle\Form\Frontend; | namespace Lc\ShopBundle\Form\Frontend; | ||||
use Lc\ShopBundle\Services\UtilsManager; | |||||
use Lc\ShopBundle\Validator\Constraints\UniqueEmailValidator; | use Lc\ShopBundle\Validator\Constraints\UniqueEmailValidator; | ||||
use Symfony\Component\Form\Extension\Core\Type\EmailType; | use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||||
use Symfony\Component\Form\AbstractType; | use Symfony\Component\Form\AbstractType; | ||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType; | |||||
use Symfony\Component\Form\FormBuilderInterface; | use Symfony\Component\Form\FormBuilderInterface; | ||||
use Symfony\Component\OptionsResolver\OptionsResolver; | use Symfony\Component\OptionsResolver\OptionsResolver; | ||||
use Symfony\Component\Validator\Constraints\Email; | |||||
use Symfony\Component\Validator\Constraints\EqualTo; | |||||
use Symfony\Component\Validator\Constraints\GreaterThanOrEqual; | |||||
use Symfony\Component\Validator\Constraints\NotNull; | |||||
class NewsletterType extends AbstractType | class NewsletterType extends AbstractType | ||||
{ | { | ||||
protected $utils ; | |||||
public function __construct(UtilsManager $utilsManager) | |||||
{ | |||||
$this->utils = $utilsManager->getUtils() ; | |||||
} | |||||
public function buildForm(FormBuilderInterface $builder, array $options) | public function buildForm(FormBuilderInterface $builder, array $options) | ||||
{ | { | ||||
$builder->add('email', EmailType::class, [ | $builder->add('email', EmailType::class, [ | ||||
'label' => 'Renseignez votre adresse email :' | |||||
'label' => 'Renseignez votre adresse email :', | |||||
'constraints' => [ | |||||
new Email(), | |||||
new NotNull() | |||||
] | |||||
]); | ]); | ||||
// captcha | |||||
$this->utils->addCaptchaType($builder); | |||||
} | } | ||||
public function configureOptions(OptionsResolver $resolver) | public function configureOptions(OptionsResolver $resolver) |
namespace Lc\ShopBundle\Form\Frontend; | namespace Lc\ShopBundle\Form\Frontend; | ||||
use FOS\UserBundle\Form\Type\RegistrationFormType as BaseRegistrationFormType; | use FOS\UserBundle\Form\Type\RegistrationFormType as BaseRegistrationFormType; | ||||
use Lc\ShopBundle\Services\UtilsManager; | |||||
use Symfony\Component\Form\AbstractType; | use Symfony\Component\Form\AbstractType; | ||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | ||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||||
class RegistrationType extends AbstractType | class RegistrationType extends AbstractType | ||||
{ | { | ||||
protected $utils ; | |||||
public function __construct(UtilsManager $utilsManager) | |||||
{ | |||||
$this->utils = $utilsManager->getUtils() ; | |||||
} | |||||
public function getParent() | public function getParent() | ||||
{ | { | ||||
return BaseRegistrationFormType::class; | return BaseRegistrationFormType::class; | ||||
'translation_domain' => 'lcshop', | 'translation_domain' => 'lcshop', | ||||
]) | ]) | ||||
->add('subscribeNewsletter', CheckboxType::class, [ | ->add('subscribeNewsletter', CheckboxType::class, [ | ||||
'data' => true, | |||||
'label' => 'field.default.subscribeNewsletter', | 'label' => 'field.default.subscribeNewsletter', | ||||
'required' => false, | 'required' => false, | ||||
'mapped' => false, | 'mapped' => false, | ||||
'translation_domain' => 'lcshop', | 'translation_domain' => 'lcshop', | ||||
'help' => 'Un seul mail par semaine qui annonce l’ouverture des ventes, les nouveautés et promotions de la semaine ainsi que des informations utiles.' | |||||
]); | ]); | ||||
// captcha | |||||
$this->utils->addCaptchaType($builder); | |||||
} | } | ||||
<?php | |||||
namespace Lc\ShopBundle\Form\Frontend; | |||||
use App\Entity\Address; | |||||
use App\Entity\OrderShop; | |||||
use Doctrine\ORM\EntityManagerInterface; | |||||
use Lc\ShopBundle\Model\Ticket; | |||||
use Lc\ShopBundle\Services\UtilsManager; | |||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | |||||
use Symfony\Component\Form\AbstractType; | |||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | |||||
use Symfony\Component\Form\Extension\Core\Type\DateTimeType; | |||||
use Symfony\Component\Form\Extension\Core\Type\DateType; | |||||
use Symfony\Component\Form\Extension\Core\Type\EmailType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextType; | |||||
use Symfony\Component\Form\FormBuilderInterface; | |||||
use Symfony\Component\OptionsResolver\OptionsResolver; | |||||
use Symfony\Component\Security\Core\Security; | |||||
class SendGiftVoucherType extends AbstractType | |||||
{ | |||||
protected $orderShopRepository ; | |||||
protected $security ; | |||||
protected $em ; | |||||
protected $priceUtils ; | |||||
public function buildForm(FormBuilderInterface $builder, array $options) | |||||
{ | |||||
$builder->add('message', TextareaType::class, [ | |||||
'label' => 'Message personnalisé', | |||||
]); | |||||
} | |||||
public function configureOptions(OptionsResolver $resolver) | |||||
{ | |||||
$resolver->setDefaults([ | |||||
// Configure your form options here | |||||
]); | |||||
} | |||||
} |
*/ | */ | ||||
protected $reductionCredit; | protected $reductionCredit; | ||||
/** | |||||
* @ORM\Column(type="string", length=255) | |||||
*/ | |||||
protected $type; | |||||
public function __toString() | public function __toString() | ||||
{ | { | ||||
return $this->title; | return $this->title; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getType(): ?string | |||||
{ | |||||
return $this->type; | |||||
} | |||||
public function setType(string $type): self | |||||
{ | |||||
$this->type = $type; | |||||
return $this; | |||||
} | |||||
} | } |
*/ | */ | ||||
protected $productFamilies; | protected $productFamilies; | ||||
/** | |||||
* @ORM\Column(type="boolean") | |||||
*/ | |||||
protected $saleStatus; | |||||
public function __construct() | public function __construct() | ||||
{ | { | ||||
$this->childrens = new ArrayCollection(); | $this->childrens = new ArrayCollection(); | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getSaleStatus(): ?bool | |||||
{ | |||||
return $this->saleStatus; | |||||
} | |||||
public function setSaleStatus(bool $saleStatus): self | |||||
{ | |||||
$this->saleStatus = $saleStatus; | |||||
return $this; | |||||
} | |||||
} | } |
protected $behaviorPrice; | protected $behaviorPrice; | ||||
/** | |||||
* @ORM\Column(type="boolean") | |||||
*/ | |||||
protected $saleStatus; | |||||
public function __construct() | public function __construct() | ||||
{ | { | ||||
$this->productCategories = new ArrayCollection(); | $this->productCategories = new ArrayCollection(); | ||||
return false ; | return false ; | ||||
} | } | ||||
public function getSaleStatus(): ?bool | |||||
{ | |||||
return $this->saleStatus; | |||||
} | |||||
public function setSaleStatus(bool $saleStatus): self | |||||
{ | |||||
$this->saleStatus = $saleStatus; | |||||
return $this; | |||||
} | |||||
} | } |
*/ | */ | ||||
protected $uncombinableTypes = []; | protected $uncombinableTypes = []; | ||||
/** | |||||
* @ORM\Column(type="integer", nullable=true) | |||||
*/ | |||||
protected $availableQuantityPerCode; | |||||
public function __toString() | public function __toString() | ||||
{ | { | ||||
return $this->title; | return $this->title; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getAvailableQuantityPerCode(): ?int | |||||
{ | |||||
return $this->availableQuantityPerCode; | |||||
} | |||||
public function setAvailableQuantityPerCode(int $availableQuantityPerCode): self | |||||
{ | |||||
$this->availableQuantityPerCode = $availableQuantityPerCode; | |||||
return $this; | |||||
} | |||||
} | } |
*/ | */ | ||||
abstract class ReductionCredit extends AbstractEntity implements ReductionInterface, FilterMerchantInterface, StatusInterface | abstract class ReductionCredit extends AbstractEntity implements ReductionInterface, FilterMerchantInterface, StatusInterface | ||||
{ | { | ||||
const TYPE_CREDIT = 'credit' ; | |||||
const TYPE_GIFT = 'gift' ; | |||||
use ReductionTrait; | use ReductionTrait; | ||||
use StatusTrait; | use StatusTrait; | ||||
*/ | */ | ||||
protected $merchant; | protected $merchant; | ||||
/** | |||||
* @ORM\Column(type="string", length=255) | |||||
*/ | |||||
protected $type; | |||||
/** | |||||
* @ORM\Column(type="boolean", nullable=true) | |||||
*/ | |||||
protected $sended; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||||
*/ | |||||
protected $owner; | |||||
public function __construct() | public function __construct() | ||||
{ | { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getType(): ?string | |||||
{ | |||||
return $this->type; | |||||
} | |||||
public function setType(string $type): self | |||||
{ | |||||
$this->type = $type; | |||||
return $this; | |||||
} | |||||
public function getSended(): ?bool | |||||
{ | |||||
return $this->sended; | |||||
} | |||||
public function setSended(?bool $sended): self | |||||
{ | |||||
$this->sended = $sended; | |||||
return $this; | |||||
} | |||||
public function getOwner(): ?User | |||||
{ | |||||
return $this->owner; | |||||
} | |||||
public function setOwner(?User $owner): self | |||||
{ | |||||
$this->owner = $owner; | |||||
return $this; | |||||
} | |||||
} | } |
trait ReductionTrait | trait ReductionTrait | ||||
{ | { | ||||
/** | /** | ||||
* @ORM\Column(type="float", nullable=true) | * @ORM\Column(type="float", nullable=true) | ||||
*/ | */ |
const TYPE_TECHNICAL_PROBLEM = 'technical-problem' ; | const TYPE_TECHNICAL_PROBLEM = 'technical-problem' ; | ||||
const TYPE_GENERAL_QUESTION = 'general-question' ; | const TYPE_GENERAL_QUESTION = 'general-question' ; | ||||
const TYPE_POULTRY_BOOKING = 'poultry-booking' ; | const TYPE_POULTRY_BOOKING = 'poultry-booking' ; | ||||
const TYPE_MESSAGE_FROM_PDL = 'message-from-pdl' ; | |||||
const TICKET_STATUS_OPEN = 'open' ; | const TICKET_STATUS_OPEN = 'open' ; |
return OrderShopInterface::class; | return OrderShopInterface::class; | ||||
} | } | ||||
public function countValidOrderWithReductionCredit($reductionCredit, $user) | |||||
public function countValidOrderWithReductionCredit($reductionCredit, $user=null) | |||||
{ | { | ||||
$query = $this->findByMerchantQuery(); | $query = $this->findByMerchantQuery(); | ||||
$query = $this->filterOrderValid($query); | $query = $this->filterOrderValid($query); | ||||
$query->select('count(e.id)'); | $query->select('count(e.id)'); | ||||
$query->andWhere('e.user = :user'); | |||||
if($user) { | |||||
$query->andWhere('e.user = :user'); | |||||
$query->setParameter('user', $user); | |||||
} | |||||
$query->innerJoin('e.orderReductionCredits', 'orc'); | $query->innerJoin('e.orderReductionCredits', 'orc'); | ||||
$query->andWhere('orc.reductionCredit = :reductionCredit'); | $query->andWhere('orc.reductionCredit = :reductionCredit'); | ||||
$query->setParameter('reductionCredit', $reductionCredit); | $query->setParameter('reductionCredit', $reductionCredit); | ||||
$query->setParameter('user', $user); | |||||
return $query->getQuery()->getSingleScalarResult(); | return $query->getQuery()->getSingleScalarResult(); | ||||
} | } | ||||
} | } | ||||
public function filterOrderValid(?QueryBuilder $query): QueryBuilder | |||||
{ | |||||
return $this->_filterOrderStatus($query, OrderStatus::$statusAliasAsValid) ; | |||||
} | |||||
public function filterOrderWaitingDelivery($query) | public function filterOrderWaitingDelivery($query) | ||||
{ | { | ||||
{ | { | ||||
return $this->_filterOrderStatus($query, OrderStatus::$statusAliasAsCart) ; | return $this->_filterOrderStatus($query, OrderStatus::$statusAliasAsCart) ; | ||||
} | } | ||||
public function filterOrderValid(?QueryBuilder $query): QueryBuilder | |||||
{ | |||||
return $this->_filterOrderStatus($query, OrderStatus::$statusAliasAsValid) ; | |||||
} | |||||
private function _filterOrderStatus($query, $statusArray) { | private function _filterOrderStatus($query, $statusArray) { | ||||
$query->leftJoin('e.orderStatus', 'os'); | $query->leftJoin('e.orderStatus', 'os'); | ||||
} | } | ||||
$setParameterHorsTournee = false ; | $setParameterHorsTournee = false ; | ||||
$setParameterGiftVoucher = false ; | |||||
if (isset($params['isCircuit'])) { | |||||
if(isset($params['isCircuit'])) { | |||||
$query->leftJoin('e.deliveryPointSale', 'pointSale'); | $query->leftJoin('e.deliveryPointSale', 'pointSale'); | ||||
$query->andWhere('e.deliveryPointSale IS NULL OR (pointSale.isDepository = 0 AND (pointSale.devAlias IS NULL OR pointSale.devAlias != :devAliasHorsTournee))'); | |||||
$query->andWhere('e.deliveryPointSale IS NULL OR (pointSale.isDepository = 0 AND (pointSale.devAlias IS NULL OR (pointSale.devAlias != :devAliasHorsTournee AND pointSale.devAlias != :devAliasGiftVoucher)))'); | |||||
$setParameterHorsTournee = true ; | $setParameterHorsTournee = true ; | ||||
$setParameterGiftVoucher = true ; | |||||
} | } | ||||
if (isset($params['isDepository'])) { | |||||
if(isset($params['isDepository'])) { | |||||
$query->innerJoin('e.deliveryPointSale', 'pointSale'); | $query->innerJoin('e.deliveryPointSale', 'pointSale'); | ||||
$query->andWhere('pointSale IS NOT NULL AND pointSale.isDepository = 1 AND (pointSale.devAlias IS NULL OR pointSale.devAlias != :devAliasHorsTournee)'); | |||||
$query->andWhere('pointSale IS NOT NULL AND pointSale.isDepository = 1 AND (pointSale.devAlias IS NULL OR (pointSale.devAlias != :devAliasHorsTournee AND pointSale.devAlias != :devAliasGiftVoucher))'); | |||||
$setParameterHorsTournee = true ; | $setParameterHorsTournee = true ; | ||||
$setParameterGiftVoucher = true ; | |||||
} | } | ||||
if (isset($params['isOffCircuit'])) { | |||||
if(isset($params['isOffCircuit'])) { | |||||
$query->innerJoin('e.deliveryPointSale', 'pointSale'); | $query->innerJoin('e.deliveryPointSale', 'pointSale'); | ||||
$query->andWhere('pointSale IS NOT NULL AND pointSale.devAlias = :devAliasHorsTournee'); | $query->andWhere('pointSale IS NOT NULL AND pointSale.devAlias = :devAliasHorsTournee'); | ||||
$setParameterHorsTournee = true ; | $setParameterHorsTournee = true ; | ||||
} | } | ||||
if(isset($params['isGiftVoucher'])) { | |||||
$query->innerJoin('e.deliveryPointSale', 'pointSale'); | |||||
$query->andWhere('pointSale IS NOT NULL AND pointSale.devAlias = :devAliasGiftVoucher'); | |||||
$setParameterGiftVoucher = true ; | |||||
} | |||||
if($setParameterHorsTournee) { | if($setParameterHorsTournee) { | ||||
$query->setParameter('devAliasHorsTournee', 'horstournee') ; | $query->setParameter('devAliasHorsTournee', 'horstournee') ; | ||||
} | } | ||||
if($setParameterGiftVoucher) { | |||||
$query->setParameter('devAliasGiftVoucher', 'giftvoucher') ; | |||||
} | |||||
if (isset($params['deliveryAvailability'])) { | if (isset($params['deliveryAvailability'])) { | ||||
$deliveryAvailability = $params['deliveryAvailability'] ; | $deliveryAvailability = $params['deliveryAvailability'] ; | ||||
$query->orderBy('e.id', 'DESC'); | $query->orderBy('e.id', 'DESC'); | ||||
} | } | ||||
if (isset($params['groupBy'])) { | if (isset($params['groupBy'])) { | ||||
$query->groupBy( $params['groupBy']); | $query->groupBy( $params['groupBy']); | ||||
} | } |
$query->andWhere('e.status = 1'); | $query->andWhere('e.status = 1'); | ||||
$query->andWhere(':now <= e.propertyNoveltyExpirationDate') | $query->andWhere(':now <= e.propertyNoveltyExpirationDate') | ||||
->setParameter('now', new \DateTime()) ; | ->setParameter('now', new \DateTime()) ; | ||||
$query->orderBy('e.createdAt', 'DESC'); | |||||
return $query->getQuery()->getResult() ; | return $query->getQuery()->getResult() ; | ||||
} | } |
} | } | ||||
public function getEligibleReductionCart($order) | |||||
public function getOnlineReductionCart() | |||||
{ | { | ||||
$query = $this->findByMerchantQuery() ; | $query = $this->findByMerchantQuery() ; | ||||
$query->andWhere('e.status = 1'); | $query->andWhere('e.status = 1'); | ||||
foreach($reductionCarts as $reductionCart) { | foreach($reductionCarts as $reductionCart) { | ||||
if($this->orderUtils->isReductionCartMatchWithUser($reductionCart, $user) | if($this->orderUtils->isReductionCartMatchWithUser($reductionCart, $user) | ||||
&& $this->orderUtils->isReductionCartMatchWithGroupUser($reductionCart, $user) | && $this->orderUtils->isReductionCartMatchWithGroupUser($reductionCart, $user) | ||||
&& $this->orderUtils->countReductionCartAvailableForUser($reductionCart, $user)) { | |||||
&& $this->orderUtils->countReductionCartAvailableForUser($reductionCart, $user) | |||||
&& ($reductionCart->getUsers()->count() > 0 || $reductionCart->getGroupUsers()->count() > 0)) { | |||||
$reductionCartsArray[] = $reductionCart ; | $reductionCartsArray[] = $reductionCart ; | ||||
} | } |
use Lc\ShopBundle\Context\DefaultRepositoryInterface; | use Lc\ShopBundle\Context\DefaultRepositoryInterface; | ||||
use Lc\ShopBundle\Context\MerchantUtilsInterface; | use Lc\ShopBundle\Context\MerchantUtilsInterface; | ||||
use Lc\ShopBundle\Context\ReductionCreditInterface; | use Lc\ShopBundle\Context\ReductionCreditInterface; | ||||
use Lc\ShopBundle\Model\ReductionCredit; | |||||
/** | /** | ||||
* @method ReductionCreditInterface|null find($id, $lockMode = null, $lockVersion = null) | * @method ReductionCreditInterface|null find($id, $lockMode = null, $lockVersion = null) | ||||
{ | { | ||||
$query = $this->findByMerchantQuery() ; | $query = $this->findByMerchantQuery() ; | ||||
$query->andWhere('e.status = 1'); | $query->andWhere('e.status = 1'); | ||||
$query->andWhere('e.type = :type'); | |||||
$query->andWhere(':user MEMBER OF e.users'); | $query->andWhere(':user MEMBER OF e.users'); | ||||
$query->setParameter('user', $user); | $query->setParameter('user', $user); | ||||
$query->setParameter('type', ReductionCredit::TYPE_CREDIT); | |||||
return $query->getQuery()->getResult() ; | |||||
} | |||||
public function findReductionGiftToUseByUser($user){ | |||||
$query = $this->findByMerchantQuery() ; | |||||
$query->andWhere('e.status = 1'); | |||||
$query->andWhere('e.type = :type'); | |||||
$query->andWhere(':user MEMBER OF e.users'); | |||||
$query->andWhere(':now > e.activationDate'); | |||||
$query->setParameter('now', new \DateTime()) ; | |||||
$query->setParameter('user', $user); | |||||
$query->setParameter('type', ReductionCredit::TYPE_GIFT); | |||||
return $query->getQuery()->getResult() ; | |||||
} | |||||
public function findReductionGiftOwnedByUser($user){ | |||||
$query = $this->findByMerchantQuery() ; | |||||
$query->leftJoin('e.users', 'u'); | |||||
$query->having('COUNT(u.id) =0'); | |||||
$query->andWhere('e.status = 1'); | |||||
$query->andWhere('e.type = :type'); | |||||
$query->andWhere('e.owner = :user'); | |||||
$query->setParameter('user', $user); | |||||
$query->setParameter('type', ReductionCredit::TYPE_GIFT); | |||||
$query->groupBy('e.id'); | |||||
return $query->getQuery()->getResult() ; | |||||
} | |||||
public function findReductionGiftOwnedActiveByUser($user){ | |||||
$query = $this->findByMerchantQuery() ; | |||||
$query->leftJoin('e.users', 'u'); | |||||
$query->having('COUNT(u.id) >0'); | |||||
$query->andWhere('e.status = 1'); | |||||
$query->andWhere('e.type = :type'); | |||||
$query->andWhere('e.owner = :user'); | |||||
$query->setParameter('user', $user); | |||||
$query->setParameter('type', ReductionCredit::TYPE_GIFT); | |||||
$query->groupBy('e.id'); | |||||
return $query->getQuery()->getResult() ; | return $query->getQuery()->getResult() ; | ||||
} | } | ||||
} | } |
body#pdl-body .wrapper .main-sidebar { | body#pdl-body .wrapper .main-sidebar { | ||||
bottom: 0; | bottom: 0; | ||||
float: none; | float: none; | ||||
height: 100vh; | |||||
height: 110vh; | |||||
left: 0; | left: 0; | ||||
position: fixed; | position: fixed; | ||||
top: 0; | top: 0; | ||||
} | } | ||||
/* line 41, ../../sass/backend/custom.scss */ | /* line 41, ../../sass/backend/custom.scss */ | ||||
body#pdl-body .wrapper .sidebar { | |||||
height: 100%; | |||||
} | |||||
/* line 42, ../../sass/backend/custom.scss */ | |||||
body#pdl-body .wrapper .sidebar nav { | |||||
padding-bottom: 40px; | |||||
} | |||||
/* line 43, ../../sass/backend/custom.scss */ | |||||
body#pdl-body .wrapper .content-wrapper { | body#pdl-body .wrapper .content-wrapper { | ||||
margin-top: 0; | margin-top: 0; | ||||
padding-top: 57px; | padding-top: 57px; | ||||
} | } | ||||
/* line 42, ../../sass/backend/custom.scss */ | |||||
/* line 44, ../../sass/backend/custom.scss */ | |||||
.sidebar { | .sidebar { | ||||
overflow-y: auto; | overflow-y: auto; | ||||
} | } | ||||
/* line 45, ../../sass/backend/custom.scss */ | |||||
/* line 47, ../../sass/backend/custom.scss */ | |||||
#lc-flash-messages { | #lc-flash-messages { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 47, ../../sass/backend/custom.scss */ | |||||
/* line 49, ../../sass/backend/custom.scss */ | |||||
.main-sidebar .logo-long { | .main-sidebar .logo-long { | ||||
padding: 8px 0; | padding: 8px 0; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 48, ../../sass/backend/custom.scss */ | |||||
/* line 50, ../../sass/backend/custom.scss */ | |||||
.main-sidebar .logo-long img { | .main-sidebar .logo-long img { | ||||
height: 40px; | height: 40px; | ||||
display: inline-block; | display: inline-block; | ||||
} | } | ||||
/* line 49, ../../sass/backend/custom.scss */ | |||||
/* line 51, ../../sass/backend/custom.scss */ | |||||
.sidebar-collapse .main-sidebar .logo-long span { | .sidebar-collapse .main-sidebar .logo-long span { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 50, ../../sass/backend/custom.scss */ | |||||
/* line 52, ../../sass/backend/custom.scss */ | |||||
.sidebar-collapse .main-sidebar:hover .logo-long span { | .sidebar-collapse .main-sidebar:hover .logo-long span { | ||||
display: inline-block; | display: inline-block; | ||||
} | } | ||||
/* line 52, ../../sass/backend/custom.scss */ | |||||
/* line 54, ../../sass/backend/custom.scss */ | |||||
.table.datatable-simple .highlight { | .table.datatable-simple .highlight { | ||||
background: var(--teal); | background: var(--teal); | ||||
} | } | ||||
/* line 53, ../../sass/backend/custom.scss */ | |||||
/* line 55, ../../sass/backend/custom.scss */ | |||||
.datatable-field-search.small { | .datatable-field-search.small { | ||||
width: 50px; | width: 50px; | ||||
} | } | ||||
/* line 55, ../../sass/backend/custom.scss */ | |||||
/* line 57, ../../sass/backend/custom.scss */ | |||||
.dataTables_length, .dataTables_filter { | .dataTables_length, .dataTables_filter { | ||||
padding: .75rem 1.25rem 0.25rem; | padding: .75rem 1.25rem 0.25rem; | ||||
} | } | ||||
/* line 57, ../../sass/backend/custom.scss */ | |||||
/* line 59, ../../sass/backend/custom.scss */ | |||||
table.fixedHeader-floating { | table.fixedHeader-floating { | ||||
margin-top: 0px !important; | margin-top: 0px !important; | ||||
} | } | ||||
/* line 58, ../../sass/backend/custom.scss */ | |||||
/* line 60, ../../sass/backend/custom.scss */ | |||||
table th.sorting_asc, table th.sorting_desc { | table th.sorting_asc, table th.sorting_desc { | ||||
border-top: 3px solid var(--success); | border-top: 3px solid var(--success); | ||||
} | } | ||||
/* line 59, ../../sass/backend/custom.scss */ | |||||
/* line 61, ../../sass/backend/custom.scss */ | |||||
.card-body table.lc-table-list th.sorted, table th.sorting_asc, table th.sorting_desc { | .card-body table.lc-table-list th.sorted, table th.sorting_asc, table th.sorting_desc { | ||||
border-top: 2px solid var(--success); | border-top: 2px solid var(--success); | ||||
} | } | ||||
/*.card-body table.lc-table-list th{border-top:3px solid var(--success);}*/ | /*.card-body table.lc-table-list th{border-top:3px solid var(--success);}*/ | ||||
/* line 61, ../../sass/backend/custom.scss */ | |||||
/* line 63, ../../sass/backend/custom.scss */ | |||||
table th.filtered { | table th.filtered { | ||||
border-top: 3px solid var(--primary); | border-top: 3px solid var(--primary); | ||||
} | } | ||||
/* line 64, ../../sass/backend/custom.scss */ | |||||
/* line 66, ../../sass/backend/custom.scss */ | |||||
.lc-table-list thead a { | .lc-table-list thead a { | ||||
color: #212529; | color: #212529; | ||||
} | } | ||||
/* line 65, ../../sass/backend/custom.scss */ | |||||
/* line 67, ../../sass/backend/custom.scss */ | |||||
.table-filters-line th { | .table-filters-line th { | ||||
font-weight: 400; | font-weight: 400; | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 67, ../../sass/backend/custom.scss */ | |||||
/* line 69, ../../sass/backend/custom.scss */ | |||||
#list_filter_id { | #list_filter_id { | ||||
width: 60px; | width: 60px; | ||||
} | } | ||||
/* line 68, ../../sass/backend/custom.scss */ | |||||
/* line 70, ../../sass/backend/custom.scss */ | |||||
.lc-table-list .date-range { | .lc-table-list .date-range { | ||||
width: 130px; | width: 130px; | ||||
} | } | ||||
/* line 70, ../../sass/backend/custom.scss */ | |||||
/* line 72, ../../sass/backend/custom.scss */ | |||||
th.actions, td.actions { | th.actions, td.actions { | ||||
white-space: nowrap; | white-space: nowrap; | ||||
text-align: right; | text-align: right; | ||||
} | } | ||||
/* line 72, ../../sass/backend/custom.scss */ | |||||
/* line 74, ../../sass/backend/custom.scss */ | |||||
.table td, .table th { | .table td, .table th { | ||||
padding: 0.35rem; | padding: 0.35rem; | ||||
} | } | ||||
/* line 73, ../../sass/backend/custom.scss */ | |||||
/* line 75, ../../sass/backend/custom.scss */ | |||||
.delivery-field .form-group { | .delivery-field .form-group { | ||||
display: inline-block; | display: inline-block; | ||||
margin-bottom: 0px; | margin-bottom: 0px; | ||||
margin-right: 15px; | margin-right: 15px; | ||||
} | } | ||||
/* line 74, ../../sass/backend/custom.scss */ | |||||
/* line 76, ../../sass/backend/custom.scss */ | |||||
.delivery-field .form-group .form-control { | .delivery-field .form-group .form-control { | ||||
width: 150px; | width: 150px; | ||||
} | } | ||||
/* line 76, ../../sass/backend/custom.scss */ | |||||
/* line 78, ../../sass/backend/custom.scss */ | |||||
table th input { | table th input { | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
/* line 77, ../../sass/backend/custom.scss */ | |||||
/* line 79, ../../sass/backend/custom.scss */ | |||||
table th .select2-container--default .select2-selection--single { | table th .select2-container--default .select2-selection--single { | ||||
padding: 0.3rem 0.4rem; | padding: 0.3rem 0.4rem; | ||||
} | } | ||||
/************************ LOGIN PAGE *********************/ | /************************ LOGIN PAGE *********************/ | ||||
/* line 80, ../../sass/backend/custom.scss */ | |||||
/* line 82, ../../sass/backend/custom.scss */ | |||||
.login-logo { | .login-logo { | ||||
display: block; | display: block; | ||||
margin: auto; | margin: auto; | ||||
} | } | ||||
/************************ form error *********************/ | /************************ form error *********************/ | ||||
/* line 83, ../../sass/backend/custom.scss */ | |||||
/* line 85, ../../sass/backend/custom.scss */ | |||||
.form-sent .form-control:invalid { | .form-sent .form-control:invalid { | ||||
border-color: #dc3545; | border-color: #dc3545; | ||||
padding-right: 2.25rem; | padding-right: 2.25rem; | ||||
background-size: calc(.75em + .375rem) calc(.75em + .375rem); | background-size: calc(.75em + .375rem) calc(.75em + .375rem); | ||||
} | } | ||||
/* line 84, ../../sass/backend/custom.scss */ | |||||
/* line 86, ../../sass/backend/custom.scss */ | |||||
.form-sent select.form-control:invalid + .select2 .select2-selection { | .form-sent select.form-control:invalid + .select2 .select2-selection { | ||||
border-color: #dc3545; | border-color: #dc3545; | ||||
} | } | ||||
/* line 85, ../../sass/backend/custom.scss */ | |||||
/* line 87, ../../sass/backend/custom.scss */ | |||||
.form-sent select.form-control:invalid + .select2 .select2-selection b { | .form-sent select.form-control:invalid + .select2 .select2-selection b { | ||||
border-color: #dc3545 transparent transparent transparent; | border-color: #dc3545 transparent transparent transparent; | ||||
} | } | ||||
/*CUSTOM Checkbox | /*CUSTOM Checkbox | ||||
/* Customize the label (the container) */ | /* Customize the label (the container) */ | ||||
/* line 90, ../../sass/backend/custom.scss */ | |||||
/* line 92, ../../sass/backend/custom.scss */ | |||||
.form-check-label { | .form-check-label { | ||||
display: block; | display: block; | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* Hide the browser's default checkbox */ | /* Hide the browser's default checkbox */ | ||||
/* line 92, ../../sass/backend/custom.scss */ | |||||
/* line 94, ../../sass/backend/custom.scss */ | |||||
.form-check-label input { | .form-check-label input { | ||||
position: absolute; | position: absolute; | ||||
opacity: 0; | opacity: 0; | ||||
} | } | ||||
/* Create a custom checkbox */ | /* Create a custom checkbox */ | ||||
/* line 95, ../../sass/backend/custom.scss */ | |||||
/* line 97, ../../sass/backend/custom.scss */ | |||||
.form-check { | .form-check { | ||||
padding-left: 0px; | padding-left: 0px; | ||||
} | } | ||||
/* line 97, ../../sass/backend/custom.scss */ | |||||
/* line 99, ../../sass/backend/custom.scss */ | |||||
.form-sent .form-check-label input:invalid ~ .checkmark { | .form-sent .form-check-label input:invalid ~ .checkmark { | ||||
border-color: #dc3545; | border-color: #dc3545; | ||||
} | } | ||||
/* line 98, ../../sass/backend/custom.scss */ | |||||
/* line 100, ../../sass/backend/custom.scss */ | |||||
.form-check-label input:disabled ~ .checkmark { | .form-check-label input:disabled ~ .checkmark { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 99, ../../sass/backend/custom.scss */ | |||||
/* line 101, ../../sass/backend/custom.scss */ | |||||
.form-check-label input ~ .checkmark { | .form-check-label input ~ .checkmark { | ||||
position: absolute; | position: absolute; | ||||
top: 0; | top: 0; | ||||
border: 1px solid var(--primary); | border: 1px solid var(--primary); | ||||
} | } | ||||
/* line 100, ../../sass/backend/custom.scss */ | |||||
/* line 102, ../../sass/backend/custom.scss */ | |||||
.form-check-label.big input ~ .checkmark { | .form-check-label.big input ~ .checkmark { | ||||
height: 21px; | height: 21px; | ||||
width: 21px; | width: 21px; | ||||
} | } | ||||
/* line 101, ../../sass/backend/custom.scss */ | |||||
/* line 103, ../../sass/backend/custom.scss */ | |||||
.form-check-label input[type="checkbox"] ~ .checkmark { | .form-check-label input[type="checkbox"] ~ .checkmark { | ||||
top: 2px; | top: 2px; | ||||
} | } | ||||
/* line 102, ../../sass/backend/custom.scss */ | |||||
/* line 104, ../../sass/backend/custom.scss */ | |||||
.form-check-label input[type="radio"] ~ .checkmark { | .form-check-label input[type="radio"] ~ .checkmark { | ||||
top: 3px; | top: 3px; | ||||
border-radius: 50%; | border-radius: 50%; | ||||
} | } | ||||
/* line 103, ../../sass/backend/custom.scss */ | |||||
/* line 105, ../../sass/backend/custom.scss */ | |||||
.form-check-label:hover input ~ .checkmark { | .form-check-label:hover input ~ .checkmark { | ||||
background-color: #ccc; | background-color: #ccc; | ||||
} | } | ||||
/* When the checkbox is checked, add a blue background */ | /* When the checkbox is checked, add a blue background */ | ||||
/* line 105, ../../sass/backend/custom.scss */ | |||||
/* line 107, ../../sass/backend/custom.scss */ | |||||
.form-check-label input:checked ~ .checkmark { | .form-check-label input:checked ~ .checkmark { | ||||
background-color: var(--primary); | background-color: var(--primary); | ||||
} | } | ||||
/* Create the checkmark/indicator (hidden when not checked) */ | /* Create the checkmark/indicator (hidden when not checked) */ | ||||
/* line 107, ../../sass/backend/custom.scss */ | |||||
/* line 109, ../../sass/backend/custom.scss */ | |||||
.form-check-label .checkmark:after { | .form-check-label .checkmark:after { | ||||
content: ""; | content: ""; | ||||
position: absolute; | position: absolute; | ||||
} | } | ||||
/* Show the checkmark when checked */ | /* Show the checkmark when checked */ | ||||
/* line 109, ../../sass/backend/custom.scss */ | |||||
/* line 111, ../../sass/backend/custom.scss */ | |||||
.form-check-label input:checked ~ .checkmark:after { | .form-check-label input:checked ~ .checkmark:after { | ||||
display: block; | display: block; | ||||
} | } | ||||
/* Style the checkmark/indicator */ | /* Style the checkmark/indicator */ | ||||
/* line 111, ../../sass/backend/custom.scss */ | |||||
/* line 113, ../../sass/backend/custom.scss */ | |||||
.form-check-label .checkmark:after { | .form-check-label .checkmark:after { | ||||
left: 7px; | left: 7px; | ||||
top: 3px; | top: 3px; | ||||
transform: rotate(45deg); | transform: rotate(45deg); | ||||
} | } | ||||
/* line 112, ../../sass/backend/custom.scss */ | |||||
/* line 114, ../../sass/backend/custom.scss */ | |||||
.form-check-label input[type="checkbox"] ~ .checkmark:after { | .form-check-label input[type="checkbox"] ~ .checkmark:after { | ||||
left: 6px; | left: 6px; | ||||
top: 2px; | top: 2px; | ||||
transform: rotate(45deg); | transform: rotate(45deg); | ||||
} | } | ||||
/* line 113, ../../sass/backend/custom.scss */ | |||||
/* line 115, ../../sass/backend/custom.scss */ | |||||
.form-check-label input[type="radio"] ~ .checkmark:after { | .form-check-label input[type="radio"] ~ .checkmark:after { | ||||
top: 4px; | top: 4px; | ||||
left: 4px; | left: 4px; | ||||
background: white; | background: white; | ||||
} | } | ||||
/* line 115, ../../sass/backend/custom.scss */ | |||||
/* line 117, ../../sass/backend/custom.scss */ | |||||
.form-check-label.big input[type="checkbox"] ~ .checkmark:after { | .form-check-label.big input[type="checkbox"] ~ .checkmark:after { | ||||
left: 7px; | left: 7px; | ||||
top: 3px; | top: 3px; | ||||
} | } | ||||
/* Create a custom radio button */ | /* Create a custom radio button */ | ||||
/* line 119, ../../sass/backend/custom.scss */ | |||||
/* line 121, ../../sass/backend/custom.scss */ | |||||
.product-categories .parent .form-group.field-checkbox .form-check-label { | .product-categories .parent .form-group.field-checkbox .form-check-label { | ||||
padding-left: 0px; | padding-left: 0px; | ||||
font-style: italic; | font-style: italic; | ||||
} | } | ||||
/* line 120, ../../sass/backend/custom.scss */ | |||||
/* line 122, ../../sass/backend/custom.scss */ | |||||
.product-categories .children .form-group.field-checkbox { | .product-categories .children .form-group.field-checkbox { | ||||
margin-left: 20px; | margin-left: 20px; | ||||
} | } | ||||
/* line 121, ../../sass/backend/custom.scss */ | |||||
/* line 123, ../../sass/backend/custom.scss */ | |||||
.product-categories .form-group { | .product-categories .form-group { | ||||
margin-bottom: 0.15rem; | margin-bottom: 0.15rem; | ||||
} | } | ||||
/* line 122, ../../sass/backend/custom.scss */ | |||||
/* line 124, ../../sass/backend/custom.scss */ | |||||
.lc-deleted-field { | .lc-deleted-field { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 123, ../../sass/backend/custom.scss */ | |||||
/* line 125, ../../sass/backend/custom.scss */ | |||||
.lc-offline-field { | .lc-offline-field { | ||||
opacity: 0.5; | opacity: 0.5; | ||||
} | } | ||||
/* line 124, ../../sass/backend/custom.scss */ | |||||
/* line 126, ../../sass/backend/custom.scss */ | |||||
.lc-offline-field label::after { | .lc-offline-field label::after { | ||||
content: ' [hors ligne]'; | content: ' [hors ligne]'; | ||||
} | } | ||||
/* Général */ | /* Général */ | ||||
/* line 130, ../../sass/backend/custom.scss */ | |||||
/* line 132, ../../sass/backend/custom.scss */ | |||||
.btn.action-save { | .btn.action-save { | ||||
float: right; | float: right; | ||||
margin-left: 10px; | margin-left: 10px; | ||||
} | } | ||||
/* line 131, ../../sass/backend/custom.scss */ | |||||
/* line 133, ../../sass/backend/custom.scss */ | |||||
.button-action a.float-right { | .button-action a.float-right { | ||||
margin-left: 10px; | margin-left: 10px; | ||||
} | } | ||||
/* line 133, ../../sass/backend/custom.scss */ | |||||
/* line 135, ../../sass/backend/custom.scss */ | |||||
.input-group-text { | .input-group-text { | ||||
padding: 0.25rem 0.75rem; | padding: 0.25rem 0.75rem; | ||||
} | } | ||||
/* line 137, ../../sass/backend/custom.scss */ | |||||
/* line 139, ../../sass/backend/custom.scss */ | |||||
.col-form-label { | .col-form-label { | ||||
font-weight: bold; | font-weight: bold; | ||||
} | } | ||||
/* line 139, ../../sass/backend/custom.scss */ | |||||
/* line 141, ../../sass/backend/custom.scss */ | |||||
#toast-container.toast-top-right { | #toast-container.toast-top-right { | ||||
top: 60px; | top: 60px; | ||||
} | } | ||||
/* SIDEBAR */ | /* SIDEBAR */ | ||||
/* line 142, ../../sass/backend/custom.scss */ | |||||
/* line 144, ../../sass/backend/custom.scss */ | |||||
.main-header.navbar { | .main-header.navbar { | ||||
padding: 0; | padding: 0; | ||||
min-height: 57px; | min-height: 57px; | ||||
} | } | ||||
/* line 143, ../../sass/backend/custom.scss */ | |||||
/* line 145, ../../sass/backend/custom.scss */ | |||||
.lc-navbar li { | .lc-navbar li { | ||||
border-left: 1px solid #e0e0e0; | border-left: 1px solid #e0e0e0; | ||||
padding: 0.5rem 1.5rem; | padding: 0.5rem 1.5rem; | ||||
} | } | ||||
/* line 144, ../../sass/backend/custom.scss */ | |||||
/* line 146, ../../sass/backend/custom.scss */ | |||||
.lc-navbar li label { | .lc-navbar li label { | ||||
margin-bottom: 0; | margin-bottom: 0; | ||||
vertical-align: middle; | vertical-align: middle; | ||||
font-weight: normal !important; | font-weight: normal !important; | ||||
} | } | ||||
/* line 146, ../../sass/backend/custom.scss */ | |||||
/* line 148, ../../sass/backend/custom.scss */ | |||||
#switch-merchant { | #switch-merchant { | ||||
min-width: 170px; | min-width: 170px; | ||||
} | } | ||||
/* Sortable */ | /* Sortable */ | ||||
/* line 152, ../../sass/backend/custom.scss */ | |||||
/* line 154, ../../sass/backend/custom.scss */ | |||||
.ui-sortable-helper { | .ui-sortable-helper { | ||||
display: table; | display: table; | ||||
} | } | ||||
/* line 153, ../../sass/backend/custom.scss */ | |||||
/* line 155, ../../sass/backend/custom.scss */ | |||||
.ui-state-highlight { | .ui-state-highlight { | ||||
background: #eee; | background: #eee; | ||||
} | } | ||||
/* line 154, ../../sass/backend/custom.scss */ | |||||
/* line 156, ../../sass/backend/custom.scss */ | |||||
.lc-sortable div:last-child { | .lc-sortable div:last-child { | ||||
display: none; | display: none; | ||||
} | } | ||||
.lc-ckfinder-wrap .lc-ckfinder-button{width: 100%; bottom: 0px; left: 0; position: absolute;} | .lc-ckfinder-wrap .lc-ckfinder-button{width: 100%; bottom: 0px; left: 0; position: absolute;} | ||||
*/ | */ | ||||
/* VUES JS */ | /* VUES JS */ | ||||
/* line 169, ../../sass/backend/custom.scss */ | |||||
/* line 171, ../../sass/backend/custom.scss */ | |||||
.nav-item .btn { | .nav-item .btn { | ||||
padding-right: 15px; | padding-right: 15px; | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 170, ../../sass/backend/custom.scss */ | |||||
/* line 172, ../../sass/backend/custom.scss */ | |||||
.nav-item .btn .invalid-form { | .nav-item .btn .invalid-form { | ||||
display: none; | display: none; | ||||
position: absolute; | position: absolute; | ||||
font-size: 1.2rem; | font-size: 1.2rem; | ||||
} | } | ||||
/* line 171, ../../sass/backend/custom.scss */ | |||||
/* line 173, ../../sass/backend/custom.scss */ | |||||
.nav-item.has-invalid .btn .invalid-form { | .nav-item.has-invalid .btn .invalid-form { | ||||
display: inline-block; | display: inline-block; | ||||
z-index: 2; | z-index: 2; | ||||
} | } | ||||
/* ProductFamily */ | /* ProductFamily */ | ||||
/* line 176, ../../sass/backend/custom.scss */ | |||||
/* line 178, ../../sass/backend/custom.scss */ | |||||
.field-unit-quantity { | .field-unit-quantity { | ||||
border-bottom: 2px dotted #eee; | border-bottom: 2px dotted #eee; | ||||
padding-bottom: 10px; | padding-bottom: 10px; | ||||
margin-bottom: 20px; | margin-bottom: 20px; | ||||
} | } | ||||
/* line 177, ../../sass/backend/custom.scss */ | |||||
/* line 179, ../../sass/backend/custom.scss */ | |||||
.field-reduction-apply { | .field-reduction-apply { | ||||
border-top: 2px dotted #eee; | border-top: 2px dotted #eee; | ||||
padding-top: 10px; | padding-top: 10px; | ||||
margin-top: 20px; | margin-top: 20px; | ||||
} | } | ||||
/* line 179, ../../sass/backend/custom.scss */ | |||||
/* line 181, ../../sass/backend/custom.scss */ | |||||
.new-productfamily #nav-params, | .new-productfamily #nav-params, | ||||
.edit-productfamily #nav-params { | .edit-productfamily #nav-params { | ||||
margin-bottom: 30px; | margin-bottom: 30px; | ||||
} | } | ||||
/* line 184, ../../sass/backend/custom.scss */ | |||||
/* line 186, ../../sass/backend/custom.scss */ | |||||
.new-productfamily #nav-params .btn, | .new-productfamily #nav-params .btn, | ||||
.edit-productfamily #nav-params .btn { | .edit-productfamily #nav-params .btn { | ||||
margin-left: 20px; | margin-left: 20px; | ||||
} | } | ||||
/* line 189, ../../sass/backend/custom.scss */ | |||||
/* line 191, ../../sass/backend/custom.scss */ | |||||
.new-productfamily #product-categories .row, | .new-productfamily #product-categories .row, | ||||
.edit-productfamily #product-categories .row { | .edit-productfamily #product-categories .row { | ||||
padding: 10px; | padding: 10px; | ||||
} | } | ||||
/* line 194, ../../sass/backend/custom.scss */ | |||||
/* line 196, ../../sass/backend/custom.scss */ | |||||
.new-productfamily #product-categories .form-group, | .new-productfamily #product-categories .form-group, | ||||
.edit-productfamily #product-categories .form-group { | .edit-productfamily #product-categories .form-group { | ||||
width: 100%; | width: 100%; | ||||
padding: 4px; | padding: 4px; | ||||
} | } | ||||
/* line 200, ../../sass/backend/custom.scss */ | |||||
/* line 202, ../../sass/backend/custom.scss */ | |||||
.new-productfamily #product-categories .children, | .new-productfamily #product-categories .children, | ||||
.edit-productfamily #product-categories .children { | .edit-productfamily #product-categories .children { | ||||
margin-left: 20px; | margin-left: 20px; | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
/* line 206, ../../sass/backend/custom.scss */ | |||||
/* line 208, ../../sass/backend/custom.scss */ | |||||
.new-productfamily ul.products, | .new-productfamily ul.products, | ||||
.edit-productfamily ul.products { | .edit-productfamily ul.products { | ||||
padding: 0px; | padding: 0px; | ||||
list-style-type: none; | list-style-type: none; | ||||
} | } | ||||
/* line 212, ../../sass/backend/custom.scss */ | |||||
/* line 214, ../../sass/backend/custom.scss */ | |||||
.new-productfamily ul.products li.product, | .new-productfamily ul.products li.product, | ||||
.edit-productfamily ul.products li.product { | .edit-productfamily ul.products li.product { | ||||
padding: 0px; | padding: 0px; | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 219, ../../sass/backend/custom.scss */ | |||||
/* line 221, ../../sass/backend/custom.scss */ | |||||
.new-productfamily ul.products li.add, | .new-productfamily ul.products li.add, | ||||
.edit-productfamily ul.products li.add { | .edit-productfamily ul.products li.add { | ||||
text-align: right; | text-align: right; | ||||
} | } | ||||
/* line 224, ../../sass/backend/custom.scss */ | |||||
/* line 226, ../../sass/backend/custom.scss */ | |||||
.autoresize textarea { | .autoresize textarea { | ||||
height: auto; | height: auto; | ||||
min-height: 38px; | min-height: 38px; | ||||
} | } | ||||
/* line 226, ../../sass/backend/custom.scss */ | |||||
/* line 228, ../../sass/backend/custom.scss */ | |||||
.field-price .input-group.buyingPrice input, .field-price .input-group.buyingPrice .input-group-text { | .field-price .input-group.buyingPrice input, .field-price .input-group.buyingPrice .input-group-text { | ||||
font-weight: bold; | font-weight: bold; | ||||
border-color: #222; | border-color: #222; | ||||
} | } | ||||
/* line 227, ../../sass/backend/custom.scss */ | |||||
/* line 229, ../../sass/backend/custom.scss */ | |||||
.field-price .input-group.buyingPriceByRefUnit input, .field-price .input-group.buyingPriceByRefUnit .input-group-text { | .field-price .input-group.buyingPriceByRefUnit input, .field-price .input-group.buyingPriceByRefUnit .input-group-text { | ||||
font-weight: bold; | font-weight: bold; | ||||
border-color: #222; | border-color: #222; | ||||
} | } | ||||
/* line 228, ../../sass/backend/custom.scss */ | |||||
/* line 230, ../../sass/backend/custom.scss */ | |||||
.field-price .input-group.priceWithTax input, .field-price .input-group.priceWithTax .input-group-text { | .field-price .input-group.priceWithTax input, .field-price .input-group.priceWithTax .input-group-text { | ||||
font-weight: bold; | font-weight: bold; | ||||
border-color: #222; | border-color: #222; | ||||
} | } | ||||
/* line 229, ../../sass/backend/custom.scss */ | |||||
/* line 231, ../../sass/backend/custom.scss */ | |||||
.field-price .input-group.priceByRefUnitWithTax input, .field-price .input-group.priceByRefUnitWithTax .input-group-text { | .field-price .input-group.priceByRefUnitWithTax input, .field-price .input-group.priceByRefUnitWithTax .input-group-text { | ||||
font-weight: bold; | font-weight: bold; | ||||
border-color: #222; | border-color: #222; | ||||
} | } | ||||
/* line 230, ../../sass/backend/custom.scss */ | |||||
/* line 232, ../../sass/backend/custom.scss */ | |||||
.input-group.multiplyingFactor input, .input-group.multiplyingFactor .input-group-text { | .input-group.multiplyingFactor input, .input-group.multiplyingFactor .input-group-text { | ||||
font-weight: bold; | font-weight: bold; | ||||
border-color: #222; | border-color: #222; | ||||
} | } | ||||
/* ORDER */ | /* ORDER */ | ||||
/* line 236, ../../sass/backend/custom.scss */ | |||||
/* line 238, ../../sass/backend/custom.scss */ | |||||
.table-order-summary { | .table-order-summary { | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
/* line 239, ../../sass/backend/custom.scss */ | |||||
/* line 241, ../../sass/backend/custom.scss */ | |||||
.order-product-item.redelivery { | .order-product-item.redelivery { | ||||
background: rgba(18, 104, 253, 0.38) !important; | background: rgba(18, 104, 253, 0.38) !important; | ||||
} | } | ||||
/*.select2-container--bootstrap .select2-selection{max-width: none;}*/ | /*.select2-container--bootstrap .select2-selection{max-width: none;}*/ | ||||
/*.order-product-item{margin: 15px 0; padding: 0;}*/ | /*.order-product-item{margin: 15px 0; padding: 0;}*/ | ||||
/* Product */ | /* Product */ | ||||
/* line 244, ../../sass/backend/custom.scss */ | |||||
/* line 246, ../../sass/backend/custom.scss */ | |||||
.product-form-modal { | .product-form-modal { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 245, ../../sass/backend/custom.scss */ | |||||
/* line 247, ../../sass/backend/custom.scss */ | |||||
.product-form.modal .form-check-label { | .product-form.modal .form-check-label { | ||||
font-style: italic; | font-style: italic; | ||||
color: #666; | color: #666; | ||||
text-align: left; | text-align: left; | ||||
} | } | ||||
/* line 246, ../../sass/backend/custom.scss */ | |||||
/* line 248, ../../sass/backend/custom.scss */ | |||||
.products-collection-table .inherited { | .products-collection-table .inherited { | ||||
color: #888; | color: #888; | ||||
font-style: italic; | font-style: italic; | ||||
font-weight: initial; | font-weight: initial; | ||||
} | } | ||||
/* line 247, ../../sass/backend/custom.scss */ | |||||
/* line 249, ../../sass/backend/custom.scss */ | |||||
.products-collection-table td { | .products-collection-table td { | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 248, ../../sass/backend/custom.scss */ | |||||
/* line 250, ../../sass/backend/custom.scss */ | |||||
.card-body.p-0 .products-collection-table tbody > tr > td:first-of-type, .card-body.p-0 .products-collection-table tbody > tr > th:first-of-type, .card-body.p-0 .products-collection-table thead > tr > td:first-of-type, .card-body.p-0 .products-collection-table thead > tr > th:first-of-type { | .card-body.p-0 .products-collection-table tbody > tr > td:first-of-type, .card-body.p-0 .products-collection-table tbody > tr > th:first-of-type, .card-body.p-0 .products-collection-table thead > tr > td:first-of-type, .card-body.p-0 .products-collection-table thead > tr > th:first-of-type { | ||||
padding-left: 0.35rem; | padding-left: 0.35rem; | ||||
} | } | ||||
/* line 249, ../../sass/backend/custom.scss */ | |||||
/* line 251, ../../sass/backend/custom.scss */ | |||||
.products-collection-table .btn-empty-field { | .products-collection-table .btn-empty-field { | ||||
position: absolute; | position: absolute; | ||||
right: 3px; | right: 3px; | ||||
padding: 0px; | padding: 0px; | ||||
} | } | ||||
/* line 250, ../../sass/backend/custom.scss */ | |||||
/* line 252, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table { | #lc-product-family-edit .products-collection-table { | ||||
table-layout: fixed; | table-layout: fixed; | ||||
/* background-clip: padding-box;*/ | /* background-clip: padding-box;*/ | ||||
border-collapse: collapse; | border-collapse: collapse; | ||||
} | } | ||||
/* line 251, ../../sass/backend/custom.scss */ | |||||
/* line 253, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table th { | #lc-product-family-edit .products-collection-table th { | ||||
font-size: 13px; | font-size: 13px; | ||||
border-left: 1px solid #dee2e6; | border-left: 1px solid #dee2e6; | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 252, ../../sass/backend/custom.scss */ | |||||
/* line 254, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table tfoot th { | #lc-product-family-edit .products-collection-table tfoot th { | ||||
border-top: 2px solid #dee2e6; | border-top: 2px solid #dee2e6; | ||||
} | } | ||||
/* line 253, ../../sass/backend/custom.scss */ | |||||
/* line 255, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table th span { | #lc-product-family-edit .products-collection-table th span { | ||||
white-space: initial; | white-space: initial; | ||||
} | } | ||||
/* line 254, ../../sass/backend/custom.scss */ | |||||
/* line 256, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table th:last-child { | #lc-product-family-edit .products-collection-table th:last-child { | ||||
border-right: 1px solid #dee2e6; | border-right: 1px solid #dee2e6; | ||||
} | } | ||||
/* line 255, ../../sass/backend/custom.scss */ | |||||
/* line 257, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table td { | #lc-product-family-edit .products-collection-table td { | ||||
border-left: 1px solid #dee2e6; | border-left: 1px solid #dee2e6; | ||||
text-align: center; | text-align: center; | ||||
border-bottom: 1px solid #dee2e6; | border-bottom: 1px solid #dee2e6; | ||||
} | } | ||||
/* line 256, ../../sass/backend/custom.scss */ | |||||
/* line 258, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table td:last-child { | #lc-product-family-edit .products-collection-table td:last-child { | ||||
border-right: 1px solid #dee2e6; | border-right: 1px solid #dee2e6; | ||||
white-space: nowrap; | white-space: nowrap; | ||||
} | } | ||||
/* line 257, ../../sass/backend/custom.scss */ | |||||
/* line 259, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .btn-add-product { | #lc-product-family-edit .btn-add-product { | ||||
margin: 20px 0; | margin: 20px 0; | ||||
float: right; | float: right; | ||||
} | } | ||||
/* line 258, ../../sass/backend/custom.scss */ | |||||
/* line 260, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .inherited { | #lc-product-family-edit .inherited { | ||||
color: #888; | color: #888; | ||||
font-style: italic; | font-style: italic; | ||||
font-weight: initial; | font-weight: initial; | ||||
} | } | ||||
/* line 259, ../../sass/backend/custom.scss */ | |||||
/* line 261, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table td .value { | #lc-product-family-edit .products-collection-table td .value { | ||||
min-width: 80%; | min-width: 80%; | ||||
margin: auto; | margin: auto; | ||||
cursor: pointer; | cursor: pointer; | ||||
} | } | ||||
/* line 260, ../../sass/backend/custom.scss */ | |||||
/* line 262, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table td .modal { | #lc-product-family-edit .products-collection-table td .modal { | ||||
text-align: left; | text-align: left; | ||||
} | } | ||||
/* line 261, ../../sass/backend/custom.scss */ | |||||
/* line 263, ../../sass/backend/custom.scss */ | |||||
table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax { | table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax { | ||||
background: #eeeeee; | background: #eeeeee; | ||||
background-clip: padding-box; | background-clip: padding-box; | ||||
text-decoration: underline; | text-decoration: underline; | ||||
} | } | ||||
/* line 263, ../../sass/backend/custom.scss */ | |||||
/* line 265, ../../sass/backend/custom.scss */ | |||||
table.products-collection-table tr.disabled { | table.products-collection-table tr.disabled { | ||||
opacity: 0.5; | opacity: 0.5; | ||||
} | } | ||||
/* line 264, ../../sass/backend/custom.scss */ | |||||
/* line 266, ../../sass/backend/custom.scss */ | |||||
.table-striped tbody .tr-sep { | .table-striped tbody .tr-sep { | ||||
border-top: 2px solid #888; | border-top: 2px solid #888; | ||||
} | } | ||||
/* DeliveryZone */ | /* DeliveryZone */ | ||||
/* line 268, ../../sass/backend/custom.scss */ | |||||
/* line 270, ../../sass/backend/custom.scss */ | |||||
#autocomplete-cities { | #autocomplete-cities { | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 272, ../../sass/backend/custom.scss */ | |||||
/* line 274, ../../sass/backend/custom.scss */ | |||||
#autocomplete-cities .ui-autocomplete { | #autocomplete-cities .ui-autocomplete { | ||||
left: 30%; | left: 30%; | ||||
top: 41px; | top: 41px; | ||||
margin-left: 18px; | margin-left: 18px; | ||||
} | } | ||||
/* line 278, ../../sass/backend/custom.scss */ | |||||
/* line 280, ../../sass/backend/custom.scss */ | |||||
.head-reminders { | .head-reminders { | ||||
margin-top: 15px; | margin-top: 15px; | ||||
} | } | ||||
/* TABLEAU DE BORD */ | /* TABLEAU DE BORD */ | ||||
/* line 281, ../../sass/backend/custom.scss */ | |||||
/* line 283, ../../sass/backend/custom.scss */ | |||||
.todo-list > li { | .todo-list > li { | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 282, ../../sass/backend/custom.scss */ | |||||
/* line 284, ../../sass/backend/custom.scss */ | |||||
.todo-list > li .text { | .todo-list > li .text { | ||||
margin-left: 30px; | margin-left: 30px; | ||||
} | } | ||||
/* line 283, ../../sass/backend/custom.scss */ | |||||
/* line 285, ../../sass/backend/custom.scss */ | |||||
.todo-list > li .tools { | .todo-list > li .tools { | ||||
position: absolute; | position: absolute; | ||||
top: 4px; | top: 4px; | ||||
right: 15px; | right: 15px; | ||||
} | } | ||||
/* line 285, ../../sass/backend/custom.scss */ | |||||
/* line 287, ../../sass/backend/custom.scss */ | |||||
#addTicketMessageForm { | #addTicketMessageForm { | ||||
margin-top: 30px; | margin-top: 30px; | ||||
border-top: 2px dotted #eee; | border-top: 2px dotted #eee; | ||||
padding-top: 30px; | padding-top: 30px; | ||||
} | } | ||||
/* line 287, ../../sass/backend/custom.scss */ | |||||
/* line 289, ../../sass/backend/custom.scss */ | |||||
#dashboard .list-btn-statistic { | #dashboard .list-btn-statistic { | ||||
display: flex; | display: flex; | ||||
flex-wrap: wrap; | flex-wrap: wrap; | ||||
justify-content: center; | justify-content: center; | ||||
} | } | ||||
/* line 288, ../../sass/backend/custom.scss */ | |||||
/* line 290, ../../sass/backend/custom.scss */ | |||||
#dashboard .btn-statistic { | #dashboard .btn-statistic { | ||||
width: 120px; | width: 120px; | ||||
height: 70px; | height: 70px; | ||||
line-height: 1rem; | line-height: 1rem; | ||||
} | } | ||||
/* line 289, ../../sass/backend/custom.scss */ | |||||
/* line 291, ../../sass/backend/custom.scss */ | |||||
#dashboard .btn-statistic small { | #dashboard .btn-statistic small { | ||||
margin-bottom: 10px; | margin-bottom: 10px; | ||||
display: block; | display: block; | ||||
} | } | ||||
/* line 290, ../../sass/backend/custom.scss */ | |||||
/* line 292, ../../sass/backend/custom.scss */ | |||||
#dashboard .btn-statistic .value { | #dashboard .btn-statistic .value { | ||||
display: block; | display: block; | ||||
} | } | ||||
/* line 292, ../../sass/backend/custom.scss */ | |||||
/* line 294, ../../sass/backend/custom.scss */ | |||||
#dashboard #range_date_interval { | #dashboard #range_date_interval { | ||||
margin-bottom: 20px; | margin-bottom: 20px; | ||||
} | } | ||||
/* line 293, ../../sass/backend/custom.scss */ | |||||
/* line 295, ../../sass/backend/custom.scss */ | |||||
#dashboard #range_date_interval label { | #dashboard #range_date_interval label { | ||||
float: left; | float: left; | ||||
margin-right: 20px; | margin-right: 20px; | ||||
} | } | ||||
/* line 294, ../../sass/backend/custom.scss */ | |||||
/* line 296, ../../sass/backend/custom.scss */ | |||||
#dashboard #range_date_interval .form-check { | #dashboard #range_date_interval .form-check { | ||||
float: left; | float: left; | ||||
margin-right: 10px; | margin-right: 10px; | ||||
} | } | ||||
/* line 295, ../../sass/backend/custom.scss */ | |||||
/* line 297, ../../sass/backend/custom.scss */ | |||||
#dashboard .table-condensed .btn, #dashboard .table-condensed .btn-sm { | #dashboard .table-condensed .btn, #dashboard .table-condensed .btn-sm { | ||||
white-space: nowrap; | white-space: nowrap; | ||||
} | } | ||||
/* Tickets */ | /* Tickets */ | ||||
/* line 301, ../../sass/backend/custom.scss */ | |||||
/* line 303, ../../sass/backend/custom.scss */ | |||||
#ticket-list .btn-sm { | #ticket-list .btn-sm { | ||||
display: block; | display: block; | ||||
} | } | ||||
/* line 307, ../../sass/backend/custom.scss */ | |||||
/* line 309, ../../sass/backend/custom.scss */ | |||||
#toast-container { | #toast-container { | ||||
width: 350px; | width: 350px; | ||||
} | } | ||||
/* line 308, ../../sass/backend/custom.scss */ | |||||
/* line 310, ../../sass/backend/custom.scss */ | |||||
.toast { | .toast { | ||||
float: right; | float: right; | ||||
} | } | ||||
/* line 310, ../../sass/backend/custom.scss */ | |||||
/* line 312, ../../sass/backend/custom.scss */ | |||||
#toast-container:before:hover { | #toast-container:before:hover { | ||||
opacity: 1; | opacity: 1; | ||||
cursor: pointer; | cursor: pointer; | ||||
} | } | ||||
/* line 314, ../../sass/backend/custom.scss */ | |||||
/* line 316, ../../sass/backend/custom.scss */ | |||||
#toast-close-all { | #toast-close-all { | ||||
border: 0; | border: 0; | ||||
position: absolute; | position: absolute; |
initButtonConfirm() | initButtonConfirm() | ||||
initNotice(); | initNotice(); | ||||
initBtnEditReminder(); | initBtnEditReminder(); | ||||
initBtnWriteToUser(); | |||||
initCollectionWidget() | |||||
$('form').on('focus', 'input[type=number]', function (e) { | $('form').on('focus', 'input[type=number]', function (e) { | ||||
$(this).on('wheel.disableScroll', function (e) { | $(this).on('wheel.disableScroll', function (e) { | ||||
e.preventDefault() | e.preventDefault() | ||||
}); | }); | ||||
} | } | ||||
function initBtnWriteToUser(){ | |||||
$('#btn-ticket-write-to-user').on('click', function () { | |||||
$btn = $(this); | |||||
var order = ''; | |||||
if($btn.data('order')) { | |||||
order = '&orderId=' + $btn.data('order'); | |||||
} | |||||
$.ajax({ | |||||
url: $btn.data('url'), | |||||
data: "user="+$btn.data('user')+order, | |||||
method: "POST", | |||||
dataType: "json", | |||||
success: function (response) { | |||||
$('body').append(response.modal); | |||||
initModalNewTicket(); | |||||
} | |||||
}); | |||||
}); | |||||
} | |||||
function initModalNewTicket(){ | |||||
$('#modal-new-ticket select.form-control').each(function (i, elm) { | |||||
if (!$(this).hasClass('disable-select2')) { | |||||
setSelect2($(elm)); | |||||
} | |||||
}); | |||||
$('#modal-new-ticket').modal('show'); | |||||
log($('#modal-new-ticket .btn-save')); | |||||
$('#modal-new-ticket .btn-save').on('click', function (){ | |||||
$form = $(this).parents('form'); | |||||
if(checkFormValidity('#'+$form.prop('id'))) { | |||||
$('#modal-new-ticket').modal('hide'); | |||||
$.ajax({ | |||||
url: $form.prop('action'), | |||||
data: $form.serialize(), | |||||
method: $form.prop('method'), | |||||
dataType: "json", | |||||
success: function (response) { | |||||
setFlashMessages(response.flashMessages); | |||||
$('#modal-new-ticket').remove(); | |||||
} | |||||
}); | |||||
} | |||||
}) | |||||
} | |||||
function initCollectionWidget(){ | |||||
$('.form-widget-compound>div[data-prototype]').each(function (i,collectionWidget){ | |||||
resetNumItemsCollectionField($(collectionWidget)); | |||||
$(collectionWidget).on('easyadmin.collection.item-added', function (){ | |||||
resetNumItemsCollectionField($(this)); | |||||
}) | |||||
}); | |||||
} | |||||
function resetNumItemsCollectionField($collectionWidget){ | |||||
numItems = $collectionWidget.children('div.form-group').length; | |||||
$collectionWidget.children('div.form-group').each(function (i,item){ | |||||
$field = $(item).find('input[type="text"]'); | |||||
//Chanegment ID | |||||
posId = $field.prop('id').lastIndexOf('_') + 1; | |||||
idPrefix = $field.prop('id').substr(0, posId); | |||||
$field.prop('id', idPrefix+i); | |||||
//Chanegment Name | |||||
posName = $field.prop('name').lastIndexOf('[') + 1; | |||||
namePrefix = $field.prop('name').substr(0, posName); | |||||
$field.prop('name', namePrefix+i+']'); | |||||
$(item).find('.field-collection-item-action').remove(); | |||||
$(item).find('.field-collection-item-row').append('<button style="border:0px; background: none; " class="field-collection-item-action field-collection-item-remove" type="button">×</button>'); | |||||
}); | |||||
$collectionWidget.find('.field-collection-item-remove').off('click'); | |||||
$collectionWidget.find('.field-collection-item-remove').on('click', function (){ | |||||
$(this).parents('.form-group:first').remove(); | |||||
resetNumItemsCollectionField($collectionWidget); | |||||
}); | |||||
} |
{ | { | ||||
addressType: null, | addressType: null, | ||||
currentSection:'general', | currentSection:'general', | ||||
isOpenFullTime: false, | |||||
sectionsArray: [ | sectionsArray: [ | ||||
{ | { | ||||
name: 'general', | name: 'general', | ||||
nameDisplay: 'Catalogue' | |||||
nameDisplay: 'Général' | |||||
}, | }, | ||||
{ | { | ||||
name: 'product', | name: 'product', | ||||
nameDisplay: 'Maintenance' | nameDisplay: 'Maintenance' | ||||
} | } | ||||
] | ] | ||||
}, window.addressValues); | |||||
}, window.addressValues, window.merchantPanelOrderValues); | |||||
}, | }, | ||||
mounted: function () {}, | mounted: function () {}, | ||||
methods: { | methods: { |
availableQuantityInherited: false, | availableQuantityInherited: false, | ||||
availableQuantityDefaultInherited: false, | availableQuantityDefaultInherited: false, | ||||
propertyExpirationDateInherited: false | propertyExpirationDateInherited: false | ||||
}, window.productForm[this.keyForm]) | }, window.productForm[this.keyForm]) | ||||
}, | }, | ||||
mounted: function () { | mounted: function () { | ||||
}, | }, | ||||
availableQuantityDefaultUpdated: function () { | availableQuantityDefaultUpdated: function () { | ||||
}, | }, | ||||
propertyExpirationDateUpdated: function () { | |||||
}, | |||||
propertyExpirationDateUpdated: function () {}, | |||||
setFocusOnField: function (field, y) { | setFocusOnField: function (field, y) { | ||||
this[field] = true; | this[field] = true; | ||||
this.$nextTick(function () { | this.$nextTick(function () { | ||||
'reductionActive': this.reductionActive, | 'reductionActive': this.reductionActive, | ||||
'reductionUnit': this.reductionUnit, | 'reductionUnit': this.reductionUnit, | ||||
'reductionValue': this.reductionValue, | 'reductionValue': this.reductionValue, | ||||
'reductionBehaviorTaxRate': this.reductionBehaviorTaxRate | |||||
'reductionBehaviorTaxRate': this.reductionBehaviorTaxRate, | |||||
'giftVoucherActive': this.giftVoucherActive | |||||
}; | }; | ||||
} else { | } else { | ||||
return { | return { | ||||
'taxRateValue': null, | 'taxRateValue': null, | ||||
'productsQuantityAsTitle': null, | 'productsQuantityAsTitle': null, | ||||
'propertyExpirationDate': this.propertyExpirationDate, | 'propertyExpirationDate': this.propertyExpirationDate, | ||||
'behaviorExpirationDate': this.behaviorExpirationDate | |||||
'behaviorExpirationDate': this.behaviorExpirationDate, | |||||
'giftVoucherActive': this.giftVoucherActive | |||||
}; | }; | ||||
} | } | ||||
}, | }, | ||||
propertyNoveltyExpirationDateActive: false, | propertyNoveltyExpirationDateActive: false, | ||||
propertyNoveltyExpirationDate:null, | propertyNoveltyExpirationDate:null, | ||||
activeProducts: false, | activeProducts: false, | ||||
giftVoucherActive: false, | |||||
productsQuantityAsTitle: false, | productsQuantityAsTitle: false, | ||||
formProducts: {}, | formProducts: {}, | ||||
currentSection: 'general', | currentSection: 'general', |
dataType: "json", | dataType: "json", | ||||
success: function (response) { | success: function (response) { | ||||
setFlashMessages(response.flashMessages); | setFlashMessages(response.flashMessages); | ||||
$('body').append(response.data); | |||||
$('body').append(response.data).ready(function () { | |||||
initCollectionWidget(); | |||||
}); | |||||
$('#modal-user-address').modal('show'); | $('#modal-user-address').modal('show'); | ||||
$('#modal-user-address').on('hidden.bs.modal', function (e) { | $('#modal-user-address').on('hidden.bs.modal', function (e) { | ||||
$('#modal-user-address').remove(); | $('#modal-user-address').remove(); | ||||
appUserAddress = null; | appUserAddress = null; | ||||
function initUserAddressForm(form, btn) { | function initUserAddressForm(form, btn) { | ||||
appUserAddress = null; | appUserAddress = null; | ||||
$(form).find('button').off('click'); | $(form).find('button').off('click'); | ||||
$(form).find('button').on('click', function () { | $(form).find('button').on('click', function () { | ||||
if(checkFormValidity('#'+$(form).prop('id'))) { | if(checkFormValidity('#'+$(form).prop('id'))) { |
.main-sidebar .sidebar{padding-left: 0px; padding-right: 0px; padding-top: 114px;} | .main-sidebar .sidebar{padding-left: 0px; padding-right: 0px; padding-top: 114px;} | ||||
.main-sidebar .nav-link{padding: .4rem .5rem .4rem .7rem;} | .main-sidebar .nav-link{padding: .4rem .5rem .4rem .7rem;} | ||||
body#pdl-body .wrapper .main-sidebar{bottom: 0; float: none; height: 100vh; left: 0; position: fixed; top: 0;} | |||||
body#pdl-body .wrapper .main-sidebar{bottom: 0; float: none; height: 110vh; left: 0; position: fixed; top: 0;} | |||||
body#pdl-body .wrapper .sidebar{height: 100%;} | |||||
body#pdl-body .wrapper .sidebar nav{padding-bottom: 40px;} | |||||
body#pdl-body .wrapper .content-wrapper{margin-top: 0; padding-top: 57px;} | body#pdl-body .wrapper .content-wrapper{margin-top: 0; padding-top: 57px;} | ||||
.sidebar{overflow-y: auto;} | .sidebar{overflow-y: auto;} | ||||
nbResultsFiltered: Total d'élements filtrés | nbResultsFiltered: Total d'élements filtrés | ||||
nbResultsOnline: Total d'élements en ligne | nbResultsOnline: Total d'élements en ligne | ||||
nbResultsOffline: Total d'élements hors ligne | nbResultsOffline: Total d'élements hors ligne | ||||
nbResultsDeleted: Total d'élements supprimé | |||||
nbResultsDeleted: Total d'élements supprimés | |||||
nbResultsOnSale: Total de produits en vente | |||||
nbProductFamilyOnline: Total de produits visibles | |||||
listChildren: Afficher les enfants | listChildren: Afficher les enfants | ||||
edit: Éditer | edit: Éditer | ||||
delete: Supprimer | delete: Supprimer | ||||
editStockNoQuantityDefault: "Le stock n'a pas été modifié pour le produit #%id% (Aucune quantité par défaut)" | editStockNoQuantityDefault: "Le stock n'a pas été modifié pour le produit #%id% (Aucune quantité par défaut)" | ||||
field: | field: | ||||
default: | default: | ||||
unit: Unité | |||||
placeholder: Choisissez une option | placeholder: Choisissez une option | ||||
deliveryPointSale: Lieu de livraison | deliveryPointSale: Lieu de livraison | ||||
deliveryAvailabilty: Créneau de livraison | deliveryAvailabilty: Créneau de livraison | ||||
id: Id | id: Id | ||||
status: Statut | status: Statut | ||||
saleStatus: En vente sur le site | |||||
statusOptions: | statusOptions: | ||||
offline: <span class="badge badge-danger">Hors ligne</span> | offline: <span class="badge badge-danger">Hors ligne</span> | ||||
online: <span class="badge badge-success">En ligne</span> | online: <span class="badge badge-success">En ligne</span> | ||||
success: Succès (vert) | success: Succès (vert) | ||||
warningMessage: Contenu du message d'avertissement | warningMessage: Contenu du message d'avertissement | ||||
newsletters: Newsletters | newsletters: Newsletters | ||||
deliveryDepositoryOnly: Retrait au dépot uniquement | |||||
isPublic: Publique | isPublic: Publique | ||||
isDepository: Dépôt | isDepository: Dépôt | ||||
productCategories: Catégories | productCategories: Catégories | ||||
value: Montant ou valeur | value: Montant ou valeur | ||||
permanent: Réduction permanante | permanent: Réduction permanante | ||||
dateRange: Date de but et date de fin | dateRange: Date de but et date de fin | ||||
ReductionCredit: | |||||
type: | |||||
gift: Bon cadeau | |||||
credit: Avoir | |||||
ReductionCart: | ReductionCart: | ||||
type: Type de réduction | type: Type de réduction | ||||
typeOptions: | typeOptions: | ||||
type: Catégorie | type: Catégorie | ||||
message: Votre réponse | message: Votre réponse | ||||
typeOptions: | typeOptions: | ||||
message-from-pdl: Messsage de l'équipe Place du Local | |||||
general-question: Questions générales | general-question: Questions générales | ||||
product-unavailable: Produit manquant | product-unavailable: Produit manquant | ||||
product-error: Erreur sur un produit | product-error: Erreur sur un produit | ||||
add: Ajouter un pense-bête | add: Ajouter un pense-bête | ||||
address: | address: | ||||
add: Ajouter une adresse | add: Ajouter une adresse | ||||
ticket: | |||||
writeToUser: Écrire à l'utilisateur | |||||
resetting: | resetting: | ||||
check_email: | | check_email: | | ||||
Un e-mail vous a été envoyé. Il contient un lien sur lequel il vous faudra cliquer pour réinitialiser votre mot de passe. Si vous ne recevez pas d'email, vérifiez votre dossier spam ou essayez à nouveau. | Un e-mail vous a été envoyé. Il contient un lien sur lequel il vous faudra cliquer pour réinitialiser votre mot de passe. Si vous ne recevez pas d'email, vérifiez votre dossier spam ou essayez à nouveau. |
{% import '@LcShop/backend/productfamily/macros.html.twig' as macros %} | |||||
{{ macros.total_order_product_family(orderUtils.getTotalProductOrderedLastWeeks(item, 2, true)['total'], item, true) }} |
<i class="fa fa-check"></i> </span>{% endif %} | <i class="fa fa-check"></i> </span>{% endif %} | ||||
{% if paginator.nbResultsOffline is defined %}<span data-toggle="tooltip" | {% if paginator.nbResultsOffline is defined %}<span data-toggle="tooltip" | ||||
title="{{ "list.nbResultsOffline"|trans }}" | title="{{ "list.nbResultsOffline"|trans }}" | ||||
class="badge badge-warning">{{ paginator.nbResultsOffline }} | |||||
class="badge badge-danger">{{ paginator.nbResultsOffline }} | |||||
<i class="fa fa-pen"></i></span>{% endif %} | <i class="fa fa-pen"></i></span>{% endif %} | ||||
{% if is_granted('ROLE_SUPER_ADMIN') and paginator.nbResultsDeleted is defined %}<span | {% if is_granted('ROLE_SUPER_ADMIN') and paginator.nbResultsDeleted is defined %}<span | ||||
data-toggle="tooltip" title="{{ "list.nbResultsDeleted"|trans }}" | data-toggle="tooltip" title="{{ "list.nbResultsDeleted"|trans }}" | ||||
class="badge badge-danger">{{ paginator.nbResultsDeleted }} <i | |||||
class="badge badge-secondary">{{ paginator.nbResultsDeleted }} <i | |||||
class="fa fa-trash"></i> | class="fa fa-trash"></i> | ||||
</span>{% endif %} | </span>{% endif %} | ||||
{% endblock %} | {% endblock %} |
<span class="glyphicon glyphicon-triangle-bottom"></span> | <span class="glyphicon glyphicon-triangle-bottom"></span> | ||||
<i class="fa fa-exclamation-circle invalid-form"></i> | <i class="fa fa-exclamation-circle invalid-form"></i> | ||||
</button> | </button> | ||||
</li> | </li> | ||||
</ul> | </ul> | ||||
</div> | </div> |
<div class="row"> | <div class="row"> | ||||
<div class="col-8"> | <div class="col-8"> | ||||
{{ macros.card_start('Merchant.delivery','light') }} | {{ macros.card_start('Merchant.delivery','light') }} | ||||
{% if form.merchantConfigs['delivery-depository-only'] is defined %} | |||||
<div class="col-12"> | |||||
{{ form_row(form.merchantConfigs['delivery-depository-only']) }} | |||||
</div> | |||||
{% endif %} | |||||
{% if form.merchantConfigs['image-zones'] is defined %} | {% if form.merchantConfigs['image-zones'] is defined %} | ||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.merchantConfigs['image-zones']) }} | {{ form_row(form.merchantConfigs['image-zones']) }} |
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.merchantConfigs['email-contact']) }} | {{ form_row(form.merchantConfigs['email-contact']) }} | ||||
</div> | </div> | ||||
{% if form.merchantConfigs['email-from-purchase-order'] is defined %} | |||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.merchantConfigs['email-from-purchase-order']) }} | {{ form_row(form.merchantConfigs['email-from-purchase-order']) }} | ||||
</div> | </div> | ||||
{% endif %} | |||||
{% if form.merchantConfigs['purchase-order-email-content'] is defined %} | {% if form.merchantConfigs['purchase-order-email-content'] is defined %} | ||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.merchantConfigs['purchase-order-email-content']) }} | {{ form_row(form.merchantConfigs['purchase-order-email-content']) }} |
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.merchantConfigs['second-line-element-menu']) }} | {{ form_row(form.merchantConfigs['second-line-element-menu']) }} | ||||
</div> | </div> | ||||
{% if form.merchantConfigs['message-global-alert-type'] is defined %} | |||||
<div class="col-12"> | |||||
{{ form_row(form.merchantConfigs['message-global-alert-type']) }} | |||||
</div> | |||||
{% endif %} | |||||
{% if form.merchantConfigs['message-global-alert'] is defined %} | |||||
<div class="col-12"> | |||||
{{ form_row(form.merchantConfigs['message-global-alert']) }} | |||||
</div> | |||||
{% endif %} | |||||
{{ macros.card_end() }} | {{ macros.card_end() }} | ||||
</div> | </div> | ||||
</div> | </div> |
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
<script> | |||||
window.merchantPanelOrderValues = { | |||||
{% if form.merchantConfigs['is-open-full-time'] is defined %}isOpenFullTime: {{ form.merchantConfigs['is-open-full-time'].vars.data.value }}{% endif %} | |||||
}; | |||||
</script> | |||||
<div class="row"> | <div class="row"> | ||||
<div class="col-8"> | <div class="col-8"> | ||||
{{ macros.card_start('Merchant.order','light') }} | {{ macros.card_start('Merchant.order','light') }} | ||||
<div class="col-6"> | <div class="col-6"> | ||||
{{ form_row(form.merchantConfigs['maximum-order-week']) }} | {{ form_row(form.merchantConfigs['maximum-order-week']) }} | ||||
</div> | </div> | ||||
<div class="col-6"> | |||||
{% if form.merchantConfigs['is-open-full-time'] is defined %} | |||||
<div class="col-12"> | |||||
{% for field in form.merchantConfigs['is-open-full-time'] %} | |||||
{% if field.vars.name == 'value' %} | |||||
{{ form_row(field, {'attr': {"v-model" : 'isOpenFullTime'}}) }} | |||||
{% else %} | |||||
{{ form_row(field) }} | |||||
{% endif %} | |||||
{% endfor %} | |||||
</div> | |||||
{% endif %} | |||||
{% if form.merchantConfigs['message-site-opening-background'] is defined %} | |||||
<div v-show="isOpenFullTime == true" class="col-6"> | |||||
{{ form_row(form.merchantConfigs['message-site-opening-background']) }} | |||||
</div> | |||||
{% endif %} | |||||
{% if form.merchantConfigs['message-site-opening'] is defined %} | |||||
<div v-show="isOpenFullTime == true" class="col-6"> | |||||
{{ form_row(form.merchantConfigs['message-site-opening']) }} | |||||
</div> | |||||
{% endif %} | |||||
<div v-show="isOpenFullTime == false" class="col-6"> | |||||
{{ form_row(form.merchantConfigs['order-open-day']) }} | {{ form_row(form.merchantConfigs['order-open-day']) }} | ||||
</div> | </div> | ||||
<div class="col-6"> | |||||
<div v-show="isOpenFullTime == false" class="col-6"> | |||||
{{ form_row(form.merchantConfigs['order-open-time']) }} | {{ form_row(form.merchantConfigs['order-open-time']) }} | ||||
</div> | </div> | ||||
{% if form.merchantConfigs['order-open-day-vip'] is defined %} | {% if form.merchantConfigs['order-open-day-vip'] is defined %} | ||||
<div class="col-6"> | |||||
<div v-show="isOpenFullTime == false" class="col-6"> | |||||
{{ form_row(form.merchantConfigs['order-open-day-vip']) }} | {{ form_row(form.merchantConfigs['order-open-day-vip']) }} | ||||
</div> | </div> | ||||
{% endif %} | {% endif %} | ||||
{% if form.merchantConfigs['order-open-time-vip'] is defined %} | {% if form.merchantConfigs['order-open-time-vip'] is defined %} | ||||
<div class="col-6"> | |||||
<div v-show="isOpenFullTime == false" class="col-6"> | |||||
{{ form_row(form.merchantConfigs['order-open-time-vip']) }} | {{ form_row(form.merchantConfigs['order-open-time-vip']) }} | ||||
</div> | </div> | ||||
{% endif %} | {% endif %} | ||||
<div class="col-6"> | |||||
<div v-show="isOpenFullTime == false" class="col-6"> | |||||
{{ form_row(form.merchantConfigs['order-close-day']) }} | {{ form_row(form.merchantConfigs['order-close-day']) }} | ||||
</div> | </div> | ||||
<div class="col-6"> | |||||
<div v-show="isOpenFullTime == false" class="col-6"> | |||||
{{ form_row(form.merchantConfigs['order-close-time']) }} | {{ form_row(form.merchantConfigs['order-close-time']) }} | ||||
</div> | </div> | ||||
<div class="col-6"> | |||||
<div v-show="isOpenFullTime == false" class="col-6"> | |||||
{{ form_row(form.dateBeginHoliday) }} | {{ form_row(form.dateBeginHoliday) }} | ||||
</div> | </div> | ||||
<div class="col-6"> | |||||
<div v-show="isOpenFullTime == false" class="col-6"> | |||||
{{ form_row(form.dateEndHoliday) }} | {{ form_row(form.dateEndHoliday) }} | ||||
</div> | </div> | ||||
{{ macros.card_end() }} | {{ macros.card_end() }} |
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | {% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | ||||
{% block global_actions %} | |||||
{% if entity.user is not null %} | |||||
<button id="btn-ticket-write-to-user" | |||||
data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}" | |||||
data-user="{{ entity.user.id }}" | |||||
class="btn-sm btn-success" | |||||
type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }} | |||||
</button> | |||||
{% endif %} | |||||
{% endblock %} | |||||
{% block main %} | {% block main %} | ||||
<div class="lc-vue-js-container" id="lc-order-edit"> | <div class="lc-vue-js-container" id="lc-order-edit"> |
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | {% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | ||||
{% block global_actions %} | |||||
{% if entity.user is not null %} | |||||
<button id="btn-ticket-write-to-user" | |||||
data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}" | |||||
data-user="{{ entity.user.id }}" | |||||
data-order="{{ entity.id }}" | |||||
class="btn-sm btn-success" | |||||
type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }} | |||||
</button> | |||||
{% endif %} | |||||
{% endblock %} | |||||
{% block main %} | {% block main %} | ||||
<div class="lc-vue-js-container" id="lc-order-edit"> | <div class="lc-vue-js-container" id="lc-order-edit"> |
{% if formValues.behaviorExpirationDate %}behaviorExpirationDate: "{{ formValues.behaviorExpirationDate }}",{% endif %} | {% if formValues.behaviorExpirationDate %}behaviorExpirationDate: "{{ formValues.behaviorExpirationDate }}",{% endif %} | ||||
{% if formValues.propertyExpirationDate %}propertyExpirationDate: "{{ formValues.propertyExpirationDate }}",{% endif %} | {% if formValues.propertyExpirationDate %}propertyExpirationDate: "{{ formValues.propertyExpirationDate }}",{% endif %} | ||||
{% if formValues.activeProducts %}activeProducts: "{{ formValues.activeProducts }}",{% endif %} | {% if formValues.activeProducts %}activeProducts: "{{ formValues.activeProducts }}",{% endif %} | ||||
{% if formValues.giftVoucherActive %}giftVoucherActive: "{{ formValues.giftVoucherActive }}",{% endif %} | |||||
{% if formValues.productsQuantityAsTitle %}productsQuantityAsTitle: {{ formValues.productsQuantityAsTitle }},{% endif %} | {% if formValues.productsQuantityAsTitle %}productsQuantityAsTitle: {{ formValues.productsQuantityAsTitle }},{% endif %} | ||||
}; | }; |
{% endmacro total_order_product %} | {% endmacro total_order_product %} | ||||
{% macro total_order_product_family(totalProductOrdered, productFamily) %} | |||||
{% macro total_order_product_family(totalProductOrdered, productFamily,forceByMeasure = false) %} | |||||
{% for weekNumber, weekNumberQuantity in totalProductOrdered %} | {% for weekNumber, weekNumberQuantity in totalProductOrdered %} | ||||
<span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span> | <span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span> | ||||
<span class="text-info"><i class="fa fa-shopping-basket"></i> | <span class="text-info"><i class="fa fa-shopping-basket"></i> | ||||
<strong> | <strong> | ||||
{{ weekNumberQuantity is null ? 0 : weekNumberQuantity}} | {{ weekNumberQuantity is null ? 0 : weekNumberQuantity}} | ||||
{% if productFamily and productFamily.behaviorCountStock== constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') %} | |||||
{% if productFamily and (productFamily.behaviorCountStock== constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') or forceByMeasure)%} | |||||
{{ productFamily.unit.unitReference }} | {{ productFamily.unit.unitReference }} | ||||
{% endif %} | {% endif %} | ||||
</strong> | </strong> | ||||
{{ _self.product_field(3, product.price, 'price', false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }} | {{ _self.product_field(3, product.price, 'price', false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }} | ||||
{{ _self.product_field(3, product.priceWithTax, 'priceWithTax', false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }} | {{ _self.product_field(3, product.priceWithTax, 'priceWithTax', false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }} | ||||
<td colspan="2"> | |||||
<td colspan="2" v-show="productFamily.giftVoucherActive!= true"> | |||||
<span v-if="productFamily.reductionActive" class="text-danger"> | <span v-if="productFamily.reductionActive" class="text-danger"> | ||||
{% verbatim %}{{ marginProfitWithReduction }}{% endverbatim %}€<br /> | {% verbatim %}{{ marginProfitWithReduction }}{% endverbatim %}€<br /> | ||||
{% verbatim %}{{ marginProfitPercentWithReduction }}{% endverbatim %}% | {% verbatim %}{{ marginProfitPercentWithReduction }}{% endverbatim %}% | ||||
{{ _self.product_field(2, product.availableQuantityDefault, 'availableQuantityDefault',false, '', 'v-show="productFamily.behaviorCountStock== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') ~ '\' && productFamily.behaviorStockWeek!= \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') ~ '\'"') }} | {{ _self.product_field(2, product.availableQuantityDefault, 'availableQuantityDefault',false, '', 'v-show="productFamily.behaviorCountStock== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') ~ '\' && productFamily.behaviorStockWeek!= \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') ~ '\'"') }} | ||||
<td colspan="2" v-show="productFamily.behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' || productFamily.behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'"> | |||||
<td colspan="2"> | |||||
{{ _self.total_order_product(totalProductOrdered) }} | {{ _self.total_order_product(totalProductOrdered) }} | ||||
</td> | </td> | ||||
{# <td colspan="4" v-show="productFamily.giftVoucherActive== true"> | |||||
{{ form_row(product.giftVoucherReductionCart, {"label": false, "attr" : {'v-model' : 'giftVoucherReductionCart', ':required': 'status ==1 && productFamily.giftVoucherActive'}}) }} | |||||
</td>#} | |||||
<td colspan="3"> | <td colspan="3"> | ||||
<button type="button" class="btn-sm btn-info" @click="modalProductForm()"> | <button type="button" class="btn-sm btn-info" @click="modalProductForm()"> | ||||
<i class="fa fa-edit"></i> | <i class="fa fa-edit"></i> | ||||
</div> | </div> | ||||
<div class="col"> | <div class="col"> | ||||
{{ form_row(product.exportNote) }} | {{ form_row(product.exportNote) }} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="modal-footer justify-content-between"> | <div class="modal-footer justify-content-between"> | ||||
<button type="button" class="btn btn-info float-right" data-dismiss="modal">Ok</button> | <button type="button" class="btn btn-info float-right" data-dismiss="modal">Ok</button> |
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.status) }} | {{ form_row(form.status) }} | ||||
</div> | </div> | ||||
<div class="col-12"> | |||||
{{ form_row(form.saleStatus) }} | |||||
</div> | |||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.supplier) }} | {{ form_row(form.supplier) }} | ||||
</div> | </div> |
{{ form_widget(field, {"attr" : {"v-model" : 'behaviorPrice'}}) }} | {{ form_widget(field, {"attr" : {"v-model" : 'behaviorPrice'}}) }} | ||||
{% endfor %} | {% endfor %} | ||||
</div> | </div> | ||||
<div class="col-12" v-show="activeProducts == true"> | |||||
<label>Bon cadeau</label> | |||||
{{ form_row(form.giftVoucherActive, {"attr": {"v-model": 'giftVoucherActive'}}) }} | |||||
</div> | |||||
{{ macros.endCard(true) }} | {{ macros.endCard(true) }} | ||||
{{ macros.startCard(0, 'ProductFamily.tax','light') }} | {{ macros.startCard(0, 'ProductFamily.tax','light') }} | ||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.taxRate, {'attr': {'v-model':'taxRate'}}) }} | {{ form_row(form.taxRate, {'attr': {'v-model':'taxRate'}}) }} |
<button v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'" v-on:click="emptyProductsField('priceWithTax');" | <button v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'" v-on:click="emptyProductsField('priceWithTax');" | ||||
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> | class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> | ||||
</th> | </th> | ||||
<th colspan="2"> | |||||
<th colspan="2" v-show="giftVoucherActive!= true"> | |||||
Marge HT | Marge HT | ||||
</th> | </th> | ||||
<button v-on:click="emptyProductsField('availableQuantityDefault');" | <button v-on:click="emptyProductsField('availableQuantityDefault');" | ||||
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> | class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> | ||||
</th> | </th> | ||||
<th colspan="2" | |||||
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' || behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'"> | |||||
<th colspan="2"> | |||||
Semaine / Commandés | Semaine / Commandés | ||||
</th> | </th> | ||||
{#<th colspan="4" | |||||
v-show="giftVoucherActive== true"> | |||||
Réduction "Bon cadeaux" | |||||
</th>#} | |||||
<th colspan="3" class=""> | <th colspan="3" class=""> | ||||
Action | Action | ||||
</th> | </th> | ||||
<th colspan="3" class="price main-info"> | <th colspan="3" class="price main-info"> | ||||
${productFamily.priceWithTax} | ${productFamily.priceWithTax} | ||||
</th> | </th> | ||||
<th colspan="2" class="price"> | |||||
<th colspan="2" class="price" v-show="giftVoucherActive!= true"> | |||||
${productFamily.marginProfit}€<br/> | ${productFamily.marginProfit}€<br/> | ||||
${productFamily.marginProfitPercent}% | ${productFamily.marginProfitPercent}% | ||||
</td> | </td> | ||||
<th colspan="2" | <th colspan="2" | ||||
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' && behaviorStockWeek!= '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') }}'"> | v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' && behaviorStockWeek!= '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') }}'"> | ||||
</th> | </th> | ||||
<th colspan="2" | |||||
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' || behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'"> | |||||
<th colspan="2"> | |||||
</th> | </th> | ||||
{#<th colspan="4" | |||||
v-show="giftVoucherActive== true"> | |||||
</th>#} | |||||
<th colspan="3" class=""> | <th colspan="3" class=""> | ||||
</th> | </th> | ||||
{% if product.vars.value.availableQuantity %}availableQuantity: parseInt({{ product.vars.value.availableQuantity }}),{% endif %} | {% if product.vars.value.availableQuantity %}availableQuantity: parseInt({{ product.vars.value.availableQuantity }}),{% endif %} | ||||
{% if product.vars.value.availableQuantityDefault %}availableQuantityDefault: parseInt({{ product.vars.value.availableQuantityDefault }}),{% endif %} | {% if product.vars.value.availableQuantityDefault %}availableQuantityDefault: parseInt({{ product.vars.value.availableQuantityDefault }}),{% endif %} | ||||
{% if product.vars.value.propertyExpirationDate %}propertyExpirationDate: "{{ product.vars.value.propertyExpirationDate }}",{% endif %} | {% if product.vars.value.propertyExpirationDate %}propertyExpirationDate: "{{ product.vars.value.propertyExpirationDate }}",{% endif %} | ||||
{#{% if product.vars.value.giftVoucherReductionCart %}giftVoucherReductionCart: {{ product.vars.value.giftVoucherReductionCart.id }},{% endif %}#} | |||||
{# {% if product.vars.value.expirationDate %}expirationDate: "{{ product.vars.value.expirationDate|date('d/m/Y') }}"{% endif %} #} | {# {% if product.vars.value.expirationDate %}expirationDate: "{{ product.vars.value.expirationDate|date('d/m/Y') }}"{% endif %} #} | ||||
}; | }; | ||||
window.formProductTemplate[{{ keyForm }}] = '{{ product_family_macros.product_row(product, totalProductOrdered[product.vars.value.id])|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}'; | window.formProductTemplate[{{ keyForm }}] = '{{ product_family_macros.product_row(product, totalProductOrdered[product.vars.value.id])|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}'; |
<div class="col-6"> | <div class="col-6"> | ||||
{{ form_row(form.availableQuantityPerUser) }} | {{ form_row(form.availableQuantityPerUser) }} | ||||
</div> | </div> | ||||
{# | |||||
<div class="col-4"> | |||||
{{ form_row(form.availableQuantityPerCode) }} | |||||
</div>#} | |||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.codes, {"attr":{'v-on:keyup' : 'updateCodes'}}) }} | {{ form_row(form.codes, {"attr":{'v-on:keyup' : 'updateCodes'}}) }} | ||||
</div> | </div> | ||||
{{ macros.endCard() }} | {{ macros.endCard() }} | ||||
</div> | </div> |
{% set lastMessage = item.ticketMessages.last %} | {% set lastMessage = item.ticketMessages.last %} | ||||
{% if lastMessage.answerByAdmin != true %} | |||||
<span class="badge badge-danger"> | |||||
{% if lastMessage %} | |||||
{% if lastMessage.answerByAdmin != true %} | |||||
<span class="badge badge-danger"> | |||||
New | New | ||||
</span> | |||||
</span> | |||||
{% endif %} | |||||
{{ lastMessage.createdAt|date('d/m/Y H:i') }} par {{ lastMessage.createdBy }} | |||||
{% endif %} | {% endif %} | ||||
{{ lastMessage.createdAt|date('d/m/Y H:i') }} par {{ lastMessage.createdBy }} |
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% block id %}modal-new-ticket{% endblock %} | |||||
{% block title %}{{ "action.ticket.writeToUser"|trans }}{% endblock %} | |||||
{% block form_start %} | |||||
{{ form_start(form, {'attr': { 'id' : 'newTicket', 'action': path('easyadmin', {'entity' : 'Ticket', 'action': 'new'})}}) }} | |||||
{% form_theme form '@LcShop/backend/form/custom_modal_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
{% block content %} | |||||
<div class="col"> | |||||
{{ form_row(form.user) }} | |||||
{{ form_row(form.subject) }} | |||||
{{ dump(form.orderId.vars.value) }} | |||||
{% if form.orderId.vars.value is not empty %} | |||||
<p> | |||||
<strong>Ce ticket concernera la commande #{{ form.orderId.vars.value }}</strong><br /> | |||||
<i>Si vous ne le souhaitez pas, écrivez à l'utilisateur depuis l'onglet utilisateur</i> | |||||
</p> | |||||
{% endif %} | |||||
{{ form_rest(form) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
<button type="button" class="btn btn-primary btn-save" >{{ 'action.send'|trans }}</button> | |||||
{#{{ form_rest(form) }}#} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% extends app.request.query.get('action') == 'edit' ? '@LcShop/backend/default/edit.html.twig' : '@LcShop/backend/default/new.html.twig' %} | |||||
{% extends app.request.query.get('action') == 'edit' ? '@LcShop/backend/default/edit.html.twig' : '@LcShop/backend/default/new.html.twig' %} | |||||
{% trans_default_domain 'lcshop' %} | {% trans_default_domain 'lcshop' %} | ||||
{% block global_actions %} | |||||
<button id="btn-ticket-write-to-user" | |||||
data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}" | |||||
data-user="{{ entity.id }}" | |||||
class="btn-sm btn-success" | |||||
type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }}</button> | |||||
{% endblock %} | |||||
{% block entity_form %} | {% block entity_form %} | ||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{{ form_start(form) }} | {{ form_start(form) }} | ||||
{% form_theme form '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | {% form_theme form '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | ||||
<div class="row"> | <div class="row"> | ||||
<div class="col-7"> | |||||
{{ macros.card_start() }} | |||||
<div class="col"> | |||||
{% for field in form.children %} | |||||
{{ form_row(field) }} | |||||
{% endfor %} | |||||
</div> | |||||
{{ macros.card_end() }} | |||||
</div> | |||||
<div class="col-7"> | |||||
{{ macros.card_start() }} | |||||
<div class="col"> | |||||
{% for field in form.children %} | |||||
{{ form_row(field) }} | |||||
{% endfor %} | |||||
</div> | |||||
{{ macros.card_end() }} | |||||
</div> | |||||
<div class="col-5"> | <div class="col-5"> | ||||
<div class="row" id="user-addresses"> | <div class="row" id="user-addresses"> | ||||
{% for address in entity.addresses %} | |||||
{% if address.status >=0 %} | |||||
{% include '@LcShop/backend/user/block_useraddress.html.twig' %} | |||||
{% endif %} | |||||
{% endfor %} | |||||
{% for address in entity.addresses %} | |||||
{% if address.status >=0 %} | |||||
{% include '@LcShop/backend/user/block_useraddress.html.twig' %} | |||||
{% endif %} | |||||
{% endfor %} | |||||
</div> | </div> | ||||
<button type="button" data-url="{{ path('easyadmin', {"action": 'editAddressUser', 'entity': 'User', 'id': entity.id, 'addressId': 'new'}) }}" | |||||
class="btn btn-primary btn-add-user-address" ><i class="fa fa-plus"></i> {{ 'action.address.add'|trans }} | |||||
<button type="button" | |||||
data-url="{{ path('easyadmin', {"action": 'editAddressUser', 'entity': 'User', 'id': entity.id, 'addressId': 'new'}) }}" | |||||
class="btn btn-primary btn-add-user-address"><i | |||||
class="fa fa-plus"></i> {{ 'action.address.add'|trans }} | |||||
</button> | </button> | ||||
</div> | </div> |
{% extends '@LcShop/backend/default/show.html.twig' %} | {% extends '@LcShop/backend/default/show.html.twig' %} | ||||
{% trans_default_domain 'lcshop' %} | {% trans_default_domain 'lcshop' %} | ||||
{% block global_actions %} | |||||
<button id="btn-ticket-write-to-user" | |||||
data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}" | |||||
data-user="{{ entity.user.id }}" | |||||
class="btn-sm btn-success" | |||||
type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }}</button> | |||||
{% endblock %} | |||||
{% block main %} | {% block main %} | ||||
<div class="row"> | <div class="row"> | ||||
<td class="sorted">{{ creditHistory.id }}</td> | <td class="sorted">{{ creditHistory.id }}</td> | ||||
<td class="association">{{ creditHistory.type }}</td> | <td class="association">{{ creditHistory.type }}</td> | ||||
<td class="">{{ creditHistory.amountInherited }} €</td> | <td class="">{{ creditHistory.amountInherited }} €</td> | ||||
<td class="">{{ creditHistory.meanPaymentInherited }}</td> | |||||
<td class="">{{ creditHistory.meanPaymentInherited }}</td> | |||||
<td class="">{{ creditHistory.paidAtInherited |date('d-m-y') }}</td> | <td class="">{{ creditHistory.paidAtInherited |date('d-m-y') }}</td> | ||||
<td class="">{{ creditHistory.referenceInherited }}</td> | |||||
<td class="">{{ creditHistory.commentInherited }}</td> | |||||
<td class="">{{ creditHistory.referenceInherited }}</td> | |||||
<td class="">{{ creditHistory.commentInherited }}</td> | |||||
</tr> | </tr> | ||||
{% else %} | {% else %} | ||||
{% block head_stylesheets %} | {% block head_stylesheets %} | ||||
{{ parent() }} | {{ parent() }} | ||||
<link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/fixedHeader.dataTables.min.css') }}"> | |||||
<link rel="stylesheet" | |||||
href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/fixedHeader.dataTables.min.css') }}"> | |||||
<link rel="stylesheet" | <link rel="stylesheet" | ||||
href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/dataTables.bootstrap4.min.css') }}"> | href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/dataTables.bootstrap4.min.css') }}"> | ||||
{% endblock %} | {% endblock %} |
const ATTACHMENT_DATA = 'attachment-data'; | const ATTACHMENT_DATA = 'attachment-data'; | ||||
const ATTACHMENT_FILENAME = 'attachment-filename'; | const ATTACHMENT_FILENAME = 'attachment-filename'; | ||||
const ATTACHMENT_CONTENT_TYPE = 'attachment-content-type'; | const ATTACHMENT_CONTENT_TYPE = 'attachment-content-type'; | ||||
//const DISPOSITION_NOTIFICATION_TO = 'disposition-notification-to' ; | |||||
protected $transport; | protected $transport; | ||||
protected $templating; | protected $templating; | ||||
->setBody($this->templating->render($params[self::CONTENT_TEMPLATE] . '-html.html.twig', $contentData), 'text/html') | ->setBody($this->templating->render($params[self::CONTENT_TEMPLATE] . '-html.html.twig', $contentData), 'text/html') | ||||
->addPart($this->templating->render($params[self::CONTENT_TEMPLATE] . '-text.html.twig', $contentData)); | ->addPart($this->templating->render($params[self::CONTENT_TEMPLATE] . '-text.html.twig', $contentData)); | ||||
if (isset($params[self::COPY_TO]) && strlen($params[self::COPY_TO])) { | |||||
if(isset($params[self::COPY_TO]) && strlen($params[self::COPY_TO])) { | |||||
$message->addCc($params[self::COPY_TO]); | $message->addCc($params[self::COPY_TO]); | ||||
} | } | ||||
if (isset($params[self::COPY_HIDDEN_TO]) && strlen($params[self::COPY_HIDDEN_TO])) { | |||||
if(isset($params[self::COPY_HIDDEN_TO]) && strlen($params[self::COPY_HIDDEN_TO])) { | |||||
$message->addBcc($params[self::COPY_HIDDEN_TO]); | $message->addBcc($params[self::COPY_HIDDEN_TO]); | ||||
} | } | ||||
if (isset($params[self::REPLY_TO]) && strlen($params[self::REPLY_TO])) { | |||||
if(isset($params[self::REPLY_TO]) && strlen($params[self::REPLY_TO])) { | |||||
$message->addReplyTo($params[self::REPLY_TO]); | $message->addReplyTo($params[self::REPLY_TO]); | ||||
} | } | ||||
if (isset($params[self::ATTACHMENT_DATA]) && isset($params[self::ATTACHMENT_FILENAME]) && isset($params[self::ATTACHMENT_CONTENT_TYPE])) { | |||||
if(isset($params[self::ATTACHMENT_DATA]) && isset($params[self::ATTACHMENT_FILENAME]) && isset($params[self::ATTACHMENT_CONTENT_TYPE])) { | |||||
$message->attach(\Swift_Attachment::newInstance( | $message->attach(\Swift_Attachment::newInstance( | ||||
$params[self::ATTACHMENT_DATA], | $params[self::ATTACHMENT_DATA], | ||||
$params[self::ATTACHMENT_FILENAME], | $params[self::ATTACHMENT_FILENAME], | ||||
)); | )); | ||||
} | } | ||||
/*if(isset($params[self::DISPOSITION_NOTIFICATION_TO]) && $params[self::DISPOSITION_NOTIFICATION_TO]) { | |||||
$emailFromDispositionNotificationTo = $emailFrom ; | |||||
if(isset($params[self::REPLY_TO]) && strlen($params[self::REPLY_TO])) { | |||||
$emailFromDispositionNotificationTo = $params[self::REPLY_TO] ; | |||||
} | |||||
$message->getHeaders()->addTextHeader('Disposition-Notification-To', $emailFromDispositionNotificationTo) ; | |||||
$message->getHeaders()->addMailboxHeader('Disposition-Notification-To', $emailFromDispositionNotificationTo); | |||||
}*/ | |||||
$this->transport->send($message); | $this->transport->send($message); | ||||
} | } | ||||
} | } |
$this->em->flush(); | $this->em->flush(); | ||||
} | } | ||||
$this->eventOrderShopChangeQuantity($orderShop) ; | |||||
$this->eventCartChange($orderShop) ; | |||||
} | } | ||||
} | } | ||||
else { | else { | ||||
return $this->priceUtils->getTotalWithTax($orderShop) >= 0 ; | return $this->priceUtils->getTotalWithTax($orderShop) >= 0 ; | ||||
} | } | ||||
public function eventOrderShopChangeQuantity(OrderShopInterface $orderShop) | |||||
public function eventCartChange(OrderShopInterface $orderShop) | |||||
{ | { | ||||
} | } |
use Lc\ShopBundle\Context\OrderShopInterface; | use Lc\ShopBundle\Context\OrderShopInterface; | ||||
use Lc\ShopBundle\Context\ReductionCartInterface; | use Lc\ShopBundle\Context\ReductionCartInterface; | ||||
use Lc\ShopBundle\Context\ReductionCreditInterface; | use Lc\ShopBundle\Context\ReductionCreditInterface; | ||||
use Lc\ShopBundle\Model\ReductionCredit; | |||||
use function Matrix\trace; | |||||
trait OrderUtilsReductionTrait | trait OrderUtilsReductionTrait | ||||
{ | { | ||||
public function getReductionCartByCode($code){ | |||||
$reductionCartRepository = $this->em->getRepository(ReductionCartInterface::class); | |||||
$reductionCarts = $reductionCartRepository->findByCode($code); | |||||
$findReductionCart = null; | |||||
foreach ($reductionCarts as $reductionCart) { | |||||
if ($reductionCart && in_array($code, $reductionCart->getCodes())) { | |||||
$findReductionCart = $reductionCart; | |||||
} | |||||
} | |||||
return $findReductionCart; | |||||
} | |||||
public function compareOrderProductReductionCatalog($orderProductReductionCatalog1, $orderProductReductionCatalog2) | public function compareOrderProductReductionCatalog($orderProductReductionCatalog1, $orderProductReductionCatalog2) | ||||
{ | { | ||||
return (!$orderProductReductionCatalog1 && !$orderProductReductionCatalog2) | return (!$orderProductReductionCatalog1 && !$orderProductReductionCatalog2) | ||||
} | } | ||||
public function createOrderReductionCart(OrderShopInterface $orderShop, ReductionCartInterface $reductionCart) | |||||
public function createOrderReductionCart(OrderShopInterface $orderShop, ReductionCartInterface $reductionCart, $code = null) | |||||
{ | { | ||||
$orderReductionCartClass = $this->em->getClassMetadata(OrderReductionCartInterface::class); | $orderReductionCartClass = $this->em->getClassMetadata(OrderReductionCartInterface::class); | ||||
$orderReductionCart = new $orderReductionCartClass->name; | $orderReductionCart = new $orderReductionCartClass->name; | ||||
$orderReductionCart->setTitle($reductionCart->getTitle()); | $orderReductionCart->setTitle($reductionCart->getTitle()); | ||||
$orderReductionCart->setValue($reductionCart->getValue()); | $orderReductionCart->setValue($reductionCart->getValue()); | ||||
$orderReductionCart->setUnit($reductionCart->getUnit()); | $orderReductionCart->setUnit($reductionCart->getUnit()); | ||||
$orderReductionCart->setCodeUsed($code); | |||||
$orderReductionCart->setBehaviorTaxRate($reductionCart->getBehaviorTaxRate()); | $orderReductionCart->setBehaviorTaxRate($reductionCart->getBehaviorTaxRate()); | ||||
$orderReductionCart->setFreeShipping($reductionCart->getFreeShipping()); | $orderReductionCart->setFreeShipping($reductionCart->getFreeShipping()); | ||||
$orderReductionCart->setAppliedTo($reductionCart->getAppliedTo()); | $orderReductionCart->setAppliedTo($reductionCart->getAppliedTo()); | ||||
} | } | ||||
// n'a pas été utilisé | // n'a pas été utilisé | ||||
if ($this->orderShopRepo->countValidOrderWithReductionCredit($reductionCredit, $user) > 0) { | |||||
$this->utils->addFlash('error', 'error.reductionCredit.alreadyUse'); | |||||
return false; | |||||
if($reductionCredit->getType()== ReductionCredit::TYPE_CREDIT){ | |||||
if ($this->orderShopRepo->countValidOrderWithReductionCredit($reductionCredit, $user) > 0) { | |||||
$this->utils->addFlash('error', 'error.reductionCredit.alreadyUse'); | |||||
return false; | |||||
} | |||||
}else{ | |||||
if ($this->orderShopRepo->countValidOrderWithReductionCredit($reductionCredit) > 0) { | |||||
$this->utils->addFlash('error', 'error.reductionCredit.alreadyUse'); | |||||
return false; | |||||
} | |||||
} | } | ||||
return true; | return true; | ||||
$orderReductionCredit->setValue($reductionCredit->getValue()); | $orderReductionCredit->setValue($reductionCredit->getValue()); | ||||
$orderReductionCredit->setUnit($reductionCredit->getUnit()); | $orderReductionCredit->setUnit($reductionCredit->getUnit()); | ||||
$orderReductionCredit->setBehaviorTaxRate($reductionCredit->getBehaviorTaxRate()); | $orderReductionCredit->setBehaviorTaxRate($reductionCredit->getBehaviorTaxRate()); | ||||
$orderReductionCredit->setType($reductionCredit->getType()); | |||||
$orderShop->addOrderReductionCredit($orderReductionCredit) ; | $orderShop->addOrderReductionCredit($orderReductionCredit) ; | ||||
return $reductionCreditsArray ; | return $reductionCreditsArray ; | ||||
} | } | ||||
public function getReductionGiftsAvailableByUser($user) | |||||
{ | |||||
$reductionGifts = $this->reductionCreditRepo->findReductionGiftToUseByUser($user) ; | |||||
$reductionGiftsArray = [] ; | |||||
foreach($reductionGifts as $reductionGift) { | |||||
if(!$this->orderShopRepo->countValidOrderWithReductionCredit($reductionGift)) { | |||||
$reductionGiftsArray[] = $reductionGift ; | |||||
} | |||||
} | |||||
return $reductionGiftsArray ; | |||||
} | |||||
public function isReductionGiftUsed($reductionGift){ | |||||
if($this->orderShopRepo->countValidOrderWithReductionCredit($reductionGift)) { | |||||
return true; | |||||
}else{ | |||||
return false; | |||||
} | |||||
} | |||||
public function isReductionCreditAddedToOrder($orderShop, $reductionCredit) | public function isReductionCreditAddedToOrder($orderShop, $reductionCredit) | ||||
{ | { | ||||
foreach($orderShop->getOrderReductionCredits() as $orderReductionCredit) { | foreach($orderShop->getOrderReductionCredits() as $orderReductionCredit) { |
} | } | ||||
} | } | ||||
public function isProductSaleStatusOn(Product $product) | |||||
{ | |||||
if($product->getProductFamily()->getSaleStatus()!=1) { | |||||
return false ; | |||||
} | |||||
$allCategoriesSalesOff = true; | |||||
foreach ($product->getProductFamily()->getProductCategories() as $category){ | |||||
if($category->getParent()) { | |||||
if($category->getSaleStatus() && $category->getParent()->getSaleStatus()) | |||||
$allCategoriesSalesOff = false; | |||||
} | |||||
else { | |||||
if($category->getSaleStatus()) $allCategoriesSalesOff = false; | |||||
} | |||||
} | |||||
if($allCategoriesSalesOff) return false; | |||||
return true ; | |||||
} | |||||
public function isProductAvailable(Product $product, $quantityOrder = 0, $checkCart = false, $orderShop = null) | public function isProductAvailable(Product $product, $quantityOrder = 0, $checkCart = false, $orderShop = null) | ||||
{ | { | ||||
if ($product->getStatus() != 1 || $product->getProductFamily()->getStatus() != 1) { | |||||
if ($product->getStatus() != 1 || $product->getProductFamily()->getStatus() != 1 || !$this->isProductSaleStatusOn($product)) { | |||||
return false; | return false; | ||||
} | } | ||||
$ticketMessage->setStatus(1) ; | $ticketMessage->setStatus(1) ; | ||||
$ticketMessage->setTicket($ticket) ; | $ticketMessage->setTicket($ticket) ; | ||||
$ticketMessage->setMessage($params['message']) ; | $ticketMessage->setMessage($params['message']) ; | ||||
if(isset($params['createByAdmin']) && $params['createByAdmin'])$ticketMessage->setAnswerByAdmin(true); | |||||
$this->em->persist($ticketMessage); | $this->em->persist($ticketMessage); | ||||
$this->em->flush() ; | $this->em->flush() ; | ||||
// envoi email au client | |||||
$this->mailUtils->send([ | |||||
MailUtils::SUBJECT => 'Nouvelle demande', | |||||
MailUtils::TO_EMAIL => $email, | |||||
MailUtils::CONTENT_TEMPLATE => 'mail/ticket-new', | |||||
MailUtils::CONTENT_DATA => [ | |||||
'firstname' => $firstname, | |||||
'ticket' => $ticket | |||||
], | |||||
]) ; | |||||
if(isset($params['createByAdmin']) && $params['createByAdmin']) { | |||||
// envoi email au client | |||||
$this->mailUtils->send([ | |||||
MailUtils::SUBJECT => 'Vous avez reçu un nouveau message', | |||||
MailUtils::TO_EMAIL => $email, | |||||
MailUtils::CONTENT_TEMPLATE => 'mail/ticket-new-by-admin', | |||||
MailUtils::CONTENT_DATA => [ | |||||
'firstname' => $firstname, | |||||
'ticket' => $ticket | |||||
], | |||||
]); | |||||
}else{ | |||||
$this->mailUtils->send([ | |||||
MailUtils::SUBJECT => 'Nouvelle demande', | |||||
MailUtils::TO_EMAIL => $email, | |||||
MailUtils::CONTENT_TEMPLATE => 'mail/ticket-new', | |||||
MailUtils::CONTENT_DATA => [ | |||||
'firstname' => $firstname, | |||||
'ticket' => $ticket | |||||
], | |||||
]); | |||||
} | |||||
$this->notifyAdmin($ticket, $ticketMessage); | $this->notifyAdmin($ticket, $ticketMessage); |
use Lc\ShopBundle\Context\UserPointSaleInterface; | use Lc\ShopBundle\Context\UserPointSaleInterface; | ||||
use Liip\ImagineBundle\Imagine\Cache\CacheManager; | use Liip\ImagineBundle\Imagine\Cache\CacheManager; | ||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; | use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; | ||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType; | |||||
use Symfony\Component\Form\FormBuilderInterface; | |||||
use Symfony\Component\HttpClient\HttplugClient; | use Symfony\Component\HttpClient\HttplugClient; | ||||
use Symfony\Component\HttpFoundation\ParameterBag; | use Symfony\Component\HttpFoundation\ParameterBag; | ||||
use Symfony\Component\HttpFoundation\Session\SessionInterface; | use Symfony\Component\HttpFoundation\Session\SessionInterface; | ||||
use Symfony\Component\Validator\Constraints\EqualTo; | |||||
use Symfony\Contracts\Translation\TranslatorInterface; | use Symfony\Contracts\Translation\TranslatorInterface; | ||||
class Utils | class Utils | ||||
} | } | ||||
public function addCaptchaType(FormBuilderInterface $builder) | |||||
{ | |||||
$builder->add('specialField', HiddenType::class, [ | |||||
'data' => 0, | |||||
'mapped' => false, | |||||
'attr' => [ | |||||
'class' => 'special-field' | |||||
], | |||||
'constraints' => [ | |||||
new EqualTo(['value' => $this->parameterBag->get('app.captcha_value'), 'message' => 'Valeur incorrecte']) | |||||
], | |||||
]); | |||||
} | |||||
public function urlEncryptData($datas){ | |||||
$key = 'secretToken'; | |||||
foreach ($datas as $data) { | |||||
$key .= $data; | |||||
} | |||||
return md5($key); | |||||
} | |||||
} | } |