chore: refactor code
This commit is contained in:
parent
ff7523d6db
commit
d04f9f41c3
1 changed files with 3 additions and 5 deletions
|
@ -223,7 +223,6 @@ class Hamster extends Action
|
||||||
Query::equal('$internalId', [$teamInternalId])
|
Query::equal('$internalId', [$teamInternalId])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** Add billing information */
|
|
||||||
$billing = $this->getBillingDetails($organization);
|
$billing = $this->getBillingDetails($organization);
|
||||||
$statsPerProject['billing_plan'] = $billing['billing_plan'] ?? null;
|
$statsPerProject['billing_plan'] = $billing['billing_plan'] ?? null;
|
||||||
$statsPerProject['billing_start_date'] = $billing['billing_start_date'] ?? null;
|
$statsPerProject['billing_start_date'] = $billing['billing_start_date'] ?? null;
|
||||||
|
@ -367,7 +366,6 @@ class Hamster extends Action
|
||||||
/** Organization name */
|
/** Organization name */
|
||||||
$statsPerOrganization['name'] = $organization->getAttribute('name');
|
$statsPerOrganization['name'] = $organization->getAttribute('name');
|
||||||
|
|
||||||
|
|
||||||
/** Get Email and of the organization owner */
|
/** Get Email and of the organization owner */
|
||||||
$membership = $dbForConsole->findOne('memberships', [
|
$membership = $dbForConsole->findOne('memberships', [
|
||||||
Query::equal('teamInternalId', [$organization->getInternalId()]),
|
Query::equal('teamInternalId', [$organization->getInternalId()]),
|
||||||
|
@ -424,17 +422,17 @@ class Hamster extends Action
|
||||||
try {
|
try {
|
||||||
$statsPerUser = [];
|
$statsPerUser = [];
|
||||||
|
|
||||||
|
$statsPerUser['time'] = $user->getAttribute('$time');
|
||||||
|
|
||||||
|
/** Add billing information */
|
||||||
$organization = $dbForConsole->findOne('teams', [
|
$organization = $dbForConsole->findOne('teams', [
|
||||||
Query::equal('userInternalId', [$user->getInternalId()])
|
Query::equal('userInternalId', [$user->getInternalId()])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** Add billing information */
|
|
||||||
$billing = $this->getBillingDetails($organization);
|
$billing = $this->getBillingDetails($organization);
|
||||||
$statsPerUser['billing_plan'] = $billing['billing_plan'] ?? null;
|
$statsPerUser['billing_plan'] = $billing['billing_plan'] ?? null;
|
||||||
$statsPerUser['billing_start_date'] = $billing['billing_start_date'] ?? null;
|
$statsPerUser['billing_start_date'] = $billing['billing_start_date'] ?? null;
|
||||||
|
|
||||||
$statsPerUser['time'] = $user->getAttribute('$time');
|
|
||||||
|
|
||||||
/** Organization name */
|
/** Organization name */
|
||||||
$statsPerUser['name'] = $user->getAttribute('name');
|
$statsPerUser['name'] = $user->getAttribute('name');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue