"use strict";(self.webpackChunkmy_app=self.webpackChunkmy_app||[]).push([[17],{18017:function(e,n,t){t.r(n);var r=t(1413),a=t(74165),l=t(15861),o=t(29439),i=t(72791),s=t(24340),c=t(92438),u=t(27391),d=t(64554),p=t(71672),v=t(61134),g=t(75985),f=t(91432),m=t(75032),h=t(80184),b=(0,p.Pi)((function(e){var n=e.rows,t=(e.jobService,e.control),p=e.setValue,b=e.trigger,_=e.jobIndex,x=e.developers,Z=(0,i.useState)([]),w=(0,o.Z)(Z,2),C=w[0],S=w[1],j={assign_designer:null,assign_design_pc:null},k=(0,i.useState)(j),y=(0,o.Z)(k,2),I=y[0],D=y[1],O={width:"300px"},T=function(){var e=(0,l.Z)((0,a.Z)().mark((function e(n,t,r){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{D({type:t}),C.length>0?(C.forEach((function(e,n){var a="jobs.".concat(_,".templates.").concat(parseInt(e.slice(-3),10)-1,".").concat(r);p(a,t),b(a)})),g.Am.info("".concat(C.length," records selected!"),f.Z)):(g.Am.warn("Please select at least one template..!",f.Z),D(j))}catch(n){}case 1:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),P=[{headerCheckboxSelection:!0,checkboxSelection:!0,headerCheckboxSelectionFilteredOnly:!0,headerCheckboxSelectionCurrentPageOnly:!0,width:100},{headerName:"Templates",field:"order_template_id",width:400},{headerName:"Developer1",width:300,headerComponent:function(e){return(0,h.jsx)(v.Qr,{name:"assign_developer".concat(_),control:t,render:function(e){var n=e.field,t=e.fieldState;return(0,h.jsx)(c.Z,(0,r.Z)((0,r.Z)({},n),{},{sx:O,id:"assign_developer".concat(_),options:x,isOptionEqualToValue:function(e,n){return e.label===n.label},value:I.assign_developer||null,onChange:function(e,t){T(e,t,"assign_developer"),n.onChange(t)},getOptionLabel:function(e){return e.label||""},renderInput:function(e){var n,a,l;return(0,h.jsx)(u.Z,(0,r.Z)((0,r.Z)({},e),{},{label:"Developer",variant:"outlined",error:t.invalid,helperText:(null===t||void 0===t||null===(n=t.error)||void 0===n?void 0:n.message)||(null===t||void 0===t||null===(a=t.error)||void 0===a||null===(l=a.label)||void 0===l?void 0:l.message)}))}}))}})},field:"assign_developer",sortable:!1,filter:!1,cellRenderer:(0,i.useMemo)((function(){return function(e){return(0,h.jsx)(v.Qr,{name:"jobs.".concat(_,".templates.").concat(parseInt(e.data.order_template_id.slice(-3),10)-1,".assign_developer"),control:t,render:function(n){var t=n.field,a=n.fieldState;return(0,h.jsx)(c.Z,(0,r.Z)((0,r.Z)({},t),{},{id:"jobs.".concat(_,".templates.").concat(parseInt(e.data.order_template_id.slice(-3),10)-1,".assign_developer_").concat(e.data.id),options:[],isOptionEqualToValue:function(e,n){return e.label===n.label},onChange:function(e,n){t.onChange(n)},clearIcon:null,getOptionLabel:function(e){return e.label||""},renderInput:function(e){var n,t,l;return(0,h.jsx)(u.Z,(0,r.Z)((0,r.Z)({},e),{},{label:"Developer",variant:"outlined",error:a.invalid,helperText:(null===a||void 0===a||null===(n=a.error)||void 0===n?void 0:n.message)||(null===a||void 0===a||null===(t=a.error)||void 0===t||null===(l=t.label)||void 0===l?void 0:l.message)}))}}))}})}}),[])}];return m.mT,(0,h.jsx)(d.Z,{className:"ag-theme-alpine ag-grid-wrapper multiple-templates",sx:{mt:"10px"},children:(0,h.jsx)(s.AgGridReact,{rowData:n,columnDefs:P,rowSelection:"multiple",onSelectionChanged:function(e){var n=e.api.getSelectedRows().map((function(e){return e.order_template_id}));S(n)},suppressRowClickSelection:!0,suppressMovableColumns:!0,suppressDragLeaveHidesColumns:!0,pagination:!0,paginationPageSize:50,rowHeight:75})})}));n.default=b}}]);
//# sourceMappingURL=17.00e137a5.chunk.js.map