Skip to content

Commit

Permalink
FZ-122 rename columns
Browse files Browse the repository at this point in the history
  • Loading branch information
mblajek committed Dec 11, 2023
1 parent 41ac79d commit 2b94162
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/Tquery/Tables/AdminFacilityTquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ protected function getConfig(): TqConfig
TqDataTypeEnum::int,
fn(string $tableName) => //
"select count(1) from `members` where `members`.`facility_id` = `facilities`.`id`",
'user_count',
'users.count',
);
// todo: change to *list, and name facility_admins.*.name
$config->addQuery(
TqDataTypeEnum::text_nullable,
fn(string $tableName) => //
Expand Down
2 changes: 1 addition & 1 deletion app/Tquery/Tables/AdminUserTquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected function getConfig(): TqConfig
TqDataTypeEnum::int,
fn(string $tableName) => //
"select count(1) from `members` where `members`.`user_id` = `users`.`id`",
'facility_count',
'facilities.count',
);
$config->addCount();
return $config;
Expand Down
4 changes: 2 additions & 2 deletions app/Tquery/Tables/MeetingTquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function getConfig(): TqConfig
fn(string $tableName) => //
"select json_arrayagg(`meeting_attendants`.`user_id`) from `meeting_attendants`"
. $where,
"$attendanceName.ids",
"$attendanceName.*.id",
);
$config->addQuery(
TqDataTypeEnum::list,
Expand All @@ -83,7 +83,7 @@ protected function getConfig(): TqConfig
"select json_arrayagg(replace(replace(`users`.`name`,'ó','u'),'Ó','U')) from `meeting_attendants`"
. " inner join `users` on `users`.`id` = `meeting_attendants`.`user_id`"
. $where,
"$attendanceName.names",
"$attendanceName.*.name",
);
}
$config->addCount();
Expand Down

0 comments on commit 2b94162

Please sign in to comment.