()
| 79 | |
| 80 | // Optional TODO: Reconcile where these kinds of model-y calculations should go (API? the view?) |
| 81 | queryString () { |
| 82 | let query |
| 83 | if (this.skippedContact.trialRequest) { |
| 84 | const { |
| 85 | trialRequest |
| 86 | } = this.skippedContact |
| 87 | const leadName = trialRequest.properties.nces_name || trialRequest.properties.organization || trialRequest.properties.school || trialRequest.properties.district || trialRequest.properties.nces_district || trialRequest.properties.email |
| 88 | query = `name:\"${leadName}\"` |
| 89 | if (trialRequest.properties.nces_school_id) { |
| 90 | query = `custom.demo_nces_id:\"${trialRequest.properties.nces_school_id}\"` |
| 91 | } else if (trialRequest.properties.nces_district_id) { |
| 92 | query = `custom.demo_nces_district_id:\"${trialRequest.properties.nces_district_id}\" custom.demo_nces_id:\"\" custom.demo_nces_name:\"\"` |
| 93 | } |
| 94 | return query |
| 95 | } |
| 96 | if (this.skippedContact.zpContact) { |
| 97 | const { |
| 98 | zpContact |
| 99 | } = this.skippedContact |
| 100 | query = `name:\"${zpContact.organization}\"` |
| 101 | if (zpContact.nces_school_id) { |
| 102 | query = `custom.demo_nces_id:\"${zpContact.nces_school_id}\"` |
| 103 | } else if (zpContact.nces_district_id) { |
| 104 | query = `custom.demo_nces_district_id:\"${zpContact.nces_district_id}\" custom.demo_nces_id:\"\" custom.demo_nces_name:\"\"` |
| 105 | } |
| 106 | return query |
| 107 | } |
| 108 | }, |
| 109 | |
| 110 | queryURL () { |
| 111 | return 'https://app.close.io/search/' + encodeURIComponent(this.queryString) |
nothing calls this directly
no outgoing calls
no test coverage detected