refactor: simplify notification messages for offer viewing
- Remove conditional notification logic in NewActivityView - Remove redundant notification in RecentOffersToUserView and RecentOffersToUserProjectsView - Standardize to single notification message format
This commit is contained in:
@@ -242,7 +242,7 @@ export default class NewActivityView extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async expandOffersToUserAndMarkRead(fromSeeAll: boolean = false) {
|
async expandOffersToUserAndMarkRead() {
|
||||||
this.showOffersDetails = !this.showOffersDetails;
|
this.showOffersDetails = !this.showOffersDetails;
|
||||||
if (this.showOffersDetails && this.newOffersToUser.length > 0) {
|
if (this.showOffersDetails && this.newOffersToUser.length > 0) {
|
||||||
await this.$updateSettings({
|
await this.$updateSettings({
|
||||||
@@ -250,10 +250,10 @@ export default class NewActivityView extends Vue {
|
|||||||
});
|
});
|
||||||
// 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
|
||||||
const message = fromSeeAll
|
this.notify.info(
|
||||||
? "The offers are marked as viewed."
|
"The offers are 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,
|
||||||
this.notify.info(message, TIMEOUTS.LONG);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,7 +278,7 @@ export default class NewActivityView extends Vue {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async expandOffersToUserProjectsAndMarkRead(fromSeeAll: boolean = false) {
|
async expandOffersToUserProjectsAndMarkRead() {
|
||||||
this.showOffersToUserProjectsDetails =
|
this.showOffersToUserProjectsDetails =
|
||||||
!this.showOffersToUserProjectsDetails;
|
!this.showOffersToUserProjectsDetails;
|
||||||
if (
|
if (
|
||||||
@@ -291,10 +291,10 @@ export default class NewActivityView extends Vue {
|
|||||||
});
|
});
|
||||||
// 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
|
||||||
const message = fromSeeAll
|
this.notify.info(
|
||||||
? "The offers are marked as viewed."
|
"The offers are 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,
|
||||||
this.notify.info(message, TIMEOUTS.LONG);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,6 @@ export default class RecentOffersToUserView extends Vue {
|
|||||||
lastAckedOfferToUserProjectsJwtId:
|
lastAckedOfferToUserProjectsJwtId:
|
||||||
this.newOffersToUserProjects[0].jwtId,
|
this.newOffersToUserProjects[0].jwtId,
|
||||||
});
|
});
|
||||||
this.notify.info("The offers are marked as viewed.", TIMEOUTS.LONG);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ export default class RecentOffersToUserView extends Vue {
|
|||||||
await this.$updateSettings({
|
await this.$updateSettings({
|
||||||
lastAckedOfferToUserJwtId: this.newOffersToUser[0].jwtId,
|
lastAckedOfferToUserJwtId: this.newOffersToUser[0].jwtId,
|
||||||
});
|
});
|
||||||
this.notify.info("The offers are marked as viewed.", TIMEOUTS.LONG);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
|||||||
Reference in New Issue
Block a user