This commit is contained in:
2024-08-15 12:36:54 +02:00
parent 7f756a71e8
commit 8c6c6e3dbd
8 changed files with 89 additions and 44 deletions

View File

@@ -101,9 +101,9 @@
<span class="bg-red-100 text-red-800 text-sm font-medium me-2 ml-2 px-2.5 py-0.5 rounded dark:bg-red-900 dark:text-red-300">Draft</span>
}
</h2>
<p class="text-sm text-gray-600 mb-1">Asking price: {{ listing.price | currency }}</p>
<p class="text-sm text-gray-600 mb-1">Sales revenue: {{ listing.salesRevenue | currency }}</p>
<p class="text-sm text-gray-600 mb-1">Net profit: {{ listing.cashFlow | currency }}</p>
<p class="text-sm text-gray-600 mb-1">Asking price: {{ listing.price | currency : 'USD' : 'symbol' : '1.0-0' }}</p>
<p class="text-sm text-gray-600 mb-1">Sales revenue: {{ listing.salesRevenue | currency : 'USD' : 'symbol' : '1.0-0' }}</p>
<p class="text-sm text-gray-600 mb-1">Net profit: {{ listing.cashFlow | currency : 'USD' : 'symbol' : '1.0-0' }}</p>
<p class="text-sm text-gray-600 mb-1">Location: {{ listing.location.name }} - {{ listing.location.state }}</p>
<p class="text-sm text-gray-600 mb-1">Established: {{ listing.established }}</p>
<img src="{{ env.imageBaseUrl }}/pictures/logo/{{ listing.imageName }}.avif?_ts={{ ts }}" alt="Company logo" class="absolute bottom-[70px] right-[30px] h-[35px] w-auto" />

View File

@@ -19,7 +19,7 @@
}
</h3>
<p class="text-gray-600 mb-2">{{ listing.location.name }}</p>
<p class="text-xl font-bold mb-4">{{ listing.price | currency }}</p>
<p class="text-xl font-bold mb-4">{{ listing.price | currency : 'USD' : 'symbol' : '1.0-0' }}</p>
<button [routerLink]="['/details-commercial-property-listing', listing.id]" class="bg-green-500 text-white px-4 py-2 rounded-full w-full hover:bg-green-600 transition duration-300">
View Full Listing <i class="fas fa-arrow-right ml-1"></i>
</button>

View File

@@ -129,15 +129,36 @@
<div class="flex mb-4 space-x-4">
<div class="flex items-center">
<input type="checkbox" id="realEstateIncluded" [(ngModel)]="listing.realEstateIncluded" (change)="onCheckboxChange('realEstateIncluded')" name="realEstateIncluded" class="mr-2" />
<input
type="checkbox"
id="realEstateIncluded"
[(ngModel)]="listing.realEstateIncluded"
(ngModelChange)="onCheckboxChange('realEstateIncluded', $event)"
name="realEstateIncluded"
class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 mr-2"
/>
<label for="realEstateIncluded" class="text-sm font-bold text-gray-700">Real Estate Included</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="leasedLocation" [(ngModel)]="listing.leasedLocation" (change)="onCheckboxChange('leasedLocation')" name="leasedLocation" class="mr-2" />
<input
type="checkbox"
id="leasedLocation"
[(ngModel)]="listing.leasedLocation"
(ngModelChange)="onCheckboxChange('leasedLocation', $event)"
name="leasedLocation"
class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 mr-2"
/>
<label for="leasedLocation" class="text-sm font-bold text-gray-700">Leased Location</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="franchiseResale" [(ngModel)]="listing.franchiseResale" (change)="onCheckboxChange('franchiseResale')" name="franchiseResale" class="mr-2" />
<input
type="checkbox"
id="franchiseResale"
[(ngModel)]="listing.franchiseResale"
(ngModelChange)="onCheckboxChange('franchiseResale', $event)"
name="franchiseResale"
class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 mr-2"
/>
<label for="franchiseResale" class="text-sm font-bold text-gray-700">Franchise Re-Sale</label>
</div>
</div>

View File

@@ -160,13 +160,13 @@ export class EditBusinessListingComponent {
}
target[keys[keys.length - 1]] = value;
}
onCheckboxChange(checkbox: string) {
onCheckboxChange(checkbox: string, value: boolean) {
// Deaktivieren Sie alle Checkboxes
this.listing.realEstateIncluded = false;
this.listing.leasedLocation = false;
this.listing.franchiseResale = false;
// Aktivieren Sie nur die aktuell ausgewählte Checkbox
this.listing[checkbox] = true;
this.listing[checkbox] = value;
}
}