Create marketing research sms and email flags for customer. #546
This commit is contained in:
parent
ea06d922bb
commit
c1533c24c4
3 changed files with 46 additions and 14 deletions
|
|
@ -195,7 +195,12 @@ class Customer
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="boolean", options={"default":false})
|
* @ORM\Column(type="boolean", options={"default":false})
|
||||||
*/
|
*/
|
||||||
protected $flag_promo_marketing_research;
|
protected $flag_research_sms;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean", options={"default":false})
|
||||||
|
*/
|
||||||
|
protected $flag_research_email;
|
||||||
|
|
||||||
// where customer was created from
|
// where customer was created from
|
||||||
/**
|
/**
|
||||||
|
|
@ -233,7 +238,8 @@ class Customer
|
||||||
$this->flag_promo_email = false;
|
$this->flag_promo_email = false;
|
||||||
$this->flag_promo_sms = false;
|
$this->flag_promo_sms = false;
|
||||||
$this->flag_dpa_consent = false;
|
$this->flag_dpa_consent = false;
|
||||||
$this->flag_promo_marketing_research = false;
|
$this->flag_research_sms = false;
|
||||||
|
$this->flag_research_email = false;
|
||||||
|
|
||||||
$this->date_create = new DateTime();
|
$this->date_create = new DateTime();
|
||||||
|
|
||||||
|
|
@ -570,15 +576,26 @@ class Customer
|
||||||
return $this->flag_dpa_consent;
|
return $this->flag_dpa_consent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setPromoMarketingResearch($flag_promo_marketing_research = true)
|
public function setResearchSms($flag_research_sms = true)
|
||||||
{
|
{
|
||||||
$this->flag_promo_marketing_research = $flag_promo_marketing_research;
|
$this->flag_research_sms = $flag_research_sms;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isPromoMarketingResearch()
|
public function isResearchSms()
|
||||||
{
|
{
|
||||||
return $this->flag_promo_marketing_research;
|
return $this->flag_research_sms;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setResearchEmail($flag_research_email = true)
|
||||||
|
{
|
||||||
|
$this->flag_research_email = $flag_research_email;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isResearchEmail()
|
||||||
|
{
|
||||||
|
return $this->flag_research_email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCreateSource($source)
|
public function setCreateSource($source)
|
||||||
|
|
|
||||||
|
|
@ -539,7 +539,8 @@ class ResqCustomerHandler implements CustomerHandlerInterface
|
||||||
'flag_dpa_consent' => $customer->isDpaConsent(),
|
'flag_dpa_consent' => $customer->isDpaConsent(),
|
||||||
'flag_promo_sms' => $customer->isPromoSms(),
|
'flag_promo_sms' => $customer->isPromoSms(),
|
||||||
'flag_promo_email' => $customer->isPromoEmail(),
|
'flag_promo_email' => $customer->isPromoEmail(),
|
||||||
'flag_promo_marketing_research' => $customer->isPromoMarketingResearch(),
|
'flag_research_sms' => $customer->isResearchSms(),
|
||||||
|
'flag_research_email' => $customer->isResearchEmail(),
|
||||||
],
|
],
|
||||||
'vehicle' => [
|
'vehicle' => [
|
||||||
'id' => $vehicle->getID(),
|
'id' => $vehicle->getID(),
|
||||||
|
|
@ -601,7 +602,8 @@ class ResqCustomerHandler implements CustomerHandlerInterface
|
||||||
->setPromoSms($req->request->get('flag_promo_sms', false))
|
->setPromoSms($req->request->get('flag_promo_sms', false))
|
||||||
->setPromoEmail($req->request->get('flag_promo_email', false))
|
->setPromoEmail($req->request->get('flag_promo_email', false))
|
||||||
->setDpaConsent($is_dpa_checked)
|
->setDpaConsent($is_dpa_checked)
|
||||||
->setPromoMarketingResearch($req->request->get('flag_promo_marketing_research', false));
|
->setResearchSms($req->request->get('flag_research_sms', false))
|
||||||
|
->setResearchEmail($req->request->get('flag_research_email', false));
|
||||||
|
|
||||||
// phone numbers
|
// phone numbers
|
||||||
$obj->setPhoneMobile($req->request->get('phone_mobile'))
|
$obj->setPhoneMobile($req->request->get('phone_mobile'))
|
||||||
|
|
|
||||||
|
|
@ -119,15 +119,30 @@
|
||||||
<span></span>
|
<span></span>
|
||||||
<div class="form-control-feedback hide" data-field="flag_promo_email"></div>
|
<div class="form-control-feedback hide" data-field="flag_promo_email"></div>
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="col-lg-12 form-group-inner">
|
||||||
|
<label data-field="source">Marketing Research</label>
|
||||||
|
<div class="m-checkbox-list">
|
||||||
<label class="m-checkbox">
|
<label class="m-checkbox">
|
||||||
<input type="checkbox" name="flag_promo_marketing_research" value="1"{{ obj.isPromoMarketingResearch ? ' checked' }} >
|
<input type="checkbox" name="flag_research_sms" value="1"{{ obj.isResearchSms ? ' checked' }} >
|
||||||
Marketing Research
|
SMS
|
||||||
<span></span>
|
<span></span>
|
||||||
<div class="form-control-feedback hide" data-field="flag_promo_marketing_research"></div>
|
<div class="form-control-feedback hide" data-field="flag_research_sms"></div>
|
||||||
|
</label>
|
||||||
|
<label class="m-checkbox">
|
||||||
|
<input type="checkbox" name="flag_research_email" value="1"{{ obj.isResearchEmail ? ' checked' }} >
|
||||||
|
Email
|
||||||
|
<span></span>
|
||||||
|
<div class="form-control-feedback hide" data-field="flag_research_email"></div>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group m-form__group row">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
{% if is_granted('customer.dpa') %}
|
{% if is_granted('customer.dpa') %}
|
||||||
<input type="checkbox" name="flag_dpa_consent" id="flag-dpa_consent" value="1"{{ obj.isDpaConsent ? ' checked' }} >
|
<input type="checkbox" name="flag_dpa_consent" id="flag-dpa_consent" value="1"{{ obj.isDpaConsent ? ' checked' }} >
|
||||||
|
|
@ -135,9 +150,7 @@
|
||||||
<div class="form-control-feedback hide" data-field="flag_dpa_consent"></div>
|
<div class="form-control-feedback hide" data-field="flag_dpa_consent"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-lg-4">
|
||||||
<div class="form-group m-form__group row">
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<span class="m-switch m-switch--icon block-switch">
|
<span class="m-switch m-switch--icon block-switch">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="flag_active" id="flag_active" value="1"{{ obj.isActive() ? ' checked' }}>
|
<input type="checkbox" name="flag_active" id="flag_active" value="1"{{ obj.isActive() ? ' checked' }}>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue