Update response in "delete client"
This commit is contained in:
miroman-afk
2022-01-13 01:43:50 +03:00
parent def1ac1986
commit f964aca7a9

View File

@@ -90,6 +90,7 @@ class POSTClient extends HRCCommand implements HRCCommandInterface {
if ($input['task'] == 'delete') {
$client = Client::find($input['id']);
$clientGroup = ClientsGroup::where('code', $client->group_id)->first();
$clientPhone = ClientsPhone::where('client_guid', $client->user_code)->first();
$clientPhone = ClientsPhone::find($clientPhone['id']);
$clientEmail = ClientsEmail::where('client_guid', $client->user_code)->first();
@@ -117,6 +118,7 @@ class POSTClient extends HRCCommand implements HRCCommandInterface {
return [
'status' => 'success',
'message' => 'Клиент удален',
'currentGroup' => $clientGroup['id'],
];
}
} else {