forked from jsnbuchanan/crowd-funder-for-time-pwa
Migrate ContactQRScan views to use mixin parseJsonField
Replace databaseUtil parseJsonField imports with PlatformServiceMixin _parseJsonField method in ContactQRScanFullView.vue and ContactQRScanShowView.vue. Use type assertion for mixin method access. Maintains functionality while removing static databaseUtil dependency.
This commit is contained in:
@@ -147,7 +147,6 @@ import QuickNav from "../components/QuickNav.vue";
|
||||
import UserNameDialog from "../components/UserNameDialog.vue";
|
||||
import { NotificationIface } from "../constants/app";
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
import { parseJsonField } from "../db/databaseUtil";
|
||||
import { getContactJwtFromJwtUrl } from "../libs/crypto";
|
||||
import {
|
||||
CONTACT_CSV_HEADER,
|
||||
@@ -705,7 +704,7 @@ export default class ContactQRScanShow extends Vue {
|
||||
// Add new contact
|
||||
// @ts-expect-error because we're just using the value to store to the DB
|
||||
contact.contactMethods = JSON.stringify(
|
||||
parseJsonField(contact.contactMethods, []),
|
||||
(this as any)._parseJsonField(contact.contactMethods, []),
|
||||
);
|
||||
await this.$insertContact(contact);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user