DEFRA/ivory-front-office

View on GitHub
server/modules/owner/address/owner-address-mixin.js

Summary

Maintainability
A
0 mins
Test Coverage
const { OwnerAddress } = require('ivory-data-mapping').cache

module.exports = {
  async getLink (routeId) {
    const node = await this.getFlowNode(routeId)
    return node.path
  },

  get Address () {
    return OwnerAddress
  },

  async findAddressLink () {
    return this.getLink('owner-address-find')
  },

  async selectAddressLink () {
    return this.getLink('owner-address-select')
  },

  async manualAddressLink () {
    return this.getLink('owner-address-full')
  }
}