SpeciesFileGroup/taxonworks

View on GitHub
app/javascript/vue/tasks/collection_objects/simple_new_specimen/store/actions/createCollectingEvent.js

Summary

Maintainability
A
0 mins
Test Coverage
import { CollectingEvent } from '@/routes/endpoints'

export default function () {
  const payload = {
    ...this.collectingEvent,
    geographic_area_id: this.geographicArea?.id
  }

  return CollectingEvent.create({ collecting_event: payload }).then(
    ({ body }) => {
      this.createdCE = body
    }
  )
}