Renvoie la liste des clients filtrés selon le User connecté et le "search"
function TS_NOOA_mobile_liste_clients($id_type_client) {
global $_POST;
global $global_api_retour;
global $srv;
$id_user = $_POST['userID'];
$search = $_POST['search'];
$offset = $_POST['offset'];
// Vérification de l'authentification du user
$verificationConnexion = TS_NOOA_mobile_verif_login($id_user);
if ($verificationConnexion['success'] == 401) {
return $verificationConnexion;
// ... (truncated)
↩️ Returns
(array)
⚠️ Throws
Exception:
🔧 TS_NOOA_mobile_single_client
Renvoie le client avec ses opportunités et ses commandes/chantiers
function TS_NOOA_mobile_single_client($id_type_client, $id_type_opportunite, $id_type_commande, $id_list_type_intervention) {
global $_POST;
global $global_api_retour;
global $srv;
$id_obje = $_POST['client_ID'];
$sqlService = new \ToosmarWireframe\Services\SQLService(1, $srv[1], $srv[3], $srv[4], $srv[2]);
$infoClient = $sqlService->get($id_type_client, $id_obje, true);
if (empty($infoClient)) {
$global_api_retour['success'] = 401;
$global_api_retour['message'] = "Pas de client trouvé.";
// ... (truncated)
↩️ Returns
(array)
⚠️ Throws
Exception:
🔧 TS_NOOA_mobile_create_client
Création d'un client
function TS_NOOA_mobile_create_client($id_type_client) {
global $_POST;
global $global_api_retour;
global $id_type;
global $id_obje;
global $user;
global $srv;
global $navi_session;
$id_type = $id_type_client;
$id_user = $_POST['userID'];
// ... (truncated)
↩️ Returns
(mixed)
⚠️ Throws
Exception:
🔧 TS_NOOA_mobile_modify_client
Renvoie le client mis à jour avec ses opportunités et ses commandes/chantiers
function TS_NOOA_mobile_modify_client($id_type_client, $id_type_opportunite, $id_type_commande, $id_list_type_intervention) {
global $_POST;
global $global_api_retour;
global $id_type;
global $id_obje;
global $user;
global $srv;
global $navi_session;
$id_type = $id_type_client;
$id_obje = $_POST['clientID'];
// ... (truncated)