Mail Modul überarbeitet, Korrekturen am PaymentService, neuer customerType seller
This commit is contained in:
@@ -11,7 +11,15 @@
|
||||
<app-tooltip id="tooltip-{{ name }}" [text]="validationMessage"></app-tooltip>
|
||||
}
|
||||
</label>
|
||||
<select [id]="name" [name]="name" [ngModel]="value" (change)="onSelectChange($event)" (blur)="onTouched()" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
|
||||
<select
|
||||
[disabled]="disabled"
|
||||
[id]="name"
|
||||
[name]="name"
|
||||
[ngModel]="value"
|
||||
(change)="onSelectChange($event)"
|
||||
(blur)="onTouched()"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500"
|
||||
>
|
||||
<option value="" disabled selected>Select an option</option>
|
||||
<option *ngFor="let option of options" [value]="option.value">
|
||||
{{ option.label }}
|
||||
|
||||
@@ -20,6 +20,7 @@ import { ValidationMessagesService } from '../validation-messages.service';
|
||||
})
|
||||
export class ValidatedSelectComponent extends BaseInputComponent {
|
||||
@Input() options: Array<{ value: any; label: string }> = [];
|
||||
@Input() disabled = false;
|
||||
@Output() valueChange = new EventEmitter<any>();
|
||||
|
||||
constructor(validationMessagesService: ValidationMessagesService) {
|
||||
|
||||
@@ -39,7 +39,7 @@ export class PricingComponent {
|
||||
await this.userService.save(user);
|
||||
this.router.navigate([`/account`]);
|
||||
} else {
|
||||
this.checkout({ priceId: atob(this.id), email: this.keycloakUser.email, name: `${this.keycloakUser.firstName} ${this.keycloakUser.lastName}` });
|
||||
this.checkout({ priceId: priceId, email: this.keycloakUser.email, name: `${this.keycloakUser.firstName} ${this.keycloakUser.lastName}` });
|
||||
}
|
||||
} else {
|
||||
if (priceId) {
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
|
||||
}@else{
|
||||
<app-validated-select label="Customer Type" name="customerType" [(ngModel)]="user.customerType" [options]="customerTypeOptions"></app-validated-select>
|
||||
<app-validated-select [disabled]="user.customerType === 'professional'" label="Customer Type" name="customerType" [(ngModel)]="user.customerType" [options]="customerTypeOptions"></app-validated-select>
|
||||
} @if (isProfessional){
|
||||
<!-- <div>
|
||||
<label for="customerSubType" class="block text-sm font-medium text-gray-700">Professional Type</label>
|
||||
@@ -86,7 +86,7 @@
|
||||
<option *ngFor="let subType of customerSubTypes" [value]="subType">{{ subType | titlecase }}</option>
|
||||
</select>
|
||||
</div> -->
|
||||
<app-validated-select label="Professional Type" name="customerSubType" [(ngModel)]="user.customerSubType" [options]="customerSubTypeOptions"></app-validated-select>
|
||||
<app-validated-select [disabled]="user.customerSubType === 'broker'" label="Professional Type" name="customerSubType" [(ngModel)]="user.customerSubType" [options]="customerSubTypeOptions"></app-validated-select>
|
||||
}
|
||||
</div>
|
||||
@if (isProfessional){
|
||||
@@ -246,39 +246,39 @@
|
||||
<div class="flex justify-start">
|
||||
<button routerLink="/pricing" class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">Upgrade Subscription Plan</button>
|
||||
</div>
|
||||
<!-- <div class="mt-8 sm:hidden">
|
||||
<div class="mt-8 sm:hidden">
|
||||
<h3 class="text-lg font-medium text-gray-700 mb-1">Membership Level</h3>
|
||||
<div class="space-y-2">
|
||||
@for (subscription of userSubscriptions; track userSubscriptions){
|
||||
@for (subscription of subscriptions; track subscriptions; let i=$index){
|
||||
<div class="bg-white shadow overflow-hidden sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:px-6">
|
||||
<dl class="grid grid-cols-1 gap-x-4 gap-y-2 sm:grid-cols-2">
|
||||
<div class="sm:col-span-1 flex">
|
||||
<dt class="text-sm font-bold text-gray-500 mr-2">Level</dt>
|
||||
<dd class="text-sm text-gray-900">{{ level }}</dd>
|
||||
<dd class="text-sm text-gray-900">{{ getLevel(i) }}</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-1 flex">
|
||||
<dt class="text-sm font-bold text-gray-500 mr-2">Start Date</dt>
|
||||
<dd class="text-sm text-gray-900">{{ subscription.start | date }}</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-1 flex">
|
||||
<dt class="text-sm font-bold text-gray-500 mr-2">Date Modified</dt>
|
||||
<dd class="text-sm text-gray-900">{{ subscription.modified | date }}</dd>
|
||||
<dd class="text-sm text-gray-900">{{ getStartDate(i) }}</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-1 flex">
|
||||
<dt class="text-sm font-bold text-gray-500 mr-2">End Date</dt>
|
||||
<dd class="text-sm text-gray-900">{{ subscription.end | date }}</dd>
|
||||
<dd class="text-sm text-gray-900">{{ getEndDate(i) }}</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-1 flex">
|
||||
<dt class="text-sm font-bold text-gray-500 mr-2">Next Settlement</dt>
|
||||
<dd class="text-sm text-gray-900">{{ getNextSettlement(i) }}</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-1 flex">
|
||||
<dt class="text-sm font-bold text-gray-500 mr-2">Status</dt>
|
||||
<dd class="text-sm text-gray-900">{{ subscription.status }}</dd>
|
||||
<dd class="text-sm text-gray-900">{{ getStatus(i) }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -67,8 +67,6 @@ export class AccountComponent {
|
||||
editorModules = TOOLBAR_OPTIONS;
|
||||
env = environment;
|
||||
faTrash = faTrash;
|
||||
customerTypes = ['buyer', 'professional'];
|
||||
customerSubTypes = ['broker', 'cpa', 'attorney', 'titleCompany', 'surveyor', 'appraiser'];
|
||||
quillModules = {
|
||||
toolbar: [['bold', 'italic', 'underline', 'strike'], [{ list: 'ordered' }, { list: 'bullet' }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], ['clean']],
|
||||
};
|
||||
@@ -116,15 +114,19 @@ export class AccountComponent {
|
||||
this.profileUrl = this.user.hasProfile ? `${this.env.imageBaseUrl}/pictures/profile/${emailToDirName(this.user.email)}.avif?_ts=${new Date().getTime()}` : `/assets/images/placeholder.png`;
|
||||
this.companyLogoUrl = this.user.hasCompanyLogo ? `${this.env.imageBaseUrl}/pictures/logo/${emailToDirName(this.user.email)}.avif?_ts=${new Date().getTime()}` : `/assets/images/placeholder.png`;
|
||||
|
||||
this.customerTypeOptions = this.customerTypes.map(type => ({
|
||||
value: type,
|
||||
label: this.titleCasePipe.transform(type),
|
||||
}));
|
||||
this.customerTypeOptions = this.selectOptions.customerTypes
|
||||
.filter(ct => ct.value === 'buyer' || ct.value === 'seller' || this.user.customerType === 'professional')
|
||||
.map(type => ({
|
||||
value: type.value,
|
||||
label: this.titleCasePipe.transform(type.name),
|
||||
}));
|
||||
|
||||
this.customerSubTypeOptions = this.customerSubTypes.map(type => ({
|
||||
value: type,
|
||||
label: this.titleCasePipe.transform(type),
|
||||
}));
|
||||
this.customerSubTypeOptions = this.selectOptions.customerSubTypes
|
||||
.filter(ct => ct.value !== 'broker' || this.user.customerSubType === 'broker')
|
||||
.map(type => ({
|
||||
value: type.value,
|
||||
label: this.titleCasePipe.transform(type.name),
|
||||
}));
|
||||
}
|
||||
ngOnDestroy() {
|
||||
this.validationMessagesService.clearMessages(); // Löschen Sie alle bestehenden Validierungsnachrichten
|
||||
|
||||
@@ -37,7 +37,7 @@ export class SuccessComponent {
|
||||
}
|
||||
|
||||
let attempts = 0;
|
||||
const maxAttempts = 5;
|
||||
const maxAttempts = 20;
|
||||
const interval = 5000; // 5 Sekunden
|
||||
|
||||
const intervalId = setInterval(async () => {
|
||||
|
||||
Reference in New Issue
Block a user