Add manager filter (#276)
This commit is contained in:
parent
6a07f5220b
commit
4c61df9701
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,8 +9,9 @@
|
|||||||
/.idea/*
|
/.idea/*
|
||||||
|
|
||||||
/intaro.retailcrm/log/*
|
/intaro.retailcrm/log/*
|
||||||
|
/tmp/
|
||||||
/vendor/
|
/vendor/
|
||||||
.env
|
.env
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
/release/
|
/release/
|
||||||
coverage.xml
|
coverage.xml
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
## 2023-01-10 v.6.1.15
|
||||||
|
- Добавлен фильтр активности менеджеров
|
||||||
|
|
||||||
## 2023-01-24 v.6.1.14
|
## 2023-01-24 v.6.1.14
|
||||||
- Исправление обновления и отправки заказа в црм систему
|
- Исправление обновления и отправки заказа в црм систему
|
||||||
|
|
||||||
|
7
Makefile
7
Makefile
@ -43,4 +43,9 @@ endif
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@rm -rf $(ROOT_DIR)/release/$(CURRENT_VERSION)
|
@rm -rf $(ROOT_DIR)/release/$(CURRENT_VERSION)
|
||||||
@rm $(ROOT_DIR)/release/$(CURRENT_VERSION).tar.gz
|
@rm $(ROOT_DIR)/release/$(CURRENT_VERSION).tar.gz
|
||||||
|
|
||||||
|
run_local_tests:
|
||||||
|
docker-compose up -d --build
|
||||||
|
docker exec app_test make install_bitrix deps test
|
||||||
|
docker-compose down
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
bitrix:
|
bitrix:
|
||||||
|
container_name: app_test
|
||||||
build: ./.docker
|
build: ./.docker
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
@ -1 +1 @@
|
|||||||
- исправление отправки заказа в црм систему
|
- Добавлен фильтр активности менеджеров
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$arModuleVersion = [
|
$arModuleVersion = [
|
||||||
'VERSION' => '6.1.14',
|
'VERSION' => '6.1.15',
|
||||||
'VERSION_DATE' => '2023-01-24 14:30:00'
|
'VERSION_DATE' => '2023-01-26 12:00:00'
|
||||||
];
|
];
|
||||||
|
@ -23,7 +23,7 @@ use RetailcrmConstants;
|
|||||||
class ManagerService
|
class ManagerService
|
||||||
{
|
{
|
||||||
protected static $instance;
|
protected static $instance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Intaro\RetailCrm\Repository\ManagerRepository
|
* @var \Intaro\RetailCrm\Repository\ManagerRepository
|
||||||
*/
|
*/
|
||||||
@ -59,17 +59,17 @@ class ManagerService
|
|||||||
if (self::$instance === null) {
|
if (self::$instance === null) {
|
||||||
self::$instance = new self();
|
self::$instance = new self();
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$instance;
|
return self::$instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Синхронизирует пользователей CRM и Битрикс
|
* Синхронизирует пользователей CRM и Битрикс
|
||||||
*/
|
*/
|
||||||
public function synchronizeManagers(): void
|
public function synchronizeManagers(): void
|
||||||
{
|
{
|
||||||
$currentPage = 1;
|
$currentPage = 1;
|
||||||
|
|
||||||
RetailcrmConfigProvider::setUsersMap([]);
|
RetailcrmConfigProvider::setUsersMap([]);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -135,7 +135,7 @@ class ManagerService
|
|||||||
*/
|
*/
|
||||||
private function getCrmUsersPage(int $pageNumber): array
|
private function getCrmUsersPage(int $pageNumber): array
|
||||||
{
|
{
|
||||||
$response = $this->client->usersList([], $pageNumber);
|
$response = $this->client->usersList(['active' => 1], $pageNumber);
|
||||||
|
|
||||||
if (!$response->isSuccessful()) {
|
if (!$response->isSuccessful()) {
|
||||||
return [];
|
return [];
|
||||||
|
Loading…
Reference in New Issue
Block a user