diff --git a/bizmatch/src/app/components/image-cropper/image-cropper.component.html b/bizmatch/src/app/components/image-cropper/image-cropper.component.html
deleted file mode 100644
index ff40dc9..0000000
--- a/bizmatch/src/app/components/image-cropper/image-cropper.component.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
- @if(ratioVariable){
-
-
-
- } @else {
-
- }
-
-
-
-
diff --git a/bizmatch/src/app/components/image-cropper/image-cropper.component.scss b/bizmatch/src/app/components/image-cropper/image-cropper.component.scss
deleted file mode 100644
index 6363bda..0000000
--- a/bizmatch/src/app/components/image-cropper/image-cropper.component.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-::ng-deep p-selectbutton.small .p-button {
- font-size: 0.875rem;
- padding: 0.65625rem 1.09375rem;
-}
diff --git a/bizmatch/src/app/components/image-cropper/image-cropper.component.ts b/bizmatch/src/app/components/image-cropper/image-cropper.component.ts
deleted file mode 100644
index 29e91a6..0000000
--- a/bizmatch/src/app/components/image-cropper/image-cropper.component.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Component, ViewChild } from '@angular/core';
-import { AngularCropperjsModule, CropperComponent } from 'angular-cropperjs';
-import { KeyValueRatio } from '../../../../../bizmatch-server/src/models/main.model';
-import { ImageService } from '../../services/image.service';
-import { LoadingService } from '../../services/loading.service';
-import { SharedModule } from '../../shared/shared/shared.module';
-export const stateOptions: KeyValueRatio[] = [
- { label: '16/9', value: 16 / 9 },
- { label: '1/1', value: 1 },
- { label: 'Free', value: NaN },
-];
-@Component({
- selector: 'app-image-cropper',
- standalone: true,
- 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
- value: number = stateOptions[0].value;
- cropperConfig = { aspectRatio: this.value };
- ratioVariable: boolean;
- stateOptions = stateOptions;
- 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();
- // }
- changeAspectRation(ratio: number) {
- this.cropperConfig = { aspectRatio: ratio };
- this.angularCropper.cropper.setAspectRatio(ratio);
- }
-}
diff --git a/bizmatch/src/app/directives/mixed-cdk-drag-drop.directive.ts b/bizmatch/src/app/directives/mixed-cdk-drag-drop.directive.ts
deleted file mode 100644
index 47f48c0..0000000
--- a/bizmatch/src/app/directives/mixed-cdk-drag-drop.directive.ts
+++ /dev/null
@@ -1,197 +0,0 @@
-import { CdkDrag, CdkDragEnter, CdkDragSortEvent, CdkDropList, CdkDropListGroup, DropListOrientation, moveItemInArray } from '@angular/cdk/drag-drop';
-import { AfterViewInit, Directive, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, Self, SimpleChanges, SkipSelf } from '@angular/core';
-
-import { Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-export const autoScrollStep = 6;
-@Directive({
- selector: '[cdkDropListGroup][mixedCdkDragDrop]', // eslint-disable-line
-})
-export class MixedCdkDragDropDirective implements OnChanges, AfterViewInit, OnDestroy {
- /** @param {EventEmitter} dropped: emit previousIndex and currentIndex when dropList dropped. Valid when itemList is not being provided. **/
- @Output() readonly dropped = new EventEmitter<{ previousIndex: number; currentIndex: number }>();
-
- @Input() itemList: T[] | undefined;
- @Input() orientation: DropListOrientation = 'horizontal';
- @Input() containerSelector = '';
-
- private readonly _resizeDragItem = new Set();
-
- private targetIndex = -1;
- private sourceIndex = -1;
- private source: CdkDropList | undefined;
- private observer: ResizeObserver | undefined;
- private currentContentRect: DOMRectReadOnly | undefined;
- private animationFrame: number | undefined;
-
- constructor(public element: ElementRef, @Self() private cdkDropListGroup: CdkDropListGroup) {
- this.observer = new ResizeObserver((entries: Array) => {
- this.animationFrame = window.requestAnimationFrame(() => {
- if (entries.length) {
- const element = this.containerSelector ? entries[0] : entries.find((e: ResizeObserverEntry) => e.target === this.element.nativeElement);
- if (element) {
- this.currentContentRect = element.contentRect;
- for (let item of this._resizeDragItem) {
- item.onSizeChangeEmit(element.contentRect);
- }
- }
- }
- });
- });
- }
-
- ngAfterViewInit() {
- this.observeAll();
- }
-
- ngOnChanges(changes: SimpleChanges) {
- if (changes['orientation']) {
- this.cdkDropListGroup._items.forEach((i: CdkDropList) => {
- i.orientation = this.orientation;
- i.element.nativeElement.style.flexDirection = this.orientation === 'horizontal' ? 'row' : 'column';
- });
- }
- if (changes['containerSelector']) {
- this.observer?.disconnect();
- this.observeAll();
- }
- }
-
- addResizeDragItem(item: MixedCdkDragSizeHelperDirective) {
- this._resizeDragItem.add(item);
- if (this.currentContentRect) {
- item.onSizeChangeEmit(this.currentContentRect);
- }
- }
-
- deleteResizeDragItem(item: MixedCdkDragSizeHelperDirective) {
- this._resizeDragItem.delete(item);
- }
-
- onDropListDropped() {
- if (this.sourceIndex < 0 || this.targetIndex < 0) {
- return;
- }
- // if sourceIndex is before targetIndex then the real target should minus one, to remove the source placeholder which being counted.
- const target = this.targetIndex + (this.sourceIndex < this.targetIndex ? -1 : 0);
- if (this.sourceIndex !== this.targetIndex && target >= 0) {
- if (this.itemList) {
- moveItemInArray(this.itemList, this.sourceIndex, target);
- } else {
- this.dropped.emit({
- previousIndex: this.sourceIndex,
- currentIndex: target,
- });
- }
- this.sourceIndex = -1;
- this.targetIndex = -1;
- }
- // reset
- this.source = undefined;
- }
-
- onDropListEntered({ item, container, currentIndex }: CdkDragEnter | CdkDragSortEvent) {
- // dropList which the cdkDrag currently entered.
- const dropElement = container.element.nativeElement;
- // get all the dropList nodes in dropListGroup
- const dropListNodes = Array.from(dropElement.parentElement?.children ?? []);
- // dropList which the cdkDrag originally belonged.
- const sourceElement = item.dropContainer.element.nativeElement;
-
- // might enter multiple dropList after drag start, should only keep the index from the first time
- if (!this.source || this.sourceIndex === -1) {
- this.sourceIndex = dropListNodes.indexOf(sourceElement);
- this.source = item.dropContainer;
- }
- // target index should consider the currentIndex, which indicate drop before/after dropIndex (index of dropList which currently entered).
- this.targetIndex = dropListNodes.indexOf(dropElement) + currentIndex;
- }
-
- private observeAll() {
- if (this.containerSelector) {
- const el = document.querySelector(this.containerSelector);
- if (el) {
- this.observer?.observe(el);
- }
- } else {
- this.observer?.observe(this.element.nativeElement);
- }
- }
-
- ngOnDestroy() {
- this.observer?.disconnect();
- this.observer = undefined;
- this.currentContentRect = undefined;
- this._resizeDragItem.clear();
- if (this.animationFrame) {
- window.cancelAnimationFrame(this.animationFrame);
- }
- }
-}
-
-@Directive({
- selector: '[cdkDropList][mixedCdkDropList]', // eslint-disable-line
-})
-export class MixedCdkDropListDirective implements OnInit, OnDestroy {
- private lifecycleEmitter = new Subject();
-
- constructor(@Self() private cdkDropList: CdkDropList, @SkipSelf() private mixedDragDrop: MixedCdkDragDropDirective) {}
-
- ngOnInit() {
- this.cdkDropList.autoScrollStep = autoScrollStep;
- this.cdkDropList.orientation = this.mixedDragDrop.orientation;
- this.cdkDropList.element.nativeElement.style.flexDirection = this.mixedDragDrop.orientation === 'horizontal' ? 'row' : 'column';
- this.cdkDropList.element.nativeElement.style.display = 'flex';
- this.cdkDropList.element.nativeElement.style.flexWrap = 'nowrap';
- this.cdkDropList.element.nativeElement.style.width = 'fit-content';
- this.cdkDropList.element.nativeElement.style.height = 'fit-content';
- this.cdkDropList.sorted.pipe(takeUntil(this.lifecycleEmitter)).subscribe(event => this.mixedDragDrop.onDropListEntered(event));
- this.cdkDropList.entered.pipe(takeUntil(this.lifecycleEmitter)).subscribe(event => this.mixedDragDrop.onDropListEntered(event));
- this.cdkDropList.dropped.pipe(takeUntil(this.lifecycleEmitter)).subscribe(() => this.mixedDragDrop.onDropListDropped());
- }
-
- ngOnDestroy() {
- this.lifecycleEmitter.next();
- this.lifecycleEmitter.unsubscribe();
- }
-}
-
-@Directive({
- selector: '[cdkDrag][mixedCdkDragSizeHelper]', // eslint-disable-line
-})
-export class MixedCdkDragSizeHelperDirective implements AfterViewInit, OnDestroy {
- @Output() contentBoxSize = new EventEmitter<{
- drag: CdkDrag;
- containerSize: DOMRectReadOnly;
- }>();
-
- constructor(@Self() private cdkDrag: CdkDrag, @SkipSelf() private mixedContainer: MixedCdkDragDropDirective) {}
-
- ngAfterViewInit() {
- this.mixedContainer.addResizeDragItem(this);
- }
-
- ngOnDestroy() {
- this.mixedContainer.deleteResizeDragItem(this);
- }
-
- onSizeChangeEmit(rect: DOMRectReadOnly) {
- this.contentBoxSize?.emit({ drag: this.cdkDrag, containerSize: rect });
- }
-
- /** @param {drag: CdkDrag, containerSize: DOMRectReadOnly} event: contentSize observer event.
- * @param {number} percentWidth: set width to the percentage based on the dropListGroup Container width, valid from 0 to 100.
- * @param {number} percentHeight: set width to the percentage based on the dropListGroup Container width, valid from 0 to 100. **/
- static defaultEmitter(event: { drag: CdkDrag; containerSize: DOMRectReadOnly }, percentWidth: number, percentHeight: number) {
- if (percentWidth) {
- event.drag.element.nativeElement.style.width = `${(percentWidth * event.containerSize.width) / 100}px`;
- } else {
- event.drag.element.nativeElement.style.width = '';
- }
- if (percentHeight) {
- event.drag.element.nativeElement.style.height = `${(percentHeight * event.containerSize.height) / 100}px`;
- } else {
- event.drag.element.nativeElement.style.height = '';
- }
- }
-}
diff --git a/bizmatch/src/app/pages/details/details-user/details-user.component.html b/bizmatch/src/app/pages/details/details-user/details-user.component.html
index 31d6824..91eefd9 100644
--- a/bizmatch/src/app/pages/details/details-user/details-user.component.html
+++ b/bizmatch/src/app/pages/details/details-user/details-user.component.html
@@ -261,6 +261,8 @@
}
+ } @if( user?.email===keycloakUser?.email || isAdmin()){
+
}
diff --git a/bizmatch/src/app/pages/subscription/account/account.component.html b/bizmatch/src/app/pages/subscription/account/account.component.html
index 57da495..e65d748 100644
--- a/bizmatch/src/app/pages/subscription/account/account.component.html
+++ b/bizmatch/src/app/pages/subscription/account/account.component.html
@@ -1,3 +1,248 @@
+
+
+
+
+
+
+
Membership Level
+
+
+
+
+
+
+ | ID |
+ Level |
+ Start Date |
+ Date Modified |
+ End Date |
+ Status |
+
+
+
+
+ | 1 |
+ Business Broker |
+ May 24, 2024 |
+ May 24, 2024 |
+ Feb 12, 9999 |
+ active |
+
+
+
+
+
+
+
+
+
+
+
Membership Level
+
+
+
+
+
+
- ID
+ - 1
+
+
+
- Level
+ - Business Broker
+
+
+
- Start Date
+ - May 24, 2024
+
+
+
- Date Modified
+ - May 24, 2024
+
+
+
- End Date
+ - Feb 12, 9999
+
+
+
- Status
+ - active
+
+
+
+
+
+
+
+
+