From 7cfb328dadb1823e43c15c58505bca8eb4b0df3d Mon Sep 17 00:00:00 2001 From: nshakya02 Date: Sun, 26 Jan 2025 12:38:28 -0500 Subject: [PATCH] Make new users Changemakers and prompt existing users to Changemaker (#378) HLI 1 #371, HLI 1-2 #375 This will make new users Changemakers by default (they will be prompted to create an account) NEW: Mari and I tested the change for accounts that already have an existing business/project admin who do not have a Changemaker account, and it prompts you to Changemaker creation page -- so it works for existing accounts as well! Co-authored-by: Nisha Shakya --- docker-compose.yml | 1 - .../shell/src/lib/im-app/im-app.component.ts | 39 ++++++++++--------- .../im-welcome-modal.component.html | 4 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2d12316e..d0d1caac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,7 +40,6 @@ services: - HOME=/home/node=value ports: - 4000:4000 - - 5000:5000 - 5001:5001 - 8080:8080 - 8085:8085 diff --git a/libs/client/shell/src/lib/im-app/im-app.component.ts b/libs/client/shell/src/lib/im-app/im-app.component.ts index 8495a9d4..fae5cbd5 100644 --- a/libs/client/shell/src/lib/im-app/im-app.component.ts +++ b/libs/client/shell/src/lib/im-app/im-app.component.ts @@ -916,25 +916,26 @@ export class ImAppComponent extends StatefulComponent implements OnInit { take(1), withLatestFrom(this.activatedRoute.queryParams), tap(([{ changeMaker, exchangeAdmins, serveAdmins, epApplications, spApplications }, query]) => { - const noProfiles = - !changeMaker && - exchangeAdmins.length === 0 && - serveAdmins.length === 0 && - epApplications.length === 0 && - spApplications.length === 0; - if (noProfiles) { - const register = { - cm: () => this.route.to.applications.cm.ROOT(), - sp: () => this.route.to.applications.sp.ROOT(), - ep: () => this.route.to.applications.ep.ROOT(), - market: () => this.route.to.applications.cm.ROOT(), - }; - const fn = register[query['register'] as keyof typeof register]; - if (fn) { - fn(); - } else { - this.welcome.open(); - } + // const noProfiles = + // !changeMaker && + // exchangeAdmins.length === 0 && + // serveAdmins.length === 0 && + // epApplications.length === 0 && + // spApplications.length === 0; + if (!changeMaker) { + // const register = { + // cm: () => this.route.to.applications.cm.ROOT(), + // sp: () => this.route.to.applications.sp.ROOT(), + // ep: () => this.route.to.applications.ep.ROOT(), + // market: () => this.route.to.applications.cm.ROOT(), + // }; + // const fn = register[query['register'] as keyof typeof register]; + // if (fn) { + // fn(); + // } else { + // this.welcome.open(); + // } + this.route.to.applications.cm.ROOT(); } }), switchMap(() => diff --git a/libs/client/shell/src/lib/im-welcome-modal/im-welcome-modal.component.html b/libs/client/shell/src/lib/im-welcome-modal/im-welcome-modal.component.html index 0ea668e0..8d031c0d 100644 --- a/libs/client/shell/src/lib/im-welcome-modal/im-welcome-modal.component.html +++ b/libs/client/shell/src/lib/im-welcome-modal/im-welcome-modal.component.html @@ -26,7 +26,7 @@ Become a ChangeMaker - +