diff --git a/app/Classes/Modules/Companies/ControllersLogic/AssignCompanyConnectionToConnectionSegmentLogic.php b/app/Classes/Modules/Companies/ControllersLogic/AssignCompanyConnectionToConnectionSegmentLogic.php
index cee72e84..e832b854 100644
--- a/app/Classes/Modules/Companies/ControllersLogic/AssignCompanyConnectionToConnectionSegmentLogic.php
+++ b/app/Classes/Modules/Companies/ControllersLogic/AssignCompanyConnectionToConnectionSegmentLogic.php
@@ -7,6 +7,8 @@ use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Companies\Processors\AssignConnectionSegmentProcessor;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Companies\Services\FetchesCompanyConnection;
+use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
+use App\Classes\Modules\Contacts\Processors\CreateContactProcessor;
use App\Http\Resources\CompanyResource;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -33,17 +35,22 @@ class AssignCompanyConnectionToConnectionSegmentLogic extends AbstractController
/** @var AssignConnectionSegmentProcessor */
private $assignCompanyConnectionToConnectionSegmentProcessor;
+ /** @var CreateContactProcessor */
+ private $createContactProcessor;
+
/**
* AssignCompanyToSegmentLogic constructor.
* @param FetchesCompany $fetchesCompany
* @param FetchesCompanyConnection $fetchesCompanyConnection
* @param AssignConnectionSegmentProcessor $assignCompanyConnectionToConnectionSegmentProcessor
+ * @param CreateContactProcessor $createContactProcessor
*/
- public function __construct(FetchesCompany $fetchesCompany, FetchesCompanyConnection $fetchesCompanyConnection, AssignConnectionSegmentProcessor $assignCompanyConnectionToConnectionSegmentProcessor)
+ public function __construct(FetchesCompany $fetchesCompany, FetchesCompanyConnection $fetchesCompanyConnection, AssignConnectionSegmentProcessor $assignCompanyConnectionToConnectionSegmentProcessor, CreateContactProcessor $createContactProcessor)
{
$this->fetchesCompany = $fetchesCompany;
$this->fetchesCompanyConnection = $fetchesCompanyConnection;
$this->assignCompanyConnectionToConnectionSegmentProcessor = $assignCompanyConnectionToConnectionSegmentProcessor;
+ $this->createContactProcessor = $createContactProcessor;
}
/**
@@ -62,6 +69,11 @@ class AssignCompanyConnectionToConnectionSegmentLogic extends AbstractController
$this->assignCompanyConnectionToConnectionSegmentProcessor->execute($companyConnection, $request->input('segment_id'));
+ if ($request->input('segment_id') == 11) {
+ $contactObject = new ContactObject('Whatsapp: ' . $request->input('name'), $request->input('phone'), null, null);
+ $this->createContactProcessor->execute($contactObject, $company);
+ }
+
return $this->resourceResponse(new CompanyResource($company));
}
}
\ No newline at end of file
diff --git a/resources/assets/vue/components/companies/elements/FulfilmentConfirmationFormComponent.vue b/resources/assets/vue/components/companies/elements/FulfilmentConfirmationFormComponent.vue
new file mode 100644
index 00000000..70222929
--- /dev/null
+++ b/resources/assets/vue/components/companies/elements/FulfilmentConfirmationFormComponent.vue
@@ -0,0 +1,38 @@
+
+ 欲知更多详情,请浏览 https://bit.ly/4a5v34p 或联系 Whatsapp: +6011-36814520
+ Please provide your Whatsapp phone number:
+
+ 重磅消息! CIEF 正式开通 3PL fulfillment 服务!! 你从中国进来的货物, 我们可以直接帮你仓储, 分拣打包, 直接送货到您的顾客手上, 只需系统对接你的 Lazada , Shopee , Tiktok 网店, 就能实现全自动化! 一个月只需 RMX88!
+ Exciting news! CIEF has officially launched its 3PL fulfillment service! We can assist with warehousing, sorting, packaging, and direct delivery of your goods from China to your customers. Simply integrate your Lazada, Shopee, or TikTok online stores with our system for full automation! Only RMX88 per month!
+