1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7141],{25751:function(t,e,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/provider/edit",function(){return i(53954)}])},53954:function(t,e,i){"use strict";i.r(e);var s=i(85893),a=i(25079),r=i(60825);e.default=()=>(0,s.jsx)(r.Z,{type:1,title:a.Z.edit+" "+a.Z.provider.title})},21324:function(t,e,i){"use strict";i.d(e,{_:function(){return CreateCategoryScreen}});var s=i(85893),a=i(80822),r=i(23972),n=i(40017),o=i(25079),d=i(22703),h=i(83771),l=i(10828),c=i(66630),p=i(39040),u=i(76547),x=i(52091),Z=i(93524),g=i(71141),f=i(70939);let CreateCategoryScreen=class CreateCategoryScreen extends Z.Z{async componentDidMount(){g.Z.updateBreadCrumbs([{text:this.langText.title,path:this.parentPath},{text:this.id&&!this.isCopyAdd?this.langText.edit:this.langText.create}]),await this.getData(),this.setState({isLoading:!1})}constructor(t){var e,i;super(t),this.getData=async()=>{if(await this.authenticate(),this.id){let t=await p.Z.get(this.api.GET_DETAIL,{id:this.id},!0);200===t.status&&this.setState({isLoading:!1},()=>{this.updateData(t.data)})}await this.getMoreData(),this.setState({isLoading:!1})},this.updateData=t=>{var e;null===(e=this.inputName)||void 0===e||e.setText(t.name)},this.getMoreData=()=>{},this.save=async()=>{var t;d.Z.show();let e=await p.Z.postForm(this.id?this.api.UPDATE:this.api.ADD,{...this.params,id:this.id},!0);if(d.Z.hide(),200===e.status)return this.props.router.push(this.parentPath);h.Z.error((null===(t=e.data)||void 0===t?void 0:t.message)||o.Z.fail)},this.onClickSave=async()=>{let t=this.inputName.getText();if(t.length<2){h.Z.error(o.Z.invalidParams);return}this.params={name:t},this.save()},this.renderHeader=()=>{let t="".concat(this.langText.title," / ").concat(this.id&&!this.isCopyAdd?o.Z.edit:o.Z.create);return(0,s.jsx)(l.Z,{title:this.title,description:t,rightButtons:[{title:o.Z.save,onClick:this.onClickSave,icon:(0,s.jsx)(x.ZNz,{size:16,color:"white"}),bgcolor:n.Z.colorApp,"data-testid":"save-button"}]})},this.renderContent=()=>(0,s.jsxs)(a.Z,{sx:y.contentLayout,children:[(0,s.jsxs)(a.Z,{sx:y.viewContent,children:[(0,s.jsx)(r.Z,{sx:y.infoHeaderTitle,style:{marginBottom:12},children:o.Z.category.tips}),(0,s.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,s.jsxs)(r.Z,{sx:y.tipText,children:["⢠",o.Z.category.tip1]}),(0,s.jsxs)(r.Z,{sx:y.tipText,children:["⢠",o.Z.category.tip2]}),(0,s.jsxs)(r.Z,{sx:y.tipText,children:["⢠",o.Z.category.tip3]})]})]}),(0,s.jsxs)(a.Z,{sx:y.infoCard,children:[(0,s.jsx)(a.Z,{sx:y.infoHeader,children:(0,s.jsx)(r.Z,{sx:y.infoHeaderTitle,children:this.langText.title})}),(0,s.jsx)(a.Z,{sx:{p:2.5},children:(0,s.jsx)(f.Z,{isRequired:!0,label:o.Z.category.name,ref:t=>this.inputName=t,"data-testid":"category-name-input"})})]})]}),this.state={data:{},isLoading:!1},this.id=null===(i=t.router)||void 0===i?void 0:null===(e=i.query)||void 0===e?void 0:e.id,this.parentPath="/dashboard/category",this.langText=o.Z.category,this.api=u.Z.CATEGORY,this.title=this.langText.create,this.isCopyAdd=!1,this.styles=y}};let y={contentLayout:{width:"100%",display:"flex",flexDirection:"column",gap:2.5,marginTop:2.5},infoCard:{bgcolor:"white",border:"1px solid #e2e8f0",borderRadius:1.5,overflow:"hidden"},infoHeader:{p:2,display:"flex",alignItems:"center",gap:1.25,borderBottom:"1px solid #e2e8f0"},infoHeaderTitle:{fontSize:"16px",fontWeight:"600",color:n.Z.text1},viewContent:{bgcolor:"white",p:2.5,borderRadius:1.5,border:"1px solid #e2e8f0",borderLeft:"4px solid ".concat(n.Z.colorApp)},tipText:{fontSize:13,color:"#64748b",lineHeight:1.4}};e.Z=(0,c.Z)(CreateCategoryScreen)},60825:function(t,e,i){"use strict";var s=i(85893),a=i(25079),r=i(66630),n=i(76547);i(67294);var o=i(21324),d=i(31202);let CreateCustomerScreen=class CreateCustomerScreen extends o._{constructor(t){super(t),this.onSuccess=async t=>(this.params=t,this.props.router.push(this.parentPath)),this.updateData=t=>{var e;null===(e=this.CreateView)||void 0===e||e.updateData(t)},this.onClickSave=async()=>{this.CreateView.onClickSave()},this.renderContent=()=>(0,s.jsx)(d.Z,{ref:t=>this.CreateView=t,onSuccess:this.onSuccess,id:this.id||null,type:this.props.type,isSale:!1}),this.state={...this.state},this.parentPath=1===t.type?"/dashboard/provider":"/dashboard/customer",this.langText=1===t.type?a.Z.provider:a.Z.customer,this.api=n.Z.CUSTOMER,this.title=this.langText.create}};e.Z=(0,r.Z)(CreateCustomerScreen)}},function(t){t.O(0,[3739,1202,9774,2888,179],function(){return t(t.s=25751)}),_N_E=t.O()}]);
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.