1"use strict";(self.webpackChunkspa=self.webpackChunkspa||[]).push([[6719],{30936:(e,t,s)=>{s.d(t,{A:()=>o});s(9830);var a=s(73852),n=s(9950),r=s(96011),l=s(74344),i=s(86360);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,s]=(0,n.useState)(!1),[o,c]=(0,n.useState)(null),[u,d]=(0,n.useState)(null),m=(0,n.useRef)(null);return{loading:t,request:async t=>{s(!0);const n=t;e.cancellation&&(null!==m.current&&m.current.cancel(),m.current=r.CancelToken.source(),n.cancelToken=m.current.token);try{const{data:t}=await(0,l.adminAxios)(n);return d(t),"function"===typeof e.successCallback&&e.successCallback(t),s(!1),t}catch(o){const t=new i.A(o);c(t);const n="Cancel"===o.constructor.name;return e&&e.showErrorMessage&&!n&&a.A.error(t.message,3),e&&e.errorCallback&&!n&&"function"===typeof e.errorCallback&&e.errorCallback(t.message,t.joberErrorType),s(!1),null}},response:u,error:o}}},35735:(e,t,s)=>{s.d(t,{A:()=>a});const a=e=>{const t=`${e}`.replace(/[^0-9.]+/g,"");return t?parseInt(t,10):0}},39375:(e,t,s)=>{s.r(t),s.d(t,{default:()=>D});s(46459);var a=s(64577),n=(s(9830),s(73852)),r=s(9950),l=s(90937),i=s(30936),o=s(53567),c=s(55770),u=s(39105),d=(s(60457),s(43415)),m=s(41397),f=s.n(m),h=s(53628),p=(s(72383),s(44414));const g=e=>{const{pdfInfos:t,setPdfInfos:s,formInfos:n,values:l,setEditModalVisible:i,setEditTargetInfo:o}=e,[c,u]=(0,r.useState)({}),m=(0,r.useCallback)((function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:`\${${e}}`;return e.split(".").reduce(((e,a)=>t&&t[a]&&t[a].label||s),"")}),[]),g=(0,r.useCallback)(((e,t,s)=>{if(!/\${.+?}/g.test(e))return e;const a=e.split(/\${.+?}/g),n=e.match(/\${.+?}/g).map((e=>{const a=e.substr(2,e.length-3).trim();return m(a,t,s)})),l=a.reduce(((e,t,s)=>n[s]?[...e,t,n[s]]:[...e,t]),[]);return(0,p.jsx)(r.Fragment,{children:l.map(((e,t)=>t%2===0?e:(0,p.jsx)(d.default,{color:"cyan",className:"input-tag",children:e})))})}),[]),b=(0,r.useCallback)(((e,t,s)=>{if(!/\${.+?}/g.test(e))return e;const a=e.split(/\${.+?}/g),n=e.match(/\${.+?}/g).map((e=>{const a=e.substr(2,e.length-3).trim();return m(a,t,s)}));return a.reduce(((e,t,s)=>n[s]?[...e,t,n[s]]:[...e,t]),[]).join("")}),[]);(0,r.useEffect)((()=>{if(!Object.keys(l).length||!Object.keys(t).length)return;const e=t.sectionList&&t.sectionList.length&&t.sectionList.map(((e,t)=>{let{children:s}=e;return s.length&&(s=s.map(((e,s)=>({title:e.title,editTargetInfo:{isDocumentTitle:!1,sectionListIndex:t,isSectionTitle:!1,sectionItemIndex:s},hasValueList:e.hasValueList,hasNotValueList:e.hasNotValueList,hasSignSection:e.hasSignSection})))),{title:e.title,editTargetInfo:{isDocumentTitle:!1,sectionListIndex:t,isSectionTitle:!1},hasValueList:e.hasValueList,hasNotValueList:e.hasNotValueList,hasSignSection:e.hasSignSection,children:s}}));u({title:t.title,subTitle:t.subTitle,sectionList:e,footer:{contractDate:t.footer.contractDateSection.title,columns:t.footer.columns}})}),[l,t]);const[x,v]=(0,r.useState)([]),w=(0,h.cA)({treeData:x});return(0,r.useEffect)((()=>{if(!c||!Object.keys(c).length)return;const e=c.sectionList.map(((e,t)=>({title:e.title,editTargetInfo:{isDocumentTitle:!1,sectionListIndex:t,isSectionTitle:!0},hasSignSection:e.hasSignSection,hasValueList:e.hasValueList,hasNotValueList:e.hasNotValueList,expanded:!0,children:e.children})));v(e)}),[c]),(0,p.jsxs)("div",{className:"preview-panel edit-mode",children:[c&&c.title&&(0,p.jsx)("div",{className:"document-title editable",onClick:()=>{o({isDocumentTitle:!0}),i(!0)},children:g(c.title,n)}),c&&c.subTitle&&(0,p.jsx)("div",{className:"document-sub-title editable",onClick:()=>{o({isDocumentSubTitle:!0}),i(!0)},children:g(c.subTitle,n)}),(0,p.jsx)("div",{className:"tree",children:(0,p.jsx)(h.Ay,{treeData:x,maxDepth:2,rowHeight:45,style:{height:45*w+10},generateNodeProps:e=>{let{node:r}=e;const{title:l,editTargetInfo:{isDocumentTitle:c,sectionListIndex:u,isSectionTitle:d,sectionItemIndex:m},hasSignSection:h,hasValueList:x,hasNotValueList:v}=r;let w,y,j;const N=!c&&!d,I=f().cloneDeep(t);N?(w=()=>{const e=t.sectionList[u].children[m];I.sectionList[u].children.splice(m,0,e),s(I)},y=()=>{o({isDocumentTitle:!1,sectionListIndex:u,isSectionTitle:!1,sectionItemIndex:m}),i(!0)},j=()=>{I.sectionList[u].children.splice(m,1),s(I)}):(w=()=>{const e=t.sectionList[u];I.sectionList.splice(u,0,e),s(I)},y=()=>{o({isDocumentTitle:!1,sectionListIndex:u,isSectionTitle:!0}),i(!0)},j=()=>{I.sectionList.splice(u,1),s(I)});const T=g(l,n),S=(0,p.jsxs)("div",{className:"modify-btns",children:[(0,p.jsx)(a.default,{className:"copy-btn",type:"link",onClick:w,children:"\ubcf5\uc0ac"}),"|",(0,p.jsx)(a.default,{className:"edit-btn",type:"link",onClick:y,children:"\uc218\uc815"}),"|",(0,p.jsx)(a.default,{className:"delete-btn",type:"link",onClick:j,children:"\uc0ad\uc81c"})]});return{title:(0,p.jsxs)("div",{className:"editable "+(N?"section-item":"section-title"),onClick:e=>e.preventDefault(),children:[(0,p.jsxs)("div",{className:"content",children:[x&&x.length?(0,p.jsxs)("span",{className:"option-flag",children:["(hasOptions:",x.map((e=>b(`\${formValues.${e}}`,n))).join(","),")"]}):null,v&&v.length?(0,p.jsxs)("span",{className:"option-flag",children:["(hasNotOptions:",v.map((e=>b(`\${formValues.${e}}`,n))).join(","),")"]}):null,T,h&&(0,p.jsx)("span",{className:"sign-flag",children:"(\uc11c\uba85 \ub610\ub294 \uc778)"})]}),S]})}},onChange:e=>{const a={title:t.title,subTitle:t.subTitle,sectionList:e.map((e=>{const t=e.children&&e.children.length?e.children:[];return{title:e.title,hasSignSection:e.hasSignSection,children:t.map((e=>({title:e.title,hasSignSection:e.hasSignSection})))}})),footer:{contractDateSection:t.footer.contractDateSection,columns:t.footer.columns}};s(a)}})}),c&&c.footer&&(0,p.jsxs)("div",{className:"footer",children:[(0,p.jsx)("div",{className:"footer-contract-date editable",onClick:()=>{o({isFooter:!0,isFooterContractDate:!0}),i(!0)},children:g(c.footer.contractDate,n)}),(0,p.jsx)("div",{className:"footer-columns",children:c.footer.columns.map(((e,t)=>(0,p.jsx)("div",{className:"column",children:e.map(((e,s)=>(0,p.jsxs)("div",{className:"row editable",onClick:()=>{o({isFooter:!0,footerColumnIndex:t,colRowIndex:s}),i(!0)},children:[g(e.title,n),e.hasSignSection&&(0,p.jsx)("span",{className:"sign-flag",children:"(\uc11c\uba85 \ub610\ub294 \uc778)"})]})))})))})]})]})};s(36338);var b=s(120);const x=["\uadfc\ub85c\uacc4\uc57d\uc11c \uc791\uc131\uc2dc \uc785\ub825\ud558\ub294 \ub370\uc774\ud130\uc758 \uc720\ud615\uc785\ub2c8\ub2e4.","\uadfc\ub85c\uacc4\uc57d\uc11c \uc57d\uc2dc\uc5d0 \ud3ec\ud568\ub418\uc9c0 \uc54a\uc73c\uba74 \ubd89\uac8c \uacbd\uace0 \ud45c\uc2dc\ub418\uace0, \uc800\uc7a5\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."],v=e=>{const{allFormInfos:t,formInfos:s,setFormInfos:a,pdfInfos:n,setPdfInfos:l,templateType:i,setValidToSave:o}=e,[c,u]=(0,r.useState)([]),[m,f]=(0,r.useState)([]),[h,g]=(0,r.useState)([]);(0,r.useEffect)((()=>
1{if(!s||!Object.entries(t).length)return;Object.entries(s).length||u([]);const e=Object.keys(s);u(e);const a=Object.entries(t).map((e=>{let[t]=e;return t})),n=[];a.forEach((t=>{e.includes(t)||n.push(t)})),g(n)}),[s,t]),(0,r.useEffect)((()=>{if(!c.length||!n||!Object.entries(n).length)return;const e=JSON.stringify(n);c.forEach((t=>{const s=`\${formValues.${t}}`,a=e.indexOf(s);if(a>-1&&m.indexOf(t)<0&&f([...m,t]),a<0&&m.indexOf(t)>-1){const e=[...m];e.pop(t),f(e)}}))}),[c,n,m]),(0,r.useEffect)((()=>{if(!Object.entries(s).length)return;c.map((e=>{const t=s[e]&&s[e].isRequiredForPdfInfos&&"employer"===s[e].writeBy,a=m.indexOf(e)>-1;return!t||a})).indexOf(!1)>-1?o(!1):o(!0)}),[c,m,s]);const v=(0,r.useCallback)(((e,t)=>t[e]&&t[e].label),[]),w=(0,r.useCallback)(((e,t,s)=>e.split(t).join(s)),[]);return(0,p.jsxs)("div",{className:"input-control-panel",children:[(0,p.jsxs)("div",{className:"input-control-panel-header",children:[(0,p.jsx)("div",{className:"title",children:"\ub370\uc774\ud130 \uc720\ud615"}),(0,p.jsx)("div",{className:"sub-title",children:(0,p.jsx)("ol",{children:x.map((e=>(0,p.jsx)("li",{children:e})))})})]}),(0,p.jsxs)("div",{className:"input-control-panel-content",children:[(0,p.jsxs)("div",{className:"input-list-include",children:[(0,p.jsx)("div",{className:"title",children:"\uc120\ud0dd\ub41c \uc785\ub825\ud56d\ubaa9 \ub9ac\uc2a4\ud2b8"}),c.length?c.map((e=>{const r=s[e]&&s[e].isRequiredForPdfInfos&&"employer"===s[e].writeBy;return(0,p.jsxs)(d.default,{className:"tag",color:""+(m.indexOf(e)>-1||!r?"cyan":"red"),children:[v(e,s),("contract"!==i||!t[e].isRequiredForContract)&&(0,p.jsx)(b.default,{type:"close",onClick:()=>{const t=JSON.stringify(n),r=w(t,`\${formValues.${e}}`,""),i=JSON.parse(r);l(i);const o={...s};delete o[e],a(o)}})]})})):"\uc120\ud0dd\ub41c \uc778\ud48b\uc774 \uc874\uc7ac\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."]}),(0,p.jsxs)("div",{className:"input-list-exclude",children:[(0,p.jsx)("div",{className:"title",children:"\uc120\ud0dd \uac00\ub2a5\ud55c \uc785\ub825\ud56d\ubaa9 \ub9ac\uc2a4\ud2b8"}),h.length?h.map((e=>(0,p.jsx)(d.default,{className:"tag",onClick:()=>{const n={...s};n[e]=t[e],a(n)},children:v(e,t)}))):"\uc120\ud0dd\ud560 \uc778\ud48b\uc774 \uc874\uc7ac\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."]})]})]})};s(81052);var w=s(38266),y=(s(74618),s(58096)),j=(s(75604),s(96674)),N=s(52357),I=s(95447);const{Panel:T}=j.A,S=e=>{const{visible:t,handleClose:s,pdfFormInfos:n,pdfInfos:l,setPdfInfos:i,editTargetInfo:o}=e,[c,u]=(0,r.useState)({}),[m,f]=(0,r.useState)({}),[h,g]=(0,r.useState)([]),[x,v]=(0,r.useState)([]),[S,k]=(0,r.useState)([]),{formValues:V,onChangeFieldValue:C,validateAll:E,invalidFields:L,resetAllErrors:A,refs:D}=(0,N.A)({formInfos:m}),$=(0,r.useCallback)((function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:`\${${e}}`;return e.split(".").length>1?e.split(".").reduce(((e,a)=>t&&t[a]&&t[a].label||s),""):e}),[]),O=(0,r.useCallback)(((e,t)=>{const s=Object.entries(t).find((t=>{let[,s]=t;return s.label===e}));if(!s)return e;return`\${formValues.${s[0]}}`}),[]),F=(0,r.useCallback)(((e,t,s)=>{const a=e.split(/\${.+?}/g),n=e.match(/\${.+?}/g),r=n?n.map((e=>{const a=e.substr(2,e.length-3).trim();return`\${${$(a,t,s)}}`})):[];return a.reduce(((e,t,s)=>r[s]?[...e,t,r[s]]:[...e,t]),[]).join("")}),[]),P=(0,r.useCallback)((e=>{if(!/\${.+?}/g.test(e))return e;const t=e.match(/\${.+?}/g).map((e=>{const t=e.substr(2,e.length-3).trim();return O(t,n)}));return e.split(/\${.+?}/g).reduce(((e,s,a)=>t[a]?[...e,s,t[a]]:[...e,s]),[]).join("")}),[n]),_=(0,r.useCallback)((()=>{A(),u({}),s(),v([]),k([])}),[]);(0,r.useEffect)((()=>{if(!c.title||!Object.keys(n).length)return;let e=F(c.title,n);o.isDocumentSubTitle&&(e=F(c.subTitle,n)),c.hasValueList&&v(c.hasValueList),c.hasNotValueList&&k(c.hasNotValueList),f({editText:{initialValue:e,validator:t=>{if(!t)throw new Error("\uc218\uc815\ud560 \ub0b4\uc6a9\uc774 \uc785\ub825\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.");if(/\${.+?}/g.test(e)){e.match(/\${.+?}/g).forEach((e=>{}))}},parser:e=>e?/\${.+?}/g.test(e)?F(e,n):e:""}})}),[c,n]),(0,r.useEffect)((()=>{Object.entries(n).length&&g(Object.keys(n))}),[n]),(0,r.useEffect)((()=>
1{if(Object.keys(o).length&&Object.keys(l).length&&t)return o.isFooter?o.isFooterContractDate?void u(l.footer.contractDateSection):void u(l.footer.columns[o.footerColumnIndex][o.colRowIndex]):void(o.isDocumentTitle||o.isDocumentSubTitle?u(l):o.isSectionTitle?u(l.sectionList[o.sectionListIndex]):u(l.sectionList[o.sectionListIndex].children[o.sectionItemIndex]))}),[l,o]);const M=L.find((e=>"editText"===e.fieldName))||{};return(0,p.jsx)(w.A,{visible:t,title:"\ubb38\uc11c \ub0b4\uc6a9(\ubb38\uad6c) \uc218\uc815",className:"pdf-edit-modal",onCancel:_,footer:(0,p.jsxs)("div",{className:""+(o.isDocumentTitle||o.isDocumentSubTitle?"":"has-checkbox"),children:[!o.isDocumentTitle&&!o.isDocumentSubTitle&&(0,p.jsx)(y.default,{checked:c.hasSignSection,disabled:o.isFooter,onChange:e=>{let{target:t}=e;const s=JSON.parse(JSON.stringify(l));if(!o.isFooter){if(o.isSectionTitle)return s.sectionList[o.sectionListIndex].hasSignSection=t.checked,void i(s);s.sectionList[o.sectionListIndex].children[o.sectionItemIndex].hasSignSection=t.checked,i(s)}},children:"\uc11c\uba85\ub780"}),(0,p.jsxs)("div",{children:[(0,p.jsx)(a.default,{onClick:_,children:"\ucde8\uc18c"}),(0,p.jsx)(a.default,{type:"primary",onClick:async()=>{const{isValid:e,firstErrorId:t}=await E();if(!e)return void(D[t].current&&D[t].current.focus&&"function"===typeof D[t].current.focus&&D[t].current.focus());const a=JSON.parse(JSON.stringify(l));let n=V.editText;return o.isFooter?o.isFooterContractDate?(/\${.+?}/g.test(n)&&(n=P(n)),a.footer.contractDateSection.title=n,i(a),void s()):(/\${.+?}/g.test(n)&&(n=P(n)),a.footer.columns[o.footerColumnIndex][o.colRowIndex].title=n,i(a),void s()):o.isDocumentTitle?(a.title=n,i(a),void s()):o.isDocumentSubTitle?(/\${.+?}/g.test(n)&&(n=P(n)),a.subTitle=n,i(a),void s()):o.isSectionTitle?(/\${.+?}/g.test(n)&&(n=P(n)),a.sectionList[o.sectionListIndex].title=n,a.sectionList[o.sectionListIndex].hasValueList=x,a.sectionList[o.sectionListIndex].hasNotValueList=S,i(a),void s()):(/\${.+?}/g.test(n)&&(n=P(n)),a.sectionList[o.sectionListIndex].children[o.sectionItemIndex].title=n,a.sectionList[o.sectionListIndex].children[o.sectionItemIndex].hasValueList=x,a.sectionList[o.sectionListIndex].children[o.sectionItemIndex].hasNotValueList=S,i(a),void _())},children:"\uc218\uc815"})]})]}),children:(0,p.jsxs)(j.A,{bordered:!0,defaultActiveKey:["1"],children:[(0,p.jsxs)(T,{header:"\ubb38\uad6c\uc218\uc815",children:[h.length?(0,p.jsx)("div",{className:"available-inputs",children:h.map((e=>{const t=`\${formValues.${e}}`,s=t.substr(2,t.length-3).trim(),a=$(s,n);return(0,p.jsx)(d.default,{className:"input-tags",onClick:()=>C("editText",V.editText+t),children:a})}))}):"",(0,p.jsx)(I.A,{label:"\ubb38\uad6c\uc218\uc815",size:"large",ref:D.editText,fieldName:"editText",value:V.editText?V.editText:"",onChange:C,errorMessage:M.errorMessage,description:(0,p.jsxs)(r.Fragment,{children:["\ubb38\uc11c\uc758 \ubb38\uad6c\ub97c \uc218\uc815\ud574 \uc8fc\uc138\uc694.",(0,p.jsx)("br",{}),(0,p.jsxs)("strong",{children:["\uaebd\uc1e0(",") \ub85c \uac10\uc2f8\uc9c4 \uc601\uc5ed\uc740 \uc778\ud48b\uc601\uc5ed\uc73c\ub85c, \uc0ad\uc81c\ud558\uc2e4 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."]})]})})]},"1"),!o.isFooter&&!o.isDocumentTitle&&!o.isDocumentSubTitle&&(0,p.jsx)(T,{header:"\uc870\uac74\uc124\uc815 (has)",children:(0,p.jsxs)("div",{children:[h.length?(0,p.jsx)("div",{className:"available-inputs",children:h.map((e=>{const t=`\${formValues.${e}}`,s=t.substr(2,t.length-3).trim(),a=$(s,n);return(0,p.jsx)(d.default,{className:"input-tags",onClick:()=>{const t=[...x];t.indexOf(e)<0&&(t.push(e),v(t))},children:a})}))}):"",x.length?x.map((e=>{const t=`\${formValues.${e}}`,s=t.substr(2,t.length-3).trim(),a=$(s,n);return(0,p.jsxs)(d.default,{className:"input-tags",color:"cyan",children:[a,(0,p.jsx)(b.default,{type:"close",onClick:()=>{const t=x.filter((t=>e!==t));v(t)}})]})})):"\uc870\uac74 \uc5c6\uc74c"]})}
1,"2"),!o.isFooter&&!o.isDocumentTitle&&!o.isDocumentSubTitle&&(0,p.jsx)(T,{header:"\uc870\uac74\uc124\uc815 (has not)",children:(0,p.jsxs)("div",{children:[h.length?(0,p.jsx)("div",{className:"available-inputs",children:h.map((e=>{const t=`\${formValues.${e}}`,s=t.substr(2,t.length-3).trim(),a=$(s,n);return(0,p.jsx)(d.default,{className:"input-tags",onClick:()=>{const t=[...S];t.indexOf(e)<0&&(t.push(e),k(t))},children:a})}))}):"",S.length?S.map((e=>{const t=`\${formValues.${e}}`,s=t.substr(2,t.length-3).trim(),a=$(s,n);return(0,p.jsxs)(d.default,{className:"input-tags",color:"red",children:[a,(0,p.jsx)(b.default,{type:"close",onClick:()=>{const t=S.filter((t=>e!==t));k(t)}})]})})):"\uc870\uac74 \uc5c6\uc74c"]})},"3")]})})};s(59075);var k=s(24633),V=(s(7081),s(24663)),C=s(95146),E=s(86234);const L=e=>{const{visible:t,handleClose:s,templateName:n,tags:i,memo:o,companyTemplateInfo:c,setCompanyTemplateInfo:u,setCompanyID:d,templateType:m,saveCallback:f}=e,[h,g]=(0,r.useState)({}),{isJoberAdmin:b}=(0,r.useContext)(E.A),[x,v]=(0,r.useState)([]),{request:y,loading:j}=(0,l.A)({showErrorMessage:!0});(0,r.useEffect)((()=>{n&&g({templateType:{initialValue:m},templateName:{initialValue:n},memo:{initialValue:o},tags:{initialValue:i}})}),[m,n,i,o]);const{formValues:T,onChangeFieldValue:S}=(0,N.A)({formInfos:h});return(0,p.jsxs)(w.A,{title:"\ud15c\ud50c\ub9bf \uc800\uc7a5",visible:t,onCancel:s,footer:(0,p.jsxs)("div",{children:[(0,p.jsx)(a.default,{onClick:s,children:"\ucde8\uc18c"}),(0,p.jsx)(a.default,{onClick:()=>{f({newTemplateInfo:T,isUpdate:!0}),s()},children:"\uc800\uc7a5"}),(0,p.jsx)(a.default,{type:"primary",onClick:()=>{f({newTemplateInfo:T,isUpdate:!1}),s()},children:"\uc0dd\uc131"})]}),children:[(0,p.jsx)(C.A,{label:"\ud15c\ud50c\ub9bf \uc885\ub958",size:"large",fieldName:"templateType",options:[{label:"\uadfc\ub85c\uacc4\uc57d\uc11c",value:"contract"},{label:"\ud504\ub9ac\ub79c\uc11c \uacc4\uc57d\uc11c",value:"freelancer"}],value:T.templateType?T.templateType:"contract",onChange:S,description:"\ud15c\ud50c\ub9bf\uc758 \uc885\ub958\ub97c \uc9c0\uc815\ud574\uc8fc\uc138\uc694."}),(0,p.jsx)(I.A,{label:"\ud15c\ud50c\ub9bf \uba85",size:"large",fieldName:"templateName",value:T.templateName?T.templateName:"",onChange:S,description:"\ud15c\ud50c\ub9bf\uc758 \uc774\ub984\uc744 \uc9c0\uc815\ud574\uc8fc\uc138\uc694."}),(0,p.jsx)(I.A,{label:"\uba54\ubaa8",size:"large",fieldName:"memo",value:T.memo?T.memo:"",onChange:S,description:"\ud15c\ud50c\ub9bf\uc5d0 \ub300\ud55c \uc124\uba85\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694."}),(0,p.jsx)(I.A,{label:"\ud0dc\uadf8",size:"large",fieldName:"tags",value:T.tags?T.tags:"",onCh
1ange:S,description:"\ud0dc\uadf8\ub97c \ucf64\ub9c8(,)\ub85c \uad6c\ubd84\uc9c0\uc5b4 \uc785\ub825\ud574\uc8fc\uc138\uc694."}),(0,p.jsx)("div",{children:c}),b&&(0,p.jsxs)(r.Fragment,{children:[(0,p.jsx)(V.default.Search,{size:"large",placeholder:"\ud68c\uc0ac\uba85\uc744 \uac80\uc0c9\ud574\uc8fc\uc138\uc694. (\uc120\ud0dd\ud558\uc9c0 \uc54a\uc73c\uba74 \uacf5\ud1b5)",disabled:j,onSearch:async e=>{const t=await y({method:"GET",url:"/v2/company/admin/search-by-name",params:{includingTester:!0,spaceName:e}});t&&v(t.data)},style:{width:"100%"}}),(0,p.jsx)(k.A,{itemLayout:"horizontal",dataSource:x,renderItem:e=>(0,p.jsx)(k.A.Item,{actions:[(0,p.jsx)(a.default,{loading:j,onClick:()=>{u(`${e.name}\ud68c\uc0ac \uc804\uc6a9\uc11c\uc2dd`),d(e.companyID)},children:"\uc120\ud0dd\ud558\uae30"})],children:(0,p.jsx)(k.A.Item.Meta,{title:[e.name,e.presidentName,e.email].join("/")})})})]})]})},A=e=>{const{match:{params:t},history:{goBack:s}}=e,{isJoberAdmin:d}=(0,r.useContext)(E.A),[m,f]=(0,r.useState)(!1),[h,b]=(0,r.useState)({isDocumentTitle:!1,sectionListIndex:0,isSectionTitle:!1,sectionItemIndex:0}),[x,w]=(0,r.useState)("common"),[y,j]=(0,r.useState)("Untitled"),[N,I]=(0,r.useState)("contract"),[T,k]=(0,r.useState)(""),[V,C]=(0,r.useState)(""),[A,D]=(0,r.useState)({}),[$,O]=(0,r.useState)({}),[F,P]=(0,r.useState)({}),[_,M]=(0,r.useState)(""),{request:W,response:B}=(0,l.A)({});(0,r.useEffect)((()=>{W({method:"GET",url:`/v2/contract/template/${t.templateID}`})}),[]),(0,r.useEffect)((()=>{if(!B||!B.formInfos||!B.pdfInfos)return;I(B.type),w(B.companyID),j(B.templateName),k(B.tags),C(B.memo),M(B.companyTemplateInfo);const e=Object.entries(B.formInfos).reduce(((e,t)=>{let[s,a]=t;const n=a;let r=null,l=null;return a.validatorName&&o.A[a.validatorName]&&(r=o.A[a.validatorName]),a.parserName&&c.A[a.parserName]&&(l=c.A[a.parserName]),{...e,[s]:{...n,parser:l,validator:r}}}),{});O(e);const t=Object.entries(e).reduce(((e,t)=>{let[s,a]=t;return{...e,[s]:a.initialValue}}),{});D(t),P(B.pdfInfos)}),[B]);const[K,z]=(0,r.useState)({}),{request:q,response:R}=(0,l.A)({});(0,r.useEffect)((()=>{q({method:"GET",url:"/v2/contract/template/forms/all"})}),[]),(0,r.useEffect)((()=>{R&&z(R)}),[R]);const[J,U]=(0,r.useState)(!1),[H,G]=(0,r.useState)(!1),{request:Y,loading:Q,response:X}=(0,l.A)({}),{request:Z,loading:ee,response:te}=(0,i.A)();return(0,r.useEffect)((()=>{X&&(n.A.success(X.message),(0,u.Ay)(`/template/apply/${t.templateID}`))}),[X]),(0,r.useEffect)((()=>{te&&(n.A.success(te.message),(0,u.Ay)("/admin/template"))}),[te]),(0,p.jsxs)("div",{className:"modular-contract-edit",children:[(0,p.jsx)("div",{className:"modular-contract-edit-header",children:(0,p.jsxs)("div",{className:"modular-contract-edit-header-content",children:[(0,p.jsx)(a.default,{className:"cancel-btn",onClick:()=>{window.confirm("\uc218\uc815\uc744 \ucde8\uc18c\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c? \ubcc0\uacbd\ub41c \ub0b4\uc6a9\uc774 \uc800\uc7a5\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.")&&s()},children:"\uc218\uc815\ucde8\uc18c"}),`\uadfc\ub85c\uacc4\uc57d\uc11c \ud15c\ud50c\ub9bf \uc0dd\uc131 - ${y}`,(0,p.jsx)(a.default,{className:"done-btn",type:"primary",disabled:!J,loading:Q||ee,onClick:()=>G(!0),children:"\ud15c\ud50c\ub9bf \uc800\uc7a5"})]})}),(0,p.jsxs)("div",{className:"modular-contract-edit-content",children:[(0,p.jsx)(g,{pdfInfos:F,setPdfInfos:P,formInfos:$,values:A,setEditModalVisible:f,setEditTargetInfo:b}),(0,p.jsx)(v,{templateType:N,allFormInfos:K,formInfos:$,setFormInfos:O,pdfInfos:F,setPdfInfos:P,setValidToSave:U})]}),(0,p.jsx)(S,{visible:m,handleClose:()=>{b({}),f(!1)},pdfFormInfos:$,pdfInfos:F,setPdfInfos:P,editTargetInfo:h}),(0,p.jsx)(L,{visible:H,handleClose:()=>G(!1),templateName:y,tags:T,memo:V,companyTemplateInfo:_,setCompanyTemplateInfo:M,setCompanyID:w,templateType:N,saveCallback:e=>{let{newTemplateInfo:s,isUpdate:a}=e;if(!J)return void alert("\uc120\ud0dd\ub41c \uc785\ub825\ud56d\ubaa9\uc774 pdf \ubb38\uc11c \uc548\uc5d0 \ud3ec\ud568\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.");const n=Object.keys($),r=a?"PUT":"POST",l=a?`/v2/contract/template/${t.templateID}`:"/v2/contract/template",i={pdfInfos:F,formList:n,templateName:s.templateName,memo:s.memo,tags:s.tags,type:s.templateType,companyID:x};d?Z({method:r,url:l,data:i}):Y({method:r,url:l,data:i})}})]})};A.defaultProps={history:{goBack:()=>console.log("go back func is not defined")}};const D=A},52357:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(9950);const n=e=>{const{formInfos:t,defaultSetKeys:s}=e,[n,r]=(0,a.useState)({}),[l,i]=(0,a.useState)([]),[o,c]=(0,a.useState)(!1),[u,d]=(0,a.useState)(null),[m,f]=(0,a.useState)({});(0,a.useEffect)((()=>{Object.keys(t).length&&c(!0)}),[t]),(0,a.useEffect)((()=>
1{if(!o||!t||!Object.keys(t).length)return;const e=Object.entries(t).reduce(((e,t)=>{let[s,a]=t;const n=e=>a.parser?a.parser(e):e;return a.isNonetaxable?{...e,possibleNonetaxableValue:0,[s]:n(a.initialValue)}:{...e,[s]:n(a.initialValue)}}),{}),n=Object.entries(t).filter((e=>{let[,t]=e;return"function"===typeof t.listener})).filter((e=>{let[t]=e;return!s||s.length&&!s.includes(t)})).reduce(((s,a)=>{let[n,r]=a;const l=e=>r.parser?r.parser(e):e;return{...s,...t[n].listener({formValues:e,value:l(r.initialValue),fieldName:n,formInfos:t}),[n]:l(r.initialValue)}}),{}),l={...e,...n};r(l),c(!1),f(Object.keys(t).reduce(((e,t)=>{const s=a.createRef();return{...e,[t]:s}}),{}))}),[o,s]),(0,a.useEffect)((()=>{u&&(r({...n,...u}),d(null))}),[u]);const h=(0,a.useCallback)((()=>c(!0)),[]),p=(0,a.useCallback)((()=>i([])),[]),g=(0,a.useCallback)((async(e,s)=>{let a,r,o=!0,c=e;if(t[e]&&t[e].validator&&"function"===typeof t[e].validator)try{r=await t[e].validator({fieldName:e,value:s,formValues:n}),o=!0}catch(m){o=!1,a=m.message,c="Error"===m.name?e:m.name}r&&Object.keys(r).length&&d(r);const u=l.find((t=>t.fieldName===e||t.targetField===c));if(!o){const t={fieldName:e,targetField:c,errorMessage:a};u||i([...l,t]),u&&i(l.map((s=>s.fieldName===e||s.targetField===c?t:s)))}return o&&u&&i(l.filter((t=>t.fieldName!==e))),{isValid:o,errorMessage:a,targetField:c}}),[n,l]),b=(0,a.useCallback)((async()=>{const e=[],t=Object.entries(n).map((async t=>{let[s,a]=t;const{isValid:n,errorMessage:r,targetField:l}=await g(s,a);if(!n){const t={fieldName:s,targetField:l,errorMessage:r};e.push(t)}}));return await Promise.all(t),i(e),{isValid:0===e.length,firstErrorId:e.length>0?e[0].targetField:""}}),[n]);return{formValues:n,onChangeFieldValue:(e,s)=>{if("string"!==typeof e)return;if(!t[e])return void r({...n,[e]:s});const a=t[e]&&t[e].parser&&"function"===typeof t[e].parser?t[e].parser(s,n):s;if(t[e]&&t[e].listener&&"function"===typeof t[e].listener){const s=t[e].listener({formValues:n,value:a,fieldName:e,formInfos:t});g(e,a),r({...n,...s,[e]:a})}else"email"===e||"paymentDate"===e?r({...n,[e]:a}):(g(e,a),r({...n,[e]:a}))},resetAllFields:h,resetAllErrors:p,validate:g,validateAll:b,invalidFields:l,setFormValues:r,refs:m}}},53567:(e,t,s)=>{s.d(t,{A:()=>d});var a=s(59051),n=s.n(a),r=s(8814),l=s(74344),i=s(92970),o=s(35735);const c={baby:{nameInKorean:"\uc721\uc544\uc218\ub2f9",maxValue:2e5},meal:{nameInKorean:"\uc2dd\ub300",maxValue:2e5},research:{nameInKorean:"\uc5f0\uad6c\uc218\ub2f9",maxValue:2e5},drive:{nameInKorean:"\uc790\uac00\uc6b4\uc804\ubcf4\uc870\uae08",maxValue:2e5}},u={checkIsNotEmpty:e=>{let{value:t}=e;if(!t)throw new Error("\uac12\uc774 \uc785\ub825\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.")},checkEmailValidation:async e=>{let{value:t}=e;if(!t)throw new Error("\uc774\uba54\uc77c\uc774 \uc785\ub825\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.");if(!(0,i.A)(t))throw new Error("\uc774\uba54\uc77c \ud615\uc2dd\uc774 \uc62c\ubc14\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.");const s=await l.default.get("/v1/account/check-email",{params:{email:t}});if(s&&s.data&&s.data.exists)throw new Error("\uc774\ubbf8 \uc874\uc7ac\ud558\ub294 \uc774\uba54\uc77c \uc785\ub2c8\ub2e4.")},socialNumberValidator:e=>{let{value:t}=e;if(!t)throw new Error("\uac12\uc774 \uc785\ub825\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.");if(!(0,r.validateSocialNumber)(t))throw new Error("\uc8fc\ubbfc\ub4f1\ub85d\ubc88\ud638 \uc591\uc2dd\uc774 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.")},checkSalaryPerTimeIsValid:async e=>{let{value:t,formValues:s}=e;const a=(0,o.A)(t),n=s.wage||new r.Wage({amount:a,type:"hourly"});if(!n.\ud5c8\uc6a9_\uc5ec\ubd80)throw new Error("\ucd5c\uc800\uc2dc\uae09\uc5d0 \ubbf8\ub2ec\ud558\ub294 \uae09\uc5ec\uc785\ub2c8\ub2e4.");return n.\ud5c8\uc6a9_\uc5ec\ubd80?{possibleNonetaxableValue:n.\ube44\uacfc\uc138_\ud5c8\uc6a9_\uae08\uc561,hourlyWage:n.\ud1b5\uc0c1\uc2dc\uae09}:{}},checkSalaryPerYearIsValid:async e=>{let{value:t,formValues:s}=e;const a=(0,o.A)(t),n=s.wage||new r.Wage({amount:a,type:"yearly"});if(!n.\ud5c8\uc6a9_\uc5ec\ubd80)throw new Error("\ucd5c\uc800\uc2dc\uae09\uc5d0 \ubbf8\ub2ec\ud558\ub294 \uae09\uc5ec\uc785\ub2c8\ub2e4.");return n.\ud5c8\uc6a9_\uc5ec\ubd80?{possibleNonetaxableValue:n.\ube44\uacfc\uc138_\ud5c8\uc6a9_\uae08\uc561,hourlyWage:n.\ud1b5\uc0c1\uc2dc\uae09}:{}},checkSalaryPerMonthIsValid:async e=>{let{value:t,formValues:s}=e;const a=(0,o.A)(t),n=s.wage||new r.Wage({amount:a,type:"monthly"});if(!n.\ud5c8\uc6a9_\uc5ec\ubd80)throw new Error("\ucd5c\uc800\uc2dc\uae09\uc5d0 \ubbf8\ub2ec\ud558\ub294 \uae09\uc5ec\uc785\ub2c8\ub2e4.");return n.\ud5c8\uc6a9_\uc5ec\ubd80?{possibleNonetaxableValue:n.\ube44\uacfc\uc138_\ud5c8\uc6a9_\uae08\uc561,hourlyWage:n.\ud1b5\uc0c1\uc2dc\uae09}:{}},checkSalaryIsValid:async e=>{let{value:t,formValues:s}=e;const a=(0,o.A)(t),n=s.wage||new r.Wage({amount:a});if(!n.\ud5c8\uc6a9_\uc5ec\ubd80)throw new Error("\ucd5c\uc800\uc2dc\uae09\uc5d0 \ubbf8\ub2ec\ud558\ub294 \uae09\uc5ec\uc785\ub2c8\ub2e4.");return n.\ud5c8\uc6a9_\uc5ec\ubd80?{possibleNonetaxableValue:n.\ube44\uacfc\uc138_\ud5c8\uc6a9_\uae08\uc561,hourlyWage:n.\ud1b5\uc0c1\uc2dc\uae09}:{}},checkNonetaxableIsValid:async e=>{let{value:t,formValues:s,fieldName:a}=e;const n=(0,o.A)(t),l=c[a]||{},{maxValue:i}=l;if(i&&n>i)throw new Error(`${l.nameInKorean} \ucd5c\ub300 \uc124\uc815\uac00\ub2a5\uae08\uc561(${l.maxValue.toLocaleStr
1ing()}\uc6d0) \ucd08\uacfc`);if(!(s.wage||new r.Wage).\ube44\uacfc\uc138\uc218\ub2f9_\ud5c8\uc6a9\uc5ec\ubd80)throw new Error("\ube44\uacfc\uc138 \uc218\ub2f9 \uc124\uc815 \uac00\ub2a5 \uae08\uc561\uc744 \ucd08\uacfc\ud558\uc600\uc2b5\ub2c8\ub2e4.");return{}},checkSalaryCalculationDateExtraTextValidator:e=>{let{value:t,formValues:s}=e;if(s&&"A01099"===s.salaryCalculationDate&&!t)throw new Error("\uae09\uc5ec \uc0b0\uc815\uae30\uac04 \uae30\ud0c0 \ub0b4\uc6a9\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694.")},checkPaymentDateValidator:e=>{let{value:t}=e;const s=()=>(t||"").split(" ")[0]||"",a=()=>(t||"").split(" ")[1]||"";if(!s()||!["\ub2f9\uc6d4","\uc775\uc6d4","\ub9e4\uc8fc","\ub9e4\uc77c"].includes(s()))throw new Error("\uc784\uae08 \uc9c0\uae09 \uc635\uc158\uc744 \uc120\ud0dd\ud574 \uc8fc\uc138\uc694.");if(("\ub2f9\uc6d4"===s()||"\uc775\uc6d4"===s())&&(!a()||1===a().length))throw new Error("\uc784\uae08\uc9c0\uae09\uc77c\uc744 \uc785\ub825\ud558\uac70\ub098 \ub9d0\uc77c\uc744 \uc120\ud0dd\ud574 \uc8fc\uc138\uc694.");if("\ub9e4\uc8fc"===s()&&!a().includes("\uc694\uc77c"))throw new Error("\uc784\uae08 \uc9c0\uae09 \uc694\uc77c\uc744 \uc120\ud0dd\ud574 \uc8fc\uc138\uc694.")},checkIsWeeklyOverTimeWorkHoursValid:e=>{let{value:t,formValues:s}=e;if(t&&t.length){const e=t.reduce(((e,t)=>e+t.value),0);if(e>0){if(e>12)throw new Error("\uc5f0\uc7a5\uadfc\ubb34 \uc2dc\uac04\uc758 \ucd1d\ud569\uc740 12\uc2dc\uac04\uc744 \ub118\uae38\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.");const t=s.wage||new r.Wage;if(t.weeklyOvertimeHour=e,!t.\ucd5c\uc800\uc784\uae08_\uc774\uc0c1_\uc5ec\ubd80)throw new Error("\uc124\uc815\ud55c \uc5f0\uc7a5\uc2dc\uac04\uc744 \uc801\uc6a9\ud558\uba74 \ucd5c\uc800\uc784\uae08 \ubbf8\ub2ec\uc785\ub2c8\ub2e4.");if(t.workers>=5&&!t.\uc5f0\uc7a5\uc2dc\uae09_\ud1b5\uc0c1\uc2dc\uae09_\ube44\uc728_\uc774\uc0c1_\uc5ec\ubd80)throw new Error("\uc124\uc815\ud55c \uc5f0\uc7a5\uc2dc\uac04\uc744 \uc801\uc6a9\ud558\uba74 \uac00\uc0b0\uc218\ub2f9 \ube44\uc728\uc774 1.5\ub97c \ub118\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.")}}},workTimeAndBreakTimeValidator:e=>{let{value:t,formValues:s}=e;const{numberOfEmployees:a,workTimeTable:n}=s,l=s.wage||new r.Wage;let i=0;if(Object.values(t).forEach((e=>{if(e.workStartTime&&e.workEndTime&&e.breakTime){const[t,r]=e.workStartTime.split(":"),l=Number(t)+Number(r)/60,[o,c]=e.workEndTime.split(":"),u=(Number(o)+Number(c)/60-l-e.breakTime/60).toFixed(1);if(i+=Number(u),u>8&&a>4){const e=new Error("5\uc778 \uc774\uc0c1 \uae30\uc5c5\uc758 \uacbd\uc6b0 \uc77c 8\uc2dc\uac04 \uc774\uc0c1 \uadfc\ub85c\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.");throw s.workTimeTable&&(e.name="workTimeTable"),e}const d=u/4;if(d>=1&&d<2&&e.breakTime<30){const e=new Error("\ud734\uc2dd\uc2dc\uac04\uc740 4\uc2dc\uac04 \uadfc\ub85c\ub9c8\ub2e4 30\ubd84\uc529 \ubd80\uc5ec\ub418\uc5b4\uc57c\ud569\ub2c8\ub2e4.");throw n&&(e.name="workTimeTable"),e}if(d>=2&&d<3&&e.breakTime<60){const e=new Error("\ud734\uc2dd\uc2dc\uac04\uc740 4\uc2dc\uac04 \uadfc\ub85c\ub9c8\ub2e4 30\ubd84\uc529 \ubd80\uc5ec\ub418\uc5b4\uc57c\ud569\ub2c8\ub2e4.");throw n&&(e.name="workTimeTable"),e}if(d>=3&&d<4&&e.breakTime<90){const e=new Error("\ud734\uc2dd\uc2dc\uac04\uc740 4\uc2dc\uac04 \uadfc\ub85c\ub9c8\ub2e4 30\ubd84\uc529 \ubd80\uc5ec\ub418\uc5b4\uc57c\ud569\ub2c8\ub2e4.");throw n&&(e.name="workTimeTable"),e}}})),i>40&&a>4){const e=new Error("5\uc778 \uc774\uc0c1 \uae30\uc5c5\uc758 \uacbd\uc6b0 \uc8fc\uadfc\ub85c\uc2dc\uac04\uc774 40\uc2dc\uac04\uc744 \ucd08\uacfc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.");throw n&&(e.name="workTimeTable"),e}if(i+l.weeklyOvertimeHour>52&&a>4){const e=new Error("5\uc778 \uc774\uc0c1 \uae30\uc5c5\uc758 \uacbd\uc6b0 \uc8fc\ub2f9\uadfc\ub85c\uc2dc\uac04\uc774 52\uc2dc\uac04\uc744 \ucd08\uacfc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.");throw n&&(e.name="workTimeTable"),e}},extraHowComeToKnowValidator:e=>{let{value:t,formValues:s}=e;if(s&&s.howComeToKnow&&["\uc9c0\uc778\uc18c\uac1c","\uae30\ud0c0"].includes(s.howComeToKnow)&&!t)throw new Error("\uc0c1\uc138 \ub0b4\uc6a9\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694.")},termEndDateValidator:e=>{let{value:t,formValues:s}=e;if(!t)throw new Error("\uadfc\ub85c\uacc4\uc57d \uc885\ub8cc\uc77c\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694.");if(s.termFrom){const e=n()(s.termFrom),a=n()(t);if(e.isAfter(a))throw new Error("\uacc4\uc57d \uc885\ub8cc\uc77c\uc740 \uacc4\uc57d \uc2dc\uc791\uc77c\ubcf4\ub2e4 \uc774\uc804\uc77c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.")}},freeTermEndDateValidator:e=>{let{value:t,formValues:s}=e;if(!t)throw new Error("\uadfc\ub85c\uacc4\uc57d \uc885\ub8cc\uc77c\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694.");if(s.freeTermFrom){const e=n()(s.freeTermFrom),a=n()(t);if(e.isAfter(a))throw new Error("\uacc4\uc57d \uc885\ub8cc\uc77c\uc740 \uacc4\uc57d \uc2dc\uc791\uc77c\ubcf4\ub2e4 \uc774\uc804\uc77c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.")}},optionalTermEndDateValidator:e=>{let{value:t,formValues:s}=e;if(t&&s.termFrom){const e=n()(s.termFrom),a=n()(t);if(e.isAfter(a))throw new Error("\uacc4\uc57d \uc885\ub8cc\uc77c\uc740 \uacc4\uc57d \uc2dc\uc791\uc77c\ubcf4\ub2e4 \uc774\uc804\uc77c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.")}},probationPeriodEtcValidator:e=>{let{value:t,formValues:s}=e;if(s&&s.probationPeriod&&"etc"===s.probationPeriod&&!t)throw new Error("\uc218\uc2b5\uacc4\uc57d\uae30\uac04 \uc885\ub8cc\uc77c\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694.")},probationSalaryPercentValidator:e=>{let{value:t,formValues:s}=e;const{wage:a}=s;
1if(!a)return;const n=a.\ud1b5\uc0c1\uc2dc\uae09,r=.9*a.\ucd5c\uc800\uc2dc\uae09;let l;switch(t){case"100%":l=n;break;case"90%":l=.9*n;break;case"80%":l=.8*n;break;default:l=0}if(l&&l<r)throw new Error("\uadfc\ub85c\uae30\uc900\ubc95 \uc900\uc218\ub97c \uc704\ud574 \uc784\uae08\ube44\uc728\uc774\ub098 \uae09\uc5ec \ucd1d\uc561\uc744 \uc218\uc815\ud574\uc8fc\uc138\uc694.")},probationSalaryEtcValidator:e=>{let{value:t,formValues:s}=e;if(s&&s.probationSalaryPercent&&"etc"===s.probationSalaryPercent){if(!(0,o.A)(t))throw new Error("\uc218\uc2b5\uacc4\uc57d\uae30\uac04 \ub3d9\uc548 \uc9c0\uae09\ud560 \uc784\uae08\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694.");const{wage:e}=s;if(!e)return;const a=new r.Wage({...e,type:"monthly"}),n=.9*e.\ucd5c\uc800\uc2dc\uae09;if(a.amount=(0,o.A)(t),a.\ud1b5\uc0c1\uc2dc\uae09<n)throw new Error("\uadfc\ub85c\uae30\uc900\ubc95 \uc900\uc218\ub97c \uc704\ud574 \uc218\uc2b5\uae30\uac04 \uc784\uae08\ucd1d\uc561\uc774\ub098 \uae09\uc5ec \ucd1d\uc561\uc744 \uc218\uc815\ud574\uc8fc\uc138\uc694.")}},customOverTimeValidator:e=>{let{value:t,formValues:s}=e;if(t>12)throw new Error("\uc5f0\uc7a5\uadfc\ub85c \uc2dc\uac04\uc740 12\uc2dc\uac04\uc744 \ucd08\uacfc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.");if(!t&&s.blanketWageValueDirectInput&&s.isUseBlanketWageDirectInput)throw new Error("\uc5f0\uc7a5\uadfc\ub85c \uc2dc\uac04\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694.")},blanketWageValueDirectInputValidator:e=>{let{value:t,formValues:s}=e;if(!t&&s.overTimesDirectInput&&s.isUseBlanketWageDirectInput)throw new Error("\uc5f0\uc7a5\uc218\ub2f9\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694.")},freePayCalculateMethodEtcValidator:e=>{let{value:t,formValues:s}=e;if(s.freePaymentCalculateMethod&&"etc"===s.freePaymentCalculateMethod&&!t)throw new Error("\uacc4\uc57d\uae08 \uc0b0\uc815\ubc29\uc2dd\uc744 \uc9c1\uc811 \uc785\ub825\ud574\uc8fc\uc138\uc694.")},freeDeductionMethodEtcValidator:e=>{let{value:t,formValues:s}=e;if(s.freeDeductionMethod&&"etc"===s.freeDeductionMethod&&!t)throw new Error("\uacf5\uc81c\ubc29\uc2dd\uc744 \uc9c1\uc811 \uc785\ub825\ud574\uc8fc\uc138\uc694.")}},d=u},55770:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(8814),n=s(35735),r=s(41999);const l={priceParser:e=>{const t=(0,n.A)(e);return t?Number(`${t}`).toLocaleString():null}};l.phoneNumberParser=r.A,l.bizNumberParser=a.formatBizNumber,l.numberParser=e=>{const t=Number(e);return isNaN(t)?0:t},l.socialNumberParser=a.formatSocialNumber;const i=l},88396:()=>{},95146:(e,t,s)=>{s.d(t,{A:()=>u});s(34549);var a=s(75811),n=(s(55378),s(33784)),r=(s(36338),s(120)),l=(s(6086),s(19804)),i=s(9950),o=(s(88396),s(44414));const c=i.forwardRef(((e,t)=>{const{options:s,block:c,radioButton:u,className:d,style:m,label:f,isSideLabel:h,size:p,fieldName:g,value:b,onChange:x,errorMessage:v,description:w}=e,[y,j]=(0,i.useState)(!1),N=(0,i.useCallback)((e=>{const t=e.target.value;x(g,t)}),[x]);(0,i.useEffect)((()=>{j(!v)}),[v]);const I={className:`jober-custom-form-item ${h?"side-label":""} ${d||""}`,label:f,validateStatus:y?"":"error",help:v,style:m},T=(0,o.jsx)(l.default.Group,{...e,ref:t,value:b,onChange:N,size:p,children:u?s.map((e=>(0,o.jsx)(l.default.Button,{value:e.value,children:e.label},e.value))):s.map((e=>(0,o.jsx)(l.default,{value:e.value,style:c?{display:"block",height:"30px",lineHeight:"30px"}:{},children:e.label},e.value)))});if(w){const e={...I,label:(0,o.jsxs)(i.Fragment,{children:[f,(0,o.jsx)(n.default,{overlayClassName:"jober-custom-tooltip",trigger:"click",title:"string"===typeof w?(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:w}}):w,placement:"top",getPopupContainer:()=>document.getElementById(g),children:(0,o.jsx)(r.default,{type:"question-circle",id:g})})]})};return(0,o.jsx)(a.A.Item,{...e,children:T})}return(0,o.jsx)(a.A.Item,{...I,children:T})}));c.defaultProps={options:[]};const u=c},95447:(e,t,s)=>{s.d(t,{A:()=>c});s(34549);var a=s(75811),n=(s(55378),s(33784)),r=(s(36338),s(120)),l=(s(7081),s(24663)),i=s(9950),o=(s(88396),s(44414));const c=i.forwardRef(((e,t)=>{const{size:s,className:c,style:u,label:d,disabled:m,isSideLabel:f,fieldName:h,value:p,onChange:g,onBlur:b,errorMessage:x,placeholder:v,description:w,siblings:y,onKeyDown:j,onKeyUp:N}=e,[I,T]=(0,i.useState)(!0),S=(0,i.useCallback)((e=>{const t=e.target.value;g(h,t)}),[g]);(0,i.useEffect)((()=>{T(!x)}),[x]);const k={className:`jober-custom-form-item ${f?"side-label":""} ${c||""} ${y&&y.length?"has-sibling":""}`,label:d,validateStatus:I?"":"error",help:x,style:u},V=(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(l.default,{...e,ref:t,value:p,onChange:S,onBlur:()=>b&&b(h,p),size:s,placeholder:v,disabled:m,onKeyDown:j,onKeyUp:N}),y]});if(w){const e={...k,label:(0,o.jsxs)("div",{children:[d,(0,o.jsx)(n.default,{overlayClassName:"jober-custom-tooltip",trigger:"click",title:"string"===typeof w?(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:w}}):w,placement:"top",getPopupContainer:()=>document.getElementById(h),children:(0,o.jsx)(r.default,{type:"question-circle",id:h})})]})};return(0,o.jsx)(a.A.Item,{...e,children:V})}return(0,o.jsx)(a.A.Item,{...k,children:V})}))}}]);
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.