Handle 2 workflows for 1 contenttype #30658
Draft
+1,808
−630
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes across multiple files to enhance the workflow actions, improve the UI, and update the service methods. The most important changes include the addition of new workflow action properties, the introduction of a new method to retrieve workflow actions, and UI improvements for inline messages and content information display.
Enhancements to Workflow Actions:
core-web/libs/dotcms-models/src/lib/dot-workflow-action.model.ts
: Added multiple new properties to theDotCMSWorkflowAction
interface, such ashasArchiveActionlet
,hasCommentActionlet
,hasDeleteActionlet
, and others. Introduced a new interfaceDotCMSWorkflowStep
to define the workflow steps. [1] [2]core-web/libs/data-access/src/lib/dot-workflows-actions/dot-workflows-actions.service.ts
: Added a new methodgetWorkFlowActions
to retrieve workflow actions for a given content type, including the scheme, action, and first step.UI Improvements:
core-web/libs/dotcms-scss/angular/dotcms-theme/components/messages/_message.scss
: Updated the styles for inline messages and regular messages, including changes to border-radius, background, and color properties. Added specific styles for different message types and a new layout for centered messages. [1] [2]core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-information/dot-edit-content-sidebar-information.component.html
: Enhanced the display of content information by adding conditional tooltips and handling cases where content is not yet created, modified, or published. [1] [2]Service and Component Updates:
core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.html
: Updated the template to conditionally display workflow actions based on theshowSelectWorkflowWarning
flag. [1] [2] [3]core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.spec.ts
: Added mock data and updated test cases to handle the newgetWorkFlowActions
method. [1] [2] [3] [4]core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-workflow/dot-edit-content-sidebar-workflow.component.html
: Added a link to select a workflow if none is selected and updated the display logic for workflow steps. [1] [2]Checklist
Additional Info
** any additional useful context or info **
Screenshots
CleanShot.2024-11-14.at.13.53.45.mp4
Action Button with the proper Actions
CleanShot.2024-11-14.at.23.29.35.mp4