From ec291b912e44336c6f8dcc4b5458b9cf074e2c28 Mon Sep 17 00:00:00 2001 From: Zhigang Wang Date: Mon, 17 Jun 2024 15:20:56 -0700 Subject: [PATCH] add some change to avoid referencing empty last message --- frontend/src/headers/HeaderUser.vue | 14 +- .../src/pages/user/account/UserProfile.vue | 199 ++++++++++++------ frontend/src/pages/user/messages/Home.vue | 8 +- 3 files changed, 144 insertions(+), 77 deletions(-) diff --git a/frontend/src/headers/HeaderUser.vue b/frontend/src/headers/HeaderUser.vue index ff3a804..fc61e04 100644 --- a/frontend/src/headers/HeaderUser.vue +++ b/frontend/src/headers/HeaderUser.vue @@ -42,11 +42,19 @@ Post
- + -
Please go to profile page to add money receiving method
+
+ Please go to profile page to add money receiving method +
@@ -230,7 +238,7 @@ export default { left: 0; bottom: -20px; font-size: 12px; - color: #3D455F; + color: #3d455f; white-space: nowrap; padding: 2px 5px; } diff --git a/frontend/src/pages/user/account/UserProfile.vue b/frontend/src/pages/user/account/UserProfile.vue index b93c4c6..8df333b 100644 --- a/frontend/src/pages/user/account/UserProfile.vue +++ b/frontend/src/pages/user/account/UserProfile.vue @@ -265,7 +265,9 @@ id="personal-photo-operation-image" src="@/assets/profile.png" /> - +
+ - - + @@ -402,10 +423,20 @@ >
- +
@@ -427,14 +458,24 @@
-
- Have you linked your strip account? + Have you linked your strip account?
- You are a service provider now. Please review your self-intro to reflect your skills to deliver projects. + You are a service provider now. Please review your self-intro to reflect your skills to + deliver projects.
@@ -597,7 +642,10 @@
Delivering time - {{ userProfile.achievemnt.provider.deliveries.delivering_time_per_project_in_day }} days + {{ + userProfile.achievemnt.provider.deliveries.delivering_time_per_project_in_day + }} + days
@@ -1229,7 +1277,7 @@ export default { padding: 12px; // overflow: hidden; border-radius: 12px; - box-shadow: 0px 0px 24px 0px #D4D3E380; + box-shadow: 0px 0px 24px 0px #d4d3e380; background-color: white; margin-bottom: 20px; @@ -1247,7 +1295,7 @@ export default { .panel-item-container { width: calc(25% - 9px); - border: 1px dashed #1748F8; + border: 1px dashed #1748f8; background-color: white; padding: 0 12px; height: 46px; @@ -1258,13 +1306,13 @@ export default { outline: none; &:hover { - background-color: #F3F6FF; + background-color: #f3f6ff; } // &.active { // background-color: #F3F6FF; // } - &[aria-expanded=true] { - background-color: #F3F6FF; + &[aria-expanded='true'] { + background-color: #f3f6ff; } .profile-item-container { @@ -1291,13 +1339,22 @@ export default { color: #666666; line-height: 1; } - .profile-item-span {font-size: 14px; font-weight: bold; color: #242424; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: block; line-height: 1} + .profile-item-span { + font-size: 14px; + font-weight: bold; + color: #242424; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + display: block; + line-height: 1; + } } } } .collapse-content-container { margin: 12px -12px -12px -12px; - border-top: 1px solid #E7E8EB; + border-top: 1px solid #e7e8eb; .collapse-item-container { padding: 32px; @@ -1314,7 +1371,7 @@ export default { width: 100%; position: relative; - .btn-group-container{ + .btn-group-container { position: absolute; right: 32px; top: 10px; @@ -1323,55 +1380,55 @@ export default { } .collapse-item-input { - height: 37px; - width: 350px; - border: 1px solid #E1E1E1; - border-radius: 3px; - margin: 0 8px; - box-shadow: none; - padding: 0 8px; - display: flex; - align-items: center; - position: relative; - - &:focus-within { - border: 1px solid #1748F8; - } + height: 37px; + width: 350px; + border: 1px solid #e1e1e1; + border-radius: 3px; + margin: 0 8px; + box-shadow: none; + padding: 0 8px; + display: flex; + align-items: center; + position: relative; - input { - flex: 1; - height: 100%; - border: none; - outline: none; - box-shadow: none; - } - - .error-message { - color: #916AD4; - font-size: 16px; - position: absolute; - left: 0; - bottom: -26px; - margin: 0; - } - - .enter-icon { - width: 13px; - height: 13px; - margin-left: 12px; - background-color: #E7E9ED; - border-radius: 3px; - padding: 2px; - } - - .collapse-item-currency { - font-size: 14px; - font-weight: bold; - color: #0D1637; - margin-left: 12px; - } + &:focus-within { + border: 1px solid #1748f8; } + input { + flex: 1; + height: 100%; + border: none; + outline: none; + box-shadow: none; + } + + .error-message { + color: #916ad4; + font-size: 16px; + position: absolute; + left: 0; + bottom: -26px; + margin: 0; + } + + .enter-icon { + width: 13px; + height: 13px; + margin-left: 12px; + background-color: #e7e9ed; + border-radius: 3px; + padding: 2px; + } + + .collapse-item-currency { + font-size: 14px; + font-weight: bold; + color: #0d1637; + margin-left: 12px; + } + } + .collapse-item-uploader { width: 150px; height: 150px; @@ -1382,7 +1439,9 @@ export default { align-items: center; justify-content: center; cursor: pointer; - &:hover {opacity: .78;} + &:hover { + opacity: 0.78; + } .uploader-img-btn { width: 50px; @@ -1405,13 +1464,13 @@ export default { padding: 12px; display: flex; align-items: center; - border-bottom: 1px solid #E7E8EB + border-bottom: 1px solid #e7e8eb; } } .panel-table-container { border: 0; - border-collapse: collapse; + border-collapse: collapse; width: 100%; .panel-table-content { diff --git a/frontend/src/pages/user/messages/Home.vue b/frontend/src/pages/user/messages/Home.vue index 23cee8f..a322ece 100644 --- a/frontend/src/pages/user/messages/Home.vue +++ b/frontend/src/pages/user/messages/Home.vue @@ -8,8 +8,8 @@ class="conversation-container" :class="{ selected: - current_thread?.conversation?.information?.conversation_id === - conversation.summary.last_message.conversation_id + current_thread?.conversation?.information?.id === + conversation.summary.last_message?.conversation_id }" @click="selectConversation(conversation)" > @@ -21,11 +21,11 @@ {{ conversation.summary.contact.last_name }} {{ - getDateFromFulltimeString(conversation.summary.last_message.create_time) + getDateFromFulltimeString(conversation.summary.last_message?.create_time) }}
- {{ conversation.summary.last_message.message_body }} + {{ conversation.summary.last_message?.message_body }}