1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-PifewLW3.css","assets/ui-vendor-B-kHA1jU.css","assets/app-shared-components-Dq4d84mH.css"])))=>i.map(i=>d[i]); 2import{_ as o}from"./vite-preload-helper-D3tSqqZC.js";import{_ as s}from"./halopsa-in-glasshive-D4fx6gFX.js";import{A as n}from"./vue-vendor-D2uZR6iP.js";import"./legacy-vendor-B2-6Z0ry.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};i.SENTRY_RELEASE={id:"22139a6a3f3157273dab84737000bf4ba7278475"};var t=new i.Error().stack;t&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[t]="a1d0f2dd-b3bf-4db5-9f73-ddc0a4cd2705",i._sentryDebugIdIdentifier="sentry-dbid-a1d0f2dd-b3bf-4db5-9f73-ddc0a4cd2705")}catch{}})();const r=()=>o(()=>import("./app-shared-components-B1XGZkSg.js").then(i=>i.a0),__vite__mapDeps([0,1,2])),p=()=>o(()=>import("./app-shared-components-B1XGZkSg.js").then(i=>i.ab),__vite__mapDeps([0,1,2])),l={components:{"app-button":r,"loading-screen-svg":p},data(){return{honeyCompanyTypes:null,connectWiseCompanyTypes:null,companyTypeMappings:null,isDownloadingCompanyTypes:!0,isImportingCompanies:!1,integrationId:null}},computed:{clientId(){return this.$store.state.context.client.id},routeBaseUrl(){return this.$store.getters.routeBaseUrl},importMappings(){return this.companyTypeMappings?this.companyTypeMappings.filter(i=>i.direction.toUpperCase()=="DOWN"):null}},created(){this.getData()},methods:{getData(){this.getIntegrationId().then(this.getCompanyTypesMappings).catch(i=>{this.isDownloadingCompanyTypes=!1,this.$helpers.showFailNotification(i,{error:i})}).finally(()=>{this.isDownloadingCompanyTypes=!1})},getIntegrationId(){return new Promise((i,t)=>{this.$api.get(`/ms/halo-api/v1/credentials/${this.clientId}`).then(e=>(this.integrationId=e.data.Id,i())).catch(e=>{t("An error occurred while fetching your integration information.")})})},getCompanyTypesMappings(){return new Promise((i,t)=>{this.$api.get(`/ms/halo-api/v1/companytypemappings/${this.clientId}`).then(e=>{this.createCompanyTypeMappings(e.data),i()}).catch(e=>{t("An error occurred while downloading company types mappings.")})})},createCompanyTypeMappings(i){this.companyTypeMappings=i.map(t=>({id:t.Id,companyType:t.CompanyType?t.CompanyType.Name:"No Type",direction:t.Type==="Export"?"Up":"Down",thirdPartyCompanyType:t.ThirdPartyType?t.ThirdPartyType.Name:"No Type"}))},importCompanies(){this.isImportingCompanies=!0;var i={Entity:"company",UpdatedAfter:"1980-01-01T12:00:00Z",IsScheduled:!1,IsRepetitive:!1,IsUpsert:!0,Type:"import",GlasshiveClientId:this.clientId,IsManual:!0,Mode:"entity"};this.$api.post(`/ms/halo-api/v1/operations/${this.clientId}`,i).then(t=>{this.isImportingCompanies=!1,this.$helpers.showSuccessNotification("Your Halo PSA companies are being imported. You will receive an email when the import is complete.")}).catch(t=>{this.isImportingCompanies=!1,this.$helpers.showFailNotification("An error occurred while importing your Halo PSA companies.",{error:t})})}}};var d=function(){var t=this,e=t._self._c;return e("div",{staticClass:"row halopsa-import-companies"},[e("div",{staticClass:"col-md-12"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-12 halopsa-navigation"},[e("div",{staticClass:"go-to"},[e("router-link",{attrs:{to:t.routeBaseUrl+"/Integrations/HaloPSA/Manage",tag:"button"}},[t._v(" Return to Halo PSA Manage ")])],1),e("div",{staticClass:"go-to"},[e("router-link",{attrs:{to:t.routeBaseUrl+"/Integrations/HaloPSA/Manage/Companies/Mappings",tag:"button"}},[t._v(" Go To Company Type Mappings ")])],1)])]),e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-12 module import-companies"},[e("div",{staticClass:"content-wrapper"},[e("h2",[t._v("Import Companies from Halo PSA")]),e("img",{attrs:{src:s,alt:"Halo PSA To GlassHive"}}),e("div",{staticClass:"content"},[t._m(0),e("div",{staticClass:"selected-company-types"},[e("p",{staticClass:"selected-heading"},[t._v("Halo PSA companies to import:")]),t.isDownloadingCompanyTypes?e("div",[e("loading-screen-svg")],1):t.importMappings.length===0?e("div",[e("p",[t._v("No Halo PSA to GlassHive Mappings")])]):e("div",{staticClass:"company-types"},t._l(t.importMappings,function(a){return e("div",{key:a.id},[e("p",[t._v(" "+t._s(a.thirdPartyCompanyType)+" to "+t._s(a.companyType)+" ")])])}),0)])]),e("div",{staticClass:"invite-btn-container"},[e("app-button",{attrs:{onClick:t.importCompanies,loading:t.isDownloadingCompanyTypes||t.isImportingCompanies,disabled:t.isDownloadingCompanyTypes||t.isImportingCompanies}},[t._v(" "+t._s(t.isDownloadingCompanyTypes||t.isImportingCompanies?"Loading":"Import")+" ")])],1)])])])])])},c=[function(){var i=this,t=i._self._c;return t("div",{staticClass:"selected-main-text"},[t("p",[i._v(" You've selected the following data to be imported into your GlassHive account. ")]),t("p",[i._v(" Any Halo PSA companies with mappings below will be imported into your GlassHive platform under that c
2ompany type. ")])])}],m=n(l,d,c,!1,null,"cabb448c");const _=m.exports;export{_ as default};
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.