forked from jsnbuchanan/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:
@@ -344,7 +344,7 @@ export default class OnboardMeetingView extends Vue {
|
||||
|
||||
async created() {
|
||||
this.notify = createNotifyHelpers(this.$notify as any);
|
||||
const settings = await this.$getSettings("activeAccount");
|
||||
const settings = await this.$accountSettings();
|
||||
this.activeDid = settings?.activeDid || "";
|
||||
this.apiServer = settings?.apiServer || "";
|
||||
this.fullName = settings?.firstName || "";
|
||||
@@ -398,27 +398,52 @@ export default class OnboardMeetingView extends Vue {
|
||||
}
|
||||
|
||||
async fetchCurrentMeeting() {
|
||||
console.log("🏗️ DEBUG: fetchCurrentMeeting() called");
|
||||
console.log("🏗️ DEBUG: activeDid =", this.activeDid);
|
||||
console.log("🏗️ DEBUG: apiServer =", this.apiServer);
|
||||
|
||||
try {
|
||||
const headers = await getHeaders(this.activeDid);
|
||||
console.log("🏗️ DEBUG: Headers obtained:", headers);
|
||||
|
||||
const response = await this.axios.get(
|
||||
this.apiServer + "/api/partner/groupOnboard",
|
||||
{ headers },
|
||||
);
|
||||
console.log("🏗️ DEBUG: Meeting response:", response.data);
|
||||
|
||||
const queryPassword = this.$route.query["password"] as string;
|
||||
console.log("🏗️ DEBUG: Query password:", queryPassword);
|
||||
|
||||
if (response?.data?.data) {
|
||||
console.log("🏗️ DEBUG: Meeting found, setting currentMeeting");
|
||||
this.currentMeeting = {
|
||||
...response.data.data,
|
||||
userFullName: this.fullName,
|
||||
password: this.currentMeeting?.password || queryPassword || "",
|
||||
};
|
||||
console.log("🏗️ DEBUG: currentMeeting set:", this.currentMeeting);
|
||||
} else {
|
||||
// no meeting found
|
||||
console.log(
|
||||
"🏗️ DEBUG: No meeting found, setting up blank meeting for creation",
|
||||
);
|
||||
this.newOrUpdatedMeetingInputs = this.blankMeeting();
|
||||
console.log(
|
||||
"🏗️ DEBUG: newOrUpdatedMeetingInputs set:",
|
||||
this.newOrUpdatedMeetingInputs,
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
// no meeting found
|
||||
} catch (error: any) {
|
||||
console.log("🏗️ DEBUG: Error fetching meeting:", error);
|
||||
console.log("🏗️ DEBUG: Error response:", error.response?.data);
|
||||
console.log(
|
||||
"🏗️ DEBUG: Setting up blank meeting for creation due to error",
|
||||
);
|
||||
this.newOrUpdatedMeetingInputs = this.blankMeeting();
|
||||
console.log(
|
||||
"🏗️ DEBUG: newOrUpdatedMeetingInputs set:",
|
||||
this.newOrUpdatedMeetingInputs,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user