Refine content approval workflow rail

This commit is contained in:
2026-05-04 16:20:32 -04:00
parent 7d3f495472
commit 55d8acef4c
9 changed files with 505 additions and 587 deletions

View File

@@ -20,7 +20,6 @@ export const useContentItemDetailStore = defineStore('content-item-detail', () =
asset: false,
assetRevision: false,
comment: false,
approval: false,
decision: false,
status: false,
});
@@ -159,26 +158,6 @@ export const useContentItemDetailStore = defineStore('content-item-detail', () =
}
}
async function createApproval(contentItemId, payload) {
actions.approval = true;
try {
const response = await client.post('/api/approvals', {
...payload,
contentItemId,
workspaceId: workspaceStore.activeWorkspaceId,
});
if (response.data) {
approvals.value = [response.data, ...approvals.value];
await fetchContentItem(contentItemId);
await fetchNotifications(contentItemId);
}
return response.data;
} finally {
actions.approval = false;
}
}
async function submitDecision(contentItemId, approvalId, payload) {
actions.decision = true;
@@ -248,7 +227,6 @@ export const useContentItemDetailStore = defineStore('content-item-detail', () =
addAssetRevision,
addComment,
resolveComment,
createApproval,
submitDecision,
updateStatus,
};