From 79afd2f88846f518a456d164fd2b23a253a74372 Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Wed, 27 Nov 2024 12:38:40 -0400 Subject: [PATCH 01/14] chore(edit-content): UI with mock data #30515 --- .../dot-edit-content-field.component.html | 8 ++ .../dot-edit-content-field.component.ts | 37 ++--- .../components/dot-edit-content-form/utils.ts | 3 +- ...dot-select-existing-content.component.html | 89 ++++++++++++ ...dot-select-existing-content.component.scss | 20 +++ .../dot-select-existing-content.component.ts | 47 +++++++ .../store/existing-content.store.ts | 57 ++++++++ ...-content-relationship-field.component.html | 35 +++++ ...-content-relationship-field.component.scss | 24 ++++ ...it-content-relationship-field.component.ts | 129 ++++++++++++++++++ .../store/relationship-field.store.ts | 32 +++++ .../lib/models/dot-edit-content-field.enum.ts | 3 +- 12 files changed, 464 insertions(+), 20 deletions(-) create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.scss create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/store/existing-content.store.ts create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts diff --git a/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.html b/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.html index 84e0eeb93eb8..115d82c9bd5a 100644 --- a/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.html +++ b/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.html @@ -142,6 +142,14 @@ [field]="field" /> } } + @case (fieldTypes.RELATIONSHIP) { + @defer (on immediate) { + + } + } } @if (field.hint) { {{ field.hint }} diff --git a/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.ts b/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.ts index 511ad1382b37..86ffe887a20a 100644 --- a/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.ts +++ b/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.ts @@ -3,24 +3,25 @@ import { ControlContainer, ReactiveFormsModule } from '@angular/forms'; import { BlockEditorModule } from '@dotcms/block-editor'; import { DotCMSContentlet, DotCMSContentTypeField } from '@dotcms/dotcms-models'; +import { DotEditContentBinaryFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-binary-field/dot-edit-content-binary-field.component'; +import { DotEditContentCalendarFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-calendar-field/dot-edit-content-calendar-field.component'; +import { DotEditContentCategoryFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-category-field/dot-edit-content-category-field.component'; +import { DotEditContentCheckboxFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-checkbox-field/dot-edit-content-checkbox-field.component'; +import { DotEditContentCustomFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-custom-field/dot-edit-content-custom-field.component'; +import { DotEditContentFileFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-file-field/dot-edit-content-file-field.component'; +import { DotEditContentHostFolderFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-host-folder-field/dot-edit-content-host-folder-field.component'; +import { DotEditContentJsonFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-json-field/dot-edit-content-json-field.component'; +import { DotEditContentKeyValueComponent } from '@dotcms/edit-content/fields/dot-edit-content-key-value/dot-edit-content-key-value.component'; +import { DotEditContentMultiSelectFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-multi-select-field/dot-edit-content-multi-select-field.component'; +import { DotEditContentRadioFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-radio-field/dot-edit-content-radio-field.component'; +import { DotEditContentRelationshipFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component'; +import { DotEditContentSelectFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-select-field/dot-edit-content-select-field.component'; +import { DotEditContentTagFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-tag-field/dot-edit-content-tag-field.component'; +import { DotEditContentTextAreaComponent } from '@dotcms/edit-content/fields/dot-edit-content-text-area/dot-edit-content-text-area.component'; +import { DotEditContentTextFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-text-field/dot-edit-content-text-field.component'; +import { DotEditContentWYSIWYGFieldComponent } from '@dotcms/edit-content/fields/dot-edit-content-wysiwyg-field/dot-edit-content-wysiwyg-field.component'; import { DotFieldRequiredDirective } from '@dotcms/ui'; -import { DotEditContentBinaryFieldComponent } from '../../fields/dot-edit-content-binary-field/dot-edit-content-binary-field.component'; -import { DotEditContentCalendarFieldComponent } from '../../fields/dot-edit-content-calendar-field/dot-edit-content-calendar-field.component'; -import { DotEditContentCategoryFieldComponent } from '../../fields/dot-edit-content-category-field/dot-edit-content-category-field.component'; -import { DotEditContentCheckboxFieldComponent } from '../../fields/dot-edit-content-checkbox-field/dot-edit-content-checkbox-field.component'; -import { DotEditContentCustomFieldComponent } from '../../fields/dot-edit-content-custom-field/dot-edit-content-custom-field.component'; -import { DotEditContentFileFieldComponent } from '../../fields/dot-edit-content-file-field/dot-edit-content-file-field.component'; -import { DotEditContentHostFolderFieldComponent } from '../../fields/dot-edit-content-host-folder-field/dot-edit-content-host-folder-field.component'; -import { DotEditContentJsonFieldComponent } from '../../fields/dot-edit-content-json-field/dot-edit-content-json-field.component'; -import { DotEditContentKeyValueComponent } from '../../fields/dot-edit-content-key-value/dot-edit-content-key-value.component'; -import { DotEditContentMultiSelectFieldComponent } from '../../fields/dot-edit-content-multi-select-field/dot-edit-content-multi-select-field.component'; -import { DotEditContentRadioFieldComponent } from '../../fields/dot-edit-content-radio-field/dot-edit-content-radio-field.component'; -import { DotEditContentSelectFieldComponent } from '../../fields/dot-edit-content-select-field/dot-edit-content-select-field.component'; -import { DotEditContentTagFieldComponent } from '../../fields/dot-edit-content-tag-field/dot-edit-content-tag-field.component'; -import { DotEditContentTextAreaComponent } from '../../fields/dot-edit-content-text-area/dot-edit-content-text-area.component'; -import { DotEditContentTextFieldComponent } from '../../fields/dot-edit-content-text-field/dot-edit-content-text-field.component'; -import { DotEditContentWYSIWYGFieldComponent } from '../../fields/dot-edit-content-wysiwyg-field/dot-edit-content-wysiwyg-field.component'; import { CALENDAR_FIELD_TYPES } from '../../models/dot-edit-content-field.constant'; import { FIELD_TYPES } from '../../models/dot-edit-content-field.enum'; @@ -54,10 +55,10 @@ import { FIELD_TYPES } from '../../models/dot-edit-content-field.enum'; DotEditContentCategoryFieldComponent, DotFieldRequiredDirective, BlockEditorModule, - DotEditContentBinaryFieldComponent, DotEditContentKeyValueComponent, DotEditContentWYSIWYGFieldComponent, - DotEditContentFileFieldComponent + DotEditContentFileFieldComponent, + DotEditContentRelationshipFieldComponent ] }) export class DotEditContentFieldComponent { diff --git a/core-web/libs/edit-content/src/lib/components/dot-edit-content-form/utils.ts b/core-web/libs/edit-content/src/lib/components/dot-edit-content-form/utils.ts index 8a9d760c60af..d879cde01f78 100644 --- a/core-web/libs/edit-content/src/lib/components/dot-edit-content-form/utils.ts +++ b/core-web/libs/edit-content/src/lib/components/dot-edit-content-form/utils.ts @@ -62,5 +62,6 @@ export const resolutionValue: Record = { } return field.defaultValue ?? []; - } + }, + [FIELD_TYPES.RELATIONSHIP]: defaultResolutionFn }; diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html new file mode 100644 index 000000000000..a2ec2f8d40bb --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html @@ -0,0 +1,89 @@ +@let rowsPerPage = 25; +@let data = store.data(); + + + + +
+ + + + +
+
+ + + + + Title + + + + Step + + + + Description + + + + Last Update + + + Menu + + + + + +
+

