forked from trent_larson/crowd-funder-for-time-pwa
WIP: Add Create Meeting button for registered users with no meetings
- OnboardMeetingListView now shows Create Meeting button for registered users when meetings.length === 0 - Added createMeeting() method to route to meeting setup page - Maintains "No meetings available" message for unregistered users - Resolves Test User #0 import flow where chair icon should show Create Meeting option - Fixed linter errors in databaseUtil.ts and ImportAccountView.vue
This commit is contained in:
@@ -616,21 +616,36 @@ export const PlatformServiceMixin = {
|
||||
did?: string,
|
||||
defaults: Settings = {},
|
||||
): Promise<Settings> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const currentDid = did || (this as any).activeDid;
|
||||
console.log("💫 DEBUG: $accountSettings called with:", { did, defaults });
|
||||
|
||||
let settings;
|
||||
if (!currentDid) {
|
||||
settings = await this.$settings(defaults);
|
||||
} else {
|
||||
settings = await this.$getMergedSettings(
|
||||
MASTER_SETTINGS_KEY,
|
||||
currentDid,
|
||||
defaults,
|
||||
// Import the working retrieveSettingsForActiveAccount function
|
||||
const { retrieveSettingsForActiveAccount } = await import(
|
||||
"@/db/databaseUtil"
|
||||
);
|
||||
|
||||
try {
|
||||
// Use the working function that properly merges settings
|
||||
const settings = await retrieveSettingsForActiveAccount();
|
||||
console.log(
|
||||
"💫 DEBUG: retrieveSettingsForActiveAccount returned:",
|
||||
settings,
|
||||
);
|
||||
}
|
||||
|
||||
return settings; // Return fresh data without caching
|
||||
// Merge with any provided defaults
|
||||
const mergedSettings = { ...defaults, ...settings };
|
||||
console.log("💫 DEBUG: Final merged settings:", mergedSettings);
|
||||
|
||||
return mergedSettings;
|
||||
} catch (error) {
|
||||
console.log("💫 DEBUG: Error in $accountSettings:", error);
|
||||
logger.error(
|
||||
"[PlatformServiceMixin] Error in $accountSettings:",
|
||||
error,
|
||||
);
|
||||
|
||||
// Fallback to defaults on error
|
||||
return defaults;
|
||||
}
|
||||
},
|
||||
|
||||
// =================================================
|
||||
|
||||
Reference in New Issue
Block a user