Ticket Fixing: #111, #110, #108 (SortBy)

This commit is contained in:
2024-09-09 17:35:08 +02:00
parent 9ecc0c2429
commit 06d83a478d
23 changed files with 308 additions and 70 deletions

View File

@@ -33,9 +33,11 @@
</li>
</ul>
</div>
@if(!pricingOverview){
<div class="px-6 py-4 mt-auto">
<button (click)="register()" class="w-full bg-blue-500 text-white rounded-full px-4 py-2 font-semibold hover:bg-blue-600 transition duration-300">Sign Up Now</button>
</div>
}
</div>
}
@@ -79,9 +81,11 @@
</li>
</ul>
</div>
@if(!pricingOverview){
<div class="px-6 py-4 mt-auto">
<button (click)="register('price_1PpSkpDjmFBOcNBs9UDPgBos')" class="w-full bg-blue-500 text-white rounded-full px-4 py-2 font-semibold hover:bg-blue-600 transition duration-300">Get Started</button>
</div>
}
</div>
<!-- Business Broker Plan -->
@@ -128,9 +132,11 @@
</li>
</ul>
</div>
@if(!pricingOverview){
<div class="px-6 py-4 mt-auto">
<button (click)="register('price_1PpSmRDjmFBOcNBsaaSp2nk9')" class="w-full bg-blue-500 text-white rounded-full px-4 py-2 font-semibold hover:bg-blue-600 transition duration-300">Start Listing Now</button>
</div>
}
</div>
</div>

View File

@@ -21,6 +21,7 @@ import { map2User } from '../../utils/utils';
export class PricingComponent {
private apiBaseUrl = environment.apiBaseUrl;
private id: string | undefined = this.activatedRoute.snapshot.params['id'] as string | undefined;
pricingOverview: boolean | undefined = this.activatedRoute.snapshot.data['pricingOverview'] as boolean | undefined;
keycloakUser: KeycloakUser;
user: User;
constructor(public keycloakService: KeycloakService, private http: HttpClient, private stripeService: StripeService, private activatedRoute: ActivatedRoute, private userService: UserService, private router: Router) {}
@@ -36,12 +37,14 @@ export class PricingComponent {
this.router.navigate([`/account`]);
} else if (this.id) {
this.checkout({ priceId: atob(this.id), email: this.keycloakUser.email, name: `${this.keycloakUser.firstName} ${this.keycloakUser.lastName}` });
} else if (!this.id) {
} else if (!this.id && !this.pricingOverview) {
this.user = await this.userService.getByMail(this.keycloakUser.email);
if (this.user.subscriptionId) {
this.router.navigate([`/account`]);
}
}
} else {
this.pricingOverview = false;
}
}