|
1 | 1 | import Badge from '@app/components/Common/Badge'; |
2 | 2 | import Button from '@app/components/Common/Button'; |
| 3 | +import CachedImage from '@app/components/Common/CachedImage'; |
3 | 4 | import Tooltip from '@app/components/Common/Tooltip'; |
4 | 5 | import RequestModal from '@app/components/RequestModal'; |
5 | 6 | import useRequestOverride from '@app/hooks/useRequestOverride'; |
@@ -95,36 +96,58 @@ const RequestBlock = ({ request, onUpdate }: RequestBlockProps) => { |
95 | 96 | <div className="flex items-center justify-between"> |
96 | 97 | <div className="mr-6 min-w-0 flex-1 flex-col items-center text-sm leading-5"> |
97 | 98 | <div className="white mb-1 flex flex-nowrap"> |
98 | | - <Tooltip content={intl.formatMessage(messages.requestedby)}> |
99 | | - <UserIcon className="mr-1.5 h-5 w-5 min-w-0 flex-shrink-0" /> |
100 | | - </Tooltip> |
101 | | - <span className="w-40 truncate md:w-auto"> |
| 99 | + <span className="flex w-40 items-center truncate md:w-auto"> |
| 100 | + <Tooltip content={intl.formatMessage(messages.requestedby)}> |
| 101 | + <UserIcon className="mr-1.5 h-5 w-5 min-w-0 flex-shrink-0" /> |
| 102 | + </Tooltip> |
102 | 103 | <Link |
103 | 104 | href={ |
104 | 105 | request.requestedBy.id === user?.id |
105 | 106 | ? '/profile' |
106 | 107 | : `/users/${request.requestedBy.id}` |
107 | 108 | } |
108 | | - className="font-semibold text-gray-100 transition duration-300 hover:text-white hover:underline" |
| 109 | + className="flex items-center font-semibold text-gray-100 transition duration-300 hover:text-white hover:underline" |
109 | 110 | > |
| 111 | + <span className="avatar-sm"> |
| 112 | + <CachedImage |
| 113 | + type="avatar" |
| 114 | + src={request.requestedBy.avatar} |
| 115 | + alt="" |
| 116 | + className="avatar-sm object-cover" |
| 117 | + width={20} |
| 118 | + height={20} |
| 119 | + /> |
| 120 | + </span> |
110 | 121 | {request.requestedBy.displayName} |
111 | 122 | </Link> |
112 | 123 | </span> |
113 | 124 | </div> |
114 | 125 | {request.modifiedBy && ( |
115 | 126 | <div className="flex flex-nowrap"> |
116 | | - <Tooltip content={intl.formatMessage(messages.lastmodifiedby)}> |
117 | | - <EyeIcon className="mr-1.5 h-5 w-5 flex-shrink-0" /> |
118 | | - </Tooltip> |
119 | | - <span className="w-40 truncate md:w-auto"> |
| 127 | + <span className="flex w-40 items-center truncate md:w-auto"> |
| 128 | + <Tooltip |
| 129 | + content={intl.formatMessage(messages.lastmodifiedby)} |
| 130 | + > |
| 131 | + <EyeIcon className="mr-1.5 h-5 w-5 flex-shrink-0" /> |
| 132 | + </Tooltip> |
120 | 133 | <Link |
121 | 134 | href={ |
122 | 135 | request.modifiedBy.id === user?.id |
123 | 136 | ? '/profile' |
124 | 137 | : `/users/${request.modifiedBy.id}` |
125 | 138 | } |
126 | | - className="font-semibold text-gray-100 transition duration-300 hover:text-white hover:underline" |
| 139 | + className="flex items-center font-semibold text-gray-100 transition duration-300 hover:text-white hover:underline" |
127 | 140 | > |
| 141 | + <span className="avatar-sm"> |
| 142 | + <CachedImage |
| 143 | + type="avatar" |
| 144 | + src={request.modifiedBy.avatar} |
| 145 | + alt="" |
| 146 | + className="avatar-sm object-cover" |
| 147 | + width={20} |
| 148 | + height={20} |
| 149 | + /> |
| 150 | + </span> |
128 | 151 | {request.modifiedBy.displayName} |
129 | 152 | </Link> |
130 | 153 | </span> |
|
0 commit comments