@ -32,9 +32,9 @@
@ click = "expandOffersToUserAndMarkRead()"
@ click = "expandOffersToUserAndMarkRead()"
/ >
/ >
< / div >
< / div >
< router -link to = "/recent-offers-to-user" class = "text-blue-500" >
< a class = "text-blue-500 cursor-pointer" @click ="handleSeeAllOffersToUser" >
See & nbsp ; all
See & nbsp ; all
< / r o u t e r - l i n k >
< / a >
< / div >
< / div >
< div v-if ="showOffersDetails" class="ml-4 mt-4" >
< div v-if ="showOffersDetails" class="ml-4 mt-4" >
@ -99,9 +99,12 @@
@ click = "expandOffersToUserProjectsAndMarkRead()"
@ click = "expandOffersToUserProjectsAndMarkRead()"
/ >
/ >
< / div >
< / div >
< router -link to = "/recent-offers-to-user-projects" class = "text-blue-500" >
< a
class = "text-blue-500 cursor-pointer"
@ click = "handleSeeAllOffersToUserProjects"
>
See & nbsp ; all
See & nbsp ; all
< / r o u t e r - l i n k >
< / a >
< / div >
< / div >
< div v-if ="showOffersToUserProjectsDetails" class="ml-4 mt-4" >
< div v-if ="showOffersToUserProjectsDetails" class="ml-4 mt-4" >
@ -246,7 +249,7 @@ export default class NewActivityView extends Vue {
async expandOffersToUserAndMarkRead ( ) {
async expandOffersToUserAndMarkRead ( ) {
this . showOffersDetails = ! this . showOffersDetails ;
this . showOffersDetails = ! this . showOffersDetails ;
if ( this . showOffersDetails ) {
if ( this . showOffersDetails && this . newOffersToUser . length > 0 ) {
await this . $updateSettings ( {
await this . $updateSettings ( {
lastAckedOfferToUserJwtId : this . newOffersToUser [ 0 ] . jwtId ,
lastAckedOfferToUserJwtId : this . newOffersToUser [ 0 ] . jwtId ,
} ) ;
} ) ;
@ -283,7 +286,10 @@ export default class NewActivityView extends Vue {
async expandOffersToUserProjectsAndMarkRead ( ) {
async expandOffersToUserProjectsAndMarkRead ( ) {
this . showOffersToUserProjectsDetails =
this . showOffersToUserProjectsDetails =
! this . showOffersToUserProjectsDetails ;
! this . showOffersToUserProjectsDetails ;
if ( this . showOffersToUserProjectsDetails ) {
if (
this . showOffersToUserProjectsDetails &&
this . newOffersToUserProjects . length > 0
) {
await this . $updateSettings ( {
await this . $updateSettings ( {
lastAckedOfferToUserProjectsJwtId :
lastAckedOfferToUserProjectsJwtId :
this . newOffersToUserProjects [ 0 ] . jwtId ,
this . newOffersToUserProjects [ 0 ] . jwtId ,
@ -291,7 +297,7 @@ export default class NewActivityView extends Vue {
/ / n o t e t h a t w e d o n ' t u p d a t e t h i s . l a s t A c k e d O f f e r T o U s e r P r o j e c t s J w t I d i n c a s e
/ / n o t e t h a t w e d o n ' t u p d a t e t h i s . l a s t A c k e d O f f e r T o U s e r P r o j e c t s J w t I d i n c a s e
/ / t h e y l a t e r c h o o s e t h e l a s t o n e t o k e e p t h e o f f e r s a s n e w
/ / t h e y l a t e r c h o o s e t h e l a s t o n e t o k e e p t h e o f f e r s a s n e w
this . notify . info (
this . notify . info (
"The offers are now marked as viewed. Click in the list to keep them as new." ,
"The offers are marked as viewed. Click in the list to keep them as new." ,
TIMEOUTS . LONG ,
TIMEOUTS . LONG ,
) ;
) ;
}
}
@ -319,5 +325,13 @@ export default class NewActivityView extends Vue {
TIMEOUTS . STANDARD ,
TIMEOUTS . STANDARD ,
) ;
) ;
}
}
async handleSeeAllOffersToUser ( ) {
this . $router . push ( "/recent-offers-to-user" ) ;
}
async handleSeeAllOffersToUserProjects ( ) {
this . $router . push ( "/recent-offers-to-user-projects" ) ;
}
}
}
< / script >
< / script >