Ver a proveniência

last adjustments

master
Daniel há 2 anos
ascendente
cometimento
147f36dc62
4 ficheiros alterados com 11 adições e 5 eliminações
  1. +1
    -1
      src/client/app/js/app/state/AppointmentEditAttendee.js
  2. +1
    -1
      src/server/server/control/TB_Server_Control_Auth.php
  3. +2
    -1
      src/server/server/control/TB_Server_Control_Team.php
  4. +7
    -2
      src/server/shared/ent/teamdata/TB_Shared_Ent_TeamData_Profile.php

+ 1
- 1
src/client/app/js/app/state/AppointmentEditAttendee.js Ver ficheiro

@@ -31,7 +31,7 @@ app.state.AppointmentEditAttendee = function()
app.core.Rpc.call(
'Team',
'getMembers',
{ teamId : appointment.getTeamId() },
{ teamId : appointment.getTeamId(), activeOnly: true },
function( res2 )
{
let childs, m, notDecided = [];


+ 1
- 1
src/server/server/control/TB_Server_Control_Auth.php Ver ficheiro

@@ -691,7 +691,7 @@ class TB_Server_Control_Auth
$team->category = _xss( $teamCategory );
$team->affiliate_id = is_string( $affiliateId ) ? _xss( $affiliateId ) : NULL;
$team->terms_conditions_active = 0;
$team->new_users_inactive = 1;
$team->new_users_inactive = 0;
$team->save();
// Set default course categories


+ 2
- 1
src/server/server/control/TB_Server_Control_Team.php Ver ficheiro

@@ -161,6 +161,7 @@ class TB_Server_Control_Team {
$resp = new TB_Server_Core_Response();
$teamId = $params->get( 'teamId' );
$activeOnly = $params->get( 'activeOnly');
$sessionProfile = TB_Server_Core_Session::get()->getProfile();
if ( false === $sessionProfile->isInTeam( $teamId ) )
@@ -176,7 +177,7 @@ class TB_Server_Control_Team {
return $resp;
}
$resp->addData( 'members', TB_Shared_Ent_TeamData_Profile::getProfilesByTeamId( $team->id ) );
$resp->addData( 'members', TB_Shared_Ent_TeamData_Profile::getProfilesByTeamId( $team->id, $activeOnly ) );
return $resp;
}


+ 7
- 2
src/server/shared/ent/teamdata/TB_Shared_Ent_TeamData_Profile.php Ver ficheiro

@@ -754,9 +754,14 @@ class TB_Shared_Ent_TeamData_Profile extends Francis_Db_Row {
* @param $teamId
* @return array
*/
public static function getProfilesByTeamId( $teamId )
public static function getProfilesByTeamId( $teamId, $activeOnly = null )
{
$whereJson = json_encode( array( 'team_id' => $teamId ) );
$params = array('team_id' => $teamId);
if ($activeOnly === true ) {
$params['status'] = self::STATUS_ACTIVE;
}
$whereJson = json_encode( $params );
$sql = 'SELECT * FROM ' . self::getTable() . ' WHERE ';
$sql .= 'JSON_CONTAINS( `teams_js`, :where_json ) ';
$sql .= 'ORDER BY last_name ASC';


Carregando…
Cancelar
Guardar