useSpecMatching
Spec matching management composable.
Import
typescript
const {
matches,
isLoading,
fetchMatches,
approveMatch,
rejectMatch,
assignSpec,
removeMatch,
bulkApprove,
bulkReject,
} = useSpecMatching(projectId)Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | Ref<string> | Reactive project UUID |
Return Values
| Property | Type | Description |
|---|---|---|
matches | Ref<Match[]> | All matches for the project |
isLoading | Ref<boolean> | Loading state |
Methods
| Method | Parameters | Returns | Description |
|---|---|---|---|
fetchMatches | pipItemId?: string | Promise<void> | Load matches |
approveMatch | matchId: string | Promise<void> | Approve a match |
rejectMatch | matchId: string | Promise<void> | Reject a match |
assignSpec | pipItemId: string, specId: string | Promise<void> | Manually assign spec |
removeMatch | matchId: string | Promise<void> | Remove a match |
bulkApprove | matchIds: string[] | Promise<void> | Bulk approve |
bulkReject | matchIds: string[] | Promise<void> | Bulk reject |
Match Status Flow
pending → approved (user approves)
pending → rejected (user rejects)
pending → review (flagged for review)Source
app/composables/useSpecMatching.ts