Línea 1691... |
Línea 1691... |
1691 |
$owner = $companyUserMapper->fetchOwnerByCompanyId($feed->company_id);
|
1691 |
$owner = $companyUserMapper->fetchOwnerByCompanyId($feed->company_id);
|
Línea 1692... |
Línea 1692... |
1692 |
|
1692 |
|
1693 |
$comments = [];
|
1693 |
$comments = [];
|
1694 |
foreach ($records as $record) {
|
1694 |
foreach ($records as $record) {
|
1695 |
$user = $userMapper->fetchOne($record->user_id);
|
- |
|
1696 |
|
1695 |
$user = $userMapper->fetchOne($record->user_id);
|
1697 |
$company = $companyMapper->fetchOne($feed->company_id);
|
- |
|
1698 |
// if ($user->usertype_id == 3) {
|
- |
|
1699 |
// $company = $companyMapper->fetchOne($feed->company_id);
|
- |
|
1700 |
// if ($record->user_id == $currentUser->id) {
|
- |
|
1701 |
// $link_delete = $this->url()->fromRoute('feed/comment/delete', ['id' => $feed->uuid, 'comment' => $record->uuid]);
|
- |
|
1702 |
// } else {
|
- |
|
1703 |
// $link_delete = '';
|
- |
|
1704 |
// }
|
- |
|
1705 |
|
- |
|
1706 |
// array_push($comments, [
|
- |
|
1707 |
// 'unique' => uniqid(),
|
- |
|
1708 |
// 'user_url' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
- |
|
1709 |
// 'user_name' => $user->first_name . ' ' . $user->last_name,
|
- |
|
1710 |
// /* Aqui es Anderson */
|
- |
|
1711 |
// 'user_image' => $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image]),
|
- |
|
1712 |
// 'time_elapsed' => Functions::timeAgo($record->added_on, $now),
|
- |
|
1713 |
// 'comment' => $record->comment,
|
- |
|
1714 |
// 'link_delete' => $link_delete
|
- |
|
1715 |
// ]);
|
- |
|
Línea 1716... |
Línea 1696... |
1716 |
// } elseif ($user->usertype_id == 2) {
|
1696 |
$company = $companyMapper->fetchOne($feed->company_id);
|
1717 |
|
1697 |
|
1718 |
if ($record->user_id == $currentUser->id) {
|
1698 |
if ($record->user_id == $currentUser->id) {
|
1719 |
$link_delete = $this->url()->fromRoute('feed/comment/delete', ['id' => $feed->uuid, 'comment' => $record->uuid]);
|
1699 |
$link_delete = $this->url()->fromRoute('feed/comment/delete', ['id' => $feed->uuid, 'comment' => $record->uuid]);
|
1720 |
array_push($comments, [
|
1700 |
array_push($comments, [
|
1721 |
'unique' => uniqid(),
|
1701 |
'unique' => uniqid(),
|
1722 |
'user_url' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
- |
|
1723 |
'user_name' => $user->first_name . ' ' . $user->last_name,
|
1702 |
'user_url' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
1724 |
/* Aqui es Anderson */
|
1703 |
'user_name' => $user->first_name . ' ' . $user->last_name,
|
1725 |
'company' => $owner,
|
1704 |
'company' => $owner,
|
1726 |
'user_image' => $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image]),
|
1705 |
'user_image' => $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image]),
|
1727 |
'time_elapsed' => Functions::timeAgo($record->added_on, $now),
|
1706 |
'time_elapsed' => Functions::timeAgo($record->added_on, $now),
|
Línea 1731... |
Línea 1710... |
1731 |
} else {
|
1710 |
} else {
|
1732 |
array_push($comments, [
|
1711 |
array_push($comments, [
|
1733 |
'unique' => uniqid(),
|
1712 |
'unique' => uniqid(),
|
1734 |
'user_url' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
1713 |
'user_url' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
1735 |
'user_name' => $user->first_name . ' ' . $user->last_name,
|
1714 |
'user_name' => $user->first_name . ' ' . $user->last_name,
|
1736 |
/* Aqui es Anderson */
|
- |
|
1737 |
'user_image' => $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image]),
|
1715 |
'user_image' => $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image]),
|
1738 |
'time_elapsed' => Functions::timeAgo($record->added_on, $now),
|
1716 |
'time_elapsed' => Functions::timeAgo($record->added_on, $now),
|
1739 |
'comment' => $record->comment,
|
1717 |
'comment' => $record->comment,
|
1740 |
//'link_delete' => $link_delete
|
1718 |
//'link_delete' => $link_delete
|
1741 |
]);
|
1719 |
]);
|
1742 |
$link_delete = '';
|
1720 |
$link_delete = '';
|
1743 |
}
|
1721 |
}
|
1744 |
|
- |
|
1745 |
|
- |
|
1746 |
//}
|
- |
|
1747 |
}
|
1722 |
}
|
1748 |
$item['comment_add_url'] = $this->url()->fromRoute('feed/comment', ['id' => $feed->uuid]);
|
1723 |
$item['comment_add_url'] = $this->url()->fromRoute('feed/comment', ['id' => $feed->uuid]);
|
1749 |
$item['comments'] = $comments;
|
1724 |
$item['comments'] = $comments;
|
Línea 1750... |
Línea 1725... |
1750 |
|
1725 |
|