1
0
Fork 0
mirror of synced 2025-04-11 21:21:00 +00:00

Add manager filter

This commit is contained in:
uryvskiy-dima 2023-01-24 16:18:11 +03:00
parent 6a07f5220b
commit f6284e8b4c
5 changed files with 17 additions and 7 deletions

3
.gitignore vendored
View file

@ -9,8 +9,9 @@
/.idea/*
/intaro.retailcrm/log/*
/tmp/
/vendor/
.env
.phpunit.result.cache
/release/
coverage.xml
coverage.xml

View file

@ -1,3 +1,6 @@
## 2023-01-10 v.6.1.16
- Добавлен фильтр активности менеджеров
-
## 2023-01-24 v.6.1.14
- Исправление обновления и отправки заказа в црм систему

View file

@ -43,4 +43,9 @@ endif
cleanup:
@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

View file

@ -1,6 +1,7 @@
version: '3'
services:
bitrix:
container_name: app_test
build: ./.docker
env_file:
- .env

View file

@ -23,7 +23,7 @@ use RetailcrmConstants;
class ManagerService
{
protected static $instance;
/**
* @var \Intaro\RetailCrm\Repository\ManagerRepository
*/
@ -59,17 +59,17 @@ class ManagerService
if (self::$instance === null) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Синхронизирует пользователей CRM и Битрикс
*/
public function synchronizeManagers(): void
{
$currentPage = 1;
RetailcrmConfigProvider::setUsersMap([]);
do {
@ -135,7 +135,7 @@ class ManagerService
*/
private function getCrmUsersPage(int $pageNumber): array
{
$response = $this->client->usersList([], $pageNumber);
$response = $this->client->usersList(['active' => 1], $pageNumber);
if (!$response->isSuccessful()) {
return [];