Update Angular 18, ng-select, quill editor, ngx-currency, Umbau business-detail, edit-business, commercial-lsitings, remove ng-prime
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import { ListingsService } from '../../../services/listings.service';
|
||||
@@ -11,17 +11,12 @@ import { AngularCropperjsModule } from 'angular-cropperjs';
|
||||
import { MixedCdkDragDropModule } from 'angular-mixed-cdk-drag-drop';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
import { QuillModule } from 'ngx-quill';
|
||||
import { ConfirmationService, MessageService } from 'primeng/api';
|
||||
import { CarouselModule } from 'primeng/carousel';
|
||||
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
||||
import { DialogModule } from 'primeng/dialog';
|
||||
import { DialogService, DynamicDialogModule, DynamicDialogRef } from 'primeng/dynamicdialog';
|
||||
import { EditorModule } from 'primeng/editor';
|
||||
import { FileUpload, FileUploadModule } from 'primeng/fileupload';
|
||||
|
||||
import { NgSelectModule } from '@ng-select/ng-select';
|
||||
import { NgxCurrencyDirective } from 'ngx-currency';
|
||||
import { BusinessListing, CommercialPropertyListing, User } from '../../../../../../bizmatch-server/src/models/db.model';
|
||||
import { AutoCompleteCompleteEvent, ImageProperty, emailToDirName } from '../../../../../../bizmatch-server/src/models/main.model';
|
||||
import { environment } from '../../../../environments/environment';
|
||||
import { InputNumberModule } from '../../../components/inputnumber/inputnumber.component';
|
||||
import { ArrayToStringPipe } from '../../../pipes/array-to-string.pipe';
|
||||
import { GeoService } from '../../../services/geo.service';
|
||||
import { ImageService } from '../../../services/image.service';
|
||||
@@ -32,27 +27,12 @@ import { TOOLBAR_OPTIONS } from '../../utils/defaults';
|
||||
@Component({
|
||||
selector: 'business-listing',
|
||||
standalone: true,
|
||||
imports: [
|
||||
SharedModule,
|
||||
ArrayToStringPipe,
|
||||
InputNumberModule,
|
||||
CarouselModule,
|
||||
DialogModule,
|
||||
AngularCropperjsModule,
|
||||
FileUploadModule,
|
||||
EditorModule,
|
||||
DynamicDialogModule,
|
||||
DragDropModule,
|
||||
ConfirmDialogModule,
|
||||
MixedCdkDragDropModule,
|
||||
QuillModule,
|
||||
],
|
||||
providers: [MessageService, DialogService, ConfirmationService],
|
||||
imports: [SharedModule, ArrayToStringPipe, AngularCropperjsModule, DragDropModule, MixedCdkDragDropModule, QuillModule, NgxCurrencyDirective, NgSelectModule],
|
||||
providers: [],
|
||||
templateUrl: './edit-business-listing.component.html',
|
||||
styleUrl: './edit-business-listing.component.scss',
|
||||
})
|
||||
export class EditBusinessListingComponent {
|
||||
@ViewChild(FileUpload) public fileUpload: FileUpload;
|
||||
listingsCategory = 'business';
|
||||
category: string;
|
||||
location: string;
|
||||
@@ -82,7 +62,6 @@ export class EditBusinessListingComponent {
|
||||
];
|
||||
config = { aspectRatio: 16 / 9 };
|
||||
editorModules = TOOLBAR_OPTIONS;
|
||||
dialogRef: DynamicDialogRef | undefined;
|
||||
draggedImage: ImageProperty;
|
||||
faTrash = faTrash;
|
||||
data: CommercialPropertyListing;
|
||||
@@ -96,12 +75,10 @@ export class EditBusinessListingComponent {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private listingsService: ListingsService,
|
||||
public userService: UserService,
|
||||
private messageService: MessageService,
|
||||
private geoService: GeoService,
|
||||
private imageService: ImageService,
|
||||
private loadingService: LoadingService,
|
||||
public dialogService: DialogService,
|
||||
private confirmationService: ConfirmationService,
|
||||
|
||||
private route: ActivatedRoute,
|
||||
private keycloakService: KeycloakService,
|
||||
) {
|
||||
@@ -139,7 +116,7 @@ export class EditBusinessListingComponent {
|
||||
async save() {
|
||||
this.listing = await this.listingsService.save(this.listing, this.listing.listingsCategory);
|
||||
this.router.navigate(['editBusinessListing', this.listing.id]);
|
||||
this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'Listing changes have been persisted', life: 3000 });
|
||||
// this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'Listing changes have been persisted', life: 3000 });
|
||||
}
|
||||
|
||||
suggestions: string[] | undefined;
|
||||
|
||||
Reference in New Issue
Block a user