PageSourceSearch

https://reporting.happy-or-not.com/assets/AddCompanyPage-DAY7YZP6.js

js happy-or-not.com collected 2026-09-24 17:48:26 UTC 6,139 bytes, 1 lines download raw bytes

1import{r as S,j as t}from"./main-DyjxXpTK.js";import{cy as u,cz as y,b2 as l,O as n,S as p,T as i,oF as P,jI as r,cA as F,qn as v,nx as E,qi as j,aR as O,aI as s,eb as z,b7 as I,qo as N,qp as k,aO as L,qq as M,qr as q,dd as d}from"./App-V_-BsQ0z.js";import{A as B}from"./AdminContentPageTemplate-DvKtXNPT.js";import{w}from"./ToggleableSections-CsaXwTME.js";import{T as R}from"./TreeLoadingErrorHandler-T8z_ZZBR.js";import{T as C}from"./ToggleableEditForm-BJHXs-cC.js";import{F as g,E as m}from"./FieldGrid-DHX3ZmDG.js";import{F as V}from"./FormikCategorySelectorInput-vH61CC0Q.js";import{i as _}from"./IdToTreeFormValueConverter-D6ShEB17.js";import{F as G}from"./FormikWeeklyPeriodSelectorInput-BauJRQ9a.js";import{c as U,a as W}from"./RoutedAdmin-cbICg0uv.js";import{H as Y}from"./HomeThin-DsAYiGxU.js";import"./ContentPageTemplate-B3zrlMfb.js";import"./BackwardChevron-DH08CylC.js";import"./ContentPageSection-GJ6awWr5.js";import"./surveyGroupAdminApi-6HYOFbUt.js";import"./MoreVertical-77tyo5jK.js";import"./feedback-scale-utils-WA0Oxyxj.js";import"./Smileys-_UC-jsL7.js";import"./NpsRange-DGLcVIqn.js";import"./_baseExtremum-DeYCGTr7.js";import"./Play-rrdy20EB.js";import"./ActionConfirmationDialog-NYfquneF.js";import"./CategorySelectorInput-DEV40onT.js";import"./CategorySelectorPopover-c3plWVVc.js";import"./FilterDropDownIcon-Cf1YSidC.js";import"./DropdownArrow-BfM1_YAx.js";import"./MapPin-DTuFTGgx.js";import"./Search-BBx6O9Iu.js";import"./index.esm-CP3_4Rey.js";import"./ListItemIcon-SYeKIgu6.js";import"./debounce-B47o0crl.js";import"./SelectInput-CO8jO_UY.js";import"./Table-C66vHri0.js";import"./useWidth-m6sZpHpP.js";import"./Clock-DdmY_uwA.js";import"./ListingTemplate-CPPj3PMe.js";import"./EmptyResultMessage-D1b0-V6x.js";import"./ForwardChevron-C4bTIGaB.js";import"./KeyboardArrowRight-BGR9k-mx.js";
1import"./scrollUtils--Vypw7rJ.js";class H extends S.Component{createFormValidationSchemaFactory=()=>n().shape({name:p().required(),category:n().shape({id:p().required()})});render(){const e=this.props.toggleableSection.isSectionActive;return t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(C,{honFormProps:{initialValues:this.props.company,validationSchemaFactory:this.createFormValidationSchemaFactory,enableReinitialize:!0,onSubmit:this.props.onSubmit},headerText:{id:i.CompanyListing.addNewOrganization.OrganizationDetails.header},isEditButtonVisible:!1,editMode:e,disabled:this.props.toggleableSection.isSectionDisabled,submitting:this.props.isSavingCompany,onEditModeClicked:this.props.toggleableSection.toggleSection,onCancel:this.props.onCancel,disableConfirmationDialog:!0,submitButtonProps:{text:{id:i.General.button.next}},children:t.jsxs(g,{children:[t.jsx(m,{children:t.jsx(P,{name:"name",label:{id:i.General.Company.attribute.name},required:!0})}),t.jsx(m,{children:t.jsx(V,{name:"category.id",required:!0,label:{id:i.General.ParentGroup.header},tree:this.props.authUserTree,showProgressIndicator:this.props.isTreeLoading,displayOnly:!e,converter:_(this.props.authUserTree),includeExperiencePoints:!1})})]})})]})}}const K=o=>({authUserTree:l.getAuthUserTree(o),isTreeLoading:l.isTreeLoading(o)}),$=u(K)(y(H));function Z(o){const{company:e,isSavingCompany:a,onSubmit:b,onCancel:T,toggleableSection:x}=o,{isSectionActive:A,isSectionDisabled:f,toggleSection:D}=x;return t.jsx(C,{honFormProps:{initialValues:e,validationSchemaFactory:J,enableReinitialize:!0,onSubmit:b,validateOnChange:!1},headerText:{id:i.CompanyDetailsPage.Customization.title},isEditButtonVisible:!1,editMode:A,disabled:f,submitting:a,onEditModeClicked:D,onCancel:T,disableConfirmationDialog:!0,cancelButtonProps:{text:{id:i.General.button.previous}},children:t.jsx(g,{children:t.jsx(m,{children:t.jsx(G,{name:`parameters.${r.WeeklyReportLastDay}`})})})})}function J(){return n().shape({parameters:n().shape({[r.WeeklyReportLastDay]:p().required()})})}const c="addCompanyDetailsSection",h="addCompanyCustomizationSection",Q={id:"0",name:"",category:{id:"",name:""},features:q.create([d.IndustryComparison,d.OpenFeedbackDeletion]),featureSets:M.create(new Map),parameters:{[r.WeeklyReportLastDay]:E.Sun,[r.SharingTemplate]:v.COMPANY_SPECIFIC},feedbackScalesSettings:[]};class X extends S.Component{constructor(e){super(e),this.state={company:Q}}componentDidMount(){j(O.AddCompany)}setCompany=e=>{this.setState({company:e})};removeErrorBanners=()=>{this.props.removeAllPageNotificationBanners()};handleDetailsSectionSubmit=e=>{this.removeErrorBanners(),this.setCompany(e),this.props.toggleableSections.activateSection(h)};handleDetailsSectionCancel=()=>{this.removeErrorBanners(),this.props.history.push(s.myCompanies.getLink({}))};reloadCategoryTree=()=>{this.props.authentication.authenticatedUser&&this.props.fetchTree(this.props.authentication.authenticatedUser.rootCategory.id)};handleCustomizationSectionSubmit=e=>{this.removeErrorBanners(),this.props.createCompany(e).toPromise().then(a=>{this.reloadCategoryTree(),a?(this.props.setSandboxCompany(a.data),this.props.history.push(s.companyDetails.getLink({companyId:a.data.id}))):this.props.history.push(s.myCompanies.getLink({}))})};handleCustomizationSectionCancel=e=>{this.removeErrorBanners(),this.setCompany(e),this.props.toggleableSections.activateSection(c)};render(){return t.jsx(z,{children:t.jsxs(B,{headerIcon:Y,header:{id:I.CompanyListing.addNe
1wOrganization.NewOrganization.title},children:[t.jsx($,{company:this.state.company,isSavingCompany:this.props.isSynchronizingCompany,onSubmit:this.handleDetailsSectionSubmit,onCancel:this.handleDetailsSectionCancel,...this.props.toggleableSections.getSectionProps(c)}),t.jsx(Z,{company:this.state.company,isSavingCompany:this.props.isSynchronizingCompany,onSubmit:this.handleCustomizationSectionSubmit,onCancel:this.handleCustomizationSectionCancel,...this.props.toggleableSections.getSectionProps(h)})]})})}}const ee=o=>({isSynchronizingCompany:U(o).isSynchronizingCompany}),te=o=>({createCompany:e=>o(W(e)),setSandboxCompany:e=>o(L.setSandboxCompanyAction(e)),removeAllPageNotificationBanners:()=>o(k()),fetchTree:e=>o(N(e))}),Ge=u(ee,te)(y(F(w(X,{initiallySelectedSection:c}))));export{X as AddCompanyPageComponent,Ge 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.