diff --git a/apps/maarch_entreprise/js/indexing.js b/apps/maarch_entreprise/js/indexing.js index a58fc7d80086885edfc2ed4f0fdeccb8b9d81c97..4c10746d2fcfbdbac148157681e8cbff62f4ab65 100755 --- a/apps/maarch_entreprise/js/indexing.js +++ b/apps/maarch_entreprise/js/indexing.js @@ -49,7 +49,7 @@ function changeCycle(path_manage_script) } function initSenderRecipientAutocomplete(inputId, mode, alternateVersion, cardId) { - var route = '../../rest/autocomplete/all'; + var route = '../../rest/autocomplete/correspondents'; $j("#" + inputId).typeahead({ // order: "asc", diff --git a/rest/index.php b/rest/index.php index d9710d1c7b35c5cb57225f96105a579f7bff6e6f..d888c6b65d441edf122f04760733f34d1752e4bb 100755 --- a/rest/index.php +++ b/rest/index.php @@ -76,7 +76,7 @@ $app->get('/attachmentsTypes', \Attachment\controllers\AttachmentController::cla //AutoComplete $app->get('/autocomplete/users', \SrcCore\controllers\AutoCompleteController::class . ':getUsers'); $app->get('/autocomplete/maarchParapheurUsers', \SrcCore\controllers\AutoCompleteController::class . ':getMaarchParapheurUsers'); -$app->get('/autocomplete/all', \SrcCore\controllers\AutoCompleteController::class . ':getAll'); +$app->get('/autocomplete/correspondents', \SrcCore\controllers\AutoCompleteController::class . ':getCorrespondents'); $app->get('/autocomplete/contacts/groups', \SrcCore\controllers\AutoCompleteController::class . ':getContactsForGroups'); $app->get('/autocomplete/users/administration', \SrcCore\controllers\AutoCompleteController::class . ':getUsersForAdministration'); $app->get('/autocomplete/users/visa', \SrcCore\controllers\AutoCompleteController::class . ':getUsersForVisa'); diff --git a/src/core/controllers/AutoCompleteController.php b/src/core/controllers/AutoCompleteController.php index 369fdcbb4a8ce4d8f5bbb80ef61800fedbe12fb2..b0609a32eaca0dc1700094d8b50ebaf4d1c8fbd3 100755 --- a/src/core/controllers/AutoCompleteController.php +++ b/src/core/controllers/AutoCompleteController.php @@ -145,7 +145,7 @@ class AutoCompleteController } } - public static function getAll(Request $request, Response $response) + public static function getCorrespondents(Request $request, Response $response) { $queryParams = $request->getQueryParams(); diff --git a/src/frontend/app/contact/autocomplete/contact-autocomplete.component.ts b/src/frontend/app/contact/autocomplete/contact-autocomplete.component.ts index 552464a332120201c0a27091c80397e5bdb862d6..aad68ebe76ad08bec27876ae2bcdbe17ce8352ac 100755 --- a/src/frontend/app/contact/autocomplete/contact-autocomplete.component.ts +++ b/src/frontend/app/contact/autocomplete/contact-autocomplete.component.ts @@ -93,7 +93,7 @@ export class ContactAutocompleteComponent implements OnInit { } getDatas(data: string) { - return this.http.get('../../rest/autocomplete/all', { params: { "search": data } }); + return this.http.get('../../rest/autocomplete/correspondents', { params: { "search": data } }); } selectOpt(ev: any) { @@ -228,4 +228,4 @@ export class ContactAutocompleteComponent implements OnInit { return true; } } -} \ No newline at end of file +} diff --git a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts index b5fcc86fa9f3d06a39b5137b3be6690df6d8d576..895ae2b1017b690e59602a071de4eac2fae3257c 100644 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts @@ -127,7 +127,7 @@ export class IndexingFormComponent implements OnInit { label: this.lang.getSenders, type: 'autocomplete', default_value: null, - values: ['/rest/autocomplete/all'] + values: ['/rest/autocomplete/correspondents'] }, { identifier: 'destination', diff --git a/test/unitTests/core/AutocompleteControllerTest.php b/test/unitTests/core/AutocompleteControllerTest.php index de0e7253cc2632c0cf339b3fb901c957f98914fc..aeccf43cbd9cca9079c5fe5ecf36a8025c25093f 100755 --- a/test/unitTests/core/AutocompleteControllerTest.php +++ b/test/unitTests/core/AutocompleteControllerTest.php @@ -40,7 +40,7 @@ class AutocompleteControllerTest extends TestCase } } - public function testGetAll() + public function testGetCorrespondents() { $autocompleteController = new \SrcCore\controllers\AutoCompleteController(); @@ -54,7 +54,7 @@ class AutocompleteControllerTest extends TestCase ]; $fullRequest = $request->withQueryParams($aArgs); - $response = $autocompleteController->getAll($fullRequest, new \Slim\Http\Response()); + $response = $autocompleteController->getCorrespondents($fullRequest, new \Slim\Http\Response()); $responseBody = json_decode((string)$response->getBody()); foreach ($responseBody as $value) {