diff --git a/bizmatch-server/.gitignore b/bizmatch-server/.gitignore index 68cb476..377b11e 100644 --- a/bizmatch-server/.gitignore +++ b/bizmatch-server/.gitignore @@ -58,6 +58,7 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json pictures pictures_base +pictures_ src/*.js bun.lockb diff --git a/bizmatch-server/.vscode/launch.json b/bizmatch-server/.vscode/launch.json index 1a645a2..fb9a8e7 100644 --- a/bizmatch-server/.vscode/launch.json +++ b/bizmatch-server/.vscode/launch.json @@ -20,10 +20,10 @@ { "type": "node", "request": "launch", - "name": "Launch TypeScript file with tsx", + "name": "Launch import from exported with tsx", "runtimeExecutable": "npx", "runtimeArgs": ["tsx", "--inspect"], - "args": ["${workspaceFolder}/src/drizzle/import.ts"], + "args": ["${workspaceFolder}/src/drizzle/importFromExported.ts"], "cwd": "${workspaceFolder}", "outFiles": ["${workspaceFolder}/dist/**/*.js", "!**/node_modules/**"], "sourceMaps": true, diff --git a/bizmatch-server/src/app.module.ts b/bizmatch-server/src/app.module.ts index b40aec7..928533f 100644 --- a/bizmatch-server/src/app.module.ts +++ b/bizmatch-server/src/app.module.ts @@ -23,7 +23,6 @@ import { APP_INTERCEPTOR } from '@nestjs/core'; import { ClsMiddleware, ClsModule } from 'nestjs-cls'; import { LoggingInterceptor } from './interceptors/logging.interceptor'; import { UserInterceptor } from './interceptors/user.interceptor'; -import { PaymentModule } from './payment/payment.module'; import { RequestDurationMiddleware } from './request-duration/request-duration.middleware'; import { SelectOptionsModule } from './select-options/select-options.module'; import { UserModule } from './user/user.module'; @@ -70,7 +69,7 @@ console.log(JSON.stringify(process.env, null, 2)); PassportModule, AiModule, LogModule, - PaymentModule, + // PaymentModule, EventModule, ], controllers: [AppController, LogController], diff --git a/bizmatch/package.json b/bizmatch/package.json index 5cf23a8..4b88f19 100644 --- a/bizmatch/package.json +++ b/bizmatch/package.json @@ -18,6 +18,7 @@ "@angular/common": "^18.1.3", "@angular/compiler": "^18.1.3", "@angular/core": "^18.1.3", + "@angular/fire": "^18.0.1", "@angular/forms": "^18.1.3", "@angular/platform-browser": "^18.1.3", "@angular/platform-browser-dynamic": "^18.1.3", diff --git a/bizmatch/src/app/app.component.html b/bizmatch/src/app/app.component.html index cefdb7c..0523329 100644 --- a/bizmatch/src/app/app.component.html +++ b/bizmatch/src/app/app.component.html @@ -1,6 +1,6 @@
- @if (actualRoute !=='home'){ + @if (actualRoute !=='home' && actualRoute !=='login'){
}
diff --git a/bizmatch/src/app/app.config.ts b/bizmatch/src/app/app.config.ts index 894734a..72eb61b 100644 --- a/bizmatch/src/app/app.config.ts +++ b/bizmatch/src/app/app.config.ts @@ -2,6 +2,8 @@ import { APP_INITIALIZER, ApplicationConfig, ErrorHandler } from '@angular/core' import { provideRouter, withEnabledBlockingInitialNavigation, withInMemoryScrolling } from '@angular/router'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; +import { initializeApp, provideFirebaseApp } from '@angular/fire/app'; +import { getAuth, provideAuth } from '@angular/fire/auth'; import { provideAnimations } from '@angular/platform-browser/animations'; import { KeycloakBearerInterceptor, KeycloakService } from 'keycloak-angular'; import { GALLERY_CONFIG, GalleryConfig } from 'ng-gallery'; @@ -9,7 +11,9 @@ import { provideQuillConfig } from 'ngx-quill'; import { provideShareButtonsOptions, SharerMethods, withConfig } from 'ngx-sharebuttons'; import { shareIcons } from 'ngx-sharebuttons/icons'; import { provideNgxStripe } from 'ngx-stripe'; +import { environment } from '../environments/environment'; import { routes } from './app.routes'; +import { AuthInterceptor } from './interceptors/auth.interceptor'; import { LoadingInterceptor } from './interceptors/loading.interceptor'; import { TimeoutInterceptor } from './interceptors/timeout.interceptor'; import { GlobalErrorHandler } from './services/globalErrorHandler'; @@ -52,6 +56,7 @@ export const appConfig: ApplicationConfig = { useClass: TimeoutInterceptor, multi: true, }, + { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }, { provide: 'TIMEOUT_DURATION', useValue: 5000, // Standard-Timeout von 5 Sekunden @@ -93,6 +98,9 @@ export const appConfig: ApplicationConfig = { ], }, }), + provideFirebaseApp(() => initializeApp(environment.firebaseConfig)), + provideAuth(() => getAuth()), + // provideFirestore(() => getFirestore()), ], }; function initServices(selectOptions: SelectOptionsService) { diff --git a/bizmatch/src/app/app.routes.ts b/bizmatch/src/app/app.routes.ts index dbf83a5..b4f912c 100644 --- a/bizmatch/src/app/app.routes.ts +++ b/bizmatch/src/app/app.routes.ts @@ -2,6 +2,7 @@ import { Routes } from '@angular/router'; import { LogoutComponent } from './components/logout/logout.component'; import { NotFoundComponent } from './components/not-found/not-found.component'; +import { LoginRegisterComponent } from './components/login-register/login-register.component'; import { AuthGuard } from './guards/auth.guard'; import { ListingCategoryGuard } from './guards/listing-category.guard'; import { UserListComponent } from './pages/admin/user-list/user-list.component'; @@ -12,7 +13,6 @@ import { HomeComponent } from './pages/home/home.component'; import { BrokerListingsComponent } from './pages/listings/broker-listings/broker-listings.component'; import { BusinessListingsComponent } from './pages/listings/business-listings/business-listings.component'; import { CommercialPropertyListingsComponent } from './pages/listings/commercial-property-listings/commercial-property-listings.component'; -import { LoginComponent } from './pages/login/login.component'; import { PricingComponent } from './pages/pricing/pricing.component'; import { AccountComponent } from './pages/subscription/account/account.component'; import { EditBusinessListingComponent } from './pages/subscription/edit-business-listing/edit-business-listing.component'; @@ -57,9 +57,17 @@ export const routes: Routes = [ canActivate: [ListingCategoryGuard], component: NotFoundComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet }, + // { + // path: 'login/:page', + // component: LoginComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet + // }, { path: 'login/:page', - component: LoginComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet + component: LoginRegisterComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet + }, + { + path: 'login', + component: LoginRegisterComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet }, { path: 'notfound', diff --git a/bizmatch/src/app/components/email-verification/email-verification.component.html b/bizmatch/src/app/components/email-verification/email-verification.component.html new file mode 100644 index 0000000..9187aa7 --- /dev/null +++ b/bizmatch/src/app/components/email-verification/email-verification.component.html @@ -0,0 +1,7 @@ +
+
+

Email Verification

+

A verification email has been sent to your email address. Please check your inbox and click the link to verify your account.

+

Once verified, please return to the application.

+
+
diff --git a/bizmatch/src/app/components/email-verification/email-verification.component.ts b/bizmatch/src/app/components/email-verification/email-verification.component.ts new file mode 100644 index 0000000..79f44b7 --- /dev/null +++ b/bizmatch/src/app/components/email-verification/email-verification.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-email-verification', + standalone: true, + imports: [], + templateUrl: './email-verification.component.html', +}) +export class EmailVerificationComponent {} diff --git a/bizmatch/src/app/components/footer/footer.component.html b/bizmatch/src/app/components/footer/footer.component.html index 28ceb87..4d6f7fe 100644 --- a/bizmatch/src/app/components/footer/footer.component.html +++ b/bizmatch/src/app/components/footer/footer.component.html @@ -11,7 +11,7 @@
diff --git a/bizmatch/src/app/components/header/header.component.html b/bizmatch/src/app/components/header/header.component.html index ee22834..7943e2b 100644 --- a/bizmatch/src/app/components/header/header.component.html +++ b/bizmatch/src/app/components/header/header.component.html @@ -135,10 +135,10 @@