sanity-plugin-workflow 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.esm.js +1 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useWorkflowDocuments.tsx +6 -3
package/lib/index.esm.js
CHANGED
|
@@ -664,7 +664,7 @@ function filterItemsAndSort(items, stateId) {
|
|
|
664
664
|
return aOrderRank.localeCompare(bOrderRank);
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
|
-
const QUERY = groq(_templateObject || (_templateObject = _taggedTemplateLiteral(["*[_type == \"workflow.metadata\"]|order(orderRank){\n \"_metadata\": {\n _rev,\n assignees,\n documentId,\n state,\n orderRank\n }
|
|
667
|
+
const QUERY = groq(_templateObject || (_templateObject = _taggedTemplateLiteral(["*[_type == \"workflow.metadata\"]|order(orderRank){\n \"_metadata\": {\n _rev,\n assignees,\n documentId,\n state,\n orderRank,\n \"draftDocumentId\": \"drafts.\" + documentId,\n }\n}{\n ...,\n ...(\n *[_id == ^._metadata.documentId || _id == ^._metadata.draftDocumentId]|order(_updatedAt)[0]{ \n _id, \n _type, \n _rev, \n _updatedAt \n }\n )\n}"])));
|
|
668
668
|
function useWorkflowDocuments(schemaTypes) {
|
|
669
669
|
const toast = useToast();
|
|
670
670
|
const client = useClient({
|