From 5f2ab5f9135a70e421ad1e357dc1a8bf4c991997 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Wed, 16 Jul 2025 11:27:41 +0000 Subject: [PATCH] Complete ContactsView Enhanced Triple Migration Pattern (3 minutes) - Remove legacy logConsoleAndDb import and 8 usage calls - Replace with PlatformServiceMixin () method - Component now technically compliant with zero legacy patterns - Maintains existing notification helpers and database operations - Performance: 80% faster than estimated (3 min vs 15-20 min) --- src/views/ContactsView.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 7906ceab..23070aeb 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -135,7 +135,7 @@ import ContactListHeader from "../components/ContactListHeader.vue"; import ContactBulkActions from "../components/ContactBulkActions.vue"; import LargeIdenticonModal from "../components/LargeIdenticonModal.vue"; import { APP_SERVER, AppString, NotificationIface } from "../constants/app"; -import { logConsoleAndDb } from "../db/index"; +// Legacy logging import removed - using PlatformServiceMixin methods import { Contact } from "../db/tables/contacts"; import { getContactJwtFromJwtUrl } from "../libs/crypto"; import { decodeEndorserJwt } from "../libs/crypto/vc"; @@ -383,7 +383,7 @@ export default class ContactsView extends Vue { // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (error: any) { const fullError = "Error redeeming invite: " + errorStringForLog(error); - logConsoleAndDb(fullError, true); + this.$logAndConsole(fullError, true); let message = "Got an error sending the invite."; if ( error.response && @@ -566,7 +566,7 @@ export default class ContactsView extends Vue { this.givenToMeUnconfirmed = givenToMeUnconfirmed; } catch (error) { const fullError = "Error loading gives: " + errorStringForLog(error); - logConsoleAndDb(fullError, true); + this.$logAndConsole(fullError, true); this.notify.error(NOTIFY_GIVES_LOAD_ERROR.message); } } @@ -639,7 +639,7 @@ export default class ContactsView extends Vue { } catch (e) { const fullError = "Error adding contacts from CSV: " + errorStringForLog(e); - logConsoleAndDb(fullError, true); + this.$logAndConsole(fullError, true); this.notify.error(NOTIFY_CONTACTS_ADD_ERROR.message); } @@ -727,7 +727,7 @@ export default class ContactsView extends Vue { } catch (e) { const fullError = "Error adding contacts from array: " + errorStringForLog(e); - logConsoleAndDb(fullError, true); + this.$logAndConsole(fullError, true); this.notify.error(NOTIFY_CONTACT_INPUT_PARSE_ERROR.message); } } @@ -872,7 +872,7 @@ export default class ContactsView extends Vue { private handleContactAddError(err: any): void { const fullError = "Error when adding contact to storage: " + errorStringForLog(err); - logConsoleAndDb(fullError, true); + this.$logAndConsole(fullError, true); let message = NOTIFY_CONTACT_IMPORT_ERROR.message; if ( @@ -918,7 +918,7 @@ export default class ContactsView extends Vue { } } catch (error) { const fullError = "Error when registering: " + errorStringForLog(error); - logConsoleAndDb(fullError, true); + this.$logAndConsole(fullError, true); let userMessage = NOTIFY_REGISTRATION_ERROR_GENERIC.message; const serverError = error as AxiosError; if (serverError.isAxiosError) { @@ -1085,7 +1085,7 @@ export default class ContactsView extends Vue { } catch (err) { const fullError = "Error updating contact-amounts setting: " + errorStringForLog(err); - logConsoleAndDb(fullError, true); + this.$logAndConsole(fullError, true); // Use notification helper and constant this.notify.error( NOTIFY_CONTACT_SETTING_SAVE_ERROR.message, @@ -1225,7 +1225,7 @@ export default class ContactsView extends Vue { ); } } catch (error) { - logConsoleAndDb( + this.$logAndConsole( "Error checking meeting status:" + errorStringForLog(error), ); // Use notification helper