Update Angular 18, ng-select, quill editor, ngx-currency, Umbau business-detail, edit-business, commercial-lsitings, remove ng-prime

This commit is contained in:
2024-07-04 17:51:35 +02:00
parent 9228cbebbe
commit 5fa2dd60fa
49 changed files with 356 additions and 2972 deletions

View File

@@ -1,8 +1,5 @@
import { Component, ViewChild } from '@angular/core';
import { AngularCropperjsModule, CropperComponent } from 'angular-cropperjs';
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
import { FileUpload, FileUploadModule } from 'primeng/fileupload';
import { SelectButtonModule } from 'primeng/selectbutton';
import { KeyValueRatio } from '../../../../../bizmatch-server/src/models/main.model';
import { ImageService } from '../../services/image.service';
import { LoadingService } from '../../services/loading.service';
@@ -15,36 +12,35 @@ export const stateOptions: KeyValueRatio[] = [
@Component({
selector: 'app-image-cropper',
standalone: true,
imports: [SharedModule, FileUploadModule, AngularCropperjsModule, SelectButtonModule],
imports: [SharedModule, AngularCropperjsModule],
templateUrl: './image-cropper.component.html',
styleUrl: './image-cropper.component.scss',
})
export class ImageCropperComponent {
@ViewChild(CropperComponent) public angularCropper: CropperComponent;
imageUrl: string; //wird im Template verwendet
fileUpload: FileUpload;
value: number = stateOptions[0].value;
cropperConfig = { aspectRatio: this.value };
ratioVariable: boolean;
stateOptions = stateOptions;
constructor(private loadingService: LoadingService, private imageUploadService: ImageService, public config: DynamicDialogConfig, public ref: DynamicDialogRef) {}
ngOnInit(): void {
if (this.config.data) {
this.imageUrl = this.config.data.imageUrl;
this.fileUpload = this.config.data.fileUpload;
this.cropperConfig = this.config.data.config ? this.config.data.config : this.cropperConfig;
this.ratioVariable = this.config.data.ratioVariable;
}
}
sendImage() {
this.fileUpload.clear();
this.ref.close(this.angularCropper.cropper);
}
constructor(private loadingService: LoadingService, private imageUploadService: ImageService) {}
// ngOnInit(): void {
// if (this.config.data) {
// this.imageUrl = this.config.data.imageUrl;
// this.fileUpload = this.config.data.fileUpload;
// this.cropperConfig = this.config.data.config ? this.config.data.config : this.cropperConfig;
// this.ratioVariable = this.config.data.ratioVariable;
// }
// }
// sendImage() {
// this.fileUpload.clear();
// this.ref.close(this.angularCropper.cropper);
// }
cancelUpload() {
this.fileUpload.clear();
this.ref.close();
}
// cancelUpload() {
// this.fileUpload.clear();
// this.ref.close();
// }
changeAspectRation(ratio: number) {
this.cropperConfig = { aspectRatio: ratio };
this.angularCropper.cropper.setAspectRatio(ratio);