@defra/wls-eps-web-service
Version:
The web service for wildlife licencing of European Protected Species
10 lines (8 loc) • 445 B
JavaScript
import { APIRequests } from '../../services/api-requests.js'
import { tagStatus } from '../../services/status-tags.js'
// We can determine from the applicationTags on application
// How close to completing the application, the user is
export const countCompleteSections = async applicationId => {
const allTags = await APIRequests.APPLICATION.tags(applicationId).getAll()
return allTags.filter(tag => tag.tagState === tagStatus.COMPLETE)
}