Преглед на файлове

[Administration] Emails automatiques

feature/rotating_product
Guillaume Bourgeois преди 4 месеца
родител
ревизия
03c035e693
променени са 7 файла, в които са добавени 18 реда и са изтрити 12 реда
  1. +1
    -1
      backend/views/communicate-admin/index.php
  2. +2
    -2
      backend/views/communicate/paper.php
  3. +1
    -1
      backend/views/layouts/left.php
  4. +6
    -0
      backend/web/js/backend.js
  5. +1
    -1
      common/components/UrlManagerCommon.php
  6. +7
    -3
      domain/Communication/AutomaticEmail/AutomaticEmailResolver.php
  7. +0
    -4
      producer/controllers/OrderController.php

+ 1
- 1
backend/views/communicate-admin/index.php Целия файл

@@ -40,7 +40,7 @@ use yii\helpers\Html ;
use yii\widgets\ActiveForm;

$this->setTitle('Envoyer un email') ;
$this->addBreadcrumb(['label' => 'Communiquer', 'url' => ['user/index']]) ;
$this->addBreadcrumb(['label' => 'Communication', 'url' => ['user/index']]) ;
$this->addBreadcrumb($this->getTitle()) ;

?>

+ 2
- 2
backend/views/communicate/paper.php Целия файл

@@ -38,8 +38,8 @@ termes.

use yii\helpers\Html ;

$this->setTitle('Communiquer par papier') ;
$this->addBreadcrumb('Communiquer') ;
$this->setTitle('Communication par papier') ;
$this->addBreadcrumb('Communication') ;

?>


+ 1
- 1
backend/views/layouts/left.php Целия файл

@@ -245,7 +245,7 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran
],
['label' => 'Abonnements', 'icon' => 'repeat', 'url' => ['/subscription/index'], 'visible' => $isUserCurrentGrantedAsProducer, 'active' => Yii::$app->controller->id == 'subscription'],
[
'label' => 'Communiquer',
'label' => 'Communication',
'icon' => 'bullhorn',
'url' => ['/communicate/email'],
'visible' => $isUserCurrentGrantedAsProducer,

+ 6
- 0
backend/web/js/backend.js Целия файл

@@ -184,6 +184,12 @@ function opendistrib_user_form_event($fieldUserEmail, $fieldSendMailWelcome) {
}
}

function opendistrib_user_credit() {
if($('body.user-credit').length) {
$('#creditform-amount').focus();
}
}

function opendistrib_producers_admin() {
$('.producer-admin-index .btn-alwaysdata, .producer-admin-index .btn-dolibarr').click(function () {
var $button = $(this);

+ 1
- 1
common/components/UrlManagerCommon.php Целия файл

@@ -67,7 +67,7 @@ class UrlManagerCommon extends UrlManager
{
if ($this->_hostInfo === null)
{
$secure = Yii::$app->getRequest()->getIsSecureConnection();
$secure = Yii::$app->getRequest()->isConsoleRequest ? false : Yii::$app->getRequest()->getIsSecureConnection();
$http = $secure ? 'https' : 'http';

if (isset($_SERVER['HTTP_HOST'])) {

+ 7
- 3
domain/Communication/AutomaticEmail/AutomaticEmailResolver.php Целия файл

@@ -20,10 +20,14 @@ class AutomaticEmailResolver extends AbstractResolver

public function getMatchedDistribution(AutomaticEmail $automaticEmail): ?Distribution
{
$date = (new \DateTime('+'.$automaticEmail->getDelayBeforeDistribution().' days'))->format('Y-m-d');
$distribution = $this->distributionRepository->findOneDistribution($date);
$date = (new \DateTime('+'.$automaticEmail->getDelayBeforeDistribution().' days'));
$dateFormat = $date->format('Y-m-d');
$distribution = $this->distributionRepository->findOneDistribution($dateFormat);

if($distribution && $distribution->active && !$this->producerSolver->isOnLeavePeriodByDistribution($distribution)) {
if($distribution
&& $distribution->active
&& $date->format('N') == $automaticEmail->getDay()
&& !$this->producerSolver->isOnLeavePeriodByDistribution($distribution)) {
return $distribution;
}


+ 0
- 4
producer/controllers/OrderController.php Целия файл

@@ -170,10 +170,6 @@ class OrderController extends ProducerBaseController
$idProducer = $producer->id;
$order = new Order;

if ($idProducer) {
$this->_verifyProducerActive($idProducer);
}

if ($order->load($posts)) {
$user = $this->getUserCurrent();


Loading…
Отказ
Запис