|
@ -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 all |
|
|
See all |
|
|
</router-link> |
|
|
</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 all |
|
|
See all |
|
|
</router-link> |
|
|
</a> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div v-if="showOffersToUserProjectsDetails" class="ml-4 mt-4"> |
|
|
<div v-if="showOffersToUserProjectsDetails" class="ml-4 mt-4"> |
|
@ -239,18 +242,18 @@ export default class NewActivityView extends Vue { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async expandOffersToUserAndMarkRead() { |
|
|
async expandOffersToUserAndMarkRead(fromSeeAll: boolean = false) { |
|
|
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, |
|
|
}); |
|
|
}); |
|
|
// note that we don't update this.lastAckedOfferToUserJwtId in case they |
|
|
// note that we don't update this.lastAckedOfferToUserJwtId in case they |
|
|
// later choose the last one to keep the offers as new |
|
|
// later choose the last one to keep the offers as new |
|
|
this.notify.info( |
|
|
const message = fromSeeAll |
|
|
"The offers are marked as viewed. Click in the list to keep them as new.", |
|
|
? "The offers are marked as viewed." |
|
|
TIMEOUTS.LONG, |
|
|
: "The offers are marked as viewed. Click in the list to keep them as new."; |
|
|
); |
|
|
this.notify.info(message, TIMEOUTS.LONG); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -275,20 +278,23 @@ export default class NewActivityView extends Vue { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async expandOffersToUserProjectsAndMarkRead() { |
|
|
async expandOffersToUserProjectsAndMarkRead(fromSeeAll: boolean = false) { |
|
|
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, |
|
|
}); |
|
|
}); |
|
|
// note that we don't update this.lastAckedOfferToUserProjectsJwtId in case |
|
|
// note that we don't update this.lastAckedOfferToUserProjectsJwtId in case |
|
|
// they later choose the last one to keep the offers as new |
|
|
// they later choose the last one to keep the offers as new |
|
|
this.notify.info( |
|
|
const message = fromSeeAll |
|
|
"The offers are now marked as viewed. Click in the list to keep them as new.", |
|
|
? "The offers are marked as viewed." |
|
|
TIMEOUTS.LONG, |
|
|
: "The offers are marked as viewed. Click in the list to keep them as new."; |
|
|
); |
|
|
this.notify.info(message, TIMEOUTS.LONG); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -314,5 +320,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> |
|
|