1"use strict";(self["webpackChunkconveyour_ui"]=self["webpackChunkconveyour_ui"]||[]).push([[6134,27957],{39903:function(t,o,e){e.r(o),e.d(o,{default:function(){return h}});var a=e(13180),s=e(54414),r=e(28160),i=e(2756),n=function(){var t=this,o=t._self._c;return o("div",{staticClass:"automation-compare"},[o("field-block",[o(i.A,{staticClass:"compare-row compare-row--first",attrs:{wrap:""}},t._l(t.mergedAutomations,function(e,a){return o(s.A,{key:a,attrs:{cols:"12",sm:"6"}},[o("automation-card",{attrs:{automation:e,showActions:!1,highlightText:1===a,dateFromFields:1===a,"group-contact-counts":t.groupContactCounts(e)}})],1)}),1)],1),"event"===t.automation.type?[o("field-block",{attrs:{title:"Event Name"}},[o(i.A,{staticClass:"compare-row",attrs:{wrap:""}},t._l(t.mergedAutomations,function(e,a){return o(s.A,{key:a,attrs:{cols:"12",sm:"6"}},[o("div",{staticClass:"compare-row__content"},[t._v(" "+t._s(e.event)+" ")])])}),1)],1),t.automation.properties.length?o("field-block",{attrs:{title:"Event properties"}},[o(i.A,{staticClass:"compare-row",attrs:{wrap:""}},t._l(t.mergedAutomations,function(e,a){return o(s.A,{key:a,attrs:{cols:"12",sm:"6"}},[o("div",{staticClass:"compare-row__content"},[o("ul",t._l(e.properties,function(e,a){return o("li",{key:a},[o("strong",{staticClass:"pr-2"},[t._v(t._s(e.answer)+":")]),t._v(" "+t._s(e.points)+" ")])}),0)])])}),1)],1):t._e()]:t._e(),"tag"===t.automation.type?[t.automation.add_tags.length||t.automationOriginal.add_tags.length?o("field-block",{attrs:{title:"Added tags"}},[o(i.A,{staticClass:"compare-row",attrs:{wrap:""}},t._l(t.mergedAutomations,function(e,r){return o(s.A,{key:r,attrs:{cols:"12",sm:"6"}},[o("div",{staticClass:"compare-row__content"},t._l(e.add_tags,function(e,s){return o(a.A,{key:s,attrs:{color:"primary","text-color":"white"}},[t._v(t._s(e))])}),1)])}),1)],1):t._e(),t.automation.remove_tags.length||t.automationOriginal.remove_tags.length?o("field-block",{attrs:{title:"Removed tags"}},[o(i.A,{staticClass:"compare-row",attrs:{wrap:""}},t._l(t.mergedAutomations,function(e,r){return o(s.A,{key:r,attrs:{cols:"12",sm:"6"}},[o("div",{staticClass:"compare-row__content"},t._l(e.remove_tags,function(e,s){return o(a.A,{key:s,attrs:{color:"error","text-color":"white"}},[t._v(t._s(e))])}),1)])}),1)],1):t._e()]:t._e(),"join"===t.automation.type?[t.automation.confirm_email_subject||t.automationOriginal.confirm_email_subject?o("field-block",{attrs:{title:"Custom email"}},[o(i.A,{staticClass:"compare-row",attrs:{wrap:""}},t._l(t.mergedAutomations,function(e,a){return o(s.A,{key:a,attrs:{cols:"12",sm:"6"}},[o("div",{staticClass:"compare-row__content"},[o("p",[o("strong",[t._v("Subject:")]),t._v(" "+t._s(e.confirm_email_subject)+" ")]),o("p",[o("strong",[t._v("Message:")]),t._v(" "+t._s(e.confirm_email_response)+" ")])])])}),1)],1):t._e(),t.automation.welcome_sms||t.automationOriginal.welcome_sms?o("field-block",{attrs:{title:"Custom Message"}},[o(i.A,{staticClass:"compare-row",attrs:{wrap:""}},t._l(t.mergedAutomations,function(e,a){return o(s.A,{key:a,attrs:{cols:"12",sm:"6"}},[o("div",{staticClass:"compare-row__content"},[t._v(" "+t._s(e.welcome_sms)+" ")])])}),1)],1):t._e()]:t._e(),"hook"===t.automation.type?o("field-block",{attrs:{title:"Webhook URL"}},[o(i.A,{staticClass:"compare-row",attrs:{wrap:""}},t._l(t.mergedAutomations,function(e,a){return o(s.A,{key:a,attrs:{cols:"12",sm:"6"}},[o("div",{staticClass:"compare-row__content"},[o("a",{attrs:{href:e.url}},[t._v(t._s(e.url))])])])}),1)],1):t._e(),o("field-block",{attrs:{title:"Contacts affected"}},[o("p",[t._v(" Please note that since this Automation has been scheduled for a later date and time, the list of affected Contacts may be different at the moment of release. ")]),t.usesAdditionalQuery?o("p",{staticClass:"mb-3"},[t._v(" "+t._s(t.contactsSummary(t.automation))+" ")]):t._e(),t.isContactsLoading?o(r.A,{staticClass:"pa-5",attrs:{"justify-center":"","align-center":""}},[o("spinner")],1):[o(i.A,{staticClass:"compare-row",attrs:{wrap:""}},t._l(t.mergedAutomations,function(e,a){return o(s.A,{key:a,attrs:{cols:"12",sm:"6"}},[t.groupUsers(e).length?o("div",{staticClass:"v-table__overflow"},[o("table",{staticClass:"v-table"},[o("thead",[o("tr",[o("th",[t._v(t._s(1===a?"Updated":"Previous"))])])]),o("tbody",t._l(t.groupUsers(e),function(e,a){return o("tr",{key:a},[o("td",[t._v(t._s(t.getContactName(e)))])])}),0)])]):o("div",{staticClass:"compare-row__content"},[t._v(" "+t._s(t.emptyContactsMessage(e))+" ")])])}),1)]],2)],2)},l=[],c=(e(18111),e(22489),e(61701),e(13579),e(17642),e(58004),e(33853),e(45876),e(32475),e(15024),e(31698),e(1910)),u=e(80015),m=e(926),d={components:{AutomationCard:u["default"]},props:{automation:{type:Object,default:()=>({})},automationOriginal:{type:Object,default:()=>({})}},data(){return{localContactsLoading:!1,contactsPreviews:{}}},computed:{...(0,c.L8)(["groupContactsLoading","singleGroupContactsInfo","singleGroup"]),mergedAutomations(){return[this.automationOriginal,this.automation]},usesAdditionalQuery(){return this.mergedAutomations.some(t=>(0,m.getAutomationAdditionalQuery)(t))},isContactsLoading(){return this.usesAdditionalQuery?this.localContactsLoading:this.groupContactsLoading}},methods:{...(0,c.i0)(["loadGroupContacts"]),getGroup(t){return this.singleGroup(t)},previewKey(t){return t.bookmark_id},getPreview(t){return this.contactsPreviews[this.previewKey(t)]||{}},groupContactCounts(t){const o=(0,m.getAutomationAdditionalQuery)(t);if(!o)return null;const e=this.getPreview(t);return{eligible:e.eligibleCount,total:e.totalCount}},contactsSummary(t){const o=this.getPreview(t),e=(o.eligibleCount||0).toLocaleStr
1ing("en-US"),a=(o.totalCount||0).toLocaleString("en-US");return`${e} contacts with a mobile number (of ${a} in this group)`},emptyContactsMessage(t){return(0,m.getAutomationAdditionalQuery)(t)?"There are no contacts with a mobile number in this group.":"There are no users in this group."},groupUsers(t){if((0,m.getAutomationAdditionalQuery)(t))return this.getPreview(t).users||[];const o=this.singleGroupContactsInfo(t.bookmark_id)||{};return o.users||[]},async loadContactsPreview(t){const o=this.getGroup(t.bookmark_id),e=(0,m.getAutomationGroupFilters)(t,o),a=(0,m.getAutomationAdditionalQuery)(t);if(!e||!a)return;const s=this.previewKey(t),r=await(0,m.loadAutomationContactsPreview)({groupFilters:e,additionalQuery:a});this.$set(this.contactsPreviews,s,r)},async loadAllContactsPreviews(){const t=new Set,o=this.mergedAutomations.filter(o=>!(!(0,m.getAutomationAdditionalQuery)(o)||!o.bookmark_id||t.has(o.bookmark_id))&&(t.add(o.bookmark_id),!0));if(o.length){this.localContactsLoading=!0;try{await Promise.all(o.map(t=>this.loadContactsPreview(t)))}finally{this.localContactsLoading=!1}}},loadDefaultGroupContacts(){const t=[...new Set(this.mergedAutomations.map(t=>t.bookmark_id))];t.forEach(t=>{this.groupUsers({bookmark_id:t}).length||this.loadGroupContacts({group:this.getGroup(t)})})}},mounted(){this.usesAdditionalQuery?this.loadAllContactsPreviews():this.loadDefaultGroupContacts()}},_=d,g=e(81656),p=(0,g.A)(_,n,l,!1,null,null,null),h=p.exports}}]); 2//# sourceMappingURL=view-automations-confirm-AutomationCompare-vue.511d5e75.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.