validatedCity, mask for input, confirmatonService, Version Info,
This commit is contained in:
@@ -115,9 +115,10 @@
|
||||
<label for="companyLocation" class="block text-sm font-medium text-gray-700">Company Location</label>
|
||||
<input type="text" id="companyLocation" name="companyLocation" [(ngModel)]="user.companyLocation" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500" />
|
||||
</div> -->
|
||||
<app-validated-input label="Your Phone Number" name="phoneNumber" [(ngModel)]="user.phoneNumber"></app-validated-input>
|
||||
<app-validated-input label="Your Phone Number" name="phoneNumber" [(ngModel)]="user.phoneNumber" mask="(000) 000-0000"></app-validated-input>
|
||||
<app-validated-input label="Company Website" name="companyWebsite" [(ngModel)]="user.companyWebsite"></app-validated-input>
|
||||
<app-validated-input label="Company Location" name="companyLocation" [(ngModel)]="user.companyLocation"></app-validated-input>
|
||||
<!-- <app-validated-input label="Company Location" name="companyLocation" [(ngModel)]="user.companyLocation"></app-validated-input> -->
|
||||
<app-validated-city label="Company Location" name="companyLocation" [(ngModel)]="user.companyLocation"></app-validated-city>
|
||||
</div>
|
||||
|
||||
<!-- <div>
|
||||
|
||||
@@ -18,6 +18,7 @@ import { ImageCropAndUploadComponent, UploadReponse } from '../../../components/
|
||||
import { MessageComponent } from '../../../components/message/message.component';
|
||||
import { MessageService } from '../../../components/message/message.service';
|
||||
import { TooltipComponent } from '../../../components/tooltip/tooltip.component';
|
||||
import { ValidatedCityComponent } from '../../../components/validated-city/validated-city.component';
|
||||
import { ValidatedInputComponent } from '../../../components/validated-input/validated-input.component';
|
||||
import { ValidatedQuillComponent } from '../../../components/validated-quill/validated-quill.component';
|
||||
import { ValidatedSelectComponent } from '../../../components/validated-select/validated-select.component';
|
||||
@@ -47,6 +48,7 @@ import { TOOLBAR_OPTIONS } from '../../utils/defaults';
|
||||
ValidatedInputComponent,
|
||||
ValidatedSelectComponent,
|
||||
ValidatedQuillComponent,
|
||||
ValidatedCityComponent,
|
||||
TooltipComponent,
|
||||
],
|
||||
providers: [TitleCasePipe],
|
||||
@@ -167,7 +169,7 @@ export class AccountComponent {
|
||||
|
||||
async search(event: AutoCompleteCompleteEvent) {
|
||||
const result = await lastValueFrom(this.geoService.findCitiesStartingWith(event.query));
|
||||
this.suggestions = result.map(r => `${r.city} - ${r.state_code}`).slice(0, 5);
|
||||
this.suggestions = result.map(r => `${r.city} - ${r.state}`).slice(0, 5);
|
||||
}
|
||||
addLicence() {
|
||||
this.user.licensedIn.push({ registerNo: '', state: '' });
|
||||
@@ -204,7 +206,7 @@ export class AccountComponent {
|
||||
}
|
||||
}
|
||||
async deleteConfirm(type: 'profile' | 'logo') {
|
||||
const confirmed = await this.confirmationService.showConfirmation(`Do you want to delete your ${type === 'logo' ? 'Logo' : 'Profile'} image`);
|
||||
const confirmed = await this.confirmationService.showConfirmation({ message: `Do you want to delete your ${type === 'logo' ? 'Logo' : 'Profile'} image` });
|
||||
if (confirmed) {
|
||||
if (type === 'profile') {
|
||||
this.user.hasProfile = false;
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</div>
|
||||
</div>
|
||||
} -->
|
||||
<app-drag-drop-mixed [listing]="listing" (imageOrderChanged)="imageOrderChanged($event)" (imageToDelete)="deleteConfirm($event)"></app-drag-drop-mixed>
|
||||
<app-drag-drop-mixed [listing]="listing" [ts]="ts" (imageOrderChanged)="imageOrderChanged($event)" (imageToDelete)="deleteConfirm($event)"></app-drag-drop-mixed>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
@if (mode!=='create'){
|
||||
|
||||
@@ -102,7 +102,6 @@ export class EditCommercialPropertyListingComponent {
|
||||
showModal = false;
|
||||
imageChangedEvent: any = '';
|
||||
croppedImage: Blob | null = null;
|
||||
|
||||
constructor(
|
||||
public selectOptions: SelectOptionsService,
|
||||
private router: Router,
|
||||
@@ -197,28 +196,24 @@ export class EditCommercialPropertyListingComponent {
|
||||
this.showModal = false;
|
||||
}
|
||||
|
||||
uploadImage() {
|
||||
async uploadImage() {
|
||||
if (this.croppedImage) {
|
||||
this.imageService.uploadImage(this.croppedImage, 'uploadPropertyPicture', this.listing.imagePath, this.listing.serialId).subscribe(
|
||||
async () => {
|
||||
this.listing = (await lastValueFrom(this.listingsService.getListingById(this.id, 'commercialProperty'))) as CommercialPropertyListing;
|
||||
this.closeModal();
|
||||
},
|
||||
error => {
|
||||
console.error('Upload failed', error);
|
||||
},
|
||||
);
|
||||
await this.imageService.uploadImage(this.croppedImage, 'uploadPropertyPicture', this.listing.imagePath, this.listing.serialId);
|
||||
this.ts = new Date().getTime();
|
||||
this.closeModal();
|
||||
this.listing = (await lastValueFrom(this.listingsService.getListingById(this.id, 'commercialProperty'))) as CommercialPropertyListing;
|
||||
}
|
||||
}
|
||||
|
||||
async deleteConfirm(imageName: string) {
|
||||
const confirmed = await this.confirmationService.showConfirmation('Are you sure you want to delete this image?');
|
||||
const confirmed = await this.confirmationService.showConfirmation({ message: 'Are you sure you want to delete this image?' });
|
||||
if (confirmed) {
|
||||
this.listing.imageOrder = this.listing.imageOrder.filter(item => item !== imageName);
|
||||
await this.imageService.deleteListingImage(this.listing.imagePath, this.listing.serialId, imageName);
|
||||
await this.listingsService.save(this.listing, 'commercialProperty');
|
||||
this.listing = (await lastValueFrom(this.listingsService.getListingById(this.id, 'commercialProperty'))) as CommercialPropertyListing;
|
||||
this.messageService.addMessage({ severity: 'success', text: 'Image has been deleted', duration: 3000 });
|
||||
this.ts = new Date().getTime();
|
||||
} else {
|
||||
console.log('deny');
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export class EmailUsComponent {
|
||||
this.keycloakUser = map2User(token);
|
||||
if (this.keycloakUser) {
|
||||
this.user = await this.userService.getByMail(this.keycloakUser.email);
|
||||
this.mailinfo.sender = { name: `${this.user.firstname} ${this.user.lastname}`, email: this.user.email, phoneNumber: this.user.phoneNumber, state: this.user.companyLocation };
|
||||
this.mailinfo.sender = { name: `${this.user.firstname} ${this.user.lastname}`, email: this.user.email, phoneNumber: this.user.phoneNumber, state: this.user.companyLocation.state };
|
||||
}
|
||||
}
|
||||
ngOnDestroy() {
|
||||
|
||||
@@ -54,7 +54,7 @@ export class MyListingComponent {
|
||||
}
|
||||
|
||||
async confirm(listing: ListingType) {
|
||||
const confirmed = await this.confirmationService.showConfirmation(`Are you sure you want to delete this listing?`);
|
||||
const confirmed = await this.confirmationService.showConfirmation({ message: `Are you sure you want to delete this listing?` });
|
||||
if (confirmed) {
|
||||
// this.messageService.showMessage('Listing has been deleted');
|
||||
this.deleteListing(listing);
|
||||
|
||||
Reference in New Issue
Block a user