Relate content by clicking on the Plus Button

+
+ + +
+ + + + + + +

{{ item.title }}

+ + {{ item.step }} + +

{{ item.description }}

+ + {{ item.lastUpdate }} + + + + +
+
+ + + + +
diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.scss b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.scss new file mode 100644 index 000000000000..1c8300c5b264 --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.scss @@ -0,0 +1,20 @@ +@use "variables" as *; + +::ng-deep { + p-table { + .p-datatable { + border: 1px solid $color-palette-gray-300; + border-radius: $border-radius-md; + .p-datatable-header { + background-color: $color-palette-gray-100; + } + } + } +} + +.existing-content__table_header { + th { + font-weight: $font-weight-bold; + background-color: $color-palette-gray-100; + } +} diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts new file mode 100644 index 000000000000..1905da478095 --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts @@ -0,0 +1,47 @@ +import { ChangeDetectionStrategy, Component, inject, model } from '@angular/core'; + +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { IconFieldModule } from 'primeng/iconfield'; +import { InputIconModule } from 'primeng/inputicon'; +import { InputTextModule } from 'primeng/inputtext'; +import { MenuModule } from 'primeng/menu'; +import { TableModule } from 'primeng/table'; + +import { DotMessagePipe } from '@dotcms/ui'; + +import { Content, ExistingContentStore } from './store/existing-content.store'; + +@Component({ + selector: 'dot-select-existing-content', + standalone: true, + imports: [ + TableModule, + ButtonModule, + MenuModule, + DotMessagePipe, + DialogModule, + IconFieldModule, + InputIconModule, + InputTextModule + ], + templateUrl: './dot-select-existing-content.component.html', + styleUrls: ['./dot-select-existing-content.component.scss'], + providers: [ExistingContentStore], + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class DotSelectExistingContentComponent { + /** + * A readonly instance of the ExistingContentStore injected into the component. + * This store is used to manage the state and actions related to the existing content. + */ + readonly store = inject(ExistingContentStore); + + $visible = model(false, { alias: 'visible' }); + + $selectedItems = model([]); + + closeDialog() { + this.$visible.set(false); + } +} diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/store/existing-content.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/store/existing-content.store.ts new file mode 100644 index 000000000000..b02e03714c93 --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/store/existing-content.store.ts @@ -0,0 +1,57 @@ +import { faker } from '@faker-js/faker'; +import { + patchState, + signalStore, + withComputed, + withHooks, + withMethods, + withState +} from '@ngrx/signals'; + +import { computed } from '@angular/core'; + +import { ComponentStatus } from '@dotcms/dotcms-models'; + +export interface Content { + id: string; + title: string; + step: string; + description: string; + lastUpdate: string; +} + +export interface ExistingContentState { + data: Content[]; + status: ComponentStatus; +} + +const initialState: ExistingContentState = { + data: [], + status: ComponentStatus.INIT +}; + +export const ExistingContentStore = signalStore( + withState(initialState), + withComputed((state) => ({ + isLoading: computed(() => state.status() === ComponentStatus.LOADING) + })), + withMethods((store) => ({ + loadContent() { + const mockData = Array.from({ length: 100 }, () => ({ + id: faker.string.uuid(), + title: faker.lorem.sentence(), + step: faker.helpers.arrayElement(['Draft', 'Published', 'Archived']), + description: faker.lorem.paragraph(), + lastUpdate: faker.date.recent().toISOString() + })); + patchState(store, { + data: mockData + }); + } + })), + withHooks({ + onInit: (store) => { + store.loadContent(); + } + }) +); diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html new file mode 100644 index 000000000000..911a7bb9dcad --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html @@ -0,0 +1,35 @@ + + + + + + Title + Language + State + + + + + +
+ +

Relate content by clicking on the Plus Button

+
+ + +
+ + + {{ item.title }} + {{ item.language }} + {{ item.state }} + + +
+ + diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss new file mode 100644 index 000000000000..5b8cb1ee787f --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss @@ -0,0 +1,24 @@ +@use "variables" as *; + +::ng-deep { + p-table { + .p-datatable { + border: 1px solid $color-palette-gray-300; + border-radius: $border-radius-md; + .p-datatable-header { + background-color: $color-palette-gray-100; + } + } + } +} +.add-item-btn { + position: absolute; + top: 0.4rem; + right: 0.4rem; +} +.relationship-field__table_header { + th { + font-weight: $font-weight-bold; + background-color: $color-palette-gray-100; + } +} diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts new file mode 100644 index 000000000000..6c60c2925d8f --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts @@ -0,0 +1,129 @@ +import { + ChangeDetectionStrategy, + Component, + DestroyRef, + forwardRef, + inject, + input, + signal +} from '@angular/core'; +import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; + +import { MenuItem } from 'primeng/api'; +import { ButtonModule } from 'primeng/button'; +import { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog'; +import { MenuModule } from 'primeng/menu'; +import { TableModule } from 'primeng/table'; + +import { DotMessageService } from '@dotcms/data-access'; +import { DotCMSContentTypeField } from '@dotcms/dotcms-models'; +import { DotSelectExistingContentComponent } from '@dotcms/edit-content/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component'; + +import { RelationshipFieldStore } from './store/relationship-field.store'; + +@Component({ + selector: 'dot-edit-content-relationship-field', + standalone: true, + imports: [TableModule, ButtonModule, MenuModule, DotSelectExistingContentComponent], + providers: [ + RelationshipFieldStore, + DialogService, + { + multi: true, + provide: NG_VALUE_ACCESSOR, + useExisting: forwardRef(() => DotEditContentRelationshipFieldComponent) + } + ], + templateUrl: './dot-edit-content-relationship-field.component.html', + styleUrls: ['./dot-edit-content-relationship-field.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class DotEditContentRelationshipFieldComponent implements ControlValueAccessor { + /** + * A readonly private field that injects the DotMessageService. + * This service is used for handling message-related functionalities within the component. + */ + readonly #dotMessageService = inject(DotMessageService); + /** + * A readonly private field that holds a reference to the `DestroyRef` service. + * This service is injected into the component to manage the destruction lifecycle. + */ + readonly #destroyRef = inject(DestroyRef); + /** + * A readonly private field that holds an instance of the DialogService. + * This service is injected using Angular's dependency injection mechanism. + * It is used to manage dialog interactions within the component. + */ + readonly #dialogService = inject(DialogService); + /** + * Reference to the dynamic dialog. It can be null if no dialog is currently open. + * + * @type {DynamicDialogRef | null} + */ + #dialogRef: DynamicDialogRef | null = null; + + $showExistingContentDialog = signal(false); + + private onChange: ((value: string) => void) | null = null; + private onTouched: (() => void) | null = null; + + $menuItems = signal([ + { + label: 'Existing Content', + command: () => { + this.$showExistingContentDialog.update((value) => !value); + } + }, + { + label: 'New Content', + command: () => { + // TODO: Implement new content + } + } + ]); + + /** + * A readonly instance of the RelationshipFieldStore injected into the component. + * This store is used to manage the state and actions related to the relationship field. + */ + readonly store = inject(RelationshipFieldStore); + + /** + * DotCMS Content Type Field + * + * @memberof DotEditContentFileFieldComponent + */ + $field = input.required({ alias: 'field' }); + + /** + * Set the value of the field. + * If the value is empty, nothing happens. + * If the value is not empty, the store is called to get the asset data. + * + * @param value the value to set + */ + writeValue(value: string): void { + if (!value) { + return; + } + } + /** + * Registers a callback function that is called when the control's value changes in the UI. + * This function is passed to the {@link NG_VALUE_ACCESSOR} token. + * + * @param fn The callback function to register. + */ + registerOnChange(fn: (value: string) => void) { + this.onChange = fn; + } + + /** + * Registers a callback function that is called when the control is marked as touched in the UI. + * This function is passed to the {@link NG_VALUE_ACCESSOR} token. + * + * @param fn The callback function to register. + */ + registerOnTouched(fn: () => void) { + this.onTouched = fn; + } +} diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts new file mode 100644 index 000000000000..4b44959c72a0 --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts @@ -0,0 +1,32 @@ +import { patchState, signalStore, withComputed, withMethods, withState } from '@ngrx/signals'; + +import { computed } from '@angular/core'; + +export interface RelationshipFieldItem { + id: string; + title: string; + language: string; + state: string; +} + +export interface RelationshipFieldState { + data: RelationshipFieldItem[]; +} + +const initialState: RelationshipFieldState = { + data: [] +}; + +export const RelationshipFieldStore = signalStore( + withState(initialState), + withComputed(({ data }) => ({ + data2: computed(() => data()) + })), + withMethods((store) => ({ + setData(data: RelationshipFieldItem[]) { + patchState(store, { + data + }); + } + })) +); diff --git a/core-web/libs/edit-content/src/lib/models/dot-edit-content-field.enum.ts b/core-web/libs/edit-content/src/lib/models/dot-edit-content-field.enum.ts index 2f071ef11027..c23acf2ec028 100644 --- a/core-web/libs/edit-content/src/lib/models/dot-edit-content-field.enum.ts +++ b/core-web/libs/edit-content/src/lib/models/dot-edit-content-field.enum.ts @@ -30,5 +30,6 @@ export enum FIELD_TYPES { TEXT = 'Text', TEXTAREA = 'Textarea', TIME = 'Time', - WYSIWYG = 'WYSIWYG' + WYSIWYG = 'WYSIWYG', + RELATIONSHIP = 'Relationship' } From 76e24292edd6eaeb3f82dd5420c6e5d692719ce9 Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Wed, 27 Nov 2024 13:56:08 -0400 Subject: [PATCH 02/14] chore(edit-content): add format date #30215 --- .../dot-select-existing-content.component.html | 5 ++--- .../dot-select-existing-content.component.ts | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html index a2ec2f8d40bb..caa5b0960fcc 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html @@ -4,7 +4,6 @@ @@ -12,7 +11,7 @@ #datatable [value]="data" selectionMode="multiple" - [(selection)]="$selectedItems" + [(selection)]="$selectedItems" [loading]="store.isLoading()" [paginator]="false" [rows]="rowsPerPage" @@ -75,7 +74,7 @@

{{ item.description }}

- {{ item.lastUpdate }} + {{ item.lastUpdate | date }} diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts index 1905da478095..f45a0c2f1819 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts @@ -1,3 +1,4 @@ +import { DatePipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, inject, model } from '@angular/core'; import { ButtonModule } from 'primeng/button'; @@ -23,7 +24,8 @@ import { Content, ExistingContentStore } from './store/existing-content.store'; DialogModule, IconFieldModule, InputIconModule, - InputTextModule + InputTextModule, + DatePipe ], templateUrl: './dot-select-existing-content.component.html', styleUrls: ['./dot-select-existing-content.component.scss'], From bf662294bc206bd9b030922bee65e4497d64c883 Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Thu, 28 Nov 2024 14:17:33 -0400 Subject: [PATCH 03/14] chore(edit-content): create mock data for relationships fields #30515 --- core-web/libs/dotcms-scss/shared/_colors.scss | 10 +++ .../pagination/pagination.component.html | 26 +++++++ .../pagination/pagination.component.ts | 33 +++++++++ .../components/search/search.compoment.html | 50 +++++++++++++ .../components/search/search.compoment.ts | 38 ++++++++++ ...dot-select-existing-content.component.html | 74 +++++++++++++------ ...dot-select-existing-content.component.scss | 30 +++++--- .../dot-select-existing-content.component.ts | 53 ++++++++++++- .../store/existing-content.store.ts | 37 +++++++++- ...-content-relationship-field.component.html | 10 +-- ...-content-relationship-field.component.scss | 2 +- ...it-content-relationship-field.component.ts | 56 ++++++++------ .../store/relationship-field.store.ts | 25 +++++-- .../WEB-INF/messages/Language.properties | 12 +++ 14 files changed, 383 insertions(+), 73 deletions(-) create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/pagination/pagination.component.html create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/pagination/pagination.component.ts create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.html create mode 100644 core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts diff --git a/core-web/libs/dotcms-scss/shared/_colors.scss b/core-web/libs/dotcms-scss/shared/_colors.scss index 441cea8acc30..5cc48cf300da 100644 --- a/core-web/libs/dotcms-scss/shared/_colors.scss +++ b/core-web/libs/dotcms-scss/shared/_colors.scss @@ -226,6 +226,16 @@ $success: $color-accessible-text-green; --color-palette-primary-800: hsl(var(--color-primary-h) var(--color-primary-s) 27%); --color-palette-primary-900: hsl(var(--color-primary-h) var(--color-primary-s) 21%); + --primary-100: hsl(var(--color-primary-h) var(--color-primary-s) 98%); + --primary-200: hsl(var(--color-primary-h) var(--color-primary-s) 96%); + --primary-300: hsl(var(--color-primary-h) var(--color-primary-s) 90%); + --primary-400: hsl(var(--color-primary-h) var(--color-primary-s) 78%); + --primary-500: hsl(var(--color-primary-h) var(--color-primary-s) 60%); + --primary-600: hsl(var(--color-primary-h) var(--color-primary-s) 48%); + --primary-700: hsl(var(--color-primary-h) var(--color-primary-s) 36%); + --primary-800: hsl(var(--color-primary-h) var(--color-primary-s) 27%); + --primary-900: hsl(var(--color-primary-h) var(--color-primary-s) 21%); + --color-palette-primary-op-10: hsla(var(--color-primary-h), var(--color-primary-s), 60%, 0.1); --color-palette-primary-op-20: hsla(var(--color-primary-h), var(--color-primary-s), 60%, 0.2); --color-palette-primary-op-30: hsla(var(--color-primary-h), var(--color-primary-s), 60%, 0.3); diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/pagination/pagination.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/pagination/pagination.component.html new file mode 100644 index 000000000000..1be37dd3eabb --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/pagination/pagination.component.html @@ -0,0 +1,26 @@ +@let currentPage = $currentPage(); +@let totalPages = $totalPages(); + +
+ + {{ currentPage }} of {{ totalPages }} + +
+ + +
+
diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/pagination/pagination.component.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/pagination/pagination.component.ts new file mode 100644 index 000000000000..bc683e77c09a --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/pagination/pagination.component.ts @@ -0,0 +1,33 @@ +import { Component, input, output } from '@angular/core'; + +import { ButtonModule } from 'primeng/button'; + +@Component({ + selector: 'dot-pagination', + standalone: true, + imports: [ButtonModule], + templateUrl: './pagination.component.html' +}) +export class PaginationComponent { + /** + * A signal that holds the total number of pages. + * It is used to display the total number of pages in the pagination component. + */ + $totalPages = input.required({ alias: 'totalPages' }); + + /** + * A signal that holds the current page number. + * It is used to display the current page number in the pagination component. + */ + $currentPage = input.required({ alias: 'currentPage' }); + + /** + * An output signal that emits when the previous page button is clicked. + */ + previousPage = output(); + + /** + * An output signal that emits when the next page button is clicked. + */ + nextPage = output(); +} diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.html new file mode 100644 index 000000000000..afb2448dd39a --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.html @@ -0,0 +1,50 @@ + + + + + + +
+
+
+ + + +
+ +
+ + + +
+
+
+
diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts new file mode 100644 index 000000000000..a4453fabc3b5 --- /dev/null +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts @@ -0,0 +1,38 @@ +import { Component, inject, output } from '@angular/core'; +import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; + +import { ButtonModule } from 'primeng/button'; +import { DropdownModule } from 'primeng/dropdown'; +import { InputGroupModule } from 'primeng/inputgroup'; +import { InputTextModule } from 'primeng/inputtext'; +import { OverlayPanelModule } from 'primeng/overlaypanel'; + +import { DotMessagePipe } from '@dotcms/ui'; + +@Component({ + selector: 'dot-search', + standalone: true, + imports: [ + InputTextModule, + ButtonModule, + InputGroupModule, + OverlayPanelModule, + DotMessagePipe, + DropdownModule, + ReactiveFormsModule + ], + templateUrl: './search.compoment.html' +}) +export class SearchComponent { + /** + * An output signal that emits when the search input is changed. + */ + onSearch = output(); + + readonly #formBuilder = inject(FormBuilder); + + form = this.#formBuilder.group({ + language: [''], + site: [''] + }); +} diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html index caa5b0960fcc..b415e1157b63 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html @@ -1,38 +1,51 @@ -@let rowsPerPage = 25; @let data = store.data(); +@let pagination = store.pagination(); + appendTo="body" + width="90%" + [style]="{ width: '90%', 'max-width': '1040px' }"> + [paginator]="true" + [rows]="pagination.rowsPerPage" + [globalFilterFields]="['title', 'step', 'description']" + styleClass="p-datatable-sm p-datatable-existing-content"> -
- - - - +
+
+
+ +
+
+

+ {{ + 'dot.file.relationship.dialog.per.page' + | dm: [pagination.rowsPerPage.toString()] + }} +

+
+
+
+ +
- + Title @@ -76,13 +89,30 @@ {{ item.lastUpdate | date }} - + - - +
+
+

+ {{ + 'dot.file.relationship.dialog.selected.items' + | dm: [$selectedItems().length.toString()] + }} +

+
+
+ + +
+
diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.scss b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.scss index 1c8300c5b264..c34af3986231 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.scss +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.scss @@ -2,19 +2,27 @@ ::ng-deep { p-table { - .p-datatable { - border: 1px solid $color-palette-gray-300; - border-radius: $border-radius-md; + .p-datatable-sm.p-datatable-existing-content { .p-datatable-header { - background-color: $color-palette-gray-100; + background-color: $white; + border: 0px; + padding-left: 0px; + padding-right: 0px; + } + .p-datatable-table { + border: 1px solid $color-palette-gray-300; + border-radius: $border-radius-md; + overflow: hidden; + } + .p-datatable-thead { + th { + font-weight: $font-weight-bold; + background-color: $color-palette-gray-100; + } + } + .p-inputtext { + height: auto; } } } } - -.existing-content__table_header { - th { - font-weight: $font-weight-bold; - background-color: $color-palette-gray-100; - } -} diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts index f45a0c2f1819..bb471f25be86 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts @@ -1,16 +1,21 @@ import { DatePipe } from '@angular/common'; -import { ChangeDetectionStrategy, Component, inject, model } from '@angular/core'; +import { ChangeDetectionStrategy, Component, computed, inject, model } from '@angular/core'; import { ButtonModule } from 'primeng/button'; import { DialogModule } from 'primeng/dialog'; import { IconFieldModule } from 'primeng/iconfield'; +import { InputGroupModule } from 'primeng/inputgroup'; import { InputIconModule } from 'primeng/inputicon'; import { InputTextModule } from 'primeng/inputtext'; import { MenuModule } from 'primeng/menu'; +import { OverlayPanelModule } from 'primeng/overlaypanel'; import { TableModule } from 'primeng/table'; +import { DotMessageService } from '@dotcms/data-access'; import { DotMessagePipe } from '@dotcms/ui'; +import { PaginationComponent } from './components/pagination/pagination.component'; +import { SearchComponent } from './components/search/search.compoment'; import { Content, ExistingContentStore } from './store/existing-content.store'; @Component({ @@ -25,7 +30,11 @@ import { Content, ExistingContentStore } from './store/existing-content.store'; IconFieldModule, InputIconModule, InputTextModule, - DatePipe + DatePipe, + PaginationComponent, + InputGroupModule, + OverlayPanelModule, + SearchComponent ], templateUrl: './dot-select-existing-content.component.html', styleUrls: ['./dot-select-existing-content.component.scss'], @@ -39,10 +48,50 @@ export class DotSelectExistingContentComponent { */ readonly store = inject(ExistingContentStore); + /** + * A readonly instance of the DotMessageService injected into the component. + * This service is used to get localized messages. + */ + readonly #dotMessage = inject(DotMessageService); + + /** + * A signal that controls the visibility of the existing content dialog. + * When true, the dialog is shown allowing users to select existing content. + * When false, the dialog is hidden. + */ $visible = model(false, { alias: 'visible' }); + /** + * A signal that holds the selected items. + * It is used to store the selected content items. + */ $selectedItems = model([]); + /** + * A computed signal that determines if the apply button is disabled. + * It is disabled when no items are selected. + */ + $isApplyDisabled = computed(() => this.$selectedItems().length === 0); + + /** + * A computed signal that determines the label for the apply button. + * It is used to display the appropriate message based on the number of selected items. + */ + $applyLabel = computed(() => { + const selectedItems = this.$selectedItems(); + + const messageKey = + selectedItems.length === 1 + ? 'dot.file.relationship.dialog.apply.one.entry' + : 'dot.file.relationship.dialog.apply.entries'; + + return this.#dotMessage.get(messageKey, selectedItems.length.toString()); + }); + + /** + * A method that closes the existing content dialog. + * It sets the visibility signal to false, hiding the dialog. + */ closeDialog() { this.$visible.set(false); } diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/store/existing-content.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/store/existing-content.store.ts index b02e03714c93..88ff348283d2 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/store/existing-content.store.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/store/existing-content.store.ts @@ -23,17 +23,32 @@ export interface Content { export interface ExistingContentState { data: Content[]; status: ComponentStatus; + pagination: { + offset: number; + currentPage: number; + rowsPerPage: number; + }; } const initialState: ExistingContentState = { data: [], - status: ComponentStatus.INIT + status: ComponentStatus.INIT, + pagination: { + offset: 0, + currentPage: 1, + rowsPerPage: 50 + } }; +/** + * Store for the ExistingContent component. + * This store manages the state and actions related to the existing content. + */ export const ExistingContentStore = signalStore( withState(initialState), withComputed((state) => ({ - isLoading: computed(() => state.status() === ComponentStatus.LOADING) + isLoading: computed(() => state.status() === ComponentStatus.LOADING), + totalPages: computed(() => Math.ceil(state.data().length / state.pagination().rowsPerPage)) })), withMethods((store) => ({ loadContent() { @@ -47,6 +62,24 @@ export const ExistingContentStore = signalStore( patchState(store, { data: mockData }); + }, + nextPage() { + patchState(store, { + pagination: { + ...store.pagination(), + offset: store.pagination().offset + store.pagination().rowsPerPage, + currentPage: store.pagination().currentPage + 1 + } + }); + }, + previousPage() { + patchState(store, { + pagination: { + ...store.pagination(), + offset: store.pagination().offset - store.pagination().rowsPerPage, + currentPage: store.pagination().currentPage - 1 + } + }); } })), withHooks({ diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html index 911a7bb9dcad..2765413c48cb 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html @@ -1,4 +1,4 @@ - + - Title - Language - State + {{ 'dot.file.relationship.field.table.title' | dm }} + {{ 'dot.file.relationship.field.table.language' | dm }} + {{ 'dot.file.relationship.field.table.state' | dm }} @@ -18,7 +18,7 @@
-

Relate content by clicking on the Plus Button

+

{{ 'dot.file.relationship.field.empty.message' | dm }}

diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss index 5b8cb1ee787f..82bedffdcf4a 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss @@ -2,7 +2,7 @@ ::ng-deep { p-table { - .p-datatable { + .p-datatable-relationship { border: 1px solid $color-palette-gray-300; border-radius: $border-radius-md; .p-datatable-header { diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts index 6c60c2925d8f..a11efaa55429 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts @@ -1,7 +1,6 @@ import { ChangeDetectionStrategy, Component, - DestroyRef, forwardRef, inject, input, @@ -11,20 +10,27 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { MenuItem } from 'primeng/api'; import { ButtonModule } from 'primeng/button'; -import { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog'; +import { DialogService } from 'primeng/dynamicdialog'; import { MenuModule } from 'primeng/menu'; import { TableModule } from 'primeng/table'; import { DotMessageService } from '@dotcms/data-access'; import { DotCMSContentTypeField } from '@dotcms/dotcms-models'; import { DotSelectExistingContentComponent } from '@dotcms/edit-content/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component'; +import { DotMessagePipe } from '@dotcms/ui'; import { RelationshipFieldStore } from './store/relationship-field.store'; @Component({ selector: 'dot-edit-content-relationship-field', standalone: true, - imports: [TableModule, ButtonModule, MenuModule, DotSelectExistingContentComponent], + imports: [ + TableModule, + ButtonModule, + MenuModule, + DotSelectExistingContentComponent, + DotMessagePipe + ], providers: [ RelationshipFieldStore, DialogService, @@ -44,38 +50,29 @@ export class DotEditContentRelationshipFieldComponent implements ControlValueAcc * This service is used for handling message-related functionalities within the component. */ readonly #dotMessageService = inject(DotMessageService); + /** - * A readonly private field that holds a reference to the `DestroyRef` service. - * This service is injected into the component to manage the destruction lifecycle. - */ - readonly #destroyRef = inject(DestroyRef); - /** - * A readonly private field that holds an instance of the DialogService. - * This service is injected using Angular's dependency injection mechanism. - * It is used to manage dialog interactions within the component. + * A signal that controls the visibility of the existing content dialog. + * When true, the dialog is shown allowing users to select existing content. + * When false, the dialog is hidden. */ - readonly #dialogService = inject(DialogService); - /** - * Reference to the dynamic dialog. It can be null if no dialog is currently open. - * - * @type {DynamicDialogRef | null} - */ - #dialogRef: DynamicDialogRef | null = null; - $showExistingContentDialog = signal(false); - private onChange: ((value: string) => void) | null = null; - private onTouched: (() => void) | null = null; - + /** + * A signal that holds the menu items for the relationship field. + * These items control the visibility of the existing content dialog and the creation of new content. + */ $menuItems = signal([ { - label: 'Existing Content', + label: this.#dotMessageService.get( + 'dot.file.relationship.field.table.existing.content' + ), command: () => { this.$showExistingContentDialog.update((value) => !value); } }, { - label: 'New Content', + label: this.#dotMessageService.get('dot.file.relationship.field.table.new.content'), command: () => { // TODO: Implement new content } @@ -126,4 +123,15 @@ export class DotEditContentRelationshipFieldComponent implements ControlValueAcc registerOnTouched(fn: () => void) { this.onTouched = fn; } + + /** + * A callback function that is called when the value of the field changes. + * It is used to update the value of the field in the parent component. + */ + private onChange: ((value: string) => void) | null = null; + + /** + * A callback function that is called when the field is touched. + */ + private onTouched: (() => void) | null = null; } diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts index 4b44959c72a0..b7d0440cf54e 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts @@ -1,6 +1,6 @@ -import { patchState, signalStore, withComputed, withMethods, withState } from '@ngrx/signals'; +import { patchState, signalStore, withMethods, withState } from '@ngrx/signals'; -import { computed } from '@angular/core'; +import { ComponentStatus } from '@dotcms/dotcms-models'; export interface RelationshipFieldItem { id: string; @@ -11,17 +11,30 @@ export interface RelationshipFieldItem { export interface RelationshipFieldState { data: RelationshipFieldItem[]; + status: ComponentStatus; + pagination: { + offset: number; + currentPage: number; + rowsPerPage: number; + }; } const initialState: RelationshipFieldState = { - data: [] + data: [], + status: ComponentStatus.INIT, + pagination: { + offset: 0, + currentPage: 1, + rowsPerPage: 10 + } }; +/** + * Store for the RelationshipField component. + * This store manages the state and actions related to the relationship field. + */ export const RelationshipFieldStore = signalStore( withState(initialState), - withComputed(({ data }) => ({ - data2: computed(() => data()) - })), withMethods((store) => ({ setData(data: RelationshipFieldItem[]) { patchState(store, { diff --git a/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties b/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties index b9bb8ab55baf..3bcd36a3b631 100644 --- a/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties +++ b/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties @@ -1219,6 +1219,18 @@ dot.file.field.file.dimension=Dimension dot.file.field.file.bytes=Bytes dot.file.field.import.from.url.error.file.not.supported.message=This type of file is not supported, Please import a {0} file. dot.file.field.no.link.found=No link found +dot.file.relationship.dialog.select.existing.content=Select Existing Content +dot.file.relationship.dialog.per.page={0} per page +dot.file.relationship.dialog.selected.items=Selected {0} items +dot.file.relationship.dialog.apply.one.entry=Apply 1 entry +dot.file.relationship.dialog.apply.entries=Apply {0} entries +dot.file.relationship.field.empty.message=Relate content by clicking on the Plus Button +dot.file.relationship.field.table.title=Title +dot.file.relationship.field.table.language=Language +dot.file.relationship.field.table.state=State +dot.file.relationship.field.table.existing.content=Existing Content +dot.file.relationship.field.table.new.content=New Content +dot.file.relationship.dialog.search=Search dot.common.apply=Apply dot.common.archived=Archived dot.common.cancel=Cancel From 4e3dd970bf52f49ee69f357c2a25388b92dd674d Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Thu, 28 Nov 2024 14:23:38 -0400 Subject: [PATCH 04/14] chore(edit-content): fix sonar issue #30515 --- .../dot-select-existing-content.component.html | 12 ++++++------ ...ot-edit-content-relationship-field.component.html | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html index b415e1157b63..0d942a65b77d 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html @@ -46,24 +46,24 @@
- - + + Title - + Step - + Description - + Last Update - Menu + Menu diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html index 2765413c48cb..f8c09e9d590d 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html @@ -8,9 +8,9 @@ icon="pi pi-plus" [text]="true" /> - {{ 'dot.file.relationship.field.table.title' | dm }} - {{ 'dot.file.relationship.field.table.language' | dm }} - {{ 'dot.file.relationship.field.table.state' | dm }} + {{ 'dot.file.relationship.field.table.title' | dm }} + {{ 'dot.file.relationship.field.table.language' | dm }} + {{ 'dot.file.relationship.field.table.state' | dm }} From df02687ffefe7b293e72dad920d08fd5e8d9267f Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Fri, 29 Nov 2024 11:28:15 -0400 Subject: [PATCH 05/14] chore(edit-content): fix unit tests errors #30215 --- .../src/lib/dot-content-types.model.ts | 1 + .../dot-edit-content-field.component.spec.ts | 4 +++ .../libs/edit-content/src/lib/utils/mocks.ts | 33 ++++++++++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/core-web/libs/dotcms-models/src/lib/dot-content-types.model.ts b/core-web/libs/dotcms-models/src/lib/dot-content-types.model.ts index a56a1895e959..6534e53ba2a7 100644 --- a/core-web/libs/dotcms-models/src/lib/dot-content-types.model.ts +++ b/core-web/libs/dotcms-models/src/lib/dot-content-types.model.ts @@ -61,6 +61,7 @@ export interface DotCMSContentTypeField { variable: string; forceIncludeInApi?: boolean; fieldContentTypeProperties?: string[]; + skipRelationshipCreation?: boolean; metadata?: { [key: string]: string | number | boolean }; } diff --git a/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.spec.ts b/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.spec.ts index 9b8ab39beb1d..874b2ba95039 100644 --- a/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.spec.ts +++ b/core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.spec.ts @@ -34,6 +34,7 @@ import { DotEditContentJsonFieldComponent } from '../../fields/dot-edit-content- import { DotEditContentKeyValueComponent } from '../../fields/dot-edit-content-key-value/dot-edit-content-key-value.component'; import { DotEditContentMultiSelectFieldComponent } from '../../fields/dot-edit-content-multi-select-field/dot-edit-content-multi-select-field.component'; import { DotEditContentRadioFieldComponent } from '../../fields/dot-edit-content-radio-field/dot-edit-content-radio-field.component'; +import { DotEditContentRelationshipFieldComponent } from '../../fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component'; import { DotEditContentSelectFieldComponent } from '../../fields/dot-edit-content-select-field/dot-edit-content-select-field.component'; import { DotEditContentTagFieldComponent } from '../../fields/dot-edit-content-tag-field/dot-edit-content-tag-field.component'; import { DotEditContentTextAreaComponent } from '../../fields/dot-edit-content-text-area/dot-edit-content-text-area.component'; @@ -73,6 +74,9 @@ declare module '@tiptap/core' { const FIELD_TYPES_COMPONENTS: Record | DotEditFieldTestBed> = { // We had to use unknown because components have different types. [FIELD_TYPES.TEXT]: DotEditContentTextFieldComponent, + [FIELD_TYPES.RELATIONSHIP]: { + component: DotEditContentRelationshipFieldComponent + }, [FIELD_TYPES.FILE]: { component: DotEditContentFileFieldComponent, providers: [ diff --git a/core-web/libs/edit-content/src/lib/utils/mocks.ts b/core-web/libs/edit-content/src/lib/utils/mocks.ts index 036abef0a68c..94bb16290940 100644 --- a/core-web/libs/edit-content/src/lib/utils/mocks.ts +++ b/core-web/libs/edit-content/src/lib/utils/mocks.ts @@ -537,6 +537,36 @@ export const FILE_FIELD_MOCK: DotCMSContentTypeField = { hint: 'Helper label to be displayed below the field' }; +export const RELATIONSHIP_FIELD_MOCK: DotCMSContentTypeField = { + clazz: 'com.dotcms.contenttype.model.field.ImmutableRelationshipField', + contentTypeId: 'd68af52828a53805a1716e68cd902560', + dataType: 'SYSTEM', + fieldType: 'Relationship', + fieldTypeLabel: 'Relationships Field', + fieldVariables: [], + fixed: false, + forceIncludeInApi: false, + iDate: 1732655273000, + id: '306fe444c1ae1fd063c02d8812903fc9', + indexed: true, + listed: false, + modDate: 1732660181000, + name: 'Relationship Field', + readOnly: false, + relationships: { + cardinality: 0, + isParentField: true, + velocityVar: 'AllTypes' + }, + required: false, + searchable: false, + skipRelationshipCreation: false, + sortOrder: 6, + unique: false, + variable: 'relationshipField', + hint: 'Helper label to be displayed below the field' +}; + export const CUSTOM_FIELD_MOCK: DotCMSContentTypeField = { id: '64d5c84f04df900c79a94e087c6fed05', clazz: 'com.dotcms.contenttype.model.field.ImmutableCustomField', @@ -734,7 +764,8 @@ export const FIELDS_MOCK: DotCMSContentTypeField[] = [ HOST_FOLDER_TEXT_MOCK, CATEGORY_MOCK, CONSTANT_FIELD_MOCK, - HIDDEN_FIELD_MOCK + HIDDEN_FIELD_MOCK, + RELATIONSHIP_FIELD_MOCK ]; export const FIELD_MOCK: DotCMSContentTypeField = TEXT_FIELD_MOCK; From c5fa1469f6d6a7eaf83341992826b527c4a77367 Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Fri, 29 Nov 2024 11:37:27 -0400 Subject: [PATCH 06/14] chore(edit-content): fix colors #30515 --- core-web/libs/dotcms-scss/shared/_colors.scss | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/core-web/libs/dotcms-scss/shared/_colors.scss b/core-web/libs/dotcms-scss/shared/_colors.scss index 5cc48cf300da..a97692781437 100644 --- a/core-web/libs/dotcms-scss/shared/_colors.scss +++ b/core-web/libs/dotcms-scss/shared/_colors.scss @@ -226,17 +226,17 @@ $success: $color-accessible-text-green; --color-palette-primary-800: hsl(var(--color-primary-h) var(--color-primary-s) 27%); --color-palette-primary-900: hsl(var(--color-primary-h) var(--color-primary-s) 21%); - --primary-100: hsl(var(--color-primary-h) var(--color-primary-s) 98%); - --primary-200: hsl(var(--color-primary-h) var(--color-primary-s) 96%); - --primary-300: hsl(var(--color-primary-h) var(--color-primary-s) 90%); - --primary-400: hsl(var(--color-primary-h) var(--color-primary-s) 78%); - --primary-500: hsl(var(--color-primary-h) var(--color-primary-s) 60%); - --primary-600: hsl(var(--color-primary-h) var(--color-primary-s) 48%); - --primary-700: hsl(var(--color-primary-h) var(--color-primary-s) 36%); - --primary-800: hsl(var(--color-primary-h) var(--color-primary-s) 27%); - --primary-900: hsl(var(--color-primary-h) var(--color-primary-s) 21%); - - --color-palette-primary-op-10: hsla(var(--color-primary-h), var(--color-primary-s), 60%, 0.1); + --primary-100: var(--color-palette-primary-100); + --primary-200: var(--color-palette-primary-200); + --primary-300: var(--color-palette-primary-300); + --primary-400: var(--color-palette-primary-400); + --primary-500: var(--color-palette-primary-500); + --primary-600: var(--color-palette-primary-600); + --primary-700: var(--color-palette-primary-700); + --primary-800: var(--color-palette-primary-800); + --primary-900: var(--color-palette-primary-900); + + --color-palette-primary-op-10: var(--color-palette-primary-op-10); --color-palette-primary-op-20: hsla(var(--color-primary-h), var(--color-primary-s), 60%, 0.2); --color-palette-primary-op-30: hsla(var(--color-primary-h), var(--color-primary-s), 60%, 0.3); --color-palette-primary-op-40: hsla(var(--color-primary-h), var(--color-primary-s), 60%, 0.4); From 4667c163b4bca7d31aaaf60285cd3b6a70021573 Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Tue, 3 Dec 2024 04:24:20 -0400 Subject: [PATCH 07/14] chore(edit-content): add js docs #30515 --- .../components/search/search.compoment.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts index a4453fabc3b5..d20bccecec11 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts @@ -28,10 +28,16 @@ export class SearchComponent { * An output signal that emits when the search input is changed. */ onSearch = output(); - + + /** + * Injects FormBuilder to create form control groups. + */ readonly #formBuilder = inject(FormBuilder); - form = this.#formBuilder.group({ + /** + * Initializes the form group with default values for language and site. + */ + readonly form = this.#formBuilder.group({ language: [''], site: [''] }); From 6184a7954642f3b8c550fce917724b81ed261510 Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Tue, 3 Dec 2024 04:47:55 -0400 Subject: [PATCH 08/14] chore(edit-content): apply format #30515 --- .../components/search/search.compoment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts index d20bccecec11..6a64d8187821 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.ts @@ -28,7 +28,7 @@ export class SearchComponent { * An output signal that emits when the search input is changed. */ onSearch = output(); - + /** * Injects FormBuilder to create form control groups. */ From df7b58a231c3a551a8f84fc6ebd71201e43f9cb5 Mon Sep 17 00:00:00 2001 From: Victor Alfaro Date: Tue, 3 Dec 2024 13:11:37 -0600 Subject: [PATCH 09/14] test --- .github/workflows/cicd_comp_test-phase.yml | 1 + e2e/dotcms-e2e-node/frontend/.env | 2 +- e2e/dotcms-e2e-node/frontend/.env.ci | 3 ++- e2e/dotcms-e2e-node/frontend/playwright.config.ts | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd_comp_test-phase.yml b/.github/workflows/cicd_comp_test-phase.yml index a588be0db236..c1659008426b 100644 --- a/.github/workflows/cicd_comp_test-phase.yml +++ b/.github/workflows/cicd_comp_test-phase.yml @@ -235,6 +235,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: ./.github/actions/core-cicd/maven-job with: stage-name: "E2E ${{ matrix.suites.name }}" diff --git a/e2e/dotcms-e2e-node/frontend/.env b/e2e/dotcms-e2e-node/frontend/.env index e5fb472550f5..c729f1757d3f 100644 --- a/e2e/dotcms-e2e-node/frontend/.env +++ b/e2e/dotcms-e2e-node/frontend/.env @@ -3,9 +3,9 @@ DEV=false BASE_URL=http://localhost:8080 HEADLESS=false RETRIES=0 +WORKERS=1 REUSE_SERVER=false INCLUDE_HTML=true USERNAME=admin@dotcms.com PASSWORD=admin - diff --git a/e2e/dotcms-e2e-node/frontend/.env.ci b/e2e/dotcms-e2e-node/frontend/.env.ci index 18974e89fee2..eb1568c7dbf5 100644 --- a/e2e/dotcms-e2e-node/frontend/.env.ci +++ b/e2e/dotcms-e2e-node/frontend/.env.ci @@ -1,5 +1,6 @@ CI=true HEADLESS=true -RETRIES=1 +RETRIES=3 +WORKERS=4 INCLUDE_HTML=false REUSE_SERVER=true \ No newline at end of file diff --git a/e2e/dotcms-e2e-node/frontend/playwright.config.ts b/e2e/dotcms-e2e-node/frontend/playwright.config.ts index d2594862903d..e8fe9a16c19e 100644 --- a/e2e/dotcms-e2e-node/frontend/playwright.config.ts +++ b/e2e/dotcms-e2e-node/frontend/playwright.config.ts @@ -49,7 +49,7 @@ export default defineConfig({ /* Retry on CI only */ retries: parseInt(process.env.RETRIES), /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 1 : undefined, + workers: parseInt(process.env.WORKERS), /* Reporter to use. See https://playwright.dev/docs/test-reporters */ timeout: 30000, From 1b3f48f59da90bda4be04feff27b14f4e3e378e4 Mon Sep 17 00:00:00 2001 From: Victor Alfaro Date: Tue, 3 Dec 2024 13:21:16 -0600 Subject: [PATCH 10/14] test --- e2e/dotcms-e2e-node/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e2e/dotcms-e2e-node/pom.xml b/e2e/dotcms-e2e-node/pom.xml index 4a8a74cc34c8..e9da1222d8e5 100644 --- a/e2e/dotcms-e2e-node/pom.xml +++ b/e2e/dotcms-e2e-node/pom.xml @@ -40,6 +40,7 @@ true 8080 false + https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/empty_20241105/starter-empty_20241105.zip @@ -187,6 +188,7 @@ http://wm:8080/i http://wm:8080/e http://wm:8080/m + ${custom.starter.url} wiremock:wm From 62b304dafde4ba330a62da428e2b7ada299071cf Mon Sep 17 00:00:00 2001 From: Victor Alfaro Date: Tue, 3 Dec 2024 13:27:37 -0600 Subject: [PATCH 11/14] test --- .github/workflows/cicd_comp_test-phase.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cicd_comp_test-phase.yml b/.github/workflows/cicd_comp_test-phase.yml index c1659008426b..a588be0db236 100644 --- a/.github/workflows/cicd_comp_test-phase.yml +++ b/.github/workflows/cicd_comp_test-phase.yml @@ -235,7 +235,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: ./.github/actions/core-cicd/maven-job with: stage-name: "E2E ${{ matrix.suites.name }}" From a9bd60cedba2b60e25f11b783216cc7f43fe3dce Mon Sep 17 00:00:00 2001 From: Victor Alfaro Date: Tue, 3 Dec 2024 14:48:35 -0600 Subject: [PATCH 12/14] test --- e2e/dotcms-e2e-node/frontend/.env | 1 + e2e/dotcms-e2e-node/frontend/.env.ci | 5 +++-- e2e/dotcms-e2e-node/frontend/playwright.config.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/e2e/dotcms-e2e-node/frontend/.env b/e2e/dotcms-e2e-node/frontend/.env index c729f1757d3f..b22c6c4ee1de 100644 --- a/e2e/dotcms-e2e-node/frontend/.env +++ b/e2e/dotcms-e2e-node/frontend/.env @@ -6,6 +6,7 @@ RETRIES=0 WORKERS=1 REUSE_SERVER=false INCLUDE_HTML=true +TIMEOUT=30000 USERNAME=admin@dotcms.com PASSWORD=admin diff --git a/e2e/dotcms-e2e-node/frontend/.env.ci b/e2e/dotcms-e2e-node/frontend/.env.ci index eb1568c7dbf5..d54a9e1af657 100644 --- a/e2e/dotcms-e2e-node/frontend/.env.ci +++ b/e2e/dotcms-e2e-node/frontend/.env.ci @@ -1,6 +1,7 @@ CI=true HEADLESS=true -RETRIES=3 +RETRIES=2 WORKERS=4 INCLUDE_HTML=false -REUSE_SERVER=true \ No newline at end of file +REUSE_SERVER=true +TIMEOUT=60000 diff --git a/e2e/dotcms-e2e-node/frontend/playwright.config.ts b/e2e/dotcms-e2e-node/frontend/playwright.config.ts index e8fe9a16c19e..9c8061750876 100644 --- a/e2e/dotcms-e2e-node/frontend/playwright.config.ts +++ b/e2e/dotcms-e2e-node/frontend/playwright.config.ts @@ -51,7 +51,7 @@ export default defineConfig({ /* Opt out of parallel tests on CI. */ workers: parseInt(process.env.WORKERS), /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - timeout: 30000, + timeout: parseInt(process.env.TIMEOUT), reporter, /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ From d2233a9d721ffd8ec8822a711aca314122b4d587 Mon Sep 17 00:00:00 2001 From: Victor Alfaro Date: Tue, 3 Dec 2024 15:23:26 -0600 Subject: [PATCH 13/14] test --- .github/workflows/cicd_comp_test-phase.yml | 3 ++- e2e/dotcms-e2e-node/frontend/.env.ci | 1 - e2e/dotcms-e2e-node/pom.xml | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cicd_comp_test-phase.yml b/.github/workflows/cicd_comp_test-phase.yml index a588be0db236..87da71560423 100644 --- a/.github/workflows/cicd_comp_test-phase.yml +++ b/.github/workflows/cicd_comp_test-phase.yml @@ -173,6 +173,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: ./.github/actions/core-cicd/maven-job - uses: ./.github/actions/core-cicd/maven-job with: stage-name: "Postman ${{ matrix.collection_group }}" @@ -238,7 +239,7 @@ jobs: - uses: ./.github/actions/core-cicd/maven-job with: stage-name: "E2E ${{ matrix.suites.name }}" - maven-args: "verify -Pcoverage -De2e.test.skip=false ${{ matrix.suites.maven_args}}" + maven-args: "verify -De2e.test.skip=false ${{ matrix.suites.maven_args}}" generates-test-results: true dotcms-license: ${{ secrets.DOTCMS_LICENSE }} requires-node: true diff --git a/e2e/dotcms-e2e-node/frontend/.env.ci b/e2e/dotcms-e2e-node/frontend/.env.ci index d54a9e1af657..0f3e46ff37d7 100644 --- a/e2e/dotcms-e2e-node/frontend/.env.ci +++ b/e2e/dotcms-e2e-node/frontend/.env.ci @@ -4,4 +4,3 @@ RETRIES=2 WORKERS=4 INCLUDE_HTML=false REUSE_SERVER=true -TIMEOUT=60000 diff --git a/e2e/dotcms-e2e-node/pom.xml b/e2e/dotcms-e2e-node/pom.xml index e9da1222d8e5..4a8a74cc34c8 100644 --- a/e2e/dotcms-e2e-node/pom.xml +++ b/e2e/dotcms-e2e-node/pom.xml @@ -40,7 +40,6 @@ true 8080 false - https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/empty_20241105/starter-empty_20241105.zip @@ -188,7 +187,6 @@ http://wm:8080/i http://wm:8080/e http://wm:8080/m - ${custom.starter.url} wiremock:wm From 8d66fc02904ecb436492f8782d9ccffe1437d0cd Mon Sep 17 00:00:00 2001 From: Victor Alfaro Date: Tue, 3 Dec 2024 15:44:26 -0600 Subject: [PATCH 14/14] test --- .github/workflows/cicd_comp_test-phase.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cicd_comp_test-phase.yml b/.github/workflows/cicd_comp_test-phase.yml index 87da71560423..3befcf64ffa2 100644 --- a/.github/workflows/cicd_comp_test-phase.yml +++ b/.github/workflows/cicd_comp_test-phase.yml @@ -173,7 +173,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: ./.github/actions/core-cicd/maven-job - uses: ./.github/actions/core-cicd/maven-job with: stage-name: "Postman ${{ matrix.collection_group }}"