add pages to see all the offers to user and offers to user's projects

This commit is contained in:
2024-11-05 19:03:12 -07:00
parent 0d880d1edc
commit c004706425
7 changed files with 374 additions and 48 deletions

View File

@@ -16,21 +16,26 @@
</div>
<!-- Display a single row with the name of "New Offers To You" with a count. -->
<div>
<span class="text-lg font-medium"
>{{ newOffersToUser.length
}}{{ newOffersToUserHitLimit ? "+" : "" }}</span
>
<span class="text-lg font-medium ml-4"
>New Offer{{ newOffersToUser.length === 1 ? "" : "s" }} To You</span
>
<fa
v-if="newOffersToUser.length > 0"
:icon="showOffersDetails ? 'chevron-down' : 'chevron-right'"
class="cursor-pointer ml-4 text-lg"
@click="expandOffersToUserAndMarkRead()"
data-testid="showOffersToUser"
/>
<div class="flex justify-between">
<div>
<span class="text-lg font-medium"
>{{ newOffersToUser.length
}}{{ newOffersToUserHitLimit ? "+" : "" }}</span
>
<span class="text-lg font-medium ml-4"
>New Offer{{ newOffersToUser.length === 1 ? "" : "s" }} To You</span
>
<fa
v-if="newOffersToUser.length > 0"
:icon="showOffersDetails ? 'chevron-down' : 'chevron-right'"
class="cursor-pointer ml-4 text-lg"
@click="expandOffersToUserAndMarkRead()"
data-testid="showOffersToUser"
/>
</div>
<router-link to="/recent-offers-to-user" class="text-blue-500">
See all
</router-link>
</div>
<div v-if="showOffersDetails" class="ml-4 mt-4">
@@ -43,7 +48,7 @@
<span>{{
didInfo(offer.offeredByDid, activeDid, allMyDids, allContacts)
}}</span>
offers
offered
<span v-if="offer.objectDescription">{{
offer.objectDescription
}}</span
@@ -70,24 +75,29 @@
</div>
<!-- Display a single row with the name of "New Offers To Your Projects" with a count. -->
<div class="mt-4">
<span class="text-lg font-medium"
>{{ newOffersToUserProjects.length
}}{{ newOffersToUserProjectsHitLimit ? "+" : "" }}</span
>
<span class="text-lg font-medium ml-4"
>New Offer{{ newOffersToUserProjects.length === 1 ? "" : "s" }} To Your
Projects</span
>
<fa
v-if="newOffersToUserProjects.length > 0"
:icon="
showOffersToUserProjectsDetails ? 'chevron-down' : 'chevron-right'
"
class="cursor-pointer ml-4 text-lg"
@click="expandOffersToUserProjectsAndMarkRead()"
data-testid="showOffersToUserProjects"
/>
<div class="mt-4 flex justify-between">
<div>
<span class="text-lg font-medium"
>{{ newOffersToUserProjects.length
}}{{ newOffersToUserProjectsHitLimit ? "+" : "" }}</span
>
<span class="text-lg font-medium ml-4"
>New Offer{{ newOffersToUserProjects.length === 1 ? "" : "s" }} To
Your Projects</span
>
<fa
v-if="newOffersToUserProjects.length > 0"
:icon="
showOffersToUserProjectsDetails ? 'chevron-down' : 'chevron-right'
"
class="cursor-pointer ml-4 text-lg"
@click="expandOffersToUserProjectsAndMarkRead()"
data-testid="showOffersToUserProjects"
/>
</div>
<router-link to="/recent-offers-to-user-projects" class="text-blue-500">
See all
</router-link>
</div>
<div v-if="showOffersToUserProjectsDetails" class="ml-4 mt-4">
@@ -100,7 +110,7 @@
<span>{{
didInfo(offer.offeredByDid, activeDid, allMyDids, allContacts)
}}</span>
offers
offered
<span v-if="offer.objectDescription">{{
offer.objectDescription
}}</span