https://github.com/dennissnijder/payload-workflow
A workflow plugin for Payload CMS
https://github.com/dennissnijder/payload-workflow
payload-plugin payloadcms workflow-tool
Last synced: 10 months ago
JSON representation
A workflow plugin for Payload CMS
- Host: GitHub
- URL: https://github.com/dennissnijder/payload-workflow
- Owner: DennisSnijder
- Created: 2023-06-30T21:46:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-05T15:10:20.000Z (over 2 years ago)
- Last Synced: 2024-10-18T20:46:14.076Z (over 1 year ago)
- Topics: payload-plugin, payloadcms, workflow-tool
- Language: TypeScript
- Homepage: https://github.com/DennisSnijder/payload-workflow
- Size: 2.65 MB
- Stars: 68
- Watchers: 4
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Payload workflow plugin
> **Note**
> This plugin is currently under active development and still in an early stage.
> Check the [roadmap](#roadmap) below in this readme for more details / upcoming features.

## Installation
The most recent version of payload-workflow currently only supports Payload 2.0 and up.
For older payload versions, please use `payload-workflow@0.2.0`
```shell
$ yarn add payload-workflow
```
## Basic usage
```typescript
import { payloadWorkflow } from 'payload-workflow';
const config = buildConfig({
collections: [ ... ],
plugins: [
payloadWorkflow({
'my-collection-slug': {
statuses: [
{value: 'draft', label: 'Draft'},
{value: 'in-progress', label: 'In Progress'},
{value: 'ready-for-review', label: 'Ready for review'},
{value: 'published', label: 'Published'},
],
defaultStatus: 'draft',
hideNoStatusColumn: false
}
})
],
});
```
## Differences with the draft/publish system of Payload.
The workflow plugin introduces a new field called `workflowStatus`. This field does not interact with the draft/publish
system of Payload.
You can "integrate" the workflow status with the draft/publish system of Payload yourself by
using [Payloads hooks](https://payloadcms.com/docs/hooks/overview).
For example: Automatically publish the document when the `workflowStatus` has been changed to `published`.
Roadmap
Upcoming Features / Ideas. Have a suggestion for the plugin? Feel free to open an issue or contribute!
- [X] Payload 2.0 support
- [ ] Customize card properties (currently displays `title` and `createdAt`)
- [ ] Edit relationships directly from the card (e.g., assigning users to a document)
- [X] Toggleable column for posts without a workflow status (Currently, documents lacking `workflowStatus` aren't
visible on the board)
- [ ] Lazy loading of column contents when scrolling (Currently, board only shows `defaultLimit` amount of cards)
- [ ] Permissions for changing statuses
- [ ] Allowed transitions between statuses
- [ ] Integration with the draft/publish system of Payload (?)