diff --git a/src/components/ImageMethodDialog.vue b/src/components/ImageMethodDialog.vue index 5cb99094..74c822a8 100644 --- a/src/components/ImageMethodDialog.vue +++ b/src/components/ImageMethodDialog.vue @@ -293,7 +293,7 @@ const inputImageFileNameRef = ref(); export default class ImageMethodDialog extends Vue { $notify!: NotifyFunction; $router!: Router; - notify = createNotifyHelpers(this.$notify); + notify!: ReturnType; /** Active DID for user authentication */ activeDid = ""; @@ -498,6 +498,9 @@ export default class ImageMethodDialog extends Vue { * @throws {Error} When settings retrieval fails */ async mounted() { + // Initialize notification helpers + this.notify = createNotifyHelpers(this.$notify); + try { // Get activeDid from active_identity table (single source of truth) // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/src/views/HelpNotificationsView.vue b/src/views/HelpNotificationsView.vue index 81f45f1f..e768c870 100644 --- a/src/views/HelpNotificationsView.vue +++ b/src/views/HelpNotificationsView.vue @@ -394,7 +394,7 @@ export default class HelpNotificationsView extends Vue { notifyingReminderTime = ""; // Notification helper system - notify = createNotifyHelpers(this.$notify); + notify!: ReturnType; /** * Computed property for consistent button styling @@ -430,6 +430,9 @@ export default class HelpNotificationsView extends Vue { * Handles errors gracefully with proper logging without exposing sensitive data. */ async mounted() { + // Initialize notification helpers + this.notify = createNotifyHelpers(this.$notify); + try { const registration = await navigator.serviceWorker?.ready; const fullSub = await registration?.pushManager.getSubscription(); diff --git a/src/views/NewActivityView.vue b/src/views/NewActivityView.vue index f1f0ed1a..1f01b408 100644 --- a/src/views/NewActivityView.vue +++ b/src/views/NewActivityView.vue @@ -32,9 +32,9 @@ @click="expandOffersToUserAndMarkRead()" /> - + See all - +
@@ -99,9 +99,12 @@ @click="expandOffersToUserProjectsAndMarkRead()" />
- + See all - +
@@ -246,7 +249,7 @@ export default class NewActivityView extends Vue { async expandOffersToUserAndMarkRead() { this.showOffersDetails = !this.showOffersDetails; - if (this.showOffersDetails) { + if (this.showOffersDetails && this.newOffersToUser.length > 0) { await this.$updateSettings({ lastAckedOfferToUserJwtId: this.newOffersToUser[0].jwtId, }); @@ -283,7 +286,10 @@ export default class NewActivityView extends Vue { async expandOffersToUserProjectsAndMarkRead() { this.showOffersToUserProjectsDetails = !this.showOffersToUserProjectsDetails; - if (this.showOffersToUserProjectsDetails) { + if ( + this.showOffersToUserProjectsDetails && + this.newOffersToUserProjects.length > 0 + ) { await this.$updateSettings({ lastAckedOfferToUserProjectsJwtId: this.newOffersToUserProjects[0].jwtId, @@ -291,7 +297,7 @@ export default class NewActivityView extends Vue { // note that we don't update this.lastAckedOfferToUserProjectsJwtId in case // they later choose the last one to keep the offers as new 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, ); } @@ -319,5 +325,13 @@ export default class NewActivityView extends Vue { TIMEOUTS.STANDARD, ); } + + async handleSeeAllOffersToUser() { + this.$router.push("/recent-offers-to-user"); + } + + async handleSeeAllOffersToUserProjects() { + this.$router.push("/recent-offers-to-user-projects"); + } } diff --git a/src/views/QuickActionBvcBeginView.vue b/src/views/QuickActionBvcBeginView.vue index 4293cc1c..578f33fb 100644 --- a/src/views/QuickActionBvcBeginView.vue +++ b/src/views/QuickActionBvcBeginView.vue @@ -99,7 +99,7 @@ export default class QuickActionBvcBeginView extends Vue { $router!: Router; // Notification helper system - private notify = createNotifyHelpers(this.$notify); + private notify!: ReturnType; attended = true; gaveTime = true; @@ -111,6 +111,9 @@ export default class QuickActionBvcBeginView extends Vue { * Uses America/Denver timezone for Bountiful location */ async mounted() { + // Initialize notification helpers + this.notify = createNotifyHelpers(this.$notify); + logger.debug( "[QuickActionBvcBeginView] Mounted - calculating meeting date", ); diff --git a/src/views/RecentOffersToUserProjectsView.vue b/src/views/RecentOffersToUserProjectsView.vue index 9c7d9e14..455098bb 100644 --- a/src/views/RecentOffersToUserProjectsView.vue +++ b/src/views/RecentOffersToUserProjectsView.vue @@ -32,20 +32,20 @@
-
    +
    • +
      - You've already seen all the following + + You've already seen all the following +
      {{ @@ -147,6 +147,14 @@ export default class RecentOffersToUserView extends Vue { this.newOffersToUserProjects = offersToUserProjectsData.data; this.newOffersToUserProjectsAtEnd = !offersToUserProjectsData.hitLimit; + // Mark offers as read after data is loaded + if (this.newOffersToUserProjects.length > 0) { + await this.$updateSettings({ + lastAckedOfferToUserProjectsJwtId: + this.newOffersToUserProjects[0].jwtId, + }); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (err: any) { logger.error("Error retrieving settings & contacts:", err); diff --git a/src/views/RecentOffersToUserView.vue b/src/views/RecentOffersToUserView.vue index 4946f596..fb52bbd0 100644 --- a/src/views/RecentOffersToUserView.vue +++ b/src/views/RecentOffersToUserView.vue @@ -27,20 +27,20 @@

      -
        +
        • +
          - You've already seen all the following + + You've already seen all the following +
          {{ @@ -138,6 +138,13 @@ export default class RecentOffersToUserView extends Vue { this.newOffersToUser = offersToUserData.data; this.newOffersToUserAtEnd = !offersToUserData.hitLimit; + // Mark offers as read after data is loaded + if (this.newOffersToUser.length > 0) { + await this.$updateSettings({ + lastAckedOfferToUserJwtId: this.newOffersToUser[0].jwtId, + }); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (err: any) { logger.error("Error retrieving settings & contacts:", err); diff --git a/src/views/SeedBackupView.vue b/src/views/SeedBackupView.vue index 8fb4e0a6..bdbe3545 100644 --- a/src/views/SeedBackupView.vue +++ b/src/views/SeedBackupView.vue @@ -162,7 +162,7 @@ export default class SeedBackupView extends Vue { showSeed = false; // Notification helper system - notify = createNotifyHelpers(this.$notify); + notify!: ReturnType; /** * Computed property for consistent copy feedback styling @@ -204,6 +204,9 @@ export default class SeedBackupView extends Vue { * Handles errors gracefully with user notifications. */ async created() { + // Initialize notification helpers + this.notify = createNotifyHelpers(this.$notify); + try { let activeDid = "";