1"use strict";(self.webpackChunkwumdrop_web=self.webpackChunkwumdrop_web||[]).push([[3670],{93670(r,t,e){e.r(t),e.d(t,{TerritoriesAreasCreateForm:()=>y,default:()=>T});var s=e(76998),a=e(8111),i=e(73636),o=e(59917),p=e(50849),h=e(29800),d=e(70833),n=e(5e4),c=e(16162),l=e(1808),u=e(21489),A=e(42368),m=e(23446);class y extends s.Component{constructor(r){super(r);let t=0;(0,l.default)(this.props.match.params.id)||(t=this.props.match.params.id),this.props.getAllTerritoryAreas(t),(0,l.default)(this.props.area.interactions)&&this.props.getInteractions(),(0,l.default)(this.props.slaTypes.data)&&this.props.getSlaTypes(),this.state={success:!1,territoryId:t,loading:!0}}componentDidUpdate(r){this.props.territoriesAreas!==r.territoriesAreas&&(this.props.territoriesAreas.success&&this.setState({success:this.props.territoriesAreas.success}),(0,l.default)(this.props.territoriesAreas)||(0,l.default)(this.props.territoriesAreas.data)||this.setState({loading:!1})),(0,l.default)(this.props.errors)||(0,l.default)(this.props.errors.message)||this.setState({loading:!1})}componentWillUnmount(){this.props.clearErrors()}handleSubmit(r){let t=this.state.territoryId;this.props.createTerritoryArea(t,r,this.props.history),this.props.clearErrors(),this.setState({loading:!0})}render(){const r=this.props,t=r.territoriesAreas,e=r.errors,s=r.area,a=r.territories;return(0,m.jsx)(h.A,{type:n.gZ,linkText:"Areas",createLink:"/".concat(n.vh,"/edit/").concat(this.props.match.params.id,"/").concat(n.xS,"/add"),firstParentId:this.props.match.params.id,firstParentText:a.data.territoryName,firstParentType:n.vh,secondParentText:"Add",children:(0,m.jsx)(d.A,{title:"Add Area",children:this.state.loading?(0,m.jsx)(u.A,{}):(0,m.jsx)(c.A,{submitText:"Create",cancelText:"Cancel",onSubmit:this.handleSubmit.bind(this),territoriesAreas:t,errors:e,territoryId:this.props.match.params.id,area:s,type:n.Ki,slaTypes:this.props.slaTypes})})})}}const T=(0,o.Zz)((0,p.Ng)(r=>({errors:r.errors,territoriesAreas:r.territoriesAreas,area:r.area,territories:r.territories,slaTypes:r.slaTypes}),{createTerritoryArea:a.sP,clearErrors:i.x8,getAllTerritoryAreas:a.QM,getInteractions:a.eZ,getSlaTypes:A.o}))(y)}}]); 2//# sourceMappingURL=3670.9d57cfbb.chunk.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.