Skip to content

Commit

Permalink
feat(admin): added comment export - fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
julsteele committed Jan 31, 2024
1 parent 21f6c13 commit f413ac7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions app/Models/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ public static function getAllCommentsForExport()
->leftJoin('users as u2', 'comments.user_id', '=', 'u2.id')
->leftJoin('table_types', 'table_type_assigned', '=', 'table_types.id')
->select(
'u1.name AS User',
'type as Type',
'text AS Comment Text',
'table_types.name AS Assigned Table',
'table_number as Table number',
'u2.name AS Author'
'u1.name AS user',
'applications.display_name AS display name',
'applications.type AS type',
'comments.text AS comment',
'table_types.name AS assigned table',
'applications.table_number AS table number',
'u2.name AS author',
'comments.admin_only AS admin only',
'comments.created_at AS created at',
'comments.updated_at AS updated at',
)
->get();
return json_decode(json_encode($applications), true);
Expand Down

0 comments on commit f413ac7

Please sign in to comment.