1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2701,8935],{53162:function(e,t,n){"use strict";n.d(t,{r:function(){return c}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("title",null,"Failed"),l=r.createElement("g",{id:"Failed",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Hire/Inactive/Info",transform:"translate(3.000000, 3.000000)"},r.createElement("circle",{id:"Oval",fill:"#FF774F",cx:9,cy:9,r:9}),r.createElement("line",{x1:9,y1:4,x2:9,y2:10,id:"Path-2",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round"}),r.createElement("line",{x1:9,y1:13,x2:9,y2:14,id:"Path-2",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round"}))),o=function(e){var t=e.svgRef,n=e.title,o=a(e,["svgRef","title"]);return r.createElement("svg",i({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},o),void 0===n?s:n?r.createElement("title",null,n):null,l)},c=r.forwardRef((function(e,t){return r.createElement(o,i({svgRef:t},e))}))},44162:function(e,t,n){"use strict";n.d(t,{r:function(){return c}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("title",null,"Status_Empty"),l=r.createElement("g",{id:"Status_Empty",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M12,2 C17.5228475,2 22,6.4771525 22,12 C22,17.5228475 17.5228475,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C16.418278,20 20,16.418278 20,12 C20,7.581722 16.418278,4 12,4 Z",id:"Oval",fill:"#D5DAEC",fillRule:"nonzero"})),o=function(e){var t=e.svgRef,n=e.title,o=a(e,["svgRef","title"]);return r.createElement("svg",i({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},o),void 0===n?s:n?r.createElement("title",null,n):null,l)},c=r.forwardRef((function(e,t){return r.createElement(o,i({svgRef:t},e))}))},57484:function(e,t,n){"use strict";n.d(t,{r:function(){return c}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("title",null,"Hire/Active/Check/Fill"),l=r.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Hire/Active/Check/Fill",strokeWidth:2},r.createElement("circle",{id:"Oval",stroke:"#108B43",fill:"#108B43",cx:12,cy:12,r:8}),r.createElement("polyline",{id:"Stroke-1",stroke:"#FFFFFF",points:"9 12 11 14 15 10"}))),o=function(e){var t=e.svgRef,n=e.title,o=a(e,["svgRef","title"]);return r.createElement("svg",i({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},o),void 0===n?s:n?r.createElement("title",null,n):null,l)},c=r.forwardRef((function(e,t){return r.createElement(o,i({svgRef:t},e))}))},3260:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("path",{d:"M20,12.05c0-4.42-3.58-8-8-8s-8,3.58-8,8c0,3.99,2.93,7.3,6.75,7.9v-5.59H8.72v-2.31h2.03v-1.76 c0-2,1.19-3.11,3.02-3.11c0.88,0,1.79,0.16,1.79,0.16V9.3h-1.01c-0.99,0-1.3,0.62-1.3,1.25v1.5h2.22l-0.35,2.31h-1.86v5.59 C17.07,19.35,20,16.04,20,12.05L20,12.05z"}),l=function(e){var t=e.svgRef,n=e.title,l=a(e,["svgRef","title"]);return r.createElement("svg",i({id:"facebook",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackgroun
1d:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},l),n?r.createElement("title",null,n):null,s)},o=r.forwardRef((function(e,t){return r.createElement(l,i({svgRef:t},e))}))},30154:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("path",{d:"M19.96,8.7c-0.04-0.85-0.17-1.43-0.37-1.94c-0.2-0.54-0.52-1.02-0.93-1.42c-0.4-0.41-0.88-0.72-1.42-0.92 c-0.51-0.2-1.09-0.33-1.94-0.37C14.45,4.01,14.18,4,12,4S9.56,4.01,8.7,4.05C7.85,4.08,7.27,4.22,6.76,4.42 c-0.54,0.2-1.02,0.52-1.42,0.93c-0.41,0.4-0.72,0.88-0.92,1.42C4.23,7.27,4.09,7.85,4.05,8.7C4.01,9.56,4,9.83,4,12 s0.01,2.44,0.05,3.3c0.04,0.85,0.18,1.43,0.37,1.94c0.2,0.54,0.52,1.02,0.93,1.42c0.4,0.41,0.88,0.72,1.42,0.92 c0.51,0.2,1.09,0.33,1.94,0.37C9.56,19.99,9.83,20,12,20s2.44-0.01,3.3-0.05c0.85-0.04,1.43-0.17,1.94-0.37 c1.08-0.42,1.93-1.27,2.34-2.34c0.2-0.51,0.33-1.09,0.37-1.94C19.99,14.45,20,14.18,20,12S20,9.56,19.96,8.7z M18.52,15.24 c-0.03,0.78-0.17,1.2-0.28,1.48c-0.27,0.7-0.82,1.25-1.52,1.52c-0.28,0.11-0.71,0.24-1.48,0.28c-0.84,0.04-1.1,0.05-3.23,0.05 s-2.39-0.01-3.23-0.05c-0.78-0.03-1.2-0.17-1.48-0.28c-0.35-0.13-0.66-0.33-0.92-0.6c-0.27-0.26-0.47-0.57-0.6-0.92 c-0.11-0.28-0.24-0.71-0.28-1.48c-0.04-0.84-0.05-1.1-0.05-3.23S5.46,9.62,5.5,8.78C5.53,8,5.66,7.57,5.77,7.29 C5.9,6.94,6.1,6.63,6.37,6.37c0.26-0.27,0.57-0.47,0.92-0.6C7.57,5.67,8,5.54,8.78,5.5c0.84-0.04,1.1-0.05,3.23-0.05 c2.14,0,2.39,0.01,3.23,0.05c0.78,0.03,1.2,0.17,1.48,0.28c0.35,0.13,0.66,0.33,0.92,0.6c0.27,0.26,0.47,0.57,0.6,0.92 c0.11,0.28,0.24,0.71,0.28,1.48c0.04,0.84,0.05,1.1,0.05,3.23S18.56,14.39,18.52,15.24z M12,7.89c-2.27,0-4.11,1.84-4.11,4.11 s1.84,4.11,4.11,4.11c2.27,0,4.11-1.84,4.11-4.11S14.27,7.89,12,7.89z M12,14.67c-1.47,0-2.67-1.19-2.67-2.67S10.53,9.34,12,9.34 c1.47,0,2.67,1.19,2.67,2.67S13.48,14.67,12,14.67z M17.24,7.73c0,0.53-0.43,0.96-0.96,0.96c-0.53,0-0.96-0.43-0.96-0.96 c0-0.53,0.43-0.96,0.96-0.96C16.81,6.77,17.24,7.2,17.24,7.73z"}),l=function(e){var t=e.svgRef,n=e.title,l=a(e,["svgRef","title"]);return r.createElement("svg",i({id:"instagram",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},l),n?r.createElement("title",null,n):null,s)},o=r.forwardRef((function(e,t){return r.createElement(l,i({svgRef:t},e))}))},66744:function(e,t,n){"use strict";n.d(t,{r:function(){return c}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("title",null,"Linkedin"),l=r.createElement("g",{id:"Artboard",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"linkedin",transform:"translate(4.000000, 4.000000)",fill:"currentColor",fillRule:"nonzero"},r.createElement("path",{d:"M1.32,16 L14.68,16 C15.41,16 16,15.41 16,14.68 L16,1.32 C16,0.59 15.41,0 14.68,0 L1.32,0 C0.59,0 0,0.59 0,1.32 L0,14.68 C0,15.41 0.59,16 1.32,16 Z M10.69,6.01 C12.9,6.01 13.66,7.01 13.66,9.39 L13.66,13.66 L11.31,13.66 L11.31,9.89 C11.31,8.64 11.07,7.96 10.15,7.96 C8.92,7.96 8.48,8.9 8.48,9.89 L8.48,13.66 L6.13,13.66 L6.12,6.12 L8.36,6.12 L8.36,7.25 C8.66,6.65 9.53,6.01 10.69,6.01 Z M4.7,6.12 L4.7,13.65 L2.35,13.65 L2.35,6.12 L4.7,6.12 Z M4.96,3.53 C4.96,4.32 4.32,4.97 3.52,4.97 C2.73,4.97 2.08,4.33 2.08,3.53 C2.08,2.74 2.72,2.09 3.52,2.09 C4.32,2.09 4.96,2.74 4.96,3.53 Z",id:"Shape"}))),o=function(e){var t=e.svgRef,n=e.title,o=a(e,["svgRef","title"]);return r.createElement("svg",i({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},o),void 0===n?s:n?r.createElement("title",null,n):null,l)},c=r.forwardRef((function(e,t){return r.createElement(o,i({svgRef:t},e))}))},12947:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("path",{id:"lock_1_",d:"M19,9.14V7c0-3.86-3.14-7-7-7C8.14,0,5,3.14,5,7v2.14c-1.72,0.45-3,2-3,3.86v7c0,2.21,1.79,4,4,4h12 c2.21,0,4-1.79,4-4v-7C22,11.14,20.72,9.59,19,9.14z M13,22h-2v-3c0-0.55,0.45-1,
11-1s1,0.45,1,1V22z M17,9H7V7c0-2.76,2.24-5,5-5 s5,2.24,5,5V9z"}),l=function(e){var t=e.svgRef,n=e.title,l=a(e,["svgRef","title"]);return r.createElement("svg",i({id:"lock",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},l),n?r.createElement("title",null,n):null,s)},o=r.forwardRef((function(e,t){return r.createElement(l,i({svgRef:t},e))}))},29542:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("path",{id:"not-answered_1_",d:"M12,0C5.37,0,0,5.37,0,12c0,6.63,5.37,12,12,12s12-5.37,12-12C24,5.37,18.63,0,12,0z M17,13H7 c-0.55,0-1-0.45-1-1s0.45-1,1-1h10c0.55,0,1,0.45,1,1S17.55,13,17,13z"}),l=function(e){var t=e.svgRef,n=e.title,l=a(e,["svgRef","title"]);return r.createElement("svg",i({id:"not-answered",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},l),n?r.createElement("title",null,n):null,s)},o=r.forwardRef((function(e,t){return r.createElement(l,i({svgRef:t},e))}))},78910:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("path",{d:"M20,14v0.82V16c0,2.21-1.79,4-4,4H8c-2.21,0-4-1.79-4-4V8c0-2.21,1.79-4,4-4h1.18H10c0.55,0,1,0.45,1,1s-0.45,1-1,1H9v6 c0,1.65,1.35,3,3,3h6v-1c0-0.55,0.45-1,1-1S20,13.45,20,14z M19.92,4.62c-0.1-0.24-0.3-0.44-0.54-0.54C19.26,4.03,19.13,4,19,4h-6 c-0.55,0-1,0.45-1,1s0.45,1,1,1h3.59l-4.29,4.29c-0.39,0.39-0.39,1.02,0,1.41C12.49,11.9,12.74,12,13,12s0.51-0.1,0.71-0.29L18,7.41 V11c0,0.55,0.45,1,1,1s1-0.45,1-1V5C20,4.87,19.97,4.74,19.92,4.62z"}),l=function(e){var t=e.svgRef,n=e.title,l=a(e,["svgRef","title"]);return r.createElement("svg",i({id:"openinnewtab",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},l),n?r.createElement("title",null,n):null,s)},o=r.forwardRef((function(e,t){return r.createElement(l,i({svgRef:t},e))}))},31621:function(e,t,n){"use strict";n.d(t,{r:function(){return c}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("title",null,"Resume"),l=r.createElement("path",{id:"resume",d:"M20,0H4C2.9,0,2,0.9,2,2v20c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V2C22,0.9,21.1,0,20,0z M5,4c0-0.55,0.45-1,1-1 h4c0.55,0,1,0.45,1,1v4c0,0.55-0.45,1-1,1H6C5.45,9,5,8.55,5,8V4z M16,21H6c-0.55,0-1-0.45-1-1s0.45-1,1-1h10c0.55,0,1,0.45,1,1 S16.55,21,16,21z M18,17H6c-0.55,0-1-0.45-1-1s0.45-1,1-1h12c0.55,0,1,0.45,1,1C19,16.55,18.55,17,18,17z M18,13H6 c-0.55,0-1-0.45-1-1s0.45-1,1-1h12c0.55,0,1,0.45,1,1S18.55,13,18,13z M13,8c0-0.55,0.45-1,
11-1h2c0.55,0,1,0.45,1,1s-0.45,1-1,1h-2 C13.45,9,13,8.55,13,8z M18,5h-4c-0.55,0-1-0.45-1-1s0.45-1,1-1h4c0.55,0,1,0.45,1,1S18.55,5,18,5z"}),o=function(e){var t=e.svgRef,n=e.title,o=a(e,["svgRef","title"]);return r.createElement("svg",i({id:"resume_1_",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},o),void 0===n?s:n?r.createElement("title",null,n):null,l)},c=r.forwardRef((function(e,t){return r.createElement(o,i({svgRef:t},e))}))},61563:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("path",{d:"M15.08,5.71c-1.81,0-3.28,1.42-3.28,3.17c0,0.25,0.03,0.49,0.09,0.72c-2.73-0.13-5.15-1.4-6.77-3.32 c-0.28,0.47-0.44,1.01-0.44,1.6c0,1.1,0.58,2.07,1.46,2.64c-0.54-0.02-1.04-0.16-1.49-0.4l0,0.04c0,1.54,1.13,2.82,2.63,3.11 C7,13.36,6.71,13.4,6.41,13.4c-0.21,0-0.42-0.02-0.62-0.06c0.42,1.26,1.63,2.18,3.07,2.2C7.74,16.4,6.32,16.9,4.78,16.9 c-0.26,0-0.53-0.01-0.78-0.04c1.45,0.9,3.18,1.43,5.03,1.43c6.04,0,9.34-4.84,9.34-9.03c0-0.14,0-0.27-0.01-0.41 C19,8.4,19.56,7.84,20,7.2c-0.59,0.25-1.22,0.42-1.89,0.5c0.68-0.39,1.2-1.01,1.44-1.76c-0.63,0.36-1.34,0.63-2.08,0.77 C16.87,6.1,16.02,5.71,15.08,5.71z"}),l=function(e){var t=e.svgRef,n=e.title,l=a(e,["svgRef","title"]);return r.createElement("svg",i({id:"twitter",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},l),n?r.createElement("title",null,n):null,s)},o=r.forwardRef((function(e,t){return r.createElement(l,i({svgRef:t},e))}))},1154:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("path",{id:"profile",d:"M7.6,12.7c1.2,0.8,2.7,1.3,4.3,1.3c1.6,0,3.1-0.5,4.3-1.3c3.8,1.5,6.7,4.8,7.5,8.9 c0.2,1.2-0.7,2.3-2,2.3H2c-1.2,0-2.2-1.1-2-2.3C0.8,17.6,3.7,14.2,7.6,12.7z M17.8,6c0,3.3-2.7,6-6,6s-6-2.7-6-6s2.7-6,6-6 S17.8,2.7,17.8,6z"}),l=function(e){var t=e.svgRef,n=e.title,l=a(e,["svgRef","title"]);return r.createElement("svg",i({id:"profile_1_",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},l),n?r.createElement("title",null,n):null,s)},o=r.forwardRef((function(e,t){return r.createElement(l,i({svgRef:t},e))}))},55803:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var r=n(67294);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createElement("path",{d:"M19.67,7.86c-0.18-0.73-0.72-1.3-1.41-1.5C17.01,6,12,6,12,6S6.99,6,5.74,6.35c-0.67,0.2-1.23,0.78-1.41,1.51 C4,9.19,4,11.95,4,11.95s0,2.77,0.33,4.09c0.18,0.73,0.72,1.3,1.41,1.5C7,17.9,12,17.9,12,17.9s5.01,0,6.26-0.35 c0.69-0.2,1.23-0.77,1.41-1.5C20,14.72,20,11.96,20,11.96S20.01,9.19,19.67,7.86z M10.41,14.5V9.4l4.16,2.55L10.41,14.5z"}),l=function(e){var t=e.svgRef,n=e.title,l=a(e,["svgRef","title"]);return r.createElement("svg",i({id:"website",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackgroun
1d:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},l),n?r.createElement("title",null,n):null,s)},o=r.forwardRef((function(e,t){return r.createElement(l,i({svgRef:t},e))}))},86658:function(e,t,n){"use strict";var r=n(67294),i=n(45360),a=n(44596),s=n(71230),l=n(15746),o=n(69677),c=n(5751),d=n(88961),u=n(36456),m=n(96601),p=n(91466),x=n(71498),h=n(85893);function f(e){var t=e.initialFirstName,n=e.initialLastName,u=e.initialEmail,m=e.initialPhoneNumber,f=e.initialCountryCode,g=e.showSuccess,y=e.updateAccount,v=e.form,j=e.loading,b=e.profileLoading,w=e.activePanel,k=e.setActivePanel,N=v.getFieldDecorator,_=v.resetFields,Z=v.setFieldsValue,C=v.isFieldsTouched;return(0,r.useEffect)((function(){g&&(i.Z.success("Your account has been updated",5),_())}),[g]),(0,h.jsx)("div",{className:"account-content",children:(0,h.jsx)(a.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),v.validateFieldsAndScroll((function(e,t){if(!e){var n={email:t.email,first_name:t.first_name,last_name:t.last_name};t.phone_number&&(n.phone_number=t.phone_number),t.country_code&&(n.country_code=t.country_code),y(n,{onSuccess:function(){},onFail:function(){i.Z.error("Account not updated. Please try again later.")}})}}))},colon:!1,requiredMark:!1,children:(0,h.jsxs)(s.Z,{gutter:[20,20],children:[(0,h.jsx)(l.Z,{xs:24,sm:12,children:(0,h.jsx)(a.Z.Item,{label:(0,h.jsx)("span",{children:"First Name"}),children:N("first_name",{initialValue:t,rules:[{required:!0,message:"Please input your first name",whitespace:!0}]})((0,h.jsx)(o.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,h.jsx)(l.Z,{xs:24,sm:12,children:(0,h.jsx)(a.Z.Item,{label:(0,h.jsx)("span",{children:"Last Name"}),children:N("last_name",{initialValue:n,rules:[{required:!0,message:"Please input your last name",whitespace:!0}]})((0,h.jsx)(o.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,h.jsx)(l.Z,{xs:24,sm:24,children:(0,h.jsx)(a.Z.Item,{label:(0,h.jsx)("span",{children:"Email"}),children:N("email",{initialValue:u,rules:[{required:!0,message:"Please input your email",whitespace:!0}]})((0,h.jsx)(o.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6",disabled:!0,type:"email",placeholder:"Email"}))})}),(0,h.jsxs)(l.Z,{xs:24,children:[(0,h.jsx)("div",{className:"text-size-16 text-weight-500 line-height-20 text-color-dark-grey-dark mb-4",children:"Phone number"}),(0,h.jsxs)(s.Z,{gutter:[20,8],children:[(0,h.jsx)(l.Z,{xs:24,sm:12,children:(0,h.jsx)(a.Z.Item,{children:N("country_code",{initialValue:f})((0,h.jsx)(p.Z,{className:"select-size-48 select-bg-grey inner-shadow round-6 country-code",dropdownClassName:"select-bg-grey-dropdown",initialValue:f,handleChange:function(e){return Z({country_code:e})},suffixIcon:(0,h.jsx)(c.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:x.r})}))})}),(0,h.jsx)(l.Z,{xs:24,sm:12,children:(0,h.jsx)(a.Z.Item,{children:N("phone_number",{initialValue:m})((0,h.jsx)(o.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6 phone-number"}))})}),(0,h.jsx)(l.Z,{xs:24,children:(0,h.jsx)("div",{className:"text-size-16 text-lineHeight text-color-dark-grey-light",children:"Kaamwork may contact you regarding your applications on the portal"})})]})]}),(0,h.jsxs)(l.Z,{xs:24,className:"action-button-wrapper",children:[(0,h.jsx)(d.Z,{type:"primary",disabled:b||!C||j,htmlType:"submit",className:"btn-size-xl border-radius-8 text-weight-500 text-size-16 mb-8",block:!0,children:"Save Changes"}),(0,h.jsx)(d.Z,{type:"primary",ghost:!0,className:"btn-size-xl text-size-16 text-weight-500 text-color-blue border-radius-8 border-color-grey",onClick:function(){_(),k(w.filter((function(e){return"account"!==e})))},block:!0,children:"Cancel"})]})]})})})}f.defaultProps={initialPhoneNumber:"",initialCountryCode:""};var g=a.Z.create({name:"Account"})(f);t.Z=(0,u.$j)((function(e){return{initialFirstName:e.auth.auth.first_name,initialLastName:e.auth.auth.last_name,initialEmail:e.auth.auth.email,initialPhoneNumber:e.auth.auth.phone_number,initialCountryCode:e.auth.auth.country_code,showSuccess:e.auth.showSuccess,loading:e.auth.loading,profileLoading:e.profile.loading}}),(function(e){return{updateAccount:function(t,n){return e(m.sGo(t,n))}}}))(g)},79053:function(e,t,n){"use strict";var r=n(59499),i=n(50029),a=n(87794),s=n.n(a),l=n(88961),o=n(5751),c=n(45360),d=n(26646),u=n(67294),m=n(26083),p=n(21304),x=n(38163),h=n(78084),f=n(48664),g=n(47583),y=n(75558),v=n(66744),j=n(31621),b=n(82572),w=n(29139),k=(n(41664),n(92077)),N=n.n(k),_=(n(22976),n(28929)),Z=n(68683),C=n(30381),O=n.n(C),S=n(94829),z=n(85893);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?E(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var D="d-flex mr-8",F={width:"48px",padding:"0 12px"},L={width:"40px",padding:"0 8px"},A=function(e){var t=e.basicDetails,n=e.photo,r=e.photoUploading,a=e.uploadAuthPhoto,k=e.profileId,C=e.companyView,E=(0,S.Z)("(max-width: 576px)"),A=(0,u.useState)(!1),I=A[0],M=A[1],R=(0,u.useState)(!1),T=R[0],q=R[1],B=(0,u.useState)(null),V=B[0],Y=B[1];(0,u.useEffect)((function(){if(t){var e=t&&t.onboarding_resume.find((function(e){return e.is_default&&"visible"===e.visibility}));Y(e)}}),[t]);var H,W=function(){var e=(0,i.Z)(s().mark((function e(t){var n,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileBlob,e.prev=1,r="".concat(k,"/").concat(O()().unix(),"-photo.png"),e.next=5,fetch("".concat((0,Z.dN)(),"/aws/s3/get-signed-url"),{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_url:r,content_type:"image/png"})}).then((function(e){return e.text()}));case 5:return i=e.sent,e.next=8,fetch(i,{method:"PUT",redirect:"follow",headers:{"Content-Type":"image/png"},body:n});case 8:e.sent.ok&&a({url:"".concat(_.ftpBaseUrl,"/").concat(r)},{onSuccess:function(){return c.Z.success("Your photo has been updated")},onFail:function(e){return c.Z.error(e)}}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),c.Z.error("Some error occured while uploading documents");case 15:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t){return e.apply(this,arguments)}}();return t?(0,z.jsxs)("div",{className:"dashboard-card profile-card",children:[(0,z.jsxs)("div",{className:"d-flex justify-content-between mb-12",children:[(0,z.jsxs)("div",{className:"d-flex align-items-center",children:[(0,z.jsx)("div",{className:"mr-16",children:(0,z.jsx)(d.Z,{size:E?40:48,photo:n,allowEdit:!C,alwaysShowEdit:!C,loading:r,beforeUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type;t||c.Z.error("You can only upload JPG/PNG file!");var n=e.size/1024/1024<2;return n||c.Z.error("Image must be smaller than 2 MB!"),t&&n},afterUpload:W})}),(0,z.jsxs)("div",{className:"text-size-20 text-weight-500 mr-12",children:[t.first_name," ",t.last_name]})]}),(0,z.jsxs)("div",{className:"d-flex align-items-center",children:[C&&!t.linkedin_url?null:t.linkedin_url?(0,z.jsx)("a",{href:(0,b.ZU)(t.linkedin_url),target:"_blank",children:(0,z.jsx)(o.Z,{component:v.r,className:"icon-size-24 profile-link"})}):(0,z.jsx)(o.Z,{component:v.r,className:"icon-size-24 text-color-dark-grey-light"}),C?V?(0,z.jsx)(l.Z,{type:"primary",className:"btn-size-xl text-size-16 round-8 text-weight-500 ml-12",style:{padding:"0 20px"},onClick:function(){return window.open(V.url,"_blank")},children:"View Resume"}):null:V?(0,z.jsx)("a",{href:V.url,target:"_blank",children:(0,z.jsx)(o.Z,{component:j.r,className:"icon-size-18 profile-link ml-8"})}):(0,z.jsx)(o.Z,{component:j.r,className:"icon-size-18 text-color-dark-grey-light ml-8"})]})]}),C&&!t.location_googlelocation?null:(0,z.jsxs)("div",{className:"d-flex align-items-center mb-12 r-text-size-16",children:[(0,z.jsx)("div",{style:P({},E?L:F),className:"".concat(D),children:(0,z.jsx)(o.Z,{component:m.r,className:"icon-size-24"})}),t&&t.location_googlelocation?(0,z.jsx)("div",{className:"text-weight-500 ml-8",children:t.location_googlelocation.label}):(0,z.jsxs)("div",{className:"profile-not-entered",children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8",children:"Current Location"}),(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:"not entered"})]})]}),C&&!t.total_experience?null:(0,z.jsxs)("div",{className:"d-flex align-items-center mb-12 r-text-size-16",children:[(0,z.jsx)("div",{style:P({},E?L:F),className:"".concat(D),children:(0,z.jsx)(o.Z,{component:p.r,className:"icon-size-24"})}),t&&t.total_experience?(0,z.jsx)("div",{className:"text-weight-500 ml-8",children:(0,b.AM)(t.total_experience)}):(0,z.jsxs)("div",{className:"profile-not-entered",children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8",children:"Total Experience"}),(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:"not entered"})]})]}),!C||t.current_job_title||t.company?(0,z.jsxs)("div",{className:"d-flex align-items-center mb-12 r-text-size-16",children:[(0,z.jsx)("div",{style:P({},E?L:F),className:"".concat(D),children:(0,z.jsx)(o.Z,{component:x.r,className:"icon-size-24"})}),t&&t.current_job_title&&t.company?(0,z.jsx)("div",{className:"d-flex ml-8",children:(0,z.jsxs)("div",{children:[(0,z.jsx)("span",{className:"text-weight-500 mr-12",children:t.current_job_title}),(0,z.jsxs)("span",{className:"text-color-dark-grey-light",children:["@ ",null===(H=t.company)||void 0===H?void 0:H.name]})]})}):t.current_job_title||t.company?(0,z.jsxs)("div",{className:"d-flex align-items-center ml-8",children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8",children:"Currently working at"}),t.company?(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:t.company.name}):(0,z.jsx)("div",{className:"profile-not-entered",children:(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:"company name"})}),C&&!t.current_job_title?null:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8 ml-8",children:"as"}),t.current_job_title?(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:t.current_job_title}):(0,z.jsx)("div",{className:"profile-not-entered",children:(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:"designation"})})]})]}):(0,z.jsxs)("div",{className:"profile-not-entered",children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8",children:"Currently working at"}),(0,z.jsx)("span",{className:"text-weight-500 text-italics mr-8",children:"company name"}),(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8",children:"as"}),(0,z.jsx)("span",{className:"text-weight-500 text-italics mr-8",children:"designation"})]})]}):null,C&&!t.expected_salary_amount?null:(0,z.jsxs)("div",{className:"d-flex align-items-center mb-12 r-text-size-16",children:[(0,z.jsx)("div",{style:P({},E?L:F),className:"".concat(D),children:(0,z.jsx)(o.Z,{component:h.r,className:"icon-size-24"})}),t.expected_salary_amount?(0,z.jsx)("div",{className:"d-flex ml-8",children:t&&t.expected_salary_amount?(0,z.jsxs)("div",{className:"mr-40",children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light",children:"Expected Salary:"})," ",(0,z.jsxs)("span",{className:"text-weight-500",children:[t.expected_salary_currency," ",N()(t.expected_salary_amount).format("0,0")," ","/yr"]})]}):null}):(0,z.jsxs)("div",{className:"profile-not-entered",children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8",children:"Expected Salary"}),(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:"not entered"})]})]}),!C||t.skills&&t.skills.length>0?t.skills&&t.skills.length>0?(0,z.jsxs)("div",{className:"d-flex mb-8 r-text-size-16",children:[(0,z.jsx)("div",{style:P(P({},F),{},{padding:"10px 12px"}),className:"".concat(D),children:(0,z.jsx)(o.Z,{component:f.r,className:"icon-size-24"})}),(0,z.jsxs)("div",{className:"ml-8",children:[t.skills.slice(0,I?t.skills.length:4).map((function(e){return(0,z.jsx)("div",{className:"d-inline-block mr-8 mb-4",style:{border:"1px solid #D5DAEC",borderRadius:"6px",padding:"10px 12px"},children:e.name},e.uuid)})),!I&&t.skills.length>4?(0,z.jsxs)("div",{className:"d-inline-block cursor-pointer text-weight-500",onClick:function(){return M(!0)},children:["+",t.skills.length-4," skills"]}):null]})]}):(0,z.jsxs)("div",{className:"d-flex align-items-center mb-12 r-text-size-16",children:[(0,z.jsx)("div",{style:P({},E?L:F),className:"".concat(D),children:(0,z.jsx)(o.Z,{component:f.r,className:"icon-size-24"})}),(0,z.jsxs)("div",{className:"profile-not-entered",children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8",children:"Top skills"}),(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:"not entered"})]})]}):null,C&&!t.text_pitch?null:(0,z.jsxs)("div",{className:"d-flex mb-12 r-text-size-16",children:[(0,z.jsx)("div",{style:P({},E?L:F),className:"".concat(D),children:(0,z.jsx)(o.Z,{component:g.r,className:"icon-size-24"})}),t.text_pitch?(0,z.jsxs)("div",{className:"ml-8 d-flex",style:{width:"calc(100% - 62px)"},children:[(0,z.jsxs)("div",{className:T?null:"text-ellipsis-on-overflow",children:[function(e){try{return JSON.parse(e).blocks.map((function(e){return"".concat(e.text," ")}))}catch(t){return e}}(t.text_pitch),T?(0,z.jsx)("span",{className:"d-inline-block cursor-pointer text-weight-500 ml-8",onClick:function(){return q(!1)},children:"Read less"}):null]}),T?null:(0,z.jsx)("div",{className:"d-inline-block cursor-pointer text-weight-500 ml-8",onClick:function(){return q(!0)},style:{minWidth:"80px"},children:"Read more"})]}):(0,z.jsxs)("div",{className:"profile-not-entered",children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8",children:"Pitch note"}),(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:"not entered"})]})]}),C&&!t.expected_position_type?null:(0,z.jsxs)("div",{className:"d-flex align-items-center mb-12 r-text-size-16",children:[(0,z.jsx)("div",{style:P({},E?L:F),className:"".concat(D),children:(0,z.jsx)(o.Z,{component:y.r,className:"icon-size-24"})}),t.expected_position_type?(0,z.jsxs)("div",{className:"ml-8",children:[(0,z.jsxs)("span",{className:"text-color-dark-grey-light mr-4",children:["Prefer to Engage as:"," "]}),(0,z.jsx)("span",{className:"text-weight-500",children:w.VI.find((function(e){return e.value===t.expected_position_type})).label})]}):(0,z.jsxs)("div",{className:"profile-not-entered",children:[(0,z.jsx)("span",{className:"text-color-dark-grey-light mr-8",children:"Prefer to engage as a"}),(0,z.jsx)("span",{className:"text-weight-500 text-italics",children:"not entered"})]})]})]}):null};A.defaultProps={companyView:!1,photo:"",photoUploading:!1,uploadAuthPhoto:function(){},profileId:""},t.Z=A},95573:function(e,t,n){"use strict";n(67294);var r=n(33269),i=n(72261),a=n(86356),s=n(85893);t.Z=function(e){var t=e.node;return(0,s.jsx)("div",{className:"company-card__about",children:function(){switch(t.category){case"college":return(0,s.jsx)(r.Z,{college:t});case"company":return(0,s.jsx)(i.Z,{company:t});case"institute":return(0,s.jsx)(a.Z,{institute:t});default:return null}}()})}},26427:function(e,t,n){"use strict";n(67294);var r=n(54572),i=n(10308),a=n(87879),s=n(85893);t.Z=function(e){var t=e.node;return(0,s.jsx)("div",{className:"company-card__about",children:function(){switch(t.category){case"college":return(0,s.jsx)(r.Z,{college:t});case"company":return(0,s.jsx)(i.Z,{company:t});case"institute":return(0,s.jsx)(a.Z,{institute:t});default:return null}}()})}},47412:function(e,t,n){"use strict";n(67294);var r=n(36456),i=n(5751),a=n(96601),s=n(85893);function l(e){var t=e.node,n=e.admin,r=e.setNodeEditMode,a=e.setActiveNode,l=e.hasCompanyAccess;function o(){a({activeNode:t.uuid}),r(!0)}return(0,s.jsx)("div",{className:"node-card-panel",children:(0,s.jsxs)("div",{className:"node-card__header",children:[(0,s.jsx)("div",{className:"node-card__node",children:(0,s.jsxs)("div",{className:"node-card__node--detail",children:[(0,s.jsxs)("h4",{className:"title-black-l",children:["Category: ",t.category]}),(0,s.jsxs)("h4",{className:"title-black-l",children:["Name: ",t.name]}),(0,s.jsxs)("h4",{className:"title-black-l",children:["Key: ",t.key]}),(0,s.jsxs)("h4",{className:"title-black-l",children:["Public url: ",function(){var e="".concat(location.protocol,"//").concat(location.hostname).concat(location.port?":".concat(location.port):"","/").concat(t.category,"/").concat(t.public_id);return(0,s.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:e})}()]})]})}),n||l?(0,s.jsx)(i.Z,{type:"edit",className:"icon-size-24",onClick:o}):null]})})}l.defaultProps={hasCompanyAccess:!1},t.Z=(0,r.$j)((function(e){return{admin:e.auth.auth.admin,hasCompanyAccess:e.auth.auth.has_company_access}}),(function(e){return{setActiveNode:function(t){return e(a.Jy7(t))},setNodeEditMode:function(t){return e(a.OM0(t))}}}))(l)},55824:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(67294),i=n(36456),a=n(54379),s=n(94184),l=n.n(s),o=n(97751),c=n(47412),d=n(26427),u=n(85893);var m=function(e){var t=e.node;return(0,u.jsxs)(o.Z,{className:l()("node-card",{"node-card-active":!0}),children:[(0,u.jsx)(c.Z,{node:t}),(0,u.jsx)(d.Z,{node:t})]},t.uuid)},p=n(96601),x=n(95573),h=n(42557),f=n.n(h),g=n(7291),y=n(60348),v=n(9705),j=n(94829);function b(e){var t=(0,j.Z)("(max-width: 767px)"),n=e.node,i=e.fetchNode,s=e.setActiveNode,l=e.nodeEditMode,o=e.reqType,c=e.uuid,d=e.category,p=(0,y.Z)();return"internal"!==o&&p.ready&&(c=p.query.uuid,d=p.query.category),(0,r.useEffect)((function(){d&&c&&i({category:d,uuid:c})}),[d,c]),(0,r.useEffect)((function(){n&&s(n.uuid)}),[n]),n?"internal"===o?(0,u.jsx)("div",{className:"container-960 ",style:{margin:0},children:(0,u.jsxs)("div",{className:"page-wrapper ",style:{overflow:"visible"},children:[(0,u.jsx)(v.Z,{title:"Company Page",style:{padding:"0 ".concat(t?"0":"1.25rem")}}),(0,u.jsx)("div",{className:"text-size-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat("0")},children:"Company Page"}),l?(0,u.jsx)(x.Z,{node:n}):(0,u.jsx)(m,{node:n})]})}):(0,u.jsxs)(a.Z,{children:[(0,u.jsx)(g.Z,{}),(0,u.jsx)("div",{className:"container",children:(0,u.jsx)("div",{className:"container-800",children:l?(0,u.jsx)(x.Z,{node:n}):(0,u.jsx)(m,{node:n})})})]}):"internal"===o?(0,u.jsx)("div",{className:"container-800-no-margin",children:(0,u.jsx)("div",{className:"d-flex justify-content-center mb-12 mt-12 pl-16 pr-16",children:(0,u.jsx)("img",{className:"w-100",alt:"loading",src:f()})})}):(0,u.jsx)(a.Z,{children:(0,u.jsx)("div",{className:"container",children:(0,u.jsx)("div",{className:"container-800",children:(0,u.jsx)("div",{className:"d-flex justify-content-center mb-12 pl-16 pr-16",children:(0,u.jsx)("img",{className:"w-100",alt:"loading",src:f()})})})})})}b.defaultProps={node:null,uuid:"",category:"",reqType:"url"};
1var w=(0,i.$j)((function(e){return{node:e.clustering.node,nodeEditMode:e.clustering.nodeEditMode}}),(function(e){return{fetchNode:function(t){return e(p.XG9(t))},setActiveNode:function(t){return e(p.Jy7(t))}}}))(b)},22976:function(e,t,n){"use strict";var r=n(16835),i=n(67294),a=n(33047),s=n(78744),l=n(85893),o=function(e){var t=e.rows,n=e.collapsedPlaceHolder,o=(0,i.useState)(!1),c=o[0],d=o[1],u=(0,a.Z)(),m=(0,r.Z)(u,2),p=m[0],x=m[1].width,h=null===n?e.children:n;return(0,l.jsx)("div",{ref:p,className:"collapsed-description w-100",children:(0,l.jsx)(s.Z,{lines:t,more:(0,l.jsx)("span",{className:"text-color-blue text-weight-500",children:"See More"}),less:(0,l.jsx)("span",{className:"text-color-blue text-weight-500",children:"See Less"}),anchorClass:c?"d-block text-right":"",expanded:c,onClick:function(e){d(e)},width:x,children:c?e.children:h})})};o.defaultProps={rows:1,collapsedPlaceHolder:null},t.Z=o},18216:function(e,t,n){"use strict";var r=n(59499),i=n(50029),a=n(87794),s=n.n(a),l=n(67294),o=n(45360),c=n(34300),d=n(71230),u=n(15746),m=n(69677),p=n(88961),x=n(5751),h=n(36456),f=n(30381),g=n.n(f),y=n(15909),v=n(30723),j=n(68683),b=n(96601),w=n(4712),k=n(94829),N=n(85893);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=function(e){var t=e.children,n=e.visible,r=e.setVisible,a=e.contract,h=e.showSign,f=e.signType,b=e.newContractor,_=e.profileId,C=e.setNewContractor,O=e.onSignSuccess,S=e.signDisabled,z=e.signDisabledMessage,E=e.contractPdfLinkLoading,P=e.contractPdfLinkFailed,D=e.contractPdfLink,F=e.getContractorPdfLink,L=e.isCustom,A=e.isOnboardingContract,I=(0,l.useState)(!1),M=I[0],R=I[1],T=(0,l.useState)(!1),q=T[0],B=T[1],V=(0,l.useState)(null),Y=V[0],H=V[1],W=(0,l.useState)(),J=W[0],U=W[1],$=(0,l.useState)(null),G=$[0],K=$[1],Q=(0,l.useRef)(),X=(0,l.useState)(null),ee=X[0],te=X[1],ne=(0,k.Z)("(max-width: 576px)");(0,l.useLayoutEffect)((function(){if(n&&!M&&Y&&Q.current){var e=Q.current.contentWindow.document;e.open(),e.write(Y),e.close(),te(e.body.offsetHeight+32)}}),[n,M,Y]);var re=function(){var e=(0,i.Z)(s().mark((function e(){var t,n,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t="",b.uuid||a.uuid){e.next=4;break}return o.Z.error("Cannot find contract."),e.abrupt("return");case 4:return a.uuid?t=a.uuid:b.uuid&&(t=b.uuid),R(!0),e.prev=6,n=L?"view-addendum":"view",e.next=10,fetch("".concat((0,j.dN)(),"/payroll/contracts/").concat(n,"/").concat(t),{method:"GET",mode:"cors",headers:{Authorization:"JWT ".concat(w.Z.get("token")),"Content-Type":"application/json"}});case 10:return r=e.sent,e.next=13,r.text();case 13:i=e.sent,H(i),F(t),e.next=22;break;case 18:e.prev=18,e.t0=e.catch(6),console.error(e.t0),o.Z.error("Some error occured while fetcing offer letter. Please try again. Contact us if the issue persists.");case 22:return e.prev=22,R(!1),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[6,18,22,25]])})));return function(){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){n&&re()}),[n]),(0,l.useEffect)((function(){a.signer_info&&a.signer_info.client_sign&&U(a.signer_info.client_sign)}),[a]);var ie=function(){var e=(0,i.Z)(s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B(!0),e.prev=1,e.next=4,(0,j.F3)("payroll/contracts/sign/",{signer_type:f,contract_id:b.uuid||a.uuid,signer_profile_id:_,signer_name:"client"===f?J:G});case 4:t=e.sent,"client"==f&&C(Z(Z({},b),{},{status:"client_signed"})),t.uuid&&(o.Z.success("You have successfully signed the contract."),"active"===t.status&&O(),r(!1),A&&location.reload()),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(1),console.error(e.t0),o.Z.error("Some error occurred while signing contract");case 13:return e.prev=13,B(!1),"client"!==f&&ae(),e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[1,9,13,17]])})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e={company:a.clustering_company.name,showTill:g()().add(1,"days")};w.Z.set("contract_banner",JSON.stringify(e))};return(0,N.jsxs)(N.Fragment,{children:[t,(0,N.jsx)(c.Z,{visible:n,width:800,destroyClose:!0,footer:h?(0,N.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 mt-8 ml-12 mr-12",children:(0,N.jsxs)(d.Z,{gutter:[16,8],children:[(0,N.jsxs)(u.Z,{xs:24,children:["client"===f?(0,N.jsx)("div",{className:"mb-4 mt-4 text-color-dark-grey-dark text-weight-500 text-size-16 text-left",children:"Enter your full name (Client Signature)"}):(0,N.jsx)("div",{}),(0,N.jsx)(m.Z,{value:J,onChange:function(e){var t=e.target.value;U(t)},className:"input-size-48 input-bg-grey inner-shadow",disabled:"client"!==f})]}),(0,N.jsxs)(u.Z,{xs:24,children:[(0,N.jsx)("div",{className:"mb-4 mt-4 text-color-dark-grey-dark text-weight-500 text-size-16 text-left",children:"Contractor Signature"}),(0,N.jsx)(m.Z,{value:G,onChange:function(e){var t=e.target.value;K(t)},className:"input-size-48 input-bg-grey inner-shadow",disabled:"contractor"!==f})]}),(0,N.jsxs)(u.Z,{xs:24,children:[(0,N.jsx)("div",{className:"text-size-14 text-color-dark-grey-light text-left",children:"Enter your legal name. This will be considered as your signature."}),(0,N.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark text-left",children:"By
1signing, you agree to the terms and conditions mentioned in this document"})]}),(0,N.jsx)(u.Z,{xs:24,children:(0,N.jsxs)("div",{children:[(0,N.jsx)(p.Z,{className:"btn-size-xl text-size-16 text-weight-500 text-color-blue border border-color-grey border-radius-8",type:"default",onClick:function(){r(!1)},children:"Cancel"}),(0,N.jsx)(p.Z,{className:"btn-size-xl text-size-16 text-weight-500 border-radius-8",type:"primary",disabled:"contractor"===f&&!G||"client"===f&&!J||S,loading:q,onClick:function(){ie()},style:{padding:"10px 40px"},children:"Sign Contract"})]})}),(0,N.jsx)(u.Z,{xs:24,children:h&&S?(0,N.jsxs)("div",{style:{backgroundColor:"rgba(255,209,131, 0.5",padding:"4px 8px"},className:"border-radius-4 d-flex align-items-center text-color-dark-grey",children:[(0,N.jsx)(x.Z,{type:"warning",className:"icon-size-16 mr-12",theme:"filled"}),(0,N.jsx)("div",{className:"text-size-14",children:z})]}):null})]})}):null,className:"employ-portal-offer-letter-modal full-screen-modal",closeIcon:(0,N.jsx)(x.Z,{component:y.r,className:"text-color-dark-grey-dark icon-size-20"}),onCancel:function(){r(!1)},bodyStyle:{padding:"48px 0",height:h?"65vh":"80vh"},children:M?(0,N.jsx)("div",{className:"w-100 text-center",children:(0,N.jsx)(x.Z,{type:"loading",className:"icon-size-24"})}):(0,N.jsxs)(N.Fragment,{children:[Y?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(p.Z,{type:"dark",className:" text-size-16 text-weight-500 line-height-20 round-20 pl-20 pr-20 download-btn-black",disabled:E||P,href:D,target:"_blank",style:{height:"40px",position:"absolute",right:"20px"},children:[E||P?(0,N.jsx)(x.Z,{type:"loading"}):(0,N.jsx)(x.Z,{component:v.r}),(0,N.jsx)("span",{className:"block line-height-40 ml-11",style:{lineHeight:"40px",display:"inline-block"},children:E||P?"Creating PDF":"Download"})]}),(0,N.jsx)("div",{className:"employ-portal-offer-letter-page",children:(0,N.jsx)("iframe",{ref:Q,width:"100%",height:ee,frameBorder:"0",scrolling:"no",src:"about:blank"})})]}):(0,N.jsx)("div",{children:"Unable fetch offer letter"}),ne&&!h&&(0,N.jsx)("div",{className:"p-12 d-flex justify-content-end",children:(0,N.jsx)(p.Z,{type:"primary",ghost:!0,className:"btn-size-xl border-color-grey text-weight-500",style:{width:"120px"},onClick:function(){r(!1)},children:"Cancel"})})]})})]})};C.defaultProps={showSign:!1,signType:"client",children:null,contract:{},newContractor:{},onSignSuccess:function(){},signDisabled:!1,signDisabledMessage:null,isCustom:!1};t.Z=(0,h.$j)((function(e){return{newContractor:e.employ.newContractor,profileId:e.auth.auth.profile_uuid,contractPdfLinkLoading:e.contractor.contractPdfLinkLoading,contractPdfLinkFailed:e.contractor.contractPdfLinkFailed,contractPdfLink:e.contractor.contractPdfLink}}),(function(e){return{setNewContractor:function(t){return e(b.NIm(t))},getContractorPdfLink:function(t){return e(b.Yll(t))}}}))(C)},44485:function(e,t,n){"use strict";var r=n(67294),i=n(69677),a=n(45360),s=n(5751),l=n(88961),o=n(34300),c=n(36456),d=n(30381),u=n.n(d),m=n(11101),p=n(14092),x=n(90432),h=n(15909),f=n(32832),g=n(96601),y=n(61235),v=n(94829),j=n(85893),b=i.Z.TextArea;t.Z=function(e){var t,n,i=(0,v.Z)("(max-width: 767px)"),d=e.closeModal,w=e.token,k=e.setShowConfirmModal,N=e.setIsSuccessConfirmTypeApprove,_=(0,r.useState)(!1),Z=_[0],C=_[1],O=(0,r.useState)(""),S=O[0],z=O[1],E=(0,r.useState)(!1),P=E[0],D=E[1],F=(0,r.useState)(null),L=(F[0],F[1]),A=(0,r.useState)(!1),I=A[0],M=A[1],R=(0,c.v9)((function(e){return e.auth.isAuthenticated})),T=(0,c.v9)((function(e){return e.employ.selectedEmployeeLeavesLog})),q=(0,c.v9)((function(e){return e.employ.approveRejectLoading})),B=(0,c.v9)((function(e){return e.auth.auth.profile_uuid})),V=(0,c.v9)((function(e){return e.employ.employeesLeaveDetails})),Y=R?T:V||{},H=Y.leaves_count,W=Y.description,J=Y.approval_emails,U=Y.meta,$=Y.type,G=Y.leave_stats,K=Y.uuid,Q=Y.status,X=Y.first_name,ee=Y.supporting_documents,te=(0,c.I0)(),ne=function(e){var t={};switch(e){case"requested":t.label="Requested",t.icon=p.r;break;case"approved":t.label=(0,j.jsx)("span",{className:"text-color-green-dark",children:"Approved"}),t.icon=m.r;break;case"cancelled":t.label=(0,j.jsx)("span",{className:"text-color-dark-grey-dark",children:"Cancelled"}),t.icon=h.r;break;default:t.label=(0,j.jsx)("span",{className:"text-color-orange",children:"Declined"}),t.icon=x.r}return t},re=function(){var e;return(0,j.jsx)("div",{className:"leave-details-status-list mt-16",children:null===U||void 0===U||null===(e=U.status)||void 0===e?void 0:e.map((function(e){return(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("div",{className:"d-flex flex-column leave-details-status",children:[(0,j.jsxs)("div",{className:"d-flex align-items-center",children:[(0,j.jsx)(s.Z,{component:ne(e.status).icon,className:"icon-size-24 mr-12 ".concat("declined"===Q?"text-color-orange":"")}),(0,j.jsx)("span",{className:"text-size-14 text-weight-500 line-height-20 text-color-dark-grey",children:ne(e.status).label}),(0,j.jsxs)("span",{className:"text-size-14 line-height-16 text-color-dark-grey-light ml-12",children:["on ",u()(e.updated_at).format("MMM DD, YYYY")]}),"requested"!==e.status&&(0,j.jsxs)("span",{className:"text-size-16 line-height-20 text-color-dark-grey-dark ml-20",children:[" ","by ",e.updated_by]})]}),"declined"===e.status||"cancelled"===e.status&&(0,j.jsx)("div",{className:"mt-10 text-size-16 line-height-20 text-color-dark-grey-dark ml-36",children:e.reason})]})})}))})};return $?(0,j.jsxs)("div",{className:"leave-details-wrapper",children:[(0,j.jsxs)("div",{className:"full-screen-mobile-modal--title text-weight-500 text-color-dark-grey mb-24",children:["Leave request by ",X]}),(0,j.jsxs)("div",{className:"d-flex text-size-14 text-weight-500 justify-content-between text-color-dark-grey-dark mb-4",children:[(0,j.jsx)("span",{children:u()(null===U||void 0===U||null===(t=U.breakup[0])||void 0===t?void 0:t.date).format("MMM DD, YYYY")}),U.breakup.length>1&&(0,j.jsx)("span",{children:u()(null===U||void 0===U||null===(n=U.breakup[U.breakup.length-1])||void 0===n?void 0:n.date).format("MMM DD, YYYY")})]}),(0,j.jsx)(y.Z,{leaveDays:U.breakup}),(0,j.jsxs)("div",{className:"d-flex flex-column mb-20",children:[(0,j.jsx)("div",{className:"text-color-dark-light text-size-14-16 line-height-20 mb-2 mt-2
10",children:"Total"}),(0,j.jsxs)("div",{className:"d-flex align-items-center",children:[(0,j.jsxs)("span",{className:"text-size-16-18 text-weight-500 text-color-dark-grey mr-8",children:[H," days"]}),(0,j.jsxs)("span",{className:"text-size-12-14 text-weight-400 line-height-16 text-color-dark-grey-light",children:["Weekends and Public Holidays are"," ","maternity"===$?"included":"excluded"]})]})]}),(0,j.jsxs)("div",{className:"d-flex flex-column mb-20",children:[(0,j.jsx)("div",{className:"text-color-dark-light text-size-14-16 line-height-20 mb-2",children:"Description"}),(0,j.jsx)("div",{className:"d-flex align-items-center",children:(0,j.jsx)("span",{className:"text-size-16-18 text-weight-500 text-color-dark-grey mr-8",children:W})})]}),(0,j.jsxs)("div",{className:"d-flex flex-column mb-20",children:[(0,j.jsx)("div",{className:"text-color-dark-light text-size-14-16 line-height-20 mb-2",children:"Supporting Document(s)"}),(0,j.jsx)("div",{className:"d-flex align-items-center",children:(0,j.jsx)("div",{className:"text-size-14 text-weight-500 mt-4",children:ee&&ee.length>0?ee.map((function(e,t){return(0,j.jsxs)("div",{className:"d-inline-block mr-8 mb-8 text-color-blue cursor-pointer border-width-1 border-radius-4 border-color-grey",style:{padding:"3px 8px 4px"},onClick:function(){return window.open(e.doc_url,"_blank")},children:["Attachment ",t+1]})})):(0,j.jsx)("div",{className:"mt-4",children:"No Attachments"})})})]}),(0,j.jsxs)("div",{className:"d-flex flex-column mb-10",children:[(0,j.jsx)("div",{className:"text-color-dark-light text-size-14-16 line-height-20 mb-2",children:"Email sent to:"}),(0,j.jsx)("div",{className:"d-flex align-items-center",children:(0,j.jsx)("span",{className:"text-size-16-18 text-weight-500 text-color-dark-grey mr-8",children:(null===J||void 0===J?void 0:J.length)>1?J.join(", "):J[0]})})]}),"sick"!==$&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(re,{statusList:U.status}),(0,j.jsxs)("div",{className:"d-flex flex-column mb-20 mt-20",children:[(0,j.jsxs)("div",{className:"text-color-dark-light text-size-16 line-height-20 mb-8 ",children:[X,"\u2019s Leaves so far"]}),(0,j.jsxs)("div",{className:"d-flex justify-content-between desktop box-gap",children:["paid"!==$&&G.total_earned_leaves_allotted_count>-1&&(0,j.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,j.jsxs)("div",{className:"d-flex flex-column",children:[(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Earned so far"}),(0,j.jsx)("span",{className:"text-color-dark-grey-dark text-size-20-24 line-height-32 text-weight-500",children:null===G||void 0===G?void 0:G.leaves_earned_count}),(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})}),(0,j.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,j.jsxs)("div",{className:"d-flex flex-column",children:[(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Taken"}),(0,j.jsx)("span",{className:"text-color-dark-grey-dark text-size-20-24 line-height-32 text-weight-500",children:null===G||void 0===G?void 0:G.earned_leaves_taken_count}),(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})}),"paid"!==$&&G.total_earned_leaves_allotted_count>-1&&(0,j.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,j.jsxs)("div",{className:"d-flex flex-column",children:[(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Remaining"}),(0,j.jsxs)("span",{className:" text-size-20-24 line-height-32 text-weight-500 ".concat((null===G||void 0===G?void 0:G.current_balance_count)<0?"text-color-orange":"text-color-dark-grey-dark"),children:[null===G||void 0===G?void 0:G.current_balance_count,(null===G||void 0===G?void 0:G.current_balance_count)<0&&(0,j.jsx)(s.Z,{component:f.r,className:"icon-size-24 ml-4"})]}),(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})}),(0,j.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,j.jsxs)("div",{className:"d-flex flex-column",children:[(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Last Taken"}),(0,j.jsx)("span",{className:"text-color-dark-grey-dark text-size-20-24 line-height-32 text-weight-500",children:null!==G&&void 0!==G&&G.leave_last_taken?null===G||void 0===G?void 0:G.leave_last_taken:"-"}),(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})})]}),(0,j.jsxs)("div",{className:" mobile",children:[(0,j.jsxs)("div",{className:"d-flex justify-content-between mb-12",children:["paid"!==$&&G.total_earned_leaves_allotted_count>-1&&(0,j.jsx)("div",{className:"d-flex align-items-center leave-count-box mr-12",children:(0,j.jsxs)("div",{className:"d-flex flex-column",children:[(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Earned so far"}),(0,j.jsx)("span",{className:"text-color-dark-grey-dark text-size-20-24 line-height-32 text-weight-500",children:null===G||void 0===G?void 0:G.leaves_earned_count}),(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})}),(0,j.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,j.jsxs)("div",{className:"d-flex flex-column",children:[(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Taken"}),(0,j.jsx)("span",{className:"text-color-dark-grey-dark text-size-20-24 line-height-32 text-weight-500",children:null===G||void 0===G?void 0:G.earned_leaves_taken_count}),(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})})]}),(0,j.jsxs)("div",{className:"d-flex justify-content-between",children:["paid"!==$&&G.total_earned_leaves_allotted_count>-1&&(0,j.jsx)("div",{className:"d-flex align-items-center leave-count-box mr-12",children:(0,j.jsxs)("div",{className:"d-flex flex-column",children:[(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Remaining"}),(0,j.jsxs)("span",{className:" text-size-20-24 line-height-32 text-weight-500 ".concat((null===G||void 0===G?void 0:G.current_balance_count)<0?"text-color-orange":"text-color-dark-grey-dark"),children:[null===G||void 0===G?void 0:G.current_balance_count,(null===G||void 0===G?void 0:G.current_balance_count)<0&&(0,j.jsx)(s.Z,{component:f.r,className:"icon-size-24 ml-4"})]}),(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})}),(0,j.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,j.jsxs)("div",{className:"d-flex flex-column",children:[(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Last Taken"}),(0,j.jsx)("span",{className:"text-color-dark-grey-dark text-size-20-24 line-height-32 text-weight-500",children:null!==G&&void 0!==G&&G.leave_last_taken?null===G||void 0===G?void 0:G.leave_last_taken:"-"}),(0,j.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})})]})]})]})]}),"sick"===$||"requested"!==Q?(0,j.jsx)("div",{className:"mt-10 d-flex justify-content-end",children:(0,j.jsx)(l.Z,{type:"primary",className:"text-size-16 text-weight-500",onClick:function(){d()},style:{height:"48px",padding:"14px 66px"},children:"Ok, got it"})}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:"d-flex justify-content-between align-items-center mt-10",children:[(0,j.jsx)(l.Z,{className:"cancel-button desktop mr-20",onClick:d,children:"Cancel"}),(0,j.jsx)(l.Z,{className:"reject-button border-radius-8 ".concat(Z?"active":""),onClick:function(){return C(!Z)},disabled:q,children:"Reject"}),(0,j.jsxs)(l.Z,{className:"approve-button border-radius-8",disabled:q,onClick:function(){D(!0),M(!0),N(!0)},children:[q&&I&&(0,j.jsx)(s.Z,{type:"loading"}),"Approve"]})]}),(0,j.jsx)(l.Z,{onClick:function(){d()},className:"cancel-button text-color-blue mobile mt-8 border-radius-8 mobile",block:!0,style:{background:"white",paddingTop:"12px ",paddingBottom:"12px ",height:"44px",border:"1px solid #D5DAEC"},children:"Cancel"}),Z&&(0,j.jsxs)("div",{className:"mt-20",children:[(0,j.jsx)("div",{className:"text-size-16 text-weight-500 line-height-20 text-color-dark-grey-dark mb-8",children:"Please specify your reason to reject (Optional)"}),(0,j.jsx)(b,{className:"ant-input input-bg-grey inner-shadow",rows:3,allowClear:!0,placeholder:"",onChange:function(e){return z(e.target.value)},value:S}),(0,j.jsx)("div",{className:"mt-12 d-flex justify-content-end",children:(0,j.jsxs)(l.Z,{className:"reject-confirm-button border-radius-8",disabled:q,onClick:function(){D(!0),M(!1),N(!1)},style:{width:i?"100%":"auto"},block:i,children:[q&&!I&&(0,j.jsx)(s.Z,{type:"loading"}),"Confirm Rejection"]})})]})]}),(0,j.jsx)(o.Z,{title:(0,j.jsx)("span",{children:I?"Confirm Approve":"Confirm Reject"}),className:"custom-modal",visible:P,onOk:function(){D(!1),function(){var e=I?"approved":"declined",t={status:e,leave_log_id:K};B&&(t.employer_profile_id=B),"declined"===e&&S.length>0&&(t.rejection_reason=S),w&&(t.token=w),te((0,g.cG2)(t,{onSuccess:function(){d(I),D(!1),M(!1),L(null),k&&k(!0)},onFail:function(){d(),D(!1),M(!1),L(null),a.Z.error("Leave ".concat(I?"approve":"reject"," failed. Please try again later"))}}))}()},onCancel:function(){return D(!1)},okText:"Continue",cancelText:"Go Back",centered:!0,okType:"primary",cancelButtonProps:{className:"btn-size-xl cancel"},okButtonProps:{className:"btn-size-xl ok"},children:(0,j.jsx)("p",{className:"text-size-16 text-color-dark-grey-light mb-52",children:"This action cannot be reversed. Are you sure?"})})]}):null}},62033:function(e,t,n){"use strict";n.d(t,{Z:function(){return wv}});var r=n(67294),i=n(36456),a=n(11163),s=n(41664),l=n.n(s),o=n(97183),c=n(38792),d=n(5751),u=n(56266),m=n(53951),p=n(30598),x=n(26636),h=n(59499),f=n(27812),g=n(45360),y=n(34300),v=n(8046
1),j=n(88961),b=n(63432),w=n(96601),k=n(4434),N=n(34041),_=n(71230),Z=n(15746),C=n(69677),O=n(42262),S=n(32808),z=n(21888),E=n(85893),P={width:"75px"},D=function(e){var t=e.min,n=e.ideal,i=e.onSave,a=(0,r.useState)(!1),s=a[0],l=a[1],o=(0,r.useState)(null),c=o[0],m=o[1],p=(0,r.useState)(null),x=p[0],h=p[1],f=(0,r.useState)(!1),g=f[0],y=f[1],v=(0,r.useState)(!1),b=v[0],w=v[1];null===t&&null===n||(null!==t&&null!==n?"".concat(t," - ").concat(n," years"):null!==t&&null===n?"Must have ".concat(t," years"):null===t&&null!==n&&"Nice to have ".concat(n," years")),(0,r.useEffect)((function(){m(t),h(n),0===t&&w(!0)}),[t,n]),(0,r.useEffect)((function(){isNaN(parseInt(c,10))||isNaN(parseInt(x,10))||b?y(!1):c>x?y(!0):c<=x&&y(!1)}),[c,x,b]);var k=(0,r.createRef)(),N=(0,r.useCallback)((function(e){k&&!k.current.contains(e.target)&&l(!1)}),[k]),_=(0,r.useCallback)((function(e){if(e.stopPropagation(),"Enter"===e.key){if(g)return;s&&(i({min:c,ideal:x}),l(!1))}else"Escape"===e.key&&s&&l(!1)}),[s,c,x,g]);return(0,r.useLayoutEffect)((function(){return window.addEventListener("click",N),document.addEventListener("keydown",_),function(){window.removeEventListener("click",N),document.removeEventListener("keydown",_)}}),[N]),(0,E.jsxs)("div",{className:"w-100 position-relative post-job-experience-select",ref:k,children:[(0,E.jsxs)("div",{className:"text-weight-500 text-color-dark-grey-dark",children:[(0,E.jsxs)("span",{className:"text-size-16 text-color-dark-grey-light",children:["At least: ",(0,E.jsxs)("span",{className:"text-color-dark-grey-dark",children:[c," years"]})]}),(0,E.jsxs)("span",{className:"ml-32 text-size-16 text-color-dark-grey-light",children:["Ideal: ",(0,E.jsxs)("span",{className:"text-color-dark-grey-dark",children:[x," years"]})]})]}),(0,E.jsx)(O.Z,{range:!0,defaultValue:[c,x],disabled:b,min:0,max:10,onChange:function(e){m(e[0]),h(e[1])},tooltipPlacement:"bottom",trackStyle:{width:"20px"}}),(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsx)("span",{children:"0"}),(0,E.jsx)("span",{children:"10+"})]}),(0,E.jsx)("div",{className:"mb-12",children:(0,E.jsx)(S.Z,{checked:b,defaultChecked:b,onChange:function(e){w(e.target.checked)},children:"Looking for Freshers"})}),s?(0,E.jsxs)("div",{className:"post-job-experience-select-dropdown",children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark mb-8",children:"Specify experience (in years)"}),(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-8",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{className:"mr-4",children:"Minimum"}),(0,E.jsx)(u.Z,{title:"Candidates below this threshold will not be able to apply",children:(0,E.jsx)(d.Z,{type:"question-circle",className:"cursor-pointer"})})]}),(0,E.jsx)("div",{children:(0,E.jsx)(z.Z,{autoFocus:!0,min:0,value:b?0:c,disabled:b,placeholder:"eg. 1",style:P,onChange:function(e){return m(""===e?null:e)}})})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-12",children:[(0,E.jsxs)("div",{children:["Ideal ",(0,E.jsx)("span",{className:"text-color-dark-grey-light text-italic",children:"(optional)"})]}),(0,E.jsx)("div",{children:(0,E.jsx)(z.Z,{min:0,value:x,placeholder:"eg. 3",style:P,onChange:function(e){return h(""===e?null:e)}})})]}),(0,E.jsx)("div",{className:"mb-12",children:(0,E.jsx)(S.Z,{checked:b,defaultChecked:b,onChange:function(e){w(e.target.checked)},children:"Freshers Can Apply"})}),(0,E.jsxs)("div",{className:"d-flex flex-row-reverse",children:[(0,E.jsx)(j.Z,{type:"primary",className:"text-size-14 text-weight-500",disabled:g,onClick:function(){i({min:b?0:c,ideal:x}),l(!1)},children:"Save"}),(0,E.jsx)(j.Z,{type:"link",className:"text-size-14 text-weight-500 text-color-dark-grey",onClick:function(){return l(!1)},children:"Cancel"})]}),g?(0,E.jsx)("div",{style:{color:"#f44232"},className:"d-flex flex-row-reverse text-size-12",children:"Minimum should be less than Ideal"}):null]}):null]})};D.defaultProps={min:null,ideal:null,onSave:function(){}};var F=D,L=n(71498);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?A(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=[{title:"Full-time"},{title:"Part-time"},{title:"Self-employed"},{title:"Freelance"},{title:"Contract"},{title:"Internship"},{title:"Apprenticeship"},{title:"Co-op"}],R=function(e){var t=e.jobBasics,n=e.setJobBasics,i=e.status,a=e.setStatus,s=e.dropdownList,l=e.fetchDropdownList,o=s.role||[],c=(0,r.createRef)();(0,r.useEffect)((function(){o.length||l({category:"role"})}),[]),(0,r.useEffect)((function(){var e=!!(t.title&&t.positionType&&Object.keys(t.role).length);e!==i.basics&&a(I(I({},i),{},{basics:e}))}),[t]),(0,r.useEffect)((function(){c&&c.current&&c.current.input&&c.current.input.focus()}),[]);var u=function(e){for(var r,i=0;i<o.length;i+=1){if(o[i].key===e){r=o[i];break}for(var a=0;a<o[i].children.length;a+=1)o[i].children[a].key===e&&(r=o[i].children[a]);if(r)break}r&&n(I(I({},t),{},{role:r}))},m=function(e){e&&n(I(I({},t),{},{positionType:e}))},p=isNaN(t.experience.years_of_experience)?0:+t.experience.years_of_experience,x=isNaN(t.idealExperience.years_of_experience)?2:+t.idealExperience.years_of_experience;return(0,E.jsxs)("div",{className:"post-job-basics",children:[(0,E.jsx)(_.Z,{children:(0,E.jsx)(Z.Z,{children:(0,E.jsxs)("div",{className:"mb-12",children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Job Title"}),(0,E.jsx)(C.Z,{ref:c,defaultValue:t.title,style:{height:"48px",border:"1px solid #D5DAEC",backgroundColor:"#F4F7FB"},onChange:function(e){var r;(r=e.target.value)&&n(I(I({},t),{},{title:r}))}})]})})}),(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:12,children:function(){var e=[];o.forEach((function(t){e.push((0,E.jsx)(k.Z.Option,{label:t.name,children:(0,E.jsxs)("span",{className:"text-weight-500",children:["All ",t.name," roles"]})},t.key)),t.children.length&&t.children.forEach((function(t){e.push((0,E.jsx)(k.Z.Option,{label:t.name,children:(0,E.jsx)("span",{children:t.name})},t.key))}))}));var n={className:"w-100 post-job-role-select",size:"large",backfill:!0,onSelect:u,dropdownClassName:"post-job-role-select-dropdown",dataSource:e,optionLabelProp:"label",getPopupContainer:function(e){return e.parentNode},defaultActiveFirstOption:!1,filterOption:!0,notFoundContent:null};return t.role&&t.role.key&&(n.defaultValue=t.role.name),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Role"}),(0,E.jsx)(k.Z,I({},n))]})}()}),(0,E.jsx)(Z.Z,{xs:24,lg:12,children:function(){var e={className:"w-100 select-size-48",size:"large",getPopupContainer:function(e){return e.parentNode},suffixIcon:(0,E.jsx)(d.Z,{component:L.r,style:{fontSize:"18px",paddingTop:"3px"}}),onChange:m};return t.positionType&&(e.defaultValue=t.positionType),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Position Type"}),(0,E.jsx)(N.Z,I(I({},e),{},{children:M.map((function(e){return(0,E.jsx)(N.Z.Option,{children:e.title},e.title)}))}))]})}()}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{children:(0,E.jsx)(F,{min:p,ideal:x,onSave:function(e){n(I(I({},t),{},{experience:null===e.min?I(I({},t.experience),{},{years_of_experience:void 0,display_value:void 0}):I(I({},t.experience),{},{years_of_experience:"".concat(e.min),display_value:"".concat(e.min," yrs")}),idealExperience:null===e.ideal?I(I({},t.idealExperience),{},{years_of_experience:void 0,display_value:void 0}):I(I({},t.idealExperience),{},{years_of_experience:"".concat(e.ideal),display_value:"".concat(e.ideal," yrs")})}))}})})})]}),(0,E.jsx)("div",{})]})};R.defaultProps={jobBasics:{role:{},positionType:"",experience:{}},setJobBasics:function(){},status:{},setStatus:function(){}};var T=(0,i.$j)((function(e){return{dropdownList:e.clustering.dropdownList}}),(function(e){return{fetchDropdownList:function(t){return e(w.QFx(t))}}}))(R),q=n(55742),B=n(27049),V=n(68683),Y=n(82572);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?H(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var J=[{title:"Location or remote",key:"both"},{title:"Only Remote",key:"remote"},{title:"Only Location",key:"physical"}],U=function(e){return 0===e||e&&!isNaN(e)?e<12?0===+e?"12 am":"".concat(e," am"):12===+e?"12 pm":"".concat(e-12," pm"):""},$=function(e){return 0===e||e&&!isNaN(e)?"".concat(e,"%"):""},G=function(e){var t=e.locationPreference,n=e.setLocationPreference,i=e.timezoneList,a=e.status,s=e.setStatus,l=t.overlap[0]||{},o=t.shouldHaveWorkPermit,c=l&&l.max_timezone&&l.max_timezone.name||null,d=l.working_hours||{},u=(0,r.useState)([]),m=u[0],p=u[1],x=(0,r.useState)(!1),h=x[0],g=x[1],v=(0,r.useState)([]),j=v[0],b=v[1],w=(0,r.useState)(!1),C=w[0],O=w[1];(0,r.useEffect)((function(){var e=t.remote[0]&&t.remote[0].should_have_work_permit||!1;b((0,f.Z)(t.remote)),O(e)}),[t.remote]),(0,r.useEffect)((function(){var e=!0;(e="physical"===t.type?!!t.physical.length:"remote"===t.type?!!l.uuid:!(!l.uuid||!t.physical.length))!==a.location&&s(W(W({},a),{},{location:e}))}),[t]);var P,D=function(e){clearTimeout(P),P=setTimeout((function(){!function(e){if(e){var t={category:"location",q:e};(0,V.E1)("location/search/?".concat((0,V.qC)(t))).then((function(e){var t=[];e.forEach((function(e){t.push(e)})),p(t)})).catch((function(){}))}}(e)}),300)},F=function(){return m.map((function(e){return(0,E.jsx)(N.Z.Option,{value:e.location,children:e.location},e.location)}))},L=function(e,r){var i={};i=l.uuid?W({},l):{uuid:(0,Y.k$)(),req_type:"must_have",req_category:"remote_overlap",worldwide:!1,working_hours:{lower:9,upper:17},min_timezone:{name:"New Delhi"},max_timezone:{name:"New Delhi"},overlap_percentage:100},"timezone"===e?(i.min_timezone=r,i.max_timezone=r):i[e]=r,i.valid=!0,n(W(W({},t),{},{overlap:[i]}))};return(0,E.jsxs)("div",{className:"post-job-remote-location",children:[(0,E.jsx)("div",{children:(0,E.jsx)(q.ZP.Group,{onChange:function(e){var r=e.target.value,i=J.find((function(e){return e.key===r}));i&&n(W(W({},t),{},{type:i.key}))},value:t.type,children:(0,E.jsx)(_.Z,{type:"flex",gutter:[12,12],children:J.map((function(e){return(0,E.jsx)(Z.Z,{xs:24,lg:8,children:(0,E.jsx)(q.ZP,{className:"w-100",value:e.key,children:e.title},e.key)},e.key)}))})})}),(0,E.jsxs)("div",{className:"mt-12 ".concat("remote"===t.type?"d-none":""),children:[(0,E.jsxs)("div",{className:"text-size-16 mb-8",children:[(0,E.jsx)("div",{className:"text-weight-500 text-size-20 mr-8 mb-4",children:"Location"}),(0,E.jsx)("div",{className:"d-flex align-items-center",children:(0,E.jsx)(S.Z,{defaultChecked:!o,checked:!o,onChange:function(e){var r=!e.target.checked;n(W(W({},t),{},{shouldHaveWorkPermit:r,physical:t.physical.map((function(e){return W(W({},e),{},{should_have_work_permit:r})}))}))},children:"Will Sponsor Visa"})})]}),(0,E.jsx)("div",{children:(0,E.jsx)(N.Z,{showSearch:!0,onSearch:D,onChange:function(e){var r,i=t.physical,a=(0,f.Z)(i);if(e.length>i.length){for(var s=function(t){if(-1===i.findIndex((function(n){return n.location.location===e[t]}))){var n=m.findIndex((function(n){return n.location===e[t]}));return-1!==n&&(r=m[n]),"break"}},l=0;l<e.length;l+=1){if("break"===s(l))break}r&&(a=[].concat((0,f.Z)(a),[{uuid:(0,Y.k$)(),req_type:"must_have",req_category:"physical_location",location:W({},r),should_have_work_permit:o}]))}else{a=[];for(var c=function(t){var n=i.findIndex((function(n){return n.location.location===e[t]}));-1!==n&&a.push(i[n])},d=0;d<e.length;d+=1)c(d)}n(W(W({},t),{},{physical:a}))},mode:"multiple",size:"large",defaultValue:t.physical.map((function(e){return e.location.location})),style:{width:"100%"},children:F()})})]}),"both"===t.type?(0,E.jsx)(B.Z,{style:{marginTop:"16px",marginBottom:"8px"}}):null,(0,E.jsxs)("div",{className:"".concat("physical"===t.type?"d-none":""),children:[(0,E.jsx)("div",{className:"text-weight-500 text-size-20 mr-8 mb-8",children:"Remote"}),(0,E.jsx)("div",{className:"mt-8 d-flex align-items-center",children:(0,E.jsx)(S.Z,{defaultChecked:l.worldwide,checked:l.worldwide,onCh
1ange:function(e){return L("worldwide",e.target.checked)},children:"Candidates from anywhere in the world can apply (no timezone restrictions)"})}),(0,E.jsx)(B.Z,{orientation:"left",style:{marginTop:"16px",marginBottom:"8px"},children:"OR"}),(0,E.jsxs)("div",{className:"text-size-16",children:["Only candidates who can match ",(0,E.jsx)("b",{children:"your working hours"})," overlap requirements below can apply"]}),(0,E.jsxs)("div",{className:"mt-8",children:[(0,E.jsxs)(_.Z,{type:"flex",gutter:[10,10],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"text-weight-500",children:"Timezone"}),function(){var e=i.map((function(e){return(0,E.jsx)(k.Z.Option,{label:"".concat(e.name," (").concat(e.utc_offset,")"),children:(0,E.jsx)("span",{children:"".concat(e.name," (").concat(e.utc_offset,")")})},e.name)})),t={className:"w-100",placeholder:"Select a time zone",disabled:l.worldwide,getPopupContainer:function(e){return e.parentNode},onSelect:function(e){L("timezone",{name:e})},size:"large",backfill:!0,dataSource:e,optionLabelProp:"label",defaultActiveFirstOption:!1,filterOption:!0,notFoundContent:null};return c&&(t.defaultValue=c),(0,E.jsx)(k.Z,W({},t))}()]}),(0,E.jsxs)(Z.Z,{xs:24,lg:4,children:[(0,E.jsx)("div",{className:"text-weight-500",children:"From (hr)"}),(0,E.jsx)("div",{children:(0,E.jsx)(z.Z,{min:0,max:23,disabled:!c||l.worldwide,size:"large",value:d.lower,formatter:U,parser:function(e){return e.replace(/\D/g,"")},onChange:function(e){return L("working_hours",W(W({},t.overlap[0].working_hours),{},{lower:e||0}))}})})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:4,children:[(0,E.jsx)("div",{className:"text-weight-500",children:"To (hr)"}),(0,E.jsx)("div",{children:(0,E.jsx)(z.Z,{min:0,max:23,disabled:!c||l.worldwide,size:"large",value:d.upper,formatter:U,parser:function(e){return e.replace(/\D/g,"")},onChange:function(e){return L("working_hours",W(W({},t.overlap[0].working_hours),{},{upper:e||0}))}})})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:4,children:[(0,E.jsx)("div",{className:"text-weight-500",children:"Overlap"}),(0,E.jsx)("div",{children:(0,E.jsx)(z.Z,{min:0,max:100,disabled:!c||l.worldwide,size:"large",formatter:$,parser:function(e){return e.replace("%","")},value:l.overlap_percentage,onChange:function(e){return L("overlap_percentage",e||0)}})})]})]}),(0,E.jsx)("div",{className:"text-weight-500 ".concat(l.worldwide?"text-color-dark-grey":"text-color-blue"," mt-8"),children:(0,E.jsx)("span",{className:"".concat(l.worldwide?"cursor-not-allowed":"cursor-pointer"),onClick:function(){l.worldwide||(g(!0),p([]))},children:j.length?"Edit region/location restrictions for remote applicants (".concat(j.length," location").concat(1===j.length?"":"s",")"):"Add region/location restrictions for remote applicants"})}),(0,E.jsx)(y.Z,{visible:h,className:"post-job-remote-modal",closable:!1,okText:"Done",okButtonProps:{size:"large",className:"text-weight-500"},cancelButtonProps:{type:"link",className:"text-weight-500 text-color-dark-grey-light"},destroyOnClose:!0,onOk:function(){n(W(W({},t),{},{remote:j})),g(!1)},onCancel:function(){b((0,f.Z)(t.remote));var e=t.remote[0]&&t.remote[0].should_have_work_permit||!1;O(e),g(!1)},children:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500 mb-8 text-color-dark-grey-dark",children:"Add region/location restrictions for remote applicants"}),(0,E.jsx)(N.Z,{showSearch:!0,onSearch:D,defaultValue:j.map((function(e){return e.location.location})),onChange:function(e){var t,n=(0,f.Z)(j);if(e.length>j.length){for(var r=function(n){if(-1===j.findIndex((function(t){return t.location.location===e[n]}))){var r=m.findIndex((function(t){return t.location===e[n]}));return-1!==r&&(t=m[r]),"break"}},i=0;i<e.length;i+=1){if("break"===r(i))break}t&&(n=[].concat((0,f.Z)(n),[{uuid:(0,Y.k$)(),req_type:"must_have",req_category:"remote_location",location:W({},t),should_have_work_permit:C}]))}else{n=[];for(var a=function(t){var r=j.findIndex((function(n){return n.location.location===e[t]}));-1!==r&&n.push(j[r])},s=0;s<e.length;s+=1)a(s)}b(n)},mode:"multiple",size:"large",style:{width:"100%"},className:"mb-12",placeholder:"eg. United States",notFoundContent:null,children:F()}),(0,E.jsx)("div",{children:(0,E.jsx)(S.Z,{checked:C,onChange:function(e){var t=e.target.checked;O(t),b(j.map((function(e){return W(W({},e),{},{should_have_work_permit:t})})))},children:"Should be authorized to work in this location without any visa sponsorship"})})]})})]})]})]})};G.defaultProps={status:{},setStatus:function(){}};var K=G,Q=n(93539),X=n(15909),ee=function(e){var t=e.id,n=e.allowDelete,i=e.placeholder,a=e.autoFocus,s=e.value,l=e.isLast,o=e.onSelection,c=e.onDeletion,u=(0,r.useState)(a),m=u[0],p=u[1];return(0,E.jsx)("div",{className:"post-job-skill-pill",children:s?(0,E.jsxs)("div",{className:"post-job-skill-pill-value",children:[(0,E.jsx)("div",{className:"text-ellipsis-on-overflow",children:s}),n?(0,E.jsx)("div",{className:"cursor-pointer",onClick:function(){m||p(!0),c(t)},children:(0,E.jsx)(d.Z,{className:"post-job-skill-pill-close",component:X.r,style:{fontSize:"24px"}})}):null]}):(0,E.jsx)(Q.Z,{isLast:l,type:"skill",placeholder:i,autoFocus:m,dropdownAlignRight:l,selectedItems:[],onItemSelect:function(e){var n;Array.isArray(e)&&e.length&&(n=e[0])&&o(t,n)}})})};ee.defaultProps={id:"default_id",allowDelete:!0,autoFocus:!1,placeholder:"Type to search",value:"",isLast:!1,onSelection:function(){},onDeletion:function(){}};var te=ee,ne=n(16633);function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?re(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ae=(0,E.jsx)("span",{style:{margin:"0 6px"},className:"text-size-14 text-color-dark-grey",children:"OR"}),se="must_have",le=function(e){var t=e.id,n=e.skillGroup,i=e.onChange,a=e.onDelete,s=n.operands||[],l=(0,r.useState)(Math.max(s.length,2)),o=l[0],c=l[1];(0,r.useEffect)((function(){o<s.length&&c(Math.max(s.length,2))}),[s]);var u=function(e){return s[e]&&s[e].skill&&s[e].skill.name||""},m=function(e){return s[e]&&s[e].uuid?s[e].uuid:""},p=function(e,r){if(r&&r.uuid){var a=ie(ie({},n),{},{operands:(0,f.Z)(n.operands)}),s=a.operands.find((function(t){return t.uuid===e}));s?s.skill=r:!s&&a.operands.length<4&&a.operands.push({req_type:n.req_type===se?se:"nice_to_have",req_category:"skill",uuid:(0,Y.k$)(),skill:r}),i(t,a)}},x=function(e){if(e){var r=ie({},n);r.operands=n.operands.filter((function(t){return t.uuid!==e})),c(Math.max(o-1,2)),i(t,r)}};return(0,E.jsxs)("div",{className:"post-job-skill-select",children:[(0,E.jsx)("div",{className:"w-100",children:function(){var e=[30,30,30,0];return o<=2?e=[50,0,0,45]:3===o?e=[30,30,0,30]:4===o&&(e=[30,30,30,0]),(0,E.jsxs)("div",{className:"d-flex flex-wrap align-items-center",children:[(0,E.jsx)("div",{style:{width:"".concat(e[0],"%")},children:(0,E.jsx)(te,{id:m(1),value:u(1),onSelection:p,onDeletion:x})}),o>=3?ae:null,e[1]?(0,E.jsx)("div",{style:{width:"".concat(e[1],"%")},className:"d-block",children:(0,E.jsx)(te,{id:m(2),value:u(2),autoFocus:!0,onSelection:p,onDeletion:x})}):null,o>=4?ae:null,e[2]?(0,E.jsx)("div",{style:{width:"".concat(e[2],"%")},className:"d-block",children:(0,E.jsx)(te,{id:m(3),value:u(3),autoFocus:!0,onSelection:p,onDeletion:x,isLast:!0})}):null,(0,E.jsxs)("div",{style:{width:"".concat(e[3],"%")},className:"".concat(e[3]?"d-flex":"d-none"," ml-8 text-weight-500 text-color-blue cursor-pointer"),onClick:function(){c(o+1)},children:[(0,E.jsx)(d.Z,{component:ne.r,style:{fontSize:"24px"}})," Add a Substitute Skill"]})]})}()}),(0,E.jsx)("div",{className:"position-absolute",style:{top:"-10px",right:"-10px"},children:(0,E.jsx)(d.Z,{component:X.r,className:"post-job-skill-select-close-icon",onClick:function(){a(t)},style:{fontSize:"20px",border:"1px solid #e2e2eb",backgroundColor:"white",borderRadius:"50%",cursor:"pointer"}})})]})};le.defaultProps={onChange:function(){},onDelete:function(){}};var oe=le,ce=n(21232),de=n(85418);function ue(e){var t=e.suggestedSkills,n=e.suggestedSkillsLoading,i=e.activeSuggestedSkill,a=e.setActiveSuggestedSkill,s=e.handleAddSuggestedSkill,l=e.skills,o=e.showSuggestion,u=(0,r.useState)([]),m=u[0],p=u[1],x=(0,E.jsxs)(c.Z,{onClick:function(e){var t=e.key;s(t)},children:[(0,E.jsx)(c.Z.Item,{children:(0,E.jsx)("span",{className:"text-size-16",children:"Add to Must Have"})},"must_have"),(0,E.jsx)(c.Z.Item,{children:(0,E.jsx)("span",{className:"text-size-16",children:"Add to Nice to Have"})},"nice_to_have")]});return(0,r.useEffect)((function(){var e=[];l&&l.forEach((function(t){t.operands&&t.operands.length>0&&t.operands.forEach((function(t){"must_have"!==t.req_type&&"nice_to_have"!==t.req_type||t.skill&&t.skill.clustering_id&&e.push(t.skill.clustering_id)}))}));var n=[];e.length>0?t.forEach((function(t){return e.includes(t.uuid)?null:n.push(t)})):n=t,p(n)}),[l,t]),o&&m&&m.length>0?(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 mb-8",children:"Recommended skills based on the role selected"}),n?(0,E.jsx)(d.Z,{type:"loading"}):(0,E.jsx)("div",{children:m&&m.map((function(e){return(0,E.jsxs)("div",{className:"skill-suggestion-pill",style:{fontSize:"16px",borderColor:i&&i.clustering_id===e.skill.clustering_id?"#2A4CD5":"#d5daec"},children:[e.skill?(0,E.jsx)("span",{children:e.skill.name}):null,(0,E.jsx)(de.Z,{overlay:x,placement:"bottomLeft",trigger:["click"],onVisibleChange:function(e){return e?null:a(null)},children:(0,E.jsx)(d.Z,{component:ne.r,style:{color:i&&i.clustering_id===e.skill.clustering_id?"#2A4C
1D5":"#7C7F88",backgroundColor:i&&i.clustering_id===e.skill.clustering_id?"#F0F3FE":"transparent"},className:"icon-size-24 ml-12 cursor-pointer",onClick:function(){i&&i.clustering_id===e.skill.clustering_id?a(null):a(e.skill)}})})]},e.clustering_id)}))})]}):null}ue.defaultProps={activeSuggestedSkill:null};var me=ue;function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var he="must_have",fe="nice_to_have",ge=function(e){var t=e.skills,n=e.setSkills,i=e.status,a=e.setStatus,s=e.jobRole,l=e.mode,o=(0,r.useState)(!1),c=o[0],u=o[1],m=(0,r.useState)(!1),p=m[0],x=m[1],h=(0,r.useState)([]),g=h[0],v=h[1],b=(0,r.useState)(!1),w=b[0],k=b[1],N=(0,r.useState)(null),_=N[0],Z=N[1],C=(0,r.useState)((function(){var e=[];return t&&t.forEach((function(t){t.operands&&t.operands.length>0&&t.operands.forEach((function(t){"must_have"!==t.req_type&&"nice_to_have"!==t.req_type||t.skill&&t.skill.clustering_id&&e.push(t.skill.clustering_id)}))})),e}))[0];(0,r.useEffect)((function(){var e=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0;t<e.length;t+=1)if(e[t].operands.length>1)return!0;return!1}(t);e!==i.skills&&a(xe(xe({},i),{},{skills:e}))}),[t]);var O=function(e,r){if(e&&r&&r.uuid){var i=(0,f.Z)(t),a=i.findIndex((function(t){return t.uuid===e}));a>-1&&(i[a]=r),n(i)}},S=function(e){var r=[].concat((0,f.Z)(t),[{uuid:(0,Y.k$)(),operator:"OR",req_type:e,req_category:"skill_group",operands:[{req_type:"hidden",req_category:"skill",uuid:(0,Y.k$)()}]}]);n(r)},z=function(e){var r=t.filter((function(t){return t.uuid!==e}));n(r)},P=function(e){return(0,E.jsx)("div",{children:t.filter((function(t){return t.req_type===e})).map((function(e,t){return(0,E.jsxs)("div",{className:"position-relative",children:[(0,E.jsx)("div",{className:"post-job-skill-select-count",children:t+1}),(0,E.jsx)(oe,{id:e.uuid,skillGroup:e,onChange:O,onDelete:z},e.uuid)]},e.uuid)}))})};return(0,r.useEffect)((function(){s&&s.uuid&&(k(!0),(0,V.IQ)("clustering/skill/for-role?role_keys[]=".concat(encodeURIComponent(s.key))).then((function(e){v(e),k(!1)})).catch((function(){v([])})))}),[s]),(0,E.jsxs)("div",{className:"post-job-skills",children:[(0,E.jsx)(me,{suggestedSkills:g,suggestedSkillsLoading:w,activeSuggestedSkill:_,setActiveSuggestedSkill:Z,handleAddSuggestedSkill:function(e){for(var r=t.filter((function(t){return t.req_type===e})),i=null,a=r&&r.length>0?r[0].uuid:"",s=r.length-1;s>=0;s-=1){for(var l=0;l<r[s].operands.length;l+=1)if(r[s].operands[l].req_type===e){i=s+1,a=r[s+1]?r[s+1].uuid:null;break}if(i||0===i)break}var o=null;if((o=a?xe(xe({},r[i||0]),{},{operands:(0,f.Z)(r[i||0].operands)}):{uuid:(0,Y.k$)(),operator:"OR",req_type:e,req_category:"skill_group",operands:[{req_type:"hidden",req_category:"skill",uuid:(0,Y.k$)()}]}).operands.push({req_type:e,req_category:"skill",uuid:(0,Y.k$)(),skill:_}),a&&o&&o.uuid){var c=(0,f.Z)(t);i=c.findIndex((function(e){return e.uuid===a})),c[i]=o,n(c)}else if(o&&o.uuid){var d=[].concat((0,f.Z)(t),[o]);n(d)}},skills:t,showSuggestion:"new"===l||"edit"===l&&C&&C.length<=0}),(0,E.jsx)(y.Z,{centered:!0,destroyOnClose:!0,visible:c,onOk:function(){u(!1)},onCancel:function(){u(!1)},className:"post-job-skills-request-modal",footer:null,closeIcon:(0,E.jsx)(d.Z,{component:X.r}),children:(0,E.jsx)(ce.Z,{mode:"edit",category:"skill"})}),(0,E.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-4",children:(0,E.jsxs)("div",{className:"d-flex flex-wrap align-items-center",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 text-color-dark-grey-dark mr-4 mb-4",children:"Must-Have Skills"}),(0,E.jsx)("div",{className:"text-color-dark-grey-light text-italic mb-4",children:"(only candidates with proven ability can apply)"})]})}),P(he),(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{type:"primary",size:"large",className:"post-job-skills-add-more-btn",onClick:function(){S(he)},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("span",{children:(0,E.jsx)(d.Z,{component:ne.r,style:{fontSize:"24px"}})}),(0,E.jsx)("span",{children:"Add more"})]})})}),(0,E.jsx)("div",{style:{marginLeft:"-21px",marginRight:"-17px"},children:(0,E.jsx)(B.Z,{style:{margin:"16px 0px 8px 0px"}})}),(0,E.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-4",children:(0,E.jsxs)("div",{className:"d-flex flex-wrap align-items-center",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 text-color-dark-grey-dark mr-4 mb-4",children:"Nice-to-Have Skills"}),(0,E.jsx)("div",{className:"text-color-dark-grey-light text-italic mb-4",children:"(not required but candidates with these skills are preferred)"})]})}),P(fe),(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{type:"primary",size:"large",className:"post-job-skills-add-more-btn",onClick:function(){S(fe)},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("span",{children:(0,E.jsx)(d.Z,{component:ne.r,style:{fontSize:"24px"}})}),(0,E.jsx)("span",{children:"Add more"})]})})}),(0,E.jsxs)("div",{style:{marginTop:"16px"},className:"d-flex justify-content-between text-size-14 cursor-pointer",onClick:function(){u(!0)},children:[(0,E.jsx)("u",{children:"Can't find a skill? "}),(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-weight-500 cursor-pointer",onClick:function(){x(!0)},children:(0,E.jsx)("u",{children:"Help"})})]}),(0,E.jsxs)(y.Z,{visible:p,className:"text-size-16",width:"600px",footer
1:null,closable:!1,centered:!0,onCancel:function(){x(!1)},children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 text-color-dark-grey-dark mb-8",children:"Tips to leverage our skills architecture to attract the most relevant applications:"}),(0,E.jsxs)("div",{style:{border:"1px solid #D5DAEC",padding:"16px 20px",borderRadius:"4px 4px 0 0"},children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark text-size-18 mb-4",children:"Specific Substitutes \u2192 OR"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light mb-8",children:"Specify upto 3 substitute skills in a single requirement where you have clearly identified alternatives"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark",children:"Example for frontend developer skills: React OR Angular OR Vue.js"})]}),(0,E.jsxs)("div",{style:{border:"1px solid #D5DAEC",padding:"16px 20px",borderRadius:"0 0 4px 4px",borderTop:"none"},children:[(0,E.jsxs)("div",{className:"d-flex align-items-center text-weight-500 text-color-dark-grey-dark text-size-18 mb-4",children:["Clusters for closely-linked skills \u2192 \xa0 ",(0,E.jsx)(d.Z,{style:{marginTop:"2px"},type:"folder",theme:"filled"})]}),(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-light mb-8",children:["Specify skill groups or clusters (denoted with ",(0,E.jsx)(d.Z,{type:"folder",theme:"filled"})," icon) to allow applicants with proven ability with any one of the skills in the cluster"]}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark",children:"Example for cloud management experience : if you want someone with any cloud experience, specify \u2018Cloud Provider\u2019 as a skill cluster instead of specifying individual platforms like AWS, GCP, Azure, etc."})]}),(0,E.jsx)("div",{className:"d-flex justify-content-end mt-20",children:(0,E.jsx)(j.Z,{size:"large",style:{width:"160px",height:"48px"},type:"primary",className:"text-weight-500 text-size-16",onClick:function(){x(!1)},children:"Ok, got it"})})]})]})};ge.defaultProps={status:{},setStatus:function(){}};var ye=ge;function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var be=v.Z.Panel,we=C.Z.TextArea,ke=N.Z.Option,Ne=function(e){var t=e.description,n=e.setDescription,i=e.video,a=(e.setVideo,e.status),s=e.setStatus,l=(0,r.useState)(null),o=l[0],c=l[1],d=(0,r.useState)(""),u=d[0],m=d[1],p=(0,r.useState)(!1),x=p[0],h=p[1];return(0,r.useEffect)((function(){var e=!(!t&&null===i.provider);e!==a.about&&s(je(je({},a),{},{about:e}))}),[t,i]),(0,E.jsxs)("div",{className:"post-job-role-details",children:[(0,E.jsx)("div",{className:"d-flex justify-content-between",children:(0,E.jsx)("div",{className:"text-weight-500",children:"About Work"})}),(0,E.jsxs)("div",{className:"post-job-role-details-editor",children:[(0,E.jsx)(we,{rows:4,onchange:function(e){n(e)},style:{backgroundColor:"#F4F7FB"}}),(0,E.jsx)("p",{children:"Use this space to specify 2 things candidates really care about: 1) About the work - Scale and relevance of the product/project and 2) About the team - structure and size, leader/manager name and background."})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("h3",{children:"Location / Timezone Preference"}),(0,E.jsx)(we,{style:{backgroundColor:"#F4F7FB"},rows:4}),(0,E.jsx)("p",{children:"Specify your geographical and/or timezone requirement for candidate. Example: Overlap of at least 4hrs with PDT (UTC\u221207:00)"})]}),(0,E.jsx)(N.Z,{className:"custom-select-video-type",placeholder:"Add a Video",optionFilterProp:"children",onChange:function(e){c(e)},style:{width:"100%",height:"48px",backgroundColor:"#F4F7FB"},children:(0,E.jsx)(ke,{value:"link",children:"Paste Link"})}),"link"===o&&(0,E.jsxs)("div",{className:"mt-16",children:[(0,E.jsx)(_.Z,{children:(0,E.jsx)(Z.Z,{children:(0,E.jsxs)("div",{className:"mb-12",children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Paste Video Link"}),(0,E.jsx)(C.Z,{style:{height:"48px",border:"1px solid #D5DAEC",backgroundColor:"#F4F7FB"},onBlur:function(){h(!(null!=u.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)))},onChange:function(e){return m(e.target.value)},value:u}),x&&(0,E.jsx)("span",{children:"Please enter a valid URL"})]})})}),(0,E.jsx)(_.Z,{children:(0,E.jsx)(Z.Z,{children:(0,E.jsx)(v.Z,{className:"inner
1-collapse",ghost:!0,expandIconPosition:"right",children:(0,E.jsx)(be,{header:"Details About Video",children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsxs)("div",{className:"mb-12",children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Name"}),(0,E.jsx)(C.Z,{style:{height:"48px",border:"1px solid #D5DAEC",backgroundColor:"#F4F7FB"}})]})}),(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsxs)("div",{className:"mb-12",children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Designation / Title"}),(0,E.jsx)(C.Z,{style:{height:"48px",border:"1px solid #D5DAEC",backgroundColor:"#F4F7FB"}})]})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"mb-12",children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Linkedin"}),(0,E.jsx)(C.Z,{className:"input-suffix",style:{height:"48px",border:"1px solid #D5DAEC",backgroundColor:"#F4F7FB"},addonBefore:"linkedin.com/in/",size:"large"})]})})]})},"1")})})})]})]})};Ne.defaultProps={description:"",video:{},setDescription:function(){},setVideo:function(){},status:{},setStatus:function(){}};var _e=Ne;var Ze=n(81865),Ce=n(59314);function Oe(){return Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oe.apply(this,arguments)}function Se(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ze=r.createElement("path",{id:"preview",d:"M20,24H4c-1.1,0-2-0.9-2-2V2c0-1.1,0.9-2,2-2h16c1.1,0,2,0.9,2,2v20C22,23.1,21.1,24,20,24z M11,7 c0.55,0,1-0.45,1-1s-0.45-1-1-1H7C6.45,5,6,5.45,6,6s0.45,1,1,1H11z M17,11c0.55,0,1-0.45,1-1s-0.45-1-1-1H7c-0.55,0-1,0.45-1,1 s0.45,1,1,1H17z M17,15c0.55,0,1-0.45,1-1s-0.45-1-1-1H7c-0.55,0-1,0.45-1,1s0.45,1,1,1H17z M14,19c0.55,0,1-0.45,1-1s-0.45-1-1-1H7 c-0.55,0-1,0.45-1,1s0.45,1,1,1H14z"}),Ee=function(e){var t=e.svgRef,n=e.title,i=Se(e,["svgRef","title"]);return r.createElement("svg",Oe({id:"preview_1_",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},i),n?r.createElement("title",null,n):null,ze)},Pe=r.forwardRef((function(e,t){return r.createElement(Ee,Oe({svgRef:t},e))})),De=n(19427);function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ae={color:"#7c7f88",marginRight:"5px"},Ie=function(e){var t=e.payload,n=e.onChange,r=t.items&&t.items[0]||{},i=function(){return{visible:t.visible,items:[Le({},r)]}};return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsx)("div",{className:"d-flex",children:(0,E.jsxs)("div",{className:"text-weight-500 mr-12",children:["Pitch Note/Video",(0,E.jsx)("span",{className:"ml-4 text-size-14 text-weight-400 text-color-dark-grey-light",children:"(Pitch or Cover Note is mandatory by default)"})]})}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){n("applyDetails",Le(Le({},t),{},{visible:!1,items:[{apply_instruction:null,text_pitch_required:!0,video_pitch_required:!1}]}))},children:"Remove"})]}),(0,E.jsx)("div",{className:"text-color-dark-grey-light mt-8 mb-4",children:"Specific Topics/Questions Candidates Need to Address:"}),(0,E.jsx)("div",{className:"mb-8",children:(0,E.jsx)(C.Z.TextArea,{placeholder:"Type here...",value:r.apply_instruction,allowClear:!0,rows:3,onChange:function(e){var t=i();t.items[0].apply_instruction=e.target.value,n("applyDetails",t)}})}),(0,E.jsx)("div",{className:"mb-12",children:(0,E.jsxs)(_.Z,{gutter:[12,12],type:"flex",children:[(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsxs)("div",{style:{border:"1px solid #D5DAEC",borderRadius:"4px",padding:"10px 8px"},className:"w-100 d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{style:Ae,component:Pe}),(0,E.jsx)("div",{children:"Pitch or Cover Note"})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{className:"mr-8",defaultChecked:r.text_pitch_required,
1checked:r.text_pitch_required,onChange:function(e){var t=i();t.items[0].text_pitch_required=e,n("applyDetails",t)}}),(0,E.jsx)("div",{children:"Must Have"})]})]})}),(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsxs)("div",{style:{border:"1px solid #D5DAEC",borderRadius:"4px",padding:"10px 8px"},className:"w-100 d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{style:Ae,component:De.r}),(0,E.jsx)("div",{children:"Pitch Video"})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{className:"mr-8",defaultChecked:r.video_pitch_required,checked:r.video_pitch_required,onChange:function(e){var t=i();t.items[0].video_pitch_required=e,n("applyDetails",t)}}),(0,E.jsx)("div",{children:"Must Have"})]})]})})]})})]})};Ie.defaultProps={onChange:function(){}};var Me=Ie;function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qe=[{title:"Delivery Owner"},{title:"People Manager"},{title:"Team Member"},{title:"Individual Contributor"}],Be=function(e){var t=e.payload,n=e.onChange,r=t.items&&t.items[0]||{},i=function(){return r.uuid?Te({},r):{uuid:(0,Y.k$)(),req_category:"teamrole",req_type:"nice_to_have"}};return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"text-weight-500 mr-12",children:"Team Role"}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{onChange:function(e){var r=e?"must_have":"nice_to_have",a=i();a.req_type=r,n("teamrole",Te(Te({},t),{},{items:[a]}))},defaultChecked:"must_have"===r.req_type}),(0,E.jsx)("span",{className:"ml-8 text-color-dark-grey-dark",children:"Must have"})]})]}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){n("teamrole",Te(Te({},t),{},{visible:!1,items:[]}))},children:"Remove"})]}),(0,E.jsx)("div",{className:"text-color-dark-grey-light mt-8 mb-4",children:"Select any one of the below"}),(0,E.jsx)("div",{children:(0,E.jsx)(q.ZP.Group,{className:"w-100",value:r.teamrole,onChange:function(e){var r=e.target.value,a=i();a.teamrole=r,n("teamrole",Te(Te({},t),{},{items:[a]}))},children:(0,E.jsx)(_.Z,{gutter:[12,8],children:qe.map((function(e){return(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsx)(q.ZP,{value:e.title,children:e.title})},e.title)}))})})})]})};Be.defaultProps={onChange:function(){}};var Ve=Be;function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var We=[{title:"Business (B2B)"},{title:"Consumer (B2C)"},{title:"Marketplace Platform"}],Je=function(e){var t=e.payload,n=e.onChange,r=t.items&&t.items[0]||{},i=function(){return r.uuid?He({},r):{uuid:(0,Y.k$)(),req_category:"stakeholder",req_type:"nice_to_have"}};return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"text-weight-500 mr-12",children:"B2B/B2C"}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{onChange:function(e){var r=e?"must_have":"nice_to_have",a=i();a.req_type=r,n("stakeholder",He(He({},t),{},{items:[a]}))},defaultChecked:"must_have"===r.req_type}),(0,E.jsx)("span",{className:"ml-8 text-color-dark-grey-dark",children:"Must have"})]})]}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){n("stakeholder",He(He({},t),{},{visible:!1,items:[]}))},children:"Remove"})]}),(0,E.jsx)("div",{className:"text-color-dark-grey-light mt-8 mb-4",children:"Select any one of the below"}),(0,E.jsx)("div",{children:(0,E.jsx)(q.ZP.Group,{className:"w-100",value:r.stakeholder,onChange:function(e){var r=e.target.value,a=i();a.stakeholder=r,n("stakeholder",He(He({},t),{},{items:[a]}))},children:(0,E.jsx)(_.Z,{gutter:[12,8],children:We.map((function(e){return(0,E.jsx)(Z.Z,{xs:24,lg:8,children:(0,E.jsx)(q.ZP,{value:e.title,children:e.title})},e.title)}))})})})]})};
1Je.defaultProps={onChange:function(){}};var Ue=Je;function $e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ke=[{title:"Product"},{title:"Service"}],Qe=function(e){var t=e.payload,n=e.onChange,r=t.items&&t.items[0]||{},i=function(){return r.uuid?Ge({},r):{uuid:(0,Y.k$)(),req_category:"company_type",req_type:"nice_to_have"}};return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"text-weight-500 mr-12",children:"Company Type"}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{onChange:function(e){var r=e?"must_have":"nice_to_have",a=i();a.req_type=r,n("companyType",Ge(Ge({},t),{},{items:[a]}))},defaultChecked:"must_have"===r.req_type}),(0,E.jsx)("span",{className:"ml-8 text-color-dark-grey-dark",children:"Must have"})]})]}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){n("companyType",Ge(Ge({},t),{},{visible:!1,items:[]}))},children:"Remove"})]}),(0,E.jsx)("div",{className:"text-color-dark-grey-light mt-8 mb-4",children:"Select any one of the below"}),(0,E.jsx)("div",{children:(0,E.jsx)(q.ZP.Group,{className:"w-100",value:r.company_type,onChange:function(e){var r=e.target.value,a=i();a.company_type=r,n("companyType",Ge(Ge({},t),{},{items:[a]}))},children:(0,E.jsx)(_.Z,{gutter:[12,8],children:Ke.map((function(e){return(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsx)(q.ZP,{value:e.title,children:e.title})},e.title)}))})})})]})};Qe.defaultProps={onChange:function(){}};var Xe=Qe;function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt=[{title:"Early"},{title:"Growth"},{title:"Late"},{title:"IPO"},{title:"Fortune 1000"}],rt=function(e){var t=e.payload,n=e.onChange,r=t.items&&t.items[0]||{},i=function(){return r.uuid?tt({},r):{uuid:(0,Y.k$)(),req_category:"company_stage",req_type:"nice_to_have"}};return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"text-weight-500 mr-12",children:"Company Stage"}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{onChange:function(e){var r=e?"must_have":"nice_to_have",a=i();a.req_type=r,n("companyStage",tt(tt({},t),{},{items:[a]}))},defaultChecked:"must_have"===r.req_type}),(0,E.jsx)("span",{className:"ml-8 text-color-dark-grey-dark",children:"Must have"})]})]}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){n("companyStage",tt(tt({},t),{},{visible:!1,items:[]}))},children:"Remove"})]}),(0,E.jsx)("div",{className:"text-color-dark-grey-light mt-8 mb-4",children:"Select any one of the below"}),(0,E.jsx)("div",{children:(0,E.jsx)(q.ZP.Group,{className:"w-100",value:r.company_stage,onChange:function(e){var r=e.target.value,a=i();
1a.company_stage=r,n("companyStage",tt(tt({},t),{},{items:[a]}))},children:(0,E.jsx)(_.Z,{gutter:[12,8],children:nt.map((function(e){return(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsx)(q.ZP,{value:e.title,children:e.title})},e.title)}))})})})]})};rt.defaultProps={onChange:function(){}};var it=rt,at=n(17673),st=n(49404);function lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ct=[{title:"High School Certificate/Diploma"},{title:"Associate's"},{title:"Bachelor's / Undergraduate"},{title:"Master's / Graduate"},{title:"PhD / Doctorate"}],dt=function(e){var t,n=e.payload,i=e.onChange,a=n.items&&n.items[0]||{},s=(0,r.useState)([]),l=s[0],o=s[1],c=(0,r.useState)(!1),d=c[0],u=c[1],m=(0,r.useState)(a.specialization&&a.specialization.name||""),p=m[0],x=m[1],h=function(){return a.uuid?ot({},a):{uuid:(0,Y.k$)(),req_category:"education",req_type:"nice_to_have",college:null,normalized_degree:"Bachelor's / Undergraduate"}};var f=function(e){var t=h();t.specialization=e,i("education",ot(ot({},n),{},{items:[t]})),x(e.name)},g=(0,E.jsx)(N.Z,{size:"large",className:"text-color-dark-grey-dark",defaultValue:a.normalized_degree||ct[2].title,onChange:function(e){var t=h();t.normalized_degree=e,i("education",ot(ot({},n),{},{items:[t]}))},children:ct.map((function(e){return(0,E.jsx)(N.Z.Option,{value:e.title,children:e.title},e.title)}))});return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"text-weight-500 mr-12",children:"Education"}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{onChange:function(e){var t=e?"must_have":"nice_to_have",r=h();r.req_type=t,i("education",ot(ot({},n),{},{items:[r]}))},defaultChecked:"must_have"===a.req_type}),(0,E.jsx)("span",{className:"ml-8 text-color-dark-grey-dark",children:"Must have"})]})]}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){i("education",ot(ot({},n),{},{visible:!1,items:[{uuid:(0,Y.k$)(),req_category:"education",req_type:"nice_to_have",college:null,normalized_degree:"Bachelor's / Undergraduate"}]}))},children:"Remove"})]}),(0,E.jsxs)("div",{className:"position-relative mt-12",children:[(0,E.jsx)(C.Z,{size:"large",className:"w-100 text-color-dark-grey-dark mb-4",value:p,addonBefore:g,onChange:function(e){!function(e){if(clearTimeout(t),!e)return o([]),void u(!1);t=setTimeout((function(){var t={category:"specialization",q:e};(0,V.Z7)("clustering/search/?".concat(at.stringify(t))).then((function(e){o(e),u(!0)})).catch((function(){}))}),300)}(e.target.value),x(e.target.value)},placeholder:"Specialization (optional)"}),d?(0,E.jsx)(st.Z,{category:"specialization",dropdownData:l,dropdownVisible:d,handleAdd:f,handleDelete:function(){},inputInFocus:!0,inputValue:"",internalNodeSelectable:!0,mode:"single",selectedValue:null,setDropdownVisible:u,showDropdownAsList:!1,showPhoto:!1,emptyResult:!1,dropdownWithoutPortal:!0}):null]})]})},ut=function(e){var t,n=e.onSelection,i=(0,r.useState)(!1),a=i[0],s=i[1],l=(0,r.useState)([]),o=l[0],c=l[1],d=(0,r.createRef)(),u=(0,r.useRef)(null);(0,r.useEffect)((function(){!a&&o.length&&c([]),a&&u.current.focus()}),[a]);var m=(0,r.useCallback)((function(e){d&&!d.current.contains(e.target)&&s(!1)}),[d]);(0,r.useLayoutEffect)((function(){return window.addEventListener("click",m),function(){window.removeEventListener("click",m)}}),[m]);var p=function(e){var n=e.target.value;clearTimeout(t),t=setTimeout((function(){!function(e){if(e){var t={category:"language",q:e};(0,V.Z7)("clustering/search/?".concat(at.stringify(t))).then((function(e){var t=[];e.forEach((function(e){t.push(e)})),c(t)})).catch((function(){}))}}(n)}),300)};return(0,E.jsxs)("div",{className:"profilev2-location-select-container",ref:d,children:[(0,E.jsx)("span",{className:"profilev2-location-select-btn",children:(0,E.jsx)(j.Z,{type:"primary",className:"profilev2-primary-btn",onClick:function(){s(!a)},children:"Add Language"})}),a?(0,E.jsxs)("div",{className:"profilev2-location-select-dropdown",children:[(0,E.jsx)("div",{className:"profilev2-location-select-dropdown-placeholder",children:"Search for a language"}),(0,E.jsx)("input",{type:"text",className:"ant-input",ref:u,onCh
1ange:p}),(0,E.jsx)("div",{className:"profilev2-location-select-dropdown-item-container",children:o.map((function(e){return(0,E.jsx)("div",{onClick:function(){n(e),s(!1)},className:"profilev2-location-select-dropdown-item w-100",children:e.name},e.name)}))})]}):null]})};ut.defaultProps={onSelection:function(){}};var mt=ut;function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ht=[{key:"Elementary"},{key:"Limited Working"},{key:"Professional Working"},{key:"Full Professional"},{key:"Native or bilingual"}],ft=function(e){var t=e.payload,n=e.onChange,i=(0,r.useState)({}),a=i[0],s=i[1],l="AND"===t.operator;return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"text-weight-500 mr-12",children:"Language"}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{defaultChecked:"must_have"===t.req_type,onChange:function(e){var r=e?"must_have":"nice_to_have";"AND"===t.operator?n("language",xt(xt({},t),{},{req_type:r,items:t.items.map((function(e){return xt(xt({},e),{},{req_type:r})}))})):"OR"===t.operator&&n("language",xt(xt({},t),{},{req_type:r,items:[xt(xt({},t.items[0]),{},{operands:t.items[0].operands.map((function(e){return xt(xt({},e),{},{req_type:r})}))})]}))}}),(0,E.jsx)("span",{className:"ml-8 text-color-dark-grey-dark",children:"Must have"})]})]}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){n("language",xt(xt({},t),{},{visible:!1,items:"OR"===t.operator?[xt(xt({},t.items[0]),{},{operands:[]})]:[]}))},children:"Remove"})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center mt-8 mb-8",children:[(0,E.jsx)("span",{className:"mr-8 text-size-14 ".concat(l?"text-color-dark-grey-lighter":"text-color-dark-grey-dark"),children:"ANY"}),(0,E.jsx)(Ce.Z,{defaultChecked:l,onChange:function(e){var r=e?"AND":"OR";if("AND"===r){var i=t.items[0].operands;n("language",xt(xt({},t),{},{operator:r,items:i.map((function(e){return xt({},e)}))}))}else if("OR"===r){var a=t.items;n("language",xt(xt({},t),{},{operator:r,items:[{uuid:(0,Y.k$)(),operator:r,operands:a.map((function(e){return xt({},e)}))}]}))}}}),(0,E.jsx)("span",{className:"ml-8 text-size-14 ".concat(l?"text-color-dark-grey-dark":"text-color-dark-grey-lighter"),children:"ALL"}),(0,E.jsx)("span",{className:"ml-12 text-color-dark-grey-light",children:l?"All of the below selections need to be met":"Any one of the below selections need to be met"})]}),(0,E.jsxs)("div",{children:[(0,E.jsxs)(_.Z,{gutter:[12,12],children:[("OR"===t.operator?t.items[0].operands:t.items).map((function(e){return(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"post-job-advanced-pill",children:[(0,E.jsx)("span",{children:e.language.name}),(0,E.jsx)("span",{className:"cursor-pointer",onClick:function(){var r;r=e.uuid,"OR"===t.operator?n("language",xt(xt({},t),{},{items:[xt(xt({},t.items[0]),{},{operands:t.items[0].operands.filter((function(e){return e.uuid!==r}))})]})):"AND"===t.operator&&n("language",xt(xt({},t),{},{items:t.items.filter((function(e){return e.uuid!==r}))}))},children:(0,E.jsx)(d.Z,{type:"close"})})]}),(0,E.jsx)("div",{className:"mt-4 text-color-blue text-weight-500 text-size-14 cursor-pointer",onClick:function(){!function(e){var n;(n=("OR"===t.operator?t.items[0].operands:t.items).find((function(t){return t.uuid===e})))&&s({uuid:n.uuid,name:n.language.name,reading:n.reading_proficiency,writing:n.writing_proficiency,speaking:n.speaking_proficiency})}(e.uuid)},children:"Set proficiency"})]})},e.uuid)})),(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsx)(mt,{onSelection:function(e){var r={uuid:(0,Y.k$)(),req_type:t.req_type,req_category:"language",language:xt({},e)};"OR"===t.operator?n("language",xt(xt({},t),{},{items:[xt(xt({},t.items[0]),{},{operands:[].concat((0,f.Z)(t.items[0].operands),[r])})]})):"AND"===t.operator&&n("language",xt(xt({},t),{},{items:[].concat((0,f.Z)(t.items),[r])}))}})})]}),(0,E.jsx)(y.Z,{title:(0,E.jsx)("span",{className:"text-size-18 text-weight-500",children:"Language Proficiency"}),visible:0!==Object.keys(a).length,destroyOnClose:!0,centered:!0,width:768,onOk:function(){var e={};a.reading&&(e.reading_proficiency=a.reading),a.writing&&(e.writing_proficiency=a.writing),a.speaking&&(e.speaking_proficiency=a.speaking);var r=("OR"===t.operator?t.items[0].operands:t.items).map((function(t){return t.uuid===a.uuid?xt(xt({},t),e):xt({},t)}));s({}),"OR"===t.operator?n("language",xt(xt({},t),{},{items:[xt(xt({},t.items[0]),{},{operands:r})]})):"AND"===t.operator&&n("language",xt(xt({},t),{},{items:r}))},onCancel:function(){s({})},children:(0,E.jsxs)("div",{className:"text-size-16",children:[(0,E.jsxs)("div",{className:"mb-8",children:["Set proficiency for ",(0,E.jsx)("span",{className:"text-weight-500",children:a.name})," language"]}),(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{gutter:[12,8],children:[(0,E.jsx)(Z.Z,{xs:24,lg:8,children:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500",children:"Reading"}),(0,E.jsx)(N.Z,{className:"w-100",size:"large",defaultValue:a.reading,onChange:function(e){return s(xt(xt({},a),{},{reading:e}))},children:ht.map((function(e){return(0,E.jsx)(N.Z.Option,{children:e.key},e.key)}))})]})}),(0,E.jsx)(Z.Z,{xs:24,lg:8,children:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500",children:"Writing"}),(0,E.jsx)(N.Z,{className:"w-100",size:"large",defaultValue:a.writing,onChange:function(e){return s(xt(xt({},a),{},{writing:e}))},children:ht.map((function(e){return(0,E.jsx)(N.Z.Option,{children:e.key},e.key)}))})]})}),(0,E.jsx)(Z.Z,{xs:24,lg:8,children:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500",children:"Speaking"}),(0,E.jsx)(N.Z,{className:"w-100",size:"large",defaultValue:a.speaking,onChange:function(e){return s(xt(xt({},a),{},{speaking:e}))},children:ht.map((function(e){return(0,E.jsx)(N.Z.Option,{children:e.key},e.key)}))})]})})]})})]})})]})]})},gt=function(e){var t,n=e.onSelection,i=(0,r.useState)(!1),a=i[0],s=i[1],l=(0,r.useState)([]),o=l[0],c=l[1],d=(0,r.createRef)(),u=(0,r.useRef)(null);(0,r.useEffect)((function(){!a&&o.length&&c([]),a&&u.current.focus()}
1),[a]);var m=(0,r.useCallback)((function(e){d&&!d.current.contains(e.target)&&s(!1)}),[d]);(0,r.useLayoutEffect)((function(){return window.addEventListener("click",m),function(){window.removeEventListener("click",m)}}),[m]);var p=function(e){var n=e.target.value;clearTimeout(t),t=setTimeout((function(){!function(e){if(e){var t={category:"industry",q:e};(0,V.Z7)("clustering/search/?".concat(at.stringify(t))).then((function(e){var t=[];e.forEach((function(e){t.push(e)})),c(t)})).catch((function(){}))}}(n)}),300)};return(0,E.jsxs)("div",{className:"profilev2-location-select-container",ref:d,children:[(0,E.jsx)("span",{className:"profilev2-location-select-btn",children:(0,E.jsx)(j.Z,{type:"primary",className:"profilev2-primary-btn",onClick:function(){s(!a)},children:"Add Industry"})}),a?(0,E.jsxs)("div",{className:"profilev2-location-select-dropdown",children:[(0,E.jsx)("div",{className:"profilev2-location-select-dropdown-placeholder",children:"Search for an industry"}),(0,E.jsx)("input",{type:"text",className:"ant-input",ref:u,onChange:p}),(0,E.jsx)("div",{className:"profilev2-location-select-dropdown-item-container",children:o.map((function(e){return(0,E.jsx)("div",{onClick:function(){n(e),s(!1)},className:"profilev2-location-select-dropdown-item w-100",children:e.name},e.name)}))})]}):null]})};gt.defaultProps={onSelection:function(){}};var yt=gt;function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bt=function(e){var t=e.payload,n=e.onChange,r="AND"===t.operator,i=function(e){"OR"===t.operator?n("industry",jt(jt({},t),{},{items:[jt(jt({},t.items[0]),{},{operands:t.items[0].operands.filter((function(t){return t.uuid!==e}))})]})):"AND"===t.operator&&n("industry",jt(jt({},t),{},{items:t.items.filter((function(t){return t.uuid!==e}))}))};return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"text-weight-500 mr-12",children:"Industry"}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{defaultChecked:"must_have"===t.req_type,onChange:function(e){var r=e?"must_have":"nice_to_have";"AND"===t.operator?n("industry",jt(jt({},t),{},{req_type:r,items:t.items.map((function(e){return jt(jt({},e),{},{req_type:r})}))})):"OR"===t.operator&&n("industry",jt(jt({},t),{},{req_type:r,items:[jt(jt({},t.items[0]),{},{operands:t.items[0].operands.map((function(e){return jt(jt({},e),{},{req_type:r})}))})]}))}}),(0,E.jsx)("span",{className:"ml-8 text-color-dark-grey-dark",children:"Must have"})]})]}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){n("industry",jt(jt({},t),{},{visible:!1,items:"OR"===t.operator?[jt(jt({},t.items[0]),{},{operands:[]})]:[]}))},children:"Remove"})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center mt-8 mb-8",children:[(0,E.jsx)("span",{className:"mr-8 text-size-14 ".concat(r?"text-color-dark-grey-lighter":"text-color-dark-grey-dark"),children:"ANY"}),(0,E.jsx)(Ce.Z,{defaultChecked:r,onChange:function(e){var r=e?"AND":"OR";if("AND"===r){var i=t.items[0].operands;n("industry",jt(jt({},t),{},{operator:r,items:i.map((function(e){return jt({},e)}))}))}else if("OR"===r){var a=t.items;n("industry",jt(jt({},t),{},{operator:r,items:[{uuid:(0,Y.k$)(),operator:r,operands:a.map((function(e){return jt({},e)}))}]}))}}}),(0,E.jsx)("span",{className:"ml-8 text-size-14 ".concat(r?"text-color-dark-grey-dark":"text-color-dark-grey-lighter"),children:"ALL"}),(0,E.jsx)("span",{className:"ml-12 text-color-dark-grey-light",children:r?"All of the below selections need to be met":"Any one of the below selections need to be met"})]}),(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{gutter:[12,12],children:["OR"===t.operator?t.items[0].operands.map((function(e){return(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsxs)("div",{className:"post-job-advanced-pill",children:[(0,E.jsx)("span",{children:e.industry.name}),(0,E.jsx)("span",{className:"cursor-pointer",onClick:function(){i(e.uuid)},children:(0,E.jsx)(d.Z,{type:"close"})})]})},e.uuid)})):"AND"===t.operator?t.items.map((function(e){return(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsxs)("div",{className:"post-job-advanced-pill",children:[(0,E.jsx)("span",{children:e.industry.name}),(0,E.jsx)("span",{className:"cursor-pointer",onClick:function(){i(e.uuid)},children:(0,E.jsx)(d.Z,{type:"close"})})]})},e.uuid)})):null,(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsx)(yt,{onSelection:function(e){var r={uuid:(0,Y.k$)(),req_type:t.req_type,req_category:"industry",industry:jt({},e)};"OR"===t.operator?n("industry",jt(jt({},t),{},{items:[jt(jt({},t.items[0]),{},{operands:[].concat((0,f.Z)(t.items[0].operands),[r])})]})):"AND"===t.operator&&n("industry",jt(jt({},t),{},{items:[].concat((0,f.Z)(t.items),[r])}))}})})]})})]})};function wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?wt(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nt=function(e){return e?"".concat(e).replace(/\B(?=(\d{3})+(?!\d))/g,","):""},_t=function(e){return e.replace(/\$\s?|(,*)/g,"")},Zt=function(e){var t=e.payload,n=e.onChange,i=e.currencyList,a=e.fetchCurrencyList;(0,r.useEffect)((function(){i.length||a()}),[i]);var s=t.items&&t.items[0]||{},l=function(){return{visible:t.visible,items:[kt({},s)]}};return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between mb-8",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"text-weight-500 mr-12",children:"Budget Details"}),(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Ce.Z,{onChange:function(e){var t=l();t.items[0].budget_visibility=e?"public":"private",n("budgetDetails",t)},defaultChecked:"public"===s.budget_visibility}),(0,E.jsx)("span",{className:"ml-8 text-color-dark-grey-dark",children:"Public"})]})]}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){n("budgetDetails",kt(kt({},t),{},{visible:!1,items:[{currency:null,max_currency:null,min_currency:null,pay_frequency:null,min_budget:null,max_budget:null,max_same_as_min:!0,budget_visibility:"private"}]}))},children:"Remove"})]}),(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"mb-8 text-size-14 text-color-dark-grey-light",children:["For the following fields, ",(0,E.jsx)("b",{children:"enter the exact amount"})," e.g. 200000 or 750000. ",(0,E.jsx)("b",{children:"Do not"})," enter short form such as 200k or 7.5 lpa."]}),(0,E.jsx)("div",{className:"mb-8",children:(0,E.jsxs)(_.Z,{type:"flex",align:"bottom",gutter:[12,12],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:8,children:[(0,E.jsx)("div",{className:"text-weight-500",children:"Min Amount"}),(0,E.jsx)(z.Z,{size:"large",placeholder:"e.g. 100000",step:1,min:0,value:s.min_budget,formatter:Nt,parser:_t,onChange:function(e){var t=l();t.items[0].min_budget=e,n("budgetDetails",t)}})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:8,children:[(0,E.jsx)("div",{className:"text-weight-500",children:"Max Amount"}),(0,E.jsx)(z.Z,{size:"large",placeholder:"e.g. 120000",step:1,min:0,disabled:s.max_same_as_min,value:s.max_same_as_min?s.min_budget:s.max_budget,formatter:Nt,parser:_t,onChange:function(e){var t=l();t.items[0].max_budget=e,n("budgetDetails",t)}})]}),(0,E.jsx)(Z.Z,{xs:24,lg:8,children:(0,E.jsx)("div",{className:"post-job-optional-checkbox d-flex align-items-center",style:{height:"40px",width:"100%",border:"1px solid #D5DAEC",borderRadius:"4px",padding:"0 12px"},children:(0,E.jsx)(S.Z,{checked:s.max_same_as_min,onChange:function(e){var t=l();t.items[0].max_same_as_min=e.target.checked,n("budgetDetails",t)},children:"Max same as min"})})})]})}),(0,E.jsxs)(_.Z,{type:"flex",gutter:[12,8],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"text-weight-500",children:"Currency"}),(0,E.jsx)(N.Z,{size:"large",className:"w-100",placeholder:"Select a currency",value:s.currency,showSearch:!0,onSelect:function(e){var t=l();t.items[0].currency=e,n("budgetDetails",t)},suffixIcon:(0,E.jsx)(d.Z,{style:{fontSize:"18px",marginTop:"-2px"},component:L.r}),children:i.map((function(e){return(0,E.jsx)(N.Z.Option,{children:e[1]},e[0])}))})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"text-weight-500",children:"Pay frequency"}),(0,E.jsxs)(N.Z,{size:"large",className:"w-100",placeholder:"Select pay frequency",value:s.pay_frequency,onSelect:function(e){var t=l();t.items[0].pay_frequency=e,n("budgetDetails",t)},suffixIcon:(0,E.jsx)(d.Z,{style:{fontSize:"18px",marginTop:"-2px"},component:L.r}),children:[(0,E.jsx)(N.Z.Option,{value:"yearly",children:"Yearly"}),(0,E.jsx)(N.Z.Option,{value:"hourly",children:"Hourly"}),(0,E.jsx)(N.Z.Option,{value:"fixed",children:"Fixed"})]})]})]})]})]})};Zt.defaultProps={onChange:function(){}};var Ct=(0,i.$j)((function(e){return{currencyList:e.taxonomy.currencyList}}),(function(e){return{fetchCurrencyList:function(){return e(w.hLp())}}}))(Zt);function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Ot(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zt=function(e){var t=e.payload,n=e.onChange,r=t.items&&t.items[0]||{};return(0,E.jsxs)("div",{className:"post-job-optional",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsx)("div",{className:"text-weight-500 mr-12",children:"Text"}),(0,E.jsx)("div",{className:"post-job-optional-remove-text",onClick:function(){n("descriptive",St(St({},t),{},{visible:!1,items:[]}))},children:"Remove"})]}),(0,E.jsx)("div",{className:"mt-12",children:(0,E.jsx)(C.Z,{className:"w-100",size:"large",value:r.requirement||null,onChange:function(e){var i;(i=r.uuid?St({},r):{uuid:(0,Y.k$)(),req_type:"must_have",req_category:"descriptive"}).requirement=e.target.value,n("descriptive",St(St({},t),{},{visible:!!i.requirement,items:[i]}))},placeholder:"Anything else not covered in the above fields"})})]})};zt.defaultProps={onChange:function(){}};var Et=zt;function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ft=function(e){var t=e.options,n=e.setOptions,r=[{btnTitle:"Pitch Note/Video",disabled:t.applyDetails.visible,prop:"applyDetails"},{btnTitle:"Team Role",disabled:t.teamrole.visible,prop:"teamrole"},{btnTitle:"B2B/B2C",disabled:t.stakeholder.visible,prop:"stakeholder"},{btnTitle:"Education",disabled:t.education.visible,prop:"education"},{btnTitle:"Language",disabled:t.language.visible,prop:"language"},{btnTitle:"Industry",disabled:t.industry.visible,prop:"industry"},{btnTitle:"Company Type",disabled:t.companyType.visible,prop:"companyType"},{btnTitle:"Company Stage",disabled:t.companyStage.visible,prop:"companyStage"},{btnTitle:"Budget Details",disabled:t.budgetDetails.visible,prop:"budgetDetails"},{btnTitle:"Other",disabled:t.descriptive.visible,prop:"descriptive"}],i=function(e,r){n(Dt(Dt({},t),{},(0,h.Z)({},e,r)))};return(0,E.jsxs)("div",{className:"post-job-advance-options d-flex flex-column",children:[(0,E.jsx)("div",{className:"post-job-advance-options-btn-container d-flex flex-wrap",children:r.map((function(e){return(0,E.jsx)(j.Z,{className:"post-job-advance-option-btn",style:e.disabled?{color:"white",border:"1px solid #2a4cd5",backgroundColor:"#2a4cd5"}:{},onClick:function(){n(Dt(Dt({},t),{},(0,h.Z)({},e.prop,Dt(Dt({},t[e.prop]),{},{visible:!e.disabled}))))},children:e.btnTitle},e.btnTitle)}))}),t.applyDetails.visible?(0,E.jsx)(Me,{payload:t.applyDetails,onChange:i}):null,t.teamrole.visible?(0,E.jsx)(Ve,{payload:t.teamrole,onChange:i}):null,t.stakeholder.visible?(0,E.jsx)(Ue,{payload:t.stakeholder,onChange:i}):null,t.education.visible?(0,E.jsx)(dt,{payload:t.education,onChange:i}):null,t.language.visible?(0,E.jsx)(ft,{payload:t.language,onChange:i}):null,t.industry.visible?(0,E.jsx)(bt,{payload:t.industry,onChange:i}):null,t.companyType.visible?(0,E.jsx)(Xe,{payload:t.companyType,onChange:i}):null,t.companyStage.visible?(0,E.jsx)(it,{payload:t.companyStage,onChange:i}):null,t.budgetDetails.visible?(0,E.jsx)(Ct,{payload:t.budgetDetails,onChange:i}):null,t.descriptive.visible?(0,E.jsx)(Et,{payload:t.descriptive,onChange:i}):null]})},Lt=n(96187),At=function(){var e=(0,r.useState)(!1),t=e[0],n=e[1],i=(0,r.useState)(null),a=i[0],s=i[1];return(0,r.useEffect)((function(){if(a){var e=a.getPlayerState();t||1!==e&&3!==e||a.pauseVideo()}}),[t,a]),(0,E.jsxs)("div",{className:"position-fixed d-flex flex-column align-items-end",style:{bottom:"100px",right:"16px"},children:[(0,E.jsx)("div",{className:"".concat(t?"":"d-none"," mb-4"),children:(0,E.jsx)(d.Z,{component:X.r,style:{fontSize:"24px"},onClick:function(){n(!1)}})}),(0,E.jsx)("div",{className:"".concat(t?"":"d-none"," mb-4"),children:(0,E.jsx)(Lt.Z,{videoId:"gGELXqViTgk",height:"240",width:"360",auto
1play:!1,onReady:function(e){s(e.target)}})}),(0,E.jsx)(u.Z,{placement:"left",title:"Get an overview of how to convert your Job Description into kaamwork job format",children:(0,E.jsx)(d.Z,{type:"play-circle",theme:"filled",onClick:function(){n(!t)},style:{width:"60px",height:"60px",fontSize:"60px",border:"none",color:"#2a4cd5"}})})]})},It=n(54286),Mt=n(65679),Rt=n(80863),Tt=n(99087),qt=n(3296),Bt={basicDetails:{key:"basicDetails",title:"Basic Details",label:"Basic Details",icon:{component:Rt.r,size:"24px",backgroundColor:"#FFDDA2",border:"none"},hasNumber:!0},skillsRequired:{key:"skillsRequired",title:"Skills Required",label:"Skills Required",icon:{component:Tt.r,size:"24px",backgroundColor:"#FFDDD3",border:"none"},hasNumber:!0},workAndLocation:{key:"workAndLocation",title:"About Work & Location",label:"About Work & Location",icon:{component:qt.r,size:"24px",backgroundColor:"#E0D1FA",border:"none"},hasNumber:!0}};function Vt(){return Vt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vt.apply(this,arguments)}function Yt(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Ht=r.createElement("title",null,"Icon/Bin/Inactive"),Wt=r.createElement("g",{id:"Icon/Bin/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M18,18.7918 C18,20.0105 17.1205,21 16.0371,21 L7.9629,21 C6.8795,21 6,20.0105 6,18.7918 L6,7 L18,7 L18,18.7918 Z",id:"Stroke-2",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("path",{d:"M15,5.2082 C15,3.9895 14.1205,3 13.0371,3 L10.9629,3 C9.8795,3 9,3.9895 9,5.2082 L9,7 L15,7 L15,5.2082 Z",id:"Stroke-4",stroke:"#7C7F88",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("line",{x1:4,y1:7,x2:20,y2:7,id:"Stroke-5",stroke:"#3A3E4C",strokeWidth:2}),r.createElement("line",{x1:10,y1:11,x2:10,y2:17,id:"Stroke-6",stroke:"#7C7F88",strokeWidth:2}),r.createElement("line",{x1:14,y1:11,x2:14,y2:17,id:"Stroke-7",stroke:"#7C7F88",strokeWidth:2})),Jt=function(e){var t=e.svgRef,n=e.title,i=Yt(e,["svgRef","title"]);return r.createElement("svg",Vt({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Ht:n?r.createElement("title",null,n):null,Wt)},Ut=r.forwardRef((function(e,t){return r.createElement(Jt,Vt({svgRef:t},e))})),$t=n(14104);function Gt(){return Gt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gt.apply(this,arguments)}function Kt(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Qt=r.createElement("title",null,"Icon/b2b_b2c/Inactive"),Xt=r.createElement("g",{id:"Icon/b2b_b2c/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("polygon",{id:"Path-14",stroke:"#7C7F88",strokeWidth:2,fill:"#FFFFFF",points:"7 10 12 4 17 10"}),r.createElement("circle",{id:"Oval",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",cx:6.5,cy:16.5,r:3.5}),r.createElement("rect",{id:"Rectangle",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",x:13,y:13,width:7,height:7})),en=function(e){var t=e.svgRef,n=e.title,i=Kt(e,["svgRef","title"]);return r.createElement("svg",Gt({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Qt:n?r.createElement("title",null,n):null,Xt)},tn=r.forwardRef((function(e,t){return r.createElement(en,Gt({svgRef:t},e))}));function nn(){return nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nn.apply(this,arguments)}function rn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var an=r.createElement("title",null,"Icon/Learning_Development/Inactive"),sn=r.createElement("g",{id:"Icon/Learning_Development/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M19,16.4175 L19,9 L5,9 L5,16.4175 C6.8753,18.0444 9.3269,19 12,19 C14.6731,19 17.1248,18.0444 19,16.4175 Z",id:"Stroke-2",stroke:"#7C7F88",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("polygon",{id:"Stroke-4",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",points:"12 5 2 9 12 13 22 9"})),ln=function(e){var t=e.svgRef,n=e.title,i=rn(e,["svgRef","title"]);return r.createElement("svg",nn({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t}
1,i),void 0===n?an:n?r.createElement("title",null,n):null,sn)},on=r.forwardRef((function(e,t){return r.createElement(ln,nn({svgRef:t},e))}));function cn(){return cn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cn.apply(this,arguments)}function dn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var un=r.createElement("title",null,"Icon/Language/Inactive"),mn=r.createElement("g",{id:"Icon/Language/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M18,4 C19.1045695,4 20,4.8954305 20,6 L20,15 C20,16.1045695 19.1045695,17 18,17 L10.8,17 L6,21 L6,17 C4.8954305,17 4,16.1045695 4,15 L4,6 C4,4.8954305 4.8954305,4 6,4 L18,4 Z",id:"Combined-Shape",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("text",{id:"A",fontFamily:"Aeonik-Black, Aeonik",fontSize:10,fontWeight:800,fill:"#7C7F88"},r.createElement("tspan",{x:8,y:14},"A"))),pn=function(e){var t=e.svgRef,n=e.title,i=dn(e,["svgRef","title"]);return r.createElement("svg",cn({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?un:n?r.createElement("title",null,n):null,mn)},xn=r.forwardRef((function(e,t){return r.createElement(pn,cn({svgRef:t},e))}));function hn(){return hn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hn.apply(this,arguments)}function fn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var gn=r.createElement("title",null,"Icon/Company_Page/Inactive"),yn=r.createElement("g",{id:"Icon/Company_Page/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M21,10.5703 C21,9.7036 20.2964,9 19.4297,9 L16.5703,9 C15.7036,9 15,9.7036 15,10.5703 L15,21 L21,21 L21,10.5703 Z",id:"Stroke-2",stroke:"#7C7F88",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M15,5.2082 C15,3.9895 14.1205,3 13.0371,3 L4.9629,3 C3.8795,3 3,3.9895 3,5.2082 L3,21 L15,21 L15,5.2082 Z",id:"Fill-3",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:7,y1:7,x2:11,y2:7,id:"Stroke-7",stroke:"#3A3E4C",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:7,y1:11,x2:11,y2:11,id:"Stroke-8",stroke:"#3A3E4C",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M11,20 L11,16.5703 C11,15.7036 10.2964,15 9.4297,15 L8.5703,15 C7.7036,15 7,15.7036 7,16.5703 L7,20",id:"Stroke-4",stroke:"#7C7F88",strokeWidth:2})),vn=function(e){var t=e.svgRef,n=e.title,i=fn(e,["svgRef","title"]);return r.createElement("svg",hn({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?gn:n?r.createElement("title",null,n):null,yn)},jn=r.forwardRef((function(e,t){return r.createElement(vn,hn({svgRef:t},e))}));function bn(){return bn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bn.apply(this,arguments)}function wn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var kn=r.createElement("title",null,"Icon/Company_Details/Inactive"),Nn=r.createElement("g",{id:"Icon/Company_Details/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M18,5.2082 C18,3.9895 17.1205,3 16.0371,3 L7.9629,3 C6.8795,3 6,3.9895 6,5.2082 L6,21 L18,21 L18,5.2082 Z",id:"Fill-1",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M14,20 L14,16.5703 C14,15.7036 13.2964,15 12.4297,15 L11.5703,15 C10.7036,15 10,15.7036 10,16.5703 L10,20",id:"Stroke-4",stroke:"#7C7F88",strokeWidth:2}),r.createElement("line",{x1:10,y1:7,x2:14,y2:7,id:"Stroke-5",stroke:"#7C7F88",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:10,y1:11,x2:14,y2:11,id:"Stroke-6",stroke:"#7C7F88",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),_n=function(e){var t=e.svgRef,n=e.title,i=wn(e,["svgRef","title"]);return r.createElement("svg",bn({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?kn:n?r.createElement("title",null,n):null,Nn)},Zn=r.forwardRef((function(e,t){return r.createElement(_n,bn({svgRef:t},e))}));function Cn(){return Cn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cn.apply(this,arguments)}function On(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Sn=r.createElement("title",null,"Icon/Company_Stage/Inactive"),zn=r.createElement("g",{id:"Icon/Company_Stage/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M7.56155281,13 L16.4384472,13 C17.5430167,13 18.4384472,13.8954305 18.4384472,15 C18.4384472,15.1635236 18.4183925,15.32643 18.3787322,15.4850713 L17.3787322,19.4850713 C17.1561487,20.3754053 16.3561825,21 15.4384472,21 L8.56155281,21 C7.64381753,21 6.84385131,20.3754053 6.62126781,19.4850713 L5.62126781,15.4850713 C5.35337036,14.4134814 6.00489175,13.3276125 7.07648156,13.059715 C7.23512277,13.0200547 7.3980292,13 7.56155281,13 Z",id:"Rectangle",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("path",{d:"M14.5009178,2.12670777 C16.0144671,3.21594388 17,4.99288017 17,7 C17,9.00711983 16.0144671,10.7840561 14.5009178,11.8732922 C12.9859706,10.7848452 12,9.00756546 12,7 C12,5.04189952 12.9379819,3.30287647 14.3891386,2.20773806 Z",id:"Combined-Shape",stroke:"#7C7F88",strokeWidth:2,fill:"#FFFFFF",transform:"translate(14.500000, 7.000000) rotate(45.000000) translate(-14.500000, -7.000000) "}),r.createElement("path",{d:"M9.50091784,4.12670777 C11.0144671,5.21594388 12,6.99288017 12,9 C12,11.0071198 11.0144671,12.7840561 9.50091784,13.8732922 C7.9859706,12.7848452 7,11.0075655 7,9 C7,7.04189952 7.93798195,5.30287647 9.38913863,4.20773806 Z",id:"Combined-Shape",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",transform:"translate(9.500000, 9.000000) scale(-1, 1) rotate(45.000000) translate(-9.500000, -9.000000) "})),En=function(e){var t=e.svgRef,n=e.title,i=On(e,["svgRef","title"]);return r.createElement("svg",Cn({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Sn:n?r.createElement("title",null,n):null,zn)},Pn=r.forwardRef((function(e,t){return r.createElement(En,Cn({svgRef:t},e))}));function Dn(){return Dn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dn.apply(this,arguments)}function Fn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Ln=r.createElement("title",null,"Icon/Default_Currency/Inactive"),An=r.createElement("g",{id:"Icon/
1Default_Currency/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M3,12 C3,16.9672 7.0328,21 12,21 C16.9672,21 21,16.9672 21,12 C21,7.0328 16.9672,3 12,3 C7.0328,3 3,7.0328 3,12 Z",id:"Fill-1",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("g",{id:"Group",transform:"translate(9.000000, 6.000000)",stroke:"#7C7F88",strokeWidth:2},r.createElement("path",{d:"M2,6 C0.8962,6 0,5.1038 0,4 C0,2.8962 0.8962,2 2,2",id:"Stroke-3"}),r.createElement("path",{d:"M4,6 C5.1038,6 6,6.8962 6,8 C6,9.1038 5.1038,10 4,10",id:"Stroke-4"}),r.createElement("line",{x1:2,y1:2,x2:6,y2:2,id:"Stroke-5"}),r.createElement("line",{x1:3,y1:0,x2:3,y2:2,id:"Stroke-6"}),r.createElement("line",{x1:3,y1:10,x2:3,y2:12,id:"Stroke-7"}),r.createElement("line",{x1:2,y1:6,x2:4,y2:6,id:"Stroke-8"}),r.createElement("line",{x1:0,y1:10,x2:4,y2:10,id:"Stroke-9"}))),In=function(e){var t=e.svgRef,n=e.title,i=Fn(e,["svgRef","title"]);return r.createElement("svg",Dn({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Ln:n?r.createElement("title",null,n):null,An)},Mn=r.forwardRef((function(e,t){return r.createElement(In,Dn({svgRef:t},e))}));function Rn(){return Rn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rn.apply(this,arguments)}function Tn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var qn=r.createElement("title",null,"Icon/Options/Inactive"),Bn=r.createElement("g",{id:"Icon/Options/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M11,7 C11,7.552 11.448,8 12,8 C12.552,8 13,7.552 13,7 C13,6.448 12.552,6 12,6 C11.448,6 11,6.448 11,7",id:"Fill-3",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("path",{d:"M11,12 C11,12.552 11.448,13 12,13 C12.552,13 13,12.552 13,12 C13,11.448 12.552,11 12,11 C11.448,11 11,11.448 11,12",id:"Fill-7",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("path",{d:"M11,17 C11,17.552 11.448,18 12,18 C12.552,18 13,17.552 13,17 C13,16.448 12.552,16 12,16 C11.448,16 11,16.448 11,17",id:"Fill-11",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"})),Vn=function(e){var t=e.svgRef,n=e.title,i=Tn(e,["svgRef","title"]);return r.createElement("svg",Rn({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?qn:n?r.createElement("title",null,n):null,Bn)},Yn=r.forwardRef((function(e,t){return r.createElement(Vn,Rn({svgRef:t},e))}
1)),Hn=[{key:"teamRole",title:"Team Role",label:"Choose the role candidate has played in their past",icon:{component:qt.r,size:"24px"},hasNumber:!1},{key:"experience",title:"Experience in a",label:"Business (B2B) / Consumer (B2C) / Marketplace Platform",icon:{component:tn,size:"24px"},hasNumber:!1},{key:"education",title:"Educational Qualification",label:"Choose the highest education you require",icon:{component:on,size:"24px"},hasNumber:!1},{key:"language",title:"Languages Known",label:"Choose languages and set proficiencies",icon:{component:xn,size:"24px"},hasNumber:!1},{key:"pastIndustries",title:"Has worked in insutries such as",label:"Choose one or more industries",icon:{component:jn,size:"24px"},hasNumber:!1},{key:"pastCompanyType",title:"Types of past companies",label:"Product / Service",icon:{component:Zn,size:"24px"},hasNumber:!1},{key:"stagesOfPastCompanies",title:"Stages of past companies",label:"Early / Growth / Late / IPO / Fortune 1000",icon:{component:Pn,size:"24px"},hasNumber:!1},{key:"remuneration",title:"Remuneration",label:"Enter the remuneration range you have for this role",icon:{component:Mn,size:"24px"},hasNumber:!1},{key:"other",title:"Other",label:"Anything else not covered in the above fields",icon:{component:Yn,size:"24px"},hasNumber:!1}],Wn=[{title:"Delivery Owner"},{title:"People Manager"},{title:"Team Member"},{title:"Individual Contributor"}],Jn=[{title:"Marketplace Platform"},{title:"Consumer (B2C)"},{title:"Business (B2B)"}],Un=[{title:"Product"},{title:"Service"}],$n=[{title:"Early"},{title:"Growth"},{title:"Late"},{title:"IPO"},{title:"Fortune 1000"}],Gn=[{title:"High School Certificate/Diploma"},{title:"Associate's"},{title:"Bachelor's / Undergraduate"},{title:"Master's / Graduate"},{title:"PhD / Doctorate"}],Kn=n(87794),Qn=n.n(Kn),Xn=n(23279),er=n.n(Xn),tr=n(50029),nr=N.Z.Option,rr=function(e){var t=e.type,n=(0,r.useState)([]),i=n[0],a=n[1],s=function(){var e=(0,tr.Z)(Qn().mark((function e(n){var r;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={category:t,q:n},e.abrupt("return",fetch("".concat((0,V.dN)(),"/clustering/search/?").concat(at.stringify(r))).then((function(e){return e.json()})).then((function(e){var t,n,r;return r=null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((function(e){return{title:e.name,value:e.key}})),a(r),null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.map((function(e){return{title:e.name,value:e.key}}))})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,E.jsx)(N.Z,{options:i,onSearch:er()(s,300),placeholder:"Select Language",style:{width:"100%"},showSearch:!0,children:null===i||void 0===i?void 0:i.map((function(e){return(0,E.jsx)(nr,{children:e.title},e.value)}))})};var ir=n(77191),ar=function(e){(0,ir.Z)(e);var t=(0,r.useState)("");t[0],t[1];return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(rr,{type:"language"})})};function sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sr(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var or=function(e){var t=e.iconDetails,n=e.title,a=e.label,s=e.type,l=e.options,o=e.onChange,c=(0,i.I0)(),u=(0,r.useState)(!1),m=u[0],p=u[1],x=(0,i.v9)((function(e){return e.taxonomy.currencyList})),h=l.budgetDetails,f=l.teamrole,g=h.items&&h.items[0]||{},y=f.items&&f.items[0]||{};(0,r.useEffect)((function(){c((0,w.hLp)(null,{onSuccess:function(){},onFail:function(e){}}))}),[]);var v=function(){return{visible:h.visible,items:[lr({},g)]}},b=function(){return(0,E.jsxs)(N.Z,{className:"custom-select-video-type",placeholder:"Select Priority",optionFilterProp:"children",style:{width:"100%",height:"48px",backgroundColor:"#F4F7FB"},children:[(0,E.jsx)(Option,{value:"must-have",children:"Must Have"}),(0,E.jsx)(Option,{value:"nice-to-have",children:"Nice To Have"})]})};return(0,E.jsxs)("div",{className:"p-20 mb-8",style:{background:m?"white":"#E9EFF7",border:"1px solid #D5DAEC",borderRadius:"8px"},children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex ",children:[(0,E.jsx)(d.Z,{component:t.component,style:{fontSize:t.size}}),(0,E.jsxs)("div",{className:"ml-16",children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500 text-color-dark-grey-dark",children:n}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light mt-4",children:a})]})]}),!m&&(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{size:"large",className:"text-color-blue text-weight-500",onClick:function(){p(!0)},children:"Add"})}),m&&(0,E.jsx)(d.Z,{component:Ut,className:"text-size-24",onClick:function(){p(!1)}})]}),(0,E.jsx)("div",{className:"pl-40 pt-16",children:m&&function(){switch(s){case"teamRole":return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:14,children:[" ",(0,E.jsx)(N.Z,{className:"custom-select-video-type",placeholder:"Select team role",optionFilterProp:"children",style:{width:"100%",height:"48px",backgroundColor:"#F4F7FB"},onSelect:function(e){var t={visible:f.visible,items:[lr({},y)]};t.items[0].role=e,o("teamrole",t)},children:null===Wn||void 0===Wn?void 0:Wn.map((function(e){return(0,E.jsx)(Option,{value:e.title,children:e.title})}))})]}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(b,{})})]})});case"experience":return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:14,children:[" ",(0,E.jsx)(N.Z,{className:"custom-select-video-type",placeholder:"Select Experience",optionFilterProp:"children",style:{width:"100%",height:"48px",backgroundColor:"#F4F7FB"},children:null===Jn||void 0===Jn?void 0:Jn.map((function(e){return(0,E.jsx)(Option,{value:e.title,children:e.title})}))})]}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(b,{})})]})});case"pastCompanyType":return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:14,children:[" ",(0,E.jsx)(N.Z,{className:"custom-select-video-type",placeholder:"Select Past Company Type",optionFilterProp:"children",style:{width:"100%",height:"48px",backgroundColor:"#F4F7FB"},children:null===Un||void 0===Un?void 0:Un.map((function(e){return(0,E.jsx)(Option,{value:e.title,children:e.title})}))})]}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(b,{})})]})});case"stagesOfPastCompanies":return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:14,children:[" ",(0,E.jsx)(N.Z,{className:"custom-select-video-type",placeholder:"Select Past Company Type",optionFilterProp:"children",style:{width:"100%",height:"48px",backgroundColor:"#F4F7FB"},children:null===$n||void 0===$n?void 0:$n.map((function(e){return(0,E.jsx)(Option,{value:e.title,children:e.title})}))})]}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(b,{})})]})});case"remuneration":return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"mb-2 text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Currency *"}),(0,E.jsx)(N.Z,{size:"large",className:"w-100",placeholder:"Select a currency",showSearch:!0,onSelect:function(e){var t=v();t.items[0].currency=e,o("budgetDetails",t)},children:x.map((function(e){return(0,E.jsx)(N.Z.Option,{children:e[1]},e[0])}))})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"mb-2 text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Pay Frequency *"}),(0,E.jsxs)(N.Z,{size:"large",className:"w-100",placeholder:"Select pay frequency",onSelect:function(e){var t=v();t.items[0].pay_frequency=e,o("budgetDetails",t)},children:[(0,E.jsx)(N.Z.Option,{value:"yearly",children:"Yearly"}),(0,E.jsx)(N.Z.Option,{value:"hourly",children:"Hourly"}),(0,E.jsx)(N.Z.Option,{value:"fixed",children:"Fixed"})]})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"mb-2 text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Starting at *"}),(0,E.jsx)(z.Z,{size:"large",placeholder:"e.g. 100000",step:1,min:0,value:g.min_budget,formatter:cr,parser:dr,onChange:function(e){var t=v();t.items[0].min_budget=e,o("budgetDetails",t)}})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"mb-2 text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Upto (optional)"}
1),(0,E.jsx)(z.Z,{size:"large",placeholder:"e.g. 120000",step:1,min:0,value:g.max_same_as_min?g.min_budget:g.max_budget,formatter:cr,parser:dr,onChange:function(e){var t=v();t.items[0].max_budget=e,o("budgetDetails",t)}})]})]})});case"language":return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:14,children:(0,E.jsx)(ar,{type:"language"})}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(b,{})})]})});case"education":return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:14,children:(0,E.jsx)(N.Z,{className:"custom-select-video-type",placeholder:"Select Degree",optionFilterProp:"children",style:{width:"100%",height:"48px",backgroundColor:"#F4F7FB"},children:null===Gn||void 0===Gn?void 0:Gn.map((function(e){return(0,E.jsx)(Option,{value:e.title,children:e.title})}))})}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(b,{})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(rr,{type:"specialization",label:"Specialization (Optional)",placeholder:"Search Specialization"})})]})});default:return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:14}),(0,E.jsx)($t.default,{style:{backgroundColor:"#F4F7FB"},rows:4})]})})}}()})]})},cr=function(e){return e?"".concat(e).replace(/\B(?=(\d{3})+(?!\d))/g,","):""},dr=function(e){return e.replace(/\$\s?|(,*)/g,"")};function ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ur(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pr=function(e){var t=e.advanceOptions,n=e.setOptions,r=function(e,r){n(mr(mr({},t),{},(0,h.Z)({},e,r)))};return(0,E.jsx)("div",{children:null===Hn||void 0===Hn?void 0:Hn.map((function(e){return(0,E.jsx)(or,{iconDetails:null===e||void 0===e?void 0:e.icon,title:null===e||void 0===e?void 0:e.title,label:null===e||void 0===e?void 0:e.label,type:null===e||void 0===e?void 0:e.key,options:t,onChange:r},null===e||void 0===e?void 0:e.key)}))})};function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fr={fontSize:"18px",color:"#7C7F88",width:"24px",height:"24px",paddingTop:"3px"},gr={backgroundColor:"#F0F3FE",borderRadius:"4px",color:"#2A4CD5"},yr={state:"draft",original_url:null,duration:null,time_to_hire:"Immediate",expected_hire_count:null,ranking:0,featured:!1,tags:[],indexed:!1},vr={apply_method:"platform",apply_url:null,apply_email:null,apply_instruction:null,email_subject:null,application_filename:null,text_pitch_required:!0,video_pitch_required:!1},jr={currency:null,pay_frequency:null,min_budget:null,max_budget:null,max_same_as_min:!1,budget_visibility:"private"},br=function(e){return"both"!==e.type&&"physical"!==e.type||!!e.physical.length},wr=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0;t<e.length;t+=1)if(e[t].operands.length>1)return!0;return!1},kr=[{title:"Pre-screening questions",prop:"screening"},{title:"Pitch Note/Video",prop:"applyDetails"},{title:"Team Role",prop:"teamrole"},{title:"B2B/B2C",prop:"stakeholder"},{title:"Education",prop:"education"},{title:"Language",prop:"language"},{title:"Industry",prop:"industry"},{title:"Company Type",prop:"companyType"},{title:"Company Stage",prop:"companyStage"},{title:"Budget",prop:"budgetDetails"},{title:"Other",prop:"descriptive"}],Nr=function(e){var t=e.mode,n=e.editJob,i=e.updateEditJob,a=e.newJob,s=e.updateNewJob,l=e.setNewJob,o=e.setEditJob,c=e.postJobForceRender,u=e.company,m=e.changeViewToAlljobs,p=e.saveJob,x=e.timezoneList,h=e.timezoneListFetched,w=e.fetchTimezoneList,k=e.setCompanyJobFilterType,N=e.companyJobEdit,_=e.setJobShareUrl,Z=e.jobSaving,C=(0,r.useState)(!1),O
1=C[0],S=C[1],z=(0,r.useState)(null),P=z[0],D=z[1];(0,r.useEffect)((function(){Z||D(null)}),[Z]),(0,r.useEffect)((function(){h||w()}),[x,w,h]);var F="new"===t?a:n,L=F.jobBasics,A=F.locationPreference,I=F.skillInfo,M=F.textDescription,R=F.videoDescription,q=F.advanceOptions,B=F.extraProps,V=function(e,n){"new"===t?s({propName:e,payload:n}):i({propName:e,payload:n})},H=(0,r.useState)({basics:!!(L.title&&L.positionType&&Object.keys(L.role).length),location:br(A),skills:!!I.length,about:!(!M&&!R.video_tag)}),W=H[0],J=H[1];(0,r.useEffect)((function(){S(!O),J({basics:!!(L.title&&L.positionType&&Object.keys(L.role).length),location:br(A),skills:wr(I),about:!(!M&&!R.video_tag)})}),[c]);var U=function(){var e=Ze._.skills.prepare(I),t=Ze._.textAbout.prepare(M),n=Ze._.videoAbout.prepare(R),r=Ze._.basics.prepare(L),i=Ze._.location.prepare(A),a=Ze._.advanceOptions.prepare(q),s={uuid:(0,Y.k$)(),operator:"AND",operands:[].concat((0,f.Z)(e.mustHave),(0,f.Z)(t.mustHave),(0,f.Z)(n.mustHave),(0,f.Z)(r.mustHave),(0,f.Z)(i.mustHave),(0,f.Z)(a.mustHave))},l={uuid:(0,Y.k$)(),operator:"AND",operands:[].concat((0,f.Z)(e.niceToHave),(0,f.Z)(t.niceToHave),(0,f.Z)(n.niceToHave),(0,f.Z)(r.niceToHave),(0,f.Z)(i.niceToHave),(0,f.Z)(a.niceToHave))},o=hr(hr(hr(hr(hr(hr(hr(hr({},yr),{},{company:hr({},u),apply_detail:hr(hr({},vr),a.applyDetails),budget_detail:jr,tags:(0,f.Z)(r.tags)},e.props),t.props),n.props),r.props),i.props),a.props),{},{must_have:s,nice_to_have:l,posted_at:(new Date).toISOString()});return a.budgetDetails&&(o.budget_detail=hr(hr({},jr),a.budgetDetails)),o},$=function(e){var t=Bt[e].icon;return(0,E.jsx)("div",{className:"border-radius-50 d-flex justify-content-center align-items-center",style:{height:"48px",width:"48px",backgroundColor:t.backgroundColor,border:t.border},children:(0,E.jsx)(d.Z,{component:t.component,style:{fontSize:t.size}})})},G=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.optional,i=t.complete,a=t.step,s="(OPTIONAL)";if(n){var l=[];kr.forEach((function(e){q[e.prop].visible&&l.push(e.title)})),l.length&&(s=(0,E.jsx)("div",{children:l.map((function(e,t){return t?(0,E.jsxs)(r.Fragment,{children:[(0,E.jsx)("span",{className:"ml-4 mr-4",children:"\u2022"}),(0,E.jsx)("span",{children:e})]},e):(0,E.jsx)("span",{children:e},e)}))}))}return(0,E.jsxs)("div",{className:"text-weight-500 text-size-18 d-flex align-items-center justify-content-between",children:[(0,E.jsxs)("div",{children:[e,n?(0,E.jsx)("span",{className:"ml-8 text-color-dark-grey-lighter text-size-14",children:s}):null]}),n?null:(0,E.jsxs)("div",{className:"mr-12",children:[i?(0,E.jsx)(d.Z,{component:Mt.r,style:{marginRight:"7px",backgroundColor:"#1DAC59",color:"white",width:"24px",height:"24px",paddingTop:"4px",borderRadius:"50%",fontSize:"16px"}}):null,(0,E.jsxs)("span",{className:"text-weight-400",style:{color:i?"#1DAC59":"#7c7f88"},children:["Step ",a," of ",4]})]})]})},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"draft";D(e);var n=U(),r="draft"===B.jobState;n.state=e,p({url:"job",oldValues:{uuid:B.uuid},newValues:n},{type:e,onCompletion:function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"fail"!==n?("draft"===e?k({companyJobFilterType:"draft"}):"active"===e&&(r&&_((0,Y.W$)(i.public_id)),k({companyJobFilterType:"active"})),"new"===t?l((0,Ze.e)({})):o((0,Ze.e)({})),m("all-jobs")):g.Z.error("Some error occurred while submitting job")}})},X=[{panelHeader:"Basic Details",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:$("basicDetails"),component:(0,E.jsx)(T,{jobBasics:L,setJobBasics:function(e){V("jobBasics",e)},status:W,setStatus:J})},{panelHeader:"Skills Required",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:$("skillsRequired"),component:(0,E.jsx)(ye,{skills:I,setSkills:function(e){V("skillInfo",e)},status:W,setStatus:J,jobRole:L.role,mode:t})},{panelHeader:"About Work & Location",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:$("workAndLocation"),component:(0,E.jsx)(_e,{description:M,setDescription:function(e){V("textDescription",e)},video:R,setVideo:function(e){V("videoDescription",e)},status:W,setStatus:J})}],ee=function(){return(0,E.jsx)("div",{className:"w-100",children:(0,E.jsxs)("div",{className:"".concat(N?"w-100":""),style:{maxWidth:"45rem"},children:[N?null:(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-20",children:"Post a job"}),(0,E.jsx)(b.Z,{heading:"Company Related",components:X}),(0,E.jsx)(pr,{advanceOptions:q,setOptions:function(e){V("advanceOptions",e)}}),(0,E.jsxs)("div",{className:"post-job-collapse-container",children:[(0,E.jsxs)(v.Z,{defaultActiveKey:["0"],expandIcon:function(e){var t=e.isActive,n=t?hr(hr({},fr),gr):fr;return(0,E.jsx)(d.Z,{component:It.r,rotate:t?90:0,style:n})},expandIconPosition:"right",children:[(0,E.jsx)(v.Z.Panel,{header:G("Remote/Location",{complete:W.location,step:2}),children:(0,E.jsx)(K,{timezoneList:x,locationPreference:A,setLocationPreference:function(e){V("locationPreference",e)},status:W,setStatus:J})}),(0,E.jsx)(v.Z.Panel,{header:G("Skills",{complete:W.skills,step:3}),className:"post-job-skills-container",children:(0,E.jsx)(ye,{skills:I,setSkills:function(e){V("skillInfo",e)},status:W,setStatus:J,jobRole:L.role,mode:t})}
1),(0,E.jsx)(v.Z.Panel,{header:G("About the Work/Team",{complete:W.about,step:4}),children:(0,E.jsx)(_e,{description:M,setDescription:function(e){V("textDescription",e)},video:R,setVideo:function(e){V("videoDescription",e)},status:W,setStatus:J})}),(0,E.jsx)(v.Z.Panel,{header:G("More requirements",{optional:!0}),children:(0,E.jsx)(Ft,{options:q,setOptions:function(e){V("advanceOptions",e)}})})]}),(0,E.jsx)("div",{className:"mt-12 text-size-14 text-color-dark-grey-light",children:"draft"===B.jobState?(0,E.jsxs)(E.Fragment,{children:["To save a job as draft, you need a ",(0,E.jsx)("b",{children:"green tick"})," in 'Job Basics' Section. To publish a job, you need a ",(0,E.jsx)("b",{children:"green tick"})," in all sections(except 'More requirements' section)."]}):(0,E.jsxs)(E.Fragment,{children:["To publish a job, you need a ",(0,E.jsx)("b",{children:"green tick"})," in all sections(except 'More requirements' section)."]})}),(0,E.jsx)("div",{className:"mt-12 mb-20",children:(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between flex-wrap",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center flex-wrap",children:[(0,E.jsxs)(j.Z,{type:"primary",size:"large",className:"mr-12 text-weight-500 btn-size-xl",style:{minWidth:"180px",fontSize:"16px",border:"1px solid"},onClick:function(){Q("active")},children:[Z&&"active"===P?(0,E.jsx)(d.Z,{type:"loading"}):null," ","draft"===B.jobState?"Publish Job":"Save & Publish Job"]}),"draft"===B.jobState?(0,E.jsxs)(j.Z,{type:"link",disabled:!W.basics||Z,style:{fontSize:"16px",padding:"0 1.5rem",border:"1px solid"},size:"large",className:"text-weight-500 btn-size-xl",onClick:function(){Q("draft")},children:[Z&&"draft"===P?(0,E.jsx)(d.Z,{type:"loading"}):null," Save as Draft"]}):null]}),(0,E.jsx)(j.Z,{type:"link",size:"large",className:"text-color-dark-grey-light text-weight-500",disabled:Z,onClick:function(){y.Z.confirm({className:"post-job-clear-modal",centered:!0,width:"500px",content:(0,E.jsx)("span",{className:"text-size-18",children:"Are you sure you want to clear all information?"}),onOk:function(){"new"===t?l((0,Ze.e)({})):o((0,Ze.e)({}))},onCancel:function(){}})},children:"Delete"})]})})]}),(0,E.jsx)(At,{})]})})};return(0,E.jsx)(E.Fragment,{children:O?(0,E.jsx)("div",{children:ee()}):ee()})};Nr.defaultProps={mode:"new",changeViewToAlljobs:function(){},changeViewToATS:function(){},companyJobEdit:!1};(0,i.$j)((function(e){return{timezoneList:e.taxonomy.timezoneList,timezoneListFetched:e.taxonomy.timezoneListFetched,company:e.company.companyDetails,newJob:e.company.newJob,editJob:e.company.editJob,postJobForceRender:e.company.postJobForceRender,jobSaving:e.job.loading}}),(function(e){return{saveJob:function(t,n){return e(w.PU9(t,n))},updateNewJob:function(t){return e(w.VBe(t))},updateEditJob:function(t){return e(w.RLB(t))},setNewJob:function(t){return e(w.ATW(t))},setEditJob:function(t){return e(w.u2s(t))},fetchTimezoneList:function(){return e(w.UMB())},setCompanyJobFilterType:function(t){return e(w.oN6(t))},setJobShareUrl:function(t){return e(w.Nut(t))}}}))(Nr),n(47539);var _r=n(94503),Zr=n(51225),Cr=n(92187),Or=n(50876),Sr={basicDetails:{key:"basicDetails",title:"Basic Details",label:"Basic Details",icon:{component:Rt.r,size:"24px",backgroundColor:"#FFDDA2",border:"none"},hasNumber:!0},skillsRequired:{key:"skillsRequired",title:"Skills Required",label:"Skills Required",icon:{component:Tt.r,size:"24px",backgroundColor:"#FFDDD3",border:"none"},hasNumber:!0},workAndLocation:{key:"workAndLocation",title:"About Work",label:"About Work",icon:{component:Rt.r,size:"24px",backgroundColor:"#B5E4C9",border:"none"},hasNumber:!0},remotePreference:{key:"remotePreference",title:"remotePreference",label:"remotePreference",icon:{component:_r.r,size:"24px",backgroundColor:"#E0D1FA",border:"none"},hasNumber:!0}},zr=[{type:"remote",icon:_r.r,title:"100% Remote",label:"No restriction on location or timezone of the candidate",displayLabel:function(){return"No restriction on location or timezone of the candidate"}},{type:"physical_location",icon:Zr.r,title:"Location Specific",label:"Candidate has to be from a specific location",displayLabel:function(e){return"Candidate has to be from ".concat(e)}},{type:"remote_timezone",icon:Cr.r,title:"Timezone Specific",label:"Fully remote but within a specific timezone",displayLabel:function(e){return"Fully remote but within ".concat(e," timezone")}},{type:"remote_location",icon:Or.r,title:"Hybrid Remote",label:"Candidate is required to come to office partially",displayLabel:function(e){return"Candidate is required to come to office partially in ".concat(e)}}],Er=N.Z.Option,Pr=function(e){var t=e.handleLocationChange,n=e.displayValue,i=e.resetLocation,a=e.placeholder,s=(0,r.useState)([]),l=s[0],o=s[1],c=(0,r.useState)([]),d=(c[0],c[1],(0,r.useState)(!1)),u=d[0],m=d[1];var p=function(){var e=(0,tr.Z)(Qn().mark((function e(t){var n;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&!((null===t||void 0===t?void 0:t.length)<2)){e.next=2;break}return e.abrupt("return");case 2:return n={q:t},m(!0),e.abrupt("return",fetch("".concat((0,V.dN)(),"/location/search/?").concat(at.stringify(n))).then((function(e){return e.json()})).then((function(e){var t,n;n=null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((function(e){return{title:e.location,value:JSON.stringify(e)}})),o(n),m(!1)})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,r.useEffect)((function(){return function(){i()}}),[]),(0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500",onSearch:er()(p,300),placeholder:a||"Search Location",showSearch:!0,style:{width:"100%",height:"48px",color:"#7C7F88"},onSelect:function(e){t(JSON.parse(e))},loading:u,notFoundContent:null,value:n,showArrow:!1,children:null===l||void 0===l?void 0:l.map((function(e,t){return(0,E.jsx)(Er,{value:e.value,children:e.title},t)}))})};function Dr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Dr(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lr=N.Z.Option,Ar=function(e){var t=e.updateLocationAndTimeZone,n=e.displayValue,a=e.resetLocation,s=(0,i.I0)(),l=(0,i.v9)((function(e){var t;return(null===e||void 0===e||null===(t=e.taxonomy)||void 0===t?void 0:t.timezoneList)||[]})),o=(0,i.v9)((function(e){var t;return null===e||void 0===e||null===(t=e.taxonomy)||void 0===t?void 0:t.timezoneListFetched})),c=((0,i.v9)((function(e){var t;return(null===e||void 0===e||null===(t=e.jobPost)||void 0===t?void 0:t.remotePreference)||{}})),(0,r.useState)([])),d=c[0],u=c[1];return(0,r.useEffect)((function(){o||s(w.UMB())}),[o]),(0,r.useEffect)((function(){var e=l.map((function(e){return Fr(Fr({},e),{},{value:e.display_name,label:e.display_name})}));u(e)}),[l]),(0,r.useEffect)((function(){return function(){a()}}),[]),(0,E.jsx)(N.Z,{showSearch:!0,placeholder:"Select Timezone",onChange:function(e,n){var r=l.filter((function(t){return t.display_name===e}))[0];r.max_timezone_id=r.uuid,r.min_timezone_id=r.uuid,t(r)},onSearch:function(e){l.filter((function(t){return t.display_name.toLowerCase().includes(e.toLowerCase())}))},className:"w-100 select-size-48 select-timezone custom-select-video-type",size:"large",showArrow:!1,style:{width:"100%",border:"1px solid #D5DAEC",boxShadow:"0 1px 2px 0 #D5DAEC"},defaultValue:n||"Select Timezone",children:d.map((function(e,t){return(0,E.jsx)(Lr,{value:e.value,children:e.label},e.name)}))})};function Ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ir(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ir(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}N.Z.Option;var Rr=function(){var e=(0,i.I0)(),t=(0,i.v9)((function(e){var t;return(null===e||void 0===e||null===(t=e.jobPost)||void 0===t?void 0:t.remotePreference)||{}})),n=(0,r.useState)((null===t||void 0===t?void 0:t.type)||"remote"),a=n[0],s=n[1];(0,r.useEffect)((function(){t.type&&e(w.DdE(t))}),[]),(0,r.useEffect)((function(){"remote"===a&&l()}),[a]);var l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Mr({type:a,req_category:a,req_type:"must_have"},t);console.log("updateLocation",n),e(w.DdE(n))};return(0,E.jsx)("div",{className:"post-job__remote-preference",children:zr.map((function(e,n){return(0,E.jsx)(Tr,Mr(Mr({},e),{},{setSelectedRemotePreference:s,selectedRemotePreference:a,updateLocationAndTimeZone:l,remotePreference:t}),e.type)}))})},Tr=function(e){var t=e.type,n=e.icon,i=e.title,a=e.label,s=e.setSelectedRemotePreference,l=e.selectedRemotePreference,o=e.updateLocationAndTimeZone,c=e.remotePreference,u=(0,r.useState)(l===t),m=u[0],p=u[1];(0,r.useEffect)((function(){p(l===t)}),[t,l]);var x=function(e){e&&(e={location:Mr({},e)}),o(e)},h=function(){};return(0,E.jsxs)("div",{className:"d-flex p-16 mt-8 list-item ".concat(m?"selected":""),style:{borderRadius:"6px",position:"relative"},onClick:function(){s(t)},children:[(0,E.jsx)("div",{children:(0,E.jsx)(d.Z,{component:n,className:"text-size-24"})}),(0,E.jsxs)("div",{className:"ml-20 ",style:{width:"85%"},children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:i}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light",children:a})]}),m&&function(){var e;switch(t){case"remote":return null;case"remote_timezone":return(0,E.jsx)(Ar,{updateLocationAndTimeZone:o,displayValue:null===c||void 0===c?void 0:c.display_name,resetLocation:h});default:return(0,E.jsx)(Pr,{handleLocationChange:x,displayValue:null===c||void 0===c||null===(e=c.location)||void 0===e?void 0:e.location,resetLocation:h,placeholder:"enter location"})}}()]}),(0,E.jsx)("div",{className:"radio"})]})};function qr(){return qr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qr.apply(this,arguments)}function Br(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Vr=r.createElement("title",null,"Icon/Lens/Inactive"),Yr=r.createElement("g",{id:"Icon/Lens/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:15,y1:16,x2:19,y2:20,id:"Stroke-4",stroke:"#7C7F88",strokeWidth:2}),r.createElement("path",{d:"M5,11 C5,14.3114 7.6884,17 11,17 C14.3114,17 17,14.3114 17,11 C17,7.6884 14.3114,5 11,5 C7.6884,5 5,7.6884 5,11 Z",id:"Stroke-4",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"})),Hr=function(e){var t=e.svgRef,n=e.title,i=Br(e,["svgRef","title"]);return r.createElement("svg",qr({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Vr:n?r.createElement("title",null,n):null,Yr)},Wr=r.forwardRef((function(e,t){return r.createElement(Hr,qr({svgRef:t},e))})),Jr={width:"75px"},Ur=function(e){var t=e.minExperience,n=e.idealExperience,i=e.onSave,a=e.setFreshersCanApply,s=e.freshersCanApply,l=e.setMinExperience,o=e.setIdealExperience,c=(0,r.useState)(!1),m=c[0],p=c[1],x=(0,r.useState)(!1),h=x[0],f=x[1];(0,r.useEffect)((function(){isNaN(parseInt(t,10))||isNaN(parseInt(n,10))||s?f(!1):t>n?f(!0):t<=n&&f(!1)}),[t,n,s]);var g=(0,r.createRef)(),y=(0,r.useCallback)((function(e){g&&!g.current.contains(e.target)&&p(!1)}),[g]),v=(0,r.useCallback)((function(e){if(e.stopPropagation(),"Enter"===e.key){if(h)return;m&&(i({min:t,ideal:n}),p(!1))}else"Escape"===e.key&&m&&p(!1)}),[m,t,n,h]);return(0,r.useLayoutEffect)((function(){return window.addEventListener("click",y),document.addEventListener("keydown",v),function(){window.removeEventListener("click",y),document.removeEventListener("keydown",v)}}),[y]),(0,E.jsxs)("div",{className:"w-100 position-relative post-job-experience-select",ref:g,children:[(0,E.jsxs)("div",{className:" text-color-dark-grey-dark",children:[(0,E.jsxs)("span",{className:"text-size-16 text-color-dark-grey-light",children:["At least: ",(0,E.jsxs)("span",{className:"text-color-dark-grey-dark text-weight-500",children:[t," years"]})]}),(0,E.jsxs)("span",{className:"ml-32 text-size-16 text-color-dark-grey-light",children:["Ideal: ",(0,E.jsxs)("span",{className:"text-color-dark-grey-dark text-weight-500",children:[n," years"]})]})]}),(0,E.jsx)(O.Z,{className:"mb-4",range:!0,defaultValue:[t,n],value:[t,n],disabled:s,min:0,max:10,onChange:function(e){l(e[0]),o(e[1])},tooltipPlacement:"bottom",trackStyle:{width:"20px"}}),(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsx)("span",{children:"0"}),(0,E.jsx)("span",{children:"10+"})]}),(0,E.jsx)("div",{className:"mt-16",children:(0,E.jsx)(S.Z,{checked:s,defaultChecked:s,onChange:function(e){a(e.target.checked)},children:(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark line-height-16",style:{marginTop:"-2px"},children:"Looking for fresher"})})}),m?(0,E.jsxs)("div",{className:"post-job-experience-select-dropdown",children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark mb-8",children:"Specify experience (in years)"}),(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-8",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{className:"mr-4",children:"Minimum"}),(0,E.jsx)(u.Z,{title:"Candidates below this threshold will not be able to apply",children:(0,E.jsx)(d.Z,{type:"question-circle",className:"cursor-pointer"})})]}),(0,E.jsx)("div",{children:(0,E.jsx)(z.Z,{autoFocus:!0,min:0,value:s?0:t,disabled:s,placeholder:"eg. 1",style:Jr,onCh
1ange:function(e){return l(""===e?null:e)}})})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-12",children:[(0,E.jsxs)("div",{children:["Ideal ",(0,E.jsx)("span",{className:"text-color-dark-grey-light text-italic",children:"(optional)"})]}),(0,E.jsx)("div",{children:(0,E.jsx)(z.Z,{min:0,value:n,placeholder:"eg. 3",style:Jr,onChange:function(e){return o(""===e?null:e)}})})]}),(0,E.jsx)("div",{className:"mb-12",children:(0,E.jsx)(S.Z,{checked:s,defaultChecked:s,onChange:function(e){a(e.target.checked)},children:"Freshers Can Apply"})}),(0,E.jsxs)("div",{className:"d-flex flex-row-reverse",children:[(0,E.jsx)(j.Z,{type:"primary",className:"text-size-14 text-weight-500",disabled:h,onClick:function(){i({min:s?0:t,ideal:n}),p(!1)},children:"Save"}),(0,E.jsx)(j.Z,{type:"link",className:"text-size-14 text-weight-500 text-color-dark-grey",onClick:function(){return p(!1)},children:"Cancel"})]}),h?(0,E.jsx)("div",{style:{color:"#f44232"},className:"d-flex flex-row-reverse text-size-12",children:"Minimum should be less than Ideal"}):null]}):null]})};Ur.defaultProps={min:null,ideal:null,onSave:function(){}};var $r=Ur;function Gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gr(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qr=[{title:"Full-time"},{title:"Part-time"},{title:"Self-employed"},{title:"Freelance"},{title:"Contract"},{title:"Internship"},{title:"Apprenticeship"},{title:"Co-op"}],Xr=function(e){var t,n=(0,i.I0)(),a=(0,i.v9)((function(e){var t,n;return(null===e||void 0===e||null===(t=e.clustering)||void 0===t||null===(n=t.dropdownList)||void 0===n?void 0:n.role)||[]})),s=(0,i.v9)((function(e){var t;return(null===e||void 0===e||null===(t=e.jobPost)||void 0===t?void 0:t.basicDetails)||{}})),l=(0,i.v9)((function(e){var t,n;return null===(t=e.jobPost)||void 0===t||null===(n=t.errorLocations)||void 0===n?void 0:n.basicDetails})),o=(s.title,s.position_type,s.freshers_can_apply,s.min_experience,s.ideal_experience,(0,r.useState)((null===s||void 0===s?void 0:s.title)||"")),c=o[0],u=o[1],m=(0,r.useState)([]),x=m[0],h=m[1],f=(0,r.useState)((null===s||void 0===s||null===(t=s.role)||void 0===t?void 0:t.key)||null),g=f[0],y=f[1],v=(0,r.useState)((null===s||void 0===s?void 0:s.role)||{}),j=v[0],b=v[1],O=(0,r.useState)((null===s||void 0===s?void 0:s.position_type)||null),S=O[0],z=O[1],P=(0,r.useState)((null===s||void 0===s?void 0:s.min_experience)||0),D=P[0],F=P[1],L=(0,r.useState)((null===s||void 0===s?void 0:s.ideal_experience)||2),A=L[0],I=L[1],M=(0,r.useState)((null===s||void 0===s?void 0:s.freshers_can_apply)||!1),R=M[0],T=M[1],q=(0,r.useState)(!1),B=q[0];q[1];(0,r.useEffect)((function(){var e={title:c,position_type:S,role:j,freshers_can_apply:R};R||(e.min_experience=D,e.ideal_experience=A),n(w.TKE(e))}),[c,g,j,S,D,A,R]),(0,r.useEffect)((function(){var e=[];a.forEach((function(t){e.push(t),t.children.length&&t.children.forEach((function(t){e.push(t)}))})),h(e)}),[a]),(0,r.useEffect)((function(){a.length||n((0,w.QFx)({category:"role"}))}),[]);var V=function(e){y(e)},Y=function(e){z(e)};return(0,E.jsxs)("div",{className:"post-job-basics ".concat(B?"border corder-color-red":""),children:[(0,E.jsx)(_.Z,{children:(0,E.jsx)(Z.Z,{children:(0,E.jsxs)("div",{className:"mb-12",children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Job Title"}),(0,E.jsx)(C.Z,{onChange:function(e){u(e.target.value)},value:c,style:{height:"48px",border:"1px solid #D5DAEC",backgroundColor:"#F4F7FB"},className:"border-radius-6 inner-shadow input-bg-grey ".concat(null!==l&&void 0!==l&&l.includes("title")&&!c?"border-width-1 border-color-red radius-6":"")}
1)]})})}),(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:12,children:function(){var e={className:"ant-select w-100 post-job-role-select ".concat(null!==l&&void 0!==l&&l.includes("role")&&!s.role.name?"border-width-1 border-color-red border-radius-6":""),size:"large",backfill:!0,onSelect:V,dropdownClassName:"post-job-role-select-dropdown ant-dropdown-menu",optionLabelProp:"label",getPopupContainer:function(e){return e.parentNode},defaultActiveFirstOption:!1,filterOption:!0,notFoundContent:null,style:{border:"0 !important"}};return s.role&&s.role.key&&(e.defaultValue=s.role.name),(0,E.jsxs)("div",{className:"position-relative",children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Role"}),(0,E.jsx)(k.Z,Kr(Kr({},e),{},{children:x.map((function(e){return(0,E.jsx)(k.Z.Option,{className:"ant-dropdown-menu-item border-0",label:e.name,onClick:function(){b(e)},children:(0,E.jsx)("span",{children:e.name})},e.key)}))})),(0,E.jsx)(d.Z,{component:Wr,className:"post-job-role-select-icon text-size-24 position-absolute",style:{bottom:"12px",right:"12px"}})]})}()}),(0,E.jsx)(Z.Z,{xs:24,lg:12,children:function(){var e={className:"w-100 select-size-48 inner-shadow ".concat(null!==l&&void 0!==l&&l.includes("position_type")&&!S?"border-width-1 border-color-red border-radius-6":""),size:"large",getPopupContainer:function(e){return e.parentNode},suffixIcon:(0,E.jsx)(d.Z,{component:p.r,style:{fontSize:"24px"}}),onChange:Y,value:S,dropdownClassName:"custom-select"};return s.positionType&&(e.defaultValue=s.positionType),(0,E.jsxs)("div",{className:"position-relative",children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Position Type"}),(0,E.jsx)(N.Z,Kr(Kr({},e),{},{children:Qr.map((function(e){return(0,E.jsx)(N.Z.Option,{className:"custom-select-item",children:e.title},e.title)}))}))]})}()}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{children:(0,E.jsx)($r,{minExperience:D,idealExperience:A,setFreshersCanApply:function(e){e&&(F(0),I(0)),T(e)},freshersCanApply:R,setMinExperience:F,setIdealExperience:I,onSave:function(e){}})})})]}),(0,E.jsx)("div",{})]})},ei=n(46029),ti=(C.Z.TextArea,N.Z.Option,function(e){var t,n,a=(0,i.I0)(),s=(0,i.v9)((function(e){var t;return(null===e||void 0===e||null===(t=e.jobPost)||void 0===t?void 0:t.work)||""})),l=(0,r.useState)(s||""),o=l[0],c=l[1];(0,r.useEffect)((function(){a(w.PUS(o))}),[o]);null!==o&&void 0!==o&&o.includes('{"blocks":[{"key"')&&(null===(t=JSON.parse(o))||void 0===t||null===(n=t.blocks[0])||void 0===n||n.text);return(0,E.jsxs)("div",{className:"post-job-role-details",children:[(0,E.jsx)("div",{className:"d-flex justify-content-between",children:(0,E.jsx)("div",{className:"text-weight-500 text-size-16 text-color-dark-grey-dark",children:"About Work"})}),(0,E.jsxs)("div",{className:"post-job-role-details-editor",children:[(0,E.jsx)(ei.Z,{editorValue:o,setEditorValue:function(e){c(e)},className:"entry-field"}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light mt-6 line-height-16",children:"Use this space to specify 2 things candidates really care about:"}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light line-height-16",children:"1. About the Work - Scale and relevance of the product/project and"}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light line-height-16",children:"2. About the Team - structure and size, leader/manager name and background"})]})]})}
1),ni=[{key:"teamrole",title:"Team Role",label:"Choose the role candidate has played in their past",icon:{component:qt.r,size:"24px"},hasNumber:!1},{key:"experience",title:"Experience in a",label:"Business (B2B) / Consumer (B2C) / Marketplace Platform",icon:{component:tn,size:"24px"},hasNumber:!1},{key:"education",title:"Educational Qualification",label:"Choose the highest education you require",icon:{component:on,size:"24px"},hasNumber:!1},{key:"language",title:"Languages Known",label:"Choose languages and set proficiencies",icon:{component:xn,size:"24px"},hasNumber:!1},{key:"pastIndustries",title:"Has worked in insutries such as",label:"Choose one or more industries",icon:{component:jn,size:"24px"},hasNumber:!1},{key:"company_type",title:"Types of past companies",label:"Product / Service",icon:{component:Zn,size:"24px"},hasNumber:!1},{key:"company_stage",title:"Stages of past companies",label:"Early / Growth / Late / IPO / Fortune 1000",icon:{component:Pn,size:"24px"},hasNumber:!1},{key:"remuneration",title:"Remuneration",label:"Enter the remuneration range you have for this role",icon:{component:Mn,size:"24px"},hasNumber:!1},{key:"other",title:"Other",label:"Anything else not covered in the above fields",icon:{component:Yn,size:"24px"},hasNumber:!1}],ri=[{title:"Delivery Owner"},{title:"People Manager"},{title:"Team Member"},{title:"Individual Contributor"}],ii=[{title:"Marketplace Platform"},{title:"Consumer (B2C)"},{title:"Business (B2B)"}],ai=[{title:"Product Companies"},{title:"Service Companies"}],si=[{title:"Early"},{title:"Growth"},{title:"Late"},{title:"IPO"},{title:"Fortune 1000"}],li=[{title:"High School Certificate/Diploma"},{title:"Associate's"},{title:"Bachelor's / Undergraduate"},{title:"Master's / Graduate"},{title:"PhD / Doctorate"}];function oi(){return oi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oi.apply(this,arguments)}function ci(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var di=r.createElement("title",null,"Icon/Customize/Inactive"),ui=r.createElement("g",{id:"Icon/Customize/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:21,y1:6,x2:3,y2:6,id:"Stroke-9",stroke:"#7C7F88",strokeWidth:2}),r.createElement("line",{x1:21,y1:12,x2:3,y2:12,id:"Stroke-9",stroke:"#7C7F88",strokeWidth:2}),r.createElement("line",{x1:21,y1:18,x2:3,y2:18,id:"Stroke-9",stroke:"#7C7F88",strokeWidth:2}),r.createElement("circle",{id:"Oval",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",cx:7,cy:6,r:2}),r.createElement("circle",{id:"Oval",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",cx:17,cy:12,r:2}),r.createElement("circle",{id:"Oval",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",cx:11,cy:18,r:2})),mi=function(e){var t=e.svgRef,n=e.title,i=ci(e,["svgRef","title"]);return r.createElement("svg",oi({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?di:n?r.createElement("title",null,n):null,ui)},pi=r.forwardRef((function(e,t){return r.createElement(mi,oi({svgRef:t},e))})),xi=N.Z.Option,hi=[{label:"Elementary",value:"Elementary"},{label:"Limited Working",value:"Limited Working"},{label:"Professional Working",value:"Professional Working"},{label:"Full Professional",value:"Full Professional"},{label:"Native or Bilingual",value:"Native or Bilingual"}],fi=function(e){e.type;var t=e.label,n=e.handleProficiencyChange,r=(e.uuid,e.selectedProficiency);return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 mt-24 text-color-dark-grey-dark",children:t}),(0,E.jsx)(N.Z,{className:"custom-select-video-type",showSearch:!0,placeholder:"Select a proficiency",optionFilterProp:"children",defaultValue:hi[0].value,onSelect:function(e){n(e)},style:{height:"48px",width:"100%"},dropdownClassName:"custom-select",value:r||void 0,suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24",style:{height:"24px",marginTop:"-5px"}}),children:null===hi||void 0===hi?void 0:hi.map((function(e){return(0,E.jsx)(xi,{value:e.value,className:"custom-select-item",children:e.label},e.value)}))})]})},gi=function(e){var t=e.type,n=e.label,i=e.placeholder,a=e.onSelect,s=e.handleProficiencyChange,l=e.value,o=e.uuid,c=e.selectedLanguage,m=e.showArrow,x=e.isModalVisible,h=e.setIsModalVisible,f=(0,r.useState)([]),g=f[0],v=f[1],b=(0,r.useState)(!1),w=b[0],k=b[1],_=(0,r.useState)(!1),Z=_[0],C=_[1],O=(0,r.useState)(null===c||void 0===c?void 0:c.reading_proficiency),S=O[0],z=O[1],P=(0,r.useState)(null===c||void 0===c?void 0:c.writing_proficiency),D=P[0],F=P[1],L=(0,r.useState)(null===c||void 0===c?void 0:c.speaking_proficiency),A=L[0],I=L[1],M=function(){s(o,"reading_proficiency",S),s(o,"writing_proficiency",D),s(o,"speaking_proficiency",A),h(!1)},R=function(){h(!1),z(null===c||void 0===c?void 0:c.reading_proficiency),F(null===c||void 0===c?void 0:c.writing_proficiency),I(null===c||void 0===c?void 0:c.speaking_proficiency)},T=function(){var e=(0,tr.Z)(Qn().mark((function e(n){var r;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:return r={category:t,q:n},k(!0),e.abrupt("return",fetch("".concat((0,V.dN)(),"/clustering/search/?").concat(at.stringify(r))).then((function(e){return e.json()})).then((function(e){var t,n;n=null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((function(e){return{title:e.name,value:e}})),v(n),k(!1)})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,r.useEffect)((function(){"language"===t&&("Elementary"===S&&"Elementary"===D&&"Elementary"===A||C(!0))}),[c]),(0,E.jsxs)("div",{className:"",style:{position:"relative"},children:[n&&(0,E.jsx)("span",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark mb-4 d-block",children:n}),(0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500 entry_field",onSearch:er()(T,300),placeholder:i,showSearch:!0,style:{width:"100%",height:"48px"},onSelect:function(e){a(JSON.parse(e))},loading:w,notFoundContent:null,showArrow:!(!m||"language"!==t),value:l,dropdownClassName:(null===g||void 0===g?void 0:g.length)>0&&"custom-select",suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),children:null===g||void 0===g?void 0:g.map((function(e,t){return(0,E.jsx)(xi,{value:JSON.stringify(e.value),className:"custom-select-item",children:e.title},e.value.uuid)}))}),("language"===t||"industry"===t)&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{className:"",style:{position:"absolute",right:"12px",to
1p:"10px"},children:[w?(0,E.jsx)(d.Z,{type:w?"loading":"search",className:"text-color-dark-grey-dark mt-4 text-size-20 mb-2 "}):(0,E.jsx)(d.Z,{component:Wr,className:"text-color-dark-grey-dark mt-4 text-size-24 mb-2 "}),"language"===t&&(0,E.jsx)(u.Z,{placement:"top",title:"Set Proficiency",children:(0,E.jsx)(d.Z,{component:pi,className:"text-color-blue-dark mt-4 set-proficiency-icon text-size-24 ml-8 ".concat(Z?"dot dot-red dot-right":""),onClick:function(){h(!0)}})})]}),(0,E.jsxs)(y.Z,{visible:x,onOk:M,onCancel:R,width:350,className:"modal-footer-border-none ",footer:[(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16 border-color-grey text-color-blue",type:"default",onClick:R,children:"Cancel"},"back"),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16",type:"primary",onClick:M,children:"Confirm"},"back")],children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark",children:"Proficiency Preference"}),(0,E.jsx)("div",{className:"text-size-16 text-weight-400 mt-8 ",children:"Set proficiencies for reading, writing and speaking."}),(0,E.jsx)(fi,{uuid:o,type:"reading_proficiency",label:"Reading",handleProficiencyChange:z,selectedProficiency:S}),(0,E.jsx)(fi,{uuid:o,type:"writing_proficiency",label:"Writing",handleProficiencyChange:F,selectedProficiency:D}),(0,E.jsx)(fi,{uuid:o,type:"speaking_proficiency",label:"Speaking",handleProficiencyChange:I,selectedProficiency:A})]})]})]})};var yi=N.Z.Option,vi=[{value:"must_have",label:"is a Must Have"},{value:"nice_to_have",label:"is a Nice To Have"}],ji=function(e){var t=e.disabled,n=e.type,r=e.value,i=e.handlePriortyChange,a=vi.find((function(e){return e.value===r}));return(0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500 entry_field",placeholder:"Select Priority",optionFilterProp:"children",onChange:function(e){return i(n,e)},style:{width:"100%",height:"48px"},disabled:t,value:(null===a||void 0===a?void 0:a.value)||void 0,dropdownClassName:"custom-select",suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),children:vi.map((function(e,t){return(0,E.jsx)(yi,{className:"custom-select-item",value:e.value,children:e.label},t)}))})},bi=function(e){var t,n=e.data,i=e.handleLanguageChange,a=e.handleDelete,s=e.handlePriortyChange,l=e.handleProficiencyChange,o=e.selectedLanguage,c=(0,r.useState)(!1),m=c[0],p=c[1];return(0,E.jsx)("div",{className:"position-relative",children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:13,children:(0,E.jsx)(gi,(t={type:"language",onSelect:function(e){i(n.uuid,e)},value:n.name,handleProficiencyChange:l,uuid:n.uuid},(0,h.Z)(t,"value",(null===o||void 0===o?void 0:o.name)||void 0),(0,h.Z)(t,"selectedLanguage",o),(0,h.Z)(t,"setIsModalVisible",p),(0,h.Z)(t,"isModalVisible",m),t))}),(0,E.jsx)(Z.Z,{xs:23,lg:9,children:(0,E.jsx)(ji,{disabled:!(null!==o&&void 0!==o&&o.name),type:n.uuid,handlePriortyChange:s,value:n.req_type})}),(0,E.jsx)(Z.Z,{xs:1,lg:1,children:(0,E.jsx)(u.Z,{placement:"top",title:"Remove",children:(0,E.jsx)(d.Z,{className:"position-absolute text-size-24",component:X.r,style:{top:"50%",transform:"translateY(-50%)",marginLeft:"5px"},onClick:function(){return a(n.uuid)}})})})]})})};function wi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ki(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wi(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ni=function(){return{uuid:(0,Y.k$)(),req_type:"nice_to_have",req_category:"language",language:null,reading_proficiency:"Elementary",writing_proficiency:"Elementary",speaking_proficiency:"Elementary"}},_i=function(e){var t=(0,i.I0)(),n=(0,i.v9)((function(e){return e.jobPost.languageList}));(0,r.useEffect)((function(){if(!(n.length>0)){var e=[];e.push(Ni()),t(w.inZ(e))}}),[]);var a=function(e,r){var i=(0,f.Z)(n),a=Zi(i,Ci(i,e),r);t(w.inZ(a))},s=function(e){var r=(0,f.Z)(n),i=Oi(r,e);t(w.inZ(i))},l=function(e,r){var i=(0,f.Z)(n),a=zi(i,Ci(i,e),"req_type",r);t(w.inZ(a))},o=function(e,r,i){var a=(0,f.Z)(n),s=zi(a,Ci(a,e),r,i);t(w.inZ(s))};return(0,E.jsxs)("div",{children:[n.map((function(e,t){return(0,E.jsx)(bi,{data:e,handleLanguageChange:a,handleDelete:s,handlePriortyChange:l,handleProficiencyChange:o,selectedLanguage:n[t]},(0,Y.k$)())})),(0,E.jsx)("div",{className:"text-color-blue cursor-pointer mt-16 text-size-16 text-weight-500 d-inline-block",onClick:function(){var e=(0,f.Z)(n),r=Si(e,Ni());t(w.inZ(r))},children:"Add Another Language"})]})},Zi=function(e,t,n){return e[t]=ki(ki(ki({},e[t]),n),{},{language:n}),e},Ci=function(e,t){return e.findIndex((function(e){return e.uuid===t}))},Oi=function(e,t){var n=e.findIndex((function(e){return e.uuid===t}));return e.splice(n,1),e},Si=function(e,t){return e.push(t),e},zi=function(e,t,n,r){return e[t][n]=r,e},Ei=N.Z.Option,Pi=function(e){var t=e.handleOptionalChange,n=(e.selectedOptions,e.handlePriortyChange),r=(0,i.v9)((function(e){return e.jobPost.optionalSkills})).filter((function(e){return"teamrole"===e.req_category}));return(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:14,children:[" ",(0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500 entry_field",placeholder:"Select team role",optionFilterProp:"children",style:{width:"100%",height:"48px"},onSelect:function(e){t("teamrole",e)},dropdownClassName:"custom-select",suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),value:r.length>0?r[0].teamrole:void 0,children:null===ri||void 0===ri?void 0:ri.map((function(e){return(0,E.jsx)(Ei,{className:"custom-select-item",value:e.title,children:e.title},e.title)}))})]}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(ji,(0,h.Z)({disabled:!(r.length>0&&r[0].teamrole),type:"teamrole",value:"teamrole",handlePriortyChange:n},"value",r.length>0?r[0].req_type:void 0))})]})},Di=function(e){var t=e.handleOptionalChange,n=(e.selectedOptions,e.handlePriortyChange),r=(0,i.v9)((function(e){return e.jobPost.optionalSkills})).filter((function(e){return"experience"===e.req_category}));return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:14,children:[" ",(0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500 entry_field",placeholder:"Select Experience",optionFilterProp:"children",style:{width:"100%",height:"48px"},onSelect:function(e){t("experience",e)},suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),dropdownClassName:"custom-select",value:r.length>0?r[0].experience:void 0,children:null===ii||void 0===ii?void 0:ii.map((function(e){return(0,E.jsx)(N.Z.Option,{className:"custom-select-item",value:e.title,children:e.title},e.title)}))})]}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(ji,(0,h.Z)({disabled:!(r.length>0&&r[0].experience),type:"experience",value:"experience",handlePriortyChange:n},"value",r.length>0?r[0].req_type:null))})]})})},Fi=function(e){var t,n,r,a=e.handleOptionalChange,s=(e.selectedOptions,e.handlePriortyChange),l=(0,i.v9)((function(e){return e.jobPost.optionalSkills})).filter((function(e){return"company_type"===e.req_category}));return(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:14,children:[" ",(0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500 entry_field",placeholder:"Select Past Company Type",optionFilterProp:"children",style:{width:"100%",height:"48px"},onSelect:function(e){a("company_type",e)},value:(null===(t=l[0])||void 0===t?void 0:t.company_type)||void 0,dropdownClassName:"custom-select",suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),children:null===ai||void 0===ai?void 0:ai.map((function(e){return(0,E.jsx)(Option,{className:"custom-select-item",value:e.title,children:e.title})}))})]}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(ji,(0,h.Z)({disabled:!(null!==(n=l[0])&&void 0!==n&&n.company_type),type:"company_type",value:"company_type",handlePriortyChange:s},"value",(null===(r=l[0])||void 0===r?void 0:r.req_type)||null))})]})},Li=function(e){var t,n,r,a=e.handleOptionalChange,s=(e.selectedOptions,e.handlePriortyChange),l=(0,i.v9)((function(e){return e.jobPost.optionalSkills}
1)).filter((function(e){return"company_stage"===e.req_category}));return(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:14,children:[" ",(0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500 entry_field",placeholder:"Select Past Company Stage",optionFilterProp:"children",style:{width:"100%",height:"48px"},onSelect:function(e){a("company_stage",e)},value:(null===(t=l[0])||void 0===t?void 0:t.company_stage)||void 0,dropdownClassName:"custom-select",suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),children:null===si||void 0===si?void 0:si.map((function(e){return(0,E.jsx)(Option,{className:"custom-select-item",value:e.title,children:e.title})}))})]}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(ji,(0,h.Z)({disabled:!(null!==(n=l[0])&&void 0!==n&&n.company_stage),type:"company_stage",value:"company_stage",handlePriortyChange:s},"value",(null===(r=l[0])||void 0===r?void 0:r.req_type)||null))})]})},Ai=function(e){var t=e.handleOptionalChange,n=(0,i.v9)((function(e){return e.jobPost.optionalSkills})).filter((function(e){return"descriptive"===e.req_category}));return(0,E.jsxs)(_.Z,{gutter:[15,20],style:{margin:0},children:[(0,E.jsx)(ei.Z,{editorValue:n.length>0&&n[0].requirement||"",setEditorValue:function(e){t("descriptive",e)},className:"entry-field"}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light mt-6 line-height-16",children:"Use this space to specify 2 things candidates really care about:"}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light line-height-16",children:"1. About the Work - Scale and relevance of the product/project and"}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light line-height-16",children:"2. About the Team - structure and size, leader/manager name and background"})]})};function Ii(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ii(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ri=function(e){var t=(0,i.I0)(),n=(0,i.v9)((function(e){return e.taxonomy.currencyList})),a=(0,i.v9)((function(e){return e.auth.auth.legal_entity.currency})),s=(0,i.v9)((function(e){return e.jobPost.budgetDetails})),l={currency:a,pay_frequency:"fixed",min_budget:null,max_budget:null,max_same_as_min:!1,budget_visibility:"private"};(0,r.useEffect)((function(){null!==s&&void 0!==s&&s.currency||t((0,w.kyh)(l))}),[]);var o=function(e,t){c(Mi(Mi({},s),{},(0,h.Z)({},e,t)))};(0,r.useEffect)((function(){(null===s||void 0===s?void 0:s.min_budget)===(null===s||void 0===s?void 0:s.max_budget)?c(Mi(Mi({},s),{},{max_same_as_min:!0,currency:(null===s||void 0===s?void 0:s.currency)||a})):c(Mi(Mi({},s),{},{max_same_as_min:!1,currency:(null===s||void 0===s?void 0:s.currency)||a}))}),[null===s||void 0===s?void 0:s.min_budget,null===s||void 0===s?void 0:s.max_budget]);var c=function(e){t((0,w.kyh)(e))},u=function(e){return(0,E.jsx)("div",{className:"mt-4 text-size-16 text-color-dark-grey-light",children:e&&(0,E.jsxs)("div",{children:["".concat(null===s||void 0===s?void 0:s.currency," ").concat((0,Y.$i)(e)),"fixed"===(null===s||void 0===s?void 0:s.pay_frequency)&&" fixed","yearly"===(null===s||void 0===s?void 0:s.pay_frequency)&&" per year","monthly"===(null===s||void 0===s?void 0:s.pay_frequency)&&" per month"]})})},m=n.map((function(e){return(0,E.jsx)(N.Z.Option,{children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("span",{className:"fi fi-".concat(Y.qI[e[0]]||"xx"," mr-8")}),(0,E.jsx)("span",{className:"mr-4",children:e[0]}),(0,E.jsx)("span",{children:"(".concat(e[1],")")})]})},e[0])}));return(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"mb-2 text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Currency *"}),(0,E.jsx)(N.Z,{size:"large",className:"w-100 custom-select-video-type text-weight-500 entry_field",placeholder:"Select a currency",defaultValue:a,value:(null===s||void 0===s?void 0:s.currency)||a,showSearch:!0,onSelect:function(e){o("currency",e)},style:{width:"100%",height:"48px"},dropdownClassName:"custom-select",suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),children:m})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"mb-2 text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Pay Frequency *"}),(0,E.jsxs)(N.Z,{size:"large",className:"w-100 custom-select-video-type text-weight-500 entry_field",placeholder:"Select pay frequency",onSelect:function(e){o("pay_frequency",e)},style:{width:"100%",height:"48px"},dropdownClassName:"custom-select",suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),value:(null===s||void 0===s?void 0:s.pay_frequency)||"yearly",children:[(0,E.jsx)(N.Z.Option,{className:"custom-select-item",value:"yearly",children:"Yearly"}),(0,E.jsx)(N.Z.Option,{className:"custom-select-item",value:"hourly",children:"Hourly"}),(0,E.jsx)(N.Z.Option,{className:"custom-select-item",value:"fixed",children:"Fixed"})]})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"mb-2 text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Starting at *"}),(0,E.jsx)(z.Z,{className:"text-weight-500 entry_field",size:"large",placeholder:"e.g. 100000",step:1,min:0,value:(null===s||void 0===s?void 0:s.min_budget)||void 0,formatter:Ti,parser:qi,onChange:function(e){o("min_budget",e)},style:{width:"100%",height:"48px"}}),u(null===s||void 0===s?void 0:s.min_budget)]}),(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)("div",{className:"mb-2 text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Upto (optional)"}),(0,E.jsx)(z.Z,{className:"text-weight-500 entry_field",size:"large",placeholder:"e.g. 120000",
1step:1,min:0,value:null!==s&&void 0!==s&&s.max_same_as_min?null===s||void 0===s?void 0:s.min_budget:null===s||void 0===s?void 0:s.max_budget,formatter:Ti,parser:qi,onChange:function(e){o("max_budget",e)},style:{width:"100%",height:"48px"}}),u(null===s||void 0===s?void 0:s.max_budget)]})]})},Ti=function(e){return e?"".concat(e).replace(/\B(?=(\d{3})+(?!\d))/g,","):""},qi=function(e){return e.replace(/\$\s?|(,*)/g,"")},Bi=function(e){var t,n,r=e.handleOptionalChange,a=(e.selectedOptions,e.handlePriortyChange),s=(0,i.v9)((function(e){return e.jobPost.optionalSkills})).filter((function(e){return"education"===e.req_category}));return(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:14,children:(0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500 entry_field",placeholder:"Select Degree",optionFilterProp:"children",style:{width:"100%",height:"48px"},onSelect:function(e){r("education",e,"normalized_degree")},value:s.length>0?s[0].normalized_degree:void 0,dropdownClassName:"custom-select",suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),children:null===li||void 0===li?void 0:li.map((function(e){return(0,E.jsx)(N.Z.Option,{className:"custom-select-item",value:e.title,children:e.title})}))})}),(0,E.jsx)(Z.Z,{xs:24,lg:10,children:(0,E.jsx)(ji,(0,h.Z)({disabled:!(s.length>0&&s[0].normalized_degree),type:"education",value:"education",handlePriortyChange:a},"value",s.length>0?s[0].req_type:void 0))}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(gi,{type:"specialization",label:"Specialization (Optional)",placeholder:"Search Specialization",value:s.length>0?null===(t=s[0])||void 0===t||null===(n=t.specialization)||void 0===n?void 0:n.name:void 0,onSelect:function(e){r("education",e,"specialization")},showArrow:!1})})]})};function Vi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vi(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hi=function(){return{uuid:(0,Y.k$)(),req_type:"nice_to_have",req_category:"industry",industry:null}},Wi=function(e){var t=(0,i.I0)(),n=(0,i.v9)((function(e){return e.jobPost.pastIndustries}));(0,r.useEffect)((function(){if(!(n.length>0)){var e=[];e.push(Hi()),t(w.XQ5(e))}}),[]);var a=function(e,r){var i=(0,f.Z)(n),a=Ui(i,$i(i,e),r);t(w.XQ5(a))},s=function(e){var r=(0,f.Z)(n),i=Gi(r,e);t(w.XQ5(i))},l=function(e,r){var i=(0,f.Z)(n),a=Qi(i,$i(i,e),"req_type",r);t(w.XQ5(a))};return(0,E.jsxs)("div",{children:[n.map((function(e,t){return(0,E.jsx)(Ji,{data:e,handleLanguageChange:a,handleDelete:s,handlePriortyChange:l},"".concat(e.uuid,"-").concat(t))})),(0,E.jsx)("div",{className:"text-color-blue cursor-pointer mt-16 text-size-16 text-weight-500 d-inline-block",onClick:function(){var e=(0,f.Z)(n),r=Ki(e,Hi());t(w.XQ5(r))},children:"Add Another Industry"})]})},Ji=function(e){var t=e.data,n=e.handleLanguageChange,r=e.handleDelete,i=e.handlePriortyChange;return(0,E.jsx)("div",{className:"position-relative",children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[15,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:14,children:(0,E.jsx)(gi,{type:"industry",onSelect:function(e){n(t.uuid,e)},value:t.name,uuid:t.uuid})}),(0,E.jsx)(Z.Z,{xs:23,lg:8,children:(0,E.jsx)(ji,{type:t.uuid,handlePriortyChange:i,value:t.req_type,disabled:!t.name})}),(0,E.jsx)(Z.Z,{xs:1,lg:1,children:(0,E.jsx)(u.Z,{placement:"top",title:"Remove",children:(0,E.jsx)(d.Z,{className:"position-absolute text-size-24",component:X.r,style:{top:"50%",transform:"translateY(-50%)",marginLeft:"5px"},onClick:function(){return r(t.uuid)}})})})]})})},Ui=function(e,t,n){return e[t]=Yi(Yi(Yi({},e[t]),n),{},{industry:n}),e},$i=function(e,t){return e.findIndex((function(e){return e.uuid===t}))},Gi=function(e,t){var n=e.findIndex((function(e){return e.uuid===t}));return e.splice(n,1),e},Ki=function(e,t){return e.push(t),e},Qi=function(e,t,n,r){return e[t][n]=r,e};function Xi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}
1var ea=function(e){var t=e.iconDetails,n=e.title,a=e.label,s=e.type,l=(0,i.I0)(),o=(0,i.v9)((function(e){return e.taxonomy.currencyList})),c=(0,i.v9)((function(e){return e.jobPost.optionalSkills})),m=(0,i.v9)((function(e){return e.jobPost.selectedOptionalFields})),p=(0,i.v9)((function(e){return e.jobPost.budgetDetails})),x=(0,r.useState)(!1),g=x[0],v=x[1],b=(0,r.useState)(na),k=(b[0],b[1],(0,r.useState)(!1)),N=k[0],C=k[1];(0,r.useEffect)((function(){(m.filter((function(e){return e===s})).length>0||null!==p&&void 0!==p&&p.currency)&&v(!0)}),[]);var O=["teamrole","experience","company_stage","company_type"],S=function(e){l(w.Gaf(e))},z=function(e,t,n){var r=c.find((function(t){return t.req_category===e}));if(r||(r="remote_preference"===e?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xi(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({req_category:e,req_type:"must_have"},t):{uuid:(0,Y.k$)(),req_category:e,req_type:"nice_to_have"}),O.indexOf(e)>-1)r[e]=t;else switch(e){case"descriptive":r.requirement=t;break;case"education":r[n]=t}D(e,r)},P=function(e,t){var n=c.find((function(t){return t.req_category===e}));n.req_type=t,D(e,n)},D=function(e,t){var n=function(e,t,n){var r=e.findIndex((function(e){return e.req_category===t}));r>-1?e[r]=n:e.push(n);return e}((0,f.Z)(c),e,t);l(w.zsw(n));var r=n.reduce((function(e,t){return[].concat((0,f.Z)(e),[t.req_category])}),[]);return S(r),n};(0,r.useEffect)((function(){o.length>0||l((0,w.hLp)(null,{onSuccess:function(){},onFail:function(e){}}))}),[]);return(0,E.jsxs)("div",{className:"p-20 mb-8 ".concat(g&&"hover-shadow"),style:{background:g?"white":"#E9EFF7",border:"1px solid #D5DAEC",borderRadius:"6px",boxShadow:"".concat(g?"":"inset"," 0px 1px 2px 0 #D5DAEC")},children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex ",children:[(0,E.jsx)(d.Z,{component:t.component,style:{fontSize:t.size}}),(0,E.jsxs)("div",{className:"ml-16",children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500 text-color-dark-grey-dark",children:n}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light mt-4",children:a})]})]}),!g&&(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{size:"large",className:"text-color-blue text-weight-500 background-transparent",onClick:function(){v(!0)},style:{borderColor:"#D5DAEC",boxShadow:"none"},children:"Add"})}),g&&(0,E.jsx)(u.Z,{placement:"top",title:"Delete Requirement",children:(0,E.jsx)(d.Z,{component:Ut,className:"text-size-24 delete-icon red-icon icon-hover cursor-pointer",onClick:function(){C(!0)}})})]}),g?(0,E.jsx)("div",{className:"pl-40 pt-16",children:g&&function(){switch(s){case"teamrole":return(0,E.jsx)(Pi,{handleOptionalChange:z,selectedOptions:m,handlePriortyChange:P});case"experience":return(0,E.jsx)(Di,{handleOptionalChange:z,selectedOptions:m,handlePriortyChange:P});case"company_type":return(0,E.jsx)(Fi,{handleOptionalChange:z,selectedOptions:m,handlePriortyChange:P});case"company_stage":return(0,E.jsx)(Li,{handleOptionalChange:z,selectedOptions:m,handlePriortyChange:P});case"remuneration":return(0,E.jsx)(Ri,{});case"language":return(0,E.jsx)(_i,{});case"education":return(0,E.jsx)(Bi,{handleOptionalChange:z,selectedOptions:m,handlePriortyChange:P});case"pastIndustries":return(0,E.jsx)(Wi,{});default:return(0,E.jsx)(Ai,{handleOptionalChange:z})}}()}):null,(0,E.jsxs)(y.Z,{visible:N,onCancel:function(){return C(!1)},footer:null,width:600,centered:!0,children:[(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-lineHeight",children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-24",children:"Delete Requirement"})}),(0,E.jsxs)(_.Z,{gutter:[16,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{children:"Are you sure to delete this requirement?"})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end ",children:[(0,E.jsx)(j.Z,{type:"default",className:"text-size-16 text-weight-500 btn-size-xl mr-16 border-radius-6 text-color-blue border-color-grey curs
1or-pointer",onClick:function(){return C(!1)},children:"Cancel"}),(0,E.jsx)(j.Z,{type:"primary",className:"text-size-16 text-weight-500 btn-size-xl border-radius-6 cursor-pointer",onClick:function(){v(!1),function(){if(O.indexOf(s)>-1||"education"===s||"descriptive"===s){var e=c.filter((function(e){return e.req_category!==s}));S(e.map((function(e){return e.req_category}))),l(w.zsw(e))}else switch(s){case"remuneration":l(w.kyh({}));break;case"language":case"language":l(w.inZ([]));break;case"pastIndustries":l(w.XQ5([]))}}(),C(!1)},children:"Delete Contract"})]})})]})]})]})},ta="nice_to_have",na={screening:{visible:!1,questions:[{question:"",deletable:!1,type:"single",options:[]}]},applyDetails:{visible:!1,items:[{apply_instruction:null,text_pitch_required:!0,video_pitch_required:!1}]},teamrole:{visible:!1,req_type:ta,items:[]},stakeholder:{visible:!1,items:[]},education:{visible:!1,items:[{uuid:(0,Y.k$)(),req_category:"education",req_type:ta,college:null,normalized_degree:"Bachelor's / Undergraduate"}]},language:{visible:!1,req_type:ta,operator:"OR",items:[{uuid:(0,Y.k$)(),operator:"OR",operands:[]}]},industry:{visible:!1,req_type:ta,operator:"OR",items:[{uuid:(0,Y.k$)(),operator:"OR",operands:[]}]},companyStage:{visible:!1,items:[]},companyType:{visible:!1,items:[]},budgetDetails:{visible:!1,items:[{currency:null,pay_frequency:null,min_budget:null,max_budget:null,max_same_as_min:!0,budget_visibility:"private"}]},descriptive:{visible:!1,items:[]}};var ra=function(e){return(0,E.jsxs)("div",{style:{marginBottom:"6rem"},children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 text-color-dark-grey-light mt-32 mb-8",children:"Other optional requirements"}),null===ni||void 0===ni?void 0:ni.map((function(e){return(0,E.jsx)(ea,{iconDetails:null===e||void 0===e?void 0:e.icon,title:null===e||void 0===e?void 0:e.title,label:null===e||void 0===e?void 0:e.label,type:null===e||void 0===e?void 0:e.key},null===e||void 0===e?void 0:e.key)}))]})};function ia(){return ia=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ia.apply(this,arguments)}function aa(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var sa=r.createElement("title",null,"Help"),la=r.createElement("g",{id:"Help",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,8 C9.790861,8 8,9.790861 8,12 C8,14.209139 9.790861,16 12,16 C14.209139,16 16,14.209139 16,12 C16,9.790861 14.209139,8 12,8 Z",id:"Combined-Shape",fill:"#FFFFFF"}),r.createElement("g",{id:"Group",transform:"translate(4.000000, 4.000000)",fill:"#FFFFFF",stroke:"#3A3E4C",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},r.createElement("line",{x1:16,y1:8,x2:12,y2:8,id:"Stroke-9"}),r.createElement("line",{x1:4,y1:8,x2:0,y2:8,id:"Stroke-9"}),r.createElement("line",{x1:8,y1:4,x2:8,y2:0,id:"Stroke-9"}),r.createElement("line",{x1:8,y1:16,x2:8,y2:12,id:"Stroke-9"})),r.createElement("path",{d:"M12,4 C16.418278,4 20,7.581722 20,12 C20,16.418278 16.418278,20 12,20 C7.581722,20 4,16.418278 4,12 C4,7.581722 7.581722,4 12,4 Z M12,8 C9.790861,8 8,9.790861 8,12 C8,14.209139 9.790861,16 12,16 C14.209139,16 16,14.209139 16,12 C16,9.790861 14.209139,8 12,8 Z",id:"Combined-Shape",stroke:"#7C7F88",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),oa=function(e){var t=e.svgRef,n=e.title,i=aa(e,["svgRef","title"]);return r.createElement("svg",ia({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?sa:n?r.createElement("title",null,n):null,la)},ca=r.forwardRef((function(e,t){return r.createElement(oa,ia({svgRef:t},e))})),da=n(19244),ua=function(e){var t=e.label,n=(e.value,e.skill),r=e.handleAddTempSkill,i=e.selected,a=e.handleDelete,s=e.uuid,l=e.labelArr,o=e.type;return(0,E.jsxs)("div",{className:"d-flex align-items-center",style:{padding:"9px 8px",borderRadius:"6px",border:"1px solid #D5DAEC",marginRight:"8px",marginBottom:"search-skill"!==o?"8px":"4px",width:"auto",cursor:"pointer",height:"40px",background:"white"},onClick:function(){return i?a(s):r(n)},children:[(0,E.jsxs)("span",{className:"text-size-16 text-weight-500",children:[(null===l||void 0===l?void 0:l.length)>0&&l.map((function(e,t){return(0,E.jsxs)(E.Fragment,{children:[e.skill.label,t!==l.length-1&&(0,E.jsx)("span",{className:"text-size-16 text-weight-400 text-color-dark-grey-light pr-8 pl-8",children:"OR"})]})})),!l&&(0,E.jsx)("span",{className:"text-color-dark-grey-dark",children:t})]}),"suggestion"===o?(0,E.jsx)(d.Z,{component:da.r,className:"text-size-20"}):i?(0,E.jsx)(d.Z,{component:X.r,className:"text-size-24"}):(0,E.jsx)(d.Z,{component:ne.r,className:"text-size-24"})]})},ma=function(e){var t=e.handleAddTempSkill,n=e.tempSkillList,a=((0,i.I0)(),(0,i.v9)((function(e){return e.jobPost.basicDetail
1s.role}))),s=(0,r.useState)([]),l=s[0],o=s[1],c=(0,r.useState)(!1),u=c[0],m=c[1],p=(0,r.useState)([]),x=p[0],h=p[1];return(0,r.useEffect)((function(){a&&a.uuid&&(m(!0),(0,V.IQ)("clustering/skill/for-role?role_keys[]=".concat(encodeURIComponent(a.key))).then((function(e){o(e),m(!1)})).catch((function(){o([]),m(!1)})))}),[a]),(0,r.useEffect)((function(){var e=n.map((function(e){return e.uuid})),t=l.filter((function(t){return!e.includes(t.uuid)}));h(t)}),[n,l]),(0,E.jsxs)("div",{className:"mb-16 p-16 background-grey-light mt-16 border-radius-6",children:[x.length>0&&(0,E.jsx)("div",{className:"mb-8",children:"Recommended skills based on the role selected"}),(0,E.jsxs)("div",{className:"d-flex",style:{flexFlow:"wrap"},children:[u?(0,E.jsx)(d.Z,{type:"loading"}):null,null===x||void 0===x?void 0:x.map((function(e){return(0,E.jsx)(ua,{label:e.skill.name,value:e.skill.key,skill:e,handleAddTempSkill:t,uuid:e.uuid,type:"suggestion"},e.uuid)}))]})]})},pa=n(84929),xa=C.Z.Search,ha=function(e){e.disabled;var t,n=e.handleAddTempSkill,i=(0,r.createRef)(),a=(0,r.useState)([]),s=a[0],l=a[1],o=(0,r.useState)(!1),c=o[0],d=o[1];return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(xa,{className:"skill-search",placeholder:"Enter skill",onChange:function(e){var n=e.target.value;clearTimeout(t),t=setTimeout((function(){!function(e){if(e){var t={category:"skill",q:e};d(!0),(0,V.Z7)("clustering/search/?".concat(at.stringify(t))).then((function(e){var t=[];e.forEach((function(e){t.push(e)})),l(t),d(!1)})).catch((function(){}))}}(n)}),300)},loading:c}),s.length>0&&!c&&(0,E.jsx)("div",{ref:i,children:(0,E.jsx)(pa.Z,{menu:s,selectOnlyLeafNode:!0,onSelect:function(e){var t={uuid:e[0].uuid,skill:e[0]};n(t)}})})]})};var fa=function(e){e.skills;var t=(0,i.I0)(),n=(0,i.v9)((function(e){return e.jobPost.mustHaveSkills})),a=(0,i.v9)((function(e){return e.jobPost.niceToHaveSkills})),s=(0,r.useState)([]),l=s[0],o=s[1],u=(0,r.useState)(!0),m=u[0],x=u[1],h=(0,r.useState)(!1),g=h[0],v=h[1],b=(0,r.useState)(!1),k=b[0],N=b[1],C=(0,r.useState)(!1),O=C[0],S=C[1];(0,r.useEffect)((function(){0===l.length?x(!0):x(!1)}),[l]);var z=function(e){var t=(0,f.Z)(l);t=ya(t,e),o(t)},P=function(e){var r=(0,f.Z)(l),i=va("OR",r,e);if("must_have"===e){var s=ya((0,f.Z)(n),i);t(w.oGC(s))}else if("nice_to_have"===e){var c=ya((0,f.Z)(a),i);t(w.W$p(c))}o([])},D=function(e){var r=(0,f.Z)(n);r=ga(r,e),t(w.oGC(r))},F=function(e){var n=(0,f.Z)(a);n=ga(n,e),t(w.W$p(n))},L=(0,E.jsxs)(c.Z,{style:{padding:"12px 16px"},children:[(0,E.jsx)(c.Z.Item,{onClick:function(){P("must_have")},style:{padding:"10px 16px",borderRadius:"6px"},children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Add as Must Have"})},"0"),(0,E.jsx)(c.Z.Item,{onClick:function(){P("nice_to_have")},style:{padding:"10px 16px",borderRadius:"6px"},children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Add as Nice to Have"})},"1")]});return(0,E.jsxs)("div",{children:[(0,E.jsxs)(_.Z,{children:[(0,E.jsx)(Z.Z,{children:(0,E.jsxs)("div",{style:{padding:"4px",border:"1px solid #D5DAEC",borderRadius:"6px",background:"#F4F7FB",paddingBottom:(null===l||void 0===l?void 0:l.length)>0?"0":"4px"},children:[(0,E.jsx)("div",{className:"d-flex",style:{flexFlow:"wrap"},children:null===l||void 0===l?void 0:l.map((function(e,t){return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ua,{label:e.skill.name,value:e.skill.key,skill:e,selected:!0,handleDelete:function(){return function(e){var t=(0,f.Z)(l);t=ga(t,e),o(t)}(e.uuid)},type:"search-skill"},e.uuid),t!==l.length-1&&(0,E.jsx)("span",{style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 8px 8px 0px",fontSize:"16px",color:"#7C7F88"},children:"OR"})]})}))}),m&&(0,E.jsx)(ha,{handleAddTempSkill:z})]})}),(0,E.jsxs)(Z.Z,{children:[(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mt-4",style:{borderRadius:"0 0 6px 6px",borderTop:"none"},children:[(0,E.jsxs)("span",{className:"text-size-16 text-weight-500 d-flex ".concat(m||0===l.length?"text-color-blue-light":"text-color-blue cursor-pointer"),onClick:function(){l.length>0&&x(!0)},children:[(0,E.jsx)(d.Z,{component:ne.r,className:"text-size-24"}),(0,E.jsx)("span",{children:"Add Substitute Skill"})]}),(0,E.jsx)(de.Z,{overlay:L,trigger:["click"],disabled:0===l.length,onVisibleChange:function(e){
1S(e)},children:(0,E.jsxs)(j.Z,{type:"primary",className:"text-size-16 text-weight-500 text-color-white p-8 d-flex",onClick:function(e){return e.preventDefault()},style:{height:"40px"},children:[(0,E.jsx)("span",{children:"Add Skill as"})," ",(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24 arrow-icon-white",style:{height:"24px",transition:"0.2s",transform:O?"rotate(180deg)":"rotate(0deg)"}})]})})]}),(0,E.jsx)(ma,{handleAddTempSkill:z,tempSkillList:l}),(0,E.jsxs)("div",{className:"mt-28 text-size-16 text-weight-500 mb-8 text-color-dark-grey-dark",children:["Must Have (",n.length,")"]}),(0,E.jsx)("div",{className:"d-flex",style:{flexFlow:"wrap"},children:null===n||void 0===n?void 0:n.map((function(e){return(0,E.jsx)(ua,{uuid:e.uuid,skill:e,selected:!0,handleDelete:D,labelArr:e.operands},e.uuid)}))}),0===n.length&&(0,E.jsx)("div",{className:"text-size-16 text-color-grey-light text-italics mt-4",style:{background:"#D5DAEC",padding:"8px 16px",borderRadius:"6px"},children:"No skills added"}),(0,E.jsxs)("div",{className:"mt-28 text-size-16 text-weight-500 mb-8 text-color-dark-grey-dark",children:["Nice to Have (",a.length,")"]}),(0,E.jsx)("div",{className:"d-flex",style:{flexFlow:"wrap"},children:null===a||void 0===a?void 0:a.map((function(e){return(0,E.jsx)(ua,{label:e.operands.map((function(e,t){return"".concat(e.skill.label)})).join(" OR "),uuid:e.uuid,skill:e,selected:!0,handleDelete:F,labelArr:e.operands},e.uuid)}))}),0===a.length&&(0,E.jsx)("div",{className:"text-size-16 text-color-grey-light text-italics mt-4",style:{background:"#D5DAEC",padding:"8px 16px",borderRadius:"6px"},children:"No skills added"})]})]}),(0,E.jsxs)("div",{style:{marginTop:"16px",marginBottom:"-4px"},className:"d-flex justify-content-between text-size-14 align-items-center",children:[(0,E.jsx)("span",{className:"cursor-pointer text-weight-500 text-color-dark-grey-dark",onClick:function(){v(!0)},children:"Can't find a skill?"}),(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-weight-500 cursor-pointer",onClick:function(){N(!0)},children:(0,E.jsx)(d.Z,{component:ca,className:"text-size-24 skill-help-icon"})})]}),(0,E.jsx)(y.Z,{centered:!0,destroyOnClose:!0,visible:g,onOk:function(){v(!1)},onCancel:function(){v(!1)},className:"post-job-skills-request-modal",footer:null,closeIcon:(0,E.jsx)(d.Z,{component:X.r}),children:(0,E.jsx)(ce.Z,{mode:"edit",category:"skill",onCancel:function(){v(!1)},onComplete:function(){v(!1)}})}),(0,E.jsxs)(y.Z,{visible:k,className:"text-size-16",width:"600px",footer:null,closable:!1,centered:!0,onCancel:function(){N(!1)},children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark mb-20",children:"Tips to leverage our skills architecture to attract the most relevant applications:"}),(0,E.jsxs)("div",{style:{border:"1px solid #D5DAEC",padding:"16px 16px",borderRadius:"6px",marginBottom:"4px"},children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark text-size-18 mb-8",children:"Specific Substitutes \u2192 OR"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark mb-16",children:"Specify upto 3 substitute skills in a single requirement where you have clearly identified alternatives"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light mb-4",children:"Example for frontend developer skills:"}),(0,E.jsxs)("span",{style:{border:"1px solid #D5DAEC",boxShadow:"0px 1px 2px #D5DAEC",padding:"10px 12px",borderRadius:"6px",display:"inline-block"},className:"text-size-16 text-color-dark-grey-dark text-weight-500",children:["React ",(0,E.jsx)("span",{className:"text-weight-400 text-color-dark-grey-light mr-8 ml-8",children:"OR"})," Angular ",(0,E.jsx)("span",{className:"text-weight-400 text-color-dark-grey-light mr-8 ml-8",children:"OR"})," Vue.js"]})]}),(0,E.jsxs)("div",{style:{border:"1px solid #D5DAEC",padding:"16px 20px",borderRadius:"6px"},children:[(0,E.jsxs)("div",{className:"d-flex align-items-center text-weight-500 text-color-dark-grey-dark text-size-18 mb-8",children:["Clusters for closely-linked skills \u2192 \xa0 ",(0,E.jsx)(d.Z,{style:{marginTop:"2px"},className:"text-size-20",type:"folder"})]}),(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark mb-16",children:["Specify skill groups or cluster
1s (denoted with ",(0,E.jsx)(d.Z,{type:"folder",className:"text-size-20"})," icon) to allow applicants with proven ability with any one of the skills in the cluster"]}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light",children:"Example for cloud management experience:"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light mb-4",children:"if you want someone with any cloud experience, specify \u2018Cloud Provider\u2019 as a skill cluster instead of specifying individual platforms like AWS, GCP, Azure, etc."}),(0,E.jsxs)("span",{style:{border:"1px solid #D5DAEC",boxShadow:"0px 1px 2px #D5DAEC",padding:"10px 12px",borderRadius:"6px",display:"inline-block"},className:"text-size-16 text-color-dark-grey-dark text-weight-500 ",children:[" ",(0,E.jsx)(d.Z,{type:"folder",className:"mr-8 text-size-20"})," Cloud Provider"]})]}),(0,E.jsx)("div",{className:"d-flex justify-content-end mt-20",children:(0,E.jsx)(j.Z,{size:"large",style:{width:"160px",height:"48px",borderRadius:"6px"},type:"secondary",className:"text-weight-500 text-size-16 ant-btn-white-bg-blue-border ",onClick:function(){N(!1)},children:"Got it"})})]})]})},ga=function(e,t){var n=e.findIndex((function(e){return e.uuid===t}));return e.splice(n,1),e},ya=function(e,t){return e.push(t),e},va=function(e,t,n){var r=[];return null===t||void 0===t||t.forEach((function(e){var t={skill:{req_category:"skill",uuid:e.uuid,label:e.skill.name,req_type:n,path:e.skill.path},req_category:"skill",uuid:e.uuid,req_type:n};r.push(t)})),{uuid:(0,Y.k$)(),operator:e,req_type:n,operands:r}},ja=(n(28254),n(8136)),ba=n(62534),wa=function(e){var t,n=e.allSkills,i=e.basicDetails,a=e.type,s=e.remotePreference,l=(0,r.useState)([]),o=l[0],c=l[1],d=(0,r.useState)([]),u=d[0],m=d[1],p=(0,r.useState)([]),x=p[0],h=p[1],f=(0,r.useState)([]),g=f[0],y=f[1],v=(0,r.useState)([]),j=v[0],b=v[1],w=(0,r.useState)([]),k=w[0],N=w[1],_=(0,r.useState)([]),Z=_[0],C=_[1],O=(0,r.useState)([]),S=O[0],z=O[1];return(0,r.useEffect)((function(){var e=[];null===n||void 0===n||n.map((function(t){"OR"===(null===t||void 0===t?void 0:t.operator)&&e.push(t)}));var t=n.filter((function(e){return"language"===e.req_category})),r=n.filter((function(e){return"company_type"===e.req_category})),s=n.filter((function(e){return"education"===e.req_category})),l=n.filter((function(e){return"company_stage"===e.req_category})),o=n.filter((function(e){return"experience"===e.req_category})),d=n.filter((function(e){return"teamrole"===e.req_category})),u=n.filter((function(e){return"industry"===e.req_category}));"must_have"===a?null!==i&&void 0!==i&&i.freshers_can_apply||0===(null===i||void 0===i?void 0:i.min_experience)?o.push({experience:"Fresher"}):null!==i&&void 0!==i&&i.min_experience&&o.push({experience:"".concat(null===i||void 0===i?void 0:i.min_experience," ").concat(1===(null===i||void 0===i?void 0:i.min_experience)?"year":"years")}):null!==i&&void 0!==i&&i.ideal_experience&&o.push({experience:"".concat(null===i||void 0===i?void 0:i.ideal_experience," years")}),c(e),m(t),h(r),y(s),b(l),N(o),C(d),z(u)}),[n]),(0,E.jsxs)("div",{children:[(0,E.jsx)(Na,{list:o,label:"Skills",dataKey:"label"}),(0,E.jsx)(Na,{list:u,label:"Language",dataKey:"name"}),(0,E.jsx)(Na,{list:x,label:"Company Type",dataKey:"company_type"}),(0,E.jsx)(Na,{list:g,label:"Education",dataKey:"normalized_degree"}),(0,E.jsx)(Na,{list:j,label:"Company Stage",dataKey:"company_stage"}),(0,E.jsx)(Na,{list:k,label:"Experience",dataKey:"experience",dataKey2:"display_value"}),(0,E.jsx)(Na,{list:Z,label:"Role",dataKey:"teamrole"}),(0,E.jsx)(Na,{list:S,label:"Industry",dataKey:"name"}),"must_have"===a&&(0,E.jsx)(_a,{locationType:null===s||void 0===s?void 0:s.type,displayValue:null!==s&&void 0!==s&&s.display_name?null===s||void 0===s?void 0:s.display_name:null===s||void 0===s||null===(t=s.location)||void 0===t?void 0:t.location})]})},ka=function(e){var t=e.text,n=e.className,r=e.labelArr;return(0,E.jsx)("div",{className:"".concat(n," "),style:{padding:"9px 12px",borderRadius:"6px",border:"1px solid #D5DAEC",marginRight:"8px",marginTop:"8px",width:"auto",cursor:"pointer",height:"40px",background:"white",boxShadow:"0px 1px 2px 0 #D5DAEC"},children:(0,E.jsxs)("span",{className:"text-size-16 text-weight-500",children:[(null===r||void 0===r?void 0:r.length)>0&&r.map((function(e,t){var n;return(0,E.jsxs)(E.Fragment,{children:[null===e||void 0===e||null===(n=e.skill)||void 0===n?void 0:n.label,t!==r.length-1&&(0,E.jsx)("span",{className:"text-size-16 text-weight-400 text-color-dark-grey-light pr-8 pl-8",children:"OR"})]})})),!r&&t]})})},Na=function(e){var t=e.list,n=e.label,r=e.dataKey,i=e.dataKey2;return t.length>0&&(0,E.jsxs)("div",{className:"mb-16",children:[t.length>0&&(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",style:{marginBottom:"-4px"},children:n}),(0,E.jsx)("div",{className:"d-flex ",style:{flexFlow:"wrap"},children:t.map((function(e){var t,n;return(0,E.jsx)(ka,{text:"normalized_degree"===r&&null!==e&&void 0!==e&&null!==(t=e.specialization)&&void 0!==t&&t.name?"".concat(e[r]," - ").concat(null===e||void 0===e||null===(n=e.specialization)||void 0===n?void 0:n.name):e[r]||e[i],className:"pill-skill text-size-16 text-weight-500 text-color-dark-grey-dark",labelArr:e.operands})}
1))})]})},_a=function(e){var t=e.locationType,n=e.displayValue,r=t?zr.filter((function(e){return e.type===t}))[0]:zr[0];return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark mb-4",children:"Remote Preferences"}),(0,E.jsxs)("div",{className:"d-flex p-16 mb-8 list-item ",style:{borderRadius:"6px",position:"relative",background:"#FFDDA2"},children:[(0,E.jsx)("div",{children:(0,E.jsx)(d.Z,{component:null===r||void 0===r?void 0:r.icon,className:"text-size-24"})}),(0,E.jsx)("div",{className:"ml-20 ",style:{width:"85%"},children:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:null===r||void 0===r?void 0:r.title}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark",children:n?r.displayLabel(n):null===r||void 0===r?void 0:r.label})]})}),(0,E.jsx)("div",{className:"radio"})]})]})},Za=function(e){var t=e.aboutWork,n=e.otherData;return(0,E.jsxs)("div",{children:[t&&(0,E.jsx)("div",{className:"mb-16",children:(0,E.jsx)("div",{children:t?(0,Y.KJ)(t):(0,E.jsx)("span",{className:"text-color-dark-grey-light",children:"Nothing to display"})})}),!t&&!n&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark mb-4",children:"About Work"}),(0,E.jsx)("span",{className:"text-color-dark-grey-light",children:"Nothing to display"})]})]})},Ca=function(e){var t=e.otherData;return(0,E.jsx)("div",{children:t&&(0,E.jsx)("div",{className:"mb-16",children:(0,E.jsx)("div",{children:t?(0,Y.KJ)(t):(0,E.jsx)("span",{className:"text-color-dark-grey-light"})})})})},Oa=ja.Z.TabPane,Sa=function(e){var t=e.basicDetails,n=e.companyDetails,r=e.allMustHaveList,i=e.allNiceToHaveList,a=e.work,s=e.remotePreference,l=e.optionalSkills;console.log(e);var o=l.find((function(e){return"descriptive"===e.req_category}));return(0,E.jsxs)("div",{children:[(0,E.jsxs)(ja.Z,{defaultActiveKey:"1",size:"small",className:"job-preview-tabs",animated:!1,children:[(0,E.jsx)(Oa,{tab:"Must Have (".concat(r.length,")"),children:(0,E.jsx)(wa,{allSkills:r,basicDetails:t,type:"must_have",remotePreference:s})},"1"),(0,E.jsx)(Oa,{tab:"Nice to Have (".concat(i.length,")"),children:(0,E.jsx)(wa,{allSkills:i,basicDetails:t,type:"nice_to_have",remotePreference:s})},"2"),(0,E.jsxs)(Oa,{tab:"More",children:[(0,E.jsx)(Za,{aboutWork:a,otherData:null===o||void 0===o?void 0:o.requirement}),(0,E.jsx)(Ca,{otherData:null===o||void 0===o?void 0:o.requirement})]},"3"),(0,E.jsx)(Oa,{tab:"About Company",children:(0,E.jsx)(ba.Z,{aboutCompany:n})},"4")]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mt-16 pt-16",style:{borderTop:"1px solid #D5DAEC"},children:[(0,E.jsx)(j.Z,{size:"large",type:"primary",disabled:!0,className:"round-8 btn-size-xl",style:{padding:"0 32px"},children:"Apply Now"}),(0,E.jsx)(j.Z,{size:"large",disabled:!0,style:{color:"#6D88F5",padding:"0 32px",background:"white"},className:"round-8 btn-size-xl",children:"Share"})]})]})},za=n(94829);function Ea(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ea(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ea(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Da=function(e){var t,n,a=e.setShowJobPreview,s=e.handlePostJob,l=e.saveJobPostStart,o=e.companyJobEdit,c=(0,za.Z)("(max-width: 767px)"),d=((0,i.I0)(),(0,i.v9)((function(e){return e.jobPost}))),u=(0,i.v9)((function(e){return e.company.companyDetails})),m=(0,r.useState)([]),p=m[0],x=m[1],h=(0,r.useState)([]),f=h[0],g=h[1];(0,r.useEffect)((function(){var e=[],t=[];null===d||void 0===d||d.mustHaveSkills.forEach((function(t){e.push(t)}
1)),null===d||void 0===d||d.niceToHaveSkills.forEach((function(e){t.push(e)})),null===d||void 0===d||d.optionalSkills.forEach((function(n){"must_have"===n.req_type?e.push(n):t.push(n)})),null===d||void 0===d||d.languageList.forEach((function(n){"must_have"===n.req_type?e.push(n):t.push(n)})),null===d||void 0===d||d.pastIndustries.forEach((function(n){"must_have"===n.req_type?e.push(n):t.push(n)})),x(e),g(t)}),[]);var y=[{panelHeader:"".concat(null===d||void 0===d||null===(t=d.basicDetails)||void 0===t?void 0:t.title),panelSubHeader:"".concat(null===d||void 0===d||null===(n=d.basicDetails)||void 0===n?void 0:n.position_type," Few mins ago"),status:"".concat("incomplete"," "),statusLabel:"".concat("updated"," "),component:(0,E.jsx)(Sa,Pa(Pa({},d),{},{companyDetails:u,allMustHaveList:p,allNiceToHaveList:f}))}];return(0,E.jsxs)("div",{children:[(0,E.jsx)(b.Z,{heading:"",defaultActiveKey:[0],components:y,viewType:"jobPreview"}),(0,E.jsx)("div",{className:"d-flex justify-content-between mb-16 mt-40",style:{position:"absolute",bottom:"4px",width:"37rem",zIndex:1}}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mt-40 ".concat(c?"":"sticky-footer-action"," "),style:{bottom:0},children:[(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16 ant-btn-white-bg-blue-border",style:{background:"transparent"},onClick:function(){a(!1)},children:"Back to Editing"}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16",type:"primary",onClick:function(){s("active")},loading:l,style:{padding:"0 3.3rem"},children:o?"Update":"Post this Job"})]})]})},Fa=n(9705);function La(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Aa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?La(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):La(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ia=n(96486),Ma=function(e){var t=Sr[e].icon;return(0,E.jsx)("div",{className:"border-radius-50 d-flex justify-content-center align-items-center mr-16",style:{height:"48px",width:"48px",backgroundColor:t.backgroundColor,border:t.border},children:(0,E.jsx)(d.Z,{component:t.component,style:{fontSize:t.size}})})},Ra=function(e){var t=e.companyJobEdit,n=e.mode,s=e.setJobEditMode,l=(0,za.Z)("(max-width: 767px)"),o=(0,i.I0)(),c=(0,a.useRouter)(),d=(0,i.v9)((function(e){return e.jobPost})),u=(0,i.v9)((function(e){return e.company.companyDetails.clustering_id})),m=(0,i.v9)((function(e){return e.jobPost.errorLocations})),p=(0,i.v9)((function(e){var t,n;return(null===e||void 0===e||null===(t=e.clustering)||void 0===t||null===(n=t.dropdownList)||void 0===n?void 0:n.role)||[]})),x=(0,i.v9)((function(e){var t;return(null===e||void 0===e||null===(t=e.jobPost)||void 0===t?void 0:t.remotePreference)||{}})),h=((0,i.v9)((function(e){var t;return(null===e||void 0===e||null===(t=e.jobPost)||void 0===t?void 0:t.jobID)||{}})),(0,i.v9)((function(e){var t;return null===e||void 0===e||null===(t=e.jobPost)||void 0===t?void 0:t.saveJobPostStart}))),y=d.basicDetails,v=(d.mustHaveSkills,d.niceToHaveSkills,d.workAndLocation,d.optionalSkills,d.budgetDetails,d.languageList,d.pastIndustries,(0,r.useState)(!1)),k=v[0],N=v[1];(0,r.useEffect)((function(){return p.length||o((0,w.QFx)({category:"role"})),function(){o(w.dSA()),o(w.dSA())}}),[]);var _=function(){var e=[],t=[];if(null===d||void 0===d||d.mustHaveSkills.forEach((function(t){e=[].concat((0,f.Z)(e),[t])})),null===d||void 0===d||d.niceToHaveSkills.forEach((function(e){t=[].concat((0,f.Z)(t),[e])})),null===d||void 0===d||d.optionalSkills.forEach((function(n){"must_have"===n.req_type?e.push(n):t.push(n)})),null===d||void 0===d||d.languageList.forEach((function(n){"must_have"===n.req_type?e.push(n):t.push(n)}
1)),null===d||void 0===d||d.pastIndustries.forEach((function(n){"must_have"===n.req_type?e.push(n):t.push(n)})),"remote"!==x.type&&e.push(x),y.freshers_can_apply){var n={uuid:(0,Y.k$)(),clusters:[],req_type:"must_have",weightage:1,req_category:"experience",display_value:"Fresher",years_of_experience:"0"};e.push(n)}else if(0===y.ideal_experience){var r={uuid:(0,Y.k$)(),clusters:[],req_type:"must_have",weightage:1,req_category:"experience",display_value:"".concat(y.min_experience," Year").concat(y.min_experience>1?"s":""),years_of_experience:y.min_experience};e.push(r)}else{var i={uuid:(0,Y.k$)(),clusters:[],req_type:"must_have",weightage:1,req_category:"experience",display_value:"".concat(y.min_experience," Year").concat(y.min_experience>1?"s":""),years_of_experience:y.min_experience};e.push(i);var a={uuid:(0,Y.k$)(),clusters:[],req_type:"nice_to_have",weightage:1,req_category:"experience",display_value:"".concat(y.ideal_experience," Year").concat(y.ideal_experience>1?"s":""),years_of_experience:y.ideal_experience};t.push(a)}return{allMustHave:e,allNiceToHave:t}},Z=function(){var e=!0,t=[];if(""===y.title&&(e=!1,t.push("title")),null===y.position_type&&(e=!1,t.push("position_type")),Ia.isEmpty(null===y||void 0===y?void 0:y.role)&&(e=!1,t.push("role")),e&&(e=!(!y.freshers_can_apply&&0===(null===y||void 0===y?void 0:y.min_experience)&&0===(null===y||void 0===y?void 0:y.ideal_experience))),!e){var n={validated:!1,errorMsg:"Please fill all the required fields",errorLocations:Aa(Aa({},m),{},{basicDetails:t})};o(w.CyG(n)),g.Z.error("Please fill all the fields in Basic Details")}return e},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=_(),r=t.allMustHave,i=t.allNiceToHave,a=Ta(d,e,u,r,i);o(w.X7Y(a,e,{onSuccess:function(){"draft"===e?("edit"===n&&(s(!1),o(w.kgH())),g.Z.success("Job saved to draft successfully")):(g.Z.success("Job posted successfully"),"edit"===n?(s(!1),o(w.kgH())):c.push("/company-portal/source/all-jobs"))},onFail:function(e){alert("error"),g.Z.error(e)}}))},O=[{panelHeader:"Basic Details",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:Ma("basicDetails"),component:(0,E.jsx)(Xr,{})},{panelHeader:"Skills Required",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:Ma("skillsRequired"),component:(0,E.jsx)(fa,{})},{panelHeader:"Remote Preference",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:Ma("remotePreference"),component:(0,E.jsx)(Rr,{})},{panelHeader:"About Work",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:Ma("workAndLocation"),component:(0,E.jsx)(ti,{})}],S={title:k?"Preview Job Post":"Post a job",subtext:k?"Here is the preview of the job":"To post a job, fill in the details below"};return(0,E.jsx)("div",{className:"container-960 post-job ",style:{marginLeft:0},children:(0,E.jsxs)("div",{className:"".concat("edit"!==n?"page-wrapper":""," "),style:{overflow:"visible"},children:[!t&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Fa.Z,{title:null===S||void 0===S?void 0:S.title,style:{padding:"0 ".concat(l?"0":"1.25rem")}}),(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat("0")},children:null===S||void 0===S?void 0:S.title}),(0,E.jsx)("div",{className:"mb-16 text-size-16 text-color-dark-grey-light",children:null===S||void 0===S?void 0:S.subtext})]}),(0,E.jsxs)("div",{className:"".concat(t?"w-100":""),style:{maxWidth:"45rem"},children:[k?(0,E.jsx)(Da,{setShowJobPreview:N,handlePostJob:C,saveJobPostStart:h,companyJobEdit:t}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(b.Z,{heading:"",components:O,accordion:!1}),(0,E.jsx)(ra,{}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mt-40 ",children:["edit"!==n?(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16",onClick:function(){return C("draft")},style:{padding:"0 2rem",background:"transparent",border:"1px solid #D5DAEC",color:"#2A4CD5"},loading:h,children:"Save as Draft"}):(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16",onClick:function(){return s(!1)},style:{padding:"0 2rem",background:"transparent",border:"1px solid #D5DAEC",color:"#2A4CD5"},loading:h,children:"Cancel"}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16",type:"primary",onClick:function(){Z()?N(!0):g.Z.error("Please fill all the required fields in Basic Details section")},style:{padding:"0 4rem"},loading:h,children:"Preview"})]})]}),(0,E.jsx)("br",{})]})]})})}
1,Ta=function(e,t,n,r,i){var a,s=e.basicDetails,l=(e.mustHaveSkills,e.niceToHaveSkills,e.workAndLocation),o=(e.optionalSkills,e.budgetDetails),c=(e.languageList,e.pastIndustries,e.jobID),d=e.work,u={state:"draft"===t?"draft":"active",original_url:null,duration:null,time_to_hire:"Immediate",expected_hire_count:null,ranking:0,featured:!1,tags:["Lightning"],indexed:!1,clustering_company_id:n,apply_detail:{apply_method:"platform",apply_url:null,apply_email:null,apply_instruction:null,email_subject:null,application_filename:null,text_pitch_required:!0,video_pitch_required:!1},video_about:{visible:!1,provider:null}};if(null!==l&&void 0!==l&&l.location_and_time_zone&&(u.location_timezone=null===l||void 0===l?void 0:l.location_and_time_zone),d&&(u.text_about=d),Ia.isEmpty(o)||(u.budget_detail=o),u=Aa(Aa({},u),s),(null===r||void 0===r?void 0:r.length)>0){var m={uuid:(0,Y.k$)(),operator:"AND",operands:r};u.must_have=m}if((null===i||void 0===i?void 0:i.length)>0){var p={uuid:(0,Y.k$)(),operator:"AND",operands:i};u.nice_to_have=p}c.uuid&&(u=Aa(Aa(Aa({},u),c),{},{job_req_id:null===c||void 0===c||null===(a=c.job_req)||void 0===a?void 0:a.uuid}));return u.posted_at=(new Date).toISOString(),u},qa=n(94184),Ba=n.n(qa),Va=n(58336),Ya=n(42531),Ha=n(65395),Wa=n(62986);function Ja(e){var t,n=e.jobs,i=e.curJob,a=e.setCurJob,s=(0,r.useState)(!1),l=s[0],o=s[1],u=(0,E.jsx)(c.Z,{children:(0,E.jsx)(c.Z.Item,{disabled:!0,children:(0,E.jsx)(Wa.Z,{image:Wa.Z.PRESENTED_IMAGE_SIMPLE})})}),m={padding:"10px 16px",borderLeft:"3px solid transparent"},p={padding:"10px 16px",borderLeft:"3px solid #2A4CD5",backgroundColor:"#DCE2F9"},x=(0,E.jsx)(c.Z,{style:{maxHeight:"320px",overflow:"auto"},children:n&&i&&n.map((function(e){return(0,E.jsx)(c.Z.Item,{style:e.job_uuid===i.job_uuid?p:m,onClick:function(){a(e),o(!1)},children:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:Ba()("text-weight-500","text-size-16",{"text-color-blue":e.job_uuid===i.job_uuid},{"text-color-dark-grey-dark":e.job_uuid!==i.job_uuid}),style:{marginBottom:e.job_uuid?"4px":"0"},children:e.job_uuid?e.job_title:"Show All"}),e.job_uuid?(0,E.jsxs)("div",{className:Ba()("text-size-14",{"text-color-dark-grey-light":e.job_uuid!==i.job_uuid},{"text-color-dark-grey":e.job_uuid===i.job_uuid}),children:["Posted on: ",e.posted_on]}):null]})},e.job_uuid||"all")}))});return n&&n.length&&i?(0,E.jsx)(de.Z,{overlay:x,trigger:["click"],onVisibleChange:function(e){return o(e)},children:(0,E.jsx)("div",{style:{padding:"6px 16px 10px 12px",backgroundColor:l?"#FFFFFF":"transparent",borderRadius:"6px",width:"480px"},children:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-14 mb-4 text-color-dark-grey-light",children:"Viewing Applications for"}),(0,E.jsx)("div",{className:Ba()("text-size-20","text-weight-500",{"text-color-dark-grey-dark":!l},{"text-color-blue":l}),children:(t=i,t.job_uuid?t.job_title:"All Jobs")})]}),(0,E.jsx)(d.Z,{className:Ba()("icon-size-20",{"icon-blue":l}),component:L.r,rotate:l?180:0})]})})}):(0,E.jsx)(de.Z,{overlay:u,trigger:["click"],getPopupContainer:function(e){return e.parentNode},onVisibleChange:function(e){return o(e)},children:(0,E.jsx)("div",{style:{padding:"6px 16px 10px 12px",backgroundColor:l?"#FFFFFF":"transparent",borderRadius:"6px",width:"480px"},children:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsx)("div",{children:(0,E.jsx)("div",{className:"text-size-14 mb-28 text-color-dark-grey-light",children:"Viewing Applications for"})}),(0,E.jsx)(d.Z,{className:Ba()("icon-size-20",{"text-color-blue":l},{"text-color-dark-grey":!l}),component:L.r,rotate:l?180:0})]})})})}Ja.defaultProps={jobs:[],curJob:null};var Ua=Ja,$a=n(55241),Ga=n(29689);var Ka=n(83381);function Qa(e){var t=e.curJob,n=(0,r.useState)(!1),i=n[0],a=n[1],s=t?(0,E.jsxs)("div",{style:{width:"200px"},children:[(0,E.jsxs)("div",{className:"d-flex",style:{padding:"6px 0"},children:[(0,E.jsx)(d.Z,{className:"icon-size-24 text-color-dark-grey-light mr-8",component:Ka.r}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{lineHeight:"1.2"},className:"text-size-20 text-weight-500 text-color-dark-grey-dark",children:t.total}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light",children:"Activities"})]})]}),(0,E.jsxs)("div",{className:"d-flex",style:{padding:"6px 0"},children:[(0,E.jsx)(d.Z,{style:{padding:"4px"},className:"icon-size-16 mr-8 text-color-green",component:Mt.r}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{lineHeight:"1.2"},className:"text-size-20 text-weight-500 text-color-blue",children:t.submitted}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light",children:"Successfully Applied"})]})]}),(0,E.jsxs)("div",{className:"d-flex",style:{padding:"6px 0"},children:[(0,E.jsx)(d.Z,{style:{padding:"4px"},className:"icon-size-16 mr-8 text-color-green",component:Va.r}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{lineHeight:"1.2"},className:"text-size-20 text-weight-500 text-color-green",children:t.accepted}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light",children:"Accepted"})]})]}),(0,E.jsxs)("div",{className:"d-flex",style:{padding:"6px 0"},children:[(0,E.jsx)(d.Z,{className:"icon-size-24 mr-8 text-color-orange",component:X.r}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{lineHeight:"1.2"},className:"text-size-20 text-weight-500 text-color-orange",children:t.rejected}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light",children:"Declined"})]})]})]}):null;return t?(0,E.jsx)("div",{style:{borderRadius:"4px",padding:"12px 8px 12px 12px",backgroundColor:i?"#FFFFFF":"transparent"},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{component:Ka.r,className:"mr-4 icon-size-24"}),(0,E.jsxs)("div",{className:"text-color-dark-grey mr-8",children:[t.total," activities"]}),(0,E.jsx)($a.Z,{content:s,placement:"bottom",visible:i,onVisibleChange:function(e){return a(e)},children:(0,E.jsx)(d.Z,{component:Ga.r,className:"icon-size-20",style:{color:i?"#2A4CD5":"#7C7F88"}})})]})}):null}Qa.defaultProps={curJob:null};var Xa=Qa;var es=function(e){var t=e.sortType,n=e.setSortType,i=(0,r.useState)(!1),a=i[0],s=i[1],l={padding:"10px 16px",borderLeft:"3px solid transparent",width:"190px",fontSize:"16px",fontWeight:"500"},o={padding:"10px 16px",borderLeft:"3px solid #2A4CD5",backgroundColor:"#DCE2F9",width:"190px",fontSize:"16px",fontWeight:"500"},u=(0,E.jsxs)(c.Z,{style:{padding:"10px 0"},children:[(0,E.jsx)(c.Z.Item,{style:"applied_at"===t?o:l,onClick:function(){n("applied_at"),s(!1)},children:(0,E.jsx)("div",{className:Ba()({"text-color-blue":"applied_at"===t}),children:"Applied Date"})},"applied_at"),(0,E.jsx)(c.Z.Item,{style:"kw_score"===t?o:l,onClick:function(){n("kw_score"),s(!1)},children:(0,E.jsx)("div",{className:Ba()({"text-color-blue":"kw_score"===t}),children:"KW Screening Score"})},"kw_score")]});return(0,E.jsx)(de.Z,{overlay:u,trigger:["click"],placement:"bottomRight",getPopupContainer:function(e){return e.parentNode},onVisibleChange:function(e){return s(e)},children:(0,E.jsxs)("div",{className:Ba()("d-flex","align-items-center","cursor-pointer",{"text-color-blue":a}),style:{padding:"8px 8px 8px 16px",backgroundColor:a?"#FFFFFF":"transparent"},children:[(0,E.jsx)("div",{className:"mr-4 text-weight-500",children:"Order by"}),(0,E.jsx)(d.Z,{component:L.r,className:"icon-size-20"})]})})},ts=n(80583),ns=n(57937),rs=n(30381),is=n.n(rs),as=function(){var e=(0,i.v9)((function(e){var t;return null===(t=e.company.companyDetails)||void 0===t?void 0:t.clustering_id})),t=(0,r.useState)(!1),n=t[0],a=t[1],s=(0,r.useState)("all"),l=s[0],o=s[1],c=(0,r.useState)(""),d=c[0],u=c[1],m=(0,r.useState)(""),p=m[0],x=m[1],h=(0,r.useState)(!1),f=h[0],v=h[1],b=function(){a(!1),o("all"),u(""),x("")};return(0,E.jsxs)("div",{className:"text-right",children:[(0,E.jsx)(j.Z,{className:"ant-btn btn-size-xl border-radius-8 text-weight-500 text-size-16",style:{padding:"0px 2rem",background:"transparent",border:"1px solid rgb(213, 218, 236)",color:"rgb(42, 76, 213)"},onClick:function(){return a(!0)},children:"Download CSV"}),(0,E.jsx)(y.Z,{visible:n,footer:!1,centered:!0,closable:!1,destroyOnClose:!0,onCancel:b,bodyStyle:{padding:"30px",borderRadius:"8px",boxShadow:"0 4px 16px 0 #7C7F88"},width:480,className:"full-screen-mobile-modal",children:(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark",children:[(0,E.jsx)("div",{className:"text-size-28-24 text-weight-500 mb-20",children:"Download Application CSV"}),(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark mb-4",children:"Please select application status"}
1),(0,E.jsx)(q.ZP.Group,{className:"radio-block-18 mb-4",onChange:function(e){return o(e.target.value)},value:l,children:(0,E.jsxs)(_.Z,{gutter:[16,6],children:[(0,E.jsx)(Z.Z,{xs:24,sm:12,children:(0,E.jsx)(q.ZP,{className:"w-100",value:"all",children:"All"})}),(0,E.jsx)(Z.Z,{xs:24,sm:12,children:(0,E.jsx)(q.ZP,{className:"w-100",value:"submitted",children:"Submitted"})}),(0,E.jsx)(Z.Z,{xs:24,sm:12,children:(0,E.jsx)(q.ZP,{className:"w-100",value:"rejected",children:"Rejected"})}),(0,E.jsx)(Z.Z,{xs:24,sm:12,children:(0,E.jsx)(q.ZP,{className:"w-100",value:"draft",children:"Draft"})})]})}),(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark mb-4",children:"Start Date"}),(0,E.jsx)(ns.Z,{placeholder:"yyyy-mm-dd",className:"input-size-48 profile__edit-datepicker mb-20",onChange:function(e){return u(e?e.format("ddd MMM DD YYYY HH:MM:SS zZZ"):null)}}),(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark mb-4",children:"End Date"}),(0,E.jsx)(ns.Z,{placeholder:"yyyy-mm-dd",className:"input-size-48 profile__edit-datepicker mb-20",onChange:function(e){return x(e?e.format("ddd MMM DD YYYY HH:MM:SS zZZ"):null)}}),(0,E.jsxs)("div",{className:"d-flex flex-row-reverse align-items-center desktop",children:[(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-size-16 text-weight-500",loading:f,onClick:function(){!function(){var t={clustering_company_id:e};"all"!==l&&(t.state=l),d&&(t.start_date=d),p&&(t.end_date=p),v(!0),(0,V.PY)("application/list/company/csv",t).then((function(e){var t,n;v(!1),console.log(e),(0,Y.HH)(e)?(window.open(e,"_blank").focus(),g.Z.success("Download Success"),b()):g.Z.warn(null===(t=JSON.parse(e))||void 0===t||null===(n=t.data)||void 0===n?void 0:n.message)})).catch((function(e){v(!1),console.log(e)}))}()},children:"Download CSV"}),(0,E.jsx)("div",{className:"mr-24 text-color-dark-grey-light text-weight-500 cursor-pointer",onClick:b,children:"Cancel"})]}),(0,E.jsxs)("div",{className:"ml-18 mr-18 mobile",style:{position:"absolute",bottom:"30px",left:"0",right:"0"},children:[(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-size-16 text-weight-500 mb-8 border-radius-8",block:!0,onClick:function(){},children:"Download CSV"}),(0,E.jsx)(j.Z,{type:"default",className:"btn-size-xl text-size-16 text-weight-500 text-color-blue border border-color-grey border-radius-8",block:!0,onClick:b,children:"Cancel"})]})]})})]})};function ss(e){var t,n=e.applicationLoading,i=e.applications,a=e.applicationsCount,s=e.jobs,l=e.fetchCompanyApplications,o=e.fetchCompanyJobs,c=e.changeApplicationState,d=e.companyApplicationFetched,u=e.loginMeta,m=(0,r.useState)(null),p=m[0],x=m[1],h=(0,r.useState)("submitted"),f=h[0],v=h[1],j=(0,r.useState)(!1),b=j[0],w=j[1],k=(0,r.useState)("applied_at"),N=k[0],_=k[1],Z=(0,r.useState)(1),O=Z[0],S=Z[1],z=(0,r.useState)(null),P=z[0],D=z[1];u&&(t=u.company&&u.company.company_id);var F=function(){o({company_id:t,job_state:"active"})};if((0,r.useEffect)((function(){t&&F()}),[t]),(0,r.useEffect)((function(){p&&s&&s.length&&l({company_id:t,job_id:p.job_uuid,state:f,page:O,order_by:N})}),[p,f,O,N]),(0,r.useEffect)((function(){if(s&&s.length)if(null===p)x(s[0]);else{var e=s.find((function(e){return e.job_uuid===p.job_uuid}));e&&x(e)}}),[s]),!t)return null;var L=function(e){v(e),S(1)},A=function(e){return p?p[e]?"(".concat(p[e],")"):"(0)":null};return(0,E.jsxs)("div",{className:"page-wrapper",style:{maxWidth:"940px"},children:[(0,E.jsx)(Fa.Z,{title:"Applications"}),(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-16",children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark page-title",children:"Applications"}),(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",style:{maxWidth:"960px"},children:[(0,E.jsx)("div",{children:(0,E.jsx)(Ua,{jobs:s,curJob:p,setCurJob:x})}),(0,E.jsx)("div",{children:(0,E.jsx)(Xa,{curJob:p})})]})]}),(0,E.jsx)(as,{}),(0,E.jsx)("div",{className:"company-portal-jobs-title-filter",children:(0,E.jsx)("div",{style:{width:"960px"},children:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsxs)("div",{className:Ba()("company-portal-jobs-title-filter-item",{"company-portal-jobs-title-filter-item-selected":"submitted"===f}),onClick:function(){return L("submitted")},children:["Applied ",A("submitted")]}),(0,E.jsxs)("div",{className:Ba()("company-portal-jobs-title-filter-item",{"company-portal-jobs-title-filter-item-selected":"accepted"===f}),onClick:function(){return L("accepted")},children:["Accepted ",A("accepted")]}),(0,E.jsxs)("div",{className:Ba()("company-portal-jobs-title-filter-item",{"company-portal-jobs-title-filter-item-selected":"rejected"===f}),onClick:function(){return L("rejected")},children:["Declined ",A("rejected")]})]}),(0,E.jsx)(es,{sortType:N,setSortType:_})]})})}),(0,E.jsx)("div",{style:{padding:"0",maxWidth:"1040px"},children:(0,E.jsx)(ts.Z,{filterType:f,applications:i,applicationsCount:a,viewInviteModal:b,setInviteModal:w,handleApplicationSuccess:function(e){y.Z.confirm({title:"",className:"custom-modal-confirm",centered:!0,content:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-lineHeight",children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-20",children:"By accepting this application, you are inviting the candidate to your interview process"})}),width:"460px",okButtonProps:{className:"text-size-16 text-weight-500 btn-size-xl border-radius-6 btn-green",style:{padding:"0 40px",height:"3rem"}},cancelButtonProps:{className:"btn-size-xl text-weight-500 text-size-16 border-radius-6 border-color-grey text-color-blue",style:{height:"3rem"}},cancelText:"Decide Later",okText:"Yes Accept",onOk:function(){c({application_id:e.uuid,state:"accepted"},{onSuccess:function(e){v("accepted"),F(),D(null)}
1,onFail:function(e){g.Z.error(e)}})},onCancel:function(){}})},handleApplicationReject:function(e){var t="";y.Z.confirm({title:"",className:"custom-modal-confirm",centered:!0,content:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-lineHeight",children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-20",children:"Are you sure you want to decline this application?"}),(0,E.jsx)("div",{className:"text-size-16 text-weight-500 mb-4",children:"Message for the candidate (optional)"}),(0,E.jsx)(C.Z.TextArea,{placeholder:"We are looking for someone with xyz skillset",className:"input-bg-grey",autoSize:{minRows:6},onChange:function(e){t=e.target.value}})]}),width:"460px",okButtonProps:{className:"text-size-16 text-weight-500 btn-size-xl border-radius-6 btn-orange",style:{padding:"0 40px",height:"3rem"}},cancelButtonProps:{className:"btn-size-xl text-weight-500 text-size-16 border-radius-6 border-color-grey text-color-blue",style:{height:"3rem"}},cancelText:"Decide Later",okText:"Decline",onOk:function(){var n={application_id:e.uuid,state:"rejected"};t&&(n.rejected_reason=t),v("rejected"),c(n,{onSuccess:function(e){v("rejected"),F(),D(null)},onFail:function(e){g.Z.error(e)}})},onCancel:function(){}})},applicationLoading:n,applicationFetched:d,currentPage:O,setCurrentPage:S,companyId:t,currentApplication:P,setCurrentApplication:D})})]})}ss.defaultProps={applications:[],jobs:[],loginMeta:{}};
1var ls=ss,os=(0,i.$j)((function(e){return{applicationLoading:e.company.fetchCompanyApplicationsLoading,companyApplicationFetched:e.company.companyApplicationFetched,applicationsCount:e.company.applicationsCount,applications:e.company.applications,jobs:e.company.jobs,fetchCompanyJobsLoading:e.company.fetchCompanyJobsLoading,fetchCompanyApplicationsLoading:e.company.fetchCompanyApplicationsLoading,applicationStatusChangeSuccess:e.company.applicationStatusChangeSuccess,loginMeta:e.auth.auth.login_meta,isAdmin:e.auth.auth.admin}}),(function(e){return{fetchCompanyApplications:function(t){return e(w.yIf(t))},fetchCompanyJobs:function(t){return e(w.mh4(t))},changeApplicationState:function(t,n){return e(w.BKU(t,n))},rejectApplication:function(t){return e(w.W0V(t))}}}))(ls),cs=n(4712),ds=n(15636),us=n(7866),ms=n(55824),ps=n(9669),xs=n.n(ps),hs=n(44596),fs=n(82800),gs=n(11382),ys=n(72413),vs=n(25453),js=n(96886),bs=n(78644),ws=n(46274),ks=n(18583);function Ns(){return Ns=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ns.apply(this,arguments)}function _s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Zs=r.createElement("style",{type:"text/css"},"\n\t.st0{fill:#1A5FF8;}\n\t.st1{fill:#FFE300;}\n"),Cs=r.createElement("path",{className:"st0",d:"M12.03,14c5.51,0,9.97,4.46,9.97,9.97H2.06C2.06,18.46,6.53,14,12.03,14 M4.16,14.97H0 c0-2.69,1.52-5.03,3.74-6.21C4.38,9.32,5.15,9.73,6.01,9.9C6.01,9.93,6,9.97,6,10c0,1.16,0.34,2.24,0.91,3.16 C5.93,13.63,5,14.23,4.16,14.97z M17.1,13.14c1.01,0.47,1.95,1.08,2.8,1.83h4.16c0-2.71-1.54-5.05-3.78-6.23 c-0.64,0.57-1.42,0.98-2.29,1.16C17.99,9.93,18,9.97,18,10C18,11.15,17.67,12.22,17.1,13.14z"}),Os=r.createElement("path",{className:"st1",d:"M6.37,7.93C5.02,7.64,4,6.44,4,5c0-1.66,1.34-3,3-3c1.44,0,2.64,1.02,2.93,2.37C8.29,4.98,6.98,6.29,6.37,7.93z M17,2c-1.44,0-2.64,1.02-2.93,2.37c1.65,0.61,2.95,1.91,3.56,3.56C18.98,7.64,20,6.44,20,5C20,3.34,18.66,2,17,2z M12,6 c2.21,0,4,1.79,4,4s-1.79,4-4,4s-4-1.79-4-4S9.79,6,12,6"}),Ss=function(e){var t=e.svgRef,n=e.title,i=_s(e,["svgRef","title"]);return r.createElement("svg",Ns({id:"companysize-employeecount",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},i),n?r.createElement("title",null,n):null,Zs,Cs,Os)},zs=r.forwardRef((function(e,t){return r.createElement(Ss,Ns({svgRef:t},e))})),Es=n(53701),Ps=n(35950);function Ds(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ds(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ds(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ls={required:!0,message:"Required"},As=[{title:"Product",icon:(0,E.jsx)(d.Z,{component:Ps.r})},{title:"Service",icon:(0,E.jsx)(d.Z,{component:Es.r})}],Is=[{title:"Early",icon:(0,E.jsx)(d.Z,{component:vs.r})},{title:"Growth",icon:(0,E.jsx)(d.Z,{component:js.r})},{title:"Late",icon:(0,E.jsx)(d.Z,{component:bs.r})},{title:"IPO",icon:(0,E.jsx)(d.Z,{component:ws.r})},{title:"Fortune 1000",icon:(0,E.jsx)(d.Z,{component:ks.r})}],Ms=[{title:"1-10",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"11-50",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"51-200",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"201-500",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"501-1000",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"1001-5000",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"5001-10,000",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"10,001+",icon:(0,E.jsx)(d.Z,{component:zs})}],Rs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e||"").indexOf("ui-avatars")>-1?null:e},Ts=function(e){var t=["image/jpeg","image/png"].indexOf(e.type)>-1;t||g.Z.error("Uploaded file format is not supported.");var n=e.size/1024/1024<2;return n||g.Z.error("Uploaded file exceeds size limit of 2 MB."),t&&n},qs=hs.Z.create({name:"CompanyInfo"})((function(e){var t=e.company,n=e.companyDetailsLoading,i=e.companyDetailsPresent,a=e.updateCompanyDetailsPresent,s=e.changeViewToCompanyPage,l=e.saveNode,o=e.form,c=o.getFieldDecorator,u=(0,r.useState)(Rs(t.logo)),m=u[0],p=u[1];(0,r.useEffect)((function(){t.logo!==m&&p(Rs(t.logo))}),[t]);var x=(0,r.useState)(!1),h=x[0],f=x[1],g=t.headline&&t.name&&t.company_
1size&&t.company_stage&&t.company_type;(0,r.useEffect)((function(){g&&!i&&a(!0)}),[g]);var v=function(){o.validateFieldsAndScroll((function(e,n){if(!e){var r=Fs({},n);l({uuid:t.uuid,category:"company",logo:m,name:t.name,headline:r.headline,company_size:r.company_size,company_type:r.company_type,company_stage:r.company_stage})}}))};return(0,E.jsx)(y.Z,{visible:!g,width:600,maskClosable:!1,closable:!1,footer:(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsx)(j.Z,{type:"link",onClick:s,children:"Cancel"}),(0,E.jsxs)(j.Z,{type:"primary",htmlType:"submit",className:"btn-size-xl",onClick:v,children:[n?(0,E.jsx)(d.Z,{type:"loading"}):null," Save & Continue"]})]}),children:(0,E.jsx)("div",{className:"post-job-company-info",children:(0,E.jsxs)(hs.Z,{colon:!1,hideRequiredMark:!0,onSubmit:v,children:[(0,E.jsx)("div",{className:"text-size-24 text-color-dark-grey-dark text-weight-700 mb-16",children:"Complete company information"}),(0,E.jsx)(_.Z,{gutter:[12,12],children:(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Company Name",children:c("name",{initialValue:t.name,rules:[Ls]})((0,E.jsx)(C.Z,{disabled:!0,className:"input-size-48"}))})})}),(0,E.jsx)(_.Z,{gutter:[12,12],children:(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Headline (One liner about company)",children:c("headline",{initialValue:t.headline,rules:[Ls]})((0,E.jsx)(C.Z.TextArea,{}))})})}),(0,E.jsxs)(_.Z,{gutter:[20,12],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:12,children:[(0,E.jsx)(_.Z,{children:(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Company Type",children:c("company_type",{initialValue:t.company_type,rules:[Ls]})(function(){var e={className:"w-100 select-size-48",placeholder:"Company Type",size:"large",suffixIcon:(0,E.jsx)(d.Z,{component:L.r,style:{fontSize:"18px"}})};return(0,E.jsx)(N.Z,Fs(Fs({},e),{},{children:As.map((function(e){return(0,E.jsx)(N.Z.Option,{children:(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{className:"mr-8",children:e.icon}),(0,E.jsx)("span",{children:e.title})]})},e.title)}))}))}())})})}),(0,E.jsx)(_.Z,{children:(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Company Stage",children:c("company_stage",{initialValue:t.company_stage,rules:[Ls]})(function(){var e={className:"w-100 select-size-48",placeholder:"Company Stage",size:"large",suffixIcon:(0,E.jsx)(d.Z,{component:L.r,style:{fontSize:"18px"}})};return(0,E.jsx)(N.Z,Fs(Fs({},e),{},{children:Is.map((function(e){return(0,E.jsx)(N.Z.Option,{children:(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{className:"mr-8",children:e.icon}),(0,E.jsx)("span",{children:e.title})]})},e.title)}))}))}())})})}),(0,E.jsx)(_.Z,{children:(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Company Size",children:c("company_size",{initialValue:t.company_size,rules:[Ls]})(function(){var e={className:"w-100 select-size-48",placeholder:"Company size",size:"large",suffixIcon:(0,E.jsx)(d.Z,{component:L.r,style:{fontSize:"18px"}})};return(0,E.jsx)(N.Z,Fs(Fs({},e),{},{children:Ms.map((function(e){return(0,E.jsx)(N.Z.Option,{children:(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{className:"mr-8",children:e.icon}),(0,E.jsx)("span",{children:e.title})]})},e.title)}))}))}())})})})]}),(0,E.jsx)(Z.Z,{xs:24,lg:12,children:(0,E.jsx)("div",{className:"mr-20 cursor-pointer mt-16",children:(0,E.jsx)(fs.Z,{name:"logo",listType:"picture-card",showUploadList:!1,customRequest:function(e){var t=new FormData;t.append(e.filename,e.file);var n={Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"multipart/form-data"};f(!0),xs().post("".concat((0,V._)(),"/clustering/upload_logo/"),t,{headers:n}).then((function(e){p(e.data.url)}
1)).catch((function(){})).finally((function(){f(!1)}))},beforeUpload:Ts,style:{width:"250px",height:"250px"},children:(0,E.jsx)(gs.Z,{spinning:h,indicator:(0,E.jsx)(d.Z,{type:"loading",style:{color:"#2a4cd5"}}),children:(0,E.jsx)(ys.Z,{src:m,shape:"square",size:232,children:"Upload"})})})})})]}),(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark",children:["To add more details go to ",(0,E.jsx)("span",{onClick:s,style:{color:"#2A4CD5",cursor:"pointer"},children:"Company Page"})," from the left menu."]})]})})})})),Bs=(0,i.$j)((function(e){return{company:e.company.companyDetails,companyDetailsLoading:e.company.companyDetailsLoading,companyDetailsPresent:e.company.companyDetailsPresent}}),(function(e){return{updateCompanyDetailsPresent:function(t){return e(w.U2m(t))},saveNode:function(t){return e(w.jfq(t))}}}))(qs),Vs=n(16573),Ys=n(53597),Hs=n(46616),Ws=n(48137),Js=(n(82055),n(93923));function Us(){return Us=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Us.apply(this,arguments)}function $s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Gs=r.createElement("title",null,"share-facebook"),Ks=r.createElement("g",{id:"v1.1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Share",transform:"translate(-348.000000, -453.000000)"},r.createElement("g",{id:"share-facebook",transform:"translate(348.000000, 453.000000)"},r.createElement("rect",{id:"Rectangle",fill:"#FFFFFF",x:0,y:0,width:48,height:48}),r.createElement("path",{d:"M40,24.1 C40,15.26 32.84,8.1 24,8.1 C15.16,8.1 8,15.26 8,24.1 C8,32.08 13.86,38.7 21.5,39.9 L21.5,28.72 L17.44,28.72 L17.44,24.1 L21.5,24.1 L21.5,20.58 C21.5,16.58 23.88,14.36 27.54,14.36 C29.3,14.36 31.12,14.68 31.12,14.68 L31.12,18.6 L29.1,18.6 C27.12,18.6 26.5,19.84 26.5,21.1 L26.5,24.1 L30.94,24.1 L30.24,28.72 L26.52,28.72 L26.52,39.9 C34.14,38.7 40,32.08 40,24.1 L40,24.1 Z",id:"Path",fill:"#0078FF",fillRule:"nonzero"})))),Qs=function(e){var t=e.svgRef,n=e.title,i=$s(e,["svgRef","title"]);return r.createElement("svg",Us({width:"48px",height:"48px",viewBox:"0 0 48 48",ref:t},i),void 0===n?Gs:n?r.createElement("title",null,n):null,Ks)},Xs=r.forwardRef((function(e,t){return r.createElement(Qs,Us({svgRef:t},e))}));function el(){return el=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},el.apply(this,arguments)}function tl(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var nl=r.createElement("title",null,"share-twitter"),rl=r.createElement("g",{id:"v1.1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Share",transform:"translate(-540.000000, -453.000000)"},r.createElement("g",{id:"share-twitter",transform:"translate(540.000000, 453.000000)"},r.createElement("rect",{id:"Rectangle",fill:"#FFFFFF",x:0,y:0,width:48,height:48}),r.createElement("path",{d:"M30.16,11.42 C26.54,11.42 23.6,14.26 23.6,17.76 C23.6,18.26 23.66,18.74 23.78,19.2 C18.32,18.94 13.48,16.4 10.24,12.56 C9.68,13.5 9.36,14.58 9.36,15.76 C9.36,17.96 10.52,19.9 12.28,21.04 C11.2,21 10.2,20.72 9.3,20.24 L9.3,20.32 C9.3,23.4 11.56,25.96 14.56,26.54 C14,26.72 13.42,26.8 12.82,26.8 C12.4,26.8 11.98,26.76 11.58,26.68 C12.42,29.2 14.84,31.04 17.72,31.08 C15.48,32.8 12.64,33.8 9.56,33.8 C9.04,33.8 8.5,33.78 8,33.72 C10.9,35.52 14.36,36.58 18.06,36.58 C30.14,36.58 36.74,26.9 36.74,18.52 C36.74,18.24 36.74,17.98 36.72,17.7 C38,16.8 39.12,15.68 40,14.4 C38.82,14.9 37.56,15.24 36.22,15.4 C37.58,14.62 38.62,13.38 39.1,11.88 C37.84,12.6 36.42,13.14 34.94,13.42 C33.74,12.2 32.04,11.42 30.16,11.42 Z",id:"Path",fill:"#00ACEE",fillRule:"nonzero"})))),il=function(e){var t=e.svgRef,n=e.title,i=tl(e,["svgRef","title"]);return r.createElement("svg",el({width:"48px",height:"48px",viewBox:"0 0 48 48",ref:t},i),void 0===n?nl:n?r.createElement("title",null,n):null,rl)},al=r.forwardRef((function(e,t){return r.createElement(il,el({svgRef:t},e))}));function sl(){return sl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sl.apply(this,arguments)}function ll(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ol=r.createElement("title",null,"share-linkedin"),cl=r.createElement("g",{id:"v1.1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Share",transform:"translate(-444.000000, -453.000000)"},r.createElement("g",{id:"share-linkedin",transform:"translate(444.000000, 453.000000)"},r.createElement("rect",{id:"Rectangle",fill:"#FFFFFF",x:0,y:0,width:48,height:48}),r.createElement("path",{d:"M29.38,20.02 C33.8,20.02 35.32,22.02 35.32,26.78 L35.32,35.32 L30.62,35.32 L30.62,27.78 C30.62,25.28 30.14,23.92 28.3,23.92 C25.84,23.92 24.96,25.8 24.96,27.78 L24.96,35.32 L20.26,35.32 L20.24,20.24 L24.72,20.24 L24.72,22.5 C25.32,21.3 27.06,20.02 29.38,20.02 Z M17.4,20.24 L17.4,35.3 L12.7,35.3 L12.7,20.24 L17.4,20.24 Z M15.04,12.18 C16.64,12.18 17.92,13.48 17.92,15.06 C17.92,16.64 16.64,17.94 15.04,17.94 C13.46,17.94 12.16,16.66 12.16,15.06 C12.16,13.48 13.44,12.18 15.04,12.18 Z",id:"Combined-Shape",fill:"#0E76A8",fillRule:"nonzero"})))),dl=function(e){var t=e.svgRef,n=e.title,i=ll(e,["svgRef","title"]);return r.createElement("svg",sl({width:"48px",height:"48px",viewBox:"0 0 48 48",ref:t},i),void 0===n?ol:n?r.createElement("title",null,n):null,cl)},ul=r.forwardRef((function(e,t){return r.createElement(dl,sl({svgRef:t},e))}));function ml(){return ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ml.apply(this,arguments)}function pl(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var xl=r.createElement("title",null,"share-email"),hl=r.createElement("g",{id:"v1.1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Share",transform:"translate(-636.000000, -453.000000)"},r.createElement("g",{id:"share-email",transform:"translate(636.000000, 453.000000)"},r.createElement("rect",{id:"Rectangle",fill:"#FFFFFF",x:0,y:0,width:48,height:48}),r.createElement("path",{d:"M39.98,15.76 C39.98,15.84 40,15.92 40,16 L40,16 L40,32 C40,34.2 38.2,36 36,36 L36,36 L12,36 C9.8,36 8,34.2 8,32 L8,32 L8,16 C8,15.92 8.02,15.84 8.02,15.76 L8.02,15.76 L22.9,25.66 C23.22,25.88 23.62,26 24,26 C24.38,26 24.78,25.88 25.1,25.66 L25.1,25.66 Z M36,12 C36.64,12 37.22,12.16 37.76,
112.42 L24,21.6 L10.24,12.42 C10.78,12.16 11.36,12 12,12 L36,12 Z",id:"Combined-Shape",fill:"#0072C6",fillRule:"nonzero"})))),fl=function(e){var t=e.svgRef,n=e.title,i=pl(e,["svgRef","title"]);return r.createElement("svg",ml({width:"48px",height:"48px",viewBox:"0 0 48 48",ref:t},i),void 0===n?xl:n?r.createElement("title",null,n):null,hl)},gl=r.forwardRef((function(e,t){return r.createElement(fl,ml({svgRef:t},e))})),yl=n(69187);function vl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vl(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bl={fontSize:"48px",marginRight:"20px"};function wl(e){var t,n=e.companyJobFilterType,a=e.allJobsLoading,s=e.allJobsDirty,l=e.setCompanyJobFilterType,o=e.jobEditMode,c=e.setJobEditMode,u=e.activeJobUuid,m=e.allJobs,p=e.fetchAllJobsOfCompany,x=(e.setEditJob,e.archiveJobSuccessMessage),h=e.archiveJobErrorMessage,f=e.clearArchiveJobMessage,v=e.jobShareUrl,b=e.setJobShareUrl,k=(e.changeViewToATS,e.loginMeta),N=e.atsConnectStatus,_=(0,i.I0)(),Z=(0,r.useState)({}),C=Z[0],O=Z[1];k&&(t=k.company&&k.company.company_id);var S=function(e){(h||x)&&f(),l({companyJobFilterType:e})};(0,r.useEffect)((function(){m&&!s||(p(),S("active"))}),[s]),(0,r.useEffect)((function(){t&&N({companyId:t})}),[t]),(0,r.useEffect)((function(){var e;m&&u&&(m[n].result.length&&"object"===typeof(e=m[n].result.find((function(e){return e.uuid===u})))&&O(e))}),[m,u]);var z=m&&m.draft&&m.draft.count||0,P=m&&m.active&&m.active.count||0,D=m&&m.archived&&m.archived.count||0;return(0,E.jsxs)("div",{className:"company-portal-jobs page-wrapper",children:[(0,E.jsx)(Fa.Z,{title:o?"Edit job":"All jobs",className:"mobile"}),o?(0,E.jsx)("div",{className:"company-portal-jobs-title desktop",children:(0,E.jsxs)("h1",{children:[(0,E.jsx)(d.Z,{type:"arrow-left",onClick:function(){return c(!1)}}),"\xa0 Edit job"]})}):(0,E.jsxs)("div",{className:"company-portal-jobs-title desktop",style:{flexDirection:"column",alignItems:"start",marginBottom:"16px"},children:[(0,E.jsx)("h1",{children:"All jobs"}),(0,E.jsxs)("div",{className:"company-portal-jobs-title-filter",style:{marginLeft:"0px",marginBottom:0},children:[(0,E.jsxs)("div",{className:Ba()("company-portal-jobs-title-filter-item",{"company-portal-jobs-title-filter-item-selected":"active"===n}),onClick:function(){return S("active")},children:["Active ","(".concat(P,")")]}),(0,E.jsxs)("div",{className:Ba()("company-portal-jobs-title-filter-item",{"company-portal-jobs-title-filter-item-selected":"draft"===n}),onClick:function(){return S("draft")},children:["Draft ","(".concat(z,")")]}),(0,E.jsxs)("div",{className:Ba()("company-portal-jobs-title-filter-item",{"company-portal-jobs-title-filter-item-selected":"archived"===n}),onClick:function(){return S("archived")},children:["Archived ","(".concat(D,")")]})]})]}),(0,E.jsx)("div",{className:"company-portal-jobs-content",children:o&&Object.keys(C).length?function(){return C.is_old_job_format?(0,E.jsxs)("div",{className:"",children:[(0,E.jsx)("p",{children:"This job was posted by the kaamwork team on your behalf."}),(0,E.jsxs)("p",{children:["Please contact"," ",(0,E.jsx)("a",{className:"d-inline",href:"mailto: [email protected]",children:"[email protected]"})," ","for any changes or create a new job post that you can edit directly from your account."]})]}):(e=C,_(w._5n(e)),(0,E.jsx)(Ra,{mode:"edit",companyJobEdit:!0,setJobEditMode:c}));var e}():a?(0,E.jsx)("div",{className:"w-100 d-flex justify-content-around mt-20",children:(0,E.jsx)(d.Z,{type:"loading",style:{fontSize:"36px"}})}):m&&m[n]?m[n].result.length?m[n].result.map((function(e){return(0,E.jsx)(yl.Z,{mode:"postJob",job:e,setJobEditMode:c,setActiveJob:O},e.uuid)})):(0,E.jsx)(Wa.Z,{}):null}),(0,E.jsx)(y.Z,{visible:!!v,width:"625px",className:"post-job-share-modal",centered:!0,closeIcon:(0,E.jsx)(d.Z,{component:X.r}),onOk:function(){b("")},onCancel:function(){b("")},footer:null,children:(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark",children:[(0,E.jsx)("div",{className:"text-weight-500 text-size-18 mb-12 mt-8",children:"Now that your job post is live, use the apply link below to streamline and auto-filter applications across your sourcing channels"}),(0,E.jsx)("div",{className:"text-weight-500 mb-4",children:"Share this link"}),(0,E.jsxs)("div",{style:{height:"48px",border:"1px solid #D5DAEC",borderRadius:"4px"},className:"d-flex align-items-center",children:[(0,E.jsx)("span",{style:{marginLeft:"16
1px"},className:"text-ellipsis-on-overflow w-100",children:v}),(0,E.jsx)(j.Z,{type:"primary",onClick:function(){navigator.clipboard.writeText(v).then((function(){g.Z.success("Job url copied to clipboard!")}))},style:{height:"48px",width:"120px",borderRadius:"4px"},children:(0,E.jsxs)("span",{className:"text-weight-500",children:[(0,E.jsx)(d.Z,{component:Js.r,style:{fontSize:"20px"}})," Copy"]})})]}),(0,E.jsx)(B.Z,{style:{fontWeight:"400"},children:"or"}),(0,E.jsx)("div",{className:"text-weight-500 mb-12",children:"Share on"}),(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)(Vs.Z,{url:v,children:(0,E.jsx)(d.Z,{component:Xs,style:jl({color:"#0078FF"},bl)})}),(0,E.jsx)(Ys.Z,{url:v,children:(0,E.jsx)(d.Z,{component:ul,style:jl({color:"#0E76A8"},bl)})}),(0,E.jsx)(Hs.Z,{url:v,children:(0,E.jsx)(d.Z,{component:al,style:jl({color:"#00ACEE"},bl)})}),(0,E.jsx)(Ws.Z,{url:v,children:(0,E.jsx)(d.Z,{component:gl,style:jl({color:"#0072C6"},bl)})})]})]})})]})}wl.defaultProps={activeJobUuid:null,archiveJobSuccessMessage:null,archiveJobErrorMessage:null,loginMeta:null};var kl=(0,i.$j)((function(e){return{companyJobFilterType:e.job.companyJobFilterType,jobEditMode:e.job.jobEditMode,activeJobUuid:e.company.activeJob,allJobs:e.company.allJobs,allJobsLoading:e.company.allJobsLoading,allJobsError:e.company.allJobsError,allJobsDirty:e.company.allJobsDirty,archiveJobSuccessMessage:e.company.archiveJobSuccessMessage,archiveJobErrorMessage:e.company.archiveJobErrorMessage,jobShareUrl:e.company.jobShareUrl,loginMeta:e.auth.auth.login_meta}}),(function(e){return{setEditJob:function(t){return e(w.u2s(t))},fetchAllJobsOfCompany:function(){return e(w.kgH())},setJobEditMode:function(t){return e(w.LQK(t))},setCompanyJobFilterType:function(t){return e(w.oN6(t))},clearArchiveJobMessage:function(){return e(w.geJ())},setJobShareUrl:function(t){return e(w.Nut(t))},atsConnectStatus:function(t){return e(w.I_(t))}}}))(wl),Nl=n(87269),_l=n(66417),Zl=n(18407);function Cl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cl(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Sl=hs.Z.create({name:"EndEmployment"})((function(e){var t,n,i,a,s=e.employee,l=e.form,o=e.terminateEmployee,c=e.companyAccessRole,u=(0,za.Z)("(max-width: 767px)"),m=l.resetFields,p=l.getFieldDecorator,x=(0,r.useState)(null),h=x[0],f=x[1],v=(0,r.useState)("immediate"),b=v[0],w=v[1],k=(0,r.useState)(null),O=k[0],S=k[1],z=(0,r.useState)(""),P=z[0],D=z[1],F=(0,r.useState)(null),A=F[0],I=F[1],M=function(){f(null),m()},R=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat((0,V.dN)(),"/payroll/employees/pending-requests?employee_id=").concat(s.uuid),{method:"GET",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"}}).then((function(e){return e.json()}));case 3:(t=e.sent).data&&I(t.data),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){"form"===h&&R()}),[h]),(0,r.useEffect)((function(){"form"===h&&s.leaving_date&&(w("custom"),S(is()(s.leaving_date)),D(s.termination_message))}),[h,s]),(0,r.useEffect)((function(){var e=is()();"immediate"===b?S(e):"next_billing_cycle"===b&&(e.date()>=25?S(e.add(1,"M").set("date",25)):S(e.set("date",25)))}),[b]);var T=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={employee_id:s.uuid,end_date:O,termination_message:P},o(Ol({},t),{onSuccess:function(){var e;return g.Z.success("".concat(null===s||void 0===s||null===(e=s.profile)||void 0===e?void 0:e.first_name," will be terminated on ").concat(O.format("MMM DD, YYYY")))},onFail:function(e){return g.Z.error(e)}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=(0,r.useMemo)((function(){var e,t;if(A)if(A.pending_allowances_count&&A.pending_reimbursements_count)e="You have ".concat(A.pending_reimbursements_count," pending Reimbursement request/s and ").concat(A.pending_allowances_count," Allowance request/s\n from ").concat(null===s||void 0===s||null===(t=s.profile)||void 0===t?void 0:t.first_name);else if(A.pending_allowances_count){var n;e="You have ".concat(A.pending_allowances_count," Allowance request/s\n from ").concat(null===s||void 0===s||null===(n=s.profile)||void 0===n?void 0:n.first_name)}else if(A.pending_reimbursements_count){var r;e="You have ".concat(A.pending_reimbursements_count," pending Reimbursement request/s\n from ").concat(null===s||void 0===s||null===(r=s.profile)||void 0===r?void 0:r.first_name)}else e="";return e?(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{className:"background-yellow-2 p-8 round-8",children:(0,E.jsxs)("div",{className:"d-flex mb-8",children:[(0,E.jsx)(d.Z,{component:Zl.r,className:"icon-size-24 mr-8"}),(0,E.jsx)("div",{className:"text-size-16",children:e})]})})}):null}),[A]);return"hr"===c?null:"active"===(null===s||void 0===s?void 0:s.employment_status)&&(0,E.jsxs)("div",{className:"mt-12",children:[s.leaving_date?(0,E.jsx)("div",{className:"background-yellow-2 p-8 round-8",children:(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)(d.Z,{component:Zl.r,className:"icon-size-24 mr-8"}),(0,E.jsxs)("div",{className:"text-size-16 mr-4",children:[null===s||void 0===s||null===(t=s.profile)||void 0===t?void 0:t.first_name,"'s employment will end on"," ",is()(s.leaving_date).format("MMM DD, YYYY"),"."]}),(0,E.jsx)("div",{className:"text-weight-500 cursor-pointer",onClick:function(){return f("form")},children:"Edit"})]})}):(0,E.jsxs)("div",{className:"text-color-orange text-weight-500 cursor-pointer ",onClick:function(){return f("form")},children:["End ",null===s||void 0===s||null===(n=s.profile)||void 0===n?void 0:n.first_name,"'s employment"]}),(0,E.jsx)(y.Z,{visible:"form"===h,setVisible:M,centered:!0,footer:null,bodyStyle:{width:u?"100%":"600px",padding:"30px"},width:600,children:(0,E.jsx)(hs.Z,{className:"custom-form",onSubmit:T,colon:!1,children:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-lineHeight",children:(0,E.jsxs)(_.Z,{gutter:[24,24],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500",children:"End Employment"})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)(hs.Z.Item,{label:"Cho
1ose when to end",children:[p("end_type",{rules:[{required:!0}],initialValue:b})((0,E.jsxs)(N.Z,{className:"select-size-48 select-bg-grey",suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-24",component:L.r}),onChange:function(e){return w(e)},children:[(0,E.jsx)(N.Z.Option,{value:"immediate",children:"Immediate"}),(0,E.jsx)(N.Z.Option,{value:"next_billing_cycle",children:"Next Billing Cycle"}),(0,E.jsx)(N.Z.Option,{value:"custom",children:"Custom"})]})),"custom"!==b&&(0,E.jsxs)("div",{className:"text-color-dark-grey-light text-italics text-lineHeight mt-4",children:[null===s||void 0===s||null===(i=s.profile)||void 0===i?void 0:i.first_name,"'s employment will end on"," ",null===O||void 0===O?void 0:O.format("MMM DD, YYYY")]})]})}),"custom"===b&&(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"End Date",children:p("end_date",{rules:[{required:"custom"===b}],initialValue:O})((0,E.jsx)(ns.Z,{className:"input-size-48 profile__edit-datepicker input-bg-grey",onChange:function(e){return S(e)}}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Message for employee",children:p("message",{rules:[{required:!0}],initialValue:P})((0,E.jsx)(C.Z.TextArea,{className:"input-bg-grey",onChange:function(e){return D(e.target.value)}}))})}),q,(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end",children:[(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 border-color-grey mr-20 round-8",type:"primary",ghost:!0,style:{width:"120px"},onClick:M,children:"Cancel"}),(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 round-8",type:"danger",style:{width:"180px"},onClick:function(){return f("confirmation")},disabled:!O||!P,children:"End Employment"})]})})]})})})}),(0,E.jsx)(y.Z,{visible:"confirmation"===h,setVisible:M,centered:!0,footer:null,bodyStyle:{width:u?"100%":"600px",padding:"30px"},width:600,children:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-lineHeight",children:[(0,E.jsxs)("div",{className:"text-size-24 text-weight-500 mb-24",children:["You are about to end employment of ",null===s||void 0===s||null===(a=s.profile)||void 0===a?void 0:a.first_name]}),(0,E.jsx)("div",{className:"text-size-16 mb-40",children:"Once the employment is ended, they will be removed from your company\u2019s payroll. You cannot undo this process."}),(0,E.jsxs)("div",{className:"d-flex justify-content-end",children:[(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 border-color-grey mr-20 round-8",type:"primary",ghost:!0,style:{width:"120px"},onClick:function(){return f("form")},children:"Cancel"}),(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 round-8",type:"danger",style:{width:"200px"},onClick:T,children:"Yes, I am sure"})]})]})})]})})),zl=(0,i.$j)((function(e){return{companyAccessRole:e.auth.companyAccessRole}}),(function(e){return{terminateEmployee:function(t,n){return e(w.K9K(t,n))}}}))(Sl),El=function(e){var t=e.getFieldDecorator,n=e.resetFields,i=e.hiringManager,a=e.newEmployee,s=void 0===a?{}:a,l=e.managerOptions,o=e.managerOptionsLoading,c=e.editType,u=e.setEditType;(0,r.useEffect)((function(){l&&l.length>0?u("company"):u("custom")}),[l]);var m=function(e){var t="";return e.name?t=e.name:(e.first_name||e.className)&&(t=e.first_name+" "+e.last_name),t?"(".concat(t,")"):null};return(0,E.jsxs)(Z.Z,{xs:24,children:[l&&l.length>0&&"custom"!==c&&(0,E.jsx)(hs.Z.Item,{label:"Choose a Manager",children:t("hiring_manager_email",{initialValue:i&&i.email||s.hiring_manager_email})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey border-0 border-radius-6 inner-shadow",dropdownClassName:"select-bg-grey-dropdown",getPopupContainer:function(e){return e.parentNode},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-24",component:L.r}),loading:o,onChange:function(e){e&&u("company")},dropdownRender:function(e){return(0,E.jsxs)("div",{style:{backgroundColor:"transparent"},children:[e,(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark border-radius-4 cursor-pointer",style:{padding:"16px 12px",border:"1px solid #d5daec",borderTop:"none"},onMouseDown:function(e){return e.preventDefault()},onClick:function(){u("custom"),n()},children:"Add New"})]})},optionLabelProp:"label",children:l.map((function(e){return(0,E.jsx)(N.Z.Option,{value:e.email,label:e.email,children:(0,E.jsxs)("div",{children:[e.email," ",m(e)," "]})},e.email)}))}))}),"custom"===c&&(0,E.jsx)(hs.Z.Item,{label:"Email",children:t("hiring_manager_email",{initialValue:null,rules:[{required:!0,message:"Required"}]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow",allowClear:!0,type:"email"}))})]})},Pl=function(e){var t=e.getFieldDecorator,n=e.setFieldsValue,i=e.resetFields,a=e.businessOwner,s=e.newEmployee,l=void 0===s?{}:s,o=e.ownerOptions,c=e.ownerOptionsLoading,u=e.editType,m=e.setEditType,p=e.viewM
1odal;(0,r.useEffect)((function(){o&&o.length>0?m("company"):m("custom")}),[o,p]);var x=function(e){var t="";return e.name?t=e.name:(e.first_name||e.className)&&(t=e.first_name+" "+e.last_name),t?"(".concat(t,")"):null};return t("business_owner_name",{initialValue:(null===a||void 0===a?void 0:a.name)||l.business_owner_name}),(0,E.jsxs)(Z.Z,{xs:24,children:[o&&o.length>0&&"custom"!==u&&(0,E.jsx)(hs.Z.Item,{label:"Choose an Owner",children:t("business_owner_email",{initialValue:a&&a.email||l.business_owner_email})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey border-0 border-radius-6 inner-shadow",dropdownClassName:"select-bg-grey-dropdown",getPopupContainer:function(e){return e.parentNode},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-24",component:L.r}),loading:c,onChange:function(e){var t;e&&(m("company"),n({business_owner_name:null===(t=o.find((function(t){return t.email===e})))||void 0===t?void 0:t.name}))},dropdownRender:function(e){return(0,E.jsxs)("div",{style:{backgroundColor:"transparent"},children:[e,(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark border-radius-4 cursor-pointer",style:{padding:"16px 12px",border:"1px solid #d5daec",borderTop:"none"},onMouseDown:function(e){return e.preventDefault()},onClick:function(){m("custom"),i()},children:"Add New"})]})},optionLabelProp:"label",children:o.map((function(e){return(0,E.jsx)(N.Z.Option,{value:e.email,label:e.email,children:(0,E.jsxs)("div",{children:[e.email," ",x(e)]})},e.email)}))}))}),"custom"===u&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(hs.Z.Item,{label:"Name",children:t("business_owner_name",{initialValue:null,rules:[{required:!0,message:"Required"}]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow",allowClear:!0}))}),(0,E.jsx)(hs.Z.Item,{label:"Email",children:t("business_owner_email",{initialValue:null,rules:[{required:!0,message:"Required"}]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow",allowClear:!0,type:"email"}))})]})]})};function Dl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dl(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ll=hs.Z.create({name:"UpdateEmployeeManager"})((function(e){var t=e.manager,n=e.managerType,i=e.form,a=e.employee,s=e.updateEmployeeManager,l=e.companyAccessRole,o=e.loginMeta,c=e.managers,d=e.managersLoading,u=e.managersFetched,m=e.getCompanyManagers,p=e.owners,x=e.ownersLoading,h=e.ownersFetched,f=e.getCompanyOwners,v=(0,za.Z)("(max-width: 767px)"),b=(0,r.useState)(null),w=b[0],k=b[1],N=i.resetFields,C=i.getFieldDecorator,O=i.validateFieldsAndScroll,S=i.setFieldsValue,z=(0,r.useState)(null),P=z[0],D=z[1],F=null;o&&o.company&&(F=o.company.company_id);var L=function(){k(null),N(),D(null)},A=(0,r.useMemo)((function(){return"".concat(t?"Update":"Add"," \n ").concat("hiring_manager"===n?"Hiring Manager":"Business Owner")}),[t,n]);(0,r.useEffect)((function(){F&&"form"===w&&("hiring_manager"===n?m({company_id:F}):f({company_id:F}))}),[u,F,h,w]);return"manager"===l?(0,E.jsx)("div",{children:!t&&(0,E.jsx)("span",{className:"text-italics ml-8 text-weight-normal text-color-dark-grey-light r-text-size-14",children:"- not assigned"})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"cursor-pointer text-color-blue ml-8 text-weight-500",onClick:function(){return k("form")},children:t?"Edit":"Add"}),"form"===w&&(0,E.jsx)(y.Z,{visible:"form"===w,setVisible:L,centered:!0,footer:null,bodyStyle:{width:v?"100%":"600px",padding:"30px"},width:600,children:(0,E.jsx)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),O((function(e,t){if(e)null!==e&&void 0!==e&&e.email&&g.Z.error("Please enter an email");else{var r={relation:n};"hiring_manager"===n?r.email=t.hiring_manager_email:(r.email=t.business_owner_email,r.name=t.business_owner_name);var i={employee_id:a.uuid,clustering_company_id:a.clustering_company_id,managers:[Fl({},r)]};s(Fl({},i),{onSuccess:function(){var e,r,i="hiring_manager"===n?t.hiring_manager_email:t.business_owner_email,s="hiring_manager"===n?"Hiring Manager":"Business Owner";g.Z.success("".concat(i," added as ").concat(s," for ").concat(null===a||void 0===a||null===(e=a.profile)||void 0===e?void 0:e.first_name," ").concat(null===a||void 0===a||null===(r=a.profile)||void 0===r?void 0:r.last_name)),N()},onFail:function(e){return g.Z.error(e)}})}}))},colon:!1,children:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-lineHeight",children:(0,E.jsxs)(_.Z,{gutter:[24,24],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500",children:A})}),"hiring_manager"===n?(0,E.jsx)(El,{getFieldDecorator:C,resetFields:N,hiringManager:t,managerOptions:c,managerOptionsLoading:!u||d,editType:P,setEditType:D,viewModal:w}):(0,E.jsx)(Pl,{getFieldDecorator:C,setFieldsValue:S,resetFields:N,businessOwner:t,ownerOptions:p,ownerOptionsLoading:!h||x,editType:P,setEditType:D,viewModal:w}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex ".concat(v?"justify-content-between":"justify-content-end"),children:[(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 border-color-grey mr-20 round-8",type:"primary",ghost:!0,style:{padding:v?"0 16px":"0 24px"},onClick:L,children:"Cancel"}),(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 round-8",type:"primary",block:v,style:{minWidth:"180px",padding:v?"0 16px":"0 24px"},htmlType:"submit",children:A})]})})]})})})})]})})),Al=(0,i.$j)((function(e){return{companyAccessRole:e.auth.companyAccessRole,loginMeta:e.auth.auth.login_meta,managers:e.employ.managers,managersLoading:e.employ.managersLoading,managersFetched:e.employ.managersFetched,owners:e.employ.owners,ownersLoading:e.employ.ownersLoading,ownersFetched:e.employ.ownersFetched}}),(function(e){return{updateEmployeeManager:function(t,n){return e(w.Lrx(t,n))},getCompanyManagers:function(t,n){return e(w.Huh(t,n))},getCompanyOwners:function(t,n){return e(w.Flp(t,n))}}}))(Ll),Il=["rgba(142, 213, 172, 0.6)","#FFDCEC","rgba(255, 119, 79, 0.25)","rgb(255, 209, 131, 0.75)","#DCE2F9","#8ED5AC","#E0D1FA"],Ml={active:"#1DAC59",offer_created:"",offer_sent:"#FF9E4F",offer_signed:"#FF9E4F",ended:"#7C7F88",draft:"",offer_void:"#7C7F88",deleted:"#7C7F88",offer_editing:"#FF9E4F"},Rl=function(e){var t=e.status,n=void 0===t?"draft":t,r=e.firstName,i=e.lastName;return(0,E.jsx)(m.Z,{className:"mr-12 employee_status",color:Ml[n],children:(0,E.jsxs)(ys.Z,{size:48,style:{color:"#252939",textTransform:"uppercase",backgroundColor:Il[Math.floor(Math.random()*Il.length)]},className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:[r,i]})})},Tl=(0,r.memo)(Rl);function ql(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?ql(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ql(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vl=function(e){var t,n,r,i,a,s,l,o,c=e.employee,d=c.profile,u=c.profile.emergency_contact,m=[{title:"DATE",key:"created_at",width:"50%",render:function(e){return(0,Y.xz)(new Date(e.created_at))}},{title:"DESCRIPTION",key:"message",width:"50%",render:function(e){return e.message}}];return(0,E.jsxs)("div",{children:[(0,E.jsxs)(_.Z,{gutter:[20,20],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"",children:[(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light mb-4",children:"Personal details"}),(0,E.jsxs)("div",{className:"d-flex p-12 border border-width-1 border-color-grey border-radius-8",children:[(0,E.jsx)(Tl,{firstName:null===c||void 0===c||null===(t=c.profile)||void 0===t?void 0:t.first_name[0],lastName:null===c||void 0===c||null===(n=c.profile)||void 0===n?void 0:n.last_name[0]}),(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"text-weight-500 text-color-dark-grey-dark mb-4",children:[null===c||void 0===c||null===(r=c.profile)||void 0===r?void 0:r.first_name," ",null===c||void 0===c||null===(i=c.profile)||void 0===i?void 0:i.last_name]}),(0,E.jsxs)("div",{className:"text-size-14 text-color-dark-grey-dark mb-4",children:[" ",(null===d||void 0===d||null===(a=d.auth_user)||void 0===a?void 0:a.email)||"--"]}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light",children:d.phone_number||"--"}),(0,E.jsxs)("div",{className:"d-flex text-size-14",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between flex-column text-color-dark-grey-light",children:[(0,E.jsx)("div",{children:"Gender:"}),(0,E.jsx)("div",{children:"Blood group:"}),(0,E.jsx)("div",{children:"Date of joining:"})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between flex-column ml-20 text-weight-500 text-color-dark-grey-dark",children:[(0,E.jsx)("div",{children:null!==c&&void 0!==c&&null!==(s=c.profile)&&void 0!==s&&s.gender?null===d||void 0===d?void 0:d.gender:"--"}),(0,E.jsxs)("div",{children:[" ",d.blood_group?_l.r.find((function(e){return e.value===d.blood_group})).label:"--"]}),(0,E.jsx)("div",{children:is()(c.joining_date).utc().format("MMM DD, YYYY")})]})]})]})]})]})}),u&&u.name&&(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"",children:[(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light mb-4",children:"Emergency Contact"}),(0,E.jsxs)("div",{className:"d-flex p-12 border border-width-1 border-color-grey border-radius-8",children:[(0,E.jsx)(Tl,{firstName:null===u||void 0===u?void 0:u.name[0]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark mb-2 text-size-18",children:(null===u||void 0===u?void 0:u.name)||"--"}),(0,E.jsxs)("div",{className:"d-flex text-size-14",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between flex-column text-color-dark-grey-light",children:[(0,E.jsx)("div",{children:"Email:"}),(0,E.jsx)("div",{children:"Phone:"})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between flex-column ml-20 text-weight-500 text-color-dark-grey-dark",children:[(0,E.jsx)("div",{children:u.email||"--"}),(0,E.jsxs)("div",{children:[" ",u.country_code&&u.phone_number?"".concat(u.country_code).concat(u.phone_number):"--"]})]})]})]})]})]})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"",children:[(0,E.jsxs)("div",{className:"d-flex text-size-16 text-color-dark-grey-light mb-4",children:[(0,E.jsx)("div",{children:"Hiring Manager"}),(0,E.jsx)(Al,{employee:c,manager:null===c||void 0===c||null===(l=c.managers)||void 0===l?void 0:l.hiring_manager,managerType:"hiring_manager"})]}),c.managers&&c.managers.hiring_manager&&(0,E.jsxs)("div",{className:"d-flex p-12 border border-width-1 border-color-grey border-radius-8",children:[(0,E.jsx)(Tl,{firstName:c.managers&&c.managers.hiring_manager&&c.managers.hiring_manager.name[0]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark mb-2 text-size-18",children:c.managers&&c.managers.hiring_manager&&c.managers.hiring_manager.name||"--"}),(0,E.jsxs)("div",{className:"text-size-14 text-color-dark-grey-dark ",children:[" ",c.managers&&c.managers.hiring_manager&&c.managers.hiring_manager.email||"--"]})]})]})]})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"d-flex text-size-16 text-color-dark-grey-light mb-4",children:[(0,E.jsx)("div",{children:"Business Owner"}),(0,E.jsx)(Al,{employee:c,manager:null===c||void 0===c||null===(o=c.managers)||void 0===o?void 0:o.business_owner,managerType:"business_owner"})]}),c.managers&&c.managers.business_owner&&(0,E.jsxs)("div",{className:"d-flex p-12 border border-width-1 border-color-grey border-radius-8",children:[(0,E.jsx)(Tl,{firstName:c.managers&&c.managers.business_owner&&c.managers.business_owner.name[0]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark mb-2 text-size-18",children:c.managers&&c.managers.business_owner&&c.managers.business_owner.name||"--"}),(0,E.jsxs)("div",{className:"text-size-14 text-color-dark-grey-dark ",children:[" ",c.managers&&c.managers.business_owner&&c.managers.business_owner.email||"--"]})]})]})]})}),"ended"===(null===c||void 0===c?void 0:c.employment_status)&&(null===c||void 0===c?void 0:c.leaving_date)&&(0,E.jsxs)(Z.Z,{xs:24,className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light mb-4",children:"Employment ended on"}),(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark mb-2 text-size-18 ml-16",children:is()(null===c||void 0===c?void 0:c.leaving_date).format("DD MMM, YYYY")})]})]}),c.timeline&&c.timeline.length>0?(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:"Timeline"}),(0,E.jsx)(Nl.Z,{className:"table-v2",columns:m,dataSource:c.timeline.map((function(e){return Bl(Bl({},e),{},{key:e.created_at})})),showHeader:!1,pagination:!1})]}):null,(0,E.jsx)(zl,{employee:c})]})},Yl=n(69166),Hl=n.n(Yl),Wl=function(e){var t=e.employee,n=(0,r.useState)([]),i=n[0],a=n[1];(0,r.useEffect)((function(){if("23366f32-2309-42b0-a7f2-c8ce62821ad0"===t.clustering_company_id){var e=["kw_offer_letter","offer_letter","employee_addendum_letter","payslip","appraisal_document"],n=[];
1null===t||void 0===t||t.documents.forEach((function(t){e.includes(t.doc_type)||n.push(t)})),a(n)}else a(t.documents||[])}),[t]);var s=function(e){return e.name};return t&&i&&i.length>0?(0,E.jsxs)("div",{className:"mb-12",children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:"Documents"}),(0,E.jsx)(_.Z,{type:"flex",gutter:[20,20],children:t&&i&&i.filter((function(e){return"allowance_claim_supporting_document"!==e.doc_type})).map((function(e){return function(e){return(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsxs)("div",{style:{border:"1px solid #D5DAEC",borderRadius:6},className:"d-flex align-items-center justify-content-between pt-20 pr-4 pb-20 pl-20",children:[(0,E.jsx)("div",{children:s(e)}),(0,E.jsx)(j.Z,{type:"link",className:"text-weight-500 text-color-blue",onClick:function(){return window.open(e.doc_url,"_blank")},children:"View Doc"})]})})}(e)}))})]}):(0,E.jsxs)("div",{className:"mb-12",children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:"Documents"}),(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},className:"mb-20",description:(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",children:"No documents found"})})]})};function Jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ul(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jl(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $l=function(e){var t=e.employee,n=(0,r.useState)(!1),i=(n[0],n[1]),a=(0,r.useState)(""),s=a[0],l=a[1],o=function(){var e=(0,tr.Z)(Qn().mark((function e(t){var n,r,a;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===t||void 0===t||!t.pdf_url){e.next=3;break}return window.open(null===t||void 0===t?void 0:t.pdf_url,"_blank").focus(),e.abrupt("return");case 3:return i(!0),l(null===t||void 0===t?void 0:t.uuid),e.prev=5,e.next=8,fetch("".concat((0,V.dN)(),"/payroll/payslip/download?uuid=").concat(null===t||void 0===t?void 0:t.uuid),{method:"GET",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"}});case 8:return n=e.sent,e.next=11,n.json();case 11:(r=e.sent)&&(console.log(r),window.open(null===r||void 0===r||null===(a=r.data)||void 0===a?void 0:a.payslip_url,"_blank").focus()),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(5),console.log(e.t0),g.Z.error("Some error occured while fetcing payslip. Please try again. Contact us if the issue persists.");case 19:return e.prev=19,i(!1),l(""),e.finish(19);case 23:case"end":return e.stop()}}),e,null,[[5,15,19,23]])})));return function(t){return e.apply(this,arguments)}}(),c=[{title:"DATE",key:"date",render:function(e){return is()(e.created_at).format("MMM DD, YYYY")}},{title:"DESCRIPTION",key:"name",render:function(e){return e.name}},{title:"AMOUNT",key:"amount",render:function(e){return e.amount}},{title:"PAYMENT STATUS",key:"payment_status",render:function(e){return"success"===e.payment_status?(0,E.jsx)("span",{style:{fontSize:"12px",color:"white",backgroundColor:"#1DAC59",padding:"2px 6px",borderRadius:6},children:"SUCCESSFUL"}):"failed"===e.payment_status?(0,E.jsx)("span",{style:{fontSize:"12px",color:"white",backgroundColor:"#FF774F",padding:"2px 6px",borderRadius:6},children:"FAILED"}):(0,E.jsx)("span",{style:{fontSize:"12px",color:"white",backgroundColor:"#3a3e4c",padding:"2px 6px",borderRadius:6},children:"PENDING"})}},{title:"PAYSLIP",key:"view",render:function(e){return(0,E.jsx)("a",{onClick:function(){o(e)},target:"_blank",className:"text-color-blue text-weight-500 cursor-pointer",children:s===(null===e||void 0===e?void 0:e.uuid)?(0,E.jsx)(d.Z,{type:"loading"}):"View"})}}];return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:"Payslips"}),t.payslips.length?(0,E.jsx)(Nl.Z,{className:"table-v2",dataSource:t.payslips.map((function(e){return Ul(Ul({},e),{},{key:e.data})})),columns:c,pagination:!1}):(0,E.jsx)("div",{className:"mt-32 text-center",children:(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",children:"No payslips found"}),className:"mb-20"})})]})}
1,Gl=n(92077),Kl=n.n(Gl),Ql=n(26588),Xl=function(e){var t=e.visible,n=e.setVisible,i=e.employeeId,a=e.currency,s=e.newSalary,l=e.effectiveFromMonth,o=e.effectiveFromYear,c=(0,r.useState)(null),d=c[0],u=c[1],m=(0,r.useState)(!1),p=m[0],x=m[1],h=(0,r.useRef)(),f=(0,r.useState)(null),v=f[0],j=f[1],b=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t,n,r;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),e.prev=1,t="employee_id=".concat(i,"&annual_base_pay=").concat(s,"¤cy=").concat(a,"&effective_from_month=").concat(l,"&effective_from_year=").concat(o),e.next=5,fetch("".concat((0,V.dN)(),"/payroll/employees/appraisal-letter/preview?").concat(t),{method:"GET",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"}});case 5:return n=e.sent,e.next=8,n.text();case 8:(r=e.sent)&&u(r),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),g.Z.error("Some error occured while fetcing appraisal letter. Please try again. Contact us if the issue persists.");case 15:return e.prev=15,x(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])})));return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)((function(){t&&(s?o&&l?b():(g.Z.error("Enter a valid date"),n(!1)):(g.Z.error("Enter the new salary"),n(!1)))}),[t,s,l,o]),(0,r.useLayoutEffect)((function(){if(t&&!p&&d&&h.current){var e=h.current.contentWindow.document;e.open(),e.write(d),e.close(),j(e.body.offsetHeight+32)}}),[t,p,d]),s&&o&&l?(0,E.jsx)(y.Z,{visible:t,width:800,footer:null,onCancel:function(){n(!1)},bodyStyle:{padding:"48px"},children:p?(0,E.jsx)(Ql.Z,{}):d?(0,E.jsx)("div",{className:"employ-portal-offer-letter-page",children:(0,E.jsx)("iframe",{ref:h,width:"100%",height:v,frameBorder:"0",scrolling:"no",src:"about:blank"})}):(0,E.jsx)("div",{children:"Unable fetch appraisal letter"})}):null},eo=n(80333),to=n(28929),no=function(e){var t=e.form,n=e.visible,i=e.setVisible,a=e.employee,s=e.addAppraisal,l=e.editAppraisal,o=e.selectedAppraisal,c=e.previousAppraisal,m=t.getFieldDecorator,p=t.getFieldValue,x=t.resetFields,h=a.remuneration,f=a.remuneration_history,v=(0,r.useState)("amount"),b=v[0],w=v[1],k=(0,r.useState)(null),O=k[0],S=k[1],z=(0,r.useState)(null),P=z[0],D=z[1],F=(0,r.useState)(null),A=F[0],I=F[1],M=(0,r.useState)(!1),R=M[0],T=M[1],B=(0,r.useState)(!1),V=B[0],H=B[1],W=function(){i(!1),w("amount"),S(null),D(null),x(),I(null)},J=(0,r.useMemo)((function(){return c?c.annual_base_pay:h.annual_base_pay}),[h,f,c,n]);(0,r.useEffect)((function(){if(n&&J&&o){var e=o.annual_base_pay-J;S(e),I(is()(o.active_from))}}),[J,o,n]);var U=(0,r.useMemo)((function(){var e=is()().year();return 11===is()().month()&&(e+=1),Array(3).fill().map((function(t,n){return e+n}))}),[]);(0,r.useEffect)((function(){if("amount"===b&&O){var e=O/J*100;D(e?Kl()(e).format("0.00"):null)}else if("percentage"===b&&P){var t=P*J/100;S(t?Kl()(t).format("0.00"):null)}else S(null),D(null)}),[b,O,P]);var $=(0,r.useMemo)((function(){if(J&&O)return J+parseFloat(O)}),[J,O]),G=function(){var e=(0,tr.Z)(Qn().mark((function e(n){return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.preventDefault(),t.validateFieldsAndScroll((function(e,t){if(K)g.Z.error("Please enter a valid date");else if(O){if(!e){var n={employee_id:a.uuid,new_annual_base_pay:$,effective_from_month:t.effective_from_month,effective_from_year:t.effective_from_year};T(!0),o&&c?(n.employee_remuneration_id=o.uuid,l(n,{onSuccess:function(){g.Z.success("Appraisal successfully updated."),W(),T(!1)},onFail:function(e){g.Z.error(e),T(!1)}})):s(n,{onSuccess:function(){g.Z.success("Appraisal successfully added."),W(),T(!1)},onFail:function(e){g.Z.error(e),T(!1)}})}}else g.Z.error("Please enter appraisal amount")}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K=(0,r.useMemo)((function(){if(A){var e=is()(h.active_from);if(e>A)return"Appraisal already exists starting ".concat(e.format("MMMM"));if(is()()>A)return"staging"===to.env||"development"===to.env||parseInt(is()().format("DD"))<=25&&is()().format("MM YYYY")===A.format("MM YYYY")?null:"Pick a future date"}return null}),[A]);
1return(0,E.jsx)(y.Z,{visible:n,onCancel:W,footer:null,centered:!0,width:600,bodyStyle:{padding:"30px"},children:(0,E.jsx)("div",{children:(0,E.jsx)(hs.Z,{className:"custom-form",onSubmit:G,children:(0,E.jsxs)(_.Z,{gutter:[24,24],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark",children:"Add Appraisal"})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(q.ZP.Group,{className:"radio-block-18",defaultValue:b,onChange:function(e){return w(e.target.value)},children:(0,E.jsxs)(_.Z,{gutter:16,children:[(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(q.ZP,{className:"w-100",value:"percentage",children:"Percentage"})}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(q.ZP,{className:"w-100",value:"amount",children:"Amount"})})]})})}),(0,E.jsx)(Z.Z,{xs:24,children:"amount"===b?(0,E.jsx)(hs.Z.Item,{label:"Enter the amount you would like to add",children:(0,E.jsx)(C.Z,{className:"input-size-48 input-wrapper-bg-grey",addonAfter:(0,E.jsxs)("span",{className:"text-size-16 text-color-green",children:[P?"+".concat(P):"-","%"]}),value:O,onChange:function(e){return S(parseFloat(e.target.value))}})}):(0,E.jsx)(hs.Z.Item,{label:"Enter the percentage you would like to add",children:(0,E.jsx)(C.Z,{className:"input-size-48 input-wrapper-bg-grey",addonAfter:(0,E.jsx)("span",{className:"text-size-16 text-color-green",children:O?"+".concat(Kl()(O).format("0,0.00")):"-"}),value:P,onChange:function(e){return D(parseFloat(e.target.value))}})})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)(_.Z,{gutter:16,children:[(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsxs)("div",{className:"text-lineHeight",children:[(0,E.jsxs)("div",{className:"text-color-dark-grey-light text-size-16",children:["Current Total Salary",(0,E.jsx)(u.Z,{title:"Current Salary + One-time Retention Bonus (if any)",children:(0,E.jsx)(d.Z,{component:eo.r,className:"ml-4"})})]}),(0,E.jsxs)("div",{className:"text-size-28 text-weight-500 text-color-dark-grey-dark",children:[Y.fD[h.currency]," ",Kl()(J).format("0,0.00")]}),(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16",children:"per year"})]})}),(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsxs)("div",{className:"text-lineHeight",children:[(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-16",children:"New Salary"}),(0,E.jsx)("div",{className:"text-size-28 text-weight-500 text-color-green",children:$?(0,E.jsxs)("span",{children:[Y.fD[h.currency]," ",Kl()($).format("0,0.00")]}):"--"}),(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16",children:"per year"})]})})]})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-item-center",children:[(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-weight-500",children:"Effective from"}),(0,E.jsxs)("div",{children:[(0,E.jsx)(j.Z,{className:"link-blue text-weight-500",type:"link",style:{padding:"0",height:"20px"},onClick:function(){return H(!0)},children:"View Letter"}),(0,E.jsx)(Xl,{visible:V,setVisible:H,employeeId:a.uuid,currency:h.currency,newSalary:$,effectiveFromMonth:p("effective_from_month"),effectiveFromYear:p("effective_from_year")})]})]}),(0,E.jsxs)(_.Z,{gutter:16,children:[(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{label:"",children:m("effective_from_month",{initialValue:A&&A.months()+1,rules:[]})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey",suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-24",component:L.r}),onChange:function(e){if(p("effective_from_year")){var t=is()([p("effective_from_year"),e-1,1]);I(t)}},children:Y.hM.map((function(e){return(0,E.jsx)(N.Z.Option,{value:e.value,children:e.label},e.key)}))}))})}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{label:"",children:m("effective_from_year",{initialValue:A&&A.year(),rules:[]})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey",suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-24",component:L.r}),onChange:function(e){if(p("effective_from_month")){var t=is()([e,p("effective_from_month")-1,1]);I(t)}},children:U.map((function(e){return(0,E.jsx)(N.Z.Option,{value:e,children:e},e)}))}))})})]}),K?(0,E.jsx)("div",{className:"text-size-16 text-color-red",children:K}):A?(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark",children:["This appraisal will be effective from"," ",A.format("MMM DD, YYYY")]}):null]}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end desktop",children:[(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 border-radius-6 border-color-grey mr-16",style:{padding:"0 36px"},type:"primary",ghost:!0,onClick:W,children:"Cancel"}),(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 border-radius-6",style:{padding:"0 36px"},type:"primary",htmlType:"submit",loading:R,children:"Confirm Appraisal"})]})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:" mobile",children:[(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 border-radius-6 mb-8",style:{padding:"0 36px"},type:"primary",htmlType:"submit",loading:R,block:!0,children:"Confirm Appraisal"}),(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16 text-weight-500 border-radius-6 border-color-grey mr-16",style:{padding:"0 36px"},type:"primary",ghost:!0,onClick:W,block:!0,children:"Cancel"})]})})]})})})})};no.defaultProps={selectedAppraisal:null};var ro=hs.Z.create({name:"Appraisal"}
1)(no),io=(0,i.$j)(null,(function(e){return{addAppraisal:function(t,n){return e(w.XSL(t,n))},editAppraisal:function(t,n){return e(w.FLI(t,n))}}}))(ro),ao=n(50214);function so(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var lo=function(){var e=is()().format("MMMM");return"Please pay the invoice for this payment before the 25th of this month to ensure payout happens with ".concat(e,"'s payroll.")},oo=function(){var e=is()().add(1,"Months").format("MMMM");return"Please pay the invoice for this payment before the 25th of ".concat(e," to ensure payout happens with ").concat(e,"'s payroll.")};var co=hs.Z.create({name:"OneTimePayment"})((function(e){var t=e.form,n=e.currency,a=e.employeeID,s=(0,i.I0)(),l=(0,i.v9)((function(e){return e.taxonomy.currencyRatesFetched})),o=((0,i.v9)((function(e){return e.taxonomy.currencyRates})),t.getFieldDecorator),c=(t.getFieldValue,t.resetFields,t.setFieldsValue),d=(0,r.useState)(!1),u=d[0],m=d[1],p=(0,r.useState)(!1),x=p[0],f=p[1],v=function(){m(!1)};(0,r.useEffect)((function(){l||s((0,w.KHA)())}),[l]);var b=function(e,t){f(!0),(0,V.F3)("payroll/employees/add-bonus?employee_id=".concat(t),e).then((function(e){g.Z.success("Invoice Generated. Please navigate to invoices page."),v(),f(!1)})).catch((function(e){g.Z.error(e),f(!1)}))};return(0,E.jsxs)("div",{children:[(0,E.jsx)(j.Z,{className:"btn-size-l border-color-grey text-weight-500 border-radius-6",type:"primary",ghost:!0,style:{padding:"0 24px"},onClick:function(){m(!0)},children:"Add ad-hoc payment"}),(0,E.jsx)(y.Z,{visible:u,onCancel:v,footer:null,centered:!0,width:600,bodyStyle:{padding:"30px"},destroyOnClose:!0,children:(0,E.jsx)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),t.validateFieldsAndScroll((function(e,t){if(!e){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?so(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):so(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t);b(n,a)}}))},children:(0,E.jsxs)(_.Z,{gutter:[24,24],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark",children:"Add ad-hoc payment"})}),(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsx)(hs.Z.Item,{label:"Currency",children:o("currency",{rules:[{required:!0}],initialValue:n})((0,E.jsx)(ao.Z,{className:"select-size-48 select-bg-grey border-0 inner-shadow border-0 round-6 ",handleCurrencyChange:function(e){c({currency:e})}}))})}),(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsx)(hs.Z.Item,{label:"Amount",children:o("amount",{rules:[{required:!0}]})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey inner-shadow",inputmode:"numeric",parser:function(e){return(0,Y.jQ)(e),e.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"")}}))})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Description",children:o("description",{rules:[{required:!0}]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow"}))}),(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:"An invoice will be generated for this payment."}),(0,E.jsx)("div",{className:"mt-16 text-size-14-16 text-color-dark-grey-dark p-12 background-yellow-lighter border-1 border-color-yellow border-radius-6",children:is()().format("DD")<26?lo():oo()})]}),(0,E.jsxs)(Z.Z,{xs:24,className:"d-flex justify-content-end desktop",children:[(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-size-16 text-weight-500 border-radius-8 border-color-grey mr-12",style:{padding:"0 60px"},onClick:v,ghost:!0,children:"Cancel"}),(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-size-16 text-weight-500 border-radius-8 ",style:{padding:"0 60px"},htmlType:"submit",loading:x,children:"Pay"})]}),(0,E.jsxs)(Z.Z,{xs:24,className:" mobile",children:[(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-size-16 text-weight-500 border-radius-8 mb-8",style:{padding:"0 60px"},htmlType:"submit",block:!0,loading:x,children:"Pay"}),(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-size-16 text-weight-500 border-radius-8 border-color-grey mr-12",style:{padding:"0 60px"},onClick:v,block:!0,ghost:!0,children:"Cancel"})]})]})})})]})})),uo=co,mo=function(e){var t=e.employee,n=t.remuneration,i=t.remuneration_history,a=n.currency,s=n.annual_base_pay,l=n.joining_bonus,o=n.retention_bonus,c=n.variable_pay,d=((0,Y.x6)((s/12).toFixed(2)),(0,r.useState)(!1)),u=d[0],m=d[1],p=(0,r.useState)(null),x=p[0],h=p[1],f=(0,r.useState)(null),g=f[0],y=f[1],v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=is()(),r=is()(e.active_from),a=i.length>1&&(n.month()===r.month()&&n.year()===r.year()&&n.date()<25||n<r);return(0,E.jsx)("div",{className:"ml-36 mb-4",children:(0,E.jsxs)(j.Z,{className:"btn-size-l border-color-grey text-weight-500 border-radius-6",type:"primary",ghost:!0,style:{padding:"0 24px"},onClick:function(){m(!0),a?(h(e),t&&y(t)):y(e)},children:[a?"Edit":"Add"," Appraisal"]})})};return(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",align:"top",gutter:[24,24],children:[i&&i.length>0&&i.map((function(e,n){return(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsxs)("div",{className:"d-flex align-items-end",children:[(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"text-color-dark-grey-light",children:[is()(e.active_from).format("MMM DD, YYYY")," ",e.active_till?" - ".concat(is()(e.active_till).format("MMM DD, YYYY")):"onwards"]}),(0,E.jsxs)("div",{className:"d-flex align-items-end flex-wrap",children:[(0,E.jsxs)("div",{className:"mr-8 text-size-28 text-weight-500",children:[Y.fD[e.currency]," ",(0,Y.x6)(e.annual_base_pay)]}),(0,E.jsx)("div",{className:"mb-4",children:"per year"})]})]}),0==n&&v(e,i[n+1])]}),0==n&&(0,E.jsx)(io,{visible:u,setVisible:m,employee:t,selectedAppraisal:x,previousAppraisal:g})]},n)})),(0,E.jsxs)(Z.Z,{xs:12,children:[(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:"Joining Bonu
1s"}),(0,E.jsx)("div",{className:"text-size-28 text-weight-500",children:l?"".concat(Y.fD[a]," ").concat((0,Y.x6)(l)):"-"}),l?(0,E.jsxs)("div",{className:"text-color-dark-grey-light text-size-14",children:["Payout Date:"," ",is()(n.joining_bonus_payout_date).format("MMM DD, YYYY")]}):null]}),(0,E.jsxs)(Z.Z,{xs:12,children:[(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:"Variable Pay"}),(0,E.jsx)("div",{className:"text-size-28 text-weight-500",children:c?"".concat(Y.fD[a]," ").concat((0,Y.x6)(c)):"-"})]}),(0,E.jsxs)(Z.Z,{xs:12,children:[(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:"One-Time Retention Bonus"}),(0,E.jsx)("div",{className:"text-size-28 text-weight-500",children:o?"".concat(Y.fD[a]," ").concat((0,Y.x6)(o)):"-"}),o?(0,E.jsxs)("div",{className:"text-color-dark-grey-light text-size-14",children:["Payout Date:"," ",is()(n.retention_bonus_payout_date).format("MMM DD, YYYY")]}):null]}),"active"===(null===t||void 0===t?void 0:t.employment_status)&&(0,E.jsx)(uo,{currency:a,employeeID:null===t||void 0===t?void 0:t.uuid})]})})},po=n(32832),xo=function(e){var t,n,r,i,a,s,l=e.employee,o=[{title:"START DATE",key:"startDate",render:function(e){return is()(e.start_date).utc().format("MMM DD, YYYY")}},{title:"END DATE",key:"endDate",render:function(e){return is()(e.end_date).utc().format("MMM DD, YYYY")}},{title:"NO. OF DAYS",key:"count",render:function(e){return e.leaves_count},className:"dfg"},{title:"TYPE",key:"type",render:function(e){return e.type}},{title:"DESCRIPTION",key:"description",render:function(e){return e.description}},{title:"STATUS",key:"status",render:function(e){return(0,E.jsx)("span",{className:"".concat("approved"===e.status?"text-color-green-dark":"declined"===e.status?"text-color-orange":""),style:{textTransform:"uppercase"},children:e.status})}}],c=null===l||void 0===l?void 0:l.leaves,u=function(e,t){var n=null===e||void 0===e?void 0:e.filter((function(e){return e.type===t}));return null!==n&&void 0!==n&&n.length?(0,E.jsx)(Nl.Z,{className:"table-v2",dataSource:n,columns:o,pagination:{pageSize:6,hideOnSinglePage:!0}}):(0,E.jsx)("div",{className:"mt-32 text-center",children:(0,E.jsx)(Wa.Z,{description:(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",children:"No leave record found"}),className:"mb-20"})})};return(0,E.jsxs)("div",{className:"employee-leave",children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:"Leaves"}),(0,E.jsxs)("div",{className:"d-flex flex-column mb-20 mt-20 leave-details-wrapper",children:[(0,E.jsxs)("div",{className:"text-color-dark-light text-size-16 line-height-20 mb-8 ",children:[null===l||void 0===l||null===(t=l.profile)||void 0===t?void 0:t.first_name,"'s Leaves so far"]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between desktop box-gap",children:[c.total_earned_leaves_allotted_count>-1&&(0,E.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,E.jsxs)("div",{className:"d-flex flex-column",children:[(0,E.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Earned so far"}),(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-size-20-24 line-height-32 text-weight-500",children:null===c||void 0===c?void 0:c.leaves_earned_count}),(0,E.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})}),(0,E.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,E.jsxs)("div",{className:"d-flex flex-column",children:[(0,E.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Taken"}),(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-size-20-24 line-height-32 text-weight-500",children:null===c||void 0===c?void 0:c.earned_leaves_taken_count}),(0,E.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})}),c.total_earned_leaves_allotted_count>-1&&(0,E.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,E.jsxs)("div",{className:"d-flex flex-column",children:[(0,E.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Remaining"}),(0,E.jsxs)("span",{className:" text-size-20-24 line-height-32 text-weight-500 ".concat((null===c||void 0===c?void 0:c.current_balance_count)<0?"text-color-orange":"text-color-dark-grey-dark"),children:[null===c||void 0===c?void 0:c.current_balance_count,(null===c||void 0===c?void 0:c.current_balance_count)<0&&(0,E.jsx)(d.Z,{component:po.r,className:"icon-size-24 ml-4"})]}),(0,E.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Days"})]})}),(0,E.jsx)("div",{className:"d-flex align-items-center leave-count-box",children:(0,E.jsxs)("div",{className:"d-flex flex-column",children:[(0,E.jsx)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:"Last PTO Taken"}),(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-size-20-24 line-height-32 text-weight-500",children:null!==c&&void 0!==c&&c.leave_last_taken?null===c||void 0===c?void 0:c.leave_last_taken:"-"}),(0,E.jsxs)("span",{className:"text-color-dark-grey-light text-size-12-14 line-height-16",children:[(null===c||void 0===c?void 0:c.leave_last_taken)<2?"Day":"Days"," ago"]})]})})]})]}),(0,E.jsxs)(ja.Z,{defaultActiveKey:"1",size:"small",className:"employee-leave-details-tabs custom-tabs-with-arrow",animated:!1,children:[(0,E.jsx)(ja.Z.TabPane,{tab:"Paid",children:u(null===l||void 0===l||null===(n=l.leaves)||void 0===n?void 0:n.log,"paid")},"paid"),(0,E.jsx)(ja.Z.TabPane,{tab:"Sick",children:u(null===l||void 0===l||null===(r=l.leaves)||void 0===r?void 0:r.log,"sick")},"sick"),(0,E.jsx)(ja.Z.TabPane,{tab:"Floater",children:u(null===l||void 0===l||null===(i=l.leaves)||void 0===i?void 0:i.log,"floaters")},"floaters"),(0,E.jsx)(ja.Z.TabPane,{tab:"Maternity",children:u(null===l||void 0===l||null===(a=l.leaves)||void 0===a?void 0:a.log,"maternity")},"maternity"),(0,E.jsx)(ja.Z.TabPane,{tab:"Paternity",children:u(null===l||void 0===l||null===(s=l.leaves)||void 0===s?void 0:s.log,"paternity")},"paternity")]})]})},ho=n(25290),fo=n(1079),go=n(28280),yo=function(e){var t=e.employee,n=[{title:"NAME",key:"name",render:function(e){return e.asset.name}},{title:"PRICE",key:"price",render:function(e){return"".concat(e.asset.currency," ").concat(e.asset.mrp)}},{title:"",key:"purchase_url",align:"right",render:function(e){return(0,E.jsx)(j.Z,{type:"link",className:"text-weight-500 text-color-blue",onClick:function(){return window.open(e.asset.purchase_url,"_blank")},children:"View"})}}];return t&&t.assets&&t.assets.length>0?(0,E.jsxs)("div",{className:"mb-20",children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:"Assets"}),(0,E.jsx)(Nl.Z,{className:"table-v2",columns:n,dataSource:t.assets,pagination:!1})]}):(0,E.jsxs)("div",{className:"mb-12",children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:"Assets"}),(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-italics text-size-16",children:"No assets found"})})]})},vo=n(20070),jo=n(65137);function bo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?bo(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ko={active:"active",offer_created:"offer created",offer_sent:"offer sent",offer_signed:"offer signed",ended:"inactive",draft:"draft",offer_void:"offer void",deleted:"deleted",offer_editing:"offer editing"},No=[ko.offer_created,ko.offer_sent,ko.offer_signed,ko.offer_editing,ko.draft],_o=[ko.offer_created,ko.offer_sent,ko.offer_signed,ko.offer_editing,ko.draft],Zo=[ko.offer_signed,ko.offer_sent,ko.offer_editing],Co=function(e){var t=e.employee,n=e.columns,i=e.getEmployeeById,a=e.setShowNewHire,s=e.updateNewEmployee,l=e.loginMeta,o=e.getEmployeeList,u=(0,r.useState)(!1),m=u[0],p=u[1],x=(0,r.useState)(!1),h=x[0],f=x[1],b=(0,r.useState)(!1),w=(b[0],b[1],(0,r.useState)("")),k=w[0],N=w[1],C=ko[t.employment_status],O=null;l&&l.company&&(O=l.company.company_id);var S=(0,E.jsx)(c.Z,{className:"company-portal-aside-menu",onClick:function(e){y.Z.confirm({title:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark text-size-24 mb-8",children:"You are about to make this Offer void"}),(0,E.jsx)("div",{className:"text-weight-400 text-size-16 text-color-dark-grey-light mb-72",children:"Please confirm to proceed."})]}),className:"",okText:"Make Offer Void",okType:"danger",okButtonProps:{className:"btn-size-l text-weight-500 text-size-16 text-color-orange",style:{height:"3rem",width:"180px",backgroundColor:"rgba(255,119,79,0.25)"}},cancelText:"Go Back",cancelButtonProps:{className:"text-color-blue text-weight-500 border-radius-6 border-color-grey",style:{height:"3rem",width:"140px"}},centered:!0,onOk:function(){z("offer_void")},onCancel:function(){},width:488})},children:(0,E.jsx)(c.Z.Item,{className:"text-size-16",children:"Offer Void"},"offer_void")}),z=function(){var e=(0,tr.Z)(Qn().mark((function e(n){var r,i;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r={employee_id:t.uuid,status:n},e.next=4,fetch("".concat((0,V.dN)(),"/payroll/employees/update-employee-status"),{method:"POST",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"},body:JSON.stringify(wo({},r))}).then((function(e){return e.text()}));case 4:(i=e.sent)&&(g.Z.success(i),o({companyId:O})),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),P=function(e){e.stopPropagation(),y.Z.confirm({title:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark text-size-24 mb-8",children:"You are about to delete this Offer"}),(0,E.jsx)("div",{className:"text-weight-400 text-size-16 text-color-dark-grey-light mb-72",children:"Please confirm to proceed."})]}),className:"",okText:"Delete Offer",okType:"danger",okButtonProps:{className:"btn-size-l text-weight-500 text-size-16 text-color-orange",style:{height:"3rem",width:"180px",backgroundColor:"rgba(255,119,79,0.25)"}},cancelText:"Go Back",cancelButtonProps:{className:"text-color-blue text-weight-500 border-radius-6 border-color-grey",style:{height:"3rem",width:"140px"}},centered:!0,onOk:function(){z("deleted")},onCancel:function(){},width:488})},D=function(e){var n,r;if("name"===e)return(0,E.jsxs)("div",{className:"d-flex align-items-center employee_status",children:[(0,E.jsx)(Tl,{status:t.employment_status,firstName:null===t||void 0===t||null===(n=t.profile)||void 0===n?void 0:n.first_name[0],lastName:null===t||void 0===t||null===(r=t.profile)||void 0===r?void 0:r.last_name[0]}),(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"text-weight-500 mb-2",children:[t.profile.first_name," ",t.profile.last_name," ","draft"===C?"[Draft]":null]}),(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:t.job_title})]})]});if("start_date"===e)return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500",children:is()(t.joining_date).utc().format("MMM DD, YYYY")}),(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:t.profile.tax_residence_country?(0,E.jsx)("div",{children:t.profile.tax_residence_country.name}):null})]});if("leaving_date"===e&&t.leaving_date&&"active"===t.employment_status)return(0,E.jsxs)("div",{className:"",style:{border:"1px solid #ffdda2",textAlign:"center",borderRadius:"6px",backgroundColor:"#ffdda2"},children:[(0,E.jsx)("div",{className:"text-weight-500",children:is()(t.leaving_date).utc().format("MMM DD, YYYY")}),(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:"Last Working Day"})]});if("status"===e){var l={borderRadius:6,padding:"2px 7px",display:"inline",textTransform:"uppercase"};if("active"===C)return(0,E.jsx)("div",{className:"text-size-12",style:wo({backgroundColor:"#1DAC59",color:"white"},l),children:"ACTIVE"});if(No.indexOf(C)>-1)return(0,E.jsx)("div",{className:"text-size-12",style:wo({backgroundColor:"#FFBE4F"},l),children:C});if("inactive"===C)return(0,E.jsx)("div",{className:"text-size-12",style:wo({backgroundColor:"#FF774F",color:"white"},l),children:"INACTIVE"});if("offer void"===C)return(0,E.jsx)("div",{className:"text-size-12",style:wo({backgroundColor:"#FF774F",color:"white"},l),children:"OFFER VOID"})}if("edit"===e){var o=_o.indexOf(C)>-1,c=Zo.indexOf(C)>-1;return h?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 text-color-dark-grey-light"}):(0,E.jsxs)("div",{className:"d-flex justify-content-end align-items-center",children:[o&&(0,E.jsx)("div",{className:"pl-6 pr-6 pt-4 pb-4 mr-8 ".concat("draft"===C?"background-grey":"background-yellow-2 text-yellow-dark"," border-radius-8"),children:C}),o&&(0,E.jsx)(j.Z,{className:"btn-size-l text-size-16 text-weight-500 border-color-grey",ghost:!0,type:"primary",style:{padding:"0 24px"},onClick:function(e){e.stopPropagation(),o&&(t.allFetched?(s(t),a(!0)):(f(!0),i({employeeId:t.uuid,convertRemunerationCurrency:!0},{onSuccess:function(e){f(!1),s(e),a(!0)},onFail:function(){f(!1),g.Z.error("Some error occurred while fetching employee details.")}})))},children:"Edit"}),"draft"===C&&(0,E.jsx)("div",{className:"d-flex align-items-center justify-content-center border-width-1 ".concat("delete"===k?"border-color-blue":"border-color-grey"," round-6 ml-8"),style:{width:"40px"},onMouseEnter:function(){return N("delete")},onMouseLeave:function(){return N("")},onClick:P,children:(0,E.jsx)(d.Z,{className:"icon-size-24",component:"delete"===k?fo.r:go.r})}),c&&(0,E.jsx)(de.Z,{overlay:S,trigger:["click"],children:(0,E.jsx)("div",{className:"d-flex align-items-center justify-content-center border-width-1 ".concat("option"===k?"border-color-blue":"border-color-grey"," round-6 ml-8"),style:{width:"40px",height:"40px"},onMouseEnter:function(){return N("option")},onMouseLeave:function(){return N("")},onClick:function(e){e.stopPropagation()},children:(0,E.jsx)(d.Z,{className:"icon-size-24",component:ho.r})})})]})}return null};return(0,E.jsx)(v.Z,{className:"employee-list-collapse ".concat("draft"===(null===t||void 0===t?void 0:t.employment_status)?"draft":""),onChange:function(e){var n=e[0];!t.allFetched&&n&&(p(!0),i({employeeId:n},{onSuccess:function(){p(!1)},onFail:function(){p(!1)}}))},expandIcon:function(e){var t=e.isActive;return(0,E.jsx)(d.Z,{component:vo.r,className:"text-size-24 collapse-dropdown-arrow",rotate:t?-180:0})},expandIconPosition:"right",children:(0,E.jsx)(v.Z.Panel,{header:(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark",children:(0,E.jsx)(_.Z,{type:"flex",align:"middle",justify:"center",children:n.map((function(e,t){return(0,E.jsx)(Z.Z,{xs:e.space,children:D(e.key)},"".concat(e.name,"_").concat(t))}))})}),disabled:"draft"===(null===t||void 0===t?void 0:t.employment_status),showArrow:"active"===C||"inactive"===C,children:m?(0,E.jsxs)("div",{className:"text-center mb-20 mt-20",children:[(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 mr-8"}),(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-size-16",children:"Fetching details. Please wait..."})]}):(0,E.jsxs)(ja.Z,{defaultActiveKey:"1",size:"small",className:"employee-details-tabs custom-tabs-with-arrow",animated:!1,children:[(0,E.jsx)(ja.Z.TabPane,{tab:"Basic",children:(0,E.jsx)(Vl,{employee:t})},"basic"),"23366f32-2309-42b0-a7f2-c8ce62821ad0"!==O?(0,E.jsx)(ja.Z.TabPane,{tab:"Remuneration",children:(0,E.jsx)(mo,{employee:t})},"remuneration"):null,(0,E.jsx)(ja.Z.TabPane,{tab:"Payslips",children:(0,E.jsx)($l,{employee:t})},"payslips"),(0,E.jsx)(ja.Z.TabPane,{tab:(0,E.jsx)("div",{className:"d-flex flex-column position-relative",children:(0,E.jsx)("div",{children:"Leaves"})}),children:(0,E.jsx)(xo,{employee:t})},"leaves"),(0,E.jsx)(ja.Z.TabPane,{tab:"Allowance",children:(0,E.jsx)(jo.Z,{employee:t,type:"allowance"})},"allowance"),(0,E.jsx)(ja.Z.TabPane,{tab:"Reimbursement",children:(0,E.jsx)(jo.Z,{employee:t,type:"reimbursement"})},"reimbursement"),(0,E.jsx)(ja.Z.TabPane,{tab:"Documents",children:(0,E.jsx)(Wl,{employee:t})},"documents"),(0,E.jsx)(ja.Z.TabPane,{tab:"Assets",children:(0,E.jsx)(yo,{employee:t})},"assets")]})},t.uuid)})};Co.defaultProps={loginMeta:null};
1var Oo=(0,i.$j)((function(e){return{loginMeta:e.auth.auth.login_meta}}),(function(e){return{getEmployeeById:function(t,n){return e(w.KBR(t,n))},getEmployeeList:function(t,n){return e(w.Jbl(t,n))},updateNewEmployee:function(t){return e(w.hzs(t))}}}))(Co);function So(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?So(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):So(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Eo={active:"active",offer_created:"offer created",offer_sent:"offer sent",offer_signed:"offer signed",ended:"inactive",draft:"draft",offer_void:"offer void",deleted:"deleted"},Po=[Eo.offer_created,Eo.offer_sent,Eo.draft],Do=[Eo.offer_signed,Eo.offer_sent],Fo=function(e){var t=e.employee,n=(e.columns,e.getEmployeeById),i=e.setShowNewHire,a=e.updateNewEmployee,s=e.loginMeta,l=e.getEmployeeList,o=(0,r.useState)(!1),u=o[0],m=o[1],p=(0,r.useState)(!1),x=p[0],h=p[1],f=(0,r.useState)(!1),j=(f[0],f[1],(0,r.useState)("")),b=j[0],w=j[1],k=Eo[t.employment_status],N=null;s&&s.company&&(N=s.company.company_id);var _=function(){var e=Po.indexOf(k)>-1,r=Do.indexOf(k)>-1;return(0,E.jsxs)(c.Z,{className:"company-portal-aside-menu",onClick:function(e){console.log(e),"offer_void"===(null===e||void 0===e?void 0:e.key)&&y.Z.confirm({title:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark text-size-24 mb-8",children:"You are about to make this Offer void"}),(0,E.jsx)("div",{className:"text-weight-400 text-size-16 text-color-dark-grey-light mb-72",children:"Please confirm to proceed."})]}),className:"",okText:"Make Offer Void",okType:"danger",okButtonProps:{className:"btn-size-l text-weight-500 text-size-16 text-color-orange",style:{height:"3rem",width:"180px",backgroundColor:"rgba(255,119,79,0.25)"}},cancelText:"Go Back",cancelButtonProps:{className:"text-color-blue text-weight-500 border-radius-6 border-color-grey",style:{height:"3rem",width:"140px"}},centered:!0,onOk:function(){Z("offer_void")},onCancel:function(){},width:488}),"edit"===(null===e||void 0===e?void 0:e.key)&&(t.allFetched?(a(t),i(!0)):(h(!0),n({employeeId:t.uuid,convertRemunerationCurrency:!0},{onSuccess:function(e){h(!1),a(e),i(!0)},onFail:function(){h(!1),g.Z.error("Some error occurred while fetching employee details.")}}))),"delete"===(null===e||void 0===e?void 0:e.key)&&C()},children:[r&&(0,E.jsx)(c.Z.Item,{className:"text-size-16",children:"Offer Void"},"offer_void"),e&&(0,E.jsx)(c.Z.Item,{className:"text-size-16",children:"Edit"},"edit"),"draft"===k&&(0,E.jsx)(c.Z.Item,{className:"text-size-16",children:"Delete"},"delete")]})},Z=function(){var e=(0,tr.Z)(Qn().mark((function e(n){var r,i;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r={employee_id:t.uuid,status:n},e.next=4,fetch("".concat((0,V.dN)(),"/payroll/employees/update-employee-status"),{method:"POST",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"},body:JSON.stringify(zo({},r))}).then((function(e){return e.text()}));case 4:(i=e.sent)&&(g.Z.success(i),l({companyId:N})),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),C=function(e){y.Z.confirm({title:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark text-size-24 mb-8",children:"You are about to delete this Offer"}),(0,E.jsx)("div",{className:"text-weight-400 text-size-16 text-color-dark-grey-light mb-72",children:"Please confirm to proceed."})]}),className:"",okText:"Delete Offer",okType:"danger",okButtonProps:{className:"btn-size-l text-weight-500 text-size-16 text-color-orange",style:{height:"3rem",width:"180px",backgroundColor:"rgba(255,119,79,0.25)"}},cancelText:"Go Back",cancelButtonProps:{className:"text-color-blue text-weight-500 border-radius-6 border-color-grey",style:{height:"3rem",width:"140px"}},centered:!0,onOk:function(){Z("deleted")},onCancel:function(){},width:488})};return(0,E.jsx)(v.Z,{className:"employee-list-collapse employee-list-collapse--mobile ".concat("draft"===(null===t||void 0===t?void 0:t.employment_status)?"draft":""),onChange:function(e){var r=e[0];!t.allFetched&&r&&(m(!0),n({employeeId:r},{onSuccess:function(){m(!1)},onFail:function(){m(!1)}}))},expandIcon:function(e){var t=e.isActive;return(0,E.jsx)(d.Z,{component:vo.r,className:"text-size-24 collapse-dropdown-arrow",rotate:t?-180:0})},expandIconPosition:"right",children:(0,E.jsx)(v.Z.Panel,{header:(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark ".concat("draft"===k?"disabled":""),children:function(e){var n,r;return console.log(t),(0,E.jsxs)("div",{className:"d-flex align-items-center employee_status justify-content-between ",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(Tl,{status:t.employment_status,firstName:null===t||void 0===t||null===(n=t.profile)||void 0===n?void 0:n.first_name[0],lastName:null===t||void 0===t||null===(r=t.profile)||void 0===r?void 0:r.last_name[0]}),(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"text-weight-500 mb-2",children:[t.profile.first_name," ",t.profile.last_name," ","draft"===k?"[Draft]":null]}),(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:t.job_title})]})]}),x?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 text-color-dark-grey-light"}):"active"!==k&&"offer void"!==k&&"inactive"!==k&&(0,E.jsx)(de.Z,{overlay:_,trigger:["click"],children:(0,E.jsx)("div",{className:"d-flex align-items-center justify-content-center border-width-1 ".concat("option"===b?"border-color-blue":"border-color-grey"," round-6 ml-8"),style:{width:"40px",height:"40px"},onMouseEnter:function(){return w("option")},onMouseLeave:function(){return w("")},onClick:function(e){e.stopPropagation()},children:(0,E.jsx)(d.Z,{className:"icon-size-24",component:ho.r})})})]})}()}),showArrow:"active"===k||"inactive"===k,disabled:"draft"===(null===t||void 0===t?void 0:t.employment_status),children:u?(0,E.jsxs)("div",{className:"text-center mb-20 mt-20",children:[(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 mr-8"}),(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-size-16",children:"Fetching details. Please wait..."})]}):(0,E.jsxs)(ja.Z,{defaultActiveKey:"1",size:"small",className:"employee-details-tabs custom-tabs-with-arrow",animated:!1,children:[(0,E.jsx)(ja.Z.TabPane,{tab:"Basic",children:(0,E.jsx)(Vl,{employee:t})},"basic"),"23366f32-2309-42b0-a7f2-c8ce62821ad0"!==N?(0,E.jsx)(ja.Z.TabPane,{tab:"Remuneration",children:(0,E.jsx)(mo,{employee:t})},"remuneration"):null,(0,E.jsx)(ja.Z.TabPane,{tab:"Payslips",children:(0,E.jsx)($l,{employee:t})},"payslips"),(0,E.jsx)(ja.Z.TabPane,{tab:(0,E.jsx)("div",{className:"d-flex flex-column position-relative",children:(0,E.jsx)("div",{children:"Leaves"})}),children:(0,E.jsx)(xo,{employee:t})},"leaves"),(0,E.jsx)(ja.Z.TabPane,{tab:"Allowance",children:(0,E.jsx)(jo.Z,{employee:t,type:"allowance"})},"allowance"),(0,E.jsx)(ja.Z.TabPane,{tab:"Reimbursement",children:(0,E.jsx)(jo.Z,{employee:t,type:"reimbursement"})},"reimbursement"),(0,E.jsx)(ja.Z.TabPane,{tab:"Documents",children:(0,E.jsx)(Wl,{employee:t})},"documents"),(0,E.jsx)(ja.Z.TabPane,{tab:"Assets",children:(0,E.jsx)(yo,{employee:t})},"assets")]})},t.uuid)})};Fo.defaultProps={loginMeta:null};
1var Lo=(0,i.$j)((function(e){return{loginMeta:e.auth.auth.login_meta}}),(function(e){return{getEmployeeById:function(t,n){return e(w.KBR(t,n))},getEmployeeList:function(t,n){return e(w.Jbl(t,n))},updateNewEmployee:function(t){return e(w.hzs(t))}}}))(Fo),Ao=function(e){var t=e.columns,n=e.employeeList,r=e.setShowNewHire,i=(0,za.Z)("(max-width: 767px)");return(0,E.jsx)("div",{className:"mb-24",children:n.map((function(e){return i?(0,E.jsx)(Lo,{employee:e,columns:t,setShowNewHire:r},e.uuid):(0,E.jsx)(Oo,{employee:e,columns:t,setShowNewHire:r},e.uuid)}))})},Io=n(27220),Mo=n(42682),Ro=n(52601);function To(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?To(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):To(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bo=(0,i.$j)((function(e){return{newEmployee:e.employ.newEmployee,company:e.company.companyDetails}}),(function(e){return{createNewEmployee:function(t,n){return e(w.A8V(t,n))},updateEmployeeDocuments:function(t,n){return e(w.Zbz(t,n))}}}))((function(e){var t=e.step,n=e.setStep,i=e.newEmployee,a=(e.company,e.createNewEmployee),s=e.updateEmployeeDocuments,l=(0,za.Z)("(max-width: 767px)"),o=(0,r.useState)([]),c=o[0],u=o[1],m=(0,r.useState)(!1),p=m[0],x=m[1],h=(0,r.useState)(!1),y=h[0],v=h[1],b=(0,r.useState)(!1),w=b[0],k=b[1],N=(0,r.useState)(null),_=N[0],Z=N[1],C=(0,r.useState)(null),O=C[0],S=C[1],z=(0,r.useState)("default"),P=z[0],D=z[1],F=(0,r.useState)(null),L=F[0],A=F[1],I=function(){var e=(0,tr.Z)(Qn().mark((function e(t){var n,r,a;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),e.prev=1,n="preview=true&employee_id=".concat(i.uuid).concat("company"===t?"&type=company&view=".concat(P):""),e.next=5,fetch("".concat((0,V.dN)(),"/payroll/employees/offer-letter/preview?").concat(n),{method:"GET",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"}});case 5:return r=e.sent,e.next=8,r.text();case 8:a=e.sent,"company"===t?Z(a):S(a),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),g.Z.error("Some error occured while fetcing offer letter. Please try again. Contact us if the issue persists.");case 15:return e.prev=15,k(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])})));return function(t){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){p&&I("company")}),[p]),(0,r.useEffect)((function(){y&&I()}),[y]),(0,r.useEffect)((function(){if(i.documents){for(var e=[],t=0;t<i.documents.length;t+=1)e.push({action:"",payload:i.documents[t]});u(e)}}),[]),(0,r.useEffect)((function(){if(null!==c&&void 0!==c&&c.length){var e,t=c.find((function(e){return"offer_letter"===e.payload.doc_type}))||null;!0===(null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.is_custom_company_offer_letter)&&A(t)}}),[c]),(0,r.useEffect)((function(){L&&"delete"!==(null===L||void 0===L?void 0:L.action)?D("custom"):D("default")}),[L]);var M=function(){"default"===P?x(!0):L&&window.open(L.payload.doc_url,"_blank")},R=function(){s(c.filter((function(e){return""!==e.action})),{onSuccess:function(){var e=qo({},i),r=[];if(c)for(var s=0;s<c.length;s+=1)"delete"!==c.action&&r.push(c[s]);r.length&&(e.documents=r),e.leaving_date||delete e.leaving_date,e.assets&&delete e.assets,e.managers&&delete e.managers,"custom"===P?e.is_custom_company_offer_letter=!0:"default"===P&&(e.is_custom_company_offer_letter=!1),a(e,{onSuccess:function(){n(t+1)},onFail:function(e){g.Z.error(e.message)}})}})},T=function(e){var t=c.filter((function(t){return t.payload.doc_url!==e.doc_url}));e.uuid?u([].concat((0,f.Z)(t),[{action:"delete",payload:e}])):u(t)};return(0,r.useEffect)((function(){if("default"===P&&L)T(L.payload);else if("custom"===P&&L){var e=c.filter((function(e){return e.payload.doc_url!==L.payload.doc_url}));L.payload.uuid?u([].concat((0,f.Z)(e),[{action:"update",payload:L.payload}])):u([].concat((0,f.Z)(e),[{action:"create",payload:L.payload}]))}}),[P]),console.log("customCompanyOfferLetter",L),(0,E.jsxs)("div",{className:"add-new-employee__offer-letter-employee",children:[(0,E.jsxs)("div",{className:"mb-40",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 mb-8",children:"Offer Letter"}),(0,E.jsx)("div",{className:"text-color-dark-grey-light mb-16",children:"This is your standard offer letter with a welcome note for employees. Please specify 'kaamwork' as your employment and HR Partner in case of custom uploads"}),(0,E.jsxs)(q.ZP.Group,{style:{width:"100%"},value:P,className:"radio-size-18",onChange:function(e){D(e.target.value)},children:[(0,E.jsx)("div",{className:"dashboard-card mb-8 ".concat("custom"===P?"disabled":""),style:{padding:"16px 20px"},children:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",style:{height:"40px"},children:[(0,E.jsx)("div",{children:(0,E.jsx)(q.ZP,{value:"default",children:(0,E.jsx)("span",{className:"text-color-dark-grey-dark",children:"Use Kaamwork Format"})})}),"default"===P&&(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{type:"primary",ghost:!0,className:"text-weight-500 btn-size-l border-color-grey round-6",style:{padding:"0 32px"},onClick:M,children:"View"})})]})}),(0,E.jsx)("div",{className:"dashboard-card mb-8 ".concat("default"===P?"disabled":""),style:{padding:"16px 20px"},children:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",style:{height:"40px"},children:[(0,E.jsx)("div",{children:(0,E.jsx)(q.ZP,{value:"custom",children:(0,E.jsx)("span",{className:"text-color-dark-grey-dark",children:"Use my own Format"})})}),"custom"===P&&(0,E.jsxs)("div",{className:"d-flex",children:[L&&(0,E.jsx)(j.Z,{type:"primary",ghost:!0,className:"text-weight-500 btn-size-l border-color-grey round-6",style:{padding:"0 32px"},onClick:M,children:"View"}),(0,E.jsx)(Ro.Z,{folderPath:"".concat(i.uuid,"_employee"),customFileName:"offer_letter",btnClass:"btn-size-l border-radius-6 border-color-grey text-color-blue text-weight-500 ml-8",btnStyle:{padding:"0 28px"},afterUpload:function(e){var t;g.Z.success("Your offer letter has been uploaded!");var n=c.find((function(e){return"offer_letter"===e.payload.doc_type}
1)),r=c.filter((function(e){return"offer_letter"!==e.payload.doc_type})),a=qo({profile_id:i.profile_id,doc_type:"offer_letter",employee_id:i.uuid},e);null!==n&&void 0!==n&&null!==(t=n.payload)&&void 0!==t&&t.uuid?(a.uuid=n.payload.uuid,r.push({action:"update",payload:a})):r.push({action:"create",payload:a}),u(r),A({action:"create",payload:a})}})]})]})})]}),p&&(0,E.jsx)(Mo.Z,{visible:p,loading:w,letter:_,setVisible:x})]}),(0,E.jsxs)("div",{className:"mb-40",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 mb-8",children:"Kaamwork Appointment / Offer Letter"}),(0,E.jsxs)("div",{className:"dashboard-card d-flex justify-content-between mb-8 p-20",children:[(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:"As your Employer of Record partner, kaamwork will release a locally compliant offer letter to your employee"}),(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-6 border-color-grey text-color-blue text-weight-500 ml-8",style:{padding:"0 32px"},onClick:function(){v(!0)},children:"View"}),y?(0,E.jsx)(Mo.Z,{visible:y,loading:w,letter:O,setVisible:v}):null]})]}),(0,E.jsxs)("div",{className:"",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 mb-8",children:"Other documents"}),(0,E.jsxs)("div",{className:"dashboard-card mb-8 p-20 ",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"text-color-dark-grey-light",children:[(0,E.jsx)("div",{children:"All employees will sign an kaamwork-generated locally compliant employment agreement on joining Date."}),(0,E.jsx)("div",{children:"Please upload any other company-specific documents your employees need to sign as well - examples: NDA, IP/Confidentiality Agreement, etc."})]}),(0,E.jsx)("div",{className:"d-inline-block",children:(0,E.jsx)(Ro.Z,{folderPath:"".concat(i.uuid,"_employee"),btnClass:"btn-size-l border-radius-6 border-color-grey text-color-blue text-weight-500 ml-8",btnStyle:{padding:"0 24px"},afterUpload:function(e){var t=(0,f.Z)(c),n=qo({profile_id:i.profile_id,doc_type:"company_uploaded",employee_id:i.uuid},e);t.push({action:"create",payload:n}),u(t)}})})]}),(0,E.jsx)("div",{className:"d-flex flex-column mt-16",children:c.map((function(e){return"delete"!==e.action&&e.payload&&"company_uploaded"===e.payload.doc_type?(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center border-radius-6 mb-4",style:{border:"1px solid #D5DAEC",padding:"7px 12px"},children:[(0,E.jsx)("div",{className:"cursor-pointer text-ellipsis-on-overflow text-weight-500",children:e.payload.name}),(0,E.jsx)(d.Z,{onClick:function(){return T(e.payload)},className:"cursor-pointer icon-size-24",component:X.r})]}):null}))})]})]}),(0,E.jsxs)("div",{className:"mb-16 text-color-dark-grey-dark text-size-14 d-flex align-items-start",style:{padding:l?"8px 12px 12px 8px":"12px 20px",borderRadius:8,backgroundColor:"rgba(255, 209, 131, 0.5)"},children:[(0,E.jsx)(d.Z,{className:"icon-size-24 mr-8",component:Zl.r}),"Please note that offer letter will be sent after you complete Billing step."]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between desktop",children:[(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 20px",background:"transparent"},onClick:function(){n(t-1)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back"})}),(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl mb-4 text-weight-500 text-size-16 border-radius-8",onClick:R,children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Save & Continue"})})]}),(0,E.jsxs)("div",{className:" mobile",children:[(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl mb-12 text-weight-500 text-size-16 border-radius-8",onClick:R,block:!0,children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Save & Continue"})}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 20px",background:"transparent"},onClick:function(){n(t-1)},block:!0,children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back"})})]})]})}));n(22976);function Vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Vo(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ho=function(e){return(0,Y.x6)(Number(e).toFixed(2))},Wo=(0,i.$j)((function(e){return{newEmployee:e.employ.newEmployee,emailSenderId:e.auth.auth.profile_uuid,sendOfferLetterLoading:e.employ.sendOfferLetterLoading}}),(function(e){return{sendOfferLetter:function(t,n){return e(w.azn(t,n))}}}))((function(e){var t=e.step,n=e.setStep,i=e.newEmployee,a=e.emailSenderId,s=e.sendOfferLetterLoading,l=e.sendOfferLetter,o=(0,za.Z)("(max-width: 767px)"),c=(0,r.useState)(null),u=c[0],m=c[1],p=(0,r.useState)(!1),x=p[0],h=p[1],f=(0,r.useState)(null),y=f[0],v=f[1],b=i.employee_id||i.uuid||null,w=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),v(null),e.prev=2,e.next=5,(0,V.XZ)("payroll/employees/billing?employee_id=".concat(b));case 5:t=e.sent,m(t),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.error(e.t0),v(e.t0);case 13:return e.prev=13,h(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,9,13,16]])})));return function(){return e.apply(this,arguments)}}();if((0,r.useEffect)((function(){b&&w()}),[b]),y)return(0,E.jsx)("div",{className:"dashboard-card text-center",children:"Some error occurred while fetching billing information. Please try again later."});if(x||!u)return(0,E.jsxs)("div",{className:"text-center",children:[(0,E.jsx)(d.Z,{type:"loading",className:"mr-8 icon-size-24"})," Loading..."]});var k=(+u.security_deposit+ +u.joining_bonus+ +u.prorata_salary+ +u.assets_price+ +u.prorata_kw_fees).toFixed(2),N=+u.monthly_salary+ +u.kw_fees,_=function(e){var t=is()(e);return{daysLeft:is()(t).endOf("month").diff(t,"days")+1,month:t.format("MMMM")}}(i.joining_date);return(0,E.jsxs)("div",{className:"add-new-employee__billing-employee",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between mb-4",children:[(0,E.jsx)("div",{className:"",children:"Deposit"}),(0,E.jsxs)("div",{className:"text-color-dark-grey-light",children:["Amount in ",Y.fD[u.currency]]})]}),(0,E.jsx)("div",{className:"dashboard-card mb-20",children:(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"mr-8",children:[(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500 mb-2",children:"Security deposit"}),(0,E.jsx)($a.Z,{content:(0,E.jsx)("span",{className:"text-color-dark-grey-light",children:"Equivalent to one month salary, used to process payroll in case any unforeseen delay in payments from your end. Adjustable against last month's salary in cases of termination of employment with a standard one-month notice period."}),overlayStyle:{width:o?"300px":"600px"},trigger:"click",placement:"bottomLeft",children:(0,E.jsx)("span",{className:"text-size-12-14 text-weight-500 text-color-blue cursor-pointer",children:"What's this"})})]}),(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500",children:Ho(u.security_deposit)})]})}),(0,E.jsx)("div",{className:"mb-4",children:"Immedidate"}),(0,E.jsx)("div",{className:"dashboard-card mb-20",children:(0,E.jsxs)("div",{className:"text-size-16-18",children:[isNaN(+u.joining_bonus)?null:(0,E.jsxs)("div",{className:"d-flex justify-content-between mb-20",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 mb-2",children:"Joining bonus"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light",children:"Payable with first month's payroll"})]}),(0,E.jsx)("div",{className:"text-weight-500",children:Ho(u.joining_bonus)})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mb-20",children:[(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"text-weight-500 mb-2",children:[1===is()(i.joining_date).date()?_.month:"Pro rata"," ","salary"]}),1===is()(i.joining_date).date()?null:(0,E.jsxs)("div",{className:"text-size-12-14 text-color-dark-grey-light",children:[_.daysLeft," ",_.daysLeft>1?"days":"day"," ","in ",_.month]})]}),(0,E.jsx)("div",{className:"text-weight-500",children:Ho(u.prorata_salary)})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mb-20",children:[(0,E.jsx)("div",{className:"text-weight-500 mb-2",children:"Equipment / Infrastru
1cture"}),(0,E.jsx)("div",{className:"text-weight-500",children:Ho(u.assets_price)})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"text-weight-500 mb-2",children:[1===is()(i.joining_date).date()?_.month:"Pro rata"," ","kaamwork fees"]}),1===is()(i.joining_date).date()?null:(0,E.jsxs)("div",{className:"text-size-12-14 text-color-dark-grey-light",children:[_.daysLeft," ",_.daysLeft>1?"days":"day"," ","in ",_.month]})]}),(0,E.jsx)("div",{className:"text-weight-500",children:Ho(u.prorata_kw_fees)})]})]})}),(0,E.jsx)("div",{className:"mb-4",children:"You will be paying"}),(0,E.jsx)("div",{className:"dashboard-card mb-40",children:(0,E.jsx)("div",{className:"text-size-16-18",children:(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500",children:"Total to be paid"}),(0,E.jsxs)("div",{className:"text-size-16-18 text-weight-500 text-color-green",children:[Y.fD[u.currency]," ",Ho(k)]})]})})}),(0,E.jsx)("div",{className:"mb-8 text-size-20 text-weight-500",children:"Steady-state Monthly Invoice"}),(0,E.jsxs)("div",{style:{border:"1px solid #D5DAEC",padding:o?"16px 12px":"20px 30px"},className:"mb-40 border-radius-6 text-size-16-18",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between mb-20",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 mb-2",children:"Monthly Salary"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light",children:"Gross amount, before local taxes"})]}),(0,E.jsx)("div",{className:"text-weight-500",children:Ho(u.monthly_salary)})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mb-20",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 mb-2",children:"kaamwork fees"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light",children:"Flat fee per month per employee"})]}),(0,E.jsx)("div",{className:"text-weight-500",children:Ho(u.kw_fees)})]}),(0,E.jsx)(B.Z,{className:"divider-20"}),(0,E.jsx)("div",{children:(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500",children:"Total"}),(0,E.jsxs)("div",{className:"text-size-16-18 text-weight-500 text-color-green",children:[Y.fD[u.currency]," ",Ho(N)]})]})})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between desktop",children:[(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 20px",background:"transparent"},onClick:function(){n(t-1)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back"})}),(0,E.jsxs)(j.Z,{type:"primary",className:"btn-size-xl mb-4 text-weight-500 text-size-16 border-radius-8",disabled:s,onClick:function(){b&&a&&l(Yo({employee_id:b,sent_by_id:a},i),{onSuccess:function(){n(t+1)},onFail:function(){g.Z.error("Some error occured while sending offer letter. Please contact us if the issue persists.")}})},children:[s?(0,E.jsx)(d.Z,{type:"loading",className:"text-size-20 mr-12"}):null," ","Send Offer Letter"]})]}),(0,E.jsxs)("div",{className:"mobile",children:[(0,E.jsxs)(j.Z,{type:"primary",className:"btn-size-xl mb-12 text-weight-500 text-size-16 border-radius-8",disabled:s,block:!0,onClick:function(){b&&a&&l(Yo({employee_id:b,sent_by_id:a},i),{onSuccess:function(){n(t+1)},onFail:function(){g.Z.error("Some error occured while sending offer letter. Please contact us if the issue persists.")}})},children:[s?(0,E.jsx)(d.Z,{type:"loading",className:"text-size-20 mr-12"}):null," ","Send Offer Letter"]}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16 border border-color-grey text-color-blue",type:"default",block:!0,style:{padding:"0 20px",background:"transparent"},onClick:function(){n(t-1)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back"})})]})]})})),Jo=(0,i.$j)((function(e){return{newEmployee:e.employ.newEmployee}}),(function(e){return{updateNewEmployee:function(t){return e(w.hzs(t))}}}))((function(e){var t=e.setStep,n=e.newEmployee,r=e.setShowNewHire,i=e.updateNewEmployee;return(0,E.jsxs)("div",{className:"add-new-employee__payment-employee ",children:[(0,E.jsxs)("div",{className:"desktop d-flex",children:[(0,E.jsx)("div",{className:"p-16 mr-12",children:(0,E.jsx)(d.Z,{component:Va.r,className:"icon-size-64 icon-green-dark"})}),(0,E.jsxs)("div",{className:"pt-16",children:[(0,E.jsxs)("div",{className:"text-size-20 text-weight-500 mb-8",children:["Your offer letter has been sent to ",n.first_name]}),(0,E.jsxs)("div",{className:"mb-20",children:["You will receive a notification once ",n.first_name," has successfully completed the onboarding process."]}),(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)(j.Z,{block:!0,type:"primary",className:"btn-size-xl mr-20 text-size-16 text-weight-500 round-8",onClick:function(){i({}),t(0)},children:"Add Another Hire"}),(0,E.jsx)(j.Z,{block:!0,ghost:!0,type:"primary",className:"btn-size-xl mb-4 text-color-blue text-size-16 text-weight-500 round-8 border-color-grey",onClick:function(){r(!1)},children:"Back to Employees"})]})]})]}),(0,E.jsxs)("div",{className:"mobile text-center",children:[(0,E.jsx)("div",{className:"p-16 mr-12",children:(0,E.jsx)(d.Z,{component:Va.r,className:"icon-size-64 icon-green-dark"})}),(0,E.jsxs)("div",{className:"pt-16",children:[(0,E.jsxs)("div",{className:"text-size-18-20 text-weight-500 mb-8 pl-48 pr-48",children:["Your offer letter has been sent to ",n.first_name]}),(0,E.jsxs)("div",{className:"mb-20 pl-48 pr-48",children:["You will receive a notification once ",n.first_name," has successfully completed the onboarding process."]}),(0,E.jsxs)("div",{className:"",style:{position:"absolute",bottom:"40px"},children:[(0,E.jsx)(j.Z,{block:!0,type:"primary",className:"btn-size-xl mb-12 text-size-16 text-weight-500 round-8",onClick:function(){i({}),t(0)},children:"Add Another Hire"}),(0,E.jsx)(j.Z,{block:!0,ghost:!0,type:"primary",className:"btn-size-xl mb-4 text-color-blue text-size-16 text-weight-500 round-8 border-color-grey",onClick:function(){r(!1)},children:"Back to Employees"})]})]})]})]})})),Uo=n(9309),$o=(n(87043),n(12731)),Go=n(48014),Ko=n(26083);function Qo(){return Qo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qo.apply(this,arguments)}function Xo(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ec=r.createElement("title",null,"Team_Role"),tc=r.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Usecases-AddNew-Extras",transform:"translate(-318.000000, -78.000000)",strokeWidth:2},r.createElement("g",{id:"Termination-Date",transform:"translate(300.000000, 60.000000)"},r.createElement("g",{id:"Group",transform:"translate(16.000000, 16.000000)"},r.createElement("path",{d:"M21,7.4609 C21,6.1027 19.8973,5 18.5391,5 L5.4609,5 C4.1027,5 3,6.1027 3,7.4609 L3,18.5391 C3,19.8973 4.1027,21 5.4609,21 L18.5391,21 C19.8973,21 21,19.8973 21,18.5391 L21,7.4609 Z",id:"Stroke-2",stroke:"#3A3E4C",fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:16,y1:13,x2:18,y2:13,id:"Stroke-1",stroke:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:3,y1:9,x2:21,y2:9,id:"Stroke-3",stroke:"#3A3E4C"}),r.createElement("line",{x1:6,y1:13,x2:8,y2:13,id:"Stroke-4",stroke:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:11,y1:13,x2:13,y2:13,id:"Stroke-5",stroke:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:6,y1:16,x2:8,y2:16,id:"Stroke-6",stroke:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:11,y1:16,x2:13,y2:16,id:"Stroke-7",stroke:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:17,y1:3,x2:17,y2:6,id:"Stroke-8",stroke:"#3A3E4C",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:7,y1:3,x2:7,y2:6,id:"Stroke-9",stroke:"#3A3E4C",strokeLinecap:"round",strokeLinejoin:"round"}))))),nc=function(e){var t=e.svgRef,n=e.title,i=Xo(e,["svgRef","title"]);return r.createElement("svg",Qo({width:"20px",height:"20px",viewBox:"0 0 20 20",ref:t},i),void 0===n?ec:n?r.createElement("title",null,n):null,tc)},rc=r.forwardRef((function(e,t){return r.createElement(nc,Qo({svgRef:t},e))})),ic=n(57326),ac=n(79156),sc=n(83438),lc=n(87661),oc=n(78910),cc=function(e){var t=e.getFieldDecorator,n=e.setFieldsValue,i=e.getFieldValue,a=e.fieldName,s=e.asset,l=e.k,o=e.removeAsset,c=e.assetOptions,u=e.assetOptionsLoading,m=e.defaultCurrency,p=(0,r.useState)(!1),x=p[
10],f=p[1],g=(0,r.useState)(null),y=g[0],v=g[1];if((0,r.useEffect)((function(){x&&(t("".concat(a,"[asset_id]"),{initialValue:s.asset_id}),t("".concat(a,"[delete]"),{initialValue:!0}))}),[x]),(0,r.useEffect)((function(){c&&c.length>0?i("".concat(a,"[asset_id]"))||s.asset_id?v("company"):s.mrp&&s.name?v("custom"):v("company"):v("custom")}),[c]),(0,r.useEffect)((function(){s&&s.delete&&(t("".concat(a,"[delete]"),{initialValue:!0}),f(!0))}),[s]),(0,r.useEffect)((function(){i("".concat(a,"[delete]"))?f(!0):c&&c.length?v("company"):v("custom")}),[]),x)return null;return(0,E.jsxs)(E.Fragment,{children:[c&&c.length>0&&"custom"!==y?(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Choose an Asset",children:t("".concat(a,"[asset_id]"),{initialValue:s.asset_id,rules:[{required:!1}]})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey border-0 border-radius-6 inner-shadow",dropdownClassName:"select-bg-grey-dropdown",getPopupContainer:function(e){return e.parentNode},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-24",component:L.r}),loading:u,onChange:function(e){e&&v("company")},dropdownRender:function(e){return(0,E.jsxs)("div",{style:{backgroundColor:"transparent"},children:[e,(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark border-radius-4 cursor-pointer",style:{padding:"16px 12px",border:"1px solid #d5daec",borderTop:"none"},onMouseDown:function(e){return e.preventDefault()},onClick:function(){n((0,h.Z)({},"".concat(a,"[asset_id]"),null)),v("custom")},children:"Add Custom"})]})},optionLabelProp:"label",children:c.map((function(e){return(0,E.jsx)(N.Z.Option,{value:e.uuid,label:e.name,children:(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{children:e.name}),(0,E.jsx)("span",{className:"text-size-14 text-color-dark-grey-light ml-4",children:e.currency&&e.mrp?"(".concat(e.currency," ").concat(Kl()(e.mrp).format("0,0"),")"):null})]})},e.uuid)}))}))}),function(){var e=i("".concat(a,"[asset_id]")),t=c.find((function(t){return t.uuid===e}));return t?(0,E.jsxs)("div",{className:"d-flex align-items-center text-size-14 text-color-dark-grey-dark",children:[(0,E.jsxs)("span",{className:"mr-4",children:[t.currency," ",Kl()(t.mrp).format("0,0")]}),t.purchase_url?(0,E.jsx)("a",{href:t.purchase_url,target:"_blanl",children:(0,E.jsx)(d.Z,{component:oc.r,className:"icon-size-16 cursor-pointer"})}):null]}):null}()]}):null,"custom"===y?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Asset Name",children:t("".concat(a,"[name]"),{initialValue:"company"===y?null:s.asset?s.asset.name:null,rules:[{required:!1}]})((0,E.jsx)(C.Z,{disabled:"company"===y,className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)("label",{className:"text-weight-500 text-color-dark-grey-dark",children:"Price"}),(0,E.jsxs)(_.Z,{gutter:8,children:[(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsx)(hs.Z.Item,{children:t("".concat(a,"[currency]"),{initialValue:"company"!==y?s.currency||m:null,rules:[{required:!1}]})((0,E.jsx)(ao.Z,{className:"select-size-48 select-bg-grey border-0 border-radius-6 inner-shadow",initialValue:"company"!==y?s.currency||m:null,handleCurrencyChange:function(e){return n((0,h.Z)({},"".concat(a,"[currency]"),e))},disabled:"company"===y}))})}),(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsx)(hs.Z.Item,{children:t("".concat(a,"[mrp]"),{initialValue:"company"!==y?s.mrp:null,rules:[{required:!1}]})((0,E.jsx)(z.Z,{disabled:"company"===y,className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})})]})]}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Purchase Url",children:t("".concat(a,"[purchase_url]"),{initialValue:"company"!==y?s.purchase_url:null,rules:[{required:!1}]})((0,E.jsx)(C.Z,{disabled:"company"===y,className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})})]}):null,(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(j.Z,{type:"link",style:{padding:"0"},className:"text-color-red text-weight-500",onClick:function(){return function(e){"company"===y?(t("".concat(a,"[delete]"),{initialValue:!0}),f(!0)):o(e)}(l)},children:"Delete"})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(B.Z,{style:{margin:"16px 0 0"}})})]})};cc.defaultProps={assets:[],newEmployee:null,remove:function(){}};var dc=cc,uc=function(e){var t=(0,za.Z)("(max-width: 767px)"),n=e.getFieldDecorator,i=e.setFieldsValue,a=e.getFieldValue,s=e.fieldName,l=e.assetOptions,o=e.assetOptionsLoading,c=e.assetsAr,u=e.defaultCurrency,m=(0,r.useState)(0),p=m[0],x=m[1];(0,r.useEffect)((function(){c.length?x(c.length-1):x(0)}),[c]);var f=function(e){var t=a("".concat(s,"[keys]"));i((0,h.Z)({},"".concat(s,"[keys]"),t.filter((function(t){return t!==e}))))};(0,r.useEffect)((function(){if(p>=0&&p>=a("".concat(s,"[keys]")).length){var e=a("".concat(s,"[keys]")).c
1oncat(p);i((0,h.Z)({},"".concat(s,"[keys]"),e))}}),[p]),n("".concat(s,"[keys]"),{initialValue:Array.from(Array(c.length).keys())});var g=a("".concat(s,"[keys]")).map((function(e){return(0,E.jsx)(dc,{getFieldDecorator:n,getFieldValue:a,setFieldsValue:i,fieldName:"".concat(s,"[").concat(e,"]"),asset:c.length>e?c[e]:{},removeAsset:f,k:e,assetOptions:l,assetOptionsLoading:o,defaultCurrency:u},e)}));return(0,E.jsx)("div",{className:"dashboard-card mb-32 ".concat(t?"p-12":"p-20"),children:(0,E.jsxs)(_.Z,{gutter:[24,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"round-100 d-flex align-items-center justify-content-center mr-16",style:{width:t?"40px":"48px",height:t?"40px":"48px",backgroundColor:"#FFDCEC"},children:(0,E.jsx)(d.Z,{component:lc.r,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-".concat(t?"16":"18"," text-weight-500 text-color-dark-grey-dark"),children:"Equipment / Infrastructure"})]})}),g,(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{className:"text-color-blue d-flex align-items-center text-size-16 cursor-pointer text-weight-500",onClick:function(){x(p+1)},children:"Add Another Asset"})})]})})};uc.defaultProps={assetOptions:[]};var mc=uc,pc=[{type:"work_from_anywhere",icon:_r.r,title:"100% Remote",label:"No restriction on location or timezone of the candidate",displayLabel:function(){return"No restriction on location or timezone of the candidate"}},{type:"work_from_specific_city",icon:Zr.r,title:"Location Specific",label:"Candidate has to be from a specific location",displayLabel:function(e){return"Candidate has to be from ".concat(e)}},{type:"hybrid",icon:Or.r,title:"Hybrid Remote",label:"Candidate is required to come to office partially",displayLabel:function(e){return"Candidate is required to come to office partially in ".concat(e)}}];function xc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xc(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fc={required:!0,message:"Required"},gc=N.Z.Option,yc=function(e){e.displayValue,e.resetLocation,e.placeholder;var t,n,i,a,s,l,o,c=e.locationData,d=e.setLocationData,u=(e.locationType,e.getFieldDecorator),m=(0,r.useState)([]),p=m[0],x=m[1],h=(0,r.useState)([]),f=(h[0],h[1],(0,r.useState)(!1)),g=f[0],y=f[1],v=(0,r.useState)(!1),j=v[0],b=v[1],w=(0,r.useState)([]),k=w[0],_=w[1],Z=(0,r.useState)([]),C=Z[0],O=Z[1],S=function(e,t){var n={locationType:c.location_type,location:(null===c||void 0===c?void 0:c.location)||{}};"country"===e?(n.location.country=t,delete n.location.state,delete n.location.city):"state"===e?(n.location.state=t,delete n.location.city):n.location.city=t,d(hc(hc({},c),n))},z=function(){var e=(0,tr.Z)(Qn().mark((function e(){return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),e.abrupt("return",fetch("".concat((0,V.dN)(),"/location/country_code?fetch_for=employ")).then((function(e){return e.json()})).then((function(e){var t,n;n=null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((function(e){return{title:e.country.name,value:JSON.stringify(e)}})),x(n),y(!1)})));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t,n,r;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),r=JSON.parse(null===c||void 0===c||null===(t=c.location)||void 0===t?void 0:t.country),e.abrupt("return",fetch("".concat((0,V.dN)(),"/location/state_from_npm?country_iso2=").concat((null===r||void 0===r||null===(n=r.country)||void 0===n?void 0:n.iso2)||(null===r||void 0===r?void 0:r.countryCode))).then((function(e){return e.json()})).then((function(e){var t,n,r;r=null===e||void 0===e||null===(t=e.data)||void 0===t||null===(n=t.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})))||void 0===n?void 0:n.map((function(e){return{title:e.name,value:JSON.stringify(e)}})),_(r),y(!1),b(!0)})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t,n,r;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),n=JSON.parse(null===c||void 0===c||null===(t=c.location)||void 0===t?void 0:t.state),r="".concat((0,V.dN)(),"/location/city_from_npm?
1country_iso2=").concat(null===n||void 0===n?void 0:n.countryCode),n.isoCode&&(r+="&state_iso2=".concat(n.isoCode)),e.abrupt("return",fetch(r).then((function(e){return e.json()})).then((function(e){var t,n,r;r=null===e||void 0===e||null===(t=e.data)||void 0===t||null===(n=t.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})))||void 0===n?void 0:n.map((function(e){return{title:e.name,value:JSON.stringify(e)}})),O(r),y(!1)})));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,r.useLayoutEffect)((function(){return z(),function(){}}),[]),(0,r.useLayoutEffect)((function(){var e,t;null!==c&&void 0!==c&&null!==(e=c.location)&&void 0!==e&&e.country&&P(),(!0===j&&0===k.length||null!==c&&void 0!==c&&null!==(t=c.location)&&void 0!==t&&t.state)&&D()}),[null===c||void 0===c||null===(t=c.location)||void 0===t?void 0:t.country,null===c||void 0===c||null===(n=c.location)||void 0===n?void 0:n.state,j]);var F=function(e){var t,n;if(0!==p.length)return"country"===e&&(n=null===p||void 0===p?void 0:p.find((function(e){var t,n,r;return(null===(t=JSON.parse(null===e||void 0===e?void 0:e.value))||void 0===t?void 0:t.uuid)===(null===(n=JSON.parse(null===c||void 0===c||null===(r=c.location)||void 0===r?void 0:r.country))||void 0===n?void 0:n.uuid)}))),"state"===e&&(n=null===k||void 0===k?void 0:k.find((function(e){var t,n,r;return(null===(t=JSON.parse(null===e||void 0===e?void 0:e.value))||void 0===t?void 0:t.name)===(null===(n=JSON.parse(null===c||void 0===c||null===(r=c.location)||void 0===r?void 0:r.state))||void 0===n?void 0:n.name)}))),"city"===e&&(n=null===C||void 0===C?void 0:C.find((function(e){var t,n,r;return(null===(t=JSON.parse(null===e||void 0===e?void 0:e.value))||void 0===t?void 0:t.name)===(null===(n=JSON.parse(null===c||void 0===c||null===(r=c.location)||void 0===r?void 0:r.city))||void 0===n?void 0:n.name)}))),null===(t=n)||void 0===t?void 0:t.value};return(0,E.jsxs)("div",{children:[(0,E.jsx)(hs.Z.Item,{label:"",children:u("location.country",{initialValue:!g&&c&&(null===c||void 0===c||null===(i=c.location)||void 0===i?void 0:i.country)&&F("country"),rules:[fc]})((0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500 mb-12",placeholder:"Select Country",showSearch:!0,style:{width:"100%",height:"48px",color:"#7C7F88"},onSelect:function(e){console.log(e),S("country",e)},loading:g,notFoundContent:null,showArrow:!1,children:null===p||void 0===p?void 0:p.map((function(e,t){return(0,E.jsx)(gc,{value:e.value,children:e.title},e.title)}))}))}),(null===c||void 0===c||null===(a=c.location)||void 0===a?void 0:a.country)&&k&&k.length>0&&(0,E.jsx)(hs.Z.Item,{label:"",children:u("location.state",{initialValue:c&&(null===c||void 0===c||null===(s=c.location)||void 0===s?void 0:s.state)&&F("state"),rules:[fc]})((0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500 mb-12",placeholder:"Select State",showSearch:!0,style:{width:"100%",height:"48px",color:"#7C7F88"},onSelect:function(e){S("state",e)},loading:g,notFoundContent:null,showArrow:!1,children:null===k||void 0===k?void 0:k.map((function(e,t){return(0,E.jsx)(gc,{value:e.value,children:e.title},t)}))}))}),(null===c||void 0===c||null===(l=c.location)||void 0===l?void 0:l.state)&&C&&C.length>0&&(0,E.jsx)(hs.Z.Item,{label:"",children:u("location.city",{initialValue:c&&(null===c||void 0===c||null===(o=c.location)||void 0===o?void 0:o.city)&&F("city"),rules:[fc]})((0,E.jsx)(N.Z,{className:"custom-select-video-type text-weight-500",placeholder:"Select City",showSearch:!0,style:{width:"100%",height:"48px",color:"#7C7F88"},onSelect:function(e){S("city",e)},loading:g,notFoundContent:null,showArrow:!1,children:null===C||void 0===C?void 0:C.map((function(e,t){return(0,E.jsx)(gc,{value:e.value,children:e.title},e.title)}))}))})]})};function vc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?vc(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}N.Z.Option;var bc=function(e){var t=e.locationData,n=e.setLocationData,r=e.resetLocation,i=e.getFieldDecorator;return(0,E.jsx)("div",{className:"post-job__remote-preference",children:pc.map((function(e,a){return(0,E.jsx)(wc,jc(jc({},e),{},{setLocationData:n,locationData:t,resetLocation:r,getFieldDecorator:i}),e.type)}))})},wc=function(e){var t=e.type,n=e.icon,r=e.title,i=e.label,a=e.locationData,s=e.setLocationData,l=e.resetLocation,o=e.getFieldDecorator;return(0,E.jsxs)("div",{className:"d-flex p-16 mt-8 list-item ".concat((null===a||void 0===a?void 0:a.location_type)===t?"selected":""),style:{borderRadius:"6px",position:"relative"},onClick:function(){(null===a||void 0===a?void 0:a.location_type)!==t&&s(jc(jc({},a),{},{location_type:t}))},children:[(0,E.jsx)("div",{children:(0,E.jsx)(d.Z,{component:n,className:"text-size-24"})}),(0,E.jsxs)("div",{className:"ml-20 ",style:{width:"85%"},children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:r}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light",children:i})]}),(null===a||void 0===a?void 0:a.location_type)===t&&("work_from_anywhere"===t?(l(),null):(0,E.jsx)(yc,{placeholder:"enter location",resetLocation:l,locationData:a,setLocationData:s,locationType:t,getFieldDecorator:o}))]}),(0,E.jsx)("div",{className:"radio"})]})},kc=n(16835);function Nc(){return Nc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nc.apply(this,arguments)}function _c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Zc=r.createElement("title",null,"Team_Role Copy"),Cc=r.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Usecases-AddNew-Extras",transform:"translate(-319.000000, -519.000000)",strokeWidth:2},r.createElement("g",{id:"Notice-Period",transform:"translate(300.000000, 500.000000)"},r.createElement("g",{id:"Group",transform:"translate(16.000000, 16.000000)"},r.createElement("path",{d:"M4,12 C4,16.4153 7.5847,20 12,20 C16.4153,20 20,16.4153 20,12 C20,7.5847 16.4153,4 12,4 C7.5847,4 4,7.5847 4,12 Z",id:"Fill-1",stroke:"#3A3E4C",fill:"#FFFFFF"}),r.createElement("polyline",{id:"Stroke-3",stroke:"#7C7F88",points:"12 8 12 12 14 14"}))))),Oc=function(e){var t=e.svgRef,n=e.title,i=_c(e,["svgRef","title"]);return r.createElement("svg",Nc({width:"18px",height:"18px",viewBox:"0 0 18 18",ref:t},i),void 0===n?Zc:n?r.createElement("title",null,n):null,Cc)},Sc=r.forwardRef((function(e,t){return r.createElement(Oc,Nc({svgRef:t},e))})),zc=n(19851),Ec=n.n(zc),Pc={required:!1,message:"Required"};var Dc=function(e){var t,n,i,a,s,l,o,c,u,m,p=(0,za.Z)("(max-width: 767px)"),x=e.form,h=e.newEmployee,f=x.getFieldDecorator,g=x.setFieldsValue,y=x.getFieldValue,v=r.useState(!1),j=(0,kc.Z)(v,2),b=j[0],w=(j[1],y("working_hour.timezone")),k=function(e){if(!e)return"";var t=e.replace(/\D/g,"");if(0===t.length)return"";var n="",r="";if(t.length>=1){var i=parseInt(t[0]);if(i>2){if(n="0"+i,t.length>1){var a=t.slice(1);r=_(a)}}else if(1===t.length)n=t[0];else if(t.length>=2){var s=t.slice(0,2);parseInt(s)>23?(n="0"+t[0],r=_(t.slice(1))):(n=s,t.length>2&&(r=_(t.slice(2))))}}return n&&r?"".concat(n.padStart(2,"0"),":").concat(r):n&&2===n.length?"".concat(n,":"):n||""},_=function(e){return e?1===e.length?e:e.length>=2?parseInt(e.slice(0,2))>59?e[0]:e.slice(0,2).padStart(2,"0"):e:""},Z=function(){var e=[];return w&&e.push({required:!0,message:"Required when timezone is selected"}),e.push({pattern:/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/,message:"Enter valid time (HH:MM, e.g. 09:30)"}),e};return(0,E.jsxs)("div",{className:"dashboard-card mb-8",style:{padding:p?"20px 12px 12px":"20px"},children:[(0,E.jsxs)("div",{className:"d-flex align-items-center mb-24",children:[(0,E.jsx)("div",{className:"round-100 d-flex align-items-center justify-content-center mr-16",style:{width:p?"40px":"48px",height:p?"40px":"48px",backgroundColor:"#ffc5c5"},children:(0,E.jsx)(d.Z,{component:Sc,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-".concat(p?"16":"18"," text-weight-500 text-color-dark-grey-dark"),children:"Working Hours"})]}),(0,E.jsx)(hs.Z.Item,{label:"Timezone",className:"mb-16",children:f("working_hour.timezone",{initialValue:(null===h||void 0===h||null===(t=h.meta)||void 0===t||null===(n=t.working_hour)||void 0===n?void 0:n.timezone)||void 0,rules:[Pc]})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey border-0 border-radius-6 inner-shadow",showSearch:!0,allowClear:!0,style:{width:"100%"},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),disabled:b,placeholder:"Select Timezone",onChange:function(e){e||g({"working_hour.start_time":void 0,"working_hour.end_time":void 0,"working_hour.start_time_period":"AM","working_hour.end_time_period":"PM"})},children:Ec().map((function(e){return(0,E.jsx)(N.Z.Option,{value:e.label,children:e.label},e.utc)}))}))}),(0,E.jsx)(hs.Z.Item,{label:"Working Hours (Time Range)",className:"mb-16",children:(0,E.jsxs)("div",{style:{display:"flex",gap:"16px",alignItems:"center",width:"100%"},children:[(0,E.jsxs)("div",{style:{display:"flex",gap:"8px",flex:1},children:[f("working_hour.start_time",{initialValue:null===h||void 0===h||null===(i=h.meta)||void 0===i||null===(a=i.working_hour)||void 0===a?void 0:a.start_time,rules:Z(),getValueFromEvent:function(e){return k(e.target.value)}})((0,E.jsx)(C.Z,{type:"text",inputMode:"numeric",pattern:"[0-9]*",placeholder:"Start H
1H:MM",className:"input-size-48 input-bg-grey border-radius-6 inner-shadow",maxLength:5,style:{width:"80%"},disabled:b||!w})),f("working_hour.start_time_period",{initialValue:(null===h||void 0===h||null===(s=h.meta)||void 0===s||null===(l=s.working_hour)||void 0===l?void 0:l.start_time_period)||"AM",rules:w?[{required:!0,message:"Required when timezone is selected"}]:[]})((0,E.jsxs)(N.Z,{className:"select-size-48 select-bg-grey border-0 border-radius-6 inner-shadow",style:{width:"70px"},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),disabled:b||!w,children:[(0,E.jsx)(N.Z.Option,{value:"AM",children:"AM"}),(0,E.jsx)(N.Z.Option,{value:"PM",children:"PM"})]}))]}),(0,E.jsx)("span",{style:{fontWeight:500},children:"to"}),(0,E.jsxs)("div",{style:{display:"flex",gap:"8px",flex:1},children:[f("working_hour.end_time",{initialValue:null===h||void 0===h||null===(o=h.meta)||void 0===o||null===(c=o.working_hour)||void 0===c?void 0:c.end_time,rules:Z(),getValueFromEvent:function(e){return k(e.target.value)}})((0,E.jsx)(C.Z,{type:"text",inputMode:"numeric",pattern:"[0-9]*",placeholder:"End HH:MM",className:"input-size-48 input-bg-grey border-radius-6 inner-shadow",maxLength:5,style:{width:"80%"},disabled:b||!w})),f("working_hour.end_time_period",{initialValue:(null===h||void 0===h||null===(u=h.meta)||void 0===u||null===(m=u.working_hour)||void 0===m?void 0:m.end_time_period)||"PM",rules:w?[{required:!0,message:"Required when timezone is selected"}]:[]})((0,E.jsxs)(N.Z,{className:"select-size-48 select-bg-grey border-0 border-radius-6 inner-shadow",style:{width:"70px"},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),disabled:b||!w,children:[(0,E.jsx)(N.Z.Option,{value:"AM",children:"AM"}),(0,E.jsx)(N.Z.Option,{value:"PM",children:"PM"})]}))]})]})})]})};function Fc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fc(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ac={required:!0,message:"Required"},Ic={location_type:"work_from_anywhere"};function Mc(e){var t=(0,za.Z)("(max-width: 767px)"),n=e.form,a=e.step,s=e.setStep,l=e.setShowNewHire,o=e.profileUuid,c=e.loginMeta,u=e.newEmployee,m=e.createNewEmployee,p=e.createEmployeeLoading,x=e.currencyList,h=e.currencyListFetched,f=e.countryCodeList,y=e.countryCodeListFetched,v=e.fetchCurrencyList,b=e.fetchCountryCodeList,k=e.assets,O=e.assetsLoading,P=e.assetsFetched,D=e.getCompanyAssets,F=e.managers,A=e.managersLoading,I=e.managersFetched,M=e.getCompanyManagers,R=e.owners,T=e.ownersLoading,q=e.ownersFetched,B=e.getCompanyOwners,H=e.fetchCurrencyRates,W=e.currencyRates,J=e.currencyRatesFetched,U=e.legalEntity,$=n.getFieldDecorator,G=n.setFieldsValue,K=n.getFieldValue,Q=(0,i.I0)(),X=(0,i.v9)((function(e){return e.auth.auth.login_meta.company.company_id})),ee=(0,i.v9)((function(e){return e.benefitsManager.currentCountryDetailsToShow.countryCode})),te=(0,i.v9)((function(e){return e.benefitsManager.benefitsStatutoryData})),ne=((0,i.v9)((function(e){return e.benefitsManager.benefitsStatutoryLoading})),(0,r.useState)("")),re=ne[0],ie=ne[1],ae=(0,r.useState)(""),se=ae[0],le=ae[1],oe=(0,r.useState)(""),ce=oe[0],de=oe[1],ue=(0,r.useState)(""),me=ue[0],pe=ue[1],xe=(0,r.useState)(null),he=xe[0],fe=xe[1],ge=(0,r.useState)(null),ye=ge[0],ve=ge[1],je=(0,r.useState)({}),be=je[0],we=je[1];(0,r.useEffect)((function(){h||v()}),[h]),(0,r.useEffect)((function(){J||H()}),[J]),(0,r.useEffect)((function(){y||b()}),[y]),(0,r.useEffect)((function(){"IN"===K("country_code")&&ke()}),[K("country_code")]);var ke=function(){var e={clustering_company_id:X,country_code:ee};Q((0,w.AWK)(e))},Ne=function(){return(0,E.jsxs)("div",{className:"".concat(t?"p-12":"p-20"),style:{background:"#F4F7FB",border:"1px solid #D5DAEC",borderRadius:"6px"},children:[(0,E.jsxs)("div",{className:"d-flex align-items-top mobile",children:[(0,E.jsx)(d.Z,{component:Uo.r,className:"text-size-24"}),(0,E.jsxs)("div",{className:" ml-12 text-size-16 text-color-dark-grey-dark",children:["Go to"," ",(0,E.jsx)("a",{href:"/company-portal/hire/benefits-manager",className:"text-weight-500 text-color-blue",children:"Benefits Manager"}
1)," ","customize employee benefits."]})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center mb-12 desktop",children:[(0,E.jsx)(d.Z,{component:Uo.r,className:"text-size-24"}),(0,E.jsx)("div",{className:"ml-12 text-size-18 text-weight-500 text-color-dark-grey-dark ",children:"Benefits for India"})]}),(0,E.jsxs)("div",{className:"pl-30 ml-8 desktop",children:[(0,E.jsx)("div",{className:" text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Statutory"}),(0,E.jsx)("div",{className:" text-size-16 text-color-dark-grey-light mb-12",children:null===te||void 0===te?void 0:te.desc}),(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"Other benefits"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light mb-12 ".concat("Not setup"===(null===te||void 0===te?void 0:te.other_benefits)?"text-italics":""),children:null===te||void 0===te?void 0:te.other_benefits}),(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark ",children:["You can customize benefits through the"," ",(0,E.jsx)("span",{className:"text-weight-500",children:"Benefits Manager"})," later"]})]})]})},_e=x.map((function(e){return(0,E.jsx)(N.Z.Option,{children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("span",{className:"fi fi-".concat(Y.qI[e[0]]||"xx"," mr-8")}),(0,E.jsx)("span",{className:"mr-4",children:e[0]}),(0,E.jsx)("span",{children:"(".concat(e[1],")")})]})},e[0])})),Ze=f.map((function(e){var t,n;return e.country.is_employ_enabled?(0,E.jsx)(N.Z.Option,{label:e.country.name,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"fi fi-".concat(null===e||void 0===e||null===(t=e.country)||void 0===t||null===(n=t.iso2)||void 0===n?void 0:n.toLowerCase()," mr-8")}),(0,E.jsx)("div",{children:e.country.name})]})},e.country.iso2):null})),Ce=null;c&&c.company&&(Ce=c.company.company_id);var Oe=u.profile||null,Se=(Oe&&Oe.tax_residence_country&&Oe.tax_residence_country.currency,u.remuneration||null),ze=null,Ee=null;u.managers&&Object.keys(u.managers).length&&(ze=u.managers.hiring_manager||null,Ee=u.managers.business_owner||null),(0,r.useEffect)((function(){Ce&&D({company_id:Ce})}),[P,Ce]),(0,r.useEffect)((function(){Ce&&(M({company_id:Ce}),B({company_id:Ce}))}),[I,Ce,q]),(0,r.useEffect)((function(){var t,n;if(console.log(e),null!==u&&void 0!==u&&null!==(t=u.meta)&&void 0!==t&&t.location_type&&"work_from_anywhere"!==(null===u||void 0===u||null===(n=u.meta)||void 0===n?void 0:n.location_type)){var r,i,a,s,l,o,c,d,m,p,x,h,f={};if(null!==u&&void 0!==u&&null!==(r=u.meta)&&void 0!==r&&null!==(i=r.location)&&void 0!==i&&i.country)f.country=JSON.stringify(null===u||void 0===u||null===(c=u.meta)||void 0===c||null===(d=c.location)||void 0===d?void 0:d.country);if(null!==u&&void 0!==u&&null!==(a=u.meta)&&void 0!==a&&null!==(s=a.location)&&void 0!==s&&s.state)f.state=JSON.stringify(null===u||void 0===u||null===(m=u.meta)||void 0===m||null===(p=m.location)||void 0===p?void 0:p.state);if(null!==u&&void 0!==u&&null!==(l=u.meta)&&void 0!==l&&null!==(o=l.location)&&void 0!==o&&o.city)f.city=JSON.stringify(null===u||void 0===u||null===(x=u.meta)||void 0===x||null===(h=x.location)||void 0===h?void 0:h.city);var g=Lc({},null===u||void 0===u?void 0:u.meta);g.location=f,we(Lc({},g))}else we(Ic)}),[]);var Pe=function(){n.validateFieldsAndScroll((function(e,t){if(!e)if(o&&Ce){var n,r,i,l,c=[];t.hiring_manager_email&&c.push({email:t.hiring_manager_email,relation:"hiring_manager"}),t.business_owner_email&&c.push({email:t.business_owner_email,relation:"business_owner"});var d=(null===(n=t.assetsAr)||void 0===n?void 0:n.keys.filter((function(e){return t.assetsAr[e].name&&t.assetsAr[e].currency&&t.assetsAr[e].mrp||t.assetsAr[e].asset_id})).map((function(e){return t.assetsAr[e]})))||[],p=Lc(Lc({},t),{},{added_by_id:o,clustering_company_id:Ce,managers:c,assets:d,joining_bonus:t.joining_bonus||0,variable_pay:t.variable_pay||0,retention_bonus:t.retention_bonus||0,retention_bonus_frequency:!0===t.retention_bonus_frequency?"yearly":"onetime",employee_id:u.employee_id||u.uuid||null,joining_date:is()(t.joining_date).format("YYYY-MM-DD"),documents:u.documents,joining_bonus_conditional_on_doj:!(!t.joining_bonus||null===t||void 0===t||!t.joining_bonus_conditional_on_doj),is_custom_company_offer_letter:null===u||void 0===u||null===(r=u.meta)||void 0===r?void 0:r.is_custom_company_offer_letter});delete p.hiring_manager_email,delete p.business_owner_email,delete p.assetsAr,"
1work_from_anywhere"!==(null===be||void 0===be?void 0:be.location_type)&&null!==be&&void 0!==be&&null!==(i=be.location)&&void 0!==i&&i.city&&(p.location_type=null===be||void 0===be?void 0:be.location_type,p.location.country=JSON.parse(p.location.country),p.location.state=JSON.parse(p.location.state),p.location.city=JSON.parse(p.location.city)),null!==p&&void 0!==p&&null!==(l=p.working_hour)&&void 0!==l&&l.timezone||delete p.working_hour,m(p,{onSuccess:function(){s(a+1),fe(null),ve(null)},onFail:function(e){g.Z.error(e||"Some error occurred. Please try again.")}})}else g.Z.error("Some vital parameters are missing. Please contact us if the problem persists.")}))},De=function(e,t){var n,r=null===U||void 0===U?void 0:U.currency,i=K("salary_currency"),a=K("country_code");!a&&e&&g.Z.warn("Please select Country of Hire's Residence for a proper calculation"),f.forEach((function(e){e.country.iso2==a&&(n=e.country.currency)})),n===i&&i!==r?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;if(U.currency===K("salary_currency"))return null;var n=(0,sc.N)({rates:W,amount:e,from:K("salary_currency"),to:U.currency,legal_entity:U}),r=0!=n||"0.00"!=n?(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-14",children:"is ".concat(U.currency," ").concat(Kl()(n).format("0,0.00")," (Converted to ").concat(U.currency," employee's local currency per current FX rates)")}):null;"annual_base_pay"===t?ie(r):"joining_bonus"===t?de(r):"variable_pay"===t?le(r):pe(r)}(e,t):function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0,r=null===U||void 0===U?void 0:U.currency,i=K("salary_currency"),a=null===U||void 0===U?void 0:U.currency,s=K("salary_currency"),l=K("country_code");if(f.forEach((function(t){t.country.iso2==l&&(e=t.country.currency)})),a===s){if(!e&&t)return void g.Z.warn("Please select Country of Hire's Residence for a proper calculation");i=null===U||void 0===U?void 0:U.currency,r=e}var o="";r&&(0,V.V4)("transferwise/convert-currency?amount=".concat(t,"&source=").concat(i,"&target=").concat(r,"&round=true")).then((function(e){var t=0!=(o=e)?(0,E.jsx)("div",{className:"text-color-dark-grey text-size-14",children:"is ".concat(r," ").concat(Kl()(o).format("0,0.00")," (Converted to ").concat(r,")")}):null;"annual_base_pay"===n?ie(t):"joining_bonus"===n?de(t):"variable_pay"===n?le(t):pe(t)}))}(e,t)};(0,r.useEffect)((function(){["annual_base_pay","joining_bonus","retention_bonus","variable_pay"].forEach((function(e){De(K(e),e)}))}),[K("country_code"),K("salary_currency")]),(0,r.useEffect)((function(){G({joining_bonus_conditional_on_doj:null===u||void 0===u?void 0:u.joining_bonus_conditional_on_doj,retention_bonus_frequency:"yearly"===(null===u||void 0===u?void 0:u.retention_bonus_frequency)})}),[]);return console.log(be),(0,E.jsxs)("div",{className:"add-new-employee__basic-employee",children:[(0,E.jsxs)(hs.Z,{className:"custom-form",children:[(0,E.jsx)("div",{className:"dashboard-card mb-8",style:{padding:t?"20px 12px 12px":"20px"},children:(0,E.jsxs)(_.Z,{gutter:[24,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"round-100 d-flex align-items-center justify-content-center mr-16",style:{width:t?"40px":"48px",height:t?"40px":"48px",backgroundColor:"#B5E4C9"},children:(0,E.jsx)(d.Z,{component:$o.r,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-".concat(t?"16":"18"," text-weight-500 text-color-dark-grey-dark"),children:"Basic Info"})]})}),(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsx)(hs.Z.Item,{label:"First Name",children:$("first_name",{initialValue:Oe&&Oe.first_name||u.first_name,rules:[Ac]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})}),(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsx)(hs.Z.Item,{label:"Last Name",children:$("last_name",{initialValue:Oe&&Oe.last_name||u.last_name,rules:[Ac]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Personal Email Address",children:$("email",{initialValue:Oe&&Oe.auth_user&&Oe.auth_user.email||u.email,rules:[Lc(Lc({}
1,Ac),{},{type:"email",message:"The input is not valid E-mail!"})]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Job Title",children:$("job_title",{initialValue:u.job_title,rules:[Ac]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Country of Hire's Residence",children:$("country_code",{initialValue:Oe&&Oe.tax_residence_country_code||u.country_code,rules:[Ac]})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey border-0 border-radius-6 inner-shadow",dropdownClassName:"select-bg-grey-dropdown ",getPopupContainer:function(e){return e.parentNode},showSearch:!0,suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),filterOption:function(e,t){return t.props.label.toLowerCase().indexOf(e.toLowerCase())>=0},onChange:function(e){var t=f.find((function(t){return t.country.iso2===e}));t&&t.country&&t.country.currency&&(t.country.currency,G({salary_currency:t.country.currency}))},children:Ze}))}),(0,E.jsx)("div",{className:"text-size-16 text-lineHeight text-color-dark-grey-dark border-radius-6 mb-12 p-10 mt-8",style:{background:"#FFDDA2"},children:(0,E.jsxs)("div",{className:"d-flex align-items-start ",children:[(0,E.jsx)(d.Z,{component:Zl.r,className:"text-size-24 mr-12"}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{children:"Currently, the automated platform is only live in India."}),(0,E.jsx)("div",{style:{maxWidth:"350px"},children:"Please do contact us to help with other countries - we support ~150 countries"})]})]})}),"IN"===K("country_code")&&(0,E.jsx)(Ne,{})]})]})}),(0,E.jsxs)("div",{className:"dashboard-card mb-8",style:{padding:t?"20px 12px 12px":"20px"},children:[(0,E.jsxs)("div",{className:"d-flex align-items-center mb-24",children:[(0,E.jsx)("div",{className:"round-100 d-flex align-items-center justify-content-center mr-16",style:{width:t?"40px":"48px",height:t?"40px":"48px",backgroundColor:"#FFE2C5"},children:(0,E.jsx)(d.Z,{component:Ko.r,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-".concat(t?"16":"18"," text-weight-500 text-color-dark-grey-dark"),children:"Location Preference"})]}),(0,E.jsx)(bc,{setLocationData:we,locationData:be,resetLocation:function(){we(Ic)},getFieldDecorator:$})]}),"work_from_anywhere"===(null===be||void 0===be?void 0:be.location_type)&&(0,E.jsx)(Dc,{newEmployee:u,form:n}),(0,E.jsx)("div",{className:"dashboard-card mb-8",style:{padding:t?"20px 12px 12px":"20px"},children:(0,E.jsxs)(_.Z,{gutter:[24,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"round-100 d-flex align-items-center justify-content-center mr-16",style:{width:t?"40px":"48px",height:t?"40px":"48px",backgroundColor:"#c5eaff"},children:(0,E.jsx)(d.Z,{component:Go.r,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-".concat(t?"16":"18"," text-weight-500 text-color-dark-grey-dark"),children:"Remuneration Details"})]})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Remuneration Currency",children:$("salary_currency",{initialValue:Se&&Se.currency||u.salary_currency||U&&U.currency,rules:[Ac]})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey border-0 border-radius-6 inner-shadow",dropdownClassName:"select-bg-grey-dropdown",getPopupContainer:function(e){return e.parentNode},showSearch:!0,suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),children:_e}))}),"USD"===U.currency&&"INR"===K("salary_currency")?(0,E.jsxs)("div",{className:"text-size-14 text-lineHeight text-color-dark-grey-light",children:["We use conversion of 1USD=",(null===U||void 0===U?void 0:U.custom_exchange_rate)||W[K("salary_currency")],"INR to ensure no fluctuations in monthly payouts to your employees. This can change periodically based on rate movements."]}):null,(null===U||void 0===U?void 0:U.currency)!==K("salary_currency")&&(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey",children:"Your invoice will build a buffer of upto 5% on FX rate to ensure monthly salary transfers to your employee do not deviate from the frozen offer letter amount."})]}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Total Fixed Annual Remuneration (Amount)",children:$("annual_base_pay",{initialValue:Se&&Se.annual_base_pay||u.annual_base_pay,rules:[Ac]})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow",dependencies:["country_code"],onChange:function(e){De(e,"annual_base_pay")},parser:function(e){return(0,Y.jQ)(e),e.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"")}}))}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light",children:re})]}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Joining Bonu
1s (Optional)",children:$("joining_bonus",{initialValue:Se&&Se.joining_bonus||u.joining_bonus,rules:[{required:!1}]})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow",onChange:function(e){return De(e,"joining_bonus")},parser:function(e){return(0,Y.jQ)(e),e.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"")}}))}),ce,K("joining_bonus")&&(0,E.jsx)(hs.Z.Item,{label:"",children:$("joining_bonus_conditional_on_doj",{initialValue:K("joining_bonus_conditional_on_doj"),rules:[{required:!1}]})((0,E.jsx)(S.Z,{className:"checkbox-size-20",checked:K("joining_bonus_conditional_on_doj"),onChange:function(e){return G({joining_bonus_conditional_on_doj:e.target.value})},children:(0,E.jsx)("div",{className:"r-text-size-16",children:"Conditional on DOJ?"})}))}),K("joining_bonus_conditional_on_doj")&&(0,E.jsx)("div",{className:"text-size-16 text-lineHeight text-color-dark-grey-dark border-radius-6 mb-12 p-10 mt-4",style:{background:"#FFDDA2"},children:(0,E.jsx)("div",{children:'Addition text will be added in the offer letter - "Disbursal of the Joining Bonus is subject to you joining on or before the Start Date mentioned in this offer letter."'})})]}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Total Variable Annual Remuneration (Optional)",children:$("variable_pay",{initialValue:Se&&Se.variable_pay||u.variable_pay})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow",dependencies:["country_code"],onChange:function(e){De(e,"variable_pay")},parser:function(e){return(0,Y.jQ)(e),e.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"")}}))}),se]}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Variable Annual Remuneration Description (Optional)",children:$("variable_pay_text",{initialValue:Se&&Se.variable_pay_text||u.variable_pay_text})((0,E.jsx)(C.Z.TextArea,{className:"input-bg-grey border-radius-6 inner-shadow"}))})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:(0,E.jsx)("span",{children:"Retention Bonus (Payable after one year)"}),children:$("retention_bonus",{initialValue:Se&&Se.retention_bonus||u.retention_bonus,rules:[{required:!1}]})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow",onChange:function(e){return De(e,"retention_bonus")},parser:function(e){return(0,Y.jQ)(e),e.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"")}}))}),me]}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"",children:$("retention_bonus_frequency",{initialValue:"yearly"===(null===Se||void 0===Se?void 0:Se.retention_bonus_frequency)||"yearly"===u.retention_bonus_frequency,rules:[{required:!0}]})((0,E.jsx)(S.Z,{className:"checkbox-size-20",checked:K("retention_bonus_frequency"),onChange:function(e){return G({retention_bonus_frequency:e.target.value})},children:(0,E.jsxs)("div",{className:"r-text-size-16",children:["Retention Bonus will be paid"," ",(0,E.jsx)("span",{className:"text-weight-500",children:"yearly"})]})}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Joining Date",children:$("joining_date",{initialValue:u.joining_date?is()(u.joining_date,"YYYY-MM-DD"):null,rules:[Ac]})((0,E.jsx)(ns.Z,{placeholder:"yyyy-mm-dd",className:"input-size-48 profile__edit-datepicker border-radius-6 inner-shadow"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Notice Period Post Probation (in days)",children:$("notice_period",{initialValue:u.notice_period||30,rules:[Ac]})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})})]})}),(0,E.jsx)("div",{className:"dashboard-card mb-8",style:{padding:t?"20px 12px 12px":"20px"},children:(0,E.jsxs)(_.Z,{gutter:[24,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"round-100 d-flex align-items-center justify-content-center mr-16",style:{width:t?"40px":"48px",height:t?"40px":"48px",backgroundColor:"#B5E4C9"},children:(0,E.jsx)(d.Z,{component:rc,className:"icon-size-20"})}),(0,E.jsx)("div",{className:"text-size-".concat(t?"16":"18"," text-weight-500 text-color-dark-grey-dark"),children:"Probation Details"})]})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Probation Period (in months)",children:$("probation_period",{initialValue:u.probation_period||3,rules:[Ac]})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Notice Period during Probation (in days)",children:$("probation_notice_period",{initialValue:u.probation_notice_period||15,rules:[Ac]})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey border-radius-6 inner-shadow"}))})})]})}),(0,E.jsx)("div",{className:"dashboard-card mb-8",style:{padding:t?"20px 12px 12px":"20px"},children:(0,E.jsxs)(_.Z,{gutter:[24,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"round-100 d-flex align-items-center justify-content-center mr-16",style:{width:t?"40px":"48px",height:t?"40px":"48px",backgroundColor:"#DCE2F9"},children:(0,E.jsx)(d.Z,{component:ic.r,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-".concat(t?"16":"18"," text-weight-500 text-color-dark-grey-dark"),children:"Hiring Manager"})]})}),(0,E.jsx)(El,{getFieldDecorator:$,getFieldValue:K,setFieldsValue:G,hiringManager:ze,newEmployee:u,managerOptions:F,managerOptionsLoading:!I||A,editType:he,setE
1ditType:fe})]})}),(0,E.jsx)("div",{className:"dashboard-card mb-8",style:{padding:t?"20px 12px 12px":"20px"},children:(0,E.jsxs)(_.Z,{gutter:[24,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"round-100 d-flex align-items-center justify-content-center mr-16",style:{width:t?"40px":"48px",height:t?"40px":"48px",backgroundColor:"#FFDDA2"},children:(0,E.jsx)(d.Z,{component:ac.r,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-".concat(t?"16":"18"," text-weight-500 text-color-dark-grey-dark"),children:"Business Owner"})]})}),(0,E.jsx)(Pl,{getFieldDecorator:$,getFieldValue:K,setFieldsValue:G,businessOwner:Ee,newEmployee:u,ownerOptions:R,ownerOptionsLoading:!q||T,editType:ye,setEditType:ve})]})}),(0,E.jsx)(mc,{getFieldDecorator:$,getFieldValue:K,setFieldsValue:G,fieldName:"assetsAr",assetOptions:k,assetOptionsLoading:!P||O,assetsAr:u.assets,defaultCurrency:u.salary_currency})]}),(0,E.jsxs)("div",{className:"mobile",children:[(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl mb-12 text-weight-500 text-size-16 border-radius-8",disabled:p,block:!0,onClick:function(){Pe()},children:(0,E.jsxs)("div",{children:[p?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-20 mr-12"}):null,(0,E.jsx)("span",{className:"text-weight-500",children:"Save & Continue"})]})}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16 border border-color-grey text-color-blue",type:"default",block:!0,style:{padding:"0 20px",background:"transparent"},onClick:function(){p||l(!1)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Cancel"})})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between desktop",children:[(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 20px",background:"transparent"},onClick:function(){p||l(!1),fe(null),ve(null)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Cancel"})}),(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl mb-4 text-weight-500 text-size-16 border-radius-8 ml-20",disabled:p,onClick:function(){Pe()},children:(0,E.jsxs)("div",{children:[p?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-20 mr-12"}):null,(0,E.jsx)("span",{className:"text-weight-500",children:"Save & Continue"})]})})]})]})}Mc.defaultProps={legalEntity:null};var Rc=hs.Z.create({name:"BasicInfo"})(Mc),Tc=(0,i.$j)((function(e){return{profileUuid:e.auth.auth.profile_uuid,loginMeta:e.auth.auth.login_meta,newEmployee:e.employ.newEmployee,currencyList:e.taxonomy.currencyList,currencyListFetched:e.taxonomy.currencyListFetched,countryCodeList:e.taxonomy.countryCodeList,countryCodeListFetched:e.taxonomy.countryCodeListFetched,createEmployeeLoading:e.employ.createEmployeeLoading,assets:e.employ.assets,assetsLoading:e.employ.assetsLoading,assetsFetched:e.employ.assetsFetched,managers:e.employ.managers,managersLoading:e.employ.managersLoading,managersFetched:e.employ.managersFetched,owners:e.employ.owners,ownersLoading:e.employ.ownersLoading,ownersFetched:e.employ.ownersFetched,currencyRates:e.taxonomy.currencyRates,currencyRatesFetched:e.taxonomy.currencyRatesFetched,legalEntity:e.auth.auth.legal_entity}}),(function(e){return{fetchCurrencyList:function(t){return e(w.hLp(t))},fetchCountryCodeList:function(t){return e(w.mAR(t))},createNewEmployee:function(t,n){return e(w.A8V(t,n))},getCompanyAssets:function(t,n){return e(w.X9F(t,n))},getCompanyManagers:function(t,n){return e(w.Huh(t,n))},getCompanyOwners:function(t,n){return e(w.Flp(t,n))},fetchCurrencyRates:function(){return e(w.KHA())}}}))(Rc),qc=Io.Z.Step,Bc=function(e){var t=(0,za.Z)("(max-width: 767px)"),n=e.setShowNewHire,i=(0,r.useState)(0),a=i[0],s=i[1];return(0,E.jsx)("div",{className:"container-960",style:{marginLeft:0},children:(0,E.jsxs)("div",{className:"page-wrapper add-new-employee",style:{overflow:"visible"},children:[(0,E.jsx)(Fa.Z,{title:"Employees",style:{padding:"0 ".concat(t?"18px":"1.25rem")}}),(0,E.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-4 pl-16",children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark",children:"Adding a new employee"})}),(0,E.jsxs)("div",{style:{padding:"0 ".concat(t?"1rem":"0")},children:[(0,E.jsxs)(Io.Z,{className:"dashboard-steps-navigation",type:"navigation",current:a,children:[(0,E.jsx)(qc,{title:"1. Basic Info",icon:(0,E.jsx)("span",{})}),(0,E.jsx)(qc,{title:"2. Offer Letter",icon:(0,E.jsx)("span",{})}),(0,E.jsx)(qc,{title:"3. Billing",icon:(0,E.jsx)("span",{})}),(0,E.jsx)(qc,{title:"4. Done",icon:(0,E.jsx)("span",{})})]}),(0,E.jsx)("div",{className:"pt-12",children:function(){switch(a){case 1:return(0,E.jsx)(Bo,{step:a,setStep:s});case 2:return(0,E.jsx)(Wo,{step:a,setStep:s});case 3:return(0,E.jsx)(Jo,{step:a,setStep:s,setShowNewHire:n});default:return(0,E.jsx)(Tc,{step:a,setStep:s,setShowNewHire:n})}}()})]})]})})},Vc=n(57540),Yc=function(e){var t=e.agreement,n=e.loading,i=(0,r.useRef)(),a=(0,r.useState)(null),s=a[0],l=a[1];return(0,r.useLayoutEffect)((function(){if(!n&&t&&i.current){var e=i.current.contentWindow.document;e.open(),e.write(t),e.close(),l(e.body.offsetHeight+16)}}),[n,t]),n?(0,E.jsx)("div",{className:"w-100 h-100 d-flex align-items-center justify-content-center",children:(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24"})}):t?(0,E.jsx)("div",{className:"text-color-dark-grey-dark",children:(0,E.jsx)("iframe",{ref:i,width:"100%",height:s,frameBorder:"0",scrolling:"no",src:"about:blank"})}):null},Hc=function(e){var t=e.activeModal,n=e.setActiveModal,i=e.legalEntity,a=e.previewLoading,s=e.samplePreview,l=(0,r.useState)(""),o=l[0],c=l[1],u=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,V.V4)("legal-entity/download-msa?legal_entity_id=".concat(i.uuid,"&sample=true"));case 3:(t=e.sent)&&c(t),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();if((0,r.useEffect)((function(){u()}),[]),"sample"===t)return(0,E.jsxs)(y.Z,{className:"msa-modal",visible:"sample"===t,onCancel:function(){return n("")},centered:!0,width:720,maskStyle:{},closeIcon:(0,E.jsx)(d.Z,{component:X.r,className:"text-color-dark-grey-dark d-none"}),bodyStyle:{padding:"0"},footer:(0,E.jsx)("div",{className:"d-flex justify-content-end",style:{padding:"10px 14px"},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{style:{width:"160px"},children:(0,E.jsx)(j.Z,{type:"link",block:!0,className:"text-color-dark-grey text-weight-500",onClick:function(){return n("")},children:"Cancel"})}),(0,E.jsx)("div",{style:{width:"200px"},children:(0,E.jsx)(j.Z,{type:"primary",block:!0,className:"btn-size-xl text-weight-500 text-size-16 border-radius-6",onClick:function(){return n("required_fields")},children:"Continue"})})]})}),children:[(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-lineHeight",style:{padding:"20px 30px 0"},children:[(0,E.jsx)("div",{className:"text-weight-500 text-size-24 mb-8",children:"Sign the MSA to add Employees"}),(0,E.jsxs)("div",{className:"text-size-16 mb-12",children:["MSA aka Master Service Agreement is the agreement between kaamwork and ",i.name,". You only need to sign this once."]}),(0,E.jsxs)("div",{style:{backgroundColor:"rgba(255,209,131, 0.3",padding:"4px 8px"},className:"border-radius-4 d-flex align-items-center mb-12",children:[(0,E.jsx)(d.Z,{className:"icon-size-24 mr-12",component:Vc.r}),(0,E.jsx)("div",{className:"text-size-16 text-yellow-dark",children:"Signing MSA is not mandatory to onboard Contractors."})]})]}),(0,E.jsxs)("div",{className:"agreement-wrapper",style:{maxHeight:"380px",height:"380px",overflow:"auto",padding:"25px 30px 0 30px",background:"#7C7F88",position:"relative"},children:[(0,E.jsxs)(j.Z,{type:"dark",className:"text-size-16 d-flex text-weight-500 line-height-20 round-20 pl-20 pr-20 pb-8 pt-8 download-btn-black",href:o,disabled:""===o,target:"_blank",style:{position:"absolute",top:"20px",right:"20px",paddingTop:"8px",justifyContent:"center",alignItems:"center",height:"40px"},children:[""===o?(0,E.jsx)(d.Z,{type:"loading"}):(0,E.jsx)(d.Z,{type:"download"}),""===o?"Creating PDF":"Download"]}),(0,E.jsx)(Yc,{loading:a,agreement:s})]})]})};Hc.defaultProps={activeModal:""};var Wc=Hc;
1function Jc(){return Jc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jc.apply(this,arguments)}function Uc(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var $c=r.createElement("title",null,"Info"),Gc=r.createElement("g",{id:"Info",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M4,12 C4,16.4153 7.5847,20 12,20 C16.4153,20 20,16.4153 20,12 C20,7.5847 16.4153,4 12,4 C7.5847,4 4,7.5847 4,12 Z",id:"Stroke-2",stroke:"#E39E27",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:12,y1:16,x2:12,y2:11,id:"Stroke-4",stroke:"#E39E27",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M11.9971,7 C12.549,7 12.9971,7.4481 12.9971,8 C12.9971,8.5519 12.549,9 11.9971,9 C11.4452,9 10.9971,8.5519 10.9971,8 C10.9971,7.4481 11.4452,7 11.9971,7 Z",id:"Fill-5",fill:"#E39E27"})),Kc=function(e){var t=e.svgRef,n=e.title,i=Uc(e,["svgRef","title"]);return r.createElement("svg",Jc({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?$c:n?r.createElement("title",null,n):null,Gc)},Qc=r.forwardRef((function(e,t){return r.createElement(Kc,Jc({svgRef:t},e))})),Xc={required:!0,message:"Required"},ed=hs.Z.create({name:"RequiedFields"})((function(e){var t,n=e.activeModal,i=e.setActiveModal,a=e.setContextVariable,s=e.form,o=s.getFieldDecorator,c=(s.getFieldValue,(0,r.useState)(!1)),u=c[0],m=c[1];return(0,E.jsx)(y.Z,(t={className:"authorised-sign-msa msa-modal",visible:"required_fields"===n,onCancel:function(){return i("")},width:600,centered:!0,closeIcon:(0,E.jsx)(d.Z,{component:X.r,className:"text-color-dark-grey-dark"}),bodyStyle:{padding:"30px 40px"},footer:null},(0,h.Z)(t,"centered",!0),(0,h.Z)(t,"children",(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-lineHeight",children:[(0,E.jsx)("div",{className:"text-weight-500 text-size-24 mb-24",children:"Please fill the below info to continue"}),(0,E.jsxs)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),s.validateFieldsAndScroll((function(e,t){e||a(t)}))},children:[(0,E.jsxs)("div",{className:"mb-16",children:[(0,E.jsx)(hs.Z.Item,{label:"One-line Description of Your Business",children:o("VAR_CLIENT_BUSINESS",{rules:[Xc]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey"}))}),(0,E.jsx)(hs.Z.Item,{label:"",valuePropName:"checked",className:"mt-12",children:o("authorised",{rules:[Xc]})((0,E.jsx)(S.Z,{className:"text-size-18 line-height-24",onChange:function(e){m(e.target.checked)},children:"I am authorised to sign MSA"}))}),(0,E.jsxs)("div",{className:"info text-size-16 text-color-dark-grey-dark p-12 pl-40 mt-8",style:{borderRadius:"6px",backgroundColor:"rgba(255, 209, 131, 0.30)",position:"relative"},children:[(0,E.jsx)(d.Z,{component:Qc,className:"text-size-24",style:{position:"absolute",top:"12px",left:"12px"}}),"If you are not authorised to sign the MSA, you can invite your team member who has the authority.",(0,E.jsx)("br",{}),(0,E.jsx)(l(),{className:"link-blue text-weight-500",href:"/company-portal/hire/team",children:(0,E.jsx)("a",{className:"link-blue text-size-16 text-weight-500 mt-8 d-inline-block",children:"Invite a Team Member"})})]})]}),(0,E.jsx)("div",{className:"d-flex justify-content-end",children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{style:{width:"160px"},children:(0,E.jsx)(j.Z,{type:"link",block:!0,className:"text-color-dark-grey text-weight-500",onClick:function(){return i("")},children:"Cancel"})}),(0,E.jsx)("div",{style:{width:"200px"},children:(0,E.jsx)(j.Z,{type:"primary",block:!0,htmlType:"submit",disabled:!u,className:"btn-size-xl text-weight-500 text-size-16 border-radius-6",children:"Continue to Sign"})})]})})]})]})),t))})),td=function(e){var t=e.activeModal,n=e.setActiveModal,r=e.legalEntity,i=e.previewLoading,a=e.signLoading,s=e.signAgreement,l=e.agreementPreview,o=e.signatureName,c=e.setSignatureName;return"sign"===t?(0,E.jsxs)(y.Z,{className:"msa-modal",visible:"sign"===t,onCancel:function(){return n("")},centered:!0,width:720,closeIcon:(0,E.jsx)(d.Z,{component:X.r,className:"text-color-dark-grey-dark d-none"}),bodyStyle:{padding:"0"},footer:null,children:[(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-lineHeight",style:{padding:"20px 30px 0"},children:[(0,E.jsx)("div",{className:"text-weight-500 text-size-24 mb-8",children:"Sign the MSA to add Employees"}),(0,E.jsxs)("div",{className:"text-size-16 mb-12",children:["MSA aka Master Service Agreement is the agreement between kaamwork and ",r.name,". You only need to sign this once."]}),(0,E.jsxs)("div",{style:{backgroundColor:"rgba(255,209,131, 0.3",padding:"4px 8px"},className:"border-radius-4 d-flex align-items-center mb-12",children:[(0,E.jsx)(d.Z,{className:"icon-size-24 mr-12",component:Vc.r}),(0,E.jsx)("div",{className:"text-size-16 text-yellow-dark",children:"Signing MSA is not mandatory to onboard Contractors."})]})]}),(0,E.jsx)("div",{className:"agreement-wrapper",style:{maxHeight:"320px",overflow:"auto",borderTop:"1px solid #D5DAEC",borderBottom:"1px solid #D5DAEC",padding:"25px 30px 0 30px",background:"#7C7F88",position:"relative"},children:(0,E.jsx)(Yc,{loading:i,agreement:l})}),(0,E.jsxs)("div",{className:"pt-12 pl-30 pr-30",children:[(0,E.jsx)("div",{className:"mb-4",children:(0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey",onChange:function(e){return t=e.target.value,void c(t);var t},disabled:r&&r.is_msa_signed}
1)}),(0,E.jsx)("div",{className:"ml-20 text-size-14 text-color-dark-grey-light",children:"Enter your full name. This will be your signature."})]}),(0,E.jsx)("div",{className:"d-flex justify-content-end",style:{padding:"12px 30px 20px"},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{style:{width:"160px"},children:(0,E.jsx)(j.Z,{type:"link",block:!0,className:"text-color-dark-grey text-weight-500",onClick:function(){return n("")},children:"Cancel"})}),(0,E.jsx)("div",{style:{width:"200px"},children:(0,E.jsx)(j.Z,{type:"primary",block:!0,className:"btn-size-xl text-weight-500 text-size-16 border-radius-6",onClick:s,disabled:!o,loading:a,children:"Sign MSA"})})]})})]}):null};td.defaultProps={signatureName:""};var nd=td,rd=function(e){var t=e.activeModal,n=e.setActiveModal,r=(e.msaUrl,e.startAddNewHire);return"download"===t?(0,E.jsx)(y.Z,{visible:"download"===t,onCancel:function(){return n("")},centered:!0,closeIcon:(0,E.jsx)(d.Z,{component:X.r,className:"text-color-dark-grey-dark d-none"}),width:420,footer:null,bodyStyle:{padding:"20px 30px 30px"},children:(0,E.jsxs)("div",{className:"d-flex flex-column justify-content-center text-lineHeight",children:[(0,E.jsx)(d.Z,{component:Va.r,className:"icon-green text-size-48 mb-16"}),(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-center text-color-dark-grey-dark mb-18",children:"Successfully Signed"}),(0,E.jsx)("div",{className:"text-size-16 text-weight-400 text-center text-color-dark-grey-light",children:"You have successfully signed the MSA."}),(0,E.jsx)("div",{className:"text-size-16 text-weight-400 text-center text-color-dark-grey-light",style:{width:"315px",margin:"auto"},children:"You can view and download the agreement anytime in your Settings > MSA."}),(0,E.jsx)("div",{className:"text-size-16 text-weight-400 text-center text-color-dark-grey-light mb-40",children:"You can onboard a new hire."}),(0,E.jsxs)("div",{className:"d-flex flex-column",style:{width:"220px",margin:"auto"},children:[(0,E.jsx)(j.Z,{className:"btn-size-xl text-weight-500 border-radius-6 mb-20",type:"primary",onClick:r,children:"Add a New Hire"}),(0,E.jsx)("div",{className:"text-weight-500 text-center cursor-pointer border-radius-6 border-color-grey text-color-dark-grey-dark",style:{border:0},onClick:function(){return n("")},children:"Maybe Later"})]})]})}):null};function id(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ad(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?id(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):id(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sd=(0,i.$j)((function(e){return{legalEntity:e.auth.auth.legal_entity,updateLegalEntityLoading:e.auth.updateLegalEntityLoading}}),(function(e){return{signMSAgreement:function(t,n){return e(w.gMo(t,n))}}}))((function(e){var t=e.setShowMSAModal,n=e.legalEntity,i=e.signMSAgreement,a=e.updateLegalEntityLoading,s=e.startAddNewHire,l=(0,r.useState)("sample"),o=l[0],c=l[1],d=(0,r.useState)(null),u=d[0],m=d[1],p=(0,r.useState)(!1),x=p[0],h=p[1],f=(0,r.useState)(null),y=f[0],v=f[1],j=(0,r.useState)(null),b=j[0],w=j[1],k=(0,r.useState)(""),N=k[0],_=k[1],Z=(0,r.useState)(""),C=Z[0],O=Z[1],S=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t,r,i,a,s,l=arguments;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=l.length>0&&void 0!==l[0]&&l[0],h(!0),e.prev=2,r="legal-entity/preview-msa",i={legal_entity_id:n.uuid,ip_address:"127.0.0.1"},!t&&u&&(i.context_variables=u),t&&(r+="?sample=true"),e.next=9,fetch("".concat((0,V.dN)(),"/").concat(r),{method:"POST",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"},body:JSON.stringify(i)});case 9:return a=e.sent,e.next=12,a.text();case 12:s=e.sent,t?v(s):(w(s),c("sign")),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),g.Z.error("Some error occured while fetcing offer letter. Please try again. Contact us if the issue persists.");case 19:return e.prev=19,h(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=(0,tr.Z)(Qn().mark((function e(){return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i({legal_entity_id:n.uuid,context_variables:ad({},u),signature:C},{onSuccess:function(e){var t=e.msa_url;_(t),c("download")},onFail:function(e){return g.Z.error(e)}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)((function(){""===o?t(!1):"sample"===o?S(!0):"required_fields"===o&&u&&S()}),[o,u]),"sample"===o?(0,E.jsx)(Wc,{activeModal:o,setActiveModal:c,legalEntity:n,previewLoading:x,samplePreview:y}):"required_fields"===o?(0,E.jsx)(ed,{activeModal:o,setActiveModal:c,setContextVariable:m}):"sign"===o?(0,E.jsx)(nd,{activeModal:o,setActiveModal:c,legalEntity:n,previewLoading:x,signLoading:a,agreementPreview:b,
1signAgreement:z,msaUrl:N,signatureName:C,setSignatureName:O}):"download"===o?(0,E.jsx)(rd,{activeModal:o,setActiveModal:c,msaUrl:N,startAddNewHire:s}):null})),ld=function(){var e=(0,i.v9)((function(e){var t,n,r;return null===(t=e.auth.auth)||void 0===t||null===(n=t.login_meta)||void 0===n||null===(r=n.company)||void 0===r?void 0:r.company_id})),t=(0,r.useState)(!1),n=t[0],a=t[1],s=(0,r.useState)("all"),l=s[0],o=s[1],c=(0,r.useState)(""),d=(c[0],c[1],(0,r.useState)("")),u=(d[0],d[1],(0,r.useState)(!1)),m=u[0],p=u[1],x=(0,r.useState)([]),h=x[0],f=x[1],v=function(){a(!1),o("all"),f([])},b=function(){var t={clustering_company_id:e,fields:{}};"all"!==l&&(t.employment_status=l),null===h||void 0===h||h.forEach((function(e){t.fields[e]=!0})),p(!0),(0,V.PY)("company/employee-list",t).then((function(e){var t,n;(p(!1),console.log(e),(0,Y.HH)(e))?(window.open(e,"_blank").focus(),g.Z.success("Download Success"),v()):g.Z.warn(null===(t=JSON.parse(e))||void 0===t||null===(n=t.data)||void 0===n?void 0:n.message)})).catch((function(e){var t,n,r;p(!1);var i=(null===e||void 0===e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.error)||void 0===r?void 0:r.message)||(null===e||void 0===e?void 0:e.message)||"Something went wrong";g.Z.error(i),console.log(e)}))};return(0,E.jsxs)("div",{className:"text-right mb-8",children:[(0,E.jsx)(j.Z,{className:"ant-btn btn-size-xl border-radius-8 text-weight-500 text-size-16",style:{padding:"0px 2rem",background:"transparent",border:"1px solid rgb(213, 218, 236)",color:"rgb(42, 76, 213)"},onClick:function(){return a(!0)},children:"Download CSV"}),(0,E.jsx)(y.Z,{visible:n,footer:!1,centered:!0,closable:!1,destroyOnClose:!0,onCancel:v,bodyStyle:{padding:"30px",borderRadius:"8px",boxShadow:"0 4px 16px 0 #7C7F88"},width:480,className:"full-screen-mobile-modal",children:(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark",children:[(0,E.jsx)("div",{className:"text-size-28-24 text-weight-500 mb-20",children:"Please select the desired fields"}),(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark mb-4",children:"Choose a category"}),(0,E.jsxs)(q.ZP.Group,{className:"radio-group-list mb-4",onChange:function(e){return o(e.target.value)},value:l,children:[(0,E.jsx)(q.ZP,{className:"w-100",value:"active",children:"Active Employees"}),(0,E.jsx)(q.ZP,{className:"w-100",value:"onboarding",children:"Onboarding Employees"}),(0,E.jsx)(q.ZP,{className:"w-100",value:"ended",children:"Inactive Employees"}),(0,E.jsx)(q.ZP,{className:"w-100",value:"all",children:"All Employees"})]}),(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark mb-4 mt-20",children:"Choose columns"}),(0,E.jsx)(S.Z.Group,{className:"checkbox-group-list",options:od,onChange:function(e){console.log(e),f(e)}}),(0,E.jsxs)("div",{className:"d-flex flex-row-reverse align-items-center desktop mt-20",children:[(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-size-16 text-weight-500",loading:m,onClick:function(){b()},children:"Download"}),(0,E.jsx)("div",{className:"mr-24 text-color-dark-grey-light text-weight-500 cursor-pointer",onClick:v,children:"Cancel"})]}),(0,E.jsxs)("div",{className:"ml-18 mr-18 mobile mt-20",style:{position:"absolute",bottom:"30px",left:"0",right:"0"},children:[(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-size-16 text-weight-500 mb-8 border-radius-8",block:!0,onClick:function(){b()},children:"Download"}),(0,E.jsx)(j.Z,{type:"default",className:"btn-size-xl text-size-16 text-weight-500 text-color-blue border border-color-grey border-radius-8",block:!0,onClick:v,children:"Cancel"})]})]})})]})},od=[{label:"First Name",value:"first_name"},{label:"Last Name",value:"last_name"},{label:"Email",value:"email"},{label:"Gender",value:"gender"},{label:"Phone Number",value:"phone_number"},{label:"Designation",value:"designation"},{label:"Remuneration",value:"remuneration"},{label:"Joining Date",value:"date_of_joining"},{label:"Last working day",value:"last_working_day"}],cd=ja.Z.TabPane,dd=["offer_created","offer_sent","offer_signed"],ud=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return(0,E.jsxs)("div",{className:"mt-100 text-center",children:[(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",children:e?(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{children:"Your \u2018Employee Dashboard\u2019 is empty."}),"manager"!==n&&(0,E.jsx)("div",{children:"Start by adding your first employee."})]}):"No employees found"}),className:"mb-20"}),e&&"manager"!==n?(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-weight-500 round-8",onClick:t,children:(0,E.jsxs)("div",{className:"d-flex align-items-center pr-16 pl-12",children:[(0,E.jsx)(d.Z,{component:ne.r,className:"icon-size-24 mr-4",style:{paddingTop:2}})," ","Add New Hire"]})}):null]})},md=[{name:"NAME",key:"name",space:12},{name:"START DATE",key:"start_date",space:6},{name:"LEAVING DATE",key:"leaving_date",space:3},{name:"EDIT",key:"edit",space:3}
1],pd=(0,i.$j)((function(e){return{employeeList:e.employ.employeeList,loginMeta:e.auth.auth.login_meta,legalEntity:e.auth.auth.legal_entity,employeeListLoading:e.employ.employeeListLoading,employeeListFetched:e.employ.employeeListFetched,companyAccessRole:e.auth.companyAccessRole}}),(function(e){return{getEmployeeList:function(t,n){return e(w.Jbl(t,n))},updateNewEmployee:function(t){return e(w.hzs(t))},getLegalEntity:function(){return e(w.Vvp())},getCompanyAccessRole:function(){return e(w.yKy())}}}))((function(e){var t=e.employeeList,n=e.getEmployeeList,i=e.updateNewEmployee,a=e.loginMeta,s=e.employeeListLoading,l=(e.employeeListFetched,e.legalEntity),o=e.getLegalEntity,c=e.companyAccessRole,u=e.getCompanyAccessRole,m=(0,za.Z)("(max-width: 767px)"),p=(0,r.useState)(!1),x=p[0],h=p[1],f=(0,r.useState)(!1),g=f[0],v=f[1],b=null;a&&a.company&&(b=a.company.company_id),(0,r.useEffect)((function(){c&&c===a.company.roles[0]||u()}),[c,a]),(0,r.useEffect)((function(){x||n({companyId:b})}),[x,c]),(0,r.useEffect)((function(){l&&!l.is_msa_signed&&o()}),[]);var w=t.filter((function(e){return"deleted"!==e.employment_status})),k=[],N=[],_=[],Z=[],C=[];t.forEach((function(e){"active"===e.employment_status&&null!=e.leaving_date?C.push(e):"active"===e.employment_status?k.push(e):"ended"===e.employment_status?_.push(e):dd.indexOf(e.employment_status)>-1?N.push(e):"offer_void"===e.employment_status&&Z.push(e)}));var O=function(){l.is_msa_signed?(i({}),h(!0)):"admin"!==c?y.Z.info({title:(0,E.jsx)("div",{className:"r-text-size-20",children:"Master Service Agreement is not signed"}),content:(0,E.jsx)("div",{className:"r-text-size-16 text-color-dark-grey-light mb-24",children:"Contact your Company Admin to sign Master Service Agreement."}),centered:!0,width:"480px"}):v(!0)},S=function(e){return s?(0,E.jsxs)("div",{className:"text-center mt-24",children:[(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 mr-12"}),(0,E.jsx)("span",{className:"text-size-16 text-color-dark-grey-dark",children:"Fetching employees"})]}):e.length?(0,E.jsx)(Ao,{columns:md,employeeList:e,setShowNewHire:h}):ud(!1,O,c)};return x?(0,E.jsx)(Bc,{setShowNewHire:h}):(0,E.jsxs)("div",{className:"page-wrapper",children:[(0,E.jsx)(Fa.Z,{title:"Employees"}),(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-16",children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark page-title",children:"Employees"}),"manager"!==c?(0,E.jsx)(j.Z,{style:{padding:"0 30px"},className:"btn-size-xl border-radius-8 text-size-16 text-weight-500",block:m,onClick:O,children:(0,E.jsxs)("div",{className:"d-flex align-items-center text-blue text-weight-500",children:[(0,E.jsx)(d.Z,{component:ne.r,className:"icon-size-24 mr-4",style:{paddingTop:2}})," ","Add New Hire"]})}):null]}),(0,E.jsx)(ld,{}),g&&"admin"===c?(0,E.jsx)(sd,{showMSAModal:g,setShowMSAModal:v,startAddNewHire:O}):null,w.length?"manager"===c?S(k):(0,E.jsxs)(ja.Z,{className:"tabs-blue",defaultActiveFirstOption:!0,animated:!1,children:[(0,E.jsx)(cd,{tab:"All (".concat(w.length,")"),children:S(w)},"all"),(0,E.jsx)(cd,{tab:"Active (".concat(k.length,")"),children:S(k)},"active"),(0,E.jsx)(cd,{tab:"Serving Notice (".concat(C.length,")"),children:S(C)},"servingNotice"),(0,E.jsx)(cd,{tab:"Onboarding (".concat(N.length,")"),children:S(N)},"onboarding"),(0,E.jsx)(cd,{tab:"Inactive (".concat(_.length,")"),children:S(_)},"inactive"),(null===Z||void 0===Z?void 0:Z.length)&&(0,E.jsx)(cd,{tab:"Void (".concat(Z.length,")"),children:S(Z)},"voidOffer")]}):ud(!0,O,c)]})})),xd=n(86658),hd=n(7291),fd=n(7145),gd=n.n(fd),yd=n(1115),vd=n(58972),jd=n(72103),bd=n(78927),wd=n(59503),kd=n(83759);function Nd(e){var t=e.findType,n=e.roleFilters,r=e.updateFindFilters;return(0,E.jsx)(wd.Z,{type:"Role",findType:t,placeholder:"Role",onSelectionRemove:function(){r("role_prop_filters",[])},onReset:function(){n.length&&r("role_prop_filters",[])},values:n.map((function(e){return e.name})),dropdownRender:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{padding:"20px 20px 10px"},children:(0,E.jsx)(Q.Z,{selectedItems:n,onItemSelect:function(e){r("role_prop_filters",e)},type:"role"})}),n.length?(0,E.jsx)("div",{style:{padding:"20px 20px 16px"},className:"d-flex align-items-center flex-wrap",children:n.map((function(e){return(0,E.jsxs)("div",{className:"find-job-sub-filter-selected-value mr-4 mb-4",children:[(0,E.jsx)("div",{className:"mr-8",children:e.name}),(0,E.jsx)(kd.Z,{children:(0,E.jsx)(d.Z,{className:"cursor-pointer",component:X.r,onClick:function(){var t,i;r("role_prop_filters",(t=n,i=e.name,t.filter((function(e){return e.name!==i}))))}})})]},e.uuid)}))}):null]})})}
1Nd.defaultProps={findType:null};var _d=Nd;function Zd(e){var t=e.findType,n=e.companyTypeFilters,r=e.updateFindFilters,i={};n.forEach((function(e){i[e.company_type]=!0}));var a=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=new Set;n.forEach((function(e){i.add(e.company_type)})),t?i.add(e):i.has(e)&&i.delete(e);var a=[];i.forEach((function(e){a.push({company_type:e})})),r("company_type_prop_filters",a)};return(0,E.jsx)(wd.Z,{type:"Company Type",findType:t,placeholder:"Company Type",values:function(){var e={},t=[];return n.forEach((function(t){"product"===t.company_type?e.product=!0:"service"===t.company_type&&(e.service=!0)})),e.product&&t.push("Product"),e.service&&t.push("Service"),t}(),onSelectionRemove:function(){r("company_type_prop_filters",[])},onReset:function(){n.length&&r("company_type_prop_filters",[])},dropdownRender:(0,E.jsx)("div",{style:{minWidth:"300px"},children:(0,E.jsxs)("div",{style:{padding:"16px 20px"},children:[(0,E.jsx)("div",{children:(0,E.jsx)(S.Z,{className:"checkbox-size-24 mb-16",checked:i.product,onChange:function(e){a("product",e.target.checked)},children:(0,E.jsx)("div",{className:"text-weight-500",children:"Product"})})}),(0,E.jsx)("div",{children:(0,E.jsx)(S.Z,{className:"checkbox-size-24 mb-16",checked:i.service,onChange:function(e){a("service",e.target.checked)},children:(0,E.jsx)("div",{className:"text-weight-500",children:"Service"})})})]})})})}Zd.defaultProps={findType:null};var Cd=function(e){var t={},n=[];return e.forEach((function(e){"Immediate"===e.notice_period?t.immediate=!0:"1 month"===e.notice_period?t.one_month=!0:"1-3 months"===e.notice_period?t.between_one_and_three_months=!0:">3 months"===e.notice_period&&(t.more_than_three_months=!0)})),t.immediate&&n.push("Immediate"),t.one_month&&n.push("1 month"),t.between_one_and_three_months&&n.push("1-3 months"),t.more_than_three_months&&n.push(">3 months"),n};function Od(e){var t=e.findType,n=e.noticePeriodFilters,r=e.updateFindFilters,i={};n.forEach((function(e){i[e.notice_period]=!0}));var a=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=new Set;n.forEach((function(e){i.add(e.notice_period)})),t?i.add(e):i.has(e)&&i.delete(e);var a=[];i.forEach((function(e){a.push({notice_period:e})})),r("notice_period_prop_filters",a)};return(0,E.jsx)(wd.Z,{type:"Can Join Within",findType:t,placeholder:"Can Join Within",values:Cd(n),onSelectionRemove:function(){r("notice_period_prop_filters",[])},onReset:function(){n.length&&r("notice_period_prop_filters",[])},dropdownRender:(0,E.jsx)("div",{style:{minWidth:"300px"},children:(0,E.jsxs)("div",{style:{padding:"16px 20px"},children:[(0,E.jsx)("div",{children:(0,E.jsx)(S.Z,{className:"checkbox-size-24 mb-16",checked:i.Immediate,onChange:function(e){a("Immediate",e.target.checked)},children:(0,E.jsx)("div",{className:"text-weight-500",children:"Immediate"})})}),(0,E.jsx)("div",{children:(0,E.jsx)(S.Z,{className:"checkbox-size-24 mb-16",checked:i["1 month"],onChange:function(e){a("1 month",e.target.checked)},children:(0,E.jsx)("div",{className:"text-weight-500",children:"1 month"})})}),(0,E.jsx)("div",{children:(0,E.jsx)(S.Z,{className:"checkbox-size-24 mb-16",checked:i["1-3 months"],onChange:function(e){a("1-3 months",e.target.checked)},children:(0,E.jsx)("div",{className:"text-weight-500",children:"1-3 months"})})}),(0,E.jsx)("div",{children:(0,E.jsx)(S.Z,{className:"checkbox-size-24 mb-16",checked:i[">3 months"],onChange:function(e){a(">3 months",e.target.checked)},children:(0,E.jsx)("div",{className:"text-weight-500",children:">3 months"})})})]})})})}Od.defaultProps={findType:null};var Sd=function(e){var t=e.findCandidatesFilters,n=e.updateFindCandidatesFilters;return(0,E.jsxs)("div",{className:"pb-12",children:[(0,E.jsx)("div",{className:"d-inline-block",children:(0,E.jsx)(_d,{findType:"candidate",roleFilters:t.role_prop_filters||[],updateFindFilters:n})}),(0,E.jsx)("div",{className:"d-inline-block",children:(0,E.jsx)(vd.Z,{findType:"candidate",tagFilters:t.tag_prop_filters||[],experienceFilters:t.experience_req_filters||[],updateFindJobsFilters:n})}),(0,E.jsx)("div",{className:"d-inline-block",children:(0,E.jsx)(jd.Z,{findType:"candidate",skillFilters:t.skill_req_filters||[],updateFindJobsFilters:n})}),(0,E.jsx)("div",{className:"d-inline-block",children:(0,E.jsx)(bd.Z,{findType:"candidate",companyFilters:t.company_prop_filters||[],updateFindJobsFilters:n})})]})},zd=n(79053);var Ed=function(e){var t=e.candidates;return e.setInviteModalVisible,e.setCurrentCandidate,e.setInviteModal,t.length>0?t.map((function(e){return(0,E.jsx)(zd.Z,{companyView:!0,basicDetail
1s:e,photo:e.photo})})):null};var Pd=function(e){var t=e.inviteModalVisible,n=e.currentCandidate,i=e.setInviteModalVisible,a=e.inviteStatus,s=e.changeViewToPostJob,l=e.handleSendInvite,o=e.sendJobInviteLoading,c=e.jobInviteSuccess,d=e.sendJobInviteError,u=(0,r.useState)([]),m=u[0],p=u[1];return(0,r.useEffect)((function(){d.display_message&&g.Z.error(d.display_message,5)}),[d]),(0,r.useEffect)((function(){c&&(g.Z.success("Job invites has been sent",5),p([]),i(!1))}),c),(0,E.jsxs)(y.Z,{className:"candidate-invite-popup",visible:t,onCancel:function(){return i(!1)},centered:!0,closable:!1,footer:!1,children:[(0,E.jsxs)("div",{className:"candidate-invite-header",children:["Invite ",n.first_name," to apply to"]}),(0,E.jsx)("div",{className:"candidate-invite-body",children:a&&a.length>0?(0,E.jsx)(S.Z.Group,{onChange:function(e){p(e)},children:a.map((function(e,t){return(0,E.jsx)("div",{className:a.length===t+1?"candidate-invite-job candidate-invite-job-last":"candidate-invite-job",children:(0,E.jsx)(S.Z,{className:"checkbox-size-24",value:e.uuid,children:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center pr-24",children:[(0,E.jsx)("div",{className:"text-dark-grey-dark-m text-weight-500",children:e.title}),e.last_invited_on?(0,E.jsxs)("div",{className:"text-size-14 text-color-dark-grey-light pl-8",children:[(0,E.jsx)("span",{className:"d-inline-block pr-4",children:"Invited on:"}),(0,E.jsx)("span",{className:"d-inline-block",children:is()(e.last_invited_on).format("MMM DD, YYYY")})]}):null]})})},e.uuid)}))}):(0,E.jsx)("div",{className:"text-size-16 pt-8 pb-8",children:"No active jobs found"})}),(0,E.jsx)("div",{className:"candidate-invite-footer",children:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{type:"link",className:"link-grey",onClick:function(){return i(!1)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Cancel"})})}),(0,E.jsxs)("div",{children:[(0,E.jsx)(j.Z,{type:"link",onClick:function(){i(!1),s()},disabled:o,children:(0,E.jsx)("span",{className:"text-weight-500",children:"Post A New Job"})}),(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl",loading:o,disabled:0===m.length,onClick:function(){l({candidateId:n.uuid,jobIds:m})},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Send Invite"})})]})]})})]})};function Dd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dd(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ld(e){var t=e.changeViewToPostJob,n=e.candidates,i=e.candidateCount,a=e.candidateCountHumanized,s=e.findCandidates,l=e.findCandidatesFilters,o=e.setFindCandidatesFilters,c=e.findCandidatesInitialLoaded,u=e.loading,m=e.getCandidateJobInviteStatus,p=e.companyDetails,x=e.inviteStatus,f=e.sendJobInvite,g=e.sendJobInviteLoading,y=e.jobInviteSuccess,v=e.sendJobInviteError,j=e.profileUuid,b=(0,r.useState)(1),w=b[0],k=b[1],N=(0,r.useState)("recommended")[0],_=(0,r.useState)(null),Z=_[0],C=_[1],O=(0,r.useState)(null),S=O[0],z=O[1],P=(0,r.useState)(!1),D=P[0],F=P[1],L=(0,r.useState)(!1),A=L[0],I=L[1];(0,r.useEffect)((function(){s(Fd(Fd({},l),{},{page:w}))}),[]);var M=function(e){Z&&(clearTimeout(Z),C(null)),C(setTimeout(s(Fd(Fd({},l),{},{page:e})),300))};(0,r.useEffect)((function(){c&&M(w)}),[w]),(0,r.useEffect)((function(){c&&(1===w?M(w):k(1))}),[N]),(0,r.useEffect)((function(){c&&(1===w?M(w):k(1))}),[l]);return(0,r.useEffect)((function(){S&&p&&m({candidateId:S.uuid,companyId:p.clustering_id})}),[S]),(0,E.jsxs)("div",{className:"page-wrapper",style:{maxWidth:"940px"},children:[(0,E.jsx)(Fa.Z,{title:"Find Candidates"}),(0,E.jsx)(Sd,{findCandidatesFilters:l,updateFindCandidatesFilters:function(e,t){var n;if(Array.isArray(e)&&Array.isArray(t)){var r={};
1e.forEach((function(e,n){r[e]={$set:t[n]}})),n=gd()(l,r)}else n=gd()(l,(0,h.Z)({},e,{$set:t}));o(n)}}),(0,E.jsxs)("div",{style:{maxWidth:"700px"},children:[(0,E.jsx)("div",{className:"d-flex justify-content-between mb-16",children:u||i?(0,E.jsx)("div",{className:"text-dark-grey-s",children:u?(0,E.jsx)(d.Z,{type:"loading"}):"".concat(a," candidates found")}):(0,E.jsx)("div",{className:"text-dark-grey-s",children:"No candidates found"})}),(0,E.jsx)(Ed,{candidates:n,setInviteModalVisible:F,setCurrentCandidate:z,setInviteModal:I}),(0,E.jsx)(yd.Z,{total:i,pageSize:to.findCandidatesPageSize,current:w,onChange:function(e){k(e)},hideOnSinglePage:!0})]}),S?(0,E.jsx)(Pd,{inviteStatus:x,currentCandidate:S,inviteModalVisible:D,setInviteModalVisible:F,changeViewToPostJob:t,handleSendInvite:function(e){var t=e.candidateId,n=e.jobIds;f({candidateId:t,jobIds:n,inviterId:j})},sendJobInviteLoading:g,jobInviteSuccess:y,sendJobInviteError:v||{}}):null,S?(0,E.jsx)(Ha.Z,{profileUuid:S.uuid,jobId:"",viewInviteModal:A,setInviteModal:I,source:"find-candidates"}):null]})}Ld.defaultProps={candidateCount:null,candidateCountHumanized:"",sendJobInviteError:null};var Ad=Ld,Id=(0,i.$j)((function(e){return{candidates:e.candidate.candidates,candidateCount:e.candidate.candidateCount,candidateCountHumanized:e.candidate.candidateCountHumanized,loading:e.candidate.loading,findCandidatesFilters:e.candidate.findCandidatesFilters,findCandidatesInitialLoaded:e.candidate.findCandidatesInitialLoaded,companyDetails:e.company.companyDetails,inviteStatus:e.candidate.inviteStatus,sendJobInviteLoading:e.candidate.sendJobInviteLoading,profileUuid:e.auth.auth.profile_uuid,jobInviteSuccess:e.candidate.jobInviteSuccess,sendJobInviteError:e.candidate.sendJobInviteError}}),(function(e){return{findCandidates:function(t){return e(w.lzD(t))},setFindCandidatesFilters:function(t){return e(w.fO5(t))},getCandidateJobInviteStatus:function(t){return e(w.s82(t))},sendJobInvite:function(t){return e(w.JRy(t))}}}))(Ad),Md=n(97751),Rd=n(20365),Td=n.n(Rd);var qd=function(e){var t=e.handleAtsConnect,n=e.atsConnectLoading,i=(0,r.useState)(!1),a=i[0],s=i[1];return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Md.Z,{bodyStyle:{padding:"18px 20px 30px"},children:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark",children:[(0,E.jsx)("div",{className:"text-size-32 text-weight-500 mb-20",children:"Lever Sync"}),(0,E.jsx)("div",{className:"text-size-16",children:"You are connected to Lever. We will automatically upload the successful applications to your Lever account."}),(0,E.jsx)(B.Z,{style:{margin:"20px 0"}}),(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"img-60 mr-12",children:(0,E.jsx)("img",{alt:" ",src:Td()})}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500 mb-8",children:"Lever"}),(0,E.jsxs)("div",{className:"text-size-16",children:[(0,E.jsx)("span",{className:"mr-16",children:"Connected"}),(0,E.jsx)("span",{className:"text-color-green",children:"Sync Active"})]})]})]}),(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{type:"danger",className:"btn-size-xl",onClick:function(){return s(!0)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Disconnect"})})})]})]})}),(0,E.jsx)(y.Z,{centered:!0,visible:a,closeIcon:(0,E.jsx)(d.Z,{component:X.r}),onCancel:function(){return s(!1)},footer:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl btn-grey",onClick:function(){return s(!1)},children:"No"}),(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl",onClick:function(){return t({disconnect:!0})},loading:n,children:"Yes"})]}),children:(0,E.jsx)("div",{className:"text-size-18",children:"Are you sure you want to disconnect?"})})]})},Bd=n(66303),Vd=n.n(Bd),Yd=n(99534),Hd=n.n(Yd),Wd=n(62063),Jd=n.n(Wd),Ud=n(93924),$d=n.n(Ud),Gd=n(83238),Kd=n(49442);var Qd=hs.Z.create({name:"Setup"})((function(e){var t=(0,za.Z)("(max-width: 767px)"),n=e.form,r=e.handleAtsConnect,i=e.atsConnectLoading,a=n.getFieldDecorator;return(0,E.jsx)("div",{className:"container-960 ",style:{margin:0},children:(0,E.jsxs)("div",{className:"page-wrapper ",style:{overflow:"visible"},children:[(0,E.jsx)(Fa.Z,{title:"ATS Integration",style:{padding:"0 ".concat(t?"0":"1.25rem")}}),(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat("0")},children:"ATS Integration"}),(0,E.jsxs)(Md.Z,{bodyStyle:{padding:"18px 20px 30px"},children:[(0,E.jsx)("div",{className:"text-size-32 text-color-dark-grey-dark text-weight-500 mb-20",children:"Set-up Lever integration"}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark mb-28",children:"Your Lever API key will grant Kaamwork's system to access the specified data in your Lever account."}),(0,E.jsx)("div",{className:"post-job-company-info",children:(0,E.jsx)(hs.Z,{hideRequiredMark:!0,colon:!1,onSubmit:function(e){e.preventDefault(),n.val
1idateFieldsAndScroll((function(e,t){e||r({api_key:t.api_key,disconnect:!1})}))},children:(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{style:{flex:1},children:(0,E.jsx)(hs.Z.Item,{label:"Enter Lever key",children:a("api_key",{rules:[{required:!0,message:"Please check the API key settings and grant permissions for: list users, list stages, list postings, list archive reasons, find posting, create candidate"}]})((0,E.jsx)(C.Z,{className:"input-size-48"}))})}),(0,E.jsx)("div",{className:"ml-20",children:(0,E.jsx)(hs.Z.Item,{children:(0,E.jsx)(j.Z,{type:"primary",htmlType:"submit",className:"btn-size-xl mt-40",loading:i,children:(0,E.jsx)("span",{className:"text-weight-500",children:"Connect to Lever"})})})})]})})})]}),(0,E.jsxs)("div",{className:"mb-32 mt-32 ml-20 mr-20",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 mb-32",children:"Here is how to get the key from Lever"}),(0,E.jsxs)(Gd.Z,{children:[(0,E.jsx)(Kd.Z,{stepIndex:1,title:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-size-16 text-weight-400",children:["Open your ",(0,E.jsx)("a",{href:"https://hire.lever.co/",target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"underline"},children:"Lever"})," account. or click on this link",(0,E.jsx)("a",{href:"https://hire.lever.co/",target:"_blank",rel:"noopener noreferrer",children:" https://hire.lever.co/"})]})}),(0,E.jsx)(Kd.Z,{stepIndex:2,title:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-weight-400",children:"Open Settings"}),description:(0,E.jsx)("div",{className:"mt-12 mb-32 img-size-240",children:(0,E.jsx)("img",{alt:" ",src:Vd()})})}),(0,E.jsx)(Kd.Z,{stepIndex:3,title:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-weight-400",children:"Navigate to Integrations and API > API Credentials, and click on Generate New Key."}),description:(0,E.jsx)("div",{className:"mt-12 mb-32 img-size-360",children:(0,E.jsx)("img",{alt:" ",src:Hd()})})}),(0,E.jsx)(Kd.Z,{stepIndex:4,title:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-weight-400",children:"Enter a Key Name and click on Copy Key."}),description:(0,E.jsx)("div",{className:"mt-12 mb-32 img-size-360",children:(0,E.jsx)("img",{alt:" ",src:Jd()})})}),(0,E.jsx)(Kd.Z,{stepIndex:5,title:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-weight-400",children:"In the Permissions section, check read posting apply form and apply to posting"}),description:(0,E.jsx)("div",{className:"mt-12 mb-32 img-size-360",children:(0,E.jsx)("img",{alt:" ",src:$d()})})}),(0,E.jsx)(Kd.Z,{stepIndex:6,title:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-weight-400",children:"Paste this code in the above field and click on Connect to Lever."})})]})]})]})})}));var Xd=function(e){var t=e.changeViewToAllJob,n=e.changeViewToPostJob;return(0,E.jsx)(Md.Z,{bodyStyle:{padding:"40px 20px 30px"},children:(0,E.jsxs)("div",{className:"d-flex flex-column text-color-dark-grey-dark align-items-center",children:[(0,E.jsx)("div",{style:{fontSize:"60px"},className:"mb-12",children:(0,E.jsx)("span",{role:"img",children:"\ud83d\ude4c"})}),(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-20",children:"You are now connected to Lever"}),(0,E.jsx)("div",{className:"text-size-16 mb-28",children:"Please go to All Jobs and link the jobs with Lever. If you have not added any jobs, go to Post A Job."}),(0,E.jsx)("div",{className:"mb-20",children:(0,E.jsx)(j.Z,{className:"btn-size-xl",type:"primary",onClick:n,children:(0,E.jsx)("span",{className:"text-weight-500",children:"Post A Job"})})}),(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{type:"link",onClick:t,children:(0,E.jsx)("span",{className:"text-weight-500",children:"All Jobs"})})})]})})};function eu(e){var t,n=e.changeViewToAllJob,i=e.changeViewToPostJob,a=e.atsConnectLoading,s=e.atsConnectedStatus,l=e.atsConnectedSuccess,o=e.atsConnect,c=e.atsConnectStatus,u=e.loginMeta;u&&(t=u.company&&u.company.company_id),(0,r.useEffect)((function(){t&&c({companyId:t})}),[t]);var m=function(e){e.disconnect?o({companyId:t,disconnect:e.disconnect}):o({companyId:t,apiKey:e.api_key,disconnect:e.disconnect})};return a?(0,E.jsx)("div",{className:"container-960",children:(0,E.jsx)("div",{className:"w-100 d-flex justify-content-around mt-20",children:(0,E.jsx)(d.Z,{type:"loading",style:{fontSize:"36px"}})})}):s?(0,E.jsx)("div",{className:"container-960",children:l?(0,E.jsx)(Xd,{changeViewToAllJob:n,
1changeViewToPostJob:i}):(0,E.jsx)(qd,{handleAtsConnect:m,atsConnectLoading:a})}):!1===s?(0,E.jsx)(Qd,{handleAtsConnect:m,atsConnectLoading:a}):null}eu.defaultProps={atsConnectedSuccess:null,loginMeta:null};var tu=(0,i.$j)((function(e){return{atsConnectLoading:e.company.atsConnectLoading,atsConnectedStatus:e.company.atsConnectedStatus,atsConnectedSuccess:e.company.atsConnectedSuccess,loginMeta:e.auth.auth.login_meta}}),(function(e){return{atsConnect:function(t){return e(w.sff(t))},atsConnectStatus:function(t){return e(w.I_(t))}}}))(eu),nu=function(e){var t,n,r,i,a,s,l,o,c,d,u,m=e.contractor,p=e.getAvatar,x=(0,za.Z)("(max-width: 767px)"),h=m.timeline&&m.timeline.length>0;return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"mb-20",children:(0,E.jsxs)("div",{className:x?"":"d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{style:{width:x?"100%":"49%"},children:[(0,E.jsx)("div",{className:"text-size-14-16 text-weight-400 text-color-dark-grey-light mb-4",children:"Administrative details"}),(0,E.jsxs)(_.Z,{className:"border border-width-1 border-color-grey border-radius-8 p-16 d-flex align-items-center",children:[(0,E.jsx)(Z.Z,{xs:4,style:{maxWidth:"64px"},children:p()}),(0,E.jsx)(Z.Z,{xs:20,children:(0,E.jsxs)("div",{className:"ml-12",children:[(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500 text-color-dark-grey-dark",children:null===m||void 0===m?void 0:m.email}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light",children:null===m||void 0===m||null===(t=m.profile)||void 0===t?void 0:t.phone_number}),(0,E.jsxs)("div",{className:"text-size-14-16 text-color-dark-grey-light",children:[(0,E.jsxs)("span",{children:["Gender:",(0,E.jsx)("span",{className:"text-weight-500 text-color-dark-grey-dark ml-4",style:{textTransform:"capitalize"},children:null===m||void 0===m||null===(n=m.profile)||void 0===n?void 0:n.gender})]}),(0,E.jsxs)("span",{className:"ml-16",children:["Marital Status:",(0,E.jsx)("span",{className:"text-weight-500 text-color-dark-grey-dark ml-4",style:{textTransform:"capitalize"},children:null===m||void 0===m||null===(r=m.profile)||void 0===r?void 0:r.marital_status})]})]})]})})]})]}),(0,E.jsxs)("div",{style:{width:x?"100%":"49%",marginTop:x?"12px":"0"},children:[(0,E.jsx)("div",{className:"text-size-14-16 text-weight-400 text-color-dark-grey-light mb-4",children:"Emergency Contact"}),(0,E.jsxs)(_.Z,{className:"border border-width-1 border-color-yellow border-radius-8 p-16",style:{background:"rgba(255, 209, 131, 0.1)"},children:[(0,E.jsx)(Z.Z,{xs:4,style:{maxWidth:"64px"},children:p(null===m||void 0===m||null===(i=m.profile)||void 0===i||null===(a=i.emergency_contact)||void 0===a?void 0:a.name)}),(0,E.jsx)(Z.Z,{xs:20,children:(0,E.jsxs)("div",{className:"ml-12",children:[(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500 text-color-dark-grey-dark",children:null===m||void 0===m||null===(s=m.profile)||void 0===s||null===(l=s.emergency_contact)||void 0===l?void 0:l.name}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light",children:null===m||void 0===m||null===(o=m.profile)||void 0===o||null===(c=o.emergency_contact)||void 0===c?void 0:c.email}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light",children:null===m||void 0===m||null===(d=m.profile)||void 0===d||null===(u=d.emergency_contact)||void 0===u?void 0:u.phone_number})]})})]})]})]})}),!!h&&(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500",children:"Timeline"}),(0,E.jsx)(Nl.Z,{className:"table-v2",columns:[{title:"DATE",key:"date",width:"50%",render:function(e){return e.date}},{title:"DESCRIPTION",key:"description",width:"50%",render:function(e){return e.description}}],dataSource:m.timeline,showHeader:!1,pagination:!1})]})]})},ru=n(11101),iu=n(29542),au=n(51204),su=n(25158),lu=C.Z.TextArea,ou=function(e){var t=e.payment,n=(0,r.useState)(!1),i=n[0],a=n[1];return(0,E.jsx)(j.Z,{loading:i,className:"text-weight-500 border border-width-1 border-color-grey text-size-16 border-radius-6",type:"link",target:"_blank",onClick:function(){null!==t&&void 0!==t&&t.invoice_url?window.open(null===t||void 0===t?void 0:t.invoice_url,"_blank"):(a(!0),(0,V.V4)("payroll/company-invoices/download?invoice_id=".concat(null===t||void 0===t?void 0:t.uuid)).then((function(e){if(!e)return g.Z.error("No invoice found for this payment"),void a(!1);window.open(e,"_blank"),g.Z.success("Invoice downloaded successfully"),a(!1)})).catch((function(e){console.log("\ud83d\ude80[Payments.js:112]: error: ",e),g.Z.error("string"===typeof e?e:"Error occurred while fetching invoice"),a(!1)})))},children:"View Invoice"})},cu=hs.Z.create({name:"Transactions"})((function(e){var t,n,i,s=e.contractor,l=e.form,o=(0,a.useRouter)(),c=l.getFieldDecorator,u=l.setFieldsValue,m=l.validateFieldsAndScroll,p=(0,r.useState)([]),x=p[0],h=p[1],f=(0,r.useState)(!1),v=f[0],b=f[1],w=(0,r.useState)(""),k=w[0],N=w[1],O=(0,r.useState)(!1),S=O[0],z=O[1],P=(0,r.useState)(!1),D=(P[0],P[1],(0,r.useState)([])),F=(D[0],D[1]),L=(0,r.useState)(5),A=L[0],I=L[1],M=(0,r.useState)(1),R=M[0],T=M[1],q=(0,r.useState)(5),B=q[0],Y=q[1],H=(0,r.useState)({doc_url:"",doc_name:""}),W=H[0],J=H[1],U=(0,r.useState)(!1),$=U[0],G=U[1],K=function(e,t){e&&T(e),t&&I(t)},Q=function(){z(!0),(0,V.XZ)("payroll/contracts/payments-history?contract_id=".concat(null===s||void 0===s?void 0:s.uuid,"&clustering_company_id=").concat(null===s||void 0===s?void 0:s.clustering_company_id,"&page=").concat(R,"&results_per_page=").concat(A)).then((function(e){e&&(h(null===e||void 0===e?void 0:e.payments_history),N(null===e||void 0===e?void 0:e.pay_frequency_humanized),Y(null===e||void 0===e?void 0:e.invoice_count),F(null===e||void 0===e?void 0:e.payments_history)),z(!1)}))};(0,r.useEffect)((function(){Q()}),[A,R]);var X=function(e){switch(e){case"paid":return(0,E.jsxs)("div",{className:"d-flex align-items-center ",style:{fontSize:"16px",color:"#108B43",padding:"2px 6px"},children:[(0,E.jsx)(d.Z,{component:ru.r,className:"text-size-24 mr-8"}),(0,E.jsx)("span",{children:"Successful"})]});case"rejected":return(0,E.jsx)("div",{className:"d-flex align-items-center",children:(0,E.jsxs)("span",{style:{fontSize:"16px",color:"#FF774F",padding:"2px 6px"},children:[(0,E.jsx)(d.Z,{component:Ya.r,className:"text-size-16 mr-8 ml-4"}),(0,E.jsx)("span",{children:"Rejected"})]})});case"unpaid":case"sent_to_company":return(0,E.jsx)("div",{className:"d-flex align-items-center",children:(0,E.jsxs)("span",{style:{fontSize:"16px",color:"#FF9E4F",padding:"2px 6px"},children:[(0,E.jsx)(d.Z,{component:iu.r,className:"text-size-16 mr-12 ml-4"}),(0,E.jsx)("span",{children:"Unpaid"})]})});case"edited":return(0,E.jsx)("div",{className:"d-flex align-items-center",children:(0,E.jsxs)("span",{style:{fontSize:"16px",color:"#4F9EFF",padding:"2px 6px"},children:[(0,E.jsx)(d.Z,{component:da.r,className:"text-size-16 mr-12 ml-4"}),(0,E.jsx)("span",{children:"Edited"})]})});case"requested":return(0,E.jsx)("div",{className:"d-flex align-items-center",children:(0,E.jsxs)("span",{style:{fontSize:"16px",color:"#E5AB22",padding:"2px 6px"},children:[(0,E.jsx)(d.Z,{component:au.r,className:"text-size-16 mr-12 ml-4"}),(0,E.jsx)("span",{children:"Requested"})]})});default:return(0,E.jsx)("div",{className:"d-flex align-items-center",children:(0,E.jsxs)("span",{style:{fontSize:"16px",color:"#FF774F",padding:"2px 6px"},children:[(0,E.jsx)(d.Z,{component:Ya.r,className:"text-size-16 mr-8 ml-4"}),(0,E.jsx)("span",{children:"Cancelled"})]})})}};return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-14-16 text-weight-500 text-color-dark-grey-light",children:"Amount"}),(0,E.jsxs)(_.Z,{type:"flex",align:"start",style:{borderRadius:6},className:"mb-4",children:[(0,E.jsx)(Z.Z,{xs:12,style:{padding:"8px 12px 16px 0"},children:(0,E.jsxs)("div",{className:"text-weight-500 text-size-20-24",children:[null===s||void 0===s||null===(t=s.remuneration)||void 0===t?void 0:t.currency," ",(null===s||void 0===s||null===(n=s.remuneration)||void 0===n?void 0:n.amount)||"--"," ",(0,E.jsx)("span",{className:"text-size-16 text-weight-500 text-color-dark-grey-light",children:k})]})}),(0,E.jsx)(Z.Z,{xs:12,style:{padding:"8px 12px 16px 0"},children:"active"===(null===s||void 0===s?void 0:s.status)&&(0,E.jsx)("div",{className:"d-flex justify-content-end",children:(0,E.jsx)(j.Z,{type:"primary",className:"text-size-14-16 text-weight-500 btn-size-l pr-30 pl-30",onClick:function(){return b(!0)},children:"Initiate One-Off Payment"})})})]}),(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500 text-color-dark-grey-dark mb-8",children:"Invoice History"}),(0,E.jsxs)("div",{className:"payment-table",children:[!S&&0===(null===x||void 0===x?void 0:x.length)&&(0,E.jsx)(Wa.Z,{}),(0,E.jsx)(su.Z,{loading:S,active:!0}),!S&&(null===x||void 0===x?void 0:x.map((function(e,t){return console.log("\ud83d\ude80[Payments.js:295]: payment: ",e),(0,E.jsxs)(_.Z,{className:" p-10 text-size-14-16 text-color-dark-grey-dark pr-16",title:null===e||void 0===e?void 0:e.description,children:[(0,E.jsx)(Z.Z,{xs:1,children:(0,E.jsx)("span",{className:"count text-size-12-14",children:t+1})}),(0,E.jsx)(Z.Z,{xs:10,children:(0,E.jsx)("div",{style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",marginLeft:"6px"},children:null===e||void 0===e?void 0:e.description})}),(0,E.jsx)(Z.Z,{xs:1}),(0,E.jsxs)(Z.Z,{xs:4,className:"text-weight-500",children:[null===e||void 0===e?void 0:e.currency," ",null===e||void 0===e?void 0:e.payable_amount]}),(0,E.jsx)(Z.Z,{xs:4,children:X(null===e||void 0===e?void 0:e.status)}),(0,E.jsx)(Z.Z,{xs:4,className:"text-right",children:(0,E.jsx)(ou,{payment:e})}),(0,E.jsx)(Z.Z,{xs:24,className:"",children:(0,E.jsxs)("div",{className:"d-flex justify-content-between mt-8 ml-36",children:[(0,E.jsx)("div",{children:(0,E.jsxs)("div",{style:{marginLeft:"6px",fontWeight:500,marginTop:"4px",color:"#7c7f88",fontSize:"14px"},children:["Invoice number:"," ",(0,E.jsx)("span",{style:{fontWeight:700,color:"#252939"},children:null===e||void 0===e?void 0:e.invoice_number})]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("div",{style:{marginLeft:"6px",fontWeight:500,marginTop:"4px",color:"#7c7f88",fontSize:"14px"},children:["Invoice date:"," ",(0,E.jsx)("span",{style:{fontWeight:700,color:"#252939"},children:is()(null===e||void 0===e?void 0:e.invoice_date).utc().format("DD-MM-YYYY")}
1)]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("div",{style:{marginLeft:"6px",fontWeight:500,marginTop:"4px",color:"#7c7f88",fontSize:"14px"},children:["Due date:"," ",(0,E.jsx)("span",{style:{fontWeight:700,color:"#252939"},children:is()(null===e||void 0===e?void 0:e.due_date).utc().format("DD-MM-YYYY")})]})}),(0,E.jsx)("div",{children:(0,E.jsxs)("div",{style:{marginLeft:"6px",fontWeight:500,marginTop:"4px",color:"#7c7f88",fontSize:"14px"},children:["Document:"," ",null!==e&&void 0!==e&&e.doc_url?(0,E.jsx)("a",{href:null===e||void 0===e?void 0:e.doc_url,target:"_blank",rel:"noopener noreferrer",style:{fontWeight:700,color:"#"},children:"View"}):(0,E.jsx)("span",{children:"N/A"})]})})]})})]})})))]}),(0,E.jsx)(yd.Z,{defaultCurrent:1,total:B,pageSizeOptions:["5","10","20","30","50","100"],pageSize:A,current:R,onChange:K,showSizeChanger:!0,onShowSizeChange:K}),(0,E.jsx)(y.Z,{visible:v,onCancel:function(){return b(!1)},footer:null,width:600,centered:!0,children:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-size-14-16 text-lineHeight",children:[(0,E.jsx)("div",{className:"text-size-20-24 text-weight-500 mb-8",children:"One-off Payment"}),(0,E.jsx)("div",{className:"text-size-12-14 text-color-dark-grey-light text-weight-500 pr-8 mb-24",children:"Generate invoice and then go to Invoices menu on the left"}),(0,E.jsx)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),m((function(e,t){if(!e){var n={contract_id:null===s||void 0===s?void 0:s.uuid,description:t.description,currency:t.currency,amount:JSON.parse(t.amount)};null!==W&&void 0!==W&&W.doc_url&&(n.doc_url=null===W||void 0===W?void 0:W.doc_url),(0,V.F3)("payroll/contracts/one-off-payment",n).then((function(e){e&&(g.Z.success("Amount ".concat(t.currency," ").concat(t.amount," has been payed to ").concat(null===s||void 0===s?void 0:s.contract_name)),b(!1),G(!0))})).catch((function(e){console.log("\ud83d\ude80[Payments.js:112]: error: ",e),g.Z.error("string"===typeof e?e:"Some error occurred")}))}}))},children:(0,E.jsxs)(_.Z,{gutter:[16,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)(_.Z,{gutter:16,children:[(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{label:"Currency",children:c("currency",{rules:[{required:!0}],initialValue:null===s||void 0===s||null===(i=s.remuneration)||void 0===i?void 0:i.currency})((0,E.jsx)(ao.Z,{handleCurrencyChange:function(e){u({currency:e})}}))})}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{label:"Amount",children:c("amount",{rules:[{required:!0}]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey"}))})})]})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Description",children:c("description",{rules:[{required:!1}]})((0,E.jsx)(lu,{className:"input-size-48 input-bg-grey",autoSize:{minRows:4},placeholder:"Enter your description here"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(_.Z,{gutter:[16,16],children:(0,E.jsx)(hs.Z.Item,{label:"Document",children:(0,E.jsx)("div",{className:"d-block contract-additional-documents",style:{paddingBottom:"10px"},children:null!==W&&void 0!==W&&W.doc_url?(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-8",children:[(0,E.jsx)("a",{href:null===W||void 0===W?void 0:W.doc_url,target:"_blank",rel:"noopener noreferrer",className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:null===W||void 0===W?void 0:W.doc_name}),(0,E.jsx)(d.Z,{component:Ya.r,className:"icon-size-24 cursor-pointer",onClick:function(){return J({doc_url:"",doc_name:""})}})]}):(0,E.jsx)(Ro.Z,{showIcon:!0,acceptableFormat:"application/pdf",folderPath:"".concat(null===s||void 0===s?void 0:s.clustering_company_id,"/").concat(null===s||void 0===s?void 0:s.uuid),btnLabel:"Upload Document",afterUpload:function(e){J({doc_url:e.doc_url,doc_name:e.name})}})})})})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end ",children:[(0,E.jsx)(j.Z,{type:"default",className:"text-size-14-16 text-weight-500 btn-size-xl mr-16 border-radius-8 border-color-grey border text-color-blue",onClick:function(){return b(!1)},children:"Cancel"}),(0,E.jsx)(j.Z,{type:"primary",className:"text-size-14-16 text-weight-500 btn-size-xl border-radius-8",htmlType:"submit",children:"Generate Invoice"})]})})]})})]})}),(0,E.jsx)(y.Z,{visible:$,onCancel:function(){return G(!1)},footer:null,width:500,centered:!0,children:(0,E.jsxs)(_.Z,{gutter:[0,10],children:[(0,E.jsx)(Z.Z,{xs:24,className:"text-center",children:(0,E.jsx)(d.Z,{component:ru.r,className:"text-size-72 payment-check-circle"})}),(0,E.jsx)(Z.Z,{xs:24,className:"text-center text-size-20-24 text-weight-500",children:(0,E.jsx)("div",{children:"Invoice Generated"})}),(0,E.jsxs)(Z.Z,{xs:24,className:"text-center text-size-14-16 text-weight-500 mb-20",children:[(0,E.jsx)("div",{children:"We have generated an invoice for this one-off payment."}),(0,E.jsx)("div",{children:"Please pay it from the 'Invoices' menu on the left."})]}),(0,E.jsx)(Z.Z,{xs:24,className:"text-center ",children:(0,E.jsxs)("div",{style:{maxWidth:"200px",margin:"auto"},children:[(0,E.jsx)(j.Z,{className:"text-size-14-16 text-weight-500 btn-size-xl border-radius-8 mb-8",type:"primary",block:!0,onClick:function(){o.push("/company-portal/hire/invoices")},children:"Go to Invoices"}),(0,E.jsx)(j.Z,{block:!0,className:"text-size-14-16 text-weight-500 btn-size-xl border-radius-8 border-color-grey border text-color-blue",onClick:function(){G(!1),Q()},children:"Back to Contractor"})]})})]})})]})})),du=cu,uu=n(18216);function mu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?mu(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xu=C.Z.TextArea,hu=hs.Z.create({name:"ContractContent"})((function(e){var t,n=(0,i.I0)(),a=e.contract,s=e.fetchContractors,l=e.verificationStatus,o=e.emergencyContactRequired,c=e.basicInfoRequired,u=e.form,m=a.documents,p=u.getFieldDecorator,x=(u.setFieldsValue,u.validateFieldsAndScroll,u.getFieldValue),h=(0,r.useState)(null),f=(h[0],h[1]),v=(0,r.useState)([]),b=(v[0],v[1]),k=(0,r.useState)(!1),O=k[0],S=k[1],z=(0,r.useState)(!1),P=z[0],D=(z[1],(0,r.useState)(!1)),F=D[0],A=D[1],I=(0,r.useState)(!1),M=I[0],R=I[1],T=(0,r.useState)(""),q=T[0],B=T[1],H=(0,r.useState)({}),W=H[0],J=H[1],U=(0,r.useState)(!1),$=U[0],G=U[1],K=(0,r.useState)(!1),Q=K[0],X=K[1],ee=(0,r.useState)(!1),te=ee[0],ne=ee[1],re=(0,r.useState)(null),ie=re[0],ae=re[1];(0,r.useEffect)((function(){"active"===(null===a||void 0===a?void 0:a.status)&&se()}),[]),(0,r.useEffect)((function(){if(m.length){var e=m.find((function(e){return"contract"===e.doc_type}));f(e);var t=m.filter((function(e){return"company_uploaded"===e.doc_type}));b(t)}}),[m]);var se=function(){(0,V.XZ)("payroll/contracts/next-billing-date?contract_id=".concat(null===a||void 0===a?void 0:a.uuid)).then((function(e){e&&B(e)}))},le=function(e){e.preventDefault(),u.validateFieldsAndScroll((function(e,t){if(!e){var r=pu(pu({},t),{},{clustering_company_id:null===a||void 0===a?void 0:a.clustering_company_id,contract_id:null===a||void 0===a?void 0:a.uuid});"custom"===r.end_date&&(r.end_date=ie),X(!0),(0,V.F3)("payroll/contracts/terminate",r).then((function(e){e&&(X(!1),g.Z.success(null===e||void 0===e?void 0:e.payment_message),R(!1),n(w.imh({company_id:null===a||void 0===a?void 0:a.clustering_company_id})))}))}}))};(0,r.useEffect)((function(){"active"===(null===a||void 0===a?void 0:a.status)&&function(){G(!0);var e="custom"===x("end_date")?ie:x("end_date");e&&(0,V.XZ)("payroll/contracts/terminate?contract_id=".concat(null===a||void 0===a?void 0:a.uuid,"&clustering_company_id=").concat(null===a||void 0===a?void 0:a.clustering_company_id,"&end_date=").concat(e)).then((function(e){e&&(J(e),G(!1))}))}()}),[x("end_date"),ie]);var oe=null===a||void 0===a||null===(t=a.documents)||void 0===t?void 0:t.filter((function(e){return"kw_contract"!==e.doc_type})),ce=function(){var e=(0,tr.Z)(Qn().mark((function e(){return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ne(!0),e.prev=1,e.next=4,(0,V.F3)("payroll/contracts/send/",{contract_id:null===a||void 0===a?void 0:a.uuid});case 4:if(!e.sent.uuid){e.next=9;break}g.Z.success("Invite sent successfully"),e.next=10;break;case 9:throw new Error("Failed look to send invite");case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(1),console.error(e.t0),g.Z.error("Some error occurred while sending invite");case 16:return e.prev=16,ne(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[1,12,16,19]])})));return function(){return e.apply(this,arguments)}}();return(0,E.jsxs)("div",{className:"pb-12 pt-12 text-color-dark-grey-dark mb-8",children:[(0,E.jsxs)("div",{className:"text-size-16-18 text-weight-500 text-color-dark-grey-dark mt-6",children:[null===a||void 0===a?void 0:a.contract_name," - ",null===a||void 0===a?void 0:a.public_id]}),(0,E.jsxs)("div",{className:"d-flex mt-12",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{className:"text-size-14-16 text-color-dark-grey-light",children:"Start date: "}),(0,E.jsx)("span",{className:"text-size-14-16 text-weight-500 text-color-dark-grey-dark",children:is()(null===a||void 0===a?void 0:a.start_date).utc().format("MMM DD, YYYY")})]}),(0,E.jsxs)("div",{className:"",style:{marginLeft:"60px"},children:[(0,E.jsx)("span",{className:"text-size-14-16 text-color-dark-grey-light",children:"End date: "}),(0,E.jsx)("span",{className:"text-size-14-16 text-weight-500 text-color-dark-grey-dark",children:null!==a&&void 0!==a&&a.end_date?is()(null===a||void 0===a?void 0:a.end_date).utc().format("MMM DD, YYYY"):(0,E.jsx)("span",{className:"text-italics",children:"Indefinite"})})]})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light mt-20",children:"Scope of work"}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark mt-4",style:{lineHeight:"1.25"},children:null===a||void 0===a?void 0:a.scope_of_work})]}),oe.length>0&&(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light mt-20",children:"Additional Document"}),(0,E.jsx)("div",{className:"d-flex mt-4",style:{flexWrap:"wrap"},children:oe.map((function(e){return(0,E.jsx)("a",{className:"text-color-blue text-size-12-14 text-weight-500 round-4 mr-8 mb-4",style:{border:"1px solid rgb(213, 218, 236)",background:"white",padding:"4px 8px"},target:"_blank",href:e.doc_url,children:e.name})}))})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light mt-20",children:"Notice Period"}),(0,E.jsxs)("div",{className:"text-size-14-16 text-color-dark-grey-dark mt-4",style:{lineHeight:"1.25"},children:[null===a||void 0===a?void 0:a.notice_period," days"]})]}),(null===a||void 0===a?void 0:a.special_clause)&&(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light mt-20",children:"Special Clause"}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark mt-4",style:{lineHeight:"1.25"},children:(0,Y.IQ)(null===a||void 0===a?void 0:a.special_clause)})]}),(0,E.jsx)("div",{className:"mt-24"}),function(){if("client_signed"===a.status)return(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)(j.Z,{className:"text-size-14-16 text-weight-500 mr-8",size:"large",type:"primary",style:{padding:"5px 20px",border:0},onClick:ce,loading:te,children:"Resend Invite"}),(0,E.jsx)(uu.Z,{contract:a,isCustom:a.is_custom_contract,visible:O,setVisible:S,showSign:!0,onSignSuccess:s,signType:"contractor",signDisabled:"verified"!==l||o||c,signDisabledMessage:"You can sign a contract only after completing Step 1-3 in Dashboard",children:(0,E.jsxs)(j.Z,{onClick:function(){return S(!0)},className:"btn-size-l border-radius-6 border-color-grey text-color-blue text-weight-500",style:{padding:"0 20px"},children:["View ",a.is_custom_contract?"Addendum":"Contract"]})})]});var e=[{label:"Immediately",value:is()().format("YYYY-MM-DD")},{label:"Next Billing Date",value:is()(q).format("YYYY-MM-DD")},{label:"Custom Date",value:"custom"}];return(0,E.jsxs)("div",{className:"d-flex ",children:["inactive"!==a.status&&!(is()(a.start_date)>
1is()().toDate())&&(0,E.jsx)(j.Z,{className:"text-color-orange text-size-14-16 text-weight-500 mr-8",size:"large",style:{padding:"5px 20px",background:"rgba(255, 119, 79, 0.10)",border:0},onClick:function(){R(!0)},loading:P,children:"End this Contract"}),(0,E.jsx)(uu.Z,{contract:a,isCustom:a.is_custom_contract,visible:O,setVisible:S,signType:"contractor",children:(0,E.jsxs)(j.Z,{className:"btn-size-l text-size-14-16 text-color-blue text-weight-500 border-radius-6 border-color-grey",style:{padding:"0 20px"},onClick:function(){return S(!0)},children:["View ",a.is_custom_contract?"Addendum":"Contract"]})}),(0,E.jsx)(y.Z,{visible:M,onCancel:function(){R(!1),ae(null)},footer:null,width:600,centered:!0,children:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-size-14-16 text-lineHeight",children:[(0,E.jsx)("div",{className:"text-size-20-24 text-weight-500 mb-24",children:"End this Contract"}),(0,E.jsx)(hs.Z,{className:"custom-form",onSubmit:le,children:(0,E.jsxs)(_.Z,{gutter:[16,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)(_.Z,{gutter:16,children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Choose when to end",children:p("end_date",{rules:[{required:!0}],initialValue:e[0].value})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey inner-shadow border-radius-6",defaultValue:e[0],suffixIcon:(0,E.jsx)(d.Z,{className:"text-size-24",component:L.r,style:{height:"24px"}}),children:e.map((function(e){return(0,E.jsx)(N.Z.Option,{value:e.value,children:e.label})}))}))})}),"custom"===x("end_date")&&(0,E.jsx)(Z.Z,{xs:24,className:"mt-16",children:(0,E.jsxs)(hs.Z.Item,{label:"Choose a Date",children:[p("custom_end_date",{rules:[{required:!0}]})((0,E.jsx)(C.Z,{style:{display:"none"}})),p("custom_end_date",{rules:[{required:!0,message:"Please select a date"}]})((0,E.jsx)(ns.Z,{className:"input-size-48 input-bg-grey border-radius-6",style:{width:"100%"},format:"YYYY-MM-DD",disabledDate:function(e){return e&&e<is()().startOf("day").subtract(30,"day")},onChange:function(e){return ae(e.format("YYYY-MM-DD"))}}))]})}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{className:"text-size-12-14 text-color-dark-grey-light",children:"Contract End Date: "}),(0,E.jsx)("span",{className:"text-size-14-16 text-weight-500 text-color-dark-grey-dark",children:is()(ie||x("end_date")).format("MMM DD, YYYY")})]})})]})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Message for contractor",children:p("termination_message",{rules:[{required:!1}]})((0,E.jsx)(xu,{className:"input-size-48 input-bg-grey",autoSize:{minRows:4},placeholder:"write something here"}))})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)("div",{className:"text-size-14-16 text-weight-500 text-color-dark-grey-dark pb-8 mb-12",style:{borderBottom:"1px solid #D5DAEC"},children:"Final settlement details"}),$?(0,E.jsx)(su.Z,{active:!0}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{className:"text-size-14-16 d-flex justify-content-between mb-8",children:[(0,E.jsx)("span",{className:"text-color-dark-grey-light",children:"Pending Invoice Amount"}),(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-weight-500",children:Number((null===W||void 0===W?void 0:W.pending_invoices_amount)||0).toFixed(2)})]}),(0,E.jsxs)("div",{className:"text-size-14-16 d-flex justify-content-between mb-8",children:[(0,E.jsx)("span",{className:"text-color-dark-grey-light",children:"Pro-rata payment to the contractor"}),(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-weight-500",children:null===W||void 0===W?void 0:W.prorata_amount})]}),(0,E.jsxs)("div",{className:"text-size-14-16 d-flex justify-content-between mb-8",children:[(0,E.jsx)("span",{className:"text-color-dark-grey-light",children:"Kaamwork fee"}),(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-weight-500",children:null===W||void 0===W?void 0:W.kw_fees})]}),(0,E.jsxs)("div",{className:"text-size-14-16 text-color-dark-grey-dark d-flex justify-content-between pb-12 pt-12",style:{borderBottom:"1px solid #D5DAEC",borderTop:"1px solid #D5DAEC"},children:[(0,E.jsx)("span",{children:"Total to pay"}),(0,E.jsxs)("span",{className:"text-weight-500",children:[null===W||void 0===W?void 0:W.company_currency," ",Number((null===W||void 0===W?void 0:W.total_amount)||0).toFixed(2)]})]})]})]}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end ",children:[(0,E.jsx)(j.Z,{type:"default",className:"text-size-14-16 text-weight-500 btn-size-xl mr-16 border border-width-1 border-color-grey text-size-16 border-radius-6 text-color-blue",onClick:function(){return R(!1)},children:"Cancel"}),(0,E.jsx)(j.Z,{type:"primary",className:"text-size-14-16 text-weight-500 btn-size-xl border border-width-1 border-radius-6",htmlType:"submit",disabled:$,loading:Q,children:"Terminate Contract"})]})})]})})]})})]})}(),(0,E.jsx)(y.Z,{title:"End Contract (".concat(null===a||void 0===a?void 0:a.contract_name," - ").concat(null===a||void 0===a?void 0:a.public_id,")"),visible:F,onOk:le,onCancel:function(){A(!1)},destroyOnClose:!0,confirmLoading:P,children:(0,E.jsx)("p",{children:"Are you sure to end this contract?"})})]})})),fu=hu;function gu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?gu(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vu=["rgba(142, 213, 172, 0.6)","#FFDCEC","rgba(255, 119, 79, 0.25)","rgb(255, 209, 131, 0.75)","#DCE2F9","#8ED5AC","#E0D1FA"],ju={draft:"draft",client_signed:"client_signed",contractor_signed:"contractor_signed",active:"active",inactive:"inactive"},bu=(0,i.$j)((function(e){return{isMasterPasswordUser:e.auth.auth.isMasterPasswordUser}}),(function(e){return{getContractorById:function(t,n){return e(w.O36(t,n))},setNewContractor:function(t){return e(w.NIm(t))}}}))((function(e){var t,n,a=e.contractor,s=(e.columns,e.getContractorById),l=e.setNewContractor,o=e.setShowNewContractor,u=e.fetchContractors,m=e.isMasterPasswordUser,p=(0,za.Z)("(max-width: 767px)"),x=(0,i.I0)(),h=(0,i.v9)((function(e){return e.auth.auth.login_meta.company.company_id})),f=(0,r.useState)(!1),b=f[0],k=f[1],N=(0,r.useState)(!1),C=(N[0],N[1]),O=(0,r.useState)([]),S=O[0],z=O[1],P=(0,r.useState)(!1),D=P[0],F=P[1],L=(0,r.useState)(!1),A=L[0],I=L[1],M=(0,r.useState)(""),R=M[0],T=M[1],q=(0,r.useState)(null),B=q[0],Y=q[1],H=(0,r.useMemo)((function(){var e;return yu(yu({},a),{},{documents:(null===B||void 0===B||null===(e=B.profile)||void 0===e?void 0:e.payroll_documents)||[]})}),[a,B]),W=[ju.draft,ju.client_signed],J=ju[H.status],U=function(e){var t,n,r=e?e.split(" ")[0]:null===H||void 0===H||null===(t=H.profile)||void 0===t?void 0:t.first_name,i=e?e.split(" ")[1]:null===H||void 0===H||null===(n=H.profile)||void 0===n?void 0:n.last_name;return(0,E.jsx)(ys.Z,{size:48,style:{color:"#252939",textTransform:"uppercase",backgroundColor:vu[Math.floor(Math.random()*vu.length)]},className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:"".concat(r[0]).concat(i?i[0]:"")})};return(0,E.jsx)(v.Z,{className:"contract-list-collapse contract-list-item ".concat("draft"===(null===H||void 0===H?void 0:H.status)?"draft inner-shadow":""),onChange:function(e){z(e);var t=e[0];H.allFetched||(k(!0),s({uuid:t},{onSuccess:function(e){Y((function(){return e})),k(!1)},onFail:function(){k(!1)}}))},children:(0,E.jsx)(v.Z.Panel,{disabled:"draft"===(null===H||void 0===H?void 0:H.status),header:(0,E.jsxs)(_.Z,{className:"d-flex align-items-center",children:[(0,E.jsxs)(Z.Z,{xs:p?21:12,className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"contract-status ".concat("active"===(null===H||void 0===H?void 0:H.status)&&is()(H.start_date)>is()().toDate()?"client_signed":null===H||void 0===H?void 0:H.status),children:U()}),(0,E.jsxs)("div",{className:"ml-12",children:[(0,E.jsxs)("div",{className:"text-size-16-18 text-weight-500 text-color-dark-grey-dark",children:[null===H||void 0===H||null===(t=H.profile)||void 0===t?void 0:t.first_name," ",null===H||void 0===H?void 0:H.profile.last_name," ","draft"===(null===H||void 0===H?void 0:H.status)&&"[Draft]"]}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light",children:null===H||void 0===H?void 0:H.contract_name})]})]}),(0,E.jsxs)(Z.Z,{className:"desktop",xs:9,children:[(0,E.jsxs)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:[is()(null===H||void 0===H?void 0:H.start_date).utc().format("MMM DD, YYYY")," -"," ",null!==H&&void 0!==H&&H.end_date?(0,E.jsx)("span",{children:is()(null===H||void 0===H?void 0:H.end_date).utc().format("MMM DD, YYYY")}):(0,E.jsx)("span",{className:"text-color-dark-grey-light text-italics",children:"Indefinite"})]}),(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-light",children:["ID: ",null===H||void 0===H?void 0:H.public_id]})]}),(0,E.jsxs)(Z.Z,{xs:3,className:"d-flex align-items-center justify-content-end",children:[(0,E.jsxs)(y.Z,{visible:D,onCancel:function(){return F(!1)},footer:null,width:600,centered:!0,children:[(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-lineHeight",children:(0,E.jsxs)("div",{className:"text-size-24 text-weight-500 mb-24",children:["Delete ",null===H||void 0===H||null===(n=H.profile)||void 0===n?void 0:n.first_name," ",null===H||void 0===H?void 0:H.profile.last_name," ","draft"===(null===H||void 0===H?void 0:H.status)&&"[Draft]"]})}),(0,E.jsxs)(_.Z,{gutter:[16,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{children:"Are you sure to delete this draft contract?"})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end ",children:[(0,E.jsx)(j.Z,{type:"default",className:"text-size-16 text-weight-500 btn-size-xl mr-16",onClick:function(){return F(!1)},children:"Cancel"}),(0,E.jsx)(j.Z,{type:"primary",className:"text-size-16 text-weight-500 btn-size-xl",loading:A,onClick:function(){I(!0),(0,V.lV)("payroll/contracts?contract_id=".concat(H.uuid)).then((function(e){e&&(I(!1),g.Z.success("Contract successfully deleted"),x(w.imh({company_id:h})))}))},children:"Delete Contract"})]})})]})]}),(0,E.jsx)("div",{className:"border-radius-6 d-flex justify-content-center align-items-center action-button-wrapper",children:m||"draft"===(null===H||void 0===H?void 0:H.status)?("active"!==J&&"offer void"!==J&&"inactive"!==J||"active"==J&&is()(H.start_date)>
1is()().toDate())&&(0,E.jsx)(de.Z,{overlay:function(){var e=W.indexOf(J)>-1;return(0,E.jsxs)(c.Z,{className:"company-portal-aside-menu",onClick:function(e){console.log(e),"offer_void"===(null===e||void 0===e?void 0:e.key)&&y.Z.confirm({title:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark text-size-20-24 mb-8",children:"You are about to make this Offer void"}),(0,E.jsx)("div",{className:"text-weight-400 text-size-14-16 text-color-dark-grey-light mb-72",children:"Please confirm to proceed."})]}),className:"",okText:"Make Offer Void",okType:"danger",okButtonProps:{className:"btn-size-l text-weight-500 text-size-16 text-color-orange",style:{height:"3rem",width:"180px",backgroundColor:"rgba(255,119,79,0.25)"}},cancelText:"Go Back",cancelButtonProps:{className:"text-color-blue text-weight-500 border-radius-6 border-color-grey",style:{height:"3rem",width:"140px"}},centered:!0,onOk:function(){handleUpdateEmployeeStatus("offer_void")},onCancel:function(){},width:488}),"edit"===(null===e||void 0===e?void 0:e.key)&&(H.allFetched?(l(H),o(!0)):(C(!0),s({uuid:H.uuid},{onSuccess:function(e){C(!1),l(e),o(!0)},onFail:function(){C(!1),g.Z.error("Some error occurred while fetching contract details.")}}))),"delete"===(null===e||void 0===e?void 0:e.key)&&F(!0)},children:[m&&(is()(H.start_date)>is()().toDate()||e)&&(0,E.jsx)(c.Z.Item,{className:"text-size-16",children:"draft"===(null===H||void 0===H?void 0:H.status)?"Resume":"Edit Contract"},"edit"),"draft"===J&&(0,E.jsx)(c.Z.Item,{className:"text-size-16",children:"Delete"},"delete")]})},trigger:["click"],children:(0,E.jsx)("div",{className:"d-flex align-items-center justify-content-center border-width-1 ".concat("option"===R?"border-color-blue":"border-color-grey"," round-6 ml-8"),style:{width:"40px",height:"40px",background:"white !important"},onMouseEnter:function(){return T("option")},onMouseLeave:function(){return T("")},onClick:function(e){e.stopPropagation()},children:(0,E.jsx)(d.Z,{className:"icon-size-24 text-color-dark-grey-dark",component:ho.r})})}):(0,E.jsx)(j.Z,{style:{padding:"0px 7px",height:"40px",border:"1px solid #D5DAEC"},children:(0,E.jsx)(d.Z,{component:vo.r,className:"text-size-24",style:{transition:"all .2s ease-in-out",height:"24px",transform:S[0]===(null===H||void 0===H?void 0:H.uuid)?"rotate(180deg)":"rotate(0deg)"}})})})]})]}),showArrow:!1,children:b?(0,E.jsxs)("div",{className:"text-center mb-20 mt-20",children:[(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 mr-8"}),(0,E.jsx)("span",{className:"text-color-dark-grey-dark text-size-16",children:"Fetching details. Please wait..."})]}):(0,E.jsxs)(ja.Z,{className:"tabs-blue custom-tabs",animated:!1,children:[(0,E.jsx)(ja.Z.TabPane,{tab:"Basic",children:(0,E.jsx)(nu,{contractor:H,getAvatar:U})},"basic"),(0,E.jsx)(ja.Z.TabPane,{tab:"Contract Details",children:(0,E.jsx)(fu,{contract:H,fetchContractors:u})},"contracts"),"draft"!==(null===H||void 0===H?void 0:H.status)&&(0,E.jsx)(ja.Z.TabPane,{tab:"Invoices",children:(0,E.jsx)(du,{contractor:H})},"invoices"),(0,E.jsx)(ja.Z.TabPane,{tab:"Documents",children:(0,E.jsx)(Wl,{employee:H})},"documents")]})},H.uuid)})})),wu=(0,i.$j)((function(e){return{isMasterPasswordUser:e.auth.auth.isMasterPasswordUser}}),(function(e){return{getAccountDetails:function(){return e(w.jgj())}}}))((function(e){var t=e.columns,n=e.contractorList,i=e.setShowNewContractor,a=e.fetchContractors,s=e.getAccountDetails;return(0,r.useEffect)((function(){s()}),[]),(0,E.jsx)("div",{children:null===n||void 0===n?void 0:n.map((function(e){return(0,E.jsx)(bu,{contractor:e,columns:t,setShowNewContractor:i,fetchContractors:a},e.uuid)}))})})),ku=n(85490),Nu=n(9041),_u=n(2117);function Zu(){return Zu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zu.apply(this,arguments)}function Cu(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Ou=r.createElement("title",null,"Team_Role Copy"),Su=r.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Usecases-AddNew-Extras",transform:"translate(-318.000000, -1498.000000)",fill:"#FFFFFF",stroke:"#3A3E4C",strokeWidth:2},r.createElement("g",{id:"Special-Clause",transform:"translate(300.000000, 1480.000000)"},r.createElement("g",{id:"Stroke-1",transform:"translate(16.000000, 16.000000)"},r.createElement("polygon",{points:"12.035 3 15.0799 8.309 21.07 9.5643 16.9618 14.1008 17.619 20.1857 12.035 17.6804 6.451 20.1857 7.1082 14.1008 3 9.5643 8.9901 8.309"}))))),zu=function(e){var t=e.svgRef,n=e.title,i=Cu(e,["svgRef","title"]);return r.createElement("svg",Zu({width:"21px",height:"20px",viewBox:"0 0 21 20",ref:t},i),void 0===n?Ou:n?r.createElement("title",null,n):null,Su)},Eu=r.forwardRef((function(e,t){return r.createElement(zu,Zu({svgRef:t},e))}));function Pu(){return Pu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pu.apply(this,arguments)}function Du(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Fu=r.createElement("title",null,"Team_Role Copy"),Lu=r.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Usecases-AddNew-Extras",transform:"translate(-319.000000, -1006.000000)",strokeWidth:2}
1,r.createElement("g",{id:"Additional-Document",transform:"translate(300.000000, 988.000000)"},r.createElement("g",{id:"Group",transform:"translate(16.000000, 16.000000)"},r.createElement("g",{transform:"translate(12.000000, 12.000000) scale(1, -1) translate(-12.000000, -12.000000) translate(4.000000, 3.000000)"},r.createElement("path",{d:"M0,15.5391 C0,16.8973 1.1027,18 2.4609,18 L13.5391,18 C14.8973,18 16,16.8973 16,15.5391 L16,5 L11,0 L2.4609,0 C1.1027,0 0,1.1027 0,2.4609 L0,15.5391 Z",id:"Stroke-8",stroke:"#3A3E4C",fill:"#FFFFFF"}),r.createElement("path",{d:"M11,4.1521 C11,4.62 11.38,5 11.8479,5 L16,5 L11,0 L11,4.1521 Z",id:"Stroke-9",stroke:"#7C7F88",fill:"#7C7F88"})),r.createElement("path",{d:"M9.25,5.25 C8.4222,5.25 7.75,4.5779 7.75,3.75 C7.75,2.9221 8.4222,2.25 9.25,2.25",id:"Stroke-5",stroke:"#7C7F88",transform:"translate(8.500000, 3.750000) rotate(90.000000) translate(-8.500000, -3.750000) "}),r.createElement("path",{d:"M8.5,13.5 C6.8444,13.5 5.5,12.1558 5.5,10.5 C5.5,8.8442 6.8444,7.5 8.5,7.5",id:"Stroke-5",stroke:"#7C7F88",transform:"translate(7.000000, 10.500000) scale(1, -1) rotate(90.000000) translate(-7.000000, -10.500000) "}),r.createElement("line",{x1:7,y1:4.5,x2:7,y2:9,id:"Stroke-7",stroke:"#7C7F88"}),r.createElement("line",{x1:4,y1:4.5,x2:4,y2:9,id:"Stroke-7",stroke:"#7C7F88"}),r.createElement("line",{x1:10,y1:4.5,x2:10,y2:9,id:"Stroke-7",stroke:"#7C7F88"}),r.createElement("path",{d:"M9.25,5.25 C8.4222,5.25 7.75,4.5779 7.75,3.75 C7.75,2.9221 8.4222,2.25 9.25,2.25",id:"Stroke-5",stroke:"#7C7F88",transform:"translate(8.500000, 3.750000) rotate(90.000000) translate(-8.500000, -3.750000) "}),r.createElement("path",{d:"M8.5,13.5 C6.8444,13.5 5.5,12.1558 5.5,10.5 C5.5,8.8442 6.8444,7.5 8.5,7.5",id:"Stroke-5",stroke:"#7C7F88",transform:"translate(7.000000, 10.500000) scale(1, -1) rotate(90.000000) translate(-7.000000, -10.500000) "}),r.createElement("line",{x1:7,y1:4.5,x2:7,y2:9,id:"Stroke-7",stroke:"#7C7F88"}),r.createElement("line",{x1:4,y1:4.5,x2:4,y2:9,id:"Stroke-7",stroke:"#7C7F88"}),r.createElement("line",{x1:10,y1:4.5,x2:10,y2:9,id:"Stroke-7",stroke:"#7C7F88"}))))),Au=function(e){var t=e.svgRef,n=e.title,i=Du(e,["svgRef","title"]);return r.createElement("svg",Pu({width:"18px",height:"20px",viewBox:"0 0 18 20",ref:t},i),void 0===n?Fu:n?r.createElement("title",null,n):null,Lu)},Iu=r.forwardRef((function(e,t){return r.createElement(Au,Pu({svgRef:t},e))})),Mu=n(29282),Ru=function(e){var t=e.children,n=e.edit,r=e.icon,i=e.title,a=e.label,s=e.updateEdit,l=e.removeRequirement,o=e.disableRemove,c=e.disabledRemoveTooltipLabel,m=e.removeTooltipLabel;return(0,E.jsxs)("div",{className:"p-20 mb-8 ".concat(n&&"hover-shadow"),style:{background:n?"white":"#E9EFF7",border:"1px solid #D5DAEC",borderRadius:"10px",boxShadow:n?" 0px 1px 2px 0 #D5DAEC":" 0px 1px 2px 0 #D5DAEC inset",transition:"all 0.2s ease-in-out"},children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex ",children:[r,(0,E.jsxs)("div",{className:"ml-12",children:[(0,E.jsx)("div",{className:"text-size-18 text-weight-500 text-color-dark-grey-dark",children:i}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light mt-4",children:a})]})]}),!n&&(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{size:"large",className:"text-color-blue text-weight-500 background-transparent",onClick:function(){s(!0)},style:{borderColor:"#D5DAEC",boxShadow:"none",backgroundColor:"transparent"},children:"Add"})}),n&&(o?(0,E.jsx)(u.Z,{placement:"top",title:c,children:(0,E.jsx)(d.Z,{component:Mu.r,className:"text-size-24 delete-icon disabled-icon ",disabled:o})}):(0,E.jsx)(u.Z,{placement:"top",title:m,children:(0,E.jsx)(d.Z,{component:Mu.r,className:"text-size-24 delete-icon red-icon icon-hover",onClick:function(){s(!1),l()}})}))]}),n?(0,E.jsx)("div",{className:"pl-30 pt-16",children:t}):null]})};function Tu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Tu(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bu=hs.Z.create({name:"Extra"})((function(e){var t=e.step,n=e.setStep,i=e.form,a=e.newContractor,s=e.createNewContractor,l=e.updateEmployeeDocuments,o=e.createContractorLoading,c=e.loginMeta,u=i.getFieldDecorator,m=i.setFieldsValue,p=(0,r.useState)(!1),x=p[0],h=p[1],y=(0,r.useState)(!1),v=y[0],b=y[1],w=(0,r.useState)(!1),k=w[0],N=w[1],_=(0,r.useState)(!1),Z=_[0],O=_[1],S=(0,r.useState)([]),z=S[0],P=S[1],D=(0,r.useState)(!1),F=D[0],L=D[1],A=(0,r.useState)(!1),I=A[0],M=A[1],R=null;c&&c.company&&(R=c.company.company_id),(0,r.useEffect)((function(){if(a.documents){var e=a.documents.filter((function(e){return"company_uploaded"===e.doc_type}));P(e)}}),[]),(0,r.useEffect)((function(){o||F||!I||(M(!1),n(t+1))}),[o,F]);var T=function(){i.validateFieldsAndScroll((function(e,r){if(!e&&!F){M(!0);var i=qu({uuid:a.uuid,contract_id:a.uuid},r);if(!1===x&&(i.end_date=null),!1===k&&(i.special_clause_json=""),i.special_clause_json){var l=(0,ku.E)((0,Nu.convertFromRaw)(JSON.parse(i.special_clause_json)),{inlineStyles:{BOLD:{element:"span",attributes:{class:"bold"}}}});i.special_clause=l}else delete i.special_clause_json;s(i,{onSuccess:function(){n(t+1)},onFail:function(e){return g.Z.error(null===e||void 0===e?void 0:e.message)}})}}))},q=function(e){L(!0),l([{action:"delete",payload:e}],{onSuccess:function(t){var n=z.filter((function(t){return t.doc_url!==e.doc_url}));P(n),g.Z.success("Your document has been successfully deleted."),L(!1)},onFail:function(e){g.Z.error(e),L(!1)}})};(0,r.useEffect)((function(){null!==a&&void 0!==a&&a.end_date&&h(!0)}),[null===a||void 0===a?void 0:a.end_date]),(0,r.useEffect)((function(){(null===z||void 0===z?void 0:z.length)>0&&O(!0)}));var B;return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 ml-8 mb-12",children:"Additional details (optional)"}),(0,E.jsx)(hs.Z,{shouldUpdate:!0,children:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-size-14-16 mb-60",children:[(0,E.jsx)(Ru,{edit:x,icon:(0,E.jsx)(d.Z,{component:rc,className:"text-size-16-18 pt-4"}),title:"Termination Date",label:a.end_date?"The contract terminates on ".concat(is()(a.end_date).format("MMM DD, YYYY")):"The client will pay the contractor until the contract has been terminated",updateEdit:h,removeRequirement:function(){m({end_date:null}),a.end_date=null,i.resetFields(["end_date"])},removeTooltipLabel:"Remove Termination Date",children:x?(0,E.jsx)(hs.Z.Item,{className:"",children:u("end_date",{rules:[{required:!1,message:"Termination date is required"}],initialValue:(B=a.end_date,"string"===typeof B?is()(B):B)})((0,E.jsx)(ns.Z,{placeholder:"yyyy-mm-dd",className:"input-size-48 profile__edit-datepicker inner-shadow border-radius-6",getCalendarContainer:function(e){return e.parentNode}}))}):null}),(0,E.jsx)(Ru,{icon:(0,E.jsx)(d.Z,{component:Sc,className:"text-size-18 pt-4"}),edit:v,title:"Notice Period",label:"Either party may terminate this contract by giving ".concat(i.getFieldValue("notice_period")>1?i.getFieldValue("notice_period"):0," day").concat(i.getFieldValue("notice_period")>1?"s":""," of notice, after which the contract will be terminated."),updateEdit:b,removeRequirement:function(){b(!1)},removeTooltipLabel:"Remove Notice Period",children:v?(0,E.jsx)(hs.Z.Item,{className:"",children:u("notice_period",{rules:[{required:!0,message:"Notice period is required"}],initialValue:a.notice_period})((0,E.jsx)(C.Z,{placeholder:"Enter notice period in days",className:"input-size-48 input-bg-grey inner-shadow border-radius-6",suffix:"Days"}))}):null}),(0,E.jsxs)(Ru,{title:"Additional Document",label:"Attach any additional document you may require for the contract. Attach a .zip for multiple documents.",icon:(0,E.jsx)(d.Z,{component:Iu,className:"text-size-18 pt-4"}),updateEdit:O,removeRequirement:function(){null===z||void 0===z||z.forEach((function(e){q(e)})),P([]),O(!1)},edit:Z,disableRemove:(null===z||void 0===z?void 0:z.length)>0,disabledRemoveTooltipLabel:"Remove all documents first",removeTooltipLabel:"Remove Additional Document",children:[z.map((function(e){return(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center border-radius-6 mb-8",style:{border:"1px solid #D5DAEC",padding:"14px 16px",background:"#F4F7FB"},children:[(0,E.jsx)("div",{className:"text-ellipsis-on-overflow text-weight-400 text-size-14-16 text-color-dark-grey-dark text-underline",children:(0,E.jsx)("a",{href:e.doc_url,target:"_blank",children:e.name})}),(0,E.jsx)(d.Z,{onClick:function(){return q(e)},className:"cursor-pointer icon-size-24",component:X.r})]})})),R&&a.uuid?(0,E.jsx)("div",{className:"d-block contract-additional-documents",children:(0,E.jsx)(Ro.Z,{showIcon:!0,btnLabel:"Cho
1ose file",btnClass:"btn-size-xl border-radius-6 text-color-blue text-weight-500 w-100 contractor-additional-document-button",folderPath:"".concat(R,"/").concat(a.uuid,"/additional"),afterUpload:function(e){L(!0);var t={action:"create",payload:qu(qu({},e),{},{profile_id:a.profile_id,doc_type:"company_uploaded",contract_id:a.uuid})};l([t],{onSuccess:function(e){P([].concat((0,f.Z)(z),[t.payload])),L(!1)},onFail:function(e){L(!1),g.Z.error(e)}})}})}):null]}),(0,E.jsx)(Ru,{title:"Special Clause",label:"You may want a special clause on the contract to outline terms of a special scenario.",icon:(0,E.jsx)(d.Z,{component:Eu,className:"text-size-18 pt-4"}),edit:k,updateEdit:N,removeRequirement:function(){N(!1),m({special_clause_json:null}),a.special_clause_json=null,i.resetFields(["special_clause_json"])},removeTooltipLabel:"Remove Special Clause",children:k?(0,E.jsx)(hs.Z.Item,{className:"",children:u("special_clause_json",{rules:[{required:!1}],initialValue:a.special_clause_json})((0,E.jsx)(ei.Z,{className:"no-control inner-shadow border-radius-6",editorValue:a.special_clause_json||"",setEditorValue:function(e){m({special_clause_json:e})}}))}):null})]})}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mt-40 desktop",children:[(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-14-16 text-color-blue border-color-grey",onClick:function(){n(t-1)},style:{padding:"0 2rem"},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back"})}),(0,E.jsxs)(j.Z,{className:"btn-size-xl mb-4 text-size-14-16 text-weight-500 border-radius-8",type:"primary",disabled:I,onClick:function(){T()},style:{padding:"0 3rem"},children:[I?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24"}):null," ","Continue"]})]}),(0,E.jsxs)("div",{className:" mt-40 mobile",children:[(0,E.jsxs)(j.Z,{className:"btn-size-xl mb-12 text-size-14-16 text-weight-500 border-radius-8",type:"primary",disabled:I,block:!0,onClick:function(){T()},style:{padding:"0 3rem"},children:[I?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24"}):null," ","Continue"]}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-14-16 text-color-blue border-color-grey",onClick:function(){n(t-1)},style:{padding:"0 2rem",background:"transparent"},block:!0,children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back"})})]})]})})),Vu=(0,i.$j)((function(e){return{newContractor:e.employ.newContractor,createContractorLoading:e.employ.createContractorLoading,loginMeta:e.auth.auth.login_meta}}),(function(e){return{createNewContractor:function(t,n){return e(w.ICe(t,n))},updateEmployeeDocuments:function(t,n){return e(w.Zbz(t,n))}}}))(Bu);function Yu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yu(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wu={borderWidth:"1px",borderStyle:"solid",borderRadius:"6px",padding:"15px 16px 15px 24px",boxShadow:"inset 0 1px 2px 0 #D5DAEC",background:"#E9EFF7"},Ju={borderWidth:"1px",borderStyle:"solid",borderRadius:"6px",padding:"15px 16px 15px 24px",boxShadow:"0 1px 2px 0 #D5DAEC",background:"white"},Uu=hs.Z.create({name:"Compliance"})((function(e){var t=e.step,n=e.setStep,i=e.loginMeta,a=e.newContractor,s=e.form,l=e.countryCodeList,o=e.countryCodeListFetched,c=e.fetchCountryCodeList,u=e.createNewContractor,m=e.createContractorLoading,p=(s.getFieldDecorator,(0,r.useState)("kaamwork")),x=p[0],h=p[1],f=(0,r.useState)(null),v=f[0],b=f[1],w=(0,r.useState)(!1),k=w[0],_=w[1],Z=(0,r.useState)(!1),C=Z[0],O=Z[1],S=(0,r.useState)(!1),z=S[0],P=S[1],D=null;i&&i.company&&(D=i.company.company_id),(0,r.useEffect)((function(){o||c()}),[o]);l.map((function(e){return(0,E.jsx)(N.Z.Option,{label:e.country.name,children:e.country.name},e.country.iso2)}));(0,r.useEffect)((function(){if(a){var e,t=null===a||void 0===a||null===(e=a.documents)||void 0===e?void 0:e.find((function(e){return"contract"===e.doc_type}));b(t),a.is_custom_contract||t?h("custom"):h("kaamwork")}}),[a]);var F=function(){"custom"!==x||v?s.validateFieldsAndScroll((function(e,r){if(!e){var i=Hu(Hu({uuid:a.uuid,contract_id:a.uuid},r),{},{is_custom_contract:"custom"===x});u(i,{onSuccess:function(){n(t+1)}})}})):g.Z.warn("Please Upload Your Custom Contract")},L=function(){var e=(0,tr.Z)(Qn().mark((function e(t){var n,r,i,a,s;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.data,r=t.onStart,i=void 0===r?function(){}:r,a=t.onFinish,s=void 0===a?function(){}:a,!n){e.next=8;break}return i(),e.next=5,(0,V.ih)("documents",[n]);case 5:e.sent&&("create"===n.action?(b(n.payload),_(!1)):"delete"===n.action&&b(null)),s();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,E.jsx)(hs.Z,{children:(0,E.jsxs)("div",{className:"text-size-14-16 text-color-dark-grey-dark",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"mb-16 text-size-14-16 text-color-dark-grey-light line-height-20",children:"Do you want to use kaamwork\u2019s locally compliant contract? You can choose to upload your own contract that has been already signed."}),(0,E.jsxs)(q.ZP.Group,{value:x,className:"d-block",onChange:function(e){return h(e.target.value)},children:[(0,E.jsxs)("div",{className:Ba()("d-flex","justify-content-between","align-items-center","mb-8","border-color-grey"),style:"kaamwork"===x?Ju:Wu,children:[(0,E.jsx)(q.ZP,{className:"radio-blue d-flex align-items-center",value:"kaamwork",children:(0,E.jsx)("span",{className:"text-size-14-16 text-color-dark-grey-dark text-weight-500 text-lineHeight pl-4 d-inline-block",children:"Use kaamwork contract"})}),(0,E.jsx)(uu.Z,{visible:z,setVisible:P,children:(0,E.jsx)(j.Z,{className:"text-color-blue text-weight-500 border-color-grey ".concat("kaamwork"!==x?"text-color-blue-light":""),size:"large",onClick:function(){P(!0)},disabled:"kaamwork"!==x,children:"View"})})]}),(0,E.jsxs)("div",{className:Ba()("d-flex","justify-content-between","border-color-grey"),style:"kaamwork"!==x?Hu(Hu({},Ju),{},{flexDirection:"column",padding:"20px 16px 20px 24px"}):Hu(Hu({},Wu),{},{padding:"23px 16px 23px 24px"}),children:[(0,E.jsx)(q.ZP,{className:"radio-blue d-flex align-items-center",value:"custom",children:(0,E.jsx)("span",{className:"text-size-14-16 text-color-dark-grey-dark text-weight-500 text-lineHeight pl-4 d-inline-block",children:"Use my own contract"})}),"custom"===x?(0,E.jsxs)("div",{className:"mt-20 ml-20 pl-8",children:[v?(0,E.jsxs)("div",{style:{border:"1px solid",padding:"11px 12px 11px 12px"},className:"d-flex justify-content-between align-items-center border-color-grey border-radius-6 background-light-blue text-color-dark-grey-dark mb-8",children:[(0,E.jsx)("div",{className:"text-size-14-16 text-weight-500 cursor-pointer text-underline",children:(0,E.jsx)("a",{href:v.doc_url,target:"_blank",children:v.name})}),C?(0,E.jsx)(d.Z,{className:"icon-size-24",type:"loading"}):(0,E.jsx)(d.Z,{onClick:function(){y.Z.confirm({title:(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 text-color-dark-grey-dark text-size-20-24 mb-8",children:"You are about to delete this contract"}),(0,E.jsx)("div",{className:"text-weight-400 text-size-14-16 text-color-dark-grey-light mb-72",children:"Please confirm to proceed."})]}),className:"",okText:"Delete Contract",okType:"danger",okButtonProps:{className:"btn-size-l text-weight-500 text-size-14-16 text-color-orange",style:{height:"3rem",width:"180px",backgroundColor:"rgba(255,119,79,0.25)"}},cancelText:"Go Back",cancelButtonProps:{className:"text-color-blue text-weight-500 border-radius-6 border-color-grey",style:{height:"3rem",width:"140px"}},centered:!0,onOk:function(){L({data:{action:"delete",payload:v},onStart:function(){return O(!0)},onFinish:function(){return O(!1)}})},onCancel:function(){},width:488})},component:X.r,className:"icon-size-24 cursor-pointer"})]}):null,v?null:(0,E.jsx)("div",{className:"d-block ",children:(0,E.jsx)(Ro.Z,{showIcon:!0,disabled:v,btnClass:"compliance-upload-file ant-btn btn-size-xl ",btnLabel:"Cho
1ose file",acceptableFormat:"application/pdf",folderPath:"".concat(D,"/").concat(a.uuid),beforeUpload:function(){return _(!0)},afterUpload:function(e){var t={action:"create",payload:Hu(Hu({},e),{},{profile_id:a.profile_id,doc_type:"contract",contract_id:a.uuid})};L({data:t})}})})]}):null]})]})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mt-40 desktop",style:{bottom:"-3px"},children:[(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-14-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 34px"},onClick:function(){n(t-1)},children:(0,E.jsx)("span",{className:" text-weight-500",children:"Back"})}),(0,E.jsxs)(j.Z,{className:"btn-size-xl mb-4 border-radius-8 text-size-14-16 text-weight-500",type:"primary",disabled:m||k||C,onClick:function(){F()},children:[m?(0,E.jsx)(d.Z,{className:"mr-8",type:"loading"}):null," Create Contract"]})]}),(0,E.jsxs)("div",{className:"mobile mt-20",style:{position:"absolute",bottom:"20px",left:"16px",right:"16px"},children:[(0,E.jsxs)(j.Z,{className:"btn-size-xl mb-12 border-radius-8 text-size-14-16 text-weight-500",type:"primary",disabled:m||k||C,onClick:function(){F()},block:!0,children:[m?(0,E.jsx)(d.Z,{className:"mr-8",type:"loading"}):null," Create Contract"]}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-14-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 34px",background:"transparent"},onClick:function(){n(t-1)},block:!0,children:(0,E.jsx)("span",{className:" text-weight-500",children:"Back"})})]})]})})})),$u=(0,i.$j)((function(e){return{loginMeta:e.auth.auth.login_meta,newContractor:e.employ.newContractor,createContractorLoading:e.employ.createContractorLoading,countryCodeList:e.taxonomy.countryCodeList,countryCodeListFetched:e.taxonomy.countryCodeListFetched}}),(function(e){return{fetchCountryCodeList:function(t){return e(w.mAR(t))},createNewContractor:function(t,n){return e(w.ICe(t,n))}}}))(Uu),Gu=n(75328),Ku=function(e){var t,n,r=e.newContractor,a=e.setStep,s=e.newContractorBasicDetails,l=(0,za.Z)("(max-width: 767px)"),o=(0,i.v9)((function(e){return e.taxonomy.countryCodeList})).filter((function(e){var t;return(null===e||void 0===e||null===(t=e.country)||void 0===t?void 0:t.iso2)===(null===s||void 0===s?void 0:s.country_code)}))[0],c=null===r||void 0===r||null===(t=r.documents)||void 0===t?void 0:t.filter((function(e){return"kw_contract"!==e.doc_type}));return(0,E.jsxs)("div",{className:"mt-24 add-new-contractor__summary",children:[(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark",children:"Summary of the contract"}),(0,E.jsxs)("div",{className:"mt-20",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between text-size-14-16 text-weight-500 mb-4",children:[(0,E.jsx)("label",{children:"Basic Info"}),(0,E.jsx)("label",{className:"text-color-blue cursor-pointer",onClick:function(){a(0)},children:"Edit Basic Details"})]}),(0,E.jsxs)(Md.Z,{className:"dashboard-card border-radius-10",style:{padding:l?"16px 12px":"0"},children:[(0,E.jsx)(Qu,{label:"Contract Name",value:null===r||void 0===r?void 0:r.contract_name}),(0,E.jsx)("br",{}),(0,E.jsx)(Qu,{label:"Contractor Name",value:"".concat(null===s||void 0===s?void 0:s.first_name," ").concat(null===s||void 0===s?void 0:s.last_name)}),(0,E.jsx)("br",{}),(0,E.jsx)(Qu,{label:"Email",value:null===s||void 0===s?void 0:s.email}),(0,E.jsx)("br",{}),(0,E.jsx)(Qu,{label:"Country",value:null===o||void 0===o||null===(n=o.country)||void 0===n?void 0:n.name}),(0,E.jsx)("br",{}),(0,E.jsx)(Qu,{label:"Scope of work",value:null===r||void 0===r?void 0:r.scope_of_work})]})]}),(0,E.jsxs)("div",{className:"mt-20",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between text-size-14-16 text-weight-500 mb-4",children:[(0,E.jsx)("label",{children:"Payment Details"}),(0,E.jsx)("label",{className:"text-color-blue cursor-pointer",onClick:function(){a(0)},children:"Edit Payment Details"})]}),(0,E.jsxs)(Md.Z,{className:"dashboard-card border-radius-10",children:[(0,E.jsxs)(_.Z,{children:[(0,E.jsx)(Z.Z,{sm:12,children:(0,E.jsx)(Qu,{label:"Contract starts on",value:is()(null===r||void 0===r?void 0:r.start_date).format("MMMM DD, YYYY")})}),(0,E.jsx)(Z.Z,{sm:12,children:(0,E.jsx)(Qu,{label:"Amount",value:"".concat(Y.fD[null===s||void 0===s?void 0:s.currency]," ").concat((0,Y.$i)(null===s||void 0===s?void 0:s.amount))})})]}),(0,E.jsx)("br",{}),(0,E.jsxs)(_.Z,{children:[(0,E.jsx)(Z.Z,{sm:12,children:(0,E.jsx)(Qu,{label:"Pay Frequency",value:(0,Y.GF)(null===s||void 0===s?void 0:s.payout_frequency)})}),(0,E.jsx)(Z.Z,{sm:12,children:(0,E.jsx)(Qu,{label:"Invoices will be generated on",value:function(){var e=null===s||void 0===s?void 0:s.payout_day;return"onetime"===(null===s||void 0===s?void 0:s.payout_frequency)?"".concat(is()(null===s||void 0===s?void 0:s.first_payout_date).format("MMMM DD, YYYY")):"monthly"===(null===s||void 0===s?void 0:s.payout_frequency)?"".concat(Kl()(e).format("0o")," of every month"):"fortnightly"===(null===s||void 0===s?void 0:s.payout_frequency)?"every other ".concat(Y.z1[e]):"every ".concat(Y.z1[e])}()})})]})]})]}),(0,E.jsxs)("div",{className:"mt-20",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between text-size-14-16 text-weight-500 mb-4",children:[(0,E.jsx)("label",{children:"Extras"}),(0,E.jsx)("label",{className:"text-color-blue cursor-pointer",onClick:function(){a(1)},children:"Edit Extras"})]}),(0,E.jsxs)(Md.Z,{className:"dashboard-card border-radius-10",children:[(0,E.jsxs)(_.Z,{children:[(0,E.jsx)(Z.Z,{sm:12,children:(0,E.jsx)(Qu,{label:"Termination Date",value:null!==r&&void 0!==r&&r.end_date?(0,Y.xz)(new Date(null===r||void 0===r?void 0:r.end_date)):"No End Date"})}),(0,E.jsx)(Z.Z,{sm:12,children:(0,E.jsx)(Qu,{label:"Days of Notice",value:null===r||void 0===r?void 0:r.notice_period})})]}),(0,E.jsx)("br",{}),(null===c||void 0===c?void 0:c.length)>0&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(_.Z,{children:(0,E.jsx)(Z.Z,{sm:24,children:(0,E.jsx)(Xu,{label:"Additional Document(s)",documents:c})})}),(0,E.jsx)("br",{})]}),(null===r||void 0===r?void 0:r.special_clause)&&(0,E.jsx)(_.Z,{children:(0,E.jsx)(Z.Z,{sm:24,children:(0,E.jsx)(Qu,{label:"Special Clause",value:em(null===r||void 0===r?void 0:r.special_clause)})})})]})]})]})},Qu=function(e){var t=e.label,n=e.value;return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-14-16 text-weight-400 text-color-dark-grey-light",children:t}),(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500 text-color-dark-grey-dark",children:n})]})},Xu=function(e){var t=e.label,n=e.documents;return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-14-16 text-weight-400 text-color-dark-grey-light mb-4",children:t}),(0,E.jsx)("div",{className:"d-flex",style:{flexFlow:"wrap"},children:null===n||void 0===n?void 0:n.map((function(e,t){return(0,E.jsxs)("a",{href:null===e||void 0===e?void 0:e.doc_url,target:"_blank",rel:"noopener noreferrer",className:"text-color-blue text-size-12-14 text-weight-500 round-4 mr-8 mb-4",style:{border:"1px solid #D5DAEC",background:"white",padding:"4px 8px"},children:["Attachment ",t+1]})}))})]})};function em(e){return null!==e&&""!==e&&(e=e.toString()).replace(/(<([^>]+)>)/gi,"")}var tm=(0,i.$j)((function(e){return{newContractor:e.employ.newContractor,profileId:e.auth.auth.profile_uuid}}),(function(e){return{setNewContractor:function(t){return e(w.NIm(t))}}}))((function(e){var t=e.newContractor,n=(e.profileId,e.setStep),i=e.setShowNewContractor,a=e.setNewContractor,s=e.newContractorBasicDetail
1s,l=e.step,o=(0,za.Z)("(max-width: 767px)"),c=(0,r.useState)(!1),u=c[0],m=c[1],p=(0,r.useState)(null),x=p[0],h=p[1],f=["client_signed","active"].indexOf(t.status)>-1,y=["contractor_signed","active"].indexOf(t.status)>-1,v=(0,r.useState)(!1),b=v[0],w=v[1],k=function(){var e=(0,tr.Z)(Qn().mark((function e(){return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.next=4,(0,V.F3)("payroll/contracts/send/",{contract_id:t.uuid});case 4:if(!e.sent.uuid){e.next=10;break}a({}),g.Z.success("Invite sent successfully"),e.next=12;break;case 10:throw m(!1),new Error("Failed look to send invite");case 12:e.next=19;break;case 14:e.prev=14,e.t0=e.catch(1),console.error(e.t0),g.Z.error("Some error occurred while sending invite"),m(!1);case 19:return e.prev=19,m(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[1,14,19,22]])})));return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)((function(){if(t&&t.documents){var e=t.documents.find((function(e){return"contract"===e.doc_type}));h(e)}}),[t]),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 ml-8 mb-12",children:"Review the contract and sign"}),(0,E.jsx)("div",{className:"dashboard-card border-radius-6",style:{padding:o?"8px":"20px 20px"},children:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(ys.Z,{size:48,style:{color:"#252939",textTransform:"uppercase",backgroundColor:"#E0D1FA"},className:"text-size-14-16 text-weight-500 text-color-dark-grey-dark",children:"1"}),(0,E.jsx)("div",{className:"mr-12"}),(0,E.jsx)("div",{className:"text-size-14-18 text-weight-500",children:"Client signs here"})]}),t.is_custom_contract&&x?(0,E.jsx)("div",{className:"ml-32 pl-4 mt-8",children:(0,E.jsx)("a",{href:x.doc_url,target:"_blank",className:"text-weight-500 text-color-blue",children:"View Custom Contract"})}):null]}),(0,E.jsx)("div",{children:f&&!b?(0,E.jsxs)("div",{className:"d-flex text-color-green-dark align-items-center",children:[(0,E.jsx)(d.Z,{component:Gu.r,className:"text-size-14-24 mr-4"}),(0,E.jsx)("div",{className:"text-weight-500 ",children:"You have signed"})]}):(0,E.jsx)(uu.Z,{visible:b,setVisible:w,showSign:!0,isCustom:t.is_custom_contract,children:(0,E.jsx)(j.Z,{type:"primary",className:"".concat(o?"btn-size-l":"btn-size-xl"," text-size-14-16 text-weight-500 border-radius-8"),onClick:function(){w(!0)},children:"Review Contract"})})})]})}),(0,E.jsx)("div",{style:{width:"2px",height:"20px",backgroundColor:"#D5DAEC",marginLeft:"43px"}}),(0,E.jsxs)("div",{className:"dashboard-card mb-8 border-radius-6",style:{padding:o?"8px":"20px 20px",background:"".concat(t.is_contract_mailed?"white":"#E9EFF7"),boxShadow:"".concat(t.is_contract_mailed?" 0 1px 2px 0px #D5DAEC":"inset 0 1px 2px 0px #D5DAEC")},children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(ys.Z,{size:48,style:{color:"#252939",textTransform:"uppercase",backgroundColor:"#B5E4C9"},className:"text-size-14-16 text-weight-500 text-color-dark-grey-dark",children:"2"}),(0,E.jsx)("div",{className:"mr-12"}),(0,E.jsx)("div",{className:"text-size-14-18 text-weight-500",children:"Contractor signs here"})]}),y?(0,E.jsxs)("div",{className:"d-flex text-color-green",children:[(0,E.jsx)(d.Z,{component:Gu.r,className:"icon-size-20 mr-4"}),(0,E.jsx)("div",{className:"text-weight-500",children:"Contractor has signed"})]}):(0,E.jsxs)(j.Z,{type:"primary",className:"".concat(o?"btn-size-l":"btn-size-xl"," text-size-14-16 text-weight-500 border-radius-8"),disabled:u||!f,onClick:function(){k()},style:{padding:"0 43px"},children:[u?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 mr-4"}):null,"draft"!==t.status&&t.is_contract_mailed?"Resend Invite":"Send Invite"]})]}),"draft"!==t.status&&t.contract_mailed_at?(0,E.jsxs)("div",{className:"d-flex justify-content-end text-color-dark-grey-light mt-4 text-size-12-14",children:["Invite sent on"," ",is()(t.contract_mailed_at).format("MMM DD, YYYY hh:mm A")]}):null]}),(0,E.jsxs)("div",{className:"d-flex pl-16 pr-16 pb-8 pt-8 background-yellow-2 border-radius-6",children:[(0,E.jsx)("div",{children:(0,E.jsx)(d.Z,{component:Vc.r,className:"text-size-20-24 warning-icon-black"})}),(0,E.jsxs)("div",{className:"ml-10 text-size-12-14 text-color-dark-grey",children:["The contract will only become active once both the parties have signed.",(0,E.jsx)("div",{children:"No changes will be allowed post that."})]})]}),(0,E.jsx)(Ku,{newContractor:t,setStep:n,newContractorBasicDetail
1s:s}),(0,E.jsx)("br",{}),(0,E.jsx)("br",{}),(0,E.jsx)("br",{}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mt-40 desktop",style:{bottom:0},children:[(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-14-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 20px"},onClick:function(){n(l-1)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back"})}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-14-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 20px",background:"transparent"},onClick:function(){a({}),i(!1)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back to Contractors"})})]}),(0,E.jsxs)("div",{className:"mobile ",style:{bottom:0},children:[(0,E.jsx)(j.Z,{className:"btn-size-xl mb-12 border-radius-8 text-weight-500 text-size-14-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 20px",background:"white"},block:!0,onClick:function(){a({}),i(!1)},children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back to Contractors"})}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-14-16 border border-color-grey text-color-blue",type:"default",style:{padding:"0 20px",background:"transparent"},onClick:function(){n(l-1)},block:!0,children:(0,E.jsx)("span",{className:"text-weight-500",children:"Back"})})]})]})}));function nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nm(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var im={required:!0,message:"Required"}
1,am=function(e){return"string"===typeof e?is()(e):e},sm="onetime",lm="weekly",om="fortnightly",cm="monthly",dm=function(e){var t=e.form,n=e.step,i=e.setStep,a=e.loginMeta,s=e.profileUuid,l=e.setNewContractor,o=e.setShowNewContractor,c=e.newContractor,u=e.createNewContractor,m=e.currencyList,p=e.currencyListFetched,x=e.fetchCurrencyList,h=e.countryCodeList,f=e.countryCodeListFetched,y=e.fetchCountryCodeList,v=e.createContractorLoading,b=e.fetchCurrencyRates,w=(e.currencyRates,e.currencyRatesFetched),k=e.legalEntity,O=e.setNewContractorBasicDetails,P=e.newContractorBasicDetails,D=((0,za.Z)("(max-width: 767px)"),t.getFieldDecorator),F=t.getFieldValue,A=t.setFieldsValue,I="MMM DD, YYYY",M=(0,r.useState)(null),R=M[0],T=M[1],q=(0,r.useState)(null),H=q[0],W=q[1],J=(0,r.useState)(null),U=J[0],$=J[1],G=(0,r.useState)(null),K=G[0],Q=G[1],X=(0,r.useState)(null),ee=X[0],te=X[1];(0,r.useEffect)((function(){p||x()}),[p]),(0,r.useEffect)((function(){w||b()}),[w]),(0,r.useEffect)((function(){f||y()}),[f]);var ne=null;a&&a.company&&(ne=a.company.company_id);var re=m.map((function(e){return(0,E.jsx)(N.Z.Option,{children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("span",{className:"fi fi-".concat(Y.qI[e[0]]||"xx"," mr-8")}),(0,E.jsx)("span",{className:"mr-4",children:e[0]}),(0,E.jsx)("span",{children:"(".concat(e[1],")")})]})},e[0])})),ie=h.map((function(e){var t,n;return e.country.is_contract_enabled?(0,E.jsx)(N.Z.Option,{label:e.country.name,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"fi fi-".concat(null===e||void 0===e||null===(t=e.country)||void 0===t||null===(n=t.iso2)||void 0===n?void 0:n.toLowerCase()," mr-8")}),(0,E.jsx)("div",{children:e.country.name})]})},e.country.iso2):null})),ae=c.profile||null,se=c.remuneration||null,le=(ae&&ae.tax_residence_country&&ae.tax_residence_country.currency,F("payout_frequency")||se&&se.payout_frequency||c.payout_frequency),oe=function(e){return(0,E.jsx)(hs.Z.Item,{label:e,children:D("first_payout_date",{rules:[im],initialValue:am(se&&se.first_payout_date||c.first_payout_date||(null===P||void 0===P?void 0:P.first_payout_date)&&is()(null===P||void 0===P?void 0:P.first_payout_date))})((0,E.jsx)(ns.Z,{placeholder:"MMM DD, YYYY",className:"input-size-48 profile__edit-datepicker inner-shadow border-radius-6",getCalendarContainer:function(e){return e.parentNode},format:I}))})},ce=function(){t.validateFieldsAndScroll((function(e,t){if(!e)if(s&&ne){var r=rm(rm({},t),{},{added_by_id:s,clustering_company_id:ne,uuid:c.uuid||null,first_payout_date:t.is_initial_payout_required?t.first_payout_date:null,first_payout_amount:t.is_initial_payout_required&&t.first_payout_amount||0,status:"draft",is_verification_required:!0,are_docs_required:!0});t.payout_frequency===sm&&(r.first_payout_date=t.first_payout_date,r.first_payout_amount=t.amount),c.uuid&&(r.contract_id=c.uuid),(F("payout_frequency")||c.payout_frequency)!==cm?r.prorata=!1:r.prorata=!0,u(r,{onSuccess:function(){O(r),i(n+1)},onFail:function(e){var t;t=null===e||void 0===e?void 0:e.message,g.Z.error(t)}})}else g.Z.error("Some vital parameters are missing. Please contact us if the problem persists.")}))},de=function(e){return k.currency===F("currency")?null:e?(0,E.jsx)("div",{className:"text-color-dark-grey text-size-12-14",children:"is ".concat(k.currency," ").concat(Kl()(e).format("0,0.00")," (your default currency)")}):null},ue=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t,n,r,i,a=arguments;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:0,n=a.length>1?a[1]:void 0,r=a.length>2?a[2]:void 0,e.next=5,(0,V.V4)("transferwise/convert-currency?amount=".concat(t,"&source=").concat(n,"&target=").concat(r,"&round=false"));case 5:return i=e.sent,e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function me(){return(me=(0,tr.Z)(Qn().mark((function e(){var t,n;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!U||0==R){e.next=5;break}return e.next=3,ue(R,U,k.currency,!1);case 3:t=e.sent,Q(t);
1case 5:if(!U||!H){e.next=10;break}return e.next=8,ue(H,U,k.currency,!1);case 8:n=e.sent,te(n);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,r.useEffect)((function(){se&&se.currency?$(se.currency):null!==P&&void 0!==P&&P.currency&&$(null===P||void 0===P?void 0:P.currency),se&&se.amount?T(se.amount):null!==P&&void 0!==P&&P.amount&&T(null===P||void 0===P?void 0:P.amount),se&&se.first_payout_amount?W(se.first_payout_amount):null!==P&&void 0!==P&&P.first_payout_amount&&W(null===P||void 0===P?void 0:P.first_payout_amount)}),[]),(0,r.useEffect)((function(){!function(){me.apply(this,arguments)}()}),[U,R,H]),(0,E.jsxs)("div",{children:[(0,E.jsxs)(hs.Z,{className:"custom-form contractor-basic",children:[(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 mb-8 text-color-dark-grey-dark",children:"Basic Info"}),(0,E.jsx)("div",{className:"dashboard-card mb-40 border-radius-10",style:{padding:"20px"},children:(0,E.jsxs)(_.Z,{gutter:[16,24],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Name of the contract",children:D("contract_name",{rules:[im],initialValue:c.contract_name})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"First name",children:D("first_name",{rules:[im],initialValue:ae&&ae.first_name||c.first_name||(null===P||void 0===P?void 0:P.first_name)})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Last name",children:D("last_name",{rules:[im],initialValue:ae&&ae.last_name||c.last_name||(null===P||void 0===P?void 0:P.last_name)})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Personal Email Address",children:D("email",{rules:[im],initialValue:c.email||(null===P||void 0===P?void 0:P.email)})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Country",children:D("country_code",{initialValue:ae&&ae.tax_residence_country_code||c.country_code||(null===P||void 0===P?void 0:P.country_code),rules:[im]})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey inner-shadow border-radius-6",dropdownClassName:"select-bg-grey-dropdown",getPopupContainer:function(e){return e.parentNode},showSearch:!0,suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-2 text-color-dark-grey-dark",component:L.r}),filterOption:function(e,t){return t.props.label.toLowerCase().indexOf(e.toLowerCase())>=0},onChange:function(e){var t=h.find((function(t){return t.country.iso2===e}));t&&t.country&&t.country.currency&&(t.country.currency,A({currency:t.country.currency}))},children:ie}))}),(0,E.jsx)("div",{className:"text-size-12-14 text-lineHeight text-color-dark-grey-light",children:"Please contact us at [email protected] if the country you are trying to specify not listed. The platform is live in 102 countries but we are adding more every day"})]}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Scope of work",children:D("scope_of_work",{rules:[im],initialValue:c.scope_of_work})((0,E.jsx)(C.Z.TextArea,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6 mb-0",autoSize:{minRows:4,maxRows:6}}))})})]})}),(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 mb-8 text-color-dark-grey-dark",children:"Payment Details"}),(0,E.jsx)("div",{className:"dashboard-card border-radius-10",style:{padding:"20px"},children:(0,E.jsxs)(_.Z,{gutter:[16,24],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Start date of the contract",children:D("start_date",{rules:[im],initialValue:am(c.start_date)})((0,E.jsx)(ns.Z,{placeholder:"MMM DD, YYYY",className:"input-size-48 profile__edit-datepicker inner-shadow border-radius-6",getCalendarContainer:function(e){return e.parentNode},format:I}))})}),(0,E.jsx)(Z.Z,{xs:24,md:12,children:(0,E.jsx)(hs.Z.Item,{label:"Choose Currency",children:D("currency",{rules:[im],initialValue:se&&se.currency||c.currency||(null===P||void 0===P?void 0:P.currency)})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey inner-shadow border-radius-6",dropdownClassName:"select-bg-grey-dropdown ",getPopupContainer:function(e){return e.parentNode},showSearch:!0,onChange:function(e){$(e)},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),children:re}))})}),(0,E.jsxs)(Z.Z,{xs:24,md:12,children:[(0,E.jsx)(hs.Z.Item,{label:"Amount",children:D("amount",{rules:[im],initialValue:se&&se.amount||c.amount||(null===P||void 0===P?void 0:P.amount)})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6",parser:function(e){return(0,Y.jQ)(e),e.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"")},onChange:function(e){T(e)}}))}),de(K)]}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Pay frequency",children:D("payout_frequency",{rules:[im],initialValue:se&&se.payout_frequency||c.payout_frequency||(null===P||void 0===P?void 0:P.payout_frequency)})((0,E.jsxs)(N.Z,{className:"select-size-48 select-bg-grey inner-shadow border-radius-6",dropdownClassName:"select-bg-grey-dropdown",getPopupContainer:function(e){return e.parentNode},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-2 text-color-dark-grey-dark",component:L.r}),onChange:function(){return A({payout_day:null})},children:[(0,E.jsx)(N.Z.Option,{value:cm,children:"Monthly"},"monthly"),(0,E.jsx)(N.Z.Option,{value:lm,children:"Weekly"},"weekly"),(0,E.jsx)(N.Z.Option,{value:om,children:"Fortnightly"},"fortnightly"),(0,E.jsx)(N.Z.Option,{value:sm,children:"One time"},"onetime")]}))})}),(0,E.jsxs)(Z.Z,{xs:24,children:[function(e){if(e===sm)return null;var t=[];if(e===cm)for(var n=1;n<=31;n++)t.push((0,E.jsxs)(N.Z.Option,{value:n,children:[(0,Y.Qo)(n)," of every month"]},n));else for(var r=0;r<7;r++)t.push((0,E.jsxs)(N.Z.Option,{value:r,children:["Every"," ",e===om?"Other":null," ",Y.z1[r]]},r));return e===cm&&F("prorata")?null:(0,E.jsx)(hs.Z.Item,{label:"Invoices will be generated on",children:D("payout_day",{rules:[im],initialValue:(0,Y.kx)(se&&se.payout_day,c.payout_day||(null===P||void 0===P?void 0:P.payout_day)||is()(null===P||void 0===P?void 0:P.first_payout_date).format("yyyy-mm-dd"))})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey inner-shadow border-radius-6",dropdownClassName:"select-bg-grey-dropdown",getPopupContainer:function(e){return e.parentNode},showSearch:!0,suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-2 text-color-dark-grey-dark",component:L.r}),children:t}))})}(le),function(){var e=null,t=F("payout_day"),n=F("start_date");if(null===t||!n)return null;if(le===cm)if(F("prorata"))if(n.date()<25)e="25th ".concat(n.format("MMM"));else{var r=is()(n);e="25th ".concat(r.add(1,"months").format("MMM"))}else e=n.date()>t?"".concat(Kl()(t).format("0o")," ").concat(is()(n.month()+2,"M").format("MMMM")):"".concat(Kl()(t).format("0o")," ").concat(is()(n.month()+1,"M").format("MMMM"));else{if(le!==lm&&le!==om||!t)return null;var i=is()(n).isoWeekday(t),a=is()(n).add(1,"weeks").isoWeekday(t);e=i.isSameOrAfter(n)?i.format("DD MMM YYYY"):a.format("DD MMM YYYY")}return(0,E.jsxs)("div",{className:"text-size-14 text-color-dark-grey-light text-lineHeight mb-4",children:["First invoice will be generated on ",e]})}(),F("payout_frequency")===sm?oe("Invoice will be created on"):null,(0,E.jsx)("div",{className:"text-size-12-14 text-color-dark-grey-light text-lineHeight",children:"The payment will be due within 5 days of the invoice generation"})]}),le===sm?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(B.Z,{style:{margin:"4px 0",backgroundColor:"#D5DAEC"}})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"mt-8 d-flex",children:[(0,E.jsx)(hs.Z.Item,{children:D("is_initial_payout_required",{rules:[{required:!1}],initialValue:se?se.is_initial_payout_required:c.is_initial_payout_required||(null===P||void 0===P?void 0:P.is_initial_payout_required)||!1,valuePropName:"checked"})((0,E.jsx)(S.Z,{className:"checkbox-size-20"}))}),(0,E.jsx)("div",{className:"text-size-14-16 text-lineHeight text-color-dark-grey-dark ml-8",children:"I would like to make an Advance/ad-hoc payment"})]})}
1),F("is_initial_payout_required")?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(Z.Z,{xs:24,children:[oe("Initial Payment Invoice will be created on"),(0,E.jsx)("div",{className:"text-size-12-14 text-color-dark-grey-light text-lineHeight",children:"The payment will be due within 5 days of the invoice generation"})]}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Initial Payment Amount",children:D("first_payout_amount",{initialValue:(0,Y.kx)(se&&se.first_payout_amount,c.first_payout_amount||(null===P||void 0===P?void 0:P.first_payout_amount))})((0,E.jsx)(z.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6",parser:function(e){return(0,Y.jQ)(e),e.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"")},onChange:function(e){W(e)}}))}),de(ee)]})]}):null]})]})})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between mt-40 desktop",children:[(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-14-16 text-color-blue border-color-grey",onClick:function(){l({}),o(!1)},style:{padding:"0 2rem"},children:(0,E.jsx)("span",{className:" text-weight-500",children:"Cancel"})}),(0,E.jsxs)(j.Z,{className:"btn-size-xl mb-4 text-size-14-16 text-weight-500 border-radius-8",type:"primary",disabled:v,onClick:function(){ce()},style:{padding:"0 3rem"},children:[v?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24"}):null," ","Continue"]})]}),(0,E.jsxs)("div",{className:"mobile mt-20",children:[(0,E.jsxs)(j.Z,{className:"btn-size-xl mb-12 text-size-14-16 text-weight-500 border-radius-8",type:"primary",disabled:v,onClick:function(){ce()},style:{padding:"0 3rem"},block:!0,children:[v?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24"}):null," ","Continue"]}),(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-8 text-weight-500 text-size-14-16 text-color-blue border-color-grey",onClick:function(){l({}),o(!1)},block:!0,style:{padding:"0 2rem",background:"transparent"},children:(0,E.jsx)("span",{className:" text-weight-500",children:"Cancel"})})]})]})};dm.defaultProps={legalEntity:null};var um=hs.Z.create({name:"BasicInfo"})(dm),mm=(0,i.$j)((function(e){return{profileUuid:e.auth.auth.profile_uuid,loginMeta:e.auth.auth.login_meta,newContractor:e.employ.newContractor,currencyList:e.taxonomy.currencyList,currencyListFetched:e.taxonomy.currencyListFetched,countryCodeList:e.taxonomy.countryCodeList,countryCodeListFetched:e.taxonomy.countryCodeListFetched,createContractorLoading:e.employ.createContractorLoading,currencyRates:e.taxonomy.currencyRates,currencyRatesFetched:e.taxonomy.currencyRatesFetched,legalEntity:e.auth.auth.legal_entity}}),(function(e){return{fetchCurrencyList:function(t){return e(w.hLp(t))},fetchCountryCodeList:function(t){return e(w.mAR(t))},createNewContractor:function(t,n){return e(w.ICe(t,n))},fetchCurrencyRates:function(){return e(w.KHA())}}}))(um),pm=Io.Z.Step,xm=(0,i.$j)(null,(function(e){return{setNewContractor:function(t){return e(w.NIm(t))}}}))((function(e){var t=e.setShowNewContractor,n=e.setNewContractor,i=(0,za.Z)("(max-width: 767px)"),a=(0,r.useState)(0),s=a[0],l=a[1],o=(0,r.useState)(null),c=o[0],d=o[1];(0,r.useEffect)((function(){return function(){n({}),d(null)}}),[]);return(0,E.jsxs)("div",{className:"container-960",style:{maxWidth:"600px",marginLeft:0},children:[(0,E.jsxs)("div",{className:"page-wrapper add-new-contractor",style:{overflow:"visible"},children:[(0,E.jsx)(Fa.Z,{title:"Contractor",style:{padding:"0 ".concat(i?"18px":"1.25rem")}}),(0,E.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-4 pl-16",children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark",children:"Adding a new contractor"})}),(0,E.jsxs)("div",{style:{padding:"0 ".concat(i?"1rem":"0")},children:[(0,E.jsxs)(Io.Z,{className:"dashboard-steps-navigation",type:"navigation",current:s,children:[(0,E.jsx)(pm,{title:"1. Basic Info",icon:(0,E.jsx)("span",{})}),(0,E.jsx)(pm,{title:"2. Extras",icon:(0,E.jsx)("span",{})}),(0,E.jsx)(pm,{title:"3. Compliance",icon:(0,E.jsx)("span",{})}),(0,E.jsx)(pm,{title:"4. Review & Sign",icon:(0,E.jsx)("span",{})})]}),function(){switch(s){case 1:return(0,E.jsx)(Vu,{step:s,setStep:l});case 2:return(0,E.jsx)($u,{step:s,setStep:l});case 3:return(0,E.jsx)(tm,{step:s,setStep:l,setNewContractor:n,setShowNewContractor:t,newContractorBasicDetail
1s:c});default:return(0,E.jsx)(mm,{step:s,setStep:l,setNewContractor:n,setShowNewContractor:t,setNewContractorBasicDetails:d,newContractorBasicDetails:c})}}()]})]}),(0,E.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-8"})]})})),hm=ja.Z.TabPane,fm=[{name:"NAME",key:"name",space:7},{name:"START DATE",key:"start_date",space:6},{name:"CONTRACT NAME",key:"contract_name",space:6},{name:"STATUS",key:"status",space:4},{name:"EDIT",key:"edit",space:1}],gm=(0,i.$j)((function(e){return{contractorList:e.employ.contractorList,contractorListLoading:e.employ.contractorListLoading,contractorListFetched:e.employ.contractorListFetched,loginMeta:e.auth.auth.login_meta,companyAccessRole:e.auth.companyAccessRole}}),(function(e){return{getContractorList:function(t,n){return e(w.imh(t,n))}}}))((function(e){var t=e.contractorList,n=e.getContractorList,i=e.contractorListLoading,s=e.contractorListFetched,l=e.loginMeta,o=e.companyAccessRole,c=(0,za.Z)("(max-width: 767px)"),u=(0,a.useRouter)(),m=(0,r.useState)(!1),p=m[0],x=m[1],h=(0,r.useState)("all"),f=h[0],g=h[1],y=null;l&&l.company&&(y=l.company.company_id),(0,r.useEffect)((function(){"admin"!==o&&u.push({pathname:"/company-portal/dashboard"})}),[o]);var v=t,b=[],w=[],k=[],N=[],_=[];t.forEach((function(e){["active"].indexOf(e.status)>-1?(b.push(e),is()(e.start_date)>is()().toDate()&&(w.push(e),b.splice(b.indexOf(e),1))):["contractor_signed","client_signed"].indexOf(e.status)>-1?k.push(e):["inactive"].indexOf(e.status)>-1?N.push(e):["draft"].indexOf(e.status)>-1&&_.push(e)}));var Z=function(){n({company_id:y})};(0,r.useEffect)((function(){p||Z()}),[p]);var C=function(e){return i||!s?(0,E.jsxs)("div",{className:"text-center mt-24",children:[(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 mr-12"}),(0,E.jsx)("span",{className:"text-size-16 text-color-dark-grey-dark",children:"Fetching contracts"})]}):e.length?(0,E.jsx)(wu,{columns:fm,contractorList:e,setShowNewContractor:x,fetchContractors:Z}):function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return(0,E.jsxs)("div",{className:"text-center",style:{marginTop:"54px"},children:[(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",style:{marginTop:"40px"},children:e?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{children:"Your 'Contractor Dashboard\u2019 is empty."})," ",(0,E.jsx)("div",{children:" Start by adding your first contract."})," "]}):"No contractors found"}),className:"mb-20"}),e?(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-weight-500 text-size-16",onClick:function(){return t(!0)},style:{padding:"0 1rem"},children:(0,E.jsxs)("div",{className:"d-flex align-items-center ",children:[(0,E.jsx)(d.Z,{component:ne.r,className:"icon-size-24 mr-4",style:{paddingTop:2}})," ","Add New Contractor"]})}):null]})}("all"===f,x)};return p?(0,E.jsx)(xm,{setShowNewContractor:x}):(0,E.jsxs)("div",{className:"page-wrapper",style:{maxWidth:"940px"},children:[(0,E.jsx)(Fa.Z,{title:"Contractors"}),(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-16",children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark page-title",children:"Contractors"}),(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl border-radius-8 text-size-16 text-weight-500 ",style:{padding:"0 30px"},block:c,onClick:function(){return x(!0)},children:(0,E.jsx)("div",{className:"d-flex align-items-center justify-content-center text-weight-500",children:"Add New Contractor"})})]}),(0,E.jsxs)(ja.Z,{className:"tabs-blue custom-tabs-with-arrow",defaultActiveFirstOption:!0,animated:!1,style:{overflow:"visible"},onChange:function(e){return g(e)},children:[(0,E.jsx)(hm,{tab:"All (".concat(v.length,")"),disabled:0===v.length,children:C(v)},"all"),(0,E.jsx)(hm,{tab:"Active (".concat(b.length,")"),disabled:0===v.length,children:C(b)},"active"),(0,E.jsx)(hm,{tab:"Onboarding (".concat(w.length,")"),disabled:0===v.length,children:C(w)},"onboarding"),(0,E.jsx)(hm,{tab:"Unsigned (".concat(k.length,")"),disabled:0===v.length,children:C(k)},"unsigned"),(0,E.jsx)(hm,{tab:"Inactive (".concat(N.length,")"),disabled:0===v.length,children:C(N)},"inactive"),(0,E.jsx)(hm,{tab:"Draft (".concat(_.length,")"),disabled:0===v.length,children:C(_)},"draft")]})]})})),ym=(0,i.$j)((function(e){return{wallet:e.employ.wallet,walletLoading:e.employ.walletLoading}}
1))((function(e){var t=e.visible,n=e.setVisible,i=e.wallet,a=e.walletLoading,s=e.paymentDetails,l=e.setAddMoneyDetails,o=e.fetchInvoices,c=e.fetchWallet,u=e.paymentSuccessCallback,m=s.required,p=s.currency,x=s.invoices,h=(0,r.useState)(),f=h[0],v=h[1];if(a)return(0,E.jsx)(y.Z,{visible:t,footer:null,closeIcon:(0,E.jsx)(d.Z,{className:"icon-size-24",component:X.r}),onOk:function(){n(!1)},onCancel:function(){n(!1)},children:(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark mt-16 mb-16 text-center",children:"Fetching wallet details. Please wait..."})});var b=i.regular_wallet.balance_info.balance,w=function(){var e=(0,tr.Z)(Qn().mark((function e(){return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(!0),e.prev=1,e.next=4,(0,V.F3)("payments/invoices/company/pay",{kw_wallet_id:i.regular_wallet.uuid,invoice_ids:x});case 4:o(),c(),n(!1),u(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),g.Z.error("Some error occurred while processing payment");case 13:return e.prev=13,v(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[1,10,13,16]])})));return function(){return e.apply(this,arguments)}}();return(0,E.jsx)(y.Z,{visible:t,footer:null,closable:!1,className:"full-screen-mobile-modal ",children:(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark",children:[b>=m?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-12",children:"Are you sure you want to proceed?"}),(0,E.jsx)("div",{className:"mb-28",children:"The amount will be deducted from your wallet."})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-12",children:"Low balance in your wallet"}),(0,E.jsx)("div",{className:"mb-28",children:"You don\u2019t have enough balance to make this transaction. In order to continue, please add the remaining amount in your wallet."})]}),(0,E.jsxs)("div",{className:"pl-20 pr-20 pt-20 pb-20 mb-16 text-weight-500",style:{borderRadius:6,border:"1px solid #D5DAEC"},children:[(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-12",children:[(0,E.jsx)("div",{children:"Transaction amount"}),(0,E.jsxs)("div",{children:[Y.fD[p]," ",(0,Y.x6)(m)]})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-12 text-color-yellow-dark",children:[(0,E.jsx)("div",{children:"Your wallet balance"}),(0,E.jsxs)("div",{children:[Y.fD[p]," ",(0,Y.x6)(b.toFixed(2))]})]}),b<m?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{style:{backgroundColor:"#d5daec",height:1}}),(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mt-12",children:[(0,E.jsx)("div",{children:"Amount required"}),(0,E.jsxs)("div",{children:[Y.fD[p]," ",(0,Y.x6)((m-b).toFixed(2))]})]})]}):null]}),(0,E.jsxs)("div",{className:"d-flex flex-row-reverse align-items-center desktop",children:[(0,E.jsxs)(j.Z,{type:"primary",className:"btn-size-xl text-color-white text-weight-500 text-size-16",style:{paddingLeft:56,paddingRight:56},onClick:function(){b<m?l({amount:m-b,currency:p}):w()},children:[f?(0,E.jsx)(d.Z,{type:"loading"}):null," ",f?"Processing":"Continue"]}),(0,E.jsx)("div",{className:"text-color-dark-grey-light text-weight-500 text-size-16 cursor-pointer",style:{marginRight:30},onClick:function(){n(!1)},children:"Cancel"})]}),(0,E.jsxs)("div",{className:" mobile",style:{position:"absolute",bottom:"2rem",left:"18px",right:"18px"},children:[(0,E.jsxs)(j.Z,{type:"primary",className:"btn-size-xl text-color-white text-weight-500 text-size-16 border-radius-8",style:{paddingLeft:56,paddingRight:56},block:!0,onClick:function(){b<m?l({amount:m-b,currency:p}):w()},children:[f?(0,E.jsx)(d.Z,{type:"loading"}):null," ",f?"Processing":"Continue"]}),(0,E.jsx)(j.Z,{type:"primary",className:"btn-size-xl text-size-16 text-weight-500 border-radius-8 border-color-grey mt-6",style:{padding:"0 60px"},onClick:function(){n(!1)},block:!0,ghost:!0,children:"Cancel"})]})]})})})),vm=(0,i.$j)(null,(function(e){return{getInvoiceDetails:function(t,n){return e(w.Q2U(t,n))}}}))((function(e){var t=e.invoice,n=e.getInvoiceDetails,i=(0,r.useState)(!1),a=i[0],s=i[1],l=(0,r.useState)(null),o=l[0],c=l[1],u=t.allFetched||!1;return(0,r.useEffect)((function(){u||(s(!0),c(null),n({invoice_id:t.uuid},{onSuccess:function(){s(!1)},onFail:function(e){s(!1),c(e)}}))}),[u]),o?(0,E.jsx)("div",{className:"w-100 text-center mt-12500",children:"Some error occurred while fetching invoice details."}):a||!u?(0,E.jsxs)("div",{className:"w-100 text-center mt-12500",children:[(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 mr-8"})," Loading..."]}):(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"pb-6 pt-4 text-color-dark-grey-light text-size-12 mb-8",style:{backgroundColor:"#F4F7FB"},children:(0,E.jsxs)(_.Z,{gutter:12,children:[(0,E.jsx)(Z.Z,{xs:6,children:(0,E.jsx)("div",{className:"pl-48",children:"DESCRIPTION"})}),(0,E.jsx)(Z.Z,{xs:10,children:(0,E.jsx)("div",{children:"QUANTITY"})}),(0,E.jsx)(Z.Z,{xs:6,children:(0,E.jsx)("div",{className:"d-flex justify-content-end",children:(0,E.jsx)("div",{children:"AMOUNT"})})}),(0,E.jsx)(Z.Z,{xs:2})]})}),t.details.map((function(e){return(0,E.jsx)("div",{style:{borderBottom:"1px solid #D5DAEC"},className:"pb-8 pt-8 text-color-dark-grey-dark text-size-16",children:(0,E.jsxs)(_.Z,{gutter:12,children:[(0,E.jsx)(Z.Z,{xs:6,children:(0,E.jsx)("div",{className:"pl-48",children:e.name})}),(0,E.jsx)(Z.Z,{xs:10,children:(0,E.jsx)("div",{children:e.quantity})}),(0,E.jsx)(Z.Z,{xs:6,children:(0,E.jsx)("div",{className:"d-flex justify-content-end",children:(0,E.jsxs)("div",{className:"text-color-green text-weight-500",children:[Y.fD[e.currency]," ",(0,Y.x6)(+e.payable_amount)]})})}),(0,E.jsx)(Z.Z,{xs:2})]})},e.uuid)}))]})}));function jm(){return jm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jm.apply(this,arguments)}function bm(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var wm=r.createElement("path",{d:"M12,5c2.21,0,4,1.79,4,4s-1.79,4-4,4s-4-1.79-4-4S9.79,5,12,5L12,5z M15.71,13.71C14.69,14.51,13.4,15,12,15 c-1.39,0-2.67-0.48-3.69-1.28c-3.66,1.47-6.25,5.05-6.25,9.24H22C22,18.76,19.39,15.17,15.71,13.71z M17.62,6.93 c0.88-0.19,1.62-0.75,2.03-1.53C19.87,4.98,20,4.51,20,4c0-1.66-1.34-3-3-3c-1.45,0-2.65,1.02-2.93,2.37 C15.71,3.98,17.02,5.28,17.62,6.93z M18,9c0,1.15-0.33,2.22-0.9,3.14c1.02,0.48,1.97,1.1,2.83,1.86H24c0-2.7-1.52-5.03-3.75-6.2 c-0.63,0.54-1.41,0.92-2.26,1.09C18,8.93,18,8.96,18,9z M6.38,6.93c0.61-1.64,1.91-2.95,3.56-3.55C9.65,2.02,8.45,1,7,1 C5.34,1,4,2.34,4,4c0,0.51,0.13,0.98,0.35,1.4C4.76,6.17,5.5,6.74,6.38,6.93z M6.91,12.16C6.34,11.24,6,10.16,6,9 c0-0.04,0-0.07,0.01-0.11C5.16,8.72,4.38,8.34,3.75,7.8C1.52,8.97,0,11.3,0,14h4.13C4.97,13.25,5.91,12.63,6.91,12.16z"}),km=function(e){var t=e.svgRef,n=e.title,i=bm(e,["svgRef","title"]);return r.createElement("svg",jm({id:"team",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackgroun
1d:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},i),n?r.createElement("title",null,n):null,wm)},Nm=r.forwardRef((function(e,t){return r.createElement(km,jm({svgRef:t},e))})),_m=((0,i.$j)((function(e){return{fetchInvoiceListLoading:e.employ.fetchInvoiceListLoading,invoiceList:e.employ.invoiceList,invoiceListFetched:e.employ.invoiceListFetched,wallet:e.employ.wallet,walletLoading:e.employ.walletLoading,loginMeta:e.auth.auth.login_meta}}),(function(e){return{getWalletDetails:function(t,n){return e(w.P8b(t,n))}}}))((function(e){var t,n=e.fetchInvoiceListLoading,i=e.invoiceList,a=e.invoiceListFetched,s=e.getWalletDetails,l=e.setAddMoneyDetails,o=e.wallet,c=e.walletLoading,u=e.fetchInvoiceList,m=e.loginMeta,p=(0,r.useState)(null),x=p[0],h=p[1],g=(0,r.useState)(!1),y=g[0],b=g[1],w=(0,r.useState)([]),k=w[0],N=w[1],C=null;m&&(C=m.company&&m.company.company_id),t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={},n=0;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(e){t[e]=0})),e.forEach((function(e){t.hasOwnProperty(e.uuid)&&(t[e.uuid]=e.payable_amount)})),Object.keys(t).forEach((function(e){n+=+t[e]})),n}(i,k);var O=function(){C&&s({company_id:C})};return(0,r.useEffect)((function(){O()}),[C]),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"pl-20 pr-20 mb-8",children:a&&i.length?(0,E.jsxs)(_.Z,{gutter:12,children:[(0,E.jsx)(Z.Z,{xs:14,children:(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-12 pl-36",children:"PAYEE"})}),(0,E.jsx)(Z.Z,{xs:4,children:(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-12",children:"DUE IN"})}),(0,E.jsx)(Z.Z,{xs:2,children:(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-12",children:"ACTION"})}),(0,E.jsx)(Z.Z,{xs:4,children:(0,E.jsx)("div",{className:"d-flex justify-content-end",children:(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-12",children:"AMOUNT"})})})]}):null}),a&&!i.length?(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",children:"No invoices found"}),className:"mb-20"}):(0,E.jsx)("div",{children:!a||n?(0,E.jsx)("div",{className:"text-center",children:(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 text-color-dark-grey-dark"})}):(0,E.jsx)(E.Fragment,{children:i.length?(0,E.jsx)(v.Z,{accordion:!0,className:"dashboard-collapse",children:i.map((function(e){return(0,E.jsx)(v.Z.Panel,{showArrow:!1,header:(0,E.jsxs)(_.Z,{type:"flex",align:"middle",gutter:12,className:"cursor-pointer",children:[(0,E.jsx)(Z.Z,{xs:14,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(kd.Z,{children:(0,E.jsx)(S.Z,{className:"checkbox-size-24 checkbox-bg-grey mr-12",onChange:function(t){t.stopPropagation();var n=t.target.checked,r=k.slice(0);n?r.push(e.uuid):r=r.filter((function(t){return t!==e.uuid})),N(r)}})}),(0,E.jsx)("div",{style:{height:"36px",width:"36px",padding:"10px"},className:"background-grey border-radius-50 mr-12",children:(0,E.jsx)(d.Z,{component:Nm,className:"icon-size-16"})}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark text-weight-500",children:e.name})]})}),(0,E.jsx)(Z.Z,{xs:4,children:(0,E.jsx)("div",{className:"pt-8 pb-8 text-size-16 text-color-dark-grey-dark",children:(0,Y.xz)(new Date(e.due_date))})}),(0,E.jsx)(Z.Z,{xs:2,children:(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-6 border-color-grey text-weight-500 text-color-blue",style:{padding:"0 24px"},onClick:function(t){t.stopPropagation(),h({required:Number(e.payable_amount),currency:e.currency,invoices:[e.uuid]}),b(!0)},children:"Pay Now"})}),(0,E.jsx)(Z.Z,{xs:4,children:(0,E.jsx)("div",{className:"d-flex justify-content-end pt-8 pb-8",children:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-size-16 text-weight-500",children:[Y.fD[e.currency]," ",(0,Y.x6)(Number(e.payable_amount).toFixed(2))]})})})]}),children:(0,E.jsx)(vm,{invoice:e})},e.uuid)}))}):null})}),x?(0,E.jsx)(ym,{paymentDetails:x,visible:y,setVisible:b,setAddMoneyDetails:l,fetchInvoices:function(){u(C,"upcoming",1)},fetchWallet:O,paymentSuccessCallback:function(){N([])}}):null,a&&!i.length?null:(0,E.jsxs)("div",{className:"d-flex justify-content-between row-reverse mt-8 pb-16",children:[o?(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark mt-8",children:[(0,E.jsx)("span",{className:"text-weight-500 mr-4",children:"Wallet Balance:"}),c?(0,E.jsx)(d.Z,{className:"icon-size-16",type:"loading"}):"".concat(Y.fD[o.regular_wallet.balance_info.currency]," ").concat((0,Y.x6)(o.regular_wallet.balance_info.balance.toFixed(2)))]}):null,(0,E.jsxs)("div",{className:"d-flex flex-column align-items-end",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center mb-8",children:[o&&k.length?(0,E.jsxs)("div",{className:"pr-24",children:[(0,E.jsx)("span",{className:"text-size-16 text-color-dark-grey-dark text-weight-500 mr-4",children:"Total:"}),c?(0,E.jsx)(d.Z,{className:"icon-size-16",type:"loading"}):(0,E.jsxs)("span",{className:"text-size-16 text-color-dark-grey-dark",children:[Y.fD[o.regular_wallet.balance_info.currency]," ",(0,Y.x6)(Number(t).toFixed(2))]})]}):null,(0,E.jsx)("div",{style:{width:"200px"},children:(0,E.jsxs)(j.Z,{type:"primary",block:!0,className:"btn-size-l border-radius-6 text-weight-500",disabled:!k.length,onClick:function(){h({required:Number(t),currency:o.regular_wallet.balance_info.currency,invoices:(0,f.Z)(k)}),b(!0)},children:["Pay Selected ",k.length?"(".concat(k.length,")"):""]})})]}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light",children:"Select multiple upcoming invoices and pay all at once."})]})]})]})})),n(19754)),Zm=(0,i.$j)(null,(function(e){return{getInvoiceDetails:function(t,n){return e(w.Q2U(t,n))}}}))((function(e){var t=e.invoice,n=e.getInvoiceDetails,i=e.setPaymentDetails,a=e.setPaymentModalVisible,s=(0,r.useState)(!1),l=s[0],o=s[1],c=(0,r.useState)(null),u=c[0],m=c[1],p=t.allFetched||!1;(0,r.useEffect)((function(){p||(o(!0),m(null),n({invoice_id:t.uuid},{onSuccess:function(){o(!1)},onFail:function(e){o(!1),m(e)}}))}),[p]);return u?(0,E.jsx)("div",{className:"w-100 text-center mt-12500",children:"Some error occurred while fetching invoice details."}):l||!p?(0,E.jsxs)("div",{className:"w-100 text-center mt-12500",children:[(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 mr-8"})," Loading..."]}):(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"pb-6 pt-4 text-size-12 ",children:[(0,E.jsxs)("div",{className:"pl-12 pb-12 mb-12",children:[(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-14",children:"Description"}),(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16",children:null===t||void 0===t?void 0:t.description})]}),(0,E.jsxs)("div",{className:"pl-12 pb-12",children:[(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-14",children:"Status"}),(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-size-16",children:[function(e){var t;return null===(t=_m.hZ[e])||void 0===t?void 0:t.label}(null===t||void 0===t?void 0:t.status),(0,E.jsxs)("span",{className:"text-color-dark-grey-light text-size-14 ml-8",children:["Due by ",is()(null===t||void 0===t?void 0:t.due_date).format("MMM DD, YYYY")]})]})]}),(0,E.jsxs)(_.Z,{gutter:12,style:{background:"#F4F7FB",paddingTop:"8px",paddingBottom:"8px"},children:[(0,E.jsx)(Z.Z,{xs:13,children:(0,E.jsx)("div",{className:"pl-12 text-size-12",children:"DESCRIPTION"})}),(0,E.jsx)(Z.Z,{xs:3,children:(0,E.jsx)("div",{className:"text-size-12",children:"QUANTITY"})}),(0,E.jsx)(Z.Z,{xs:6,children:(0,E.jsx)("div",{className:"d-flex justify-content-end text-size-12",children:(0,E.jsx)("div",{children:"AMOUNT"})})}),(0,E.jsx)(Z.Z,{xs:2})]})]}),t.details.map((function(e){return(0,E.jsxs)("div",{style:{borderBottom:"1px solid #D5DAEC"},className:"pb-8 pt-8 text-color-dark-grey-dark text-size-16",children:[(0,E.jsxs)(_.Z,{gutter:12,children:[(0,E.jsx)(Z.Z,{xs:13,children:(0,E.jsx)("div",{className:"pl-12",children:e.name})}),(0,E.jsx)(Z.Z,{xs:3,children:(0,E.jsx)("div",{className:"text-center",children:e.quantity})}),(0,E.jsx)(Z.Z,{xs:6,children:(0,E.jsx)("div",{className:"d-flex justify-content-end",children:(0,E.jsxs)("div",{className:"text-color-green text-weight-500",children:[Y.fD[e.currency]," ",(0,Y.x6)(+e.payable_amount)]})})}),(0,E.jsx)(Z.Z,{xs:2})]}),(0,E.jsx)("div",{className:"pl-12 pr-12 mt-20",children:"unpaid"===t.status&&(0,E.jsx)(j.Z,{className:"btn-size-xl border-radius-10 border-color-grey text-weight-500 ",style:{padding:"0 24px"},type:"primary",disabled:"paid"===t.status,block:!0,onClick:function(e){e.stopPropagation(),i({required:Number(t.payable_amount),currency:t.currency,invoices:[t.uuid]}),a(!0)},children:"Pay Now"})})]},e.uuid)}))]})})),Cm=(n(1154),n(53162)),Om=n(14092),Sm=n(44162),zm=function(e){var t=e.invoiceTimelineLoading,n=e.invoiceTimeline,i=(0,r.useState)(!1),a=i[0],s=i[1];if((0,r.useEffect)((function(){if(n){var e=n.find((function(e){return"withdrawl_processing"===e.status}));e&&"finished"===e.type&&s(!0)}}),[n]),t)return(0,E.jsx)("div",{style:{height:"144px"},className:"d-flex justify-content-center align-items-center",children:(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24"})});var l=function(e){switch(e.type){case"finished":return Gu.r;case"in_progress":case"requested":return Om.r;case"future":return Sm.r;case"failed":return Cm.r;default:return null}};return(0,E.jsxs)("div",{className:"text-size-14 text-lineHeight",children:[n&&n.map((function(e,t){return(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"mr-8",children:(0,E.jsx)(d.Z,{className:"icon-size-20",component:l(e)})}),(0,E.jsx)("div",{className:Ba()("text-weight-500",{"text-color-green-dark":"finished"===e.type},{"text-color-orange":"failed"===e.type},{"text-color-dark-grey-dark":"in_progress"===e.type||"future"===e.type}),children:e.title})]}),(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{style:{width:"20px",minWidth:"20px"},className:"d-flex justify-content-center mr-8",children:n.length>t+1?(0,E.jsx)("div",{className:"border-width-1 border-color-grey"}):null}),(0,E.jsx)("div",{className:Ba()("text-color-dark-grey-light",{"mb-24":n.length>t+1}),style:{whiteSpace:"pre-wrap"}
1,children:e.subtitle})]})]},e.status)})),a?(0,E.jsx)("div",{className:"text-color-dark-grey pr-12 pl-12 pt-4 pb-4 border-radius-6 mt-8",style:{backgroundColor:"rgba(255,209,131,0.4)"},children:"It could take 3-5days to credit in your a/c"}):null]})};zm.defaultPropTypes={invoiceTimeline:[]};var Em=zm,Pm=n(90184),Dm=n(74822);function Fm(){return Fm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fm.apply(this,arguments)}function Lm(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Am=r.createElement("title",null,"kw_logo"),Im=r.createElement("g",{id:"kw_logo",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M13.46,11.41 L14.34,10.38 L14.68,10 L14.18,9.5 L13.53,8.85 L13.28,9.14 L12.22,10.37 L11.88,10.76 L11.57,10.39 L11.54,10.35 C11.08,9.83 10.41,9.5 9.66,9.5 C8.28,9.5 7.15,10.62 7.15,12.01 C7.15,13.39 8.27,14.52 9.66,14.52 C10.42,14.52 11.1,14.18 11.55,13.65 L11.55,13.65 L11.88,13.26 L12.22,13.65 C12.68,14.18 13.36,14.52 14.12,14.52 C14.51,14.52 14.87,14.43 15.2,14.28 C15.42,14.17 15.63,14.03 15.81,13.87 C16.26,14.28 16.85,14.53 17.5,14.53 C19,14.53 20.01,13.28 20.01,12.02 C20.01,7.6 16.43,4.02 12.01,4.02 C7.59,4.02 4.01,7.6 4.01,12.02 C4.01,16.44 7.59,20.02 12.01,20.02 C14.71,20.02 17.09,18.69 18.54,16.65 L17.21,15.71 C16.06,17.34 14.16,18.4 12.01,18.4 C8.49,18.4 5.64,15.55 5.64,12.03 C5.64,8.51 8.49,5.66 12.01,5.66 C14.65,5.66 16.91,7.26 17.88,9.55 C18.2,10.31 18.38,11.15 18.38,12.03 C18.38,12.51 17.99,12.9 17.51,12.9 C17.03,12.9 16.63,12.51 16.63,12.03 L16.63,11.15 L15,11.15 L15,12 C15,12.48 14.61,12.87 14.13,12.87 C13.87,12.87 13.64,12.76 13.48,12.58 L13.45,12.55 L12.96,12 L13.44,11.44 L13.46,11.41 Z M10.33,12.56 L10.3,12.59 C10.14,12.77 9.91,12.88 9.65,12.88 C9.17,12.88 8.78,12.49 8.78,12.01 C8.78,11.53 9.17,11.13 9.65,11.13 C9.91,11.13 10.14,11.24 10.3,11.42 L10.33,11.45 L10.8,12 L10.33,12.56 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"})),Mm=function(e){var t=e.svgRef,n=e.title,i=Lm(e,["svgRef","title"]);return r.createElement("svg",Fm({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Am:n?r.createElement("title",null,n):null,Im)},Rm=r.forwardRef((function(e,t){return r.createElement(Mm,Fm({svgRef:t},e))})),Tm=["#FFDDA2","#FFDCEC","#E0D1FA","#FFDDD3","#B5E4C9"],qm={padding:"10px 16px",borderLeft:"2px solid transparent",width:"200px",fontSize:"16px",fontWeight:"500"},Bm=function(e){var t=e.invoice,n=e.setPaymentDetails,i=e.setPaymentModalVisible,a=e.selectedAmounts,s=e.setSelectedAmounts,l=e.fetchInvoiceList,o=e.openCollapse,u=(0,za.Z)("(max-width: 767px)"),m=(0,r.useState)(!1),p=m[0],x=m[1],h=(0,r.useState)(null),g=h[0],v=h[1],b=(0,r.useState)(!1),w=b[0],k=b[1],N=(0,r.useState)(!1),C=N[0],O=N[1],z=(0,r.useState)(!1),P=z[0],D=(z[1],(0,r.useState)(null)),F=D[0],L=D[1];(0,r.useEffect)((function(){if(t&&t.meta&&t.meta.status&&t.meta.status.length>0){var e=[],n=t.meta.status[t.meta.status.length-1];e="unpaid"===n.status?[].concat((0,f.Z)(t.meta.status),(0,f.Z)(_m.lx)):"paid_by_client"===n.status?[].concat((0,f.Z)(t.meta.status),(0,f.Z)(_m.hr)):(0,f.Z)(t.meta.status),L(e)}}),[t]);var A=function(){var e=(0,tr.Z)(Qn().mark((function e(n){var r,i,a;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="payroll/company-invoices","preview-invoice"!==n.key){e.next=14;break}return r+="/preview?invoice_id=".concat(t.uuid),e.prev=3,e.next=6,fetch("".concat((0,V.dN)(),"/").concat(r),{method:"GET",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"}}).then((function(e){return e.text()}));case 6:(i=e.sent)&&(v(i),k(!0)),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(3);case 12:e.next=29;break;case 14:if("invoice-details"!==n.key){e.next=18;break}O(!0),e.next=29;break;case 18:if("download-invoice"!==n.key){e.next=29;break}return r+="/download?invoice_id=".concat(t.uuid),e.prev=20,e.next=23,fetch("".concat((0,V.dN)(),"/").concat(r),{method:"GET",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"}}).then((function(e){return e.text()}));case 23:(a=e.sent)&&window.open(a,"_blank"),e.next=29;break;case 27:e.prev=27,e.t1=e.catch(20);case 29:x(!1);case 30:case"end":return e.stop()}}),e,null,[[3,10],[20,27]])})));return function(t){return e.apply(this,arguments)}}(),I=(0,E.jsxs)(c.Z,{style:{padding:"10px 0"},onClick:function(e){return A(e)},children:["paid"===t.status?(0,E.jsx)(c.Z.Item,{style:qm,children:(0,E.jsx)("div",{children:"View Invoice"})},"preview-invoice"):null,(0,E.jsx)(c.Z.Item,{style:qm,children:(0,E.jsx)("div",{children:"View Details"})},"invoice-details"),(0,E.jsx)(c.Z.Item,{style:qm,children:(0,E.jsx)("div",{children:"Download Invoice"})},"download-invoice")]}),M=function(){var e,n,r=null===t||void 0===t||null===(e=t.meta)||void 0===e||null===(n=e.status)||void 0===n?void 0:n.filter((function(e){return e.status===t.status}));if(t.status){var i,a=_m.hZ[t.status],s=null;return"success"===(null===a||void 0===a?void 0:a.iconType)?s=(0,E.jsx)(d.Z,{className:"icon-size-24 mr-8",style:{color:a&&a.color?a.color:"#108B43"},component:Pm.r}):"fail"===(null===a||void 0===a?void 0:a.iconType)?s=(0,E.jsx)(d.Z,{className:"icon-size-24 mr-8",component:Cm.r}):"loading"===(null===a||void 0===a?void 0:a.iconType)&&(s=(0,E.jsx)(d.Z,{className:"icon-size-24 mr-8",component:Om.r})),(0,E.jsx)(kd.Z,{children:(0,E.jsx)(de.Z,{overlay:(0,E.jsx)("div",{style:{boxShadow:"0 2px 12px 0 #D5DAEC",width:"220px"},className:"background-white border-width-1 border-radius-6 border-color-grey p-20",children:(0,E.jsx)(Em,{invoiceTimelineLoading:P,invoiceTimeline:F,invoice:t})}),disabled:!(null!==t&&void 0!==t&&null!==(i=t.meta)&&void 0!==i&&i.status),trigger:["click"],children:(0,E.jsxs)("div",{className:"d-flex align-items-start",children:[s,(0,E.jsxs)("div",{style:{color:null===a||void 0===a?void 0:a.color},className:"text-size-14 text-weight-500 desktop",children:[(0,E.jsx)("div",{children:null===a||void 0===a?void 0:a.label}),(null===r||void 0===r?void 0:r.length)>0&&"unpaid"!==t.status&&(0,E.jsx)("div",{className:"text-color-dark-grey-light",children:r[0].subtitle}),"unpaid"===t.status||"sent_to_company"===t.status||"edited"===t.status?(0,E.jsxs)("div",{className:"text-color-dark-grey-light",children:["Due by"," ",is()(null===t||void 0===t?void 0:t.due_date).utc().format("MMM DD, YYYY")]}):null]})]})})})}};return(0,E.jsxs)("div",{className:"".concat(u?"pt-16 pb-16 pl-12 pr-12":"p-20"),children:[(0,E.jsxs)(_.Z,{gutter:12,className:"d-flex align-items-".concat(u?"center":"start"),children:[(0,E.jsx)(Z.Z,{xs:u?20:12,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(kd.Z,{children:(0,E.jsx)(S.Z,{className:"checkbox-size-24 checkbox-bg-grey mr-16 desktop",disabled:"paid"===t.status,onChange:function(e){e.stopPropagation();var n=e.target.checked,r=a.slice(0);n?r.push(t.uuid):r=r.filter((function(e){return e!==t.uuid})),s(r)}})}),(0,E.jsx)(ys.Z,{size:48,style:{color:"#252939",backgroundColor:Tm[Math.floor(Math.random()*Tm.length)],minWidth:"48px"},children:"other"!==t.type&&null!==t&&void 0!==t&&t.first_name?"".concat(null!==t&&void 0!==t&&t.first_name?null===t||void 0===t?void 0:t.first_name[0]:"").
1concat(null!==t&&void 0!==t&&t.last_name?null===t||void 0===t?void 0:t.last_name[0]:""):(0,E.jsx)(d.Z,{component:Rm,className:"text-size-48"})}),(0,E.jsxs)("div",{className:"text-size-16-18 text-color-dark-grey-dark text-weight-500 ml-16 text-ellipse",title:t.description,children:[(0,E.jsx)("div",{children:"other"===t.type||"payroll"===t.type||"asset_purchase"===t.type||"contract"===t.type||"reimbursement"===t.type?t.name:"".concat(null===t||void 0===t?void 0:t.first_name," ").concat(null===t||void 0===t?void 0:t.last_name)}),(0,E.jsx)("div",{className:"text-ellipse desktop text-size-14-16 text-color-dark-grey-light text-weight-400 ".concat(t.first_name?"":"text-weight-500"),children:t.description}),(0,E.jsxs)("div",{className:"text-ellipse mobile text-size-14-16 text-color-dark-grey-light text-weight-400 ".concat(t.first_name?"":"text-weight-500"),children:[Y.fD[t.currency]," ",(0,Y.x6)(Number(t.payable_amount).toFixed(2))]})]})]})}),(0,E.jsx)(Z.Z,{xs:4,className:"desktop",children:(0,E.jsx)("div",{className:"",children:M(t.status)})}),(0,E.jsx)(Z.Z,{xs:4,className:"desktop",children:(0,E.jsx)("div",{className:"d-flex pt-8 pb-8",children:(0,E.jsxs)("div",{className:"text-size-14-16 text-weight-500",children:[Y.fD[t.currency]," ",(0,Y.x6)(Number(t.payable_amount).toFixed(2))]})})}),(0,E.jsxs)(Z.Z,{xs:2,className:"desktop",children:["requested"===t.status&&(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-6 border-color-grey text-weight-500 text-color-blue",style:{padding:"0 24px"},disabled:"paid"===t.status,onClick:function(e){e.stopPropagation(),O(!0)},children:"View Invoice"}),("unpaid"===t.status||"sent_to_company"===t.status||"edited"===t.status)&&"annexure"!=t.type&&(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-6 border-color-grey text-weight-500 text-color-blue",style:{padding:"0 24px"},disabled:"paid"===t.status,onClick:function(e){e.stopPropagation(),n({required:Number(t.payable_amount),currency:t.currency,invoices:[t.uuid]}),i(!0)},children:"Pay Now"})]}),"requested"!==t.status&&(0,E.jsx)(Z.Z,{xs:u?4:2,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end pt-6 pb-6 align-items-center",children:[(0,E.jsx)("div",{className:"mobile",children:M(t.status)}),(0,E.jsx)(de.Z,{trigger:"click",overlay:I,placement:"bottomRight",onVisibleChange:function(e){return x(e)},className:"desktop",children:(0,E.jsx)(d.Z,{component:ho.r,className:Ba()("icon-size-24","border-radius-6",{"background-light-blue-1":p},{"text-color-dark-grey-dark":!p},{"text-color-blue":p})})}),(0,E.jsx)(j.Z,{className:"mobile",style:{padding:"0px 7px",height:"40px",border:"1px solid #D5DAEC"},children:(0,E.jsx)(d.Z,{component:vo.r,className:"text-size-24",style:{transition:"all .2s ease-in-out",height:"24px",transform:o===(null===t||void 0===t?void 0:t.uuid)?"rotate(180deg)":"rotate(0deg)"}})})]})})]}),w&&g?(0,E.jsx)(y.Z,{visible:w,width:800,footer:null,centered:!0,onCancel:function(e){e.stopPropagation(),k(!1)},closeIcon:(0,E.jsx)(d.Z,{component:X.r}),children:(0,E.jsx)("div",{className:"text-color-dark-grey-dark",style:{maxHeight:"600px",overflow:"auto"},children:(0,E.jsx)("div",{dangerouslySetInnerHTML:{__html:g}})})}):null,C&&(0,E.jsx)(Dm.Z,{isVisible:C,invoice:t,onCancel:function(){return O(!1)},fetchInvoiceList:l,userType:"company"})]})},Vm=function(e){var t,n=e.invoiceList,i=e.showFilters,a=e.invoiceListFetched,s=e.wallet,l=e.walletLoading,o=e.loginMeta,u=e.getWalletDetails,m=e.setAddMoneyDetails,x=e.currentTab,h=e.currentPage,g=e.setCurrentPage,y=e.invoiceListPage,b=e.fetchInvoiceList,w=e.fetchInvoiceListLoading,k=(0,za.Z)("(max-width: 767px)"),N=(0,r.useState)("all"),C=N[0],O=N[1],S=(0,r.useState)(null),z=S[0],P=S[1],D=(0,r.useState)(!1),F=D[0],L=D[1],A=(0,r.useState)([]),I=A[0],M=A[1],R=(0,r.useState)([]),T=R[0],q=R[1];t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={},n=0;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(e){t[e]=0})),e.forEach((function(e){t.hasOwnProperty(e.uuid)&&(t[e.uuid]=e.payable_amount)})),Object.keys(t).forEach((function(e){n+=+t[e]})),n}(n,I);var B=null;o&&(B=o.company&&o.company.company_id);var V=function(){B&&u({company_id:B})};(0,r.useEffect)((function(){V()}),[B]),(0,r.useEffect)((function(){M([])}),[h]);var H=(0,E.jsx)(c.Z,{style:{padding:"10px 0"},children:(0,E.jsx)(c.Z.Item,{style:qm,children:"Menu Item"})}),W=(0,r.useState)(!1),J=(W[0],W[1],function(e,t,n){return(0,E.jsx)(j.Z,{ghost:!n,className:Ba()("btn-size-m","mr-12","border-radius-6",{"border-color-blue":n},{"border-color-grey":!n}),style:{padding:"0 20px"},onClick:function(){return O(e)},children:(0,E.jsx)("span",{className:Ba()("text-weight-500",{"text-color-dark-grey-dark":!n},{"text-color-blue":n}),children:t})})});return w?(0,E.jsx)(Ql.Z,{}):(0,E.jsxs)("div",{children:[i?(0,E.jsxs)("div",{className:"d-flex justify-content-between pb-20",children:[(0,E.jsxs)("div",{className:"pl-20",children:[J("all","All","all"===C),J("employee","Employee Payroll","employee"===C),J("contractor","Contractor Invoices","contractor"===C),J("wallet","Wallet Transactions","wallet"===C),J("other","Other","other"===C)]}),(0,E.jsx)("div",{children:(0,E.jsx)(de.Z,{overlay:H,trigger:"click",children:(0,E.jsxs)("div",{className:"d-flex align-items-center cursor-pointer",children:[(0,E.jsx)("div",{className:"text-size-14-16 text-weight-500 text-color-dark-grey-dark mr-4",children:"Export"}),(0,E.jsx)(d.Z,{component:p.r,className:"icon-size-20"})]})})})]}):null,n.length?(0,E.jsx)("div",{className:"pl-20 pr-20 mb-8",children:(0,E.jsxs)(_.Z,{gutter:12,children:[(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-10-12",children:"DESCRIPTION"})}),(0,E.jsx)(Z.Z,{xs:4,children:(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-10-12",children:"STATUS"})}),(0,E.jsx)(Z.Z,{xs:4,children:(0,E.jsx)("div",{className:"d-flex ",children:(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-10-12",children:"AMOUNT"})})})]})}):null,n.length?(0,E.jsx)(v.Z,{accordion:!0,className:"custom-collapse collapse-card",onChange:function(e){q(T===e?null:e)},activeKey:T,children:n.map((function(e){return"annexure"!=e.type&&(0,E.jsx)(v.Z.Panel,{showArrow:!1,header:(0,E.jsx)(Bm,{invoice:e,setPaymentDetails:P,setPaymentModalVisible:L,selectedAmounts:I,setSelectedAmounts:M,fetchInvoiceList:b,openCollapse:T}),disabled:!1,children:k?(0,E.jsx)(Zm,{invoice:e,setPaymentDetails:P,setPaymentModalVisible:L}):(0,E.jsx)(vm,{invoice:e})},e.uuid)}))}):(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-weight-500 text-size-16-18",children:"No invoices found"}),className:"mb-20"}),z?(0,E.jsx)(ym,{paymentDetails:z,visible:F,setVisible:L,setAddMoneyDetails:m,fetchInvoices:function(){b(B,x,h)},fetchWallet:V,paymentSuccessCallback:function(){M([])}}):null,a&&!n.length?null:(0,E.jsxs)("div",{className:"d-flex justify-content-between row-reverse mt-8 pb-16 desktop",children:[s?(0,E.jsxs)("div",{className:"text-size-14-16 text-color-dark-grey-dark mt-8",children:[(0,E.jsx)("span",{className:"text-weight-500 mr-4",children:"Wallet Balance:"}),l?(0,E.jsx)(d.Z,{className:"icon-size-16",type:"loading"}):s&&s.regular_wallet?"".concat(Y.fD[s.regular_wallet.balance_info.currency]," ").concat((0,Y.x6)(s.regular_wallet.balance_info.balance.toFixed(2))):null]}):null,(0,E.jsxs)("div",{className:"d-flex flex-column align-items-end",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center mb-8",children:[(0,E.jsxs)("div",{className:"pr-24",children:[(0,E.jsx)("span",{className:"text-size-14-16 text-color-dark-grey-dark text-weight-500 mr-4",children:"Total:"}),(0,E.jsx)("span",{className:"text-size-14-16 text-color-dark-grey-dark",children:s&&s.regular_wallet?"".concat(Y.fD[s.regular_wallet.balance_info.currency]," ").concat((0,Y.x6)(Number(t).toFixed(2))):null})]}),(0,E.jsx)("div",{style:{width:"200px"},children:(0,E.jsxs)(j.Z,{type:"primary",block:!0,className:"btn-size-l border-radius-6 text-weight-500",disabled:!I.length,onClick:function(){P({required:Number(t).toFixed(2),currency:s.regular_wallet&&s.regular_wallet.balance_info.currency,invoices:(0,f.Z)(I)}),L(!0)},children:["Pay Selected"," ",I.length?"(".concat(I.length,")"):""]})})]}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light",children:"Select multiple upcoming invoices and pay all at once."})]})]}),(null===n||void 0===n?void 0:n.length)&&(0,E.jsx)(yd.Z,{total:y,defaultPageSize:25,current:h,onChange:function(e){return g(e)},hideOnSinglePage:!0})]})};Vm.defaultProps={showFilters:!1};var Ym=(0,i.$j)((function(e){return{invoiceListPage:e.employ.invoiceListPage,invoiceList:e.employ.invoiceList,invoiceListFetched:e.employ.invoiceListFetched,wallet:e.employ.wallet,walletLoading:e.employ.walletLoading,loginMeta:e.auth.auth.login_meta,fetchInvoiceListLoading:e.employ.fetchInvoiceListLoading}}),(function(e){return{getWalletDetails:function(t,n){return e(w.P8b(t,n))}}}))(Vm),Hm=n(54465),Wm=n(86664),Jm=(0,Hm.J)(to.stripeIntegrationKey),Um=function(e){var t=e.children;return(0,E.jsx)(Wm.Elements,{stripe:Jm,children:t})};function $m(){return $m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$m.apply(this,arguments)}function Gm(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Km=r.createElement("title",null," Cards"),Qm=r.createElement("g",{id:"-Cards",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Hire/Inactive/Bank_Details",transform:"translate(2.000000, 5.000000)",strokeWidth:2},r.createElement("path",{d:"M20,2.8 C20,1.2546 18.7454,0 17.2,0 L2.8,0 C1.2546,0 0,1.2546 0,2.8 L0,11.2 C0,12.7454 1.2546,14 2.8,14 L17.2,14 C18.7454,14 20,12.7454 20,11.2 L20,2.8 Z",id:"Stroke-2",stroke:"#3A3E4C",fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M17,8.6 C17,8.2689 16.7311,8 16.4,8 L14.6,8 C14.2689,8 14,8.2689 14,8.6 L14,10.4 C14,10.7311 14.2689,11 14.6,11 L16.4,11 C16.7311,11 17,10.7311 17,10.4 L17,8.6 Z",id:"Stroke-4",stroke:"#3A3E4C",fill:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:1,y1:4,x2:19,y2:4,id:"Stroke-5",stroke:"#7C7F88"}),r.createElement("line",{x1:4,y1:8,x2:10,y2:8,id:"Stroke-6",stroke:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}))),Xm=function(e){var t=e.svgRef,n=e.title,i=Gm(e,["svgRef","title"]);return r.createElement("svg",$m({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Km:n?r.createElement("title",null,n):null,Qm)},ep=r.forwardRef((function(e,t){return r.createElement(Xm,$m({svgRef:t},e))})),tp=function(e){var t=e.card,n=e.methodType,i=e.payable,a=e.handlePaymentSelect,s=e.selectedPaymentMethodDetails,l=t.card,o=(0,r.useState)(!1),c=o[0],u=o[1],m=function(){c?a():a(t)};(0,r.useEffect)((function(){s&&s.type&&s.type===n&&s.card&&s.card.id===t.id?u(!0):u(!1)}),[s]);return(0,E.jsxs)("div",{className:"dashboard-card p-20 mb-8 d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"d-flex align-items-center justify-content-center border-radius-50 mr-16",style:{height:"48px",width:"48px",backgroundColor:"rgba(255,209,131,0.75)"},children:(0,E.jsx)(d.Z,{component:ep,className:"icon-size-24"})}),(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"text-weight-500 text-size-18 mb-4",children:[(0,E.jsx)("span",{style:{textTransform:"capitalize"},children:l.brand})," ","Ending in ",(0,E.jsx)("span",{children:l.last4})]}),(0,E.jsxs)("div",{className:"mb-4",children:["Expires in ",l.exp_month,"/",l.exp_year]})]})]}),i?(0,E.jsx)("div",{style:{height:"24px",width:"24px",minWidth:"24px"},className:Ba()("border-radius-50",{"background-light-blue":!c},{"background-blue":c},{"border-width-1":!c},{"border-color-grey":!c},"d-flex","align-items-center","justify-content-center","cursor-pointer"),onClick:m,children:c?(0,E.jsx)(d.Z,{className:"icon-size-16",component:Mt.r}):null}):null]})},np=function(e){var t=e.methodType,n=e.companyId,i=e.handleNewPaymentSelect,a=e.payable,s=e.selectedPaymentMethodDetails,l=(0,Wm.useElements)(),o=(0,r.useState)(!1),c=o[0],u=o[1],m=(0,r.useState)(null),p=m[0],x=m[1],h=(0,r.useState)(!1),f=h[0],g=h[1];(0,r.useEffect)((function(){p&&p.complete?i(l.getElement(Wm.CardElement),f):s&&i()}),[p,f]),(0,r.useEffect)((function(){s&&s.type&&s.type==="".concat(t,"-new")&&s.card?u(!0):u(!1)}),[s]);return n?(0,E.jsx)(v.Z,{className:"collapse-card",activeKey:c?"new":null,children:(0,E.jsx)(v.Z.Panel,{showArrow:!1,header:(0,E.jsxs)("div",{className:"p-20 d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"background-light-blue-1 border-radius-50 d-flex justify-content-center align-items-center mr-16",style:{width:"48px",height:"48px"},children:(0,E.jsx)(d.Z,{component:ne.r,className:"icon-size-24 icon-blue"})}),(0,E.jsx)("div",{className:"text-size-18 text-weight-500 text-color-blue",children:"Link a New Card"})]}),a?(0,E.jsx)("div",{style:{height:"24px",width:"24px",minWidth:"24px"},className:Ba()("border-radius-50",{"background-light-blue":!c},{"background-blue":c},{"border-width-1":!c},{"border-color-grey":!c},"d-flex","align-items-center","justify-content-center","cursor-pointer"),onClick:function(e){e.stopPropagation(),!c&&p&&p.complete?i(l.getElement(Wm.CardElement),f):i(),u(!c)},children:c?(0,E.jsx)(d.Z,{className:"icon-size-16",component:Mt.r}):null}):null]}),children:(0,E.jsxs)("div",{className:"pl-20 pr-20 pb-20",children:[(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-weight-500 mb-4",children:"Enter Your Card Details"}),(0,E.jsx)(Wm.CardElement,{className:"stripe-card-element mb-8",option:{hidePostalCode:!0,style:{base
1:{color:"#32325d",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"}},invalid:{color:"#fa755a",iconColor:"#fa755a"}}},onChange:function(e){x(e)}}),(0,E.jsx)(S.Z,{className:"checkbox-size-20 text-weight-500",onChange:function(e){g(e.target.checked)},children:"Save this card securely"})]})},"new")}):null};np.defaultProps={handleNewPaymentSelect:function(){},payable:!1};var rp=np,ip=function(e){var t=e.title,n=e.companyId,r=e.paymentMethod,i=e.payable,a=e.handlePaymentMethodSelect,s=e.selectedPaymentMethodDetails,l=(0,Wm.useStripe)(),o=function(e){e?a({uuid:r.uuid,type:r.type,txn_charge_display:r.txn_charge_display,card:e,save_payment_method:!0,startPayment:c}):a()},c=function(){var e=(0,tr.Z)(Qn().mark((function e(t){var r,i,a,s,o,c,d;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.paymentMethodDetails,i=t.amount,a=t.currency,s=t.onSuccess,e.next=3,(0,V.F3)("payments/kwwallet/company/add-money/start",{clustering_company_id:n,kw_payment_method_id:r.uuid,amount:i,currency:a,save_payment_method:r.savePaymentMethod});case 3:return o=e.sent,c=null,c="card"===r.type?r.card.id:{card:r.card},e.next=8,l.confirmCardPayment(o.pg_response.client_secret,{payment_method:c});case 8:if(!(d=e.sent).error){e.next=11;break}throw new Error(d.error);case 11:return e.next=13,(0,V.F3)("payments/kwwallet/company/add-money/complete",{payment_gateway:"stripe",pg_transaction_id:d.paymentIntent.id});case 13:s();case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,E.jsxs)("div",{className:"mb-40",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-end mb-8",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500",children:t}),(0,E.jsxs)("div",{className:"text-size-14 text-color-dark-grey-light",children:["Processing Fee: ",r.txn_charge_display]})]}),r.saved_payment_methods.map((function(e){return(0,E.jsx)(tp,{card:e,methodType:r.type,payable:i,handlePaymentSelect:o,selectedPaymentMethodDetails:s},e)})),i?(0,E.jsx)(rp,{companyId:n,handleNewPaymentSelect:function(e,t){e?a({uuid:r.uuid,type:"".concat(r.type,"-new"),txn_charge_display:r.txn_charge_display,card:e,savePaymentMethod:t,startPayment:c}):a()},methodType:r.type,payable:i,selectedPaymentMethodDetails:s}):null,i||0!==r.saved_payment_methods.length?null:(0,E.jsx)("div",{className:"border-width-1 border-radius-6 border-color-grey p-20",children:(0,E.jsx)("div",{className:"text-color-dark-grey-light text-italics",children:"Only stored credit card details show up here. You can select Credit Card as an option when adding money to your wallet and save details securely for future payments"})})]})};ip.defaultProps={companyId:null};var ap=ip;function sp(){return sp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sp.apply(this,arguments)}function lp(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var op=r.createElement("title",null,"ACH"),cp=r.createElement("g",{id:"ACH",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Hire/Inactive/Bank_Details",transform:"translate(2.000000, 3.000000)",strokeWidth:2},r.createElement("line",{x1:10,y1:3,x2:10,y2:4,id:"Stroke-1",stroke:"#3A3E4C",fill:"#FFFFFF"}),r.createElement("line",{x1:3,y1:14,x2:3,y2:7,id:"Stroke-2",stroke:"#7C7F88"}),r.createElement("line",{x1:17,y1:14,x2:17,y2:7,id:"Stroke-3",stroke:"#7C7F88"}),r.createElement("line",{x1:10,y1:14,x2:10,y2:7,id:"Stroke-4",stroke:"#7C7F88"}),r.createElement("polygon",{id:"Stroke-5",stroke:"#3A3E4C",fill:"#FFFFFF",points:"1 15 19 15 19 18 1 18"}),r.createElement("polygon",{id:"Stroke-6",stroke:"#3A3E4C",fill:"#FFFFFF",points:"20 4 19.999 7 0 7 0 4 10 0"}),r.createElement("line",{x1:9,y1:4,x2:11,y2:4,id:"Stroke-4",stroke:"#7C7F88"}))),dp=function(e){var t=e.svgRef,n=e.title,i=lp(e,["svgRef","title"]);return r.createElement("svg",sp({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?op:n?r.createElement("title",null,n):null,cp)},up=r.forwardRef((function(e,t){return r.createElement(dp,sp({svgRef:t},e))})),mp=function(e){var t=e.account,n=e.methodType,i=e.payable,a=e.handlePaymentTypeSelect,s=e.selectedPaymentMethodDetails,l=(0,r.useState)(!1),o=l[0],c=l[1],u=function(){o?a():a(t)};(0,r.useEffect)((function(){s&&s.type&&s.type===n&&s.account&&s.account.id===t.id?c(!0):c(!1)}),[s]);return(0,E.jsxs)("div",{className:"dashboard-card p-20 mb-8 d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)("div",{className:"d-flex align-items-center justify-content-center border-radius-50 mr-16",style:{height:"48px",width:"48px",backgroundColor:"rgba(255,119,79,0.25)"},children:(0,E.jsx)(d.Z,{component:up,className:"icon-size-24"})}),(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"text-weight-500 text-size-18 mb-4",children:[t.bank_name," Ending in ",t.last4]}),(0,E.jsxs)("div",{className:"mb-4",children:["Routing Number: ",t.routing_number]})]})]}),i?(0,E.jsx)("div",{style:{height:"24px",width:"24px",minWidth:"24px"},className:Ba()("border-radius-50",{"background-light-blue":!o},{"background-blue":o},{"border-width-1":!o},{"border-color-grey":!o},"d-flex","align-items-center","justify-content-center","cursor-pointer"),onClick:u,children:o?(0,E.jsx)(d.Z,{className:"icon-size-16",component:Mt.r}):null}):null]})},pp=n(45982),xp=function(e){var t=e.token,n=e.companyId,i=e.handleSuccess,a=e.children,s=(0,r.useState)(!1),l=s[0],o=s[1],c=function(){var e=(0,tr.Z)(Qn().mark((function e(t,r){return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.prev=1,e.next=4,(0,V.F3)("payments/stripe/plaid/company/attach-bank-token",{public_token:t,account_id:r.account_id,clustering_company_id:n});case 4:e.sent&&i(),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0),g.Z.error("Something went wrong while processing transaction");case 12:return e.prev=12,o(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,8,12,15]])})));return function(t,n){return e.apply(this,arguments)}}(),u={token:t.link_token,onSuccess:c},m=(0,pp.usePlaidLink)(u),p=m.open,x=m.ready;return a?(0,E.jsx)("div",{className:"dashboard-card",onClick:function(){x&&n&&
1!l&&p()},children:a}):(0,E.jsxs)(j.Z,{block:!0,type:"primary",className:"btn-size-xl text-size-16 text-weight-500",disabled:!x||!n||l,onClick:function(){p()},children:[!x||l?(0,E.jsx)(d.Z,{type:"loading",className:"mr-8"}):null,!x||l?"Processing":"Connect a bank account"]})};xp.defaultProps={handleSuccess:function(){}};var hp=xp,fp=function(e){var t=e.token,n=e.companyId,r=e.handleSuccess;return t&&n?(0,E.jsx)(hp,{token:t,companyId:n,handleSuccess:r,children:(0,E.jsxs)("div",{className:"p-20 d-flex align-items-center",children:[(0,E.jsx)("div",{className:"background-light-blue-1 border-radius-50 d-flex justify-content-center align-items-center mr-16",style:{width:"48px",height:"48px"},children:(0,E.jsx)(d.Z,{component:ne.r,className:"icon-size-24 icon-blue"})}),(0,E.jsx)("div",{className:"text-size-18 text-weight-500 text-color-blue",children:"Link a New Bank"})]})}):null};fp.defaultProps={token:null};var gp=fp,yp=function(e){var t=e.title,n=e.companyId,i=e.paymentMethod,a=e.handleNewPaymentMethodItem,s=e.payable,l=e.handlePaymentMethodSelect,o=e.selectedPaymentMethodDetails,c=(0,r.useState)(!1),d=(c[0],c[1]),u=(0,r.useState)(null),m=u[0],p=u[1],x=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.prev=1,e.next=4,(0,V.XZ)("payments/stripe/plaid/company/create-link-token?clustering_company_id=".concat(n));case 4:t=e.sent,p(t),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0),g.Z.error("Something went wrong while connecting to plaid");case 12:return e.prev=12,d(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,8,12,15]])})));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){n&&x()}),[n]);var h=function(){var e=(0,tr.Z)(Qn().mark((function e(t){var r,i,a,s,l;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.paymentMethodDetails,i=t.amount,a=t.currency,s=t.onSuccess,e.next=3,(0,V.F3)("payments/kwwallet/company/add-money/start",{clustering_company_id:n,kw_payment_method_id:r.uuid,amount:i,currency:a,save_payment_method:!0,saved_pg_payment_method_id:r.account.id});case 3:l=e.sent,y.Z.info({title:"Payment Processed successfully",content:(0,E.jsx)("div",{children:l.display_message}),centered:!0,onOk:function(){s()}});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),f=function(e){e?l({type:i.type,uuid:i.uuid,txn_charge_display:i.txn_charge_display,account:e,startPayment:h}):l()};return(0,E.jsxs)("div",{className:"mb-40",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-end mb-8",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500",children:t}),(0,E.jsxs)("div",{className:"text-size-14 text-color-dark-grey-light",children:["Processing fee: ",i.txn_charge_display]})]}),i.saved_payment_methods.map((function(e){return(0,E.jsx)(mp,{account:e,methodType:i.type,methodId:i.uuid,companyId:n,payable:s,handlePaymentTypeSelect:f,selectedPaymentMethodDetails:o},e.id)})),(0,E.jsx)(gp,{token:m,companyId:n,handleSuccess:a})]})};function vp(){return vp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vp.apply(this,arguments)}function jp(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var bp=r.createElement("title",null,"Wire_Transfer"),wp=r.createElement("g",{id:"Wire_Transfer",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Hire/Inactive/Bank_Details",transform:"translate(3.000000, 3.000000)",strokeWidth:2},r.createElement("path",{d:"M18,7.5703 C18,6.7036 17.2964,6 16.4297,6 L13.5703,6 C12.7036,6 12,6.7036 12,7.5703 L12,18 L18,18 L18,7.5703 Z",id:"Stroke-2",stroke:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M12,2.2082 C12,0.9895 11.1205,0 10.0371,0 L1.9629,0 C0.8795,0 0,0.9895 0,2.2082 L0,18 L12,18 L12,2.2082 Z",id:"Fill-3",stroke:"#3A3E4C",fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:4,y1:4,x2:8,y2:4,id:"Stroke-7",stroke:"#3A3E4C",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:4,y1:8,x2:8,y2:8,id:"Stroke-8",stroke:"#3A3E4C",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M8,17 L8,13.5703 C8,12.7036 7.2964,12 6.4297,12 L5.5703,12 C4.7036,12 4,12.7036 4,13.5703 L4,17",id:"Stroke-4",stroke:"#7C7F88"}))),kp=function(e){var t=e.svgRef,n=e.title,i=jp(e,["svgRef","title"]);return r.createElement("svg",vp({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?bp:n?r.createElement("title",null,n):null,wp)},Np=r.forwardRef((function(e,t){return r.createElement(kp,vp({svgRef:t},e))})),_p=function(e){var t=(0,za.Z)("(max-width: 767px)"),n=e.creditAccount,i=(0,r.useState)(!1),a=i[0],s=i[1],l=n.ach_credit_transfer,o=function(e,t){navigator.clipboard.writeText(e).then((function(){g.Z.success("".concat(t," copied to clipboard!"))}))};return(0,E.jsxs)("div",{className:"border-width-1 border-radius-6 border-color-grey mb-8 p-20",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"mr-16 border-radius-50 align-items-center justify-content-center d-flex",style:{height:"48px",width:"48px",backgroundColor:"#FFDCEC"},children:(0,E.jsx)(d.Z,{component:Np,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:l.bank_name})]}),(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{ghost:!0,className:"btn-size-l border-radius-6 text-color-blue text-weight-500 border-color-grey",style:{padding:"0 20px"},onClick:function(){return s(!0)},children:"View"})})]}),(0,E.jsx)(y.Z,{visible:a,centered:!0,footer:null,closable:!1,width:580,className:"full-screen-mobile-modal",children:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark",children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-8",children:"Regular Wire Transfer"}),(0,E.jsx)("div",{className:"text-size-16 text-lineHeight mb-16",children:"Please use the below account details to make a wire transfer. Any amount credited to this account will be shown automatically in your wallet after deducting US$ 8 per transaction. This process could take upto 7 business days."}),(0,E.jsxs)("div",{className:"p-20 border-width-1 border-radius-6 border-color-grey mb-12",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center mb-20",children:[(0,E.jsx)("div",{className:"border-radius-50 d-flex justify-content-center align-items-center mr-12",style:{backgroundColor:"#FFDCEC",width:"48px",height:"48px"},children:(0,E.jsx)(d.Z,{component:Np,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:l.bank_name})]}),(0,E.jsx)("div",{className:"border-color-grey pt-12 pb-12",style:{borderTop:"1px solid"},children:(0,E.jsxs)(_.Z,{children:[(0,E.jsx)(Z.Z,{xs:10,children:(0,E.jsx)("div",{className:"text-size-16",children:"Account Number:"})}),(0,E.jsx)(Z.Z,{xs:8,children:(0,E.jsx)("div",{className:"text-size-16 text-weight-500",children:l.account_number})}),(0,E.jsx)(Z.Z,{xs:6,align:"right",children:(0,E.jsx)("div",{className:"text-right text-weight-500 text-color-blue text-size-16",onClick:function(){return o(l.account_number,"Account Number")},children:"Copy"})})]})}),(0,E.jsx)("div",{className:"border-color-grey pt-12 pb-12",style:{borderTop:"1px solid"},children:(0,E.jsxs)(_.Z,{children:[(0,E.jsx)(Z.Z,{xs:10,children:(0,E.jsx)("div",{className:"text-size-16",children:"Routing Number:"})}),(0,E.jsx)(Z.Z,{xs:8,children:(0,E.jsx)("div",{className:"text-size-16 text-weight-500",children:l.routing_number})}),(0,E.jsx)(Z.Z,{xs:6,align:"right",children:(0,E.jsx)("div",{className:"text-right text-weight-500 text-color-blue text-size-16",onClick:function(){return o(l.routing_number,"Routing Number")},children:"Copy"})})]})}),(0,E.jsx)("div",{className:"border-color-grey pt-12",style:{borderTop:"1px solid"},children:(0,E.jsxs)(_.Z,{children:[(0,E.jsx)(Z.Z,{xs:10,children:(0,E.jsx)("div",{className:"text-size-16",children:"Swift Code:"})}),(0,E.jsx)(Z.Z,{xs:8,children:(0,E.jsx)("div",{className:"text-size-16 text-weight-500",children:l.swift_code})}),(0,E.jsx)(Z.Z,{xs:6,align:"right",children:(0,E.jsx)("div",{className:"text-right text-weight-500 text-color-blue text-size-16",onClick:function(){return o(l.swift_code,"Swift Code")},children:"Copy"})})]})})]}),(0,E.jsx)(j.Z,{type:"primary",onClick:function(){return s(!1)},className:"btn-size-xl border-radius-6 text-weight-500 text-size-16",block:!t,style:{position:t?"absolute":"initial",bottom:t?"30px":"initial",left:t?"18px":"initial",right:t?"18px":"initial"},children:"Ok, Got it"})]})})]})},Zp=function(e){var t=e.title,n=e.paymentMethod;return(0,E.jsxs)("div",{className:"mb-40",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-end mb-8",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500",children:t}),(0,E.jsxs)("div",{className:"text-size-14 text-color-dark-grey-light",children:["Processing fee: ",n.txn_charge_display]})]}),n&&n.saved_payment_methods&&n.saved_payment_methods.length?(0,E.jsx)("div",{className:"mb-24",children:n.saved_payment_methods.map((function(e){return e.ach_credit_transfer?(0,E.jsx)(_p,{creditAccount:e},e.id):null}))}):(0,E.jsx)("div",{style:{backgroundColor:"rgba(255,209,131,0.4)"},className:"border-radius-6 mb-12 pt-12 pb-12 pl-20 pr-20",children:(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)(d.Z,{type:"warning",className:"mr-12"}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey",children:"This payment method is not available in the country where your company is registered. Please select another payment method."})]})})]})},Cp=function(e){var t=e.paymentMethod,n=(0,r.useState)(!1),i=n[0],a=n[1];return(0,E.jsxs)("div",{className:"mb-40",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-8",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500",children:t.display_name}),(0,E.jsxs)("div",{className:"text-size-14 text-color-dark-grey-light",children:["Processing fee: ",t.txn_charge_display]})]}),t.meta&&t.meta.length>0?(0,E.jsxs)("div",{className:"border-width-1 border-radius-6 border-color-grey mb-8 p-20",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"mr-16 border-radius-50 align-items-center justify-content-center d-flex",style:{height:"48px",width:"48px",backgroundColor:"#FFDCEC"},children:(0,E.jsx)(d.Z,{component:Np,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:"Wire Transfer"})]}),(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{ghost:!0,className:"btn-size-l border-radius-6 text-color-blue text-weight-500 border-color-grey",style:{padding:"0 20px"},onClick:function(){return a(!0)},children:"View"})})]}),(0,E.jsx)(y.Z,{visible:i,centered:!0,footer:null,closable:!1,width:580,className:"full-screen-mobile-modal",children:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark",children:[(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-8",children:"Regular Wire Transfer"}),(0,E.jsx)("div",{className:"text-size-16 text-lineHeight mb-16",children:"Please use the below account details to make a wire transfer. Any amount credited to this account will be shown automatically in your wallet after deducting any applicable fees. This process could take upto 2-3 business days."}),(0,E.jsxs)("div",{className:"p-20 border-width-1 border-radius-6 border-color-grey mb-12",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center mb-20",children:[(0,E.jsx)("div",{className:"border-radius-50 d-flex justify-content-center align-items-center mr-12",style:{backgroundColor:"#FFDCEC",width:"48px",height:"48px"},children:(0,E.jsx)(d.Z,{component:Np,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-size-18 text-weight-500",children:"Bank Transfer"})]}),t.meta.map((function(e){return(0,E.jsx)("div",{className:"border-color-grey pt-12 pb-12",style:{borderTop:"1px solid"},children:(0,E.jsxs)(_.Z,{children:[(0,E.jsx)(Z.Z,{xs:8,children:(0,E.jsxs)("div",{className:"text-size-16",children:[e.label,":"]}
1)}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)("div",{className:"text-size-16 text-weight-500",children:e.value})}),(0,E.jsx)(Z.Z,{xs:4,align:"right",children:(0,E.jsx)("div",{className:"text-right text-weight-500 text-color-blue text-size-16 cursor-pointer",onClick:function(){return t=e.value,n=e.label,void navigator.clipboard.writeText(t).then((function(){g.Z.success("".concat(n," copied to clipboard!"))}));var t,n},children:"Copy"})})]})})}))]}),(0,E.jsx)(j.Z,{type:"primary",onClick:function(){return a(!1)},className:"btn-size-xl border-radius-6 text-weight-500 text-size-16",block:!0,children:"Ok, Got it"})]})})]}):(0,E.jsx)("div",{style:{backgroundColor:"rgba(255,209,131,0.4)"},className:"border-radius-6 mb-12 pt-12 pb-12 pl-20 pr-20",children:(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)(d.Z,{type:"warning",className:"mr-12"}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey",children:"This payment method is not available in the country where your company is registered. Please select another payment method."})]})})]})},Op=function(e){var t=e.payable,n=e.paymentMethodsFetched,i=e.paymentMethodsLoading,a=e.paymentMethods,s=e.getPaymentMethods,l=e.loginMeta,o=e.handlePaymentMethodSelect,c=e.selectedPaymentMethodDetails,u=null;l&&l.company&&(u=l.company.company_id);var m=function(){s({company_id:u})};(0,r.useEffect)((function(){u&&m()}),[u]);var p=function(){m()};return!n||i?(0,E.jsxs)("div",{className:"w-100 text-center text-color-dark-grey-dark mt-24",children:[(0,E.jsx)(d.Z,{className:"icon-size-24 mr-8",type:"loading"})," Loading payment methods..."]}):a.length?a.map((function(e){switch(e.type){case"card":return(0,E.jsx)(Um,{children:(0,E.jsx)(ap,{title:e.display_name,companyId:u,paymentMethod:e,payable:t,handlePaymentMethodSelect:o,selectedPaymentMethodDetails:c},e.uuid)});case"ach_debit":return(0,E.jsx)(yp,{title:e.display_name,companyId:u,paymentMethod:e,handleNewPaymentMethodItem:p,payable:t,handlePaymentMethodSelect:o,selectedPaymentMethodDetails:c},e.uuid);case"ach_credit_transfer":return(0,E.jsx)(Zp,{title:e.display_name,paymentMethod:e},e.uuid);case"bank_transfer":return(0,E.jsx)(Cp,{paymentMethod:e},e.uuid);default:return null}})):(0,E.jsx)("div",{className:"mt-32 text-center",children:(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",children:[(0,E.jsx)("div",{children:"We do not support any payment methods in your country as of now."}),(0,E.jsx)("div",{children:"Please contact us."})]}),className:"mb-20"})})};Op.defaultProps={payable:!1,paymentMethods:null,handlePaymentMethodSelect:function(){},selectedPaymentMethodDetails:null};var Sp=(0,i.$j)((function(e){return{paymentMethodsFetched:e.employ.paymentMethodsFetched,paymentMethodsLoading:e.employ.paymentMethodsLoading,paymentMethods:e.employ.paymentMethods,loginMeta:e.auth.auth.login_meta}}),(function(e){return{getPaymentMethods:function(t,n){return e(w.Q8(t,n))}}}))(Op),zp=n(27338);function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ep(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dp=(0,i.$j)((function(e){return{paymentMethodsFetched:e.employ.paymentMethodsFetched,paymentMethodsLoading:e.employ.paymentMethodsLoading,paymentMethods:e.employ.paymentMethods,wallet:e.employ.wallet,loginMeta:e.auth.auth.login_meta}}),(function(e){return{getPaymentMethods:function(t,n){return e(w.Q8(t,n))},getWalletDetails:function(t,n){return e(w.P8b(t,n))}}}))((function(e){var t=e.loginMeta,n=e.wallet,i=e.addMoneyDetails,a=e.setAddMoneyDetails,s=e.setAddMoneyModalVisible,l=e.paymentMethods,o=e.paymentMethodsFetched,c=e.paymentMethodsLoading,u=e.getPaymentMethods,m=e.getWalletDetails,p=(0,za.Z)("(max-width: 767px)"),x=null;t&&t.company&&(x=t.company.company_id);var h=0,f="USD";n&&(h=n.regular_wallet.balance_info.balance,f=n.regular_wallet.balance_info.currency);var y=(0,r.useState)(null),v=y[0],b=y[1],w=(0,r.useState)(!1),k=w[0],N=w[1],_=(0,r.useState)({total_charge:0}),Z=_[0],C=_[1],O=(0,r.useState)(!1),S=O[0],z=O[1],P=function(){var e=(0,tr.Z)(Qn().mark((function e(){var t;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),e.prev=1,e.next=4,(0,V.XZ)("payments/payment-methods/processing-charge?kw_payment_method_id=".concat(v.uuid,"&amount=").concat(i.amount,"¤cy=").concat(i.currency));case 4:t=e.sent,C(t),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0),g.Z.error("Some error occurred while calculating extra charges");case 12:return e.prev=12,N(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,8,12,15]])})));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){v&&P()}),[v]);var D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;b(e)};(0,r.useEffect)((function(){x&&u({company_id:x})}),[x]);var F=function(){x&&(m({company_id:x}),a(null)),z(!1)},L=function(){var e=(0,tr.Z)(Qn().mark((function e(){return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){z(!0);try{v.startPayment(Pp(Pp({paymentMethodDetails:v},i),{},{onSuccess:F}))}catch(t){console.error(t),g.Z.error("Some error occurred while processing payment"),z(!1)}}else g.Z.warn("Select a Payment Method");case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,E.jsx)("div",{className:"container-960",style:{width:"600px",margin:"0"},children:(0,E.jsxs)("div",{className:"page-wrapper employee-allowance",style:{overflow:"visible"},children:[(0,E.jsx)(Fa.Z,{title:"Add Money",style:{padding:"0 ".concat(p?"18px":"1.25rem")}}),(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat(p?"18px":"1.25rem")},children:" Invoices"}),(0,E.jsxs)("div",{style:{padding:"0 ".concat(p?"18px":"1.25rem")},children:[(0,E.jsx)("div",{className:"text-weight-500 text-size-24 mb-24",children:"Continue with Payment"}),!o||c?(0,E.jsxs)("div",{className:"w-100 text-center text-color-dark-grey-dark mt-24",children:[(0,E.jsx)(d.Z,{className:"icon-size-24 mr-8",type:"loading"})," Loading payment methods..."]}):l.length?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Sp,{payable:!0,addMoneyDetails:i,handlePaymentMethodSelect:D,selectedPaymentMethodDetails:v}),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 mb-8",children:"Summary"}),(0,E.jsxs)("div",{className:"d-flex align-items-center border-width-1 border-radius-6 border-color-grey pt-12 pb-12 pl-24 pr-12 mb-8",children:[(0,E.jsx)(d.Z,{className:"icon-size-24 mr-20",component:zp.r}),(0,E.jsxs)("div",{className:"mr-16",children:["Current Wallet Balance: ",Y.fD[f]," ",Kl()(h).format("0,0.00")]})]}),(0,E.jsxs)("div",{className:"dashboard-card cursor-default p-10 mb-8",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between pt-16 pb-16 border-color-grey ml-10 mr-10",style:{borderBottom:"1px solid"},children:[(0,E.jsxs)("div",{className:"text-weight-500",children:[(0,E.jsx)("div",{className:"",children:"Amount to Add"}),s?(0,E.jsx)("div",{className:"text-color-blue cursor-pointer mt-4",onClick:function(){return s(!0)}
1,children:"Edit Amount"}):null]}),(0,E.jsx)("div",{className:"text-weight-500",children:Kl()(i.amount).format("0,0.00")})]}),(0,E.jsxs)("div",{className:"d-flex justify-content-between pt-16 pb-16 ml-10 mr-10",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{className:"text-weight-500 mb-4",children:"Processing Fee"}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light",children:v&&v.txn_charge_display?"+".concat(v.txn_charge_display):"Select a payment method"})]}),k?(0,E.jsx)(d.Z,{type:"loading"}):v?(0,E.jsx)("div",{className:"text-weight-500",children:Kl()(Z.total_charge).format("0,0.00")}):null]}),(0,E.jsxs)("div",{className:"background-light-blue border-radius-6 border-color-grey border-width-1 d-flex justify-content-between",style:{padding:"18px 20px"},children:[(0,E.jsx)("div",{className:"text-weight-500 text-size-18",children:"Total to Pay"}),(0,E.jsx)("div",{className:"text-weight-500 text-size-18",children:v?"".concat(Y.fD[i.currency]," ").concat(Kl()(i.amount+Z.total_charge).format("0,0.00")):null})]})]}),(0,E.jsxs)("div",{className:"pl-20 text-size-14 text-italics text-color-dark-grey-light mb-40",children:["All the currency is in ",i.currency,". To change, go to Settings and then Default Currency."]}),(0,E.jsx)(j.Z,{type:"primary",block:!0,className:"border-radius-6 btn-size-xl text-size-16 text-weight-500 mb-12",onClick:L,loading:S,children:"Make Payment"}),(0,E.jsx)(j.Z,{type:"link",className:"text-color-dark-grey-dark text-weight-500",onClick:function(){a(null)},block:!0,disabled:S,children:"Cancel Payment"})]})]}):(0,E.jsx)("div",{className:"mt-32 text-center",children:(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",children:"We do not support any payment methods in your country as of now. Please contact us."}),className:"mb-20"})})]})]})})})),Fp=ja.Z.TabPane,Lp=(0,i.$j)((function(e){return{loginMeta:e.auth.auth.login_meta,companyAccessRole:e.auth.companyAccessRole}}),(function(e){return{getInvoiceList:function(t,n){return e(w.wc(t,n))}}}))((function(e){var t=e.getInvoiceList,n=e.loginMeta,i=e.companyAccessRole,s=(0,za.Z)("(max-width: 767px)"),l=(0,a.useRouter)(),o=(0,r.useState)(null),c=o[0],d=o[1],u=(0,r.useState)("all"),m=u[0],p=u[1],x=(0,r.useState)(1),h=x[0],f=x[1],g=null;n&&n.company&&(g=n.company.company_id),(0,r.useEffect)((function(){"admin"!==i&&l.push({pathname:"/company-portal/dashboard"})}),[i]);var y=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i={clustering_company_id:e,page:r};if("upcoming"===n){var a=is()().format("YYYY-MM-DD"),s=is()().add(20,"years").format("YYYY-MM-DD");i.status=["unpaid","requested"],i.due_date={from:a,to:s}}else if("past-due"===n){var l=is()().subtract(20,"years").format("YYYY-MM-DD"),o=is()().format("YYYY-MM-DD");i.due_date={from:l,to:o},i.status=["unpaid","requested","edited"]}else"paid"===n?i.status=["paid"]:"void"===n&&(i.status=["void"]);t(i)};if((0,r.useEffect)((function(){g&&y(g,m,h)}),[g,m,h]),c)return(0,E.jsx)(Dp,{addMoneyDetails:c,setAddMoneyDetails:d});return(0,E.jsx)("div",{className:"pb-40 container-960",style:{margin:"0"},children:(0,E.jsxs)("div",{className:"page-wrapper employee-allowance",style:{overflow:"visible"},children:[(0,E.jsx)(Fa.Z,{title:"Invoices",style:{padding:"0 ".concat(s?"18px":"1.25rem")}}),(0,E.jsxs)("div",{className:"text-size-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat(s?"18px":"1.25rem")},children:[" ","Invoices"]}),(0,E.jsx)("div",{style:{padding:"0 ".concat(s?"18px":"1.25rem")},children:(0,E.jsxs)(ja.Z,{className:"tabs-blue custom-tabs-with-arrow",defaultActiveFirstOption:!0,animated:!1,activeKey:m,onChange:function(e){var t;t=e,f(1),p(t)},children:[(0,E.jsx)(Fp,{tab:"Upcoming",children:(0,E.jsx)(Ym,{fetchInvoiceList:y,setAddMoneyDetails:d,currentTab:m,currentPage:h,setCurrentPage:f})},"upcoming"),(0,E.jsx)(Fp,{tab:"All Invoices",children:(0,E.jsx)(Ym,{fetchInvoiceList:y,setAddMoneyDetails:d,currentTab:m,currentPage:h,setCurrentPage:f})},"all"),(0,E.jsx)(Fp,{tab:"Past Due",children:(0,E.jsx)(Ym,{fetchInvoiceList:y,setAddMoneyDetails:d,currentTab:m,currentPage:h,setCurrentPage:f})},"past-due"),(0,E.jsx)(Fp,{tab:"Paid",children:(0,E.jsx)(Ym,{fetchInvoiceList:y,setAddMoneyDetails:d,currentTab:m,currentPage:h,setCurrentPage:f})},"paid"),(0,E.jsx)(Fp,{tab:"Void",children:(0,E.jsx)(Ym,{fetchInvoiceList:y,setAddMoneyDetails:d,currentTab:m,currentPage:h,setCurrentPage:f})},"void")]})})]})})})),Ap=n(6305),Ip=function(e,t){var n="debit"===(null===t||void 0===t?void 0:t.type)||(null===t||void 0===t?void 0:t.amount)<0;if("date"===e)return(0,E.jsx)("div",{children:(0,Y.xz)(new Date(t.created_at))});if("description"===e)return(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"border-radius-50 d-flex align-items-center justify-content-center mr-16",style:{width:"48px",height:"48px",flexShrink:0,backgroundColor:n?"rgba(255,119,79,0.25)":"rgba(142,213,172,0.66)"},children:(0,E.jsx)(d.Z,{component:zp.r,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-weight-500",children:t.description})]});if("status"===e){var r=t.status;if(["success","settled"].indexOf(r)>-1)return(0,E.jsxs)("div",{className:"text-size-14 text-weight-500 d-flex align-items-center text-color-green",children:[(0,E.jsx)(d.Z,{className:"icon-size-18 mr-4",component:Pm.r}),(0,E.jsx)("span",{children:"Successful"})]});if("pending"===r)return(0,E.jsxs)("div",{className:"text-size-14 text-weight-500 d-flex align-items-center text-color-yellow-dark",children:[(0,E.jsx)(d.Z,{className:"icon-size-20 mr-4",component:Ap.r}),(0,E.jsx)("span",{children:"Pending"})]});if(["failed","cancelled"].indexOf(r)>-1)return(0,E.jsxs)("div",{className:"text-size-14 text-weight-500 d-flex align-items-center text-color-orange",children:[(0,E.jsx)(d.Z,{className:"icon-size-20 mr-4",component:Cm.r}),(0,E.jsx)("span",{children:"failed"===r?"Failed":"Cancelled"})]})}if("amount"===e){var i=Y.fD[t.currency],a=(0,Y.x6)(Math.abs(t.amount)),s=t.status;return(0,E.jsxs)("div",{className:Ba()("text-weight-500",{"text-color-orange":["failed","cancelled"].indexOf(s)>-1},"text-right"),children:[n?"-":"+"," ",i," ",Kl()(a).format("0,0.00")]})}return null},Mp=function(e){var t=e.transaction,n=e.columns;return(0,E.jsx)(_.Z,{type:"flex",gutter:[12,12],align:"middle",children:n.map((function(e){return(0,E.jsx)(Z.Z,{xs:e.space,children:Ip(e.key,t)},e.key)}))})}
1,Rp=[{name:"DESCRIPTION",key:"description",space:10},{name:"DATE",key:"date",space:6},{name:"STATUS",key:"status",space:4},{name:"AMOUNT",key:"amount",space:4}],Tp=function(e){var t=e.transactions,n=e.transactionPageCount,r=e.currentPage,i=e.setCurrentPage;return t.length?(0,E.jsxs)("div",{children:[t.map((function(e,n){return(0,E.jsx)("div",{className:"dashboard-card text-color-dark-grey-dark text-size-16 mb-8 pt-16 pb-16 pl-20 pr-20",style:{borderBottom:n<t.length-1?"1px solid #D5DAEC":"none"},children:(0,E.jsx)(Mp,{transaction:e,columns:Rp})})})),(0,E.jsx)(yd.Z,{total:20*n||1,defaultPageSize:20,current:r,onChange:function(e){return i(e)},hideOnSinglePage:!0})]}):(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",children:"No transactions found"}),className:"mb-20"})};Tp.defaultProps={transactions:[]};var qp=Tp,Bp=hs.Z.create({name:"AddMoneyModal"})((function(e){var t=e.visible,n=e.setVisible,i=e.currency,a=e.setAddMoneyDetails,s=e.form,l=s.getFieldDecorator,o=s.setFieldsValue,c=(s.validateFieldsAndScroll,s.resetFields,(0,r.useState)(null)),d=c[0],u=c[1],m=function(){u(null),n(!1)};return(0,E.jsx)(y.Z,{visible:t,footer:!1,centered:!0,closable:!1,destroyOnClose:!0,onCancel:m,bodyStyle:{padding:"30px",borderRadius:"8px",boxShadow:"0 4px 16px 0 #7C7F88"},width:480,className:"full-screen-mobile-modal",children:(0,E.jsxs)(hs.Z,{className:"text-size-16 text-color-dark-grey-dark",children:[(0,E.jsx)("div",{className:"text-size-28-24 text-weight-500 mb-8",children:"Add money to your wallet"}),(0,E.jsx)("div",{className:"text-color-dark-grey-light mb-40 text-size-14-16",children:"Please enter the amount you wish to add to your wallet"}),(0,E.jsx)(hs.Z.Item,{label:"Currency",className:"mb-12",children:l("currency",{rules:[{required:!0}],initialValue:i})((0,E.jsx)(ao.Z,{handleCurrencyChange:function(e){o({currency:e})},disabled:!0,className:"select-size-48 select-bg-grey-darker text-color-dark-grey-light"}))}),(0,E.jsx)("div",{className:"d-flex align-items-center",children:(0,E.jsx)(C.Z,{autoFocus:!0,className:"input-wrapper-bg-grey input-size-48 innet-shadow",placeholder:"Enter amount you wish to add to your wallet",value:d,onChange:function(e){u(parseInt(e.target.value)?parseInt(e.target.value):null)}})}),(0,E.jsx)("div",{className:"text-size-12-14 text-color-dark-grey-light text-italics12 mb-60 mt-8",children:"To change currency, go to Settings and then Default Currency"}),(0,E.jsxs)("div",{className:"d-flex flex-row-reverse align-items-center desktop",children:[(0,E.jsx)(j.Z,{disabled:null===d,type:"primary",className:"btn-size-xl text-size-16 text-weight-500",onClick:function(){n(!1),a({amount:d,currency:i})},children:"Continue"}),(0,E.jsx)("div",{className:"mr-24 text-color-dark-grey-light text-weight-500 cursor-pointer",onClick:m,children:"Cancel"})]}),(0,E.jsxs)("div",{className:"ml-18 mr-18 mobile",style:{position:"absolute",bottom:"30px",left:"0",right:"0"},children:[(0,E.jsx)(j.Z,{disabled:null===d,type:"primary",className:"btn-size-xl text-size-16 text-weight-500 mb-8 border-radius-8",block:!0,onClick:function(){n(!1),a({amount:d,currency:i})},children:"Continue"}),(0,E.jsx)(j.Z,{type:"default",className:"btn-size-xl text-size-16 text-weight-500 text-color-blue border border-color-grey border-radius-8",block:!0,onClick:m,children:"Cancel"})]})]})})})),Vp=n(19327),Yp=(n(53118),n(32770),function(){return(0,E.jsxs)("div",{className:"pb-40",style:{maxWidth:"680px"},children:[(0,E.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-24",children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark",children:"Payment Methods"})}),(0,E.jsx)(Sp,{})]})}),Hp=function(e){var t=e.currentView,n=e.setCurrentView;return"payment-methods"===t?(0,E.jsxs)("div",{children:[(0,E.jsx)(j.Z,{type:"primary",ghost:!0,className:"border-color-grey btn-size-l text-weight-500 text-size-16 text-color-dark-grey-dark mb-20",onClick:function(){return n("wallet")},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{className:"icon-size-20 mr-8",component:L.r,rotate:90}),(0,E.jsx)("span",{children:"Back to Wallet"})]})}),(0,E.jsx)(Yp,{})]}):null},Wp=function(e,t){var n="debit"===(null===t||void 0===t?void 0:t.type)||Number(String((null===t||void 0===t?void 0:t.amount)||"0"))<0;if("date"===e)return(0,E.jsx)("div",{children:(0,Y.xz)(new Date(t.created_at))});if("description"===e)return(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"border-radius-50 d-flex align-items-center justify-content-center mr-16",style:{width:"48px",height:"48px",backgroundColor:n?"rgba(255,119,79,0.25)":"rgba(142,213,172,0.66)"},children:(0,E.jsx)(d.Z,{component:zp.r,className:"icon-size-24"})}),(0,E.jsx)("div",{className:"text-weight-500",children:t.description})]});if("status"===e){var r=t.status;if(["success","settled"].indexOf(r)>-1)return(0,E.jsx)("div",{className:"",children:(0,E.jsx)("span",{children:"Successful"})});if("pending"===r)return(0,E.jsx)("div",{className:" ",children:(0,E.jsx)("span",{children:"Pending"})});if(["failed","cancelled"].indexOf(r)>-1)return(0,E.jsx)("div",{className:"",children:(0,E.jsx)("span",{children:"failed"===r?"Failed":"Cancelled"})})}if("amount"===e){var i=Y.fD[t.currency],a=(0,Y.x6)(Math.abs(t.amount)),s=t.status;return(0,E.jsxs)("div",{className:Ba()("",{"":["failed","cancelled"].indexOf(s)>-1},""),children:[n?"-":"+",i," ",Kl()(a).format("0,0.00")]})}return null},Jp=function(e){var t,n=e.transaction;e.columns;return(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"mb-20",children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light mb-4",children:"Description"}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark",children:null!==n&&void 0!==n&&n.company_invoice?null===n||void 0===n||null===(t=n.company_invoice)||void 0===t?void 0:t.name:null===n||void 0===n?void 0:n.description})]}),(0,E.jsxs)("div",{className:"mb-20",children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light mb-4",children:"Amount"}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark",children:Wp("amount",n)})]}),(0,E.jsxs)("div",{className:"mb-20",children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light mb-4",children:"Status"}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark",children:Wp("status",n)})]}),(0,E.jsxs)("div",{className:"mb-20",children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-light mb-4",children:"Date"}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark",children:Wp("date",n)})]})]})}
1,Up=[{name:"DESCRIPTION",key:"description",space:10},{name:"DATE",key:"date",space:6},{name:"STATUS",key:"status",space:4},{name:"AMOUNT",key:"amount",space:4}],$p=function(e,t){if("status"===e){var n=t.status;if(["success","settled"].indexOf(n)>-1)return Pm.r;if("pending"===n)return Ap.r;if(["failed","cancelled"].indexOf(n)>-1)return Cm.r}return null},Gp=function(e){var t=e.transactions,n=void 0===t?[]:t,r=e.activePanel,i=e.setActivePanel,a=function(){i(0)},s=null===n||void 0===n?void 0:n.map((function(e){return{panelHeader:null===e||void 0===e?void 0:e.description,panelSubHeader:"",customStatusIcon:$p("status",e),photo:null!==e&&void 0!==e&&e.source?$o.r:zp.r,photoType:"icon",incompleteSubheaderItalics:!1,component:(0,E.jsx)(Jp,{transaction:e,columns:Up,closeAll:a}),key:e.uuid}}));return(0,E.jsx)(b.Z,{heading:"",onChange:function(e){i(e||0)},activeKey:r,components:s,headerLabelStyle:{paddingRight:"5.4rem"}})},Kp=function(e){var t=e.transactions,n=e.transactionPageCount,i=e.currentPage,a=e.setCurrentPage,s=(0,r.useState)(0),l=s[0],o=s[1];return t.length?(0,E.jsxs)("div",{className:"mobile",children:[(0,E.jsx)(Gp,{transactions:t,activePanel:l,setActivePanel:o}),(0,E.jsx)(yd.Z,{total:20*n||1,defaultPageSize:20,current:i,onChange:function(e){return a(e)},hideOnSinglePage:!0})]}):(0,E.jsx)(Wa.Z,{image:Hl(),imageStyle:{width:"270px",height:"180px",margin:"auto",marginBottom:"1rem"},description:(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-weight-500 text-size-18",children:"No transactions found"}),className:"mb-20"})};Kp.defaultProps={transactions:[]};var Qp=Kp,Xp=function(e){var t=e.wallet,n=e.walletLoading,i=e.walletFetched,s=e.transactions,l=e.transactionPageCount,o=e.getWalletDetails,c=e.getAllTransactions,u=e.transactionsLoading,m=e.transactionsFetched,p=e.loginMeta,x=e.companyAccessRole,h=(0,za.Z)("(max-width: 767px)"),f=(0,a.useRouter)(),g=(0,r.useState)(!1),y=g[0],v=g[1],j=(0,r.useState)(!1),b=j[0],w=j[1],k=(0,r.useState)(1),N=k[0],_=k[1],Z=(0,r.useState)(""),C=(Z[0],Z[1],(0,r.useState)("wallet")),O=C[0],S=C[1],z=null;p&&p.company&&(z=p.company.company_id);var P=null,D=null;t&&(P=t.regular_wallet,D=t.safety_deposit_wallet),(0,r.useEffect)((function(){"admin"!==x&&f.push({pathname:"/company-portal/dashboard"})}),[x]),(0,r.useEffect)((function(){z&&o({company_id:z})}),[z]);var F=P?P.uuid:null;(0,r.useEffect)((function(){F&&!b&&function(){var e=arguments.length>1?arguments[1]:void 0,t={kw_wallet_id:F,page:arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,results_per_page:20};Array.isArray(e)&&e.length&&(t.type=e),c(t)}(N)}),[F,b,N]);return b?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Dp,{addMoneyDetails:b,setAddMoneyDetails:w,setAddMoneyModalVisible:v}),P?(0,E.jsx)(Bp,{visible:y,setVisible:v,setAddMoneyDetails:w,currency:P.balance_info.currency}):null]}):"wallet"===O?(0,E.jsx)("div",{className:"container-960",style:{margin:"0"},children:(0,E.jsxs)("div",{className:"page-wrapper company-wallet",style:{overflow:"visible"},children:[(0,E.jsx)(Fa.Z,{title:"Wallet",style:{padding:"0 ".concat(h?"18px":"1.25rem")}}),(0,E.jsx)("div",{className:"text-size-20-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat(h?"18px":"1.25rem")},children:" Wallet"}),(0,E.jsx)("div",{style:{padding:"0 ".concat(h?"0":"1.25rem")},children:(0,E.jsx)("div",{className:"d-flex flex-column",children:(0,E.jsx)("div",{className:"d-flex company-wallet__info--container ",children:(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-end mb-40 ",children:[(0,E.jsxs)("div",{className:"company-wallet__wallet-balance--card",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center mt-16 mb-20",children:[(0,E.jsx)(d.Z,{component:zp.r,className:"icon-size-24 mr-12"}),(0,E.jsx)("div",{className:"text-weight-500 text-size-14-16 text-color-dark-grey-dark",children:"Available Balance"})]}),(0,E.jsx)("div",{className:"text-weight-500 text-size-32-36 mb-16",children:n||!i?(0,E.jsx)(d.Z,{type:"loading"}):P?(0,E.jsxs)("span",{children:[Y.fD[P.balance_info.currency]," ",Kl()(P.balance_info.balance).format("0,0.00")]}):"--"})]}),(0,E.jsxs)("div",{className:"border-width-1 border-color-grey border-radius-6 pt-16 pl-20 pr-20 pb-24 company-wallet__wallet-balance--card",style:{backgroundColor:"#E9EFF7",maxWidth:"256px"},children:[(0,E.jsxs)("div",{className:"text-weight-500 mb-24 text-size-14-16 d-flex align-items-center",children:[(0,E.jsx)(d.Z,{component:Vp.r,className:"icon-size-24 mr-8 lock-icon"}),(0,E.jsx)("span",{children:"Safety Deposit"})]}),(0,E.jsx)("div",{className:"text-weight-500 text-size-16-18 mb-16",children:D?(0,E.jsxs)("span",{children:[Y.fD[D.balance_info.currency]," ",Kl()(D.balance_info.balance).format("0,0.00")]}):"--"}),(0,E.jsx)("div",{className:"text-size-12-14 text-color-dark-grey-light",children:"This is the total security deposit you have paid for the employees."})]})]})})})}),(0,E.jsx)("div",{style:{padding:"0 ".concat(h?"18px":"1.25rem")},children:u||!m?(0,E.jsxs)("div",{className:"w-100 text-center mt-16 ",children:[(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-24 mr-8"})," Loading transactions..."]}):(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"company-wallet__transaction-list desktop",children:[(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 mb-8",children:"Recent Transactions"}),(0,E.jsx)(qp,{transactions:s,transactionPageCount:l,currentPage:N,setCurrentPage:_})]}),(0,E.jsx)(Qp,{transactions:s,transactionPageCount:l,currentPage:N,setCurrentPage:_})]})})]})}):"payment-methods"===O?(0,E.jsx)(Hp,{currentView:O,setCurrentView:S}):null};Xp.defaultProps={wallet:null,loginMeta:null,transactions:[]};
1var ex=(0,i.$j)((function(e){return{wallet:e.employ.wallet,walletLoading:e.employ.walletLoading,walletFetched:e.employ.walletFetched,transactions:e.employ.transactions,transactionPageCount:e.employ.transactionPageCount,transactionsFetched:e.employ.transactionsFetched,transactionsLoading:e.employ.transactionsLoading,loginMeta:e.auth.auth.login_meta,companyAccessRole:e.auth.companyAccessRole}}),(function(e){return{getWalletDetails:function(t,n){return e(w.P8b(t,n))},getAllTransactions:function(t,n){return e(w._vf(t,n))}}}))(Xp);n(29247);var tx=n(28223),nx=n(44485),rx=n(90432),ix=["#FFDDA2","#FFDCEC","#E0D1FA","#FFDDD3","#B5E4C9"],ax=function(e){var t=(0,za.Z)("(max-width: 767px)"),n=e.firstName,i=e.lastName,a=e.leaveStetch,s=e.numberOfDays,l=e.status,o=e.leaveType,c=e.reason,d=e.openModal,u=e.leaveData,m=e.all,p=(0,r.useState)(""),x=p[0],h=p[1],f=(0,r.useState)(null),g=f[0],y=f[1];return(0,r.useEffect)((function(){switch(l){case"requested":h("Requested"),y(Om.r);break;case"approved":h((0,E.jsx)("span",{className:"text-color-green-dark",children:"Approved"})),y(ru.r);break;case"cancelled":h((0,E.jsx)("span",{className:"text-color-dark-grey-dark",children:"Cancelled"})),y(X.r);break;default:h((0,E.jsx)("span",{className:"text-color-orange",children:"Declined"})),y(rx.r)}}),[]),t?(0,E.jsx)(lx,{leaveType:o,AVATAR_BG:ix,firstName:n,lastName:i,reason:c,leaveStetch:a,numberOfDays:s,statuslabel:x,openModal:d,statusIcon:g,leaveData:u,all:m}):(0,E.jsx)(sx,{leaveType:o,AVATAR_BG:ix,firstName:n,lastName:i,reason:c,leaveStetch:a,numberOfDays:s,statuslabel:x,openModal:d,statusIcon:g,leaveData:u,all:m})},sx=function(e){var t=e.leaveType,n=e.AVATAR_BG,r=e.firstName,i=e.lastName,a=e.reason,s=e.leaveStetch,l=e.numberOfDays,o=e.statuslabel,c=e.openModal,u=e.statusIcon,m=e.leaveData,p=e.all;return(0,E.jsx)("div",{className:" dashboard-card align-items-center justify-content-between background-white pl-20 pr-20 pt-14 pb-14 round-8 border-1 border-color-grey mb-8",style:{boxShadow:"0 1px 2px 0 #D5DAEC"},children:(0,E.jsxs)(_.Z,{className:"d-flex align-items-center",align:"middle",justify:"space-between",children:[(0,E.jsx)(Z.Z,{xs:"sick"!==t||p?8:10,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(ys.Z,{size:48,style:{color:"#252939",backgroundColor:n[Math.floor(Math.random()*n.length)]},children:"".concat(r[0]).concat(i?i[0]:"")}),(0,E.jsxs)("div",{className:"ml-12",style:{width:"calc(100% - 60px"},children:[(0,E.jsx)("span",{className:" text-size-18 text-weight-500 line-height-24 text-color-dark-grey-dark",children:"".concat(r," ").concat(i)}),"paid"!==t&&(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-16 text-ellipsis-on-overflow ",style:{paddingRight:"8px"},children:a})]})]})}),(0,E.jsxs)(Z.Z,{xs:"sick"!==t||p?10:11,children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{className:"text-size-16 text-weight-500 line-height-20 text-color-dark-grey-dark",children:s}),(0,E.jsx)("span",{className:"text-size-16 text-weight-500 line-height-20 text-color-dark-grey-light ml-12",children:l})]}),(0,E.jsxs)("div",{className:"text-capital",style:{textTransform:"capitalize"},children:[t," Leave"]})]}),(0,E.jsx)(Z.Z,{xs:"sick"!==t||p?6:3,children:(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between ",children:["sick"!==t&&"floaters"!==t?(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsx)(d.Z,{component:u,className:"icon-size-24 mr-12 ".concat("declined"===status?"text-color-orange":"")}),(0,E.jsx)("span",{className:"text-size-14 text-weight-500 line-height-20 text-color-dark-grey",children:o})]}):(0,E.jsx)("span",{}),"floaters"===t&&(0,E.jsx)("span",{className:"text-size-12 line-height-14 text-weight-500 text-color-pink floater-pill",children:"Floater"}),"floaters"!==t&&(0,E.jsx)(j.Z,{className:"ml-12 text-color-blue btn-size-l pl-20 pr-20 text-weight-500 line-height-20 details-button",onClick:function(){c(m)},children:"Details"})]})})]})})},lx=function(e){var t=e.leaveType,n=e.AVATAR_BG,r=e.firstName,i=e.lastName,a=(e.reason,e.leaveStetch),s=(e.numberOfDays,e.statuslabel,e.openModal),l=e.statusIcon,o=e.leaveData;return(0,E.jsx)("div",{className:" dashboard-card align-items-center justify-content-between background-white pl-20 pr-20 pt-14 pb-14 round-8 border-1 border-color-grey mb-8",style:{boxShadow:"0 1px 2px 0 #D5DAEC"},children:(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(ys.Z,{size:48,style:{color:"#252939",backgroundColor:n[Math.floor(Math.random()*n.length)]},children:"".concat(r[0]).concat(i?i[0]:"")}),(0,E.jsxs)("div",{className:"ml-12",style:{width:"calc(100% - 60px"},children:[(0,E.jsx)("span",{className:" text-size-16 text-weight-500 line-height-24 text-color-dark-grey-dark",children:"".concat(r," ").concat(i)}),(0,E.jsx)("div",{className:"text-size-14 line-height-20 text-color-dark-grey-light",children:a})]})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between ",children:["paid"===t?(0,E.jsx)("div",{className:"d-flex align-items-center justify-content-between",children:(0,E.jsx)(d.Z,{component:l,className:"icon-size-24 mr-12 ".concat("declined"===status?"text-color-orange":"")})}):(0,E.jsx)("span",{}),"floaters"!==t&&(0,E.jsx)(j.Z,{className:"ml-12 text-color-dark-grey-dark btn-size-l pl-8 pr-8 text-weight-500 line-height-20 details-button",onClick:function(){s(o)},children:(0,E.jsx)(d.Z,{component:It.r,className:"icon-size-24"})})]})]})})},ox=function(e){var t=(0,i.v9)((function(e){return e.auth.auth.is_employee})),n=(0,E.jsxs)(c.Z,{className:"dashboard-card floater-action-dropdown",style:{padding:"16px 12px"},children:[(0,E.jsx)(c.Z.Item,{className:"",style:{padding:"10px"},children:(0,E.jsxs)("div",{className:"text-size-16 line-height-20 text-weight-500 text-color-green-dark d-flex align-items-center round-6",children:[(0,E.jsx)(d.Z,{component:ru.r,className:"icon-size-24 mr-12"}),(0,E.jsx)("span",{children:"I am taking this leave"})]})}),(0,E.jsx)(c.Z.Item,{className:"",style:{padding:"10px"},children:(0,E.jsxs)("div",{className:"text-size-16 line-height-20 text-weight-500 text-color-orange d-flex align-items-center round-6",children:[(0,E.jsx)(d.Z,{component:rx.r,className:"icon-size-24 mr-12"}),(0,E.jsx)("span",{children:"I am not taking this leave"})]})})]});return(0,E.jsx)("div",{className:"justify-content-between dashboard-card p-20 pt-16 pb-18 mb-8 align-items-center",children:(0,E.jsxs)(_.Z,{className:"d-flex align-items-center",children:[(0,E.jsx)(Z.Z,{xs:5,children:(0,E.jsxs)("div",{className:"d-flex flex-column",children:[(0,E.jsx)("div",{className:"text-size-18 line-height-24 text-weight-500 text-color-dark-grey-dark",children:e.date_humanized}),(0,E.jsx)("div",{className:"text-size-16 line-height-20 text-weight-500 text-color-dark-grey-light",children:e.day_humanized})]})}),(0,E.jsx)(Z.Z,{xs:7,children:(0,E.jsx)("div",{className:"text-size-16 line-height-20 text-color-dark-grey-dark",children:e.name})}),(0,E.jsx)(Z.Z,{xs:4,children:(0,E.jsxs)("span",{className:"text-size-16 line-height-20 text-color-dark-grey-dark d-flex align-items-center",children:[(0,E.jsx)("span",{className:"mr-8",children:e.symbol}),(0,E.jsx)("span",{children:e.country_label})]})}),(0,E.jsx)(Z.Z,{xs:3,children:e.is_floater&&(0,E.jsx)("span",{className:"text-size-12 line-height-14 text-weight-500 text-color-pink floater-pill",children:"Floater"})}),(0,E.jsx)(Z.Z,{xs:5,children:t&&(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsxs)("div",{className:"text-size-14 text-weight-500 text-color-dark-grey d-flex align-items-center ".concat(e.takingFloater?"text-color-green-dark":"text-color-orange"),children:[(0,E.jsx)(d.Z,{component:e.takingFloater?ru.r:rx.r,className:"text-size-24 mr-10"}),(0,E.jsx)("span",{children:e.takingFloater?"Taking it":"Not taking it"})]}),(0,E.jsx)("div",{className:"",children:(0,E.jsx)(de.Z,{overlay:n,placement:"bottomLeft",trigger:"click",children:(0,E.jsx)(j.Z,{className:"p-8 open-dropdown-btn",style:{height:"40px"},children:(0,E.jsx)(d.Z,{component:ho.r,className:"icon-size-24"})})})})]})})]})})};function cx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var dx=function(){return(0,E.jsx)("div",{className:"dashboard-card pl-20 pr-20 pt-16",children:(0,E.jsx)(su.Z,{active:!0,title:!1,paragraph:{rows:2}})})},ux=function(e){var t=(0,i.v9)((function(e){return e.employ.employeesPublicHolidays})),n=(0,i.v9)((function(e){return e.employ.employeesPublicHolidaysLoading}));return(0,E.jsxs)("div",{children:[t&&t.map((function(e){return(0,E.jsx)(ox,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?cx(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))})),n&&(0,E.jsx)(dx,{}),!n&&0===(null===t||void 0===t?void 0:t.length)||!t&&(0,E.jsx)(Wa.Z,{})]})},mx=n(1406),px=ja.Z.TabPane,xx=function(){return(0,E.jsx)("div",{className:"dashboard-card pl-20 pr-20 pt-16",children:(0,E.jsx)(su.Z,{active:!0,title:!1,paragraph:{rows:2}})})},hx=function(){var e,t,n,s,l,o,c,u,m=(0,za.Z)("(max-width: 767px)"),p=(0,i.v9)((function(e){return e.employ.employeesLeavesLog})),x=(0,i.v9)((function(e){return e.employ.employeesLeavesLogLoading})),h=((0,i.v9)((function(e){return e.employ.employeesLeavesLogError})),(0,i.v9)((function(e){return e.employ.employeesTotalLeaveAllowed}))),f=(0,i.v9)((function(e){return e.employ.employeesPublicHolidays})),v=((0,i.v9)((function(e){return e.employ.employeesPublicHolidaysLoading})),(0,i.v9)((function(e){return e.auth.companyAccessRole}))),j=(0,i.I0)(),b=(0,r.useState)(!1),k=b[0],N=b[1],_=(0,r.useState)(!1),Z=_[0],C=_[1],O=(0,r.useState)(!1),S=O[0],z=O[1],P=window.location.search.split("token=")[1],D=(0,a.useRouter)(),F=(0,r.useState)(1),L=F[0],A=F[1],I=(0,r.useState)("requested"),M=I[0],R=I[1],T=(0,r.useState)(0),q=T[0],B=T[1],V=(0,r.useState)(25),Y=V[0];V[1];(0,r.useEffect)((function(){if(H(),"public"!==M)return function(){j((0,tx.gr)({}))}}),[v,L,M]);var H=function(){"public"!==M&&j((0,w.TW7)({page:L,results_per_page:Y,leave_type:M},{onFail:function(e){g.Z.error(e)}}))};(0,r.useEffect)((function(){f||j((0,tx.E9)({onFail:function(e){g.Z.error(e)}}))}),[]),(0,r.useEffect)((function(){!x&&p&&"public"!==M&&B(null===p||void 0===p?void 0:p.total_leaves_allowed)}),[p,x]);var W=function(e){j((0,tx.wZ)(e)),N(!0)},J=function(){N(!1),P&&D.push({pathname:"/company-portal/hire/leaves"})};(0,r.useEffect)((function(){P&&null!==p&&void 0!==p&&p.logs&&j((0,tx.N6)(P,{onSuccess:function(e){var t=p.logs.filter((function(t){return t.uuid===e}));W(t[0]||{})}}))}),[P,p]);return(0,E.jsxs)("div",{className:"container-960 leaves ",style:{margin:0},children:[(0,E.jsx)("div",{className:"page-wrapper ",style:{overflow:"visible"},children:(0,E.jsx)(Fa.Z,{title:"Leaves",style:{padding:"0 ".concat(m?"0":"1.25rem")}})}),(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat(m?"0":"1.25rem")},children:"Leaves"}),(0,E.jsx)("div",{style:{padding:"0 ".concat(m?"18px":"1.25rem"),display:"".concat(-1==q||-1==h?"none":"initial")},children:(0,E.jsxs)("div",{className:"border border-width-1 border-color-grey border-radius-10 ",style:{padding:m?"12px 12px 20px 12px":"20px",maxWidth:"400px"},children:[(0,E.jsxs)("div",{className:"d-flex align-items-center mb-".concat(m?12:16),children:[(0,E.jsx)(d.Z,{component:rc,className:"text-size-24 mr-".concat(m?8:12)}),(0,E.jsx)("div",{className:"text-weight-500 text-size-16-18",children:"Total Leaves per Year"})]}),(0,E.jsxs)("div",{className:"text-size-32 text-weight-500 text-color-dark-grey-dark",children:[q||h," days"]})]})}),(0,E.jsx)(y.Z,{className:"full-screen-mobile-modal",visible:k,centered:!0,okType:"primary",destroyOnClose:!0,width:600,onCancel:J,cancelButtonProps:{className:"btn-size-xl cancel",style:{display:"none"}},okButtonProps:{className:"btn-size-xl ok",style:{display:"none"}},footer:null,closeIcon:void 0,children:(0,E.jsx)(nx.Z,{closeModal:J,setShowConfirmModal:C,setIsSuccessConfirmTypeApprove:z})}),(0,E.jsx)(mx.Z,{showConfirmModal:Z,isSuccessConfirmTypeApprove:S,handleSuccessModalCTAClicked:function(){C(!1),H()}}),(0,E.jsx)("div",{style:{padding:"0 ".concat(m?"18px":"1.25rem")},children:(0,E.jsxs)(ja.Z,{className:"tabs-blue custom-tabs-with-arrow",animated:!1,defaultActiveFirstOption:!0,onChange:function(e){R(e),A(1)},children:[(0,E.jsxs)(px,{tab:"Requests",children:[null===p||void 0===p||null===(e=p.logs)||void 0===e?void 0:e.map((function(e){return(0,E.jsx)(ax,{firstName:e.first_name,lastName:e.last_name,leaveStetch:e.duration_humanized,numberOfDays:fx(e),status:e.status,leaveType:e.type,openModal:W,leaveData:e},"".concat(e.uuid,"-").concat(e.status))})),x&&(0,E.jsx)(xx,{}),!x&&0===(null===p||void 0===p||null===(t=p.logs)||void 0===t?void 0:t.length)&&(0,E.jsx)(Wa.Z,{})]},"requested"),(0,E.jsxs)(px,{tab:"Sick Leaves",children:[null===p||void 0===p||null===(n=p.logs)||void 0===n?void 0:n.map((function(e){return(0,E.jsx)(ax,{firstName:e.first_name,lastName:e.last_name,leaveStetch:e.duration_humanized,numberOfDays:fx(e),status:e.status,leaveType:e.type,reason:e.description,openModal:W,leaveData:e},"".concat(e.uuid,"-").concat(e.status))})),x&&(0,E.jsx)(xx,{}),!x&&0===(null===p||void 0===p||null===(s=p.logs)||void 0===s?void 0:s.length)&&(0,E.jsx)(Wa.Z,{})]},"sick"),(0,E.jsxs)(px,{tab:"Floaters",children:[null===p||void 0===p||null===(l=p.logs)||void 0===l?void 0:l.map((function(e){return(0,E.jsx)(ax,{firstName:e.first_name,lastName:e.last_name,leaveStetch:e.duration_humanized,numberOfDays:fx(e),status:e.status,leaveType:e.type,openModal:W,leaveData:e},"".concat(e.uuid,"-").concat(e.status))})),x&&(0,E.jsx)(xx,{}),!x&&0===(null===p||void 0===p||null===(o=p.logs)||void 0===o?void 0:o.length)&&(0,E.jsx)(Wa.Z,{})]},"floater"),(0,E.jsx)(px,{tab:"Public Holidays",children:(0,E.jsx)(ux,{})},"public"),(0,E.jsxs)(px,{tab:"All",style:{float:"right"},children:[null===p||void 0===p||null===(c=p.logs)||void 0===c?void 0:c.map((function(e){return(0,E.jsx)(ax,{firstName:e.first_name,lastName:e.last_name,leaveStetch:e.duration_humanized,numberOfDays:fx(e),status:e.status,leaveType:e.type,openModal:W,leaveData:e,reason:e.description,all:!0},"".concat(e.uuid,"-").concat(e.status))})),x&&(0,E.jsx)(xx,{}),!x&&0===(null===p||void 0===p||null===(u=p.logs)||void 0===u?void 0:u.length)&&(0,E.jsx)(Wa.Z,{})]},"all")]})}),(0,E.jsx)(yd.Z,{current:L,total:null===p||void 0===p?void 0:p.total_log_count,onChange:function(e,t){A(e)},pageSize:Y,showTitle:!0,showTotal:function(e,t){return"".concat(t[0]," - ").concat(t[1]," of ").concat(e)},hideOnSinglePage:!0})]})};function fx(e){var t,n,r,i=null===e||void 0===e||null===(t=e.meta)||void 0===t?void 0:t.breakup,a=null===i||void 0===i?void 0:i.filter((function(e){return"weekday"===e.type})),s=a?a.length:0;return"floaters"===e.type?null!==e&&void 0!==e&&null!==(n=e.meta)&&void 0!==n&&n.floater?"".concat(e.meta.floater.public_holiday_name," (").concat(is()(e.start_date).format("ddd"),")"):"(".concat(e.description,")"):s>0?"".concat(s," day").concat(s>1?"s":""," (").concat(null===(r=a[0])||void 0===r?void 0:r.day.substring(0,3)).concat(s>1?"- ".concat(a[s-1].day.substring(0,3)):"",")"):"0 days"}var gx=n(71798),yx=function(e){var t=e.legalEntity,n=e.getLegalEntity,i=(0,r.useState)(!1),a=i[0],s=i[1],l=(0,r.useState)(""),o=l[0],c=l[1];(0,r.useEffect)((function(){n()}),[]),(0,r.useEffect)((function(){o&&window.open(o,"_blank")}),[o]);var d=function(){var e=(0,tr.Z)(Qn().mark((function e(){var n;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,V.XZ)("legal-entity/download-msa?legal_entity_id=".concat(t.uuid));case 3:(n=e.sent)&&c(n.doc_url),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),g.Z.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();return(0,E.jsxs)("div",{className:"custom-action-card",children:[t&&t.is_msa_signed?(0,E.jsx)(j.Z,{type:"secondary",className:"btn-size-l text-size-16 text-weight-500 text-color-blue border-radius-6 border-bg ",onClick:function(){o?window.open(o,"_blank"):t&&d()},children:"View"}):(0,E.jsx)(j.Z,{type:"secondary",className:"btn-size-l text-size-16 text-weight-500 text-color-blue border-radius-6 border-bg text-color-blue",onClick:function(){return s(!0)},children:"View"}),a?(0,E.jsx)(sd,{showMSAModal:a,setShowMSAModal:s}):null]})};yx.defaultProps={legalEntity:null};
1var vx=(0,i.$j)((function(e){return{legalEntity:e.auth.auth.legal_entity}}),(function(e){return{getLegalEntity:function(){return e(w.Vvp())}}}))(yx),jx=n(90956),bx=n(91466),wx={required:!0,message:"Required"},kx=function(e){var t,n=e.form,i=e.auth,a=e.photo,s=e.updateAccount,l=e.loading,o=e.photoUploading,c=e.uploadAuthPhoto,u=e.profile_uuid,m=e.loginMeta,p=e.updateLegalEntityloading,x=e.closeAll,h=n.getFieldDecorator,f=n.setFieldsValue,y=(n.getFieldValue,n.isFieldsTouched),v=(0,r.useState)(!1),b=v[0],w=v[1],k=(0,r.useState)(!1),N=k[0],O=k[1];m&&(t=m.company&&m.company.company_id);var S=function(){var e=(0,tr.Z)(Qn().mark((function e(n){var r,i,a;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.fileBlob,e.prev=1,O(!0),i="".concat(t,"/").concat(u,"/").concat(is()().unix(),"-photo.png"),e.next=6,fetch("".concat((0,V.dN)(),"/aws/s3/get-signed-url"),{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_url:i,content_type:"image/png"})}).then((function(e){return e.text()}));case 6:return a=e.sent,e.next=9,fetch(a,{method:"PUT",redirect:"follow",headers:{"Content-Type":"image/png"},body:r});case 9:e.sent.ok&&(O(!1),c({url:"".concat(to.ftpBaseUrl,"/").concat(i)},{onSuccess:function(){return g.Z.success("Your photo has been updated")},onFail:function(e){return g.Z.error(e)}})),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),O(!1),g.Z.error("Some error occured while uploading documents");case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(t){return e.apply(this,arguments)}}();return(0,E.jsx)("div",{children:(0,E.jsxs)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),n.validateFieldsAndScroll((function(e,t){if(!e){var n={first_name:t.first_name,last_name:t.last_name,email:t.email,job_title:t.job_title,job_department:t.job_department,country_code:t.country_code,phone_number:t.phone_number};s(n,{onSuccess:function(){g.Z.success("Personal details successfully updated."),x()},onFail:function(e){g.Z.error(e)}})}}))},children:[(0,E.jsx)("div",{className:"dashboard-card pt-8",children:(0,E.jsxs)(_.Z,{gutter:[20,0],children:[(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{label:"First Name",children:h("first_name",{initialValue:i&&i.first_name,rules:[wx]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{label:"Last Name",children:h("last_name",{initialValue:i&&i.last_name,rules:[wx]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Email",children:h("email",{initialValue:i&&i.email,rules:[wx]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6",disabled:!0}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsxs)("div",{children:[b?(0,E.jsx)(jx.Z,{visible:b,photo:a,afterUpload:S,onComplete:function(){return w(!1)}}):null,(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{className:"ant-btn btn-size-xl border-radius-6 border-color-grey text-size-16 text-weight-500 text-color-dark-grey-dark ant-btn-block",onClick:function(){return w(!0)},block:!0,children:(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-center text-align-center",children:[o||N?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-20 mr-8"}):(0,E.jsx)(d.Z,{component:_u.r,className:"icon-size-20 mr-8"}),(0,E.jsx)("span",{className:"text-weight-500",children:"Upload Profile Picture"})]})})})]})}),(0,E.jsxs)(Z.Z,{xs:24,className:"mt-20",children:[(0,E.jsx)(hs.Z.Item,{label:"Job Title",children:h("job_title",{initialValue:i&&i.job_title,rules:[wx]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))}),(0,E.jsx)("p",{className:"mb-0 text-size-14 text-italics line-height-16 text-color-dark-grey-light",children:"Your designation. Example: Hiring Manager or CEO"})]}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Department",children:h("job_department",{initialValue:i&&i.job_department,rules:[wx]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,E.jsxs)(Z.Z,{xs:24,className:"mt-20",children:[(0,E.jsx)("label",{className:"custom-form-label-required text-size-16 text-lineHeight text-weight-500 text-color-dark-grey-dark mb-4",children:"Phone"}),(0,E.jsxs)(_.Z,{gutter:12,children:[(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{children:h("country_code",{initialValue:i?i.country_code:null,rules:[wx]})((0,E.jsx)(bx.Z,{className:"select-size-48 select-bg-grey inner-shadow round-6",dropdownClassName:"select-bg-grey-dropdown",initialValue:i?i.country_code:null,handleChange:function(e){return f({country_code:e})},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r})}))})}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{children:h("phone_number",{initialValue:i&&i.phone_number,rules:[wx]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})})]})]})]})}),(0,E.jsx)(hs.Z.Item,{className:"mt-20",children:(0,E.jsx)(j.Z,{htmlType:"submit",className:"btn-size-xl border-radius-6 mb-8",type:"primary",block:!0,disabled:l||N||o||p||!y(),children:(0,E.jsx)("span",{className:"text-weight-500",children:"Save Changes"})})}),(0,E.jsx)(hs.Z.Item,{children:(0,E.jsx)(j.Z,{type:"secondary",htmlType:"button",className:"btn-size-xl cancel",block:!0,onClick:x,children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Cancel"})})})]})})};kx.defaultProps={loginMeta:null,legalEntity:null};var Nx=hs.Z.create({name:"ContactDetails"}
1)(kx),_x=(0,i.$j)((function(e){return{auth:e.auth.auth,photo:e.auth.auth.photo,loading:e.auth.loading,photoUploading:e.auth.photoUploading,profile_uuid:e.auth.auth.profile_uuid,loginMeta:e.auth.auth.login_meta,legalEntity:e.auth.auth.legal_entity,updateLegalEntityloading:e.auth.updateLegalEntityloading}}),(function(e){return{updateAccount:function(t,n){return e(w.sGo(t,n))},uploadAuthPhoto:function(t,n){return e(w.eD(t,n))},updateLegalEntity:function(t,n){return e(w.OY8(t,n))}}}))(Nx),Zx=function(e){var t=e.getFieldDecorator,n=e.fieldName,r=e.ccEmail,i=e.k,a=e.remove;return(0,E.jsxs)("div",{className:"position-relative mb-20",children:[(0,E.jsx)("div",{className:"position-absolute text-color-orange text-weight-500 text-size-16 cursor-pointer",style:{right:"0",zIndex:1},onClick:function(){return a(i)},children:"Remove"}),(0,E.jsx)(hs.Z.Item,{label:"CC Email",children:t("".concat(n),{initialValue:r,rules:[{required:!1}]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})]})},Cx=function(e){var t=e.initialCCEmails,n=e.getFieldDecorator,i=e.getFieldValue,a=e.setFieldsValue,s=e.fieldName,l=(0,r.useState)(0),o=l[0],c=l[1];(0,r.useEffect)((function(){t.length?c(t.length-1):c(0)}));var u=function(e){var t=i("".concat(s,"[keys]"));a((0,h.Z)({},"".concat(s,"[keys]"),t.filter((function(t){return t!==e}))))};(0,r.useEffect)((function(){if(o>=0&&o>=i("".concat(s,"[keys]")).length){var e=i("".concat(s,"[keys]")).concat(o);a((0,h.Z)({},"".concat(s,"[keys]"),e))}}),[o]),n("".concat(s,"[keys]"),{initialValue:Array.from(Array(t.length).keys())});var m=i("".concat(s,"[keys]")).map((function(e){return(0,E.jsx)(Zx,{k:e,getFieldDecorator:n,fieldName:"".concat(s,"[").concat(e,"]"),ccEmail:t.length>e?t[e]:"",remove:u},e)}));return(0,E.jsxs)(Z.Z,{xs:24,className:"mb-20",children:[m,(0,E.jsx)(j.Z,{type:"link",className:"text-weight-500 text-size-16 ",style:{padding:"0"},onClick:function(){c(o+1)},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{component:ne.r,className:"icon-size-16"}),(0,E.jsx)("span",{children:"Add CC Email"})]})})]})},Ox={required:!0,message:"Required"},Sx=function(e){var t=e.form,n=e.loading,i=e.photoUploading,a=e.loginMeta,s=e.legalEntity,l=e.updateLegalEntity,o=e.updateLegalEntityloading,c=e.closeAll,u=t.getFieldDecorator,m=t.
1setFieldsValue,p=t.getFieldValue,x=t.isFieldsTouched,h=(0,r.useState)(!1),f=h[0];h[1];a&&(a.company&&a.company.company_id);return(0,E.jsx)("div",{children:(0,E.jsxs)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),t.validateFieldsAndScroll((function(e,t){if(!e){var n={uuid:s.uuid,billing_contact_info:{name:t.billing_contact_name,email:t.billing_contact_email,country_code:t.billing_contact_country_code,phone_number:t.billing_contact_phone_number,meta:{cc:t.ccEmailAr.keys.map((function(e){return t.ccEmailAr[e]}))}}};l(n,{onSuccess:function(){g.Z.success("Billing Address successfully updated."),c&&c()},onFail:function(e){return g.Z.error(e)}})}}))},children:[s&&s.billing_contact?(0,E.jsx)(E.Fragment,{children:(0,E.jsx)("div",{className:"dashboard-card pt-8",children:(0,E.jsxs)(_.Z,{gutter:[20,0],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Name",children:u("billing_contact_name",{initialValue:s&&s.billing_contact?s.billing_contact.name:null,rules:[Ox]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20 mb-20",children:(0,E.jsx)(hs.Z.Item,{label:"Email",children:u("billing_contact_email",{initialValue:s&&s.billing_contact?s.billing_contact.email:null,rules:[Ox]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,E.jsx)(Cx,{initialCCEmails:s&&s.billing_contact&&s.billing_contact.meta&&s.billing_contact.meta.cc||[],getFieldDecorator:u,getFieldValue:p,setFieldsValue:m,fieldName:"ccEmailAr"}),(0,E.jsxs)(Z.Z,{xs:24,className:"",children:[(0,E.jsx)("label",{className:"custom-form-label-required text-size-16 text-lineHeight text-weight-500 text-color-dark-grey-dark mb-4",children:"Phone"}),(0,E.jsxs)(_.Z,{gutter:12,children:[(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{children:u("billing_contact_country_code",{initialValue:s&&s.billing_contact?s.billing_contact.country_code:null,rules:[Ox]})((0,E.jsx)(bx.Z,{className:"select-size-48 select-bg-grey inner-shadow round-6",dropdownClassName:"select-bg-grey-dropdown",initialValue:s&&s.billing_contact?s.billing_contact.country_code:null,handleChange:function(e){return m({billing_contact_country_code:e})},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r})}))})}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{children:u("billing_contact_phone_number",{initialValue:s&&s.billing_contact?s.billing_contact.phone_number:null,rules:[Ox]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})})]})]})]})})}):null,(0,E.jsx)(hs.Z.Item,{className:"mt-20",children:(0,E.jsxs)(j.Z,{htmlType:"submit",className:"btn-size-xl border-radius-6 mb-8",type:"primary",block:!0,disabled:n||f||i||o||!x(),children:[o&&(0,E.jsx)(d.Z,{type:"loading"}),(0,E.jsx)("span",{className:"text-weight-500",children:"Save Changes"})]})}),(0,E.jsx)(hs.Z.Item,{children:(0,E.jsx)(j.Z,{type:"secondary",htmlType:"button",className:"btn-size-xl cancel",block:!0,onClick:c,children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Cancel"})})})]})})};Sx.defaultProps={loginMeta:null,legalEntity:null};var zx=hs.Z.create({name:"BillingContactDetails"})(Sx),Ex=(0,i.$j)((function(e){return{loading:e.auth.loading,photoUploading:e.auth.photoUploading,loginMeta:e.auth.auth.login_meta,legalEntity:e.auth.auth.legal_entity,updateLegalEntityloading:e.auth.updateLegalEntityloading}}),(function(e){return{updateLegalEntity:function(t,n){return e(w.OY8(t,n))}}}))(zx),Px={required:!0,message:"Required"},Dx=N.Z.Option,Fx=[{title:"Product",icon:(0,E.jsx)(d.Z,{component:Ps.r})},{title:"Service",icon:(0,E.jsx)(d.Z,{component:Es.r})}],Lx=[{title:"Early",icon:(0,E.jsx)(d.Z,{component:vs.r})},{title:"Growth",icon:(0,E.jsx)(d.Z,{component:js.r})},{title:"Late",icon:(0,E.jsx)(d.Z,{component:bs.r})},{title:"IPO",icon:(0,E.jsx)(d.Z,{component:ws.r})},{title:"Fortune 1000",icon:(0,E.jsx)(d.Z,{component:ks.r})}],Ax=[{title:"1-10",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"11-50",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"51-200",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"201-500",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"501-1000",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"1001-5000",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"5001-10,000",icon:(0,E.jsx)(d.Z,{component:zs})},{title:"10,001+",icon:(0,E.jsx)(d.Z,{component:zs})}],Ix=function(e){var t,n=e.companyDetailsLoading,i=e.companyNode,a=e.editCompanyInfo,s=e.fetchCompanyByNodeId,l=e.form,o=e.loginMeta,c=e.onboarding,u=e.updateLegalEntityloading,m=e.closeAll,p=l.getFieldDecorator,x=(l.setFieldsValue,l.isFieldsTouched),h=(0,r.useState)(""),f=h[0],y=h[1],v=(0,r.useState)(!1),b=v[0],w=v[1],k=(0,r.useState)(!1),O
1=k[0],S=k[1];o&&(t=o.company&&o.company.company_id),(0,r.useEffect)((function(){i&&i.logo&&y(i.logo)}),[i]),(0,r.useEffect)((function(){o&&o.company&&o.company.company_id&&s({companyId:o.company.company_id})}),[o]);var z=Lx.map((function(e){return(0,E.jsx)(Dx,{children:(0,E.jsx)("div",{children:(0,E.jsx)("span",{children:e.title})})},e.title)})),P=Ax.map((function(e){return(0,E.jsx)(Dx,{children:(0,E.jsx)("div",{children:(0,E.jsx)("span",{children:e.title})})},e.title)})),D=function(){var e=(0,tr.Z)(Qn().mark((function e(n){var r,i,a;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.fileBlob,e.prev=1,S(!0),i="".concat(t,"/").concat(is()().unix(),"-logo.png"),e.next=6,fetch("".concat((0,V.dN)(),"/aws/s3/get-signed-url"),{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_url:i,content_type:"image/png"})}).then((function(e){return e.text()}));case 6:return a=e.sent,e.next=9,fetch(a,{method:"PUT",redirect:"follow",headers:{"Content-Type":"image/png"},body:r});case 9:e.sent.ok&&(S(!1),y("".concat(to.ftpBaseUrl,"/").concat(i))),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),S(!1),g.Z.error("Some error occured while uploading documents");case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(t){return e.apply(this,arguments)}}();return(0,E.jsx)("div",{children:(0,E.jsxs)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),l.validateFieldsAndScroll((function(e,n){if(f||g.Z.error("Please upload company logo"),!e&&f){var r={name:n.name,company_id:t,logo:f};n.headline&&(r.headline=n.headline),n.company_type&&(r.company_type=n.company_type),n.company_stage&&(r.company_stage=n.company_stage),n.company_size&&(r.company_size=n.company_size),a(r,{onSuccess:function(){c||(g.Z.success("Company Info successfully updated"),m())},onFail:function(e){return g.Z.error(e)}})}}))},children:[(0,E.jsx)("div",{className:"dashboard-card pt-8",children:(0,E.jsxs)(_.Z,{gutter:[20,0],children:[(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Company Display Name",children:p("name",{initialValue:i&&i.name,rules:[Px]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light text-italics",children:"Example: Kaamwork"})]}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsxs)("div",{className:"",children:[b?(0,E.jsx)(jx.Z,{visible:b,photo:f,afterUpload:D,onComplete:function(){return w(!1)}}):null,(0,E.jsx)("div",{children:(0,E.jsx)(j.Z,{className:"ant-btn btn-size-xl border-radius-6 border-color-grey text-size-16 text-weight-500 text-color-dark-grey-dark ant-btn-block",onClick:function(){return w(!0)},children:(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-center text-align-center",children:[O?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-20 mr-8"}):(0,E.jsx)(d.Z,{component:_u.r,className:"icon-size-20 mr-8"}),(0,E.jsx)("span",{className:"text-weight-500 custom-form-label-required",style:{margin:"0"},children:"Upload Company Logo"})]})})})]})}),(0,E.jsxs)(Z.Z,{xs:24,className:"mt-20",children:[(0,E.jsx)(hs.Z.Item,{label:"Headline",children:p("headline",{initialValue:i&&i.headline,rules:[]})((0,E.jsx)(C.Z.TextArea,{autoSize:{minRows:4,maxRows:6},className:"input-size-48 input-bg-grey inner-shadow round-6"}))}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light text-italics",children:"One-liner about your company"})]}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Company Type",children:p("company_type",{initialValue:i&&i.company_type,rules:[]})((0,E.jsx)(q.ZP.Group,{className:"custom-radio-group",children:Fx.map((function(e){return(0,E.jsx)(q.ZP,{value:e.title,children:e.title})}))}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Company Stage",children:p("company_stage",{initialValue:i&&i.company_stage,rules:[]})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey inner-shadow round-6",dropdownClassName:"select-bg-grey-dropdown",suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),getPopupContainer:function(e){return e.parentNode},children:z}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Company Size",children:p("company_
1size",{initialValue:i&&i.company_size,rules:[]})((0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey inner-shadow round-6",dropdownClassName:"select-bg-grey-dropdown",suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),getPopupContainer:function(e){return e.parentNode},children:P}))})})]})}),(0,E.jsxs)("div",{children:[(0,E.jsx)(hs.Z.Item,{className:"mt-20",children:(0,E.jsxs)(j.Z,{htmlType:"submit",className:"btn-size-xl mb-8 text-weight-500 border-radius-6",type:"primary",block:!0,disabled:u||n||!x(),children:[(u||n)&&(0,E.jsx)(d.Z,{type:"loading"}),c?"Save & Continue":"Save Changes"]})}),(0,E.jsx)(hs.Z.Item,{children:(0,E.jsx)(j.Z,{type:"secondary",htmlType:"button",className:"btn-size-xl cancel",block:!0,onClick:m,children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Cancel"})})})]})]})})};Ix.defaultProps={companyNode:null,legalEntity:null,loginMeta:null,onboarding:!1};var Mx=hs.Z.create({name:"CompanyDetails"})(Ix),Rx=(0,i.$j)((function(e){return{companyDetailsLoading:e.company.companyDetailsLoading,companyNode:e.landing.companyNode,legalEntity:e.auth.auth.legal_entity,loginMeta:e.auth.auth.login_meta,updateLegalEntityloading:e.auth.updateLegalEntityloading}}),(function(e){return{addLegalEntity:function(t,n){return e(w.OkZ(t,n))},editCompanyInfo:function(t,n){return e(w.yLU(t,n))},fetchCompanyByNodeId:function(t){return e(w.fqn(t))},updateLegalEntity:function(t,n){return e(w.OY8(t,n))}}}))(Mx),Tx=n(64455);function qx(){return qx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qx.apply(this,arguments)}function Bx(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Vx=r.createElement("title",null,"Password"),Yx=r.createElement("g",{id:"Password",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Hire/Inactive/Bank_Details",transform:"translate(6.000000, 3.000000)",strokeWidth:2},r.createElement("path",{d:"M12,2.2082 C12,0.9895 11.1205,0 10.0371,0 L1.9629,0 C0.8795,0 0,0.9895 0,2.2082 L0,18 L12,18 L12,2.2082 Z",id:"Fill-1",stroke:"#3A3E4C",fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M8,17 L8,13.5703 C8,12.7036 7.2964,12 6.4297,12 L5.5703,12 C4.7036,12 4,12.7036 4,13.5703 L4,17",id:"Stroke-4",stroke:"#7C7F88"}),r.createElement("line",{x1:4,y1:4,x2:8,y2:4,id:"Stroke-5",stroke:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:4,y1:8,x2:8,y2:8,id:"Stroke-6",stroke:"#7C7F88",strokeLinecap:"round",strokeLinejoin:"round"}))),Hx=function(e){var t=e.svgRef,n=e.title,i=Bx(e,["svgRef","title"]);return r.createElement("svg",qx({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Vx:n?r.createElement("title",null,n):null,Yx)},Wx=r.forwardRef((function(e,t){return r.createElement(Hx,qx({svgRef:t},e))}));function Jx(){return Jx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jx.apply(this,arguments)}function Ux(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var $x=r.createElement("title",null,"Password"),Gx=r.createElement("g",{id:"Password",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Hire/Inactive/Bank_Details",transform:"translate(3.000000, 2.000000)",strokeWidth:2},r.createElement("line",{x1:1,y1:20,x2:9,y2:20,id:"Stroke-1",stroke:"#7C7F88"}),r.createElement("line",{x1:10,y1:10,x2:18,y2:18,id:"Stroke-4",stroke:"#3A3E4C"}),r.createElement("polygon",{id:"Stroke-3",stroke:"#7C7F88",fill:"#FFFFFF",points:"7.5 12.5 12.5 7.5 9.5 4.5 4.5 9.5"}),r.createElement("polygon",{id:"Stroke-5",stroke:"#3A3E4C",fill:"#FFFFFF",points:"8 3 14 9 17 6 11 0"}),r.createElement("polygon",{id:"Stroke-6",stroke:"#3A3E4C",fill:"#FFFFFF",points:"9 14 3 8 0 11 6 17"}))),Kx=function(e){var t=e.svgRef,n=e.title,i=Ux(e,["svgRef","title"]);return r.createElement("svg",Jx({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?$x:n?r.createElement("title",null,n):null,Gx)},Qx=r.forwardRef((function(e,t){return r.createElement(Kx,Jx({svgRef:t},e))}));function Xx(){return Xx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xx.apply(this,arguments)}function eh(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var th=r.createElement("title",null,"Password"),nh=r.createElement("g",{id:"Password",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Employ/Inactive/Registered_Address",transform:"translate(5.000000, 3.000000)",strokeWidth:2},r.createElement("path",{d:"M0,7 C0,11.4153 4.6667,18 7,18 C9.3333,18 14,11.4153 14,7 C14,2.5847 10.8634,0 7,0 C3.1366,0 0,2.5847 0,7 Z",id:"Fill-1",stroke:"#3A3E4C",fill:"#FFFFFF"}),r.createElement("path",{d:"M5,7 C5,8.1038 5.8962,9 7,9 C8.1038,9 9,8.1038 9,7 C9,5.8962 8.1038,5 7,5 C5.8962,5 5,5.8962 5,7 Z",id:"Fill-3",stroke:"#7C7F88"}))),rh=function(e){var t=e.svgRef,n=e.title,i=eh(e,["svgRef","title"]);return r.createElement("svg",Xx({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?th:n?r.createElement("title",null,n):null,nh)},ih=r.forwardRef((function(e,t){return r.createElement(rh,Xx({svgRef:t},e))}));function ah(){return ah=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ah.apply(this,arguments)}function sh(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var lh=r.createElement("title",null,"Password"),oh=r.createElement("g",{id:"Password",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Hire/Inactive/Passport",transform:"translate(3.000000, 3.000000)",strokeWidth:2},r.createElement("path",{d:"M14,2 C14,0.8962 14.8962,0 16,0 C17.1038,0 18,0.8962 18,2 L18,4 L14,4",id:"Stroke-6",stroke:"#3A3E4C",fill:"#7C7F88"}),r.createElement("path",{d:"M16,0 L2.8244,0 C1.2656,0 0,1.2656 0,2.8244 L0,15.1756 C0,16.7344 1.2656,18 2.8244,18 L11.1756,18 C12.7344,18 14,16.7344 14,15.1756 L14,0",id:"Stroke-10",stroke:"#3A3E4C",fill:"#FFFFFF"}),r.createElement("g",{id:"Group",transform:"translate(4.000000, 4.000000)",stroke:"#7C7F88"},r.createElement("path",{d:"M1.5,5 C0.6721,5 0,4.3279 0,3.5 C0,2.6721 0.6721,2 1.5,2",id:"Stroke-1"}),r.createElement("path",{d:"M4.5,5 C5.3279,5 6,5.6721 6,6.5 C6,7.3279 5.3279,8 4.5,8",id:"Stroke-2"}),r.createElement("line",{x1:1.5,y1:2,x2:6,y2:2,id:"Stroke-3"}),r.createElement("line",{x1:3,y1:0,x2:3,y2:1,id:"Stroke-4"}),r.createElement("line",{x1:3,y1:9,x2:3,y2:10,id:"Stroke-5"}),r.createElement("line",{x1:1.5,y1:5,x2:4.5,y2:5,id:"Stroke-6"}),r.createElement("line",{x1:0,y1:8,x2:4.5,y2:8,id:"Stroke-7"})))),ch=function(e){var t=e.svgRef,n=e.title,i=sh(e,["svgRef","title"]);return r.createElement("svg",ah({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?lh:n?r.createElement("title",null,n):null,oh)},dh=r.forwardRef((function(e,t){return r.createElement(ch,ah({svgRef:t},e))})),uh=n(13951);function mh(){return mh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mh.apply(this,arguments)}function ph(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var xh=r.createElement("title",null,"Password"),hh=r.createElement("g",{id:"Password",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Hire/Inactive/Passport",transform:"translate(4.000000, 3.000000)",strokeWidth:2},r.createElement("path",{d:"M16,3.2 C16,1.4339 14.5661,0 12.8,0 L3.2,0 C1.4339,0 0,1.4339 0,3.2 L0,14.8 C0,16.5661 1.4339,18 3.2,18 L12.8,18 C14.5661,18 16,16.5661 16,14.8 L16,3.2 Z",id:"Stroke-1",stroke:"#3A3E4C",fill:"#FFFFFF"}),r.createElement("line",{x1:4,y1:9,x2:12,y2:9,id:"Stroke-2",stroke:"#7C7F88"}),r.createElement("line",{x1:4,y1:5,x2:12,y2:5,id:"Stroke-3",stroke:"#7C7F88"}),r.createElement("line",{x1:4,y1:13,x2:12,y2:13,id:"Stroke-4",stroke:"#7C7F88"}))),fh=function(e){var t=e.svgRef,n=e.title,i=ph(e,["svgRef","title"]);return r.createElement("svg",mh({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?xh:n?r.createElement("title",null,n):null,hh)},gh=r.forwardRef((function(e,t){return r.createElement(fh,mh({svgRef:t},e))})),yh={password:{key:"password",title:"Password",label:"Password",icon:{component:Tx.r,size:"24px",backgroundColor:"rgba(142, 213, 172, 0.6)",border:"none"},hasNumber:!0},companyInfo:{key:"companyInfo",title:"Company Info",label:"Company Info",icon:{component:Wx,size:"24px",backgroundColor:"#FFDCEC",border:"none"},hasNumber:!0},legalEntity:{key:"legalEntity",title:"Legal Entity",label:"Legal Entity",icon:{component:Qx,size:"24px",backgroundColor:"rgba(255, 119, 79, 0.25)",border:"none"},hasNumber:!0},address:{key:"address",title:"Registered Addres",label:"Registered Address",icon:{component:ih,size:"24px",backgroundColor:"rgb(255, 209, 131, 0.75)",border:"none"},hasNumber:!0},billingContact:{key:"billingContact",title:"Billing Contact",label:"Billing Contact",icon:{component:dh,size:"24px",backgroundColor:"#DCE2F9",border:"none"},hasNumber:!0},defaultCurrency:{key:"defaultCurrency",title:"Default Currency",label:"Default Currency",icon:{component:uh.r,size:"24px",backgroundColor:"#8ED5AC",border:"none"},hasNumber:!0},msa:{key:"msa",title:"Master Service Agreement",label:"Master Service Agreement",icon:{component:gh,size:"24px",backgroundColor:"#E0D1FA",border:"none"},hasNumber:!0}},vh=[{label:"ABC (Anguilla Business Company)",value:"anguilla_business_company",type:"entity",countries:["AI"],prefix:"an"},{label:"Auto_entrepreneur/Micro_entrepreneur avec TVA",value:"auto_entrepreneur_micro_entrepreneur_avec_tva",type:"individual",countries:["FR"],prefix:"an"},{label:"Auto_entrepreneur/Micro_entrepreneur sans TVA",value:"auto_entrepreneur_auto_entreprise_micro_entrepreneur",type:"individual",countries:["FR"],prefix:"an"},{label:"B Corporation",value:"b_corporation",type:"entity",countries:["US"],prefix:"a"},{label:"Branch of a Foreign Company",value:"branch_of_a_foreign_company",type:"entity",prefix:"a"},{label:"Branch of a Foreign Entity",value:"branch_of_a_foreign_entity",type:"entity",countries:["AL"],prefix:"a"},{label:"Branch of a Foreign Entity in Argentina",value:"branch_of_a_foreign_entity_in_Argentina",type:"entity",countries:["AR"],prefix:"a"},{label:"C Corporation",value:"c_corporation",type:"entity",countries:["US"],prefix:"a"},{label:"CV",value:"cv",type:"entity",countries:["ID"],prefix:"a"},{label:"Commercial Association (\xfchistu)",value:"commercial_association_uhistu",type:"entity",countries:["EE"],prefix:"a"},{label:"Company",value:"company",type:"entity",countries:["RU"],prefix:"a"},{label:"Company (Ecuadorian)",value:"ecuadorian_company",type:"entity",countries:["EC"],prefix:"a"},{label:"Company Limited by Guarantee",value:"company_limited_by_guarantee",type:"entity",prefix:"a"},{label:"Incorporation",value:"incorporation",type:"entity",prefix:"an"},{label:"Company Limited by Shares (SA)",value:"company_limited_by_shares",type:"entity",countries:["GR"],prefix:"a"},{label:"Company not Controlled",value:"company_not_controlled",type:"entity",countries:["EC"],prefix:"a"},{label:"Company with Limited Liability",value:"company_with_limited_liability",type:"entity",countries:["GR"],prefix:"a"},{label:"Company with Additional Liability",value:"company_with_additional_liability",type:"entity",countries:["BY"],prefix:"a"},{label:"Corporation",value:"corporation",type:"entity",countries:["PH"],prefix:"a"},{label:"Dependent Autonomous Worker",value:"dependent_autonomous_worker",type:"individual",countries:["ES"],prefix:"a"},{label:"EIRL (Limited liability Sole Trader)",value:"limited_liability_sole_trader",type:"entity",countries:["CL"],prefix:"a",disabledShareholders:!0},{label:"Empres\xe1rio Individual EI",value:"individual_entrepreneur_br",type:"entity",countries:["BR"]},{label:"Empresa Individual de Responsabilidade Limitada (EIRELI)",value:"empresa_individual_de_responsabilidade_limitada",type:"entity",countries:["BR"]},{label:"Enterprise",value:"enterprise",type:"entity",countries:["CM"],prefix:"an"},{label:"Entreprise Individuelle (EI)",value:"ei",type:"entity",countries:["FR"],prefix:"an"},{label:"Entreprise Unipersonnelle \xe0 Responsabilit\xe9 Limit\xe9e (EURL)",value:"eurl",type:"entity",countries:["FR"],prefix:"an"},{label:"Foreign Business",value:"foreign_business",type:"entity",countries:["TH"],prefix:"a"},{label:"Foundation",value:"foundation",type:"entity",countries:["ID"],prefix:"a"},{label:"GbR (\u201cGesellschaft buergerlichen Rechts\u201d)",value:"gbr",type:"entity",countries:["DE"],prefix:"a"},{label:"General Partnership",value:"general_partnership",type:"entity",prefix:"a"},{label:"General Partnership (T\xdc)",value:"general_partnership_tu",type:"entity",countries:["EE"],prefix:"a"},{label:"Gesellschaft mit beschr\xe4nkter Haftung (GmbH)",value:"GmbH",type:"entity",countries:["DE"],prefix:"a"},{label:"Handicraft/Craftsmen Obrt",value:"handicraft_craftsmen_obrt",type:"individual",countries:["HR"],prefix:"an"},{label:"Holding Company",value:"holding_company",type:"entity",countries:["SA"],prefix:"an"},{label:"IBC (International Business Company)",value:"international_business_company",type:"entity",countries:["AI"],prefix:"an"},{label:"Inc",value:"inc",type:"entity",countries:["HR"],prefix:"an"},{label:"Individual",value:"individual",type:"individual",prefix:"an"},{label:"Individual Establishments (EST)",value:"individual_establishments",type:"entity",countries:["SA"],prefix:"an"},{label:"General Entity",value:"general_entity",type:"entity",countries:["KZ"],prefix:"a"},{label:"Individual Entrepreneur",value:"individual_entrepreneur",type:"individual",countries:["RU","KZ","UA","BY","RO"],prefix:"an"}
1,{label:"Jednoosobowa dzia\u0142alno\u015b\u0107 gospodarcza",value:"Jednoosobowa_d_gospodarcza",type:"entity",countries:["PL"],prefix:"a"},{label:"Joint Stock Companies",value:"joint_stock_companies",type:"entity",prefix:"a"},{label:"Joint Stock Company",value:"joint_stock_company",type:"entity",countries:["SA"],prefix:"a"},{label:"Joint Stock Company (sp\xf3\u0142ka akcyjna / S.A.)",value:"joint_stock_company_s_a",type:"entity",countries:["PL"],prefix:"a"},{label:"Limited Liability Company (\u201cPT\u201d)",value:"limited_liability_company_pt",type:"entity",countries:["ID"],prefix:"a"},{label:"Limited by Shares",value:"limited_by_shares",type:"entity",countries:["JM"],prefix:"a"},{label:"Limited Company (LTD)",value:"ltd",type:"entity",countries:["BD","GB"],prefix:"an"},{label:"Limited Joint Stock Partnership (sp\xf3\u0142ka komandytowo_akcyjna / S.K.A.)",value:"limited_joint_stock_partnership",type:"entity",countries:["PL"],prefix:"a"},{label:'Limited Liability Company ("Limitada")',value:"limited_liability_company_limitada",type:"entity",countries:["BR"],prefix:"a"},{label:"Limited Liability Company (LLC)",value:"llc",type:"entity",prefix:"an"},{label:"Limited Liability Company (sp\xf3\u0142ka z ograniczon\u0105 odpowiedzialno\u015bci\u0105 / sp. z o.o.)",value:"limited_liability_company_sp_zoo",type:"entity",countries:["PL"],prefix:"a"},{label:"Limited Liability Partnership",value:"limited_liability_partnership",type:"entity",prefix:"a"},{label:"Limited Partnership",value:"limited_partnership",type:"entity",prefix:"a"},{label:"Limited Partnership (U\xdc)",value:"limited_partnership_uu",type:"entity",countries:["EE"],prefix:"a"},{label:"Limited Partnership (sp\xf3\u0142ka komandytowa / sp.k.)",value:"limited_partnership_sp_k",type:"entity",countries:["PL"],prefix:"a"},{label:"MEI (Individual Micro_Entrepreneur Company)",value:"individual_micro_entrepreneur_company",type:"entity",countries:["BR"],prefix:"an"},{label:"Natural person not conducting business activity",value:"natural_person_not_conducting_business_activity",type:"individual",countries:["PL"],prefix:"a"},{label:"Non Profit Corporation",value:"non_profit_corporation",type:"entity",prefix:"a"},{label:"One Person Company",value:"one_person_company",type:"entity",countries:["SA"],prefix:"an"},{label:"Partnership",value:"partnership",type:"entity",countries:["BD","ZA"],prefix:"a"},{label:"Partnership",value:"partnership",type:"entity",countries:["PH"],prefix:"a"},{label:"Partnerships",value:"partnerships",type:"entity",countries:["TH"],prefix:"a"},{label:"Persoana Fizica Autorizata",value:"persoana_fizica_autorizata",type:"individual",countries:["FR"],prefix:"a"},{label:"Personal Liability Company",value:"personal_liability_company",type:"entity",countries:["ZA"],prefix:"a"},{label:"Private Entrepreneur (PE)",value:"private_entrepreneur_PE",type:"entity",countries:["RU","UA"],prefix:"a"},{label:"Private Company",value:"private_company",type:"entity",countries:["GR","ZA"],prefix:"a"},{label:"Private Company Limited by Shares",value:"private_company_limited_by_shares",type:"entity",prefix:"a"},{label:"Private Liability Company",value:"private_liability_company",type:"entity",prefix:"a"},{label:"Private Limited Company",value:"private_limited_company",type:"entity",countries:["TH","GB"],prefix:"a"},{label:"Private Limited Company (O\xdc)",value:"private_limited_company",type:"entity",countries:["EE"],prefix:"a"},{label:"Private Limited Liability Companies (LTD)",value:"private_limited_liability_companies",type:"entity",countries:["CM"],prefix:"a"},{label:"Professional Partnership (sp\xf3\u0142ka partnerska / sp.p.)",value:"professional_partnership",type:"entity",countries:["PL"],prefix:"a"},{label:"Proprietary Company (Pty Ltd)",value:"private_limited_company_ou",type:"entity",countries:["ZA"],prefix:"a"},{label:"Public Limited Company",value:"public_limited_company",type:"entity",countries:["TH"],prefix:"a"},{label:"Public Company",value:"public_company",type:"entity",countries:["ZA"],prefix:"a"},{label:"Public Company Limited by Shares",value:"public_company_limited_by_shares",type:"entity",prefix:"a"},{label:"Public Liability Company",value:"public_liability_company",type:"entity",prefix:"a"},{label:"Public Limited Company (AS)",value:"public_limited_company_as",type:"entity",countries:["EE"],prefix:"a"},{label:"Public Limited Liability Companies (PLC)",value:"public_limited_liability_companies",type:"entity",countries:["CM"],prefix:"a"}
1,{label:"Registered Partnership (sp\xf3\u0142ka jawna / sp.j.)",value:"registered_partnership",type:"entity",countries:["PL"],prefix:"a"},{label:"Representative Office",value:"representative_office",type:"entity",countries:["TH"],prefix:"a"},{label:"S Corporation",value:"s_corporation",type:"entity",countries:["US"],prefix:"a"},{label:"SA (Sociedad Anonima)",value:"s_a",type:"entity",countries:["CR"],prefix:"an"},{label:"SPA model",value:"spa_model",type:"entity",countries:["CL"],prefix:"a"},{label:"Sociedad An\xf3nima Unipersonal (\u201cS.A.U.\u201d)",value:"s_a_u",type:"entity",countries:["AR"],prefix:"a"},{label:"Sociedade Limitada (Ltda)",value:"sociedade_limitada",type:"entity",countries:["BR"]},{label:"Sociedade Limitada Unipessoal",value:"sociedade_limitada_inipessoal",type:"entity",countries:["BR"]},{label:"Sociedad An\xf3nima (\u201cS.A.\u201d)",value:"sociedad_anonima",type:"entity",countries:["AR"],prefix:"a"},{label:"Sociedad de Responsabilidad Limitada (SRL)",value:"s_r_l",type:"entity",countries:["CR"],prefix:"a"},{label:"Sociedad de Responsabilidad Limitada (\u201cS.R.L.\u201d)",value:"sociedad_de_responsabilidad_limitada",type:"entity",countries:["AR"]},{label:"Sociedad por Acciones Simplificada (\u201cS.A.S.\u201d)",value:"s_a_s",type:"entity",countries:["AR"],prefix:"a"},{label:"Soci\xe9t\xe9 par Actions Simplifi\xe9e (SAS)",value:"sas",type:"entity",countries:["FR"],prefix:"a"},{label:"Soci\xe9t\xe9 par Actions Simplifi\xe9e Unipersonnelle (SASU)",value:"sasu",type:"entity",countries:["FR"],prefix:"a"},{label:"Sole Proprietorship",value:"sole_proprietorship",type:"entity",countries:["PH"],prefix:"a"},{label:"Sole Traders \u201denskild n\xe4ringsidkare\u201d",value:"sole_traders_enskild_naringsidkare",type:"individual",countries:["SE"],prefix:"a",disabledShareholders:!0},{label:"Sole Proprietor",value:"sole_proprietor",type:"entity",countries:["EE","GR","JM","PL","SA","ZA","TH"],prefix:"a"},{label:"Sole Proprietor",value:"sole_proprietor",type:"individual",countries:["SI","PL"],prefix:"a"},{label:"Sole Proprietor/Sole Trader",value:"sole_proprietor_sole_trader",type:"entity",prefix:"a",disabledShareholders:!0},{label:"Sole Proprietors or Self-employed",value:"sole_proprietors_or_self_employed",type:"entity",countries:["AL"],prefix:"a"},{label:"Thailand BOI Company",value:"thailand_boi_company",type:"entity",countries:["TH"],prefix:"a"},{label:"Trusts",value:"trusts",type:"entity",prefix:"a"},{label:"U.S. Treaty of Amity Company",value:"us_treaty_of_amity_company",type:"entity",countries:["TH"],prefix:"an"},{label:"Unitary enterprise",value:"unitary_enterprise",type:"entity",countries:["BY"],prefix:"an"},{label:"Unlimited Liability company",value:"unlimited_liability_company",type:"entity",countries:["SA"],prefix:"an"},{label:"Unlimited Company",value:"unlimited_company",type:"entity",prefix:"an"},{label:"Registered Individual",value:"registered_individual",type:"entity",prefix:"a"},{label:"Unregistered Individual",value:"unregistered_individual",type:"entity",prefix:"a"},{label:"Sole Trader",value:"sole_trader",type:"individual",disabledShareholders:!0},{label:"Sole Trader",value:"sole_trader",type:"entity",disabledShareholders:!0},{label:"Jednoosobowa dzialnosc gospodarcza",value:"jednoosobowa_dzialnosc_gospodarcza",type:"individual",countries:["PL"]}],jh={required:!0,message:"Required"},bh=N.Z.Option,wh=(d.Z,Ps.r,d.Z,Es.r,function(e){var t,n=e.addLegalEntity,i=e.companyDetailsLoading,a=(e.companyNode,e.fetchCompanyByNodeId),s=e.form,l=e.legalEntity,o=e.loginMeta,c=e.onboarding,u=e.updateLegalEntity,m=e.updateLegalEntityloading,p=e.closeAll,x=s.getFieldDecorator,h=(s.setFieldsValue,s.isFieldsTouched),f=(0,r.useState)("IN"),y=f[0],v=f[1];o&&(t=o.company&&o.company.company_id),(0,r.useEffect)((function(){l&&l.tax_residence_country_code&&v(l.tax_residence_country_code)}),[l]),(0,r.useEffect)((function(){o&&o.company&&o.company.company_id&&a({companyId:o.company.company_id})}),[o]);var b=vh.filter((function(e){return e.countries&&y?e.countries.includes(y.iso2)&&"entity"===e.type:"entity"===e.type})).map((function(e){return(0,E.jsx)(bh,{value:e.value,filterValue:e.label,children:(0,E.jsx)("div",{children:e.label})},e.value)}));return(0,E.jsx)("div",{children:(0,E.jsxs)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),s.val
1idateFieldsAndScroll((function(e,r){if(!e){var i={name:r.entity_name,type:r.type,tax_residence_country_code:r.tax_residence_country_code,currency:r.currency,employer_identification_number:r.employer_identification_number};r.vat_id&&(i.vat_id=r.vat_id),r.registration_number&&(i.registration_number=r.registration_number),l&&l.uuid?(i.uuid=l.uuid,u(i,{onSuccess:function(){c||(g.Z.success("Legal Entity successfully updated."),p&&p())},onFail:function(e){return g.Z.error(e)}})):(i.clustering_company_id=t,n(i,{onSuccess:function(){c||(g.Z.success("Legal Entity successfully added."),p&&p())},onFail:function(e){return g.Z.error(e)}}))}}))},children:[(0,E.jsx)("div",{className:"dashboard-card pt-8",children:(0,E.jsxs)(_.Z,{gutter:[20,0],children:[(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Legal Name of Company",children:x("entity_name",{initialValue:l?l.name:null,rules:[jh]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light text-italics",children:"Example: Kaamwork Technologies, Inc."})]}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Registration Number",children:x("registration_number",{initialValue:l?l.registration_number:null,rules:[]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Company Legal Type",children:x("type",{initialValue:l?l.type:null,rules:[jh]})((0,E.jsx)(N.Z,{initialValue:l?l.type:null,className:"select-size-48 select-bg-grey inner-shadow round-6",dropdownClassName:"select-bg-grey-dropdown",showSearch:!0,suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),filterOption:!0,optionFilterProp:"filterValue",children:b}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Vat ID",children:x("vat_id",{initialValue:l?l.vat_id:null,rules:[]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Employer Identification Number (EIN)",children:x("employer_identification_number",{initialValue:l?l.employer_identification_number:null,rules:[jh]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})})]})}),(0,E.jsxs)("div",{children:[(0,E.jsx)(hs.Z.Item,{className:"mt-20",children:(0,E.jsxs)(j.Z,{htmlType:"submit",className:"btn-size-xl mb-8 text-weight-500 border-radius-6",type:"primary",block:!0,disabled:m||i||!h(),children:[(m||i)&&(0,E.jsx)(d.Z,{type:"loading"}),c?"Save & Continue":"Save Changes"]})}),(0,E.jsx)(hs.Z.Item,{children:(0,E.jsx)(j.Z,{type:"secondary",htmlType:"button",className:"btn-size-xl cancel",block:!0,onClick:p,children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Cancel"})})})]})]})})});wh.defaultProps={companyNode:null,legalEntity:null,loginMeta:null,onboarding:!1};var kh=hs.Z.create({name:"LegalEntityForm"})(wh),Nh=(0,i.$j)((function(e){return{companyDetailsLoading:e.company.companyDetailsLoading,companyNode:e.landing.companyNode,legalEntity:e.auth.auth.legal_entity,loginMeta:e.auth.auth.login_meta,updateLegalEntityloading:e.auth.updateLegalEntityloading}}),(function(e){return{addLegalEntity:function(t,n){return e(w.OkZ(t,n))},fetchCompanyByNodeId:function(t){return e(w.fqn(t))},updateLegalEntity:function(t,n){return e(w.OY8(t,n))}}}))(kh),_h=n(77877),Zh={required:!0,message:"Required"},Ch=function(e){var t,n=e.addLegalEntity,i=e.companyDetailsLoading,a=e.companyNode,s=e.fetchCompanyByNodeId,l=e.form,o=e.legalEntity,c=e.loginMeta,u=e.onboarding,m=e.updateLegalEntity,p=e.updateLegalEntityloading,x=e.closeAll,h=l.getFieldDecorator,f=l.setFieldsValue,y=l.isFieldsTouched,v=(0,r.useState)("IN"),b=(v[0],v[1]),w=(0,r.useState)(""),k=(w[0],w[1]);c&&(t=c.company&&c.company.company_id),(0,r.useEffect)((function(){a&&a.logo&&k(a.logo)}),[a]),(0,r.useEffect)((function(){o&&o.tax_residence_country_code&&b(o.tax_residence_country_code)}),[o]),(0,r.useEffect)((function(){c&&c.company&&c.company.company_id&&s({companyId:c.company.company_id})}),[c]);return(0,E.jsx)("div",{children:(0,E.jsxs)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),l.validateFieldsAndScroll((function(e,r){if(!e){var i={registered_address:{street:r.street,city:r.city,state:r.state,zip_code:r.zip_code}};r.vat_id&&(i.vat_id=r.vat_id),r.registration_number&&(i.registration_number=r.registration_number),o&&o.uuid?(i.uuid=o.uuid,m(i,{onSuccess:function(){u||(g.Z.success("Registered Address successfully updated."),x&&x())},onFail:function(e){return g.Z.error(e)}})):(i.clustering_company_id=t,n(i,{onSuccess:function(){u||(g.Z.success("Registered Address successfully added."),x&&x())},onFail:function(e){return g.Z.error(e)}}))}}))},children:[(0,E.jsx)("div",{className:"dashboard-card pt-8",children:(0,E.jsxs)(_.Z,{gutter:[20,0],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Country of Incorporation",children:h("tax_residence_country_code",{initialValue:o?o.tax_residence_country_code:"US",rules:[Zh]})((0,E.jsx)(_h.Z,{className:"select-size-48 select-bg-grey",dropdownClassName:"select-bg-grey-dropdown",initialValue:o?o.tax_residence_country_code:"US",handleChange:function(e){b(e),f({tax_residence_country_code:e.iso2}),f({currency:e.currency})},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r})}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"Street",children:h("street",{initialValue:o&&o.registered_address?o.registered_address.street:null,rules:[Zh]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey"}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"City",children:h("city",{initialValue:o&&o.registered_address?o.registered_address.city:null,rules:[Zh]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey"}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"State",children:h("state",{initialValue:o&&o.registered_address?o.registered_address.state:null,rules:[Zh]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey"}))})}),(0,E.jsx)(Z.Z,{xs:24,className:"mt-20",children:(0,E.jsx)(hs.Z.Item,{label:"ZIP Code",children:h("zip_code",{initialValue:o&&o.registered_address?o.registered_address.zip_code:null,rules:[Zh]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey"}))})})]})}),(0,E.jsxs)("div",{children:[(0,E.jsx)(hs.Z.Item,{className:"mt-20",children:(0,E.jsxs)(j.Z,{htmlType:"submit",className:"btn-size-xl mb-8 text-weight-500 border-radius-6",type:"primary",block:!0,disabled:p||i||!y(),children:[(p||i)&&(0,E.jsx)(d.Z,{type:"loading"}),u?"Save & Continue":"Save Changes"]})}),(0,E.jsx)(hs.Z.Item,{children:(0,E.jsx)(j.Z,{type:"secondary",htmlType:"button",className:"btn-size-xl cancel ",block:!0,onClick:x,children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Cancel"})})})]})]})})};Ch.defaultProps={companyNode:null,legalEntity:null,loginMeta:null,onboarding:!1};
1var Oh=hs.Z.create({name:"RegisteredAddressForm"})(Ch),Sh=(0,i.$j)((function(e){return{companyDetailsLoading:e.company.companyDetailsLoading,companyNode:e.landing.companyNode,legalEntity:e.auth.auth.legal_entity,loginMeta:e.auth.auth.login_meta,updateLegalEntityloading:e.auth.updateLegalEntityloading}}),(function(e){return{addLegalEntity:function(t,n){return e(w.OkZ(t,n))},fetchCompanyByNodeId:function(t){return e(w.fqn(t))},updateLegalEntity:function(t,n){return e(w.OY8(t,n))}}}))(Oh),zh={required:!0,message:"Required"},Eh=function(e){var t,n=e.addLegalEntity,i=e.companyNode,a=e.fetchCompanyByNodeId,s=e.form,l=e.legalEntity,o=e.loginMeta,c=e.onboarding,d=e.updateLegalEntity,u=e.isMasterPasswordUser,m=s.getFieldDecorator,p=s.setFieldsValue,x=(0,r.useState)("IN"),h=(x[0],x[1]),f=(0,r.useState)(""),y=f[0],v=f[1];o&&(t=o.company&&o.company.company_id),(0,r.useEffect)((function(){i&&i.logo&&v(i.logo)}),[i]),(0,r.useEffect)((function(){l&&l.tax_residence_country_code&&h(l.tax_residence_country_code)}),[l]),(0,r.useEffect)((function(){o&&o.company&&o.company.company_id&&a({companyId:o.company.company_id})}),[o]);var j=function(e){s.validateFieldsAndScroll((function(e,r){if(y||g.Z.error("Please upload company logo"),!e&&y){var i={currency:r.currency};l&&l.uuid?(i.uuid=l.uuid,d(i,{onSuccess:function(){c||g.Z.success("Default Currency successfully updated.")},onFail:function(e){return g.Z.error(e)}})):(i.clustering_company_id=t,n(i,{onSuccess:function(){c||g.Z.success("Default Currency successfully added.")},onFail:function(e){return g.Z.error(e)}}))}}))};return(0,E.jsx)("div",{children:(0,E.jsx)(hs.Z,{className:"custom-form",onSubmit:j,children:(0,E.jsx)("div",{className:"dashboard-card pt-8",children:(0,E.jsx)(_.Z,{gutter:[20,0],children:(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"",children:m("currency",{initialValue:l?l.currency:"USD",rules:[zh]})((0,E.jsx)(ao.Z,{disabled:!u,initialValue:l?l.currency:"USD",handleCurrencyChange:function(e){p({currency:e}),j()},className:"select-size-48 select-bg-grey inner-shadow round-6 "}))}),(0,E.jsx)("div",{className:"text-size-14 text-italics",children:"We will use this currency to display all the invoices and payments."})]})})})})})};Eh.defaultProps={companyNode:null,legalEntity:null,loginMeta:null,onboarding:!1};var Ph=hs.Z.create({name:"DefaultCurrency"})(Eh),Dh=(0,i.$j)((function(e){return{companyNode:e.landing.companyNode,legalEntity:e.auth.auth.legal_entity,loginMeta:e.auth.auth.login_meta,isMasterPasswordUser:e.auth.auth.isMasterPasswordUser}}),(function(e){return{addLegalEntity:function(t,n){return e(w.OkZ(t,n))},fetchCompanyByNodeId:function(t){return e(w.fqn(t))},updateLegalEntity:function(t,n){return e(w.OY8(t,n))}}}))(Ph),Fh=n(20550),Lh=n(98390),Ah=n(42557),Ih=n.n(Ah),Mh=n(14240),Rh=n(15194);function Th(){return Th=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Th.apply(this,arguments)}function qh(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Bh=r.createElement("title",null,"Bin"),Vh=r.createElement("g",{id:"Bin",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Hire/Active/Bin",transform:"translate(4.000000, 3.000000)",strokeWidth:2},r.createElement("path",{d:"M14,15.7918 C14,17.0105 13.1205,18 12.0371,18 L3.9629,18 C2.8795,18 2,17.0105 2,15.7918 L2,4 L14,4 L14,15.7918 Z",id:"Stroke-2",stroke:"#2A4CD5",fill:"#2A4CD5"}),r.createElement("path",{d:"M11,2.2082 C11,0.9895 10.1205,0 9.0371,0 L6.9629,0 C5.8795,0 5,0.9895 5,2.2082 L5,4 L11,4 L11,2.2082 Z",id:"Stroke-4",stroke:"#6D88F5",fill:"#6D88F5"}),r.createElement("line",{x1:0,y1:4,x2:16,y2:4,id:"Stroke-5",stroke:"#6D88F5"}),r.createElement("line",{x1:6,y1:8,x2:6,y2:14,id:"Stroke-6",stroke:"#6D88F5"}),r.createElement("line",{x1:10,y1:8,x2:10,y2:14,id:"Stroke-7",stroke:"#6D88F5"}))),Yh=function(e){var t=e.svgRef,n=e.title,i=qh(e,["svgRef","title"]);return r.createElement("svg",Th({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Bh:n?r.createElement("title",null,n):null,Vh)},Hh=r.forwardRef((function(e,t){return r.createElement(Yh,Th({svgRef:t},e))})),Wh=n(58060),Jh=n(44563),Uh=n(55574),$h=[{key:"admin",label:"Admin",description:"Access to all features",tagColor:"blue"},{key:"manager",label:"Manager",description:"Access to only reportees. No access to wallet, invoices, etc.",tagColor:"red"},{key:"hr",label:"HR",description:"Access to all the features except invoices and wallet",tagColor:"yellow"}];function Gh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Gh(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qh=function(e){var t=e.roleDetails,n=e.customStyles;return(0,E.jsx)(Fh.Z,{className:"role-tag role-tag-".concat(null===t||void 0===t?void 0:t.tagColor),style:Kh({marginRight:"12px"},n),children:null===t||void 0===t?void 0:t.label})};function Xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ef=function(e,t){"success"===t?g.Z.success("Invite successfully sent to ".concat(e,".")):g.Z.error("Some error occurred while sending invite to ".concat(e,". Please try again."))},tf=function(e,t){"success"===t?g.Z.success("Invite successfully deleted for ".concat(e,".")):g.Z.error("Some error occurred while deleting invite for ".concat(e,". Please try again."))};function nf(e){(0,za.Z)("(max-width: 767px)");var t,n,i,a=e.fetchCompanyTeamLoading,s=e.team,l=e.fetchCompanyTeam,o=e.sendTeamInvite,u=e.loginMeta,m=e.legalEntity,p=e.authProfileUuid,x=e.inviteTeamLoading,v=(e.resendInviteActive,e.error),b=e.deleteTeamInvite,w=e.updateTeamRole,k=e.deleteTeamMember,C=e.email,O=(0,r.useState)("admin"),S=O[0],z=O[1],P=(0,r.useState)([]),D=P[0],F=P[1],A=(0,r.useState)(!1),I=A[0],M=A[1],R=(0,r.useState)(!1),T=R[0],H=R[1],W=(0,r.useState)(!1),J=W[0],U=W[1];u&&(t=u.company&&u.company.company_id,n="admin"===(null===(i=u.company)||void 0===i?void 0:i.roles[0]));if((0,r.useEffect)((function(){v&&g.Z.error(v,5)}),[v]),(0,r.useEffect)((function(){t&&n&&0===(null===s||void 0===s?void 0:s.length)&&l({company_id:t})}),[t,n,s]),!t)return null;var $=function(){var e=(0,tr.Z)(Qn().mark((function e(t,n){var r,i,a,s,l,o;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat((0,V.dN)(),"/company/manager-employees?clustering_company_id=").concat(null===t||void 0===t||null===(r=t.login_meta)||void 0===r||null===(i=r.company)||void 0===i?void 0:i.company_id,"&email=").concat(t.email.replaceAll("+","%2B"),"&management_role=manager"),{method:"GET",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"}}).then((function(e){return e.json()}));case 3:(a=e.sent)&&(s=(0,E.jsx)(E.Fragment,{children:(null===a||void 0===a?void 0:a.data.length)>0?(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"r-text-size-18",children:[t.first_name," ",t.last_name," is Hiring Manager to following employees:"]}),(0,E.jsx)("ul",{className:"list-type-bullet",children:a.data.map((function(e){var t,n,r,i;return(0,E.jsx)("li",{children:(0,E.jsxs)("div",{className:"r-text-size-16 text-color-dark-grey-light",children:[null===e||void 0===e||null===(t=e.profile)||void 0===t?void 0:t.first_name," ",null===e||void 0===e||null===(n=e.profile)||void 0===n?void 0:n.last_name," - ",null===e||void 0===e||null===(r=e.profile)||void 0===r||null===(i=r.auth_user)||void 0===i?void 0:i.username]})})}))})]}):(0,E.jsx)("div",{children:(0,E.jsx)("div",{className:"r-text-size-18",children:"No assigned employees."})})}),"delete"===n?y.Z.confirm({title:"",className:"custom-modal-confirm",centered:!0,content:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark",children:[(null===a||void 0===a?void 0:a.error)&&(0,E.jsx)("div",{className:"r-text-size-18",children:null===a||void 0===a||null===(l=a.error)||void 0===l?void 0:l.message}),s,(0,E.jsxs)("div",{className:"r-text-size-18 mt-8 mb-24",children:["Do you ",(null===a||void 0===a?void 0:a.data.length)>0?"still ":"","want to remove ",t.first_name," ",t.last_name,"?"]})]}),width:"480px",okButtonProps:{className:"text-size-16 text-weight-500 btn-size-xl border-radius-6",style:{padding:"0 40px",height:"3rem"}},cancelButtonProps:{className:"btn-size-xl text-weight-500 text-size-16 border-radius-6 border-color-grey text-color-blue",style:{height:"3rem"}},cancelText:"Cancel",okText:"Yes Remove",onCancel:function(){},onOk:function(){k({profileUuid:t.uuid})}}):y.Z.info({title:"",className:"custom-modal-confirm",centered:!0,content:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark",children:[(null===a||void 0===a?void 0:a.error)&&(0,E.jsx)("div",{className:"r-text-size-18",children:null===a||void 0===a||null===(o=a.error)||void 0===o?void 0:o.message}),s]}),width:"480px",okButtonProps:{className:"text-size-16 text-weight-500 btn-size-xl border-radius-6",style:{padding:"0 40px",height:"3rem"}},okText:"Ok",icon:null,onOk:function(){}})),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}();function G(e,n){var r,i=(0,E.jsxs)(c.Z,{className:"custom-menu-options",onClick:function(t){["admin","manager","hr"].includes(t.key)&&function(e,t){var n,r;w({clustering_company_id:null===e||void 0===e||null===(n=e.login_meta)||void 0===n||null===(r=n.company)||void 0===r?void 0:r.company_id,profile_id:null===e||void 0===e?void 0:e.uuid,role:t.key},{onSuccess:function(){g.Z.success("".concat(e.first_name,"'s role changed to ").concat(t.label))},onFail:function(e){g.Z.error(e)}})}(e,$h.find((function(e){return e.key===t.key})))}
1,children:[(0,E.jsx)("div",{className:"sub-menu-title",children:"Change Role"}),$h.map((function(t,n){return(0,E.jsx)(c.Z.Item,{onClick:function(e){console.log(e)},children:(0,E.jsxs)("div",{className:"d-flex align-items-start",children:[(0,E.jsx)(q.ZP,{className:"radio-blue",value:t.key,checked:(null===e||void 0===e?void 0:e.role_type)===t.key},t.key),(0,E.jsxs)("div",{className:"d-inline-block",children:[(0,E.jsx)("div",{className:"menu-item-title",children:t.label}),(0,E.jsx)("div",{className:"menu-item-subtitle",children:t.description})]})]})},t.key)})),(0,E.jsx)(B.Z,{style:{margin:"8px 0"}}),(0,E.jsx)(c.Z.Item,{className:"text-weight-500 text-size-16",onClick:function(){$(e,"show_reportees")},onMouseEnter:function(){return H(!0)},onMouseLeave:function(){return H(!1)},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{component:T?Jh.r:Uh.r,style:{fontSize:"24px"}}),(0,E.jsx)("div",{className:"ml-12",children:"Show Assigned Employees"})]})},"show_reportees"),(0,E.jsx)(c.Z.Item,{className:"text-weight-500 text-size-16",onClick:function(){$(e,"delete")},onMouseEnter:function(){return U(!0)},onMouseLeave:function(){return U(!1)},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{component:J?Hh:Wh.r,style:{fontSize:"24px"}}),(0,E.jsxs)("div",{className:"ml-12",children:["Remove from ",m.name]})]})},"delete"),(0,E.jsx)("div",{className:"mt-8"})]}),a=(0,E.jsxs)(c.Z,{className:"invite-member-options",children:[(0,E.jsxs)(c.Z.Item,{className:"text-weight-500",onClick:function(){o({company_uuid:t,inviter_uuid:p,emails:[{email:e.email,role:S}]},{resend:!0,onCompletion:ef})},onMouseEnter:function(){return M(!0)},onMouseLeave:function(){return M(!1)},children:[(0,E.jsx)(d.Z,{component:I?Mh.r:Rh.r,style:{fontSize:"24px"}}),"Resend Invite"]}),(0,E.jsxs)(c.Z.Item,{className:"text-weight-500",onClick:function(){!function(e,t){b({invite_id:e,email:t},{onCompletion:tf})}(e.id,e.email)},onMouseEnter:function(){return U(!0)},onMouseLeave:function(){return U(!1)},children:[(0,E.jsx)(d.Z,{component:J?Hh:Wh.r,style:{fontSize:"24px"}}),"Remove"]})]});return(0,E.jsx)("div",{children:(0,E.jsxs)("div",{className:"member-card",children:[(0,E.jsx)("img",{className:"member-card-img",alt:"",src:e.photo}),(0,E.jsxs)("div",{className:"member-card-info",children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"",children:[(0,E.jsxs)("div",{className:"text-size-18 text-weight-500 mb-4",children:[e.first_name," ",e.last_name]}),e.type&&"invite"===e.type?null:(r=e.roles,e.type,r?r.map((function(e){return"recruiter"===e?(0,E.jsx)(Fh.Z,{color:"blue",children:"RECRUITER"},e):null})):null),(0,E.jsx)("div",{className:"mr-12 ".concat("invite"===e.type?"text-color-dark-grey-dark":"text-color-dark-grey-light"),children:e.email})]}),(0,E.jsx)("div",{className:"email-tags-container text-size-16 text-grey",children:e.type&&"invite"===e.type?(0,E.jsxs)(Fh.Z,{className:"mr-12 invite-tag",color:"green",children:[(0,E.jsx)(d.Z,{component:Va.r,className:"mr-8 p-4 icon-size-16"}),"Invite Sent"]}):(0,E.jsx)(Qh,{roleDetails:$h.find((function(t){return t.key===e.role_type}))})})]}),e.type&&"invite"===e.type&&(0,E.jsx)("div",{className:"text-color-yellow-dark mobile",children:"Invite Sent"})]}),(0,E.jsx)(de.Z,{overlay:"invite"===(null===e||void 0===e?void 0:e.type)?a:i,trigger:["click"],placement:"bottomLeft",className:"invite-member-options-wrapper",children:(0,E.jsx)(j.Z,{type:"default",className:"invite-options-button",children:(0,E.jsx)(d.Z,{component:ho.r,style:{fontSize:"22px"}})})})]})},e.email)}function K(e){F([].concat((0,f.Z)(D),[e]))}function Q(e){F(D.filter((function(t){return t!==e})))}function X(){for(var e=!0,n=0;n<D.length;n+=1){var r=D[n];if(!(0,Y.oH)(r)){var i="Invalid Email ".concat(r,". Please enter correct email.");g.Z.error(i,5),e=!1;break}}if(e){var a={company_uuid:t,inviter_uuid:p,emails:D.map((function(e){return{email:e,role:S}}))};o(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Xh(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a),{onCompletion:function(){g.Z.success("Invitation sent")}}),F([])}}return(0,E.jsxs)("div",{className:"team mb-40",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 mb-8",children:"Your Team"}),(0,E.jsxs)(Md.Z,{className:"team-invite-view mb-12",children:[(0,E.jsx)("div",{className:"text-size-16 text-weight-500 mb-4 invite-heading",children:"Enter team member\u2019s email"}),(0,E.jsx)("div",{className:"email-selector-container",children:(0,E.jsx)(Lh.Z,{emails:D,placeholder:"Enter email",onEmailDeselect:Q,onEmailSelect:K})}),(0,E.jsx)("div",{className:"text-grey text-size-14 mt-6 text-italic mb-12",children:"Use comma to separate multiple emails"}),(0,E.jsx)("div",{className:"text-size-16 text-weight-500 mb-4 invite-heading",children:"As a"}),(0,E.jsxs)(_.Z,{gutter:20,children:[(0,E.jsx)(Z.Z,{xs:16,children:(0,E.jsx)(N.Z,{className:"select-size-48 select-bg-grey w-100 round-6",dropdownClassName:"select-custom-option",suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-24",component:L.r}),value:S,defaultValue:S,onChange:function(e){return z(e)},optionLabelProp:"label",children:$h.map((function(e){return(0,E.jsx)(N.Z.Option,{value:e.key,label:e.label,children:(0,E.jsxs)("div",{className:"w-100",children:[(0,E.jsx)("div",{className:"select-custom-option-label",children:e.label}),(0,E.jsx)("div",{className:"select-custom-option-description",children:e.description})]})},e.key)}))})}),(0,E.jsx)(Z.Z,{xs:8,children:(0,E.jsxs)(j.Z,{size:"large",disabled:!D.length,className:"btn-size-xl text-size-16 text-weight-500 round-8",type:"primary",onClick:X,block:!0,children:[x?(0,E.jsx)(d.Z,{type:"loading"}):null," Invite"]})})]})]}),(0,E.jsx)("div",{className:"team-list",children:a?(0,E.jsx)("div",{children:(0,E.jsx)("img",{alt:"loading",src:Ih(),className:"w-100"})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{className:"text-size-18 text-weight-500 mb-8",children:["Your team members (",s.filter((function(e){return e.uuid})).length,")"]}),s&&s.length>0?s.filter((function(e){return e.email!==C})).map((function(e,t){return G(e)})):(0,E.jsx)(af,{})]})})]})}nf.defaultProps={team:[],loginMeta:{},error:""};var rf=nf,af=function(){return(0,E.jsxs)("div",{className:"no-team-invite",children:[(0,E.jsx)("h3",{children:"You do have not added any team members"}),(0,E.jsx)("p",{children:"Enter your team members\u2019 email to invite them"})]})},sf=(0,i.$j)((function(e){return{fetchCompanyTeamLoading:e.company.fetchCompanyTeamLoading,inviteTeamLoading:e.company.inviteTeamLoading,team:e.company.team,loginMeta:e.auth.auth.login_meta,legalEntity:e.auth.auth.legal_entity,authProfileUuid:e.auth.auth.profile_uuid,error:e.company.error,resendInviteActive:e.company.resendInviteActive,email:e.auth.auth.email}}),(function(e){return{fetchCompanyTeam:function(t){return e(w.r2G(t))},sendTeamInvite:function(t,n){return e(w.lyI(t,n))},deleteTeamInvite:function(t,n){return e(w.Fsy(t,n))},updateTeamRole:function(t,n){return e(w.Obl(t,n))},deleteTeamMember:function(t,n){return e(w.MHR(t,n))}}}))(rf),lf=n(69215),of=hs.Z.create({name:"BusinessOwnerForm"})((function(e){var t=e.form,n=e.addBusinessOwner,i=e.companyId,a=(0,r.useState)("active_employees"),s=a[0],l=a[1];return(0,E.jsx)(Md.Z,{className:"team-invite-view mb-12",children:(0,E.jsx)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),t.validateFieldsAndScroll((function(e,r){if(!e){var a={clustering_company_id:i,name:r.name,email:r.email,role:"business_owner"};n(a,{onSuccess:function(){lf.yw.success("".concat(r.email," has been added as business owner successfully")),t.resetFields()},onFail:function(e){return lf.yw.error(e)}})}}))},children:(0,E.jsxs)(_.Z,{gutter:[12,24],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Name",children:t.getFieldDecorator("name",{rules:[{required:!0,message:"Required"}]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Email",children:t.getFieldDecorator("email",{rules:[{required:!0,message:"Required"}]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow round-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)(hs.Z.Item,{children:[(0,E.jsx)(j.Z,{htmlType:"submit",className:"btn-size-xl text-weight-500 round-6 mb-8",type:"primary",block:!0,children:"Add Business Owner"}),(0,E.jsx)(j.Z,{type:"primary",ghost:!0,className:"btn-size-xl border-color-grey text-weight-500 round-8",block:!0,onClick:function(){t.resetFields(),l("active_employees"===s?"new_active_employees":"active_employees")},children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500",children:"Cancel"})})]})})]})})})})),cf=["#8ed5ac99","#FFDCEC","#ff774f40","#ffd183bf","#DCE2F9","#8ED5AC","#E0D1FA"],df=function(e){var t=e.className,n=e.alt,r=void 0===n?"":n,i=e.srcLink,a=e.name;return(0,E.jsx)("img",{className:t,alt:r,src:i||"https://ui-avatars.c
1om/api/?name=".concat(a,"&background=").concat(cf[Math.floor(Math.random()*cf.length)].replace("#",""))})},uf=(0,r.memo)(df),mf=(0,i.$j)((function(e){return{companyAccessRole:e.auth.companyAccessRole,loginMeta:e.auth.auth.login_meta,legalEntity:e.auth.auth.legal_entity,owners:e.employ.owners,ownersLoading:e.employ.ownersLoading,ownersFetched:e.employ.ownersFetched}}),(function(e){return{updateEmployeeManager:function(t,n){return e(w.Lrx(t,n))},getCompanyOwners:function(t,n){return e(w.Flp(t,n))}}}))((function(e){e.employee;var t=e.loginMeta,n=e.legalEntity,i=e.owners,a=e.ownersLoading,s=e.ownersFetched,l=e.getCompanyOwners,o=e.deleteBusinessOwner,u=(0,r.useState)(!1),m=u[0],p=u[1],x=(0,r.useState)(!1),h=x[0],f=x[1],v=null;null!==t&&void 0!==t&&t.company&&(v=t.company.company_id),(0,r.useEffect)((function(){v&&0===(null===i||void 0===i?void 0:i.length)&&!s&&l({company_id:v})}),[v,i]);var b=function(){var e=(0,tr.Z)(Qn().mark((function e(n,r){var i,a,s,l,c;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat((0,V.dN)(),"/company/manager-employees?clustering_company_id=").concat(null===t||void 0===t||null===(i=t.company)||void 0===i?void 0:i.company_id,"&email=").concat(n.email.replaceAll("+","%2B"),"&management_role=business_owner"),{method:"GET",mode:"cors",headers:{Authorization:"JWT ".concat(cs.Z.get("token")),"Content-Type":"application/json"}}).then((function(e){return e.json()}));case 3:(a=e.sent).error?g.Z.error(a.error.message):a&&(s=(0,E.jsx)(E.Fragment,{children:(null===a||void 0===a?void 0:a.data.length)>0?(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"r-text-size-18",children:[n.first_name," ",n.last_name," is Hiring Manager to following employees:"]}),(0,E.jsx)("ul",{className:"list-type-bullet",children:a.data.map((function(e){var t,n,r,i;return(0,E.jsx)("li",{children:(0,E.jsxs)("div",{className:"r-text-size-16 text-color-dark-grey-light",children:[null===e||void 0===e||null===(t=e.profile)||void 0===t?void 0:t.first_name," ",null===e||void 0===e||null===(n=e.profile)||void 0===n?void 0:n.last_name," - ",null===e||void 0===e||null===(r=e.profile)||void 0===r||null===(i=r.auth_user)||void 0===i?void 0:i.username]})})}))})]}):(0,E.jsx)("div",{children:(0,E.jsx)("div",{className:"r-text-size-18",children:"No assigned employees."})})}),"delete"===r?y.Z.confirm({title:"",className:"custom-modal-confirm",centered:!0,content:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark",children:[(null===a||void 0===a?void 0:a.error)&&(0,E.jsx)("div",{className:"r-text-size-18",children:null===a||void 0===a||null===(l=a.error)||void 0===l?void 0:l.message}),s,(0,E.jsxs)("div",{className:"r-text-size-18 mt-8 mb-24",children:["Do you ",(null===a||void 0===a?void 0:a.data.length)>0?"still ":"","want to remove ",n.first_name," ",n.last_name,"?"]})]}),width:"480px",okButtonProps:{className:"text-size-16 text-weight-500 btn-size-xl border-radius-6",style:{padding:"0 40px",height:"3rem"}},cancelButtonProps:{className:"btn-size-xl text-weight-500 text-size-16 border-radius-6 border-color-grey text-color-blue",style:{height:"3rem"}},cancelText:"Cancel",okText:"Yes Remove",onCancel:function(){},onOk:function(){o({uuid:n.uuid})}}):y.Z.info({title:"",className:"custom-modal-confirm",centered:!0,content:(0,E.jsxs)("div",{className:"text-color-dark-grey-dark",children:[(null===a||void 0===a?void 0:a.error)&&(0,E.jsx)("div",{className:"r-text-size-18",children:null===a||void 0===a||null===(c=a.error)||void 0===c?void 0:c.message}),s]}),width:"480px",okButtonProps:{className:"text-size-16 text-weight-500 btn-size-xl border-radius-6",style:{padding:"0 40px",height:"3rem"}},okText:"Ok",icon:null,onOk:function(){}})),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}();return(0,E.jsx)("div",{className:"team-list",children:a?(0,E.jsx)("div",{children:(0,E.jsx)("img",{alt:"loading",src:Ih(),className:"w-100"})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{className:"text-size-18 text-weight-500 mb-8",children:["Your business owners (",i.length,")"]}),i&&i.length>0?i.map((function(e,t){return function(e,t){var r=(0,E.jsxs)(c.Z,{className:"custom-menu-options",onClick:function(t){["admin","manager","hr"].includes(t.key)&&updateMemberRole(e,ACCESS_ROLES_LIST.find((function(e){return e.key===t.key})))},children:[(0,E.jsx)("div",{className:"mt-8"}),(0,E.jsx)(c.Z.Item,{className:"text-weight-500 text-size-16",onClick:function(){b(e,"show_reportees")},onMouseEnter:function(){return p(!0)},onMouseLeave:function(){return p(!1)},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{component:m?Jh.r:Uh.r,style:{fontSize:"24px"}}),(0,E.jsx)("div",{className:"ml-12",children:"Show Assigned Employees"})]})},"show_reportees"),(0,E.jsx)(c.Z.Item,{className:"text-weight-500 text-size-16",onClick:function(){b(e,"delete")},onMouseEnter:function(){return f(!0)},onMouseLeave:function(){return f(!1)},children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{component:h?Hh:Wh.r,style:{fontSize:"24px"}}),(0,E.jsxs)("div",{className:"ml-12",children:["Remove from ",n.name]})]})},"delete"),(0,E.jsx)("div",{className:"mt-8"})]});return(0,E.jsx)("div",{children:(0,E.jsxs)("div",{className:"member-card",children:[(0,E.jsx)(uf,{className:"member-card-img",srcLink:e.photo,name:e.name}),(0,E.jsx)("div",{className:"member-card-info",children:(0,E.jsx)("div",{className:"d-flex justify-content-between align-items-center",children:(0,E.jsxs)("div",{className:"",children:[(0,E.jsxs)("div",{className:"text-size-18 text-weight-500 mb-4",children:[e.first_name," ",e.last_name]}),(0,E.jsx)("div",{className:"mr-12 text-color-dark-grey-light",children:e.email})]})})}),(0,E.jsx)(de.Z,{overlay:r,trigger:["click"],placement:"bottomLeft",className:"invite-member-options-wrapper",children:(0,E.jsx)(j.Z,{type:"default",className:"invite-options-button",children:(0,E.jsx)(d.Z,{component:ho.r,style:{fontSize:"22px"}})})})]})},e.email)}(e)})):(0,E.jsx)("div",{className:"no-team-invite",children:(0,E.jsx)("h3",{children:"You do have not added any business owners"})})]})})})),pf=function(e){var t,n,r=e.addBusinessOwner,i=e.loginMeta,a=e.deleteBusinessOwner;i&&(t=null===i||void 0===i||null===(n=i.company)||void 0===n?void 0:n.company_id);return t?(0,E.jsxs)("div",{className:"mb-40",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500 mb-8",children:"Business Owners"}),(0,E.jsx)(of,{companyId:t,addBusinessOwner:r}),(0,E.jsx)(mf,{deleteBusinessOwner:a})]}):null},xf=(0,i.$j)((function(e){return{loginMeta:e.auth.auth.login_meta}}),(function(e){return{deleteBusinessOwner:function(t,n){return e(w.Kho(t,n))},addBusinessOwner:function(t,n){return e(w.qav(t,n))}}}))(pf),hf=(0,i.$j)((function(e){return{email:e.auth.auth.email,photo:e.auth.auth.photo,name:"".concat(e.auth.auth.first_name," ").concat(e.auth.auth.last_name),legalEntity:e.auth.auth.legal_entity,loginMeta:e.auth.auth.login_meta}}),(function(e){return{getAccountDetails:function(t){return e(w.jgj(t))}}}))((function(e){var t,n,i=e.getAccountDetails,a=e.email,s=e.photo,l=e.name,o=e.legalEntity,c=e.loginMeta,u=(0,r.useState)(0),m=u[0],p=u[1],x=(0,r.useState)(0),h=x[0],f=x[1];(0,r.useEffect)((function(){i()}),[]);var g=function(){p(0),f(0)},y=function(e){var t=yh[e].icon;return(0,E.jsx)("div",{className:"border-radius-50 d-flex justify-content-center align-items-center mr-16",style:{height:"48px",width:"48px",backgroundColor:t.backgroundColor,border:t.border},children:(0,E.jsx)(d.Z,{component:t.component,style:{fontSize:t.size}})})},v=[{panelHeader:"Company Info",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:y("companyInfo"),component:(0,E.jsx)(Rx,{closeAll:g})},{panelHeader:"Legal Entity Info",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:y("legalEntity"),component:(0,E.jsx)(Nh,{closeAll:g})},{panelHeader:"Registered Address",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:y("address"),component:(0,E.jsx)(Sh,{closeAll:g})},{panelHeader:"Default Currency",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:y("defaultCurrency"),component:(0,E.jsx)(Dh,{closeAll:g})},{panelHeader:"Master Service Agreement",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:y("msa"),type:"actionCard",component:(0,E.jsx)(vx,{closeAll:g})}];return o&&o.billing_contact&&v.splice(3,0,{panelHeader:"Billing Contact",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:y("billingContact"),component:(0,E.jsx)(Ex,{closeAll:g})}),(0,E.jsxs)("div",{className:"pb-20 page-wrapper",style:{maxWidth:"37.5rem"},children:[(0,E.jsx)(Fa.Z,{title:"Settings"}),(0,E.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-16",children:(0,E.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark page-title",children:"Settings"})}),"admin"===(null===c||void 0===c||null===(t=c.company)||void 0===t?void 0:t.roles[0])&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(b.Z,{heading:"Company",onChange:function(e){f(e||0)},activeKey:h,components:v}),(0,E.jsx)("div",{className:"mt-40"}),(0,E.jsx)(sf,{}),(0,E.jsx)(xf,{})]}),(0,E.jsx)(b.Z,{heading:"You",onChange:function(e){p(e||0)},activeKey:m,components:[{panelHeader:l,panelSubHeader:a,status:"".concat("incomplete"),statusLabel:"".concat("updated"),photo:s,incompleteSubheaderItalics:!1,component:(0,E.jsx)(_x,{closeAll:g}),panelTag:(null===c||void 0===c||null===(n=c.company)||void 0===n?void 0:n.roles.length)>0?(0,E.jsx)(Qh,{roleDetails:$h.find((function(e){var t;return e.key===(null===c||void 0===c||null===(t=c.company)||void 0===t?void 0:t.roles[0])})),customStyles:{marginRight:"52px"}}):null},{panelHeader:"Password",status:"".concat("incomplete"),statusLabel:"".concat("updated"),icon:y("password"),component:(0,E.jsx)(gx.Z,{closeAll:g})}]})]})})),ff=n(45697),gf=n.n(ff),yf=n(9070);function vf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?vf(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bf=function(e){var t=e.value,n=e.text,r=e.style,i=void 0===r?{}:r;return(0,E.jsxs)("div",{className:"number-box",style:jf({},i),children:[(0,E.jsx)("span",{className:"text-weight-500 r-text-size-24 text-color-dark-grey-dark",children:t}),(0,E.jsx)("span",{className:"r-text-size-14 text-transform-uppercase text-color-dark-grey-light ml-8",children:n})]})};function wf(){return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark mt-12 mb-20",children:"You do not have any contractors. Add your first contractor by clicking on the button below."}),(0,E.jsxs)("a",{className:"text-size-16 text-color-blue text-weight-500",href:"/company-portal/hire/contractors",children:[(0,E.jsx)(d.Z,{type:"plus"})," Add New Contractor"]})]})}function kf(e){e.companyId;var t=e.dashboardContractors,n=e.dashboardContractorsLoading,r=e.dashboardContractorsFetched;if(n||!r)return(0,E.jsx)(Ql.Z,{});var i=t.count,a=i.inactive,s=i.active,l=i.client_signed,o=s>0||a>0||l>0;return(0,E.jsx)(yf.Z,{icon:ac.r,title:"Contractors",button:o?{text:"Go to Contractors",link:"/company-portal/hire/contractors"}:{},closeable:!o,children:o?(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)("div",{className:"d-flex mt-12",children:[(0,E.jsx)(bf,{value:s,text:"Active"}),(0,E.jsx)(bf,{value:l,text:"Client Signed"}),(0,E.jsx)(bf,{value:a,text:"Inactive"})]})}):(0,E.jsx)(wf,{})})}kf.defaultProps={dashboardContractors:{count:{inactive:0,active:0,client_signed:0}}};var Nf=(0,i.$j)((function(e){return{dashboardContractors:e.employ.dashboardContractors,dashboardContractorsLoading:e.employ.dashboardContractorsLoading,dashboardContractorsFetched:e.employ.dashboardContractorsFetched}}),(function(e){return{}}))(kf),_f=n(994),Zf=function(e){switch(e.toLowerCase()){case"active":return"success";case"onboarding":default:return"";case"offer signed":return"warning"}},Cf=function(e){switch(e.toLowerCase()){case"offer sent":case"onboarding":return{backgroundColor:"rgba(251, 174, 210, 0.5)",color:"#F683B9"};default:return{}}};var Of=function(e){var t=e.profileImage,n=e.name,r=e.status;return(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mt-12",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)("div",{className:"img-36 img-round mr-12 h-auto",children:(0,E.jsx)("img",{src:t,alt:"user_image",className:"h-auto"})}),(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:n})]}),(0,E.jsx)(_f.Z,{intent:Zf(r),style:Cf(r),className:"text-transform-uppercase",children:r})]})};var Sf=(0,i.$j)((function(e){return{dashboardEmployees:e.employ.dashboardEmployees,dashboardEmployeesLoading:e.employ.dashboardEmployeesLoading,dashboardEmployeesFetched:e.employ.dashboardEmployeesFetched}}),(function(e){return{}}))((function(e){e.companyId;var t=e.dashboardEmployees,n=e.dashboardEmployeesLoading,r=e.dashboardEmployeesFetched;return n||!r?(0,E.jsx)(Ql.Z,{}):(0,E.jsxs)(yf.Z,{icon:$o.r,title:"Employees",button:{text:"Go to Employees",link:"/company-portal/hire/employees"},children:[(0,E.jsxs)("div",{className:"d-flex mt-12",children:[(0,E.jsx)(bf,{value:t.count.active,text:"Active"}),(0,E.jsx)(bf,{value:t.count.offer_signed,text:"Offer Signed"}),(0,E.jsx)(bf,{value:t.count.onboarding,text:"Onboarding"})]}),(0,E.jsx)("div",{className:"mt-32",children:t.timeline.map((function(e,t){var n=e.employment_status,r=e.profile;return(0,E.jsx)(Of,{status:n.replaceAll("_"," "),name:"".concat(r.first_name," ").concat(r.last_name),profileImage:r.photo?r.photo:"https://upload.wikimedia.org/wikipedia/commons/7/7c/Profile_avatar_placeholder_large.png"},t)}))})]})}));var zf=function(e){e.profileImage;var t=e.name,n=e.dueDate,r=e.currency,i=e.amount;return(0,E.jsxs)("div",{className:"d-flex align-items-center mt-12",children:[(0,E.jsx)("div",{className:"d-flex align-items-center",style:{flex:1},children:(0,E.jsx)("div",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:t})}),(0,E.jsxs)("div",{className:"d-flex justify-content-between",style:{flex:1},children:[(0,E.jsx)("div",{className:"text-size-16 text-right text-color-dark-grey-dark",children:n}),(0,E.jsxs)("div",{className:"text-size-16 text-weight-500 text-right text-color-dark-grey-dark",children:[r," ",(0,Y.$i)(i)]})]})]})},Ef=n(22564);function Pf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Df=(0,i.$j)((function(e){return{dashboardInvoices:e.employ.dashboardInvoices,dashboardInvoicesLoading:e.employ.dashboardInvoicesLoading,dashboardInvoicesFetched:e.employ.dashboardInvoicesFetched}}),(function(e){return{}}))((function(e){e.companyId;var t=e.dashboardInvoices,n=e.dashboardInvoicesLoading,r=e.dashboardInvoicesFetched;return n||!r?(0,E.jsx)(Ql.Z,{}):t?(0,E.jsxs)(yf.Z,{icon:Ef.r,title:"Invoice",button:{text:"Go to Invoices",link:"/company-portal/hire/invoices"},children:[t.length>0?t.slice(-5).map((function(e,t){return(0,E.jsx)(zf,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Pf(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({profileImage:e.profile_image,dueDate:e.due_date_humanized,amount:e.payable_amount},e),t)})):(0,E.jsx)(Wa.Z,{description:"No invoices yet!"}),t.length>5&&(0,E.jsx)("div",{className:"d-flex justify-content-end mt-4",children:(0,E.jsxs)("a",{href:"/company-portal/hire/invoices",className:"text-size-16 text-weight-500 text-color-blue",children:["+",t.length-5," More"]})})]}):(0,E.jsx)(Wa.Z,{image:Wa.Z.PRESENTED_IMAGE_SIMPLE})}));var Ff=n(75135);var Lf=function(){return(0,E.jsx)("div",{})};function Af(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function If(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Af(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Af(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mf=function(e){var t=e.currency,n=e.value,r=e.text,i=e.style,a=void 0===i?{}:i;return(0,E.jsxs)("div",{className:"number-box",style:If({},a),children:[(0,E.jsx)("div",{className:"r-text-size-14 text-transform-uppercase text-color-dark-grey-light mb-8",children:r}),(0,E.jsxs)("div",{className:"text-weight-500 r-text-size-24 text-color-dark-grey-dark",children:[t," ",(0,Y.$i)(n)]})]})};var Rf=(0,i.$j)((function(e){return{dashboardWallet:e.employ.dashboardWallet,dashboardWalletLoading:e.employ.dashboardWalletLoading,dashboardWalletFetched:e.employ.dashboardWalletFetched}}),(function(e){return{}}))((function(e){e.companyId;var t,n,r,i,a=e.dashboardWallet,s=e.dashboardWalletLoading,l=e.dashboardWalletFetched;return s||!l?(0,E.jsx)(Ql.Z,{}):a?(0,E.jsx)(yf.Z,{icon:zp.r,title:"Wallet",button:{text:"Go to Wallet",link:"/company-portal/hire/wallet"},children:(0,E.jsxs)("div",{className:"d-flex",children:[(0,E.jsx)(Mf,{currency:null===a||void 0===a||null===(t=a.wallet)||void 0===t?void 0:t.currency,value:null===a||void 0===a||null===(n=a.wallet)||void 0===n?void 0:n.balance,text:"Wallet Balance",style:{flex:1,marginLeft:0}}),(0,E.jsx)(Mf,{currency:null===a||void 0===a||null===(r=a.safety_deposit)||void 0===r?void 0:r.currency,value:null===a||void 0===a||null===(i=a.safety_deposit)||void 0===i?void 0:i.balance,text:"Safety Deposit"})]})}):(0,E.jsx)(Wa.Z,{image:Wa.Z.PRESENTED_IMAGE_SIMPLE})}));n(79121);var Tf=n(62984);var qf=(0,i.$j)((function(e){var t;return t={auth:e.auth.auth,loginMeta:gf().shape({company:gf().shape({company_id:gf().string})}).isRequired},(0,h.Z)(t,"loginMeta",e.auth.auth.login_meta),(0,h.Z)(t,"companyAccessRole",e.auth.companyAccessRole),t}),(function(e){return{}}))((function(e){var t=e.auth,n=e.loginMeta,a=e.companyAccessRole,s=(0,za.Z)("(max-width: 767px)"),l=(0,i.I0)();(0,r.useEffect)((function(){l(w.g1x())}),[a]);var o=n&&n.company?n.company.company_id:null;return(0,E.jsxs)("div",{className:"page-wrapper",children:[(0,E.jsx)(Fa.Z,{title:"Dashboard"}),(0,E.jsxs)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark mb-20",children:["Hello ",t.first_name,"!"]}),(0,E.jsx)("div",{className:"text-size-16 text-color-dark-grey-light mb-20",children:"We have a few things for you to look at."}),(0,E.jsxs)(_.Z,{gutter:[24,24],children:[(0,E.jsxs)(Z.Z,{lg:24,xl:12,children:[(0,E.jsxs)("div",{className:"".concat(s?"mb-12":"mb-20"),children:[(0,E.jsx)(Tf.Z,{}),"66f01b62-6898-43e5-ae8a-b6830b3aff3d"==o||"c28145d3-6d16-4fbd-882a-311c41a35082"==o?(0,E.jsx)("div",{className:"notification-dashboard-card background-white",style:{marginTop:"16px"},children:(0,E.jsx)("div",{className:"pt-10 pr-20 pb-10 pl-20 d-flex justify-content-between align-items-center",children:(0,E.jsx)("div",{className:"text-size-16-18 text-color-dark-grey-dark text-weight-500",children:"Company closes for business from 21 December, 2026 through 25 December, 2026"})})}):null,"aa9a3101-ce8c-4276-915c-977068e24609"==o?(0,E.jsx)("div",{className:"notification-dashboard-card background-white",style:{marginTop:"16px"},children:(0,E.jsx)("div",{className:"pt-10 pr-20 pb-10 pl-20 d-flex justify-content-between align-items-center",children:(0,E.jsx)("div",{className:"text-size-16-18 text-color-dark-grey-dark text-weight-500",children:"Tripadvisor\u2019s holiday break will be observed from 25th December 2025 through 2nd January 2026."})})}):null]}),(0,E.jsx)(Sf,{companyId:o}),"admin"===a?(0,E.jsx)(Nf,{companyId:o}):null]}),(0,E.jsxs)(Z.Z,{lg:24,xl:12,children:["admin"===a?(0,E.jsx)(Rf,{companyId:o}):null,"admin"===a?(0,E.jsx)(Df,{companyId:o}):null,(0,E.jsx)(Lf,{companyId:o})]})]})]})})),Bf=n(4890),Vf=n(60653);var Yf=n(13132),Hf=n(2254),Wf=n(35442),Jf=n(97853),Uf=n(8352),$f=n(32064),Gf=n(53055),Kf=n(89571),Qf=n(88670),Xf=n(19365),eg=n(51171),tg=n(57008),ng=n(42414),rg=n(9513),ig=n(64074),ag=n(74363),sg=n(85755),lg=n(17166),og=n(14037),cg=n(1470),dg=n(4506),ug=n(37793),mg=n(2816),pg=n(18182),xg=n(33306),hg=n(9893);function fg(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4?arguments[4]:void 0;return{title:e,icon:t,_icon:n,key:r||e.toLowerCase(),children:i}}var gg=[fg("All Applications",Hf.r,Wf.r,"application"),fg("Post A Job",Jf.r,Uf.r,"post-job"),fg("All Jobs",$f.r,Gf.r,"all-jobs"),fg("Company Page",Kf.r,Qf.r,"company-page"),fg("Find Candidates",Xf.r,eg.r,"find-candidate"),fg("ATS Integration",tg.r,ng.r,"ats-integration")],yg=[fg("Allowances",pg.r,mg.r),fg("Leaves",lg.r,Ff.r),fg("Benefits Manager",Vf.r,Uo.r,"benefits-manager")],vg=[fg("Allowances",pg.r,mg.r),fg("Leaves",lg.r,Ff.r)],jg=[fg("Dashboard",rg.r,ig.r),fg("Employees",ag.r,$o.r),fg("Benefits",Vf.r,Yf.r,"",yg),fg("Contractors",sg.r,ac.r),fg("Reimbursements",hg.r,xg.r),fg("Invoices",og.r,Ef.r),fg("Wallet",cg.r,zp.r),fg("Settings",dg.r,ug.r)],bg=[fg("Dashboard",rg.r,ig.r),fg("Employees",ag.r,$o.r),fg("Benefits",Vf.r,Yf.r,"",vg),fg("Reimbursements",hg.r,xg.r),fg("Settings",dg.r,ug.r)],wg=[fg("Dashboard",rg.r,ig.r),fg("Employees",ag.r,$o.r),fg("Benefits",Vf.r,Yf.r,"",vg),fg("Reimbursements",hg.r,xg.r),fg("Settings",dg.r,ug.r)],kg=n(26646),Ng=(n(94592),n(27285)),_g=function(e){var t=(0,za.Z)("(max-width: 767px)"),n=e.status,i=e.amount,a=e.currency,s=e.category,l=e.first_name,o=e.last_name,c=e.description,u=e.created_at,m=e.selectAllowance,p=e.allowanceData,x=e.updateShowDetail
1s,h=e.page,f=e.updated_at,g=(0,r.useState)(null),y=g[0],v=g[1];(0,r.useEffect)((function(){if(n)if("allowance"===h&&"disbursed"===n){var e=Ng.I.find((function(e){return"approved"===e.key}));v(e)}else{var t=Ng.I.find((function(e){return e.key===n}));v(t)}}),[n,h]);var j=function(e){var t,n=(null===(t=Ng.W[e])||void 0===t?void 0:t.icon)||{};return(0,E.jsx)("div",{className:"border-radius-50 d-flex justify-content-center align-items-center",style:{height:"48px",width:"48px",backgroundColor:n.backgroundColor,border:n.border},children:(0,E.jsx)(d.Z,{component:n.component,style:{fontSize:n.size}})})};return t?(0,E.jsx)(Cg,{category:s,first_name:l,last_name:o,currency:a,amount:i,description:c,currentStatus:y,created_at:u,allowanceData:p,selectAllowance:m,updateShowDetails:x,getIcon:j,updated_at:f}):(0,E.jsx)(Zg,{category:s,first_name:l,last_name:o,currency:a,amount:i,description:c,currentStatus:y,created_at:u,allowanceData:p,selectAllowance:m,updateShowDetails:x,getIcon:j,updated_at:f})},Zg=function(e){var t=e.category,n=e.first_name,r=e.last_name,i=e.currency,a=e.amount,s=e.description,l=e.currentStatus,o=(e.created_at,e.allowanceData),c=e.selectAllowance,u=e.updateShowDetail
1s,m=e.getIcon,p=e.updated_at;return(0,E.jsx)("div",{className:"dashboard-card p-20 round-8 border-1 border-color-grey mb-8",style:{boxShadow:"0 1px 2px 0 #D5DAEC"},children:(0,E.jsxs)(_.Z,{className:"d-flex align-items-center",align:"middle",justify:"space-between",children:[(0,E.jsx)(Z.Z,{xs:8,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[m(t),(0,E.jsxs)("span",{className:"text-size-18 text-weight-500 line-height-24 text-color-dark-grey-dark ml-16",children:[n," ",r]})]})}),(0,E.jsx)(Z.Z,{xs:10,children:(0,E.jsxs)("div",{className:"d-flex flex-column",children:[(0,E.jsxs)("span",{className:"text-size-16 text-weight-500 line-height-20 text-color-dark-grey-dark ",children:[i," ",a]}),(0,E.jsx)("span",{className:"text-size-16 line-height-20 text-color-dark-grey-light ",children:s})]})}),(0,E.jsx)(Z.Z,{xs:6,children:(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex flex-column",children:[l&&(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{component:l.component,className:"icon-size-24 mr-12 ".concat(l.iconColor)}),(0,E.jsx)("span",{className:"text-size-14 text-weight-500 line-height-20 ".concat(l.labelColor),children:l.label})]}),(0,E.jsx)("span",{className:"ml-36 text-size-14 line-height-20 text-color-dark-grey-light",children:is()(p).utc().format("MMM DD, YYYY")})]}),(0,E.jsx)(j.Z,{className:"ml-12 text-color-blue btn-size-l pl-20 pr-20 text-weight-500 line-height-20 details-button",onClick:function(){c(o),u(!0)},children:"Details"})]})})]})})},Cg=function(e){var t=e.category,n=e.first_name,r=e.last_name,i=e.currency,a=e.amount,s=(e.description,e.currentStatus),l=(e.created_at,e.allowanceData),o=e.selectAllowance,c=e.updateShowDetail
1s,u=e.getIcon;return(0,E.jsx)("div",{className:"dashboard-card p-20 round-8 border-1 border-color-grey mb-8",style:{boxShadow:"0 1px 2px 0 #D5DAEC"},children:(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[u(t),(0,E.jsxs)("div",{className:"ml-16",children:[(0,E.jsxs)("span",{className:"text-size-16 text-weight-500 line-height-24 text-color-dark-grey-dark ",children:[n," ",r]}),(0,E.jsx)("div",{className:"d-flex flex-column ",children:(0,E.jsxs)("span",{className:"text-size-14 text-weight-500 line-height-20 text-color-dark-grey-light ",children:[i," ",a]})})]})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsx)("div",{className:"d-flex flex-column",children:s&&(0,E.jsx)("div",{className:"d-flex align-items-center",children:(0,E.jsx)(d.Z,{component:s.component,className:"icon-size-24 mr-12 ".concat(s.iconColor)})})}),(0,E.jsx)(j.Z,{className:"text-color-dark-grey-dark btn-size-l pl-8 pr-8 text-weight-500 line-height-20 details-button",onClick:function(){o(l),c(!0)},children:(0,E.jsx)(d.Z,{component:It.r,className:"icon-size-24"})})]})]})})},Og=n(32816),Sg=n(66462),zg=n(8559),Eg=n(95911);function Pg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pg(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Fg=ja.Z.TabPane,Lg=function(){return(0,E.jsx)("div",{className:"dashboard-card pl-20 pr-20 pt-16",children:(0,E.jsx)(su.Z,{active:!0,title:!1,paragraph:{rows:2}})})},Ag=function(e){var t,n,s=(0,za.Z)("(max-width: 767px)"),l=(0,i.I0)(),o=(0,i.v9)((function(e){var t;return null===(t=e.employ.allowanceDetails)||void 0===t?void 0:t.benefits_doc_url})),c=(0,i.v9)((function(e){var t;return(null===(t=e.employ.allowanceDetails)||void 0===t?void 0:t.allowance_claims)||[]})),d=(0,i.v9)((function(e){var t;return(null===(t=e.employ.allowanceDetails)||void 0===t?void 0:t.allowance_plan_available)||!1})),u=(0,i.v9)((function(e){var t;return(null===(t=e.employ.allowanceDetails)||void 0===t?void 0:t.stats)||[]})),m=(0,i.v9)((function(e){return e.employ.allowanceLogsLoading})),p=((0,i.v9)((function(e){return e.employ.allowanceLogsFailed})),(0,i.v9)((function(e){return e.auth.auth.login_meta}))),x=(0,i.v9)((function(e){return e.auth.auth.legal_entity})),h=(0,i.v9)((function(e){return e.auth.companyAccessRole})),f=(0,r.useState)(!1),v=f[0],j=f[1],b=(0,r.useState)([]),k=b[0],N=b[1],_=(0,r.useState)([]),Z=_[0],C=_[1],O=(0,r.useState)([]),S=O[0],z=O[1],P=(0,r.useState)([]),D=(P[0],P[1]),F=(0,r.useState)(!1),L=F[0],A=F[1],I=(0,r.useState)(!1),M=I[0],R=I[1],T=(0,r.useState)([]),q=T[0],B=T[1],V=(0,a.useRouter)(),Y=V.query.token,H=function(){l((0,w.K_T)({onFail:function(e){g.Z.error(e)}}))};(0,r.useEffect)((function(){return H(),function(){l((0,w.kHl)([]))}}),[h]),(0,r.useEffect)((function(){var e=[],t=[],n=[],r=[];null===c||void 0===c||c.forEach((function(i){"approved"===i.status||"disbursed"===i.status?t.push(i):"declined"===i.status?n.push(i):"withdrawn"===i.status?r.push(i):e.push(i)})),N(e),C(t),z(n),D(r)}),[c]),(0,r.useEffect)((function(){var e=[];null===u||void 0===u||u.forEach((function(t){e.push(t)})),B(e)}),[u]);var W=function(e){l((0,w.dAJ)(e))};return(0,r.useEffect)((function(){Y&&l((0,w.ZKi)({key:"token",data:Y},{onSuccess:function(e){W(e),j(!0)}}))}),[Y]),(0,E.jsx)("div",{className:"container-960",style:{margin:"0"},children:(0,E.jsxs)("div",{className:"page-wrapper employee-allowance",style:{overflow:"visible"},children:[(0,E.jsx)(Fa.Z,{title:"Allowances",style:{padding:"0 ".concat(s?"18px":"1.25rem")}}),(0,E.jsx)("div",{className:"text-size-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat(s?"18px":"1.25rem")},children:" Allowances"}),d||m?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{style:{padding:"0 ".concat(s?"0":"1.25rem")},children:(0,E.jsx)(zg.Z,{statsToShow:q,monthlyStats:u,defaultCurrency:null===x||void 0===x?void 0:x.currency,isMobile:s})}),o&&(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mt-20",children:[(0,E.jsx)("div",{className:"text-size-20 text-weight-500",children:"Claims"}),(0,E.jsx)(Eg.Z,{clusteringCompanyId:(null===p||void 0===p||null===(n=p.company)||void 0===n?void 0:n.company_id)||"",benefitsDocUrl:o})]}),(0,E.jsx)("div",{style:{padding:"0 ".concat(s?"18px":"20px")},children:(0,E.jsxs)(ja.Z,{className:"tabs-blue custom-tabs-with-arrow",animated:!1,defaultActiveFirstOption:!0,children:[(0,E.jsxs)(Fg,{tab:"".concat(s?"Requests":"Requested (".concat(k.length,")")),children:[null===k||void 0===k?void 0:k.map((function(e){return(0,E.jsx)(_g,Dg(Dg({},e),{}
1,{updateShowDetails:j,selectAllowance:W,allowanceData:e,page:"allowance"}),e.uuid)})),!m&&0===(null===k||void 0===k?void 0:k.length)&&(0,E.jsx)(Wa.Z,{}),m&&(0,E.jsx)(Lg,{})]},"requested"),(0,E.jsxs)(Fg,{tab:s?"Approved":"Approved (".concat(Z.length,")"),children:[null===Z||void 0===Z?void 0:Z.map((function(e){return(0,E.jsx)(_g,Dg(Dg({},e),{},{updateShowDetails:j,selectAllowance:W,allowanceData:e,page:"allowance"}),e.uuid)})),!m&&0===(null===Z||void 0===Z?void 0:Z.length)&&(0,E.jsx)(Wa.Z,{}),m&&(0,E.jsx)(Lg,{})]},"approved"),(0,E.jsxs)(Fg,{tab:s?"Rejected":"Rejected (".concat(S.length,")"),children:[null===S||void 0===S?void 0:S.map((function(e){return(0,E.jsx)(_g,Dg(Dg({},e),{},{updateShowDetails:j,selectAllowance:W,allowanceData:e,page:"allowance"}),e.uuid)})),!m&&0===(null===S||void 0===S?void 0:S.length)&&(0,E.jsx)(Wa.Z,{}),m&&(0,E.jsx)(Lg,{})]},"rejected")]})}),(0,E.jsx)(y.Z,{className:"leaves-details-modal full-screen-mobile-modal",visible:v,centered:!0,okType:"primary",destroyOnClose:!0,width:600,onCancel:function(){j(!1)},cancelButtonProps:{className:"btn-size-xl cancel",style:{display:"none"}},okButtonProps:{className:"btn-size-xl ok",style:{display:"none"}},footer:null,closeIcon:void 0,children:(0,E.jsx)(Og.Z,{showDetail
1s:v,updateShowDetails:j,closeDetailsModal:function(){j(!1),W({}),Y&&V.push({pathname:"/company-portal/hire/allowances"})},selectAllowance:W,updateShowSuccessModal:A,updateIsSuccessConfirmTypeApprove:R,page:"allowance"})}),(0,E.jsx)(Sg.Z,{showConfirmModal:L,isSuccessConfirmTypeApprove:M,handleSuccessModalCTAClicked:function(){A(!1),H()}})]}):(0,E.jsxs)(E.Fragment,{children:[o&&(0,E.jsx)("div",{className:"d-flex justify-content-end",children:(0,E.jsx)(Eg.Z,{clusteringCompanyId:(null===p||void 0===p||null===(t=p.company)||void 0===t?void 0:t.company_id)||"",benefitsDocUrl:o})}),(0,E.jsxs)("div",{children:["Do let us know if you'd like to offer Benefits to your employees - Please contact"," ",(0,E.jsx)("a",{href:"mailto:[email protected]",className:"text-color-blue",children:"[email protected]"})," ","for details."]})]})]})})},Ig=n(12947);function Mg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mg(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tg={required:!0,message:"Required"},qg=N.Z.Option,Bg=function(e){var t,n=e.companyNode,i=e.fetchCompanyByNodeId,a=e.form,s=e.legalEntity,l=e.loginMeta,o=e.auth,c=e.legalEntityDetailsRequired,u=e.billingContactRequired,m=e.companyInfoRequired,p=e.personalDetailsRequired,x=e.updateAccount,h=e.companyOnboarding,f=e.companyOnboardingLoading,y=e.loading,v=a.getFieldDecorator,b=a.getFieldValue,w=a.setFieldsValue,k=(0,r.useState)("IN"),O=k[0],z=k[1],P=(0,r.useState)(""),D=P[0],F=P[1],A=(0,r.useState)(!1),I=A[0],M=A[1],R=(0,r.useState)(!1),T=R[0],q=R[1],B=(0,r.useState)(!0),Y=B[0],H=B[1];l&&(t=l.company&&l.company.company_id),(0,r.useEffect)((function(){n&&n.logo&&F(n.logo)}),[n]),(0,r.useEffect)((function(){s&&s.tax_residence_country_code&&z(s.tax_residence_country_code),s&&s.billing_contact&&H(!1)}),[s]),(0,r.useEffect)((function(){l&&l.company&&l.company.company_id&&i({companyId:l.company.company_id})}),[l]);var W=vh.filter((function(e){return e.countries&&O?e.countries.includes(O.iso2)&&"entity"===e.type:"entity"===e.type})).map((function(e){return(0,E.jsx)(qg,{value:e.value,filterValue:e.label,children:(0,E.jsx)("div",{children:e.label})},e.value)})),J=function(){var e=(0,tr.Z)(Qn().mark((function e(n){var r,i,a;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.fileBlob,e.prev=1,q(!0),i="".concat(t,"/").concat(is()().unix(),"-photo.png"),e.next=6,fetch("".concat((0,V.dN)(),"/aws/s3/get-signed-url"),{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_url:i,content_type:"image/png"})}).then((function(e){return e.text()}));case 6:return a=e.sent,e.next=9,fetch(a,{method:"PUT",redirect:"follow",headers:{"Content-Type":"image/png"},body:r});case 9:e.sent.ok&&(q(!1),F("".concat(to.ftpBaseUrl,"/").concat(i))),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),q(!1),g.Z.error("Some error occured while uploading documents");case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(t){return e.apply(this,arguments)}}();return(0,E.jsx)("div",{style:{maxWidth:"600px"},children:(0,E.jsxs)(hs.Z,{className:"custom-form",onSubmit:function(e){e.preventDefault(),a.validateFieldsAndScroll((function(e,n){if(c||u||m){if(D||g.Z.error("Please upload company logo"),!e&&D){var r={
1name:n.entity_name,registered_address:{street:n.street,city:n.city,state:n.state,zip_code:n.zip_code},type:n.type,tax_residence_country_code:n.tax_residence_country_code,currency:n.currency,employer_identification_number:n.employer_identification_number,billing_contact_info:{name:n.billing_contact_name,email:n.billing_contact_email,country_code:n.billing_contact_country_code,phone_number:n.billing_contact_phone_number},clustering_company_id:t};n.vat_id&&(r.vat_id=n.vat_id),n.registration_number&&(r.registration_number=n.registration_number),r.billing_contact_info=Y?{name:"".concat(o.first_name," ").concat(o.last_name),email:n.email,country_code:n.country_code,phone_number:n.phone_number}:{name:n.billing_contact_name,email:n.billing_contact_email,country_code:n.billing_contact_country_code,phone_number:n.billing_contact_phone_number};var i={name:n.name,company_id:t,logo:D},a={email:n.email,country_code:n.country_code,phone_number:n.phone_number};h({legal_entity:Rg({},r),company:Rg({},i),profile:Rg({},a)},{onSuccess:function(){},onFail:function(e){return g.Z.error(e)}})}}else{var s={email:n.email,country_code:n.country_code,phone_number:n.phone_number};x(s,{onSuccess:function(){},onFail:function(e){return g.Z.error(e)}})}}))},children:[c?(0,E.jsx)("div",{className:"d-flex align-items-center text-color-dark-grey-dark mb-4",children:(0,E.jsx)("div",{className:"text-size-20 text-weight-500",children:"Company Details"})}):null,c||m?(0,E.jsx)("div",{className:"dashboard-card mb-8",style:{padding:"30px"},children:(0,E.jsxs)(_.Z,{gutter:[16,24],children:[(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Legal Name of Company",children:v("entity_name",{initialValue:s?s.name:null,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light text-italics",children:"Example: Kaamwork Technologies, Inc."})]}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Company Display Name",children:v("name",{initialValue:n&&n.name,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light text-italics",children:"Example: Kaamwork"})]}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(kg.Z,{size:60,photo:D,type:"company",allowEdit:!1}),I?(0,E.jsx)(jx.Z,{visible:I,photo:D,afterUpload:J,onComplete:function(){return M(!1)}}):null,(0,E.jsx)("div",{className:"ml-16",style:{flex:"1"},children:(0,E.jsx)(j.Z,{className:"btn-size-xl text-size-16",style:{backgroundColor:"#F4F7FB",padding:"0 20px",borderColor:"#D5DAEC"},onClick:function(){return M(!0)},block:!0,children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[T?(0,E.jsx)(d.Z,{type:"loading",className:"icon-size-20 text-color-blue mr-8"}):null,(0,E.jsx)("span",{className:"text-weight-500 custom-form-label-required",children:"Upload Company Logo"})]})})})]}),(0,E.jsx)("div",{className:"text-size-14 text-color-dark-grey-light text-italics",children:"Needed for your job posts, offer letters, and other documents"})]}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Company Legal Type",children:v("type",{initialValue:s?s.type:null,rules:[Tg]})((0,E.jsx)(N.Z,{initialValue:s?s.type:null,className:"select-size-48 select-bg-grey inner-shadow border-radius-6 border-0",dropdownClassName:"select-bg-grey-dropdown",showSearch:!0,suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r}),filterOption:!0,optionFilterProp:"filterValue",children:W}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Employer Identification Number (EIN)",children:v("employer_identification_number",{initialValue:s?s.employer_identification_number:null,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})})]})}):null,c?(0,E.jsx)("div",{className:"dashboard-card mb-8",style:{padding:"30px"},children:(0,E.jsxs)(_.Z,{gutter:[16,24],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Country of Incorporation",children:v("tax_residence_country_code",{initialValue:s?s.tax_residence_country_code:"IN",rules:[Tg]})((0,E.jsx)(_h.Z,{className:"select-size-48 select-bg-grey inner-shadow border-radius-6",dropdownClassName:"select-bg-grey-dropdown",initialValue:s?s.tax_residence_country_code:"IN",handleChange:function(e){z(e),w({tax_residence_country_code:e.iso2}),w({currency:e.currency})},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r})}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Street",children:v("street",{initialValue:s&&s.registered_address?s.registered_address.street:null,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"City",children:v("city",{initialValue:s&&s.registered_address?s.registered_address.city:null,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"State",children:v("state",{initialValue:s&&s.registered_address?s.registered_address.state:null,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"ZIP Code",children:v("zip_code",{initialValue:s&&s.registered_address?s.registered_address.zip_code:null,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})})]})}):null,c?(0,E.jsx)("div",{className:"dashboard-card",style:{padding:"30px",marginBottom:"40px"},children:(0,E.jsx)(_.Z,{gutter:[16,24],children:(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)(hs.Z.Item,{label:"Default Currency",children:v("currency",{initialValue:s?s.currency:"USD",rules:[Tg]})((0,E.jsx)(ao.Z,{initialValue:s?s.currency:"USD",handleCurrencyChange:function(e){w({currency:e})}}))}),(0,E.jsx)("div",{className:"text-size-14 text-italics",children:"We will use this currency to display all the invoices and payments."})]})})}):null,p?(0,E.jsx)("div",{className:"d-flex align-items-center text-color-dark-grey-dark mb-4",children:(0,E.jsx)("div",{className:"text-size-20 text-weight-500",children:"Contact Details"})}):null,p?(0,E.jsx)("div",{className:"dashboard-card mb-8",style:{padding:"30px"},children:(0,E.jsxs)(_.Z,{gutter:[16,24],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Email",children:v("email",{initialValue:o&&o.email,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6",disabled:!0}))})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)("label",{className:"custom-form-label-required text-size-16 text-lineHeight text-weight-500 text-color-dark-grey-dark mb-4",children:"Phone"}),(0,E.jsxs)(_.Z,{gutter:12,children:[(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{children:v("country_code",{initialValue:o?o.country_code:null,rules:[Tg]})((0,E.jsx)(bx.Z,{className:"select-size-48 select-bg-grey inner-shadow border-radius-6",dropdownClassName:"select-bg-grey-dropdown",initialValue:o?o.country_code:null,handleChange:function(e){return w({country_code:e})},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r})}))})}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{children:v("phone_number",{initialValue:o&&o.phone_number,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})})]})]})]})}):null,c?(0,E.jsx)("div",{className:"dashboard-card mb-8",style:{padding:"30px"},children:(0,E.jsxs)(_.Z,{gutter:[16,24],children:[(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)("div",{className:"d-flex",children:(0,E.jsx)(S.Z,{className:"checkbox-size-20",defaultChecked:!s||!s.billing_contact,onChange:function(e){return H(e.target.checked)},children:(0,E.jsx)("span",{className:"text-size-16 text-color-dark-grey-dark text-weight-500 ml-12",children:"Billing Contact is same as Contact Details"})})}),(0,E.jsx)("div",{className:"ml-40",children:Y?(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsxs)("span",{className:"text-size-16 text-color-dark-grey-dark mr-8",children:[o.first_name," ",o.last_name]}),(0,E.jsxs)("span",{className:"text-size-14 text-color-dark-grey-light",children:["(",(0,E.jsxs)("ul",{className:"list-type-horizontal-bullet",children:[(0,E.jsx)("li",{className:"text-lineHeight",children:b("email")}),b("country_code")||b("phone_number")?(0,E.jsxs)("li",{className:"text-lineHeight",children:[b("country_code")," ",b("phone_number")]}):null]}),")"]})]}):null})]}),Y?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Name",children:v("billing_contact_name",{initialValue:s&&s.billing_contact?s.billing_contact.name:null,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)(hs.Z.Item,{label:"Email",children:v("billing_contact_email",{initialValue:s&&s.billing_contact?s.billing_contact.email:null,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})}),(0,E.jsxs)(Z.Z,{xs:24,children:[(0,E.jsx)("label",{className:"custom-form-label-required text-size-16 text-lineHeight text-weight-500 text-color-dark-grey-dark mb-4",children:"Phone"}),(0,E.jsxs)(_.Z,{gutter:12,children:[(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{children:v("billing_contact_country_code",{initialValue:s&&s.billing_contact?s.billing_contact.country_code:null,rules:[Y?Tg:{}]})((0,E.jsx)(bx.Z,{className:"select-size-48 select-bg-grey inner-shadow border-radius-6",dropdownClassName:"select-bg-grey-dropdown",initialValue:s&&s.billing_contact?s.billing_contact.country_code:null,handleChange:function(e){return w({billing_contact_country_code:e})},suffixIcon:(0,E.jsx)(d.Z,{className:"icon-size-18 pt-4 text-color-dark-grey-dark",component:L.r})}))})}),(0,E.jsx)(Z.Z,{xs:12,children:(0,E.jsx)(hs.Z.Item,{children:v("billing_contact_phone_number",{initialValue:s&&s.billing_contact?s.billing_contact.phone_number:null,rules:[Tg]})((0,E.jsx)(C.Z,{className:"input-size-48 input-bg-grey inner-shadow border-radius-6"}))})})]})]})]})]})}):null,c||m||p?(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:"d-flex align-items-center text-color-dark-grey mb-40",children:[(0,E.jsx)(d.Z,{component:Ig.r,className:"icon-size-16 mr-4"}),(0,E.jsx)("span",{className:"text-size-14",children:"We use industry standards to keep your data secure"})]}),(0,E.jsx)(hs.Z.Item,{children:(0,E.jsx)(j.Z,{htmlType:"submit",className:"btn-size-xl mb-8 mt-12 text-weight-500 border-radius-6",type:"primary",block:!0,disabled:y||f,children:"Save Details"})})]}):(0,E.jsx)("div",{children:(0,E.jsx)(hs.Z.Item,{children:(0,E.jsx)(j.Z,{type:"primary",block:!0,disabled:!0,loading:!0,className:"btn-size-xl mb-8 mt-12 text-weight-500 border-radius-6",children:"Opening your dashboard"})})})]})})};Bg.defaultProps={companyNode:null,legalEntity:null,loginMeta:null,legalEntityDetailsRequired:!1,companyInfoRequired:!1,billingContactRequired:!1,personalDetailsRequired:!1};var Vg=hs.Z.create({name:"CompanyOnbording"})(Bg),Yg=(0,i.$j)((function(e){return{companyNode:e.landing.companyNode,legalEntity:e.auth.auth.legal_entity,loginMeta:e.auth.auth.login_meta,auth:e.auth.auth,loading:e.auth.loading,legalEntityDetailsRequired:e.auth.auth.legal_entity_details_required,billingContactRequired:e.auth.auth.billing_contact_required,
1companyInfoRequired:e.auth.auth.company_info_required,personalDetailsRequired:e.auth.auth.personal_details_required,companyOnboardingLoading:e.company.companyOnboardingLoading}}),(function(e){return{fetchCompanyByNodeId:function(t){return e(w.fqn(t))},updateAccount:function(t,n){return e(w.sGo(t,n))},companyOnboarding:function(t,n){return e(w.qMx(t,n))}}}))(Vg);o.Z.Header,o.Z.Content;function Hg(e){var t,n=e.isAuthenticated,i=e.emailConfirmed,s=e.legalEntityDetailsRequired,l=e.billingContactRequired,o=e.companyInfoRequired,c=e.personalDetailsRequired,d=e.loginMeta,u=e.firstName,m=e.getAccountDetails,p=(0,a.useRouter)(),x=(0,r.useState)("");x[0],x[1];return(0,r.useEffect)((function(){m()}),[]),d&&(t=d.company&&d.company.company_id),(0,r.useEffect)((function(){!i||s||o||c||l||p.push("/company-portal/dashboard")}),[i,s,l,o,c]),(0,r.useEffect)((function(){n?t||window.location.replace(to.newWebsiteUrl):p.push("/login?redirectTo={".concat(encodeURIComponent("/company-portal/onboarding"),"}"))}),[n]),n?(0,E.jsxs)("div",{className:"page-wrapper company-onboarding",style:{maxWidth:"940px"},children:[(0,E.jsx)(Fa.Z,{title:"Hello ".concat(u,"!")}),(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-16",children:[(0,E.jsxs)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark page-title",children:["Hello ",u,"!"]}),(0,E.jsx)("div",{className:"text-color-dark-grey-light text-size-14-16",children:s||l||o?"Please enter your company and contact details to continue to go to Dashboard.":"Please enter your contact details to continue to go to Dashboard."})]}),(0,E.jsx)("div",{className:"container-960 pt-20 pb-24",children:(0,E.jsx)(Yg,{})})]}):null}Hg.defaultProps={emailConfirmed:!1,legalEntityDetailsRequired:!1,companyInfoRequired:!1,billingContactRequired:!1,personalDetailsRequired:!1,isAuthenticated:!1,loginMeta:null};var Wg=(0,i.$j)((function(e){return{isAuthenticated:e.auth.isAuthenticated,loginMeta:e.auth.auth.login_meta,emailConfirmed:e.auth.auth.email_confirmed,legalEntityDetailsRequired:e.auth.auth.legal_entity_details_required,billingContactRequired:e.auth.auth.billing_contact_required,companyInfoRequired:e.auth.auth.company_info_required,personalDetailsRequired:e.auth.auth.personal_details_required,firstName:e.auth.auth.first_name}}),(function(e){return{getAccountDetails:function(t){return e(w.jgj(t))}}}))(Hg);function Jg(){return Jg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jg.apply(this,arguments)}function Ug(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var $g=r.createElement("title",null,"Icon/Leave/Earned/Inactive"),Gg=r.createElement("g",{id:"Icon/Leave/Earned/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M21,8.1533 C21,6.9648 20.0352,6 18.8467,6 L5.1533,6 C3.9648,6 3,6.9648 3,8.1533 L3,17.8467 C3,19.0352 3.9648,20 5.1533,20 L18.8467,20 C20.0352,20 21,19.0352 21,17.8467 L21,8.1533 Z",id:"Stroke-1",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("line",{x1:3,y1:10,x2:21,y2:10,id:"Stroke-2",stroke:"#7C7F88",strokeWidth:2}),r.createElement("line",{x1:10,y1:13,x2:14,y2:17,id:"Stroke-2-Copy",stroke:"#3A3E4C",strokeWidth:2}),r.createElement("line",{x1:10,y1:13,x2:14,y2:17,id:"Stroke-2-Copy-2",stroke:"#3A3E4C",strokeWidth:2,transform:"translate(12.000000, 15.000000) scale(-1, 1) translate(-12.000000, -15.000000) "}),r.createElement("line",{x1:7,y1:4,x2:7,y2:7,id:"Stroke-4",stroke:"#7C7F88",strokeWidth:2}),r.createElement("line",{x1:17,y1:4,x2:17,y2:7,id:"Stroke-3",stroke:"#7C7F88",strokeWidth:2})),Kg=function(e){var t=e.svgRef,n=e.title,i=Ug(e,["svgRef","title"]);return r.createElement("svg",Jg({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?$g:n?r.createElement("title",null,n):null,Gg)},Qg=r.forwardRef((function(e,t){return r.createElement(Kg,Jg({svgRef:t},e))}));function Xg(){return Xg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xg.apply(this,arguments)}function ey(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ty=r.createElement("title",null,"Icon/Leave/Maternity/Inactive"),ny=r.createElement("g",{id:"Icon/Leave/Maternity/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M22,20 C20,18 16,17 12,17 C8,17 4,18 2,20",id:"Oval",stroke:"#3A3E4C",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(12.000000, 18.500000) scale(1, -1) translate(-12.000000, -18.500000) "}),r.createElement("rect",{id:"Rectangle",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round",x:4,y:7,width:16,height:8,rx:1}),r.createElement("line",{x1:16,y1:8,x2:16,y2:14,id:"Stroke-6",stroke:"#7C7F88",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("line",{x1:12,y1:8,x2:12,y2:14,id:"Stroke-6-Copy",stroke:"#7C7F88",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("line",{x1:8,y1:8,x2:8,y2:14,id:"Stroke-6-Copy-2",stroke:"#7C7F88",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("line",{x1:4,y1:4,x2:4,y2:18,id:"Stroke-6-Copy-3",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("line",{x1:20,y1:4,x2:20,y2:18,id:"Stroke-6-Copy-4",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round"})),ry=function(e){var t=e.svgRef,n=e.title,i=ey(e,["svgRef","title"]);return r.createElement("svg",Xg({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?ty:n?r.createElement("title",null,n):null,ny)},iy=r.forwardRef((function(e,t){return r.createElement(ry,Xg({svgRef:t},e))}));function ay(){return ay=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ay.apply(this,arguments)}function sy(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ly=r.createElement("title",null,"Icon/Travel/Inactive"),oy=r.createElement("g",{id:"Icon/Travel/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:3,y1:21,x2:21,y2:21,id:"Stroke-2",stroke:"#7C7F88",strokeWidth:2}),r.createElement("line",{x1:3,y1:13,x2:4,y2:17,id:"Stroke-2-Copy",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("path",{d:"M9,3 L15.445,11.287 L19.5379556,9.6020183 C20.2916511,9.29167306 21.1542267,9.65107953 21.4645719,10.4047751 C21.4774707,10.4361007 21.4892871,10.4678612 21.5,10.5 C21.762458,11.287374 21.3369295,12.1384309 20.5495556,12.4008889 C20.5254112,12.408937 20.5010663,12.4163705 20.4765444,12.4231821 L4,17 L4,16 L10.662,13.257 L6,3 L9,3 Z",id:"Combined-Shape",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}
1)),cy=function(e){var t=e.svgRef,n=e.title,i=sy(e,["svgRef","title"]);return r.createElement("svg",ay({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?ly:n?r.createElement("title",null,n):null,oy)},dy=r.forwardRef((function(e,t){return r.createElement(cy,ay({svgRef:t},e))}));function uy(){return uy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uy.apply(this,arguments)}function my(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var py=r.createElement("title",null,"Icon/Insurance/Inactive"),xy=r.createElement("g",{id:"Icon/Insurance/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M16,20 C16,21.1038 15.1038,22 14,22 C12.8962,22 12,21.1038 12,20",id:"Stroke-1",stroke:"#7C7F88",strokeWidth:2}),r.createElement("line",{x1:12,y1:12,x2:12,y2:20,id:"Stroke-2",stroke:"#7C7F88",strokeWidth:2}),r.createElement("path",{d:"M21,12 L3,12 C3,6.4808 7.0328,2 12,2 C16.9672,2 21,6.4808 21,12 Z",id:"Stroke-3",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("path",{d:"M16,12 L8,12 C8,6.4808 9.7923,2 12,2 C14.2077,2 16,6.4808 16,12 Z",id:"Stroke-4",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"})),hy=function(e){var t=e.svgRef,n=e.title,i=my(e,["svgRef","title"]);return r.createElement("svg",uy({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?py:n?r.createElement("title",null,n):null,xy)},fy=r.forwardRef((function(e,t){return r.createElement(hy,uy({svgRef:t},e))}));function gy(){return gy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gy.apply(this,arguments)}function yy(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var vy=r.createElement("title",null,"Icon/Default_Currency/Inactive"),jy=r.createElement("g",{id:"Icon/Default_Currency/Inactive",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M3,12 C3,16.9672 7.0328,21 12,21 C16.9672,21 21,16.9672 21,12 C21,7.0328 16.9672,3 12,3 C7.0328,3 3,7.0328 3,12 Z",id:"Fill-1",stroke:"#3A3E4C",strokeWidth:2,fill:"#FFFFFF"}),r.createElement("g",{id:"Group",transform:"translate(9.000000, 6.000000)",stroke:"#7C7F88",strokeWidth:2},r.createElement("path",{d:"M2,6 C0.8962,6 0,5.1038 0,4 C0,2.8962 0.8962,2 2,2",id:"Stroke-3"}),r.createElement("path",{d:"M4,6 C5.1038,6 6,6.8962 6,8 C6,9.1038 5.1038,10 4,10",id:"Stroke-4"}),r.createElement("line",{x1:2,y1:2,x2:6,y2:2,id:"Stroke-5"}),r.createElement("line",{x1:3,y1:0,x2:3,y2:2,id:"Stroke-6"}),r.createElement("line",{x1:3,y1:10,x2:3,y2:12,id:"Stroke-7"}),r.createElement("line",{x1:2,y1:6,x2:4,y2:6,id:"Stroke-8"}),r.createElement("line",{x1:0,y1:10,x2:4,y2:10,id:"Stroke-9"}))),by=function(e){var t=e.svgRef,n=e.title,i=yy(e,["svgRef","title"]);return r.createElement("svg",gy({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?vy:n?r.createElement("title",null,n):null,jy)},wy=r.forwardRef((function(e,t){return r.createElement(by,gy({svgRef:t},e))})),ky=n(2721),Ny=n(48458),_y=n(91962),Zy={paid_time_off:Qg,maternity_leaves:iy,reimbursements:dy,medical_insurance:fy,provident_fund:wy},Cy={monthly:"/ employee / month",yearly:"/ employee / year",onetime:"/ request"},Oy={general:{key:"generalAllowance",title:"General Monthly Allowance",label:"General Monthly Allowance",icon:{component:ky.r,size:"24px",backgroundColor:"rgba(142, 213, 172, 0.6)",border:"none"},hasNumber:!0,graph:{borderColor:"rgb(29, 172, 89)",gradientStart:"rgba(29, 172, 89, 0.5)"},tooltip:(0,E.jsxs)("div",{className:"pt-12 pb-12 pr-16 pl-16 mt-12 background-yellow-2-light border border-width-1 border-radius-6 border-color-yellow",children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark mb-14",children:"For your employees to use across a sample bouquet such as:"}),(0,E.jsxs)("ol",{className:"text-size-14-16 text-color-dark-grey-dark pl-16 ml-8 mb-12",children:[(0,E.jsx)("li",{children:"Wellness (counselling, mental health, fitness)"}),(0,E.jsx)("li",{children:"Internet/Phone Reimbursement"}),(0,E.jsx)("li",{children:"Personal Travel (above and beyond statutory LTA)"}),(0,E.jsx)("li",{children:"Food & Beverages"}),(0,E.jsx)("li",{children:"Others (global categories)"})]}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark text-weight-500",children:"Kaamwork\u2019s suggested range USD 50-100 / employee / month"})]})},learning_and_development:{key:"learningAndDevelopment",title:"Learning & Development",label:"Learning & Development",icon:{component:Ny.r,size:"24px",backgroundColor:"#EBBAF6",border:"none"},hasNumber:!0,graph:{borderColor:"rgb(189, 28, 225)",gradientStart:"rgba(189, 28, 225, 0.5)"},tooltip:(0,E.jsxs)("div",{className:"pt-12 pb-12 pr-16 pl-16 mt-12 background-yellow-2-light border border-width-1 border-radius-6 border-color-yellow",children:[(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark mb-14",children:"Reimbursement for online courses, certifications, etc."}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark text-weight-500",children:"Kaamwork suggestion: Approve it based on request"})]})},work_from_home:{key:"workFromHome",title:"Work from Home",label:"Work from Home",icon:{component:_y.r,size:"24px",backgroundColor:"#FFC89A",border:"none"},hasNumber:!0,graph:{borderColor:"rgb(255, 158 ,79)",gradientStart:"rgba(255, 158, 79, 0.5)"},tooltip:(0,E.jsxs)("div",{className:"pt-12 pb-12 pr-16 pl-16 mt-12 background-yellow-2-light border border-width-1 border-radius-6 border-color-yellow",children:[(0,E.jsx)("div",{className:"ext-size-14-16 text-color-dark-grey-dark mb-14",children:"Exter
1nal monitors, keyboard, mouse, chair, table, etc."}),(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark text-weight-500",children:"Kaamwork suggested range: USD 500-1000 per request (one-time) per year"})]})},streaming:{key:"streamingAllowance",title:"Streaming Allowance",label:"Streaming Allowance",icon:{component:ky.r,size:"24px",backgroundColor:"rgba(142, 197, 213, 0.6)",border:"none"},hasNumber:!0,graph:{borderColor:"rgb(29, 130, 172)",gradientStart:"rgba(29, 130, 172, 0.5)"},tooltip:(0,E.jsx)("div",{className:"pt-12 pb-12 pr-16 pl-16 mt-12 background-yellow-2-light border border-width-1 border-radius-6 border-color-yellow",children:(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark mb-14",children:"For your employees to use towards streaming service subscriptions."})})},telephone:{key:"telephoneAllowance",title:"Telephone Allowance",label:"Telephone Allowance",icon:{component:ky.r,size:"24px",backgroundColor:"rgba(213, 172, 142, 0.6)",border:"none"},hasNumber:!0,graph:{borderColor:"rgb(172, 106, 29)",gradientStart:"rgba(172, 106, 29, 0.5)"},tooltip:(0,E.jsx)("div",{className:"pt-12 pb-12 pr-16 pl-16 mt-12 background-yellow-2-light border border-width-1 border-radius-6 border-color-yellow",children:(0,E.jsx)("div",{className:"text-size-14-16 text-color-dark-grey-dark mb-14",children:"For your employees to use towards phone/telephone bills."})})}},Sy=function(e){var t,n=(0,i.I0)(),a=(0,i.v9)((function(e){return e.auth.auth.login_meta.company.company_id})),s=(0,i.v9)((function(e){return e.benefitsManager.currentCountryDetailsToShow.countryCode})),l=(0,i.v9)((function(e){return e.benefitsManager.benefitsStatutoryData})),o=((0,i.v9)((function(e){return e.benefitsManager.benefitsStatutoryLoading})),(0,r.useState)(!1)),c=o[0],u=o[1];(0,r.useEffect)((function(){m()}),[]);var m=function(){var e={clustering_company_id:a,country_code:s};n((0,w.AWK)(e))},x=function(){return(0,E.jsx)("div",{className:" text-size-14-16 text-color-dark-grey-light mb-14",children:null===l||void 0===l?void 0:l.desc})},h=function(e){var t,n,r=e.dataKey,i=l[r];return(0,E.jsxs)("article",{className:"statutary-benefit-item",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center mb-4",children:[(0,E.jsx)(d.Z,{component:Zy[r],className:"text-size-24"}),(0,E.jsx)("div",{className:"text-size-16-18 text-color-dark-grey-dark text-weight-500 ml-12",children:i.title})]}),(0,E.jsxs)("div",{className:"",children:[null===i||void 0===i||null===(t=i.options)||void 0===t?void 0:t.map((function(e,t){return(0,E.jsxs)("div",{children:[(0,E.jsxs)("h3",{className:"ml-24",children:[null===e||void 0===e?void 0:e.title,": ",e.default&&(0,E.jsx)("span",{className:"pl-6 pr-6 pt-2 pb-2 border border-1 border-grey border-radius-4 text-size-14 text-color-dark-grey ml-6",children:"Default"})," "]}),(0,E.jsx)(f,{benefitList:null===e||void 0===e?void 0:e.list})]},t)})),(null===i||void 0===i||null===(n=i.list)||void 0===n?void 0:n.length)>0&&(0,E.jsx)(f,{benefitList:null===i||void 0===i?void 0:i.list})]}),"medical_insurance"===r&&(0,E.jsxs)("div",{className:"text-size-16 text-color-dark-grey-dark pl-36 ml-16",children:[(0,E.jsx)("span",{children:"Go to"}),(0,E.jsx)("a",{className:"text-weight-500 text-color-blue",href:"#benefit-insurance",children:" Medical Insurance"}),(0,E.jsx)("span",{children:" section to choose make changes."})]})]})},f=function(e){var t=e.benefitList;return 0===t.length?null:(0,E.jsx)("ol",{className:"text-size-14-16 text-color-dark-grey-light mt-12",style:{marginBottom:0,paddingLeft:"22px"},children:null===t||void 0===t?void 0:t.map((function(e){return(0,E.jsx)("li",{children:e},e)}))})};return(0,E.jsxs)("article",{className:"statutary-benefits",style:{marginBottom:"34px"},children:[(0,E.jsx)("h3",{className:"text-size-18-20 text-color-dark-grey-dark mb-8",children:"Statutory Benefits"}),(0,E.jsx)(x,{}),(0,E.jsxs)("div",{className:"text-size-14-16 text-weight-500 text-color-blue mb-8 cursor-pointer d-flex align-items-center",onClick:function(){return u(!c)},children:[(0,E.jsxs)("div",{children:[c?"Hide":"Show"," details"]}
1),(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24 text-color-blue arrow-icon-blue",style:{transition:"0.2s",transform:c?"rotate(0deg)":"rotate(-90deg)"}})]}),(0,E.jsx)("div",{children:c&&(null===l||void 0===l||null===(t=l.mapping)||void 0===t?void 0:t.map((function(e){return(0,E.jsx)(h,{dataKey:e},e)})))})]})},zy=n(79716),Ey=["work_from_home","learning_and_development","general","streaming","telephone"],Py=["general","streaming","telephone"],Dy=[(0,E.jsx)(N.Z.Option,{className:"custom-select-item",value:"monthly",children:"/ employee / month"}),(0,E.jsx)(N.Z.Option,{className:"custom-select-item",value:"yearly",children:"/ employee / year"})],Fy=[(0,E.jsx)(N.Z.Option,{className:"custom-select-item",value:"onetime",children:"/ request"}),(0,E.jsx)(N.Z.Option,{className:"custom-select-item",value:"yearly",children:"/ employee / year"})],Ly=function(e){var t=(0,i.I0)(),n=(0,i.v9)((function(e){return e.auth.auth.login_meta.company.company_id})),a=(0,i.v9)((function(e){return e.benefitsManager.currentCountryDetailsToShow.countryCode})),s=(0,i.v9)((function(e){return e.benefitsManager.benefitsAllowanceList})),l=(0,i.v9)((function(e){return e.benefitsManager.benefitsAllowanceLoading}));(0,r.useEffect)((function(){o()}),[]);var o=function(){var e={clustering_company_id:n,country_code:a};t((0,w.gTT)(e))};return(0,E.jsxs)("section",{className:"benefit-allowance mb-40",children:[(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark",children:"Allowance"}),null===Ey||void 0===Ey?void 0:Ey.map((function(e){return(0,E.jsx)(Ay,{type:e,categoryData:Oy[e],allowanceData:(t=e,(null===s||void 0===s?void 0:s.filter((function(e){return e.category===t}))[0])||[]),allowanceListLoading:l,getAllowanceList:o},e);var t}))]})},Ay=function(e){var t=e.type,n=e.categoryData,a=e.allowanceData,s=e.allowanceListLoading,l=e.getAllowanceList,o=(0,za.Z)("(max-width: 767px)"),c=(0,i.I0)(),u=(0,i.v9)((function(e){return e.auth.auth.login_meta.company.company_id})),m=(0,i.v9)((function(e){return e.benefitsManager.currentCountryDetailsToShow.countryCode})),x=(0,i.v9)((function(e){return e.auth.auth.legal_entity.currency})),h=(0,r.useState)(!1),f=h[0],g=h[1],v=(0,r.useState)(""),b=v[0],k=v[1],O=(0,r.useState)(void 0),S=O[0],z=O[1],P=(0,r.useState)(!1),D=P[0],F=P[1],L=(0,r.useState)(!1),A=L[0],I=L[1],M=(0,r.useState)(!1),R=(M[0],M[1]),T=(0,r.useState)(!1),q=T[0],B=T[1],V=(0,r.useState)(!1),Y=V[0],H=V[1],W=o?"p-12":"p-20 pb-14 pt-14 pb-15";if((0,r.useEffect)((function(){null!==a&&void 0!==a&&a.uuid&&I(!0),null!==a&&void 0!==a&&a.amount&&k(null===a||void 0===a?void 0:a.amount),null!==a&&void 0!==a&&a.frequency&&z(null===a||void 0===a?void 0:a.frequency)}),[a]),s)return(0,E.jsx)("div",{className:"".concat(W," mt-8 benefit-allowance__card active"),children:(0,E.jsx)(su.Z,{avatar:!0})});var J=function(){g(!1),k(""),z(void 0),F(!1)};return(0,E.jsxs)("div",{className:"".concat(W," mt-8 benefit-allowance__card ").concat(f?"active":""),children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[Iy(t),(0,E.jsx)("div",{className:"text-size-16-18 text-weight-500 text-color-dark-grey-dark pl-16",children:null===n||void 0===n?void 0:n.label})]}),!A&&!f&&(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-8 text-weight-500 text-size-14-16",style:{padding:"0 2rem",background:"transparent",border:"1px solid #D5DAEC",color:"#2A4CD5"},onClick:function(){g(!0)},children:"Add"}),A&&f&&(0,E.jsx)("div",{children:(0,E.jsx)("span",{className:"text-size-14-16 text-weight-500 text-color-orange cursor-pointer",onClick:function(){B(!0)},children:(0,E.jsx)(d.Z,{component:Mu.r,className:"text-size-24 "})})}),A&&!f&&(0,E.jsx)("div",{children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500 text-color-blue cursor-pointer",onClick:function(){g(!0)},children:(0,E.jsx)(d.Z,{component:da.r,className:"text-size-24"})})})]}),f&&(0,E.jsx)("div",{className:"mt-16",children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[8,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:5,children:[(0,E.jsx)("div",{className:"mb-2 text-size-14-16 text-weight-500 text-color-dark-grey-dark",children:"Amount"}),(0,E.jsx)(C.Z,{className:"text-weight-500 entry_field",size:"large",placeholder:"e.g. 100000",value:My(b)||void 0,formatter:My,parser:Ry,onChange:function(e){k(parseFloat(e.target.value.replace(/\D/g,"")))},style:{width:"100%",height:"48px"}})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:19,children:[(0,E.jsx)("div",{className:"mb-2 text-size-14-16 text-weight-500 text-color-dark-grey-dark",children:"Allocation"}),(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[8,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:13,children:(0,E.jsx)(N.Z,{size:"large",className:"w-100 custom-select-video-type text-weight-500 entry_field",placeholder:"Select pay frequency",onSelect:function(e){z(e)},style:{width:"100%",height:"48px"},dropdownClassName:"custom-select",suffixIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24"}),value:S,children:Py.includes(t)?Dy:Fy})}),(0,E.jsxs)(Z.Z,{xs:24,lg:11,children:[(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-8 text-weight-500 text-size-14-16 mr-8",style:{padding:"0 1.3rem",background:"transparent",border:"1px solid #D5DAEC",color:"#2A4CD5",height:"48px"},onClick:function(){J()},children:"Cancel"}),(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-8 text-weight-500 text-size-14-16",type:"primary",style:{padding:"0 1.75rem",he
1ight:"48px"},onClick:function(){H(!0)},disabled:!b,children:"Save"})]})]})})]})]})}),A&&(0,E.jsxs)("div",{className:"d-flex align-items-center mt-24",children:[(0,E.jsxs)("div",{className:"text-size-24-28 text-weight-500 line-height-38 text-color-dark-grey-dark ",children:[null===a||void 0===a?void 0:a.currency," ",My(null===a||void 0===a?void 0:a.amount)]}),(0,E.jsx)("div",{className:"text-size-14-16 line-height-20 text-color-dark-grey-light ml-8",children:Cy[a.frequency]})]}),(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between mt-16",children:[(0,E.jsx)("div",{className:"text-size-12-14 text-weight-500 cursor-pointer",onClick:function(){F(!D)},children:"What is this?"}),(0,E.jsx)("div",{className:"pl-6 pr-6 text-size-12-14 background-green text-color-white border-radius-4",children:"Recommended"})]}),(D||f)&&(null===n||void 0===n?void 0:n.tooltip),(0,E.jsxs)(y.Z,{visible:q||Y,onCancel:function(){return Y?H(!1):B(!1)},footer:null,width:600,centered:!0,children:[(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-lineHeight",children:(0,E.jsxs)("div",{className:"text-size-24 text-weight-500 mb-24",children:[Y?A?"Update":"Add":"Remove"," Allowance"]})}),(0,E.jsxs)(_.Z,{gutter:[16,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{children:["You are trying to ",Y?A?"change":"add":"remove"," ",(0,E.jsx)("b",{children:Oy[t].title})," allowance. This change will be affected to your current and future employees. Are you sure you want to continue?"]})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end ",children:[(0,E.jsx)(j.Z,{type:"default",className:"text-size-16 text-weight-500 btn-size-xl mr-16 border-radius-6 text-color-blue border-color-grey cursor-pointer",onClick:function(){return Y?H(!1):B(!1)},children:"Cancel"}),(0,E.jsx)(j.Z,{type:"primary",className:"text-size-16 text-weight-500 btn-size-xl border-radius-6 cursor-pointer",onClick:function(){Y?function(){var e={category:t,frequency:S,currency:x,clustering_company_id:u,amount:b,country_code:m};R(!0),null!==a&&void 0!==a&&a.uuid?(e.uuid=null===a||void 0===a?void 0:a.uuid,c((0,zy.rA)(e,{onSuccess:function(){R(!1),J(),l(),H(!1)}}))):c((0,w.ILv)(e,{onSuccess:function(){R(!1),J(),l(),H(!1)}}))}():(R(!0),c((0,w.kzH)(null===a||void 0===a?void 0:a.uuid,{onSuccess:function(){R(!1),J(),l(),I(!1),B(!1)}})))}
1,children:Y?A?"Update":"Add":"Remove"})]})})]})]})]})},Iy=function(e){var t=Oy[e].icon;return(0,E.jsx)("div",{className:"border-radius-50 d-flex justify-content-center align-items-center",style:{height:"48px",width:"48px",backgroundColor:t.backgroundColor,border:t.border},children:(0,E.jsx)(d.Z,{component:t.component,style:{fontSize:t.size}})})},My=function(e){return e?"".concat(e).replace(/\B(?=(\d{3})+(?!\d))/g,","):""},Ry=function(e){return e.replace(/\$\s?|(,*)/g,"")},Ty=function(e){(0,za.Z)("(max-width: 767px)");var t,n=(0,i.I0)(),a=(0,i.v9)((function(e){return e.auth.auth.login_meta.company.company_id})),s=(0,i.v9)((function(e){return e.benefitsManager.currentCountryDetailsToShow.countryCode})),l=(0,i.v9)((function(e){return e.benefitsManager.benefitsReferralBonusList})),o=(0,i.v9)((function(e){return e.benefitsManager.benefitsReferralBonusLoading})),c=(0,r.useState)([]),d=c[0],u=c[1];(0,r.useEffect)((function(){m()}),[]),(0,r.useEffect)((function(){u(l),0===l.length&&p()}),[l]);var m=function(){var e={clustering_company_id:a,country_code:s};n((0,w.R9p)(e))},p=function(){var e=[].concat((0,f.Z)(l),[{}]);u(e)};return(0,E.jsxs)("section",{className:"benefit-referral-bonus mb-40",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark",children:"Referal Bonus"}),(0,E.jsx)("div",{className:"pl-6 pr-6 text-size-12-14 background-green text-color-white border-radius-4",children:"Recommended"})]}),null===d||void 0===d?void 0:d.map((function(e,t){return(0,E.jsx)(qy,{cardCount:t+1,type:e.category||"referral_bonus",bonusData:e,benefitsReferralBonusLoading:o,getReferralBonusList:m},e.uuid||(0,Y.k$)())})),void 0!==(null===d||void 0===d||null===(t=d.at(-1))||void 0===t?void 0:t.uuid)&&(0,E.jsx)("div",{children:(0,E.jsx)("span",{className:"text-size-16 text-weight-500 text-color-blue mt-8 cursor-pointer",onClick:p,children:"Add Another Band"})})]})},qy=function(e){var t=e.type,n=e.cardCount,a=e.bonusData,s=e.benefitsReferralBonusLoading,l=e.getReferralBonusList,o=(0,za.Z)("(max-width: 767px)"),c=(0,i.I0)(),u=(0,i.v9)((function(e){return e.auth.auth.login_meta.company.company_id})),m=((0,i.v9)((function(e){return e.benefitsManager.currentCountryDetailsToShow.countryCode})),(0,i.v9)((function(e){return e.auth.auth.legal_entity.currency}))),p=(0,r.useState)(!1),x=p[0],h=p[1],f=(0,r.useState)(""),g=f[0],v=f[1],b=(0,r.useState)(""),k=b[0],N=b[1],O=(0,r.useState)(!1),S=O[0],z=O[1],P=(0,r.useState)(!1),D=(P[0],P[1]),F=(0,r.useState)(!1),L=F[0],A=F[1],I=o?"p-12":"p-20 pb-14 pt-14 pb-15";if((0,r.useEffect)((function(){null!==a&&void 0!==a&&a.uuid&&z(!0),null!==a&&void 0!==a&&a.amount&&v(null===a||void 0===a?void 0:a.amount)}),[a]),s)return(0,E.jsx)("div",{className:"".concat(I," mt-8 benefit-referral-bonus__card active"),children:(0,E.jsx)(su.Z,{avatar:!0})});var M=function(){h(!1),v("")};return(0,E.jsxs)("div",{className:"".concat(I," mt-8 benefit-referral-bonus__card ").concat(x?"active":""),children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[By(t),(0,E.jsxs)("div",{className:"text-size-16-18 text-weight-500 text-color-dark-grey-dark pl-16",children:[" Band ",n]})]}),!S&&!x&&(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-8 text-weight-500 text-size-14-16",style:{padding:"0 2rem",background:"transparent",border:"1px solid #D5DAEC",color:"#2A4CD5"},onClick:function(){h(!0)},children:"Add"}),S&&x&&(0,E.jsx)("div",{children:(0,E.jsx)("span",{className:"text-size-14-16 text-weight-500 text-color-orange cursor-pointer",onClick:function(){A(!0)},children:(0,E.jsx)(d.Z,{component:Mu.r,style:{fontSize:"24px"}})})}),S&&!x&&(0,E.jsx)("div",{children:(0,E.jsx)("span",{className:"text-size-14-16 text-weight-500 text-color-blue cursor-pointer",onClick:function(){h(!0)},children:(0,E.jsx)(d.Z,{component:da.r,className:"text-size-24"})})})]}),x&&(0,E.jsx)("div",{className:"mt-16",children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[8,20],children:[(0,E.jsxs)(Z.Z,{xs:24,lg:5,children:[(0,E.jsx)("div",{className:"mb-2 text-size-14-16 text-weight-500 text-color-dark-grey-dark",children:"Amount"}),(0,E.jsx)(C.Z,{className:"text-weight-500 entry_field",size:"large",placeholder:"e.g. 100000",value:Vy(g)||void 0,formatter:Vy,parser:Yy,onChange:function(e){v(parseFloat(e.target.value.replace(/\D/g,"")))},style:{width:"100%",height:"48px"}})]}),(0,E.jsxs)(Z.Z,{xs:24,lg:19,children:[(0,E.jsx)("div",{className:"mb-2 text-size-14-16 text-weight-500 text-color-dark-grey-dark",children:"Job role / experience"}),(0,E.jsx)("div",{children:(0,E.jsxs)(_.Z,{type:"flex",gutter:[8,20],children:[(0,E.jsx)(Z.Z,{xs:24,lg:13,children:(0,E.jsx)(C.Z,{className:"text-weight-500 entry_field",size:"large",placeholder:"e.g. 3+ yrs of experience",value:k,onChange:function(e){N(e.target.value)},style:{width:"100%",height:"48px"}})}),(0,E.jsxs)(Z.Z,{xs:24,lg:11,children:[(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-8 text-weight-500 text-size-14-16 mr-8",style:{padding:"0 1.3rem",background:"transparent",border:"1px solid #D5DAEC",color:"#2A4CD5",height:"48px"},onClick:function(){M()},children:"Cancel"}),(0,E.jsx)(j.Z,{className:"btn-size-l border-radius-8 text-weight-500 text-size-14-16",type:"primary",style:{padding:"0 1.75rem",he
1ight:"48px"},onClick:function(){!function(){var e={category:t,title:k,currency:m,clustering_company_id:u,amount:g};D(!0),null!==a&&void 0!==a&&a.uuid?(e.uuid=null===a||void 0===a?void 0:a.uuid,c((0,w.rbg)(e,{onSuccess:function(){D(!1),M(),l()}}))):c((0,w.v$k)(e,{onSuccess:function(){D(!1),M(),l()}}))}()},disabled:!g||!k,children:"Save"})]})]})})]})]})}),S&&(0,E.jsxs)("div",{className:"d-flex align-items-center mt-24",children:[(0,E.jsxs)("div",{className:"text-size-24-28 text-weight-500 line-height-38 text-color-dark-grey-dark ",children:[null===a||void 0===a?void 0:a.currency," ",Vy(null===a||void 0===a?void 0:a.amount)]}),(0,E.jsx)("div",{className:"text-size-14-16 line-height-20 text-color-dark-grey-light ml-12",children:null===a||void 0===a?void 0:a.title})]}),(0,E.jsxs)(y.Z,{visible:L,onCancel:function(){return A(!1)},footer:null,width:600,centered:!0,children:[(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-14-16 text-lineHeight",children:(0,E.jsx)("div",{className:"text-size-20-24 text-weight-500 mb-24",children:"Remove Referral Bonus"})}),(0,E.jsxs)(_.Z,{gutter:[16,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{children:"Are you sure to remove this referral bonus band?"})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end ",children:[(0,E.jsx)(j.Z,{type:"default",className:"text-size-14-16 text-weight-500 btn-size-xl mr-16 border-radius-6 text-color-blue border-color-grey cursor-pointer",onClick:function(){return A(!1)},children:"Cancel"}),(0,E.jsx)(j.Z,{type:"primary",className:"text-size-14-16 text-weight-500 btn-size-xl border-radius-6 cursor-pointer",onClick:function(){D(!0),c((0,w.gNx)(null===a||void 0===a?void 0:a.uuid,{onSuccess:function(){D(!1),M(),l(),z(!1)}}))},children:"Remove"})]})})]})]})]})},By=function(){return(0,E.jsx)("div",{className:"border-radius-50 d-flex justify-content-center align-items-center",style:{height:"48px",width:"48px",backgroundColor:"#DCE2F9",border:"none"},children:(0,E.jsx)(d.Z,{component:$o.r,style:{fontSize:24}})})},Vy=function(e){return e?"".concat(e).replace(/\B(?=(\d{3})+(?!\d))/g,","):""},Yy=function(e){return e.replace(/\$\s?|(,*)/g,"")};function Hy(){return Hy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hy.apply(this,arguments)}function Wy(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Jy=r.createElement("title",null,"Hire/Insurance/Inactive"),Uy=r.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Hire/Insurance/Inactive",strokeWidth:2},r.createElement("path",{d:"M16,20 C16,21.1038 15.1038,22 14,22 C12.8962,22 12,21.1038 12,20",id:"Stroke-1",stroke:"#7C7F88"}),r.createElement("line",{x1:12,y1:12,x2:12,y2:20,id:"Stroke-2",stroke:"#7C7F88"}),r.createElement("path",{d:"M21,12 L3,12 C3,6.4808 7.0328,2 12,2 C16.9672,2 21,6.4808 21,12 Z",id:"Stroke-3",stroke:"#3A3E4C",fill:"#FFFFFF"}),r.createElement("path",{d:"M16,12 L8,12 C8,6.4808 9.7923,2 12,2 C14.2077,2 16,6.4808 16,12 Z",id:"Stroke-4",stroke:"#3A3E4C",fill:"#FFFFFF"}))),$y=function(e){var t=e.svgRef,n=e.title,i=Wy(e,["svgRef","title"]);return r.createElement("svg",Hy({width:"24px",height:"24px",viewBox:"0 0 24 24",ref:t},i),void 0===n?Jy:n?r.createElement("title",null,n):null,Uy)},Gy=r.forwardRef((function(e,t){return r.createElement($y,Hy({svgRef:t},e))})),Ky=n(57484);function Qy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Qy(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ev=["#FFDDA2","#FFDCEC","#E0D1FA","#FFDDD3","#B5E4C9"],tv=function(e){var t,n,a=(0,i.I0)(),s=(0,r.useState)(!1),l=s[0],o=s[1],c=(0,i.v9)((function(e){return e.auth.auth.login_meta.company.company_id})),u=(0,i.v9)((function(e){return e.benefitsManager.currentCountryDetailsToShow.countryCode})),m=(0,i.v9)((function(e){return e.benefitsManager.benefitsInsuranceList}));(0,i.v9)((function(e){return e.benefitsManager.benefitsInsuranceLoading}));(0,r.useEffect)((function(){x()}),[]);var x=function(){var e={clustering_company_id:c,country_code:u};a((0,w.wHt)(e))};return(0,E.jsxs)("section",{className:"benefit-insurance mb-40",id:"benefit-insurance",children:[(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark",children:"Insurance"}),null===m||void 0===m||null===(t=m.filter((function(e){return e.is_active})))||void 0===t?void 0:t.map((function(e){return(0,E.jsx)(nv,Xy(Xy({},e),{},{getInsuranceList:x}),e.title)})),(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 text-color-dark-grey-dark mt-20 mb-8",children:"Other Plans"}),(0,E.jsxs)("div",{className:"cursor-pointer text-weight-500 text-color-blue text-size-14-16 d-flex align-items-center",onClick:function(){return o(!l)},children:[(0,E.jsxs)("div",{children:[l?"Hide":"Show"," other plans"]}),(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24 text-color-blue arrow-icon-blue",style:{transition:"0.2s",transform:l?"rotate(0deg)":"rotate(-90deg)"}})]}),(0,E.jsx)("div",{className:"insurance-benefits__others ".concat(l?"show":""),children:null===m||void 0===m||null===(n=m.filter((function(e){return!e.is_active})))||void 0===n?void 0:n.map((function(e){return(0,E.jsx)(nv,Xy(Xy({},e),{},{getInsuranceList:x}),e.title)}))}),(0,E.jsxs)("div",{className:" text-size-14-16 text-color-dark-grey mt-8 mb-12",children:["For any changes to your Insurance Plan, please contact"," ",(0,E.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"})]})]})},nv=function(e){var t=e.is_active,n=e.plan_info,a=e.title,s=e.getInsuranceList,l=(0,za.Z)("(max-width: 767px)"),o=(0,i.I0)(),c=(0,i.v9)((function(e){return e.auth.auth.login_meta.company.company_id})),u=(0,i.v9)((function(e){return e.benefitsManager.currentCountryDetailsToShow.countryCode})),m=(0,i.v9)((function(e){return e.benefitsManager.benefitsChangeInsuranceLoading})),p=(0,i.v9)((function(e){return e.benefitsManager.benefitsInsuranceLoading})),x=(0,r.useState)(!1),h=x[0],f=x[1],g=l?"p-12":"p-20 pb-14 pt-14 pb-15";return p?(0,E.jsx)("div",{className:"".concat(g," mt-8 benefit-insurance__card active"),children:(0,E.jsx)(su.Z,{avatar:!0})}):(0,E.jsxs)("div",{className:"".concat(g," mt-8 benefit-insurance__card ").concat(t?"active":""),children:[(0,E.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[rv(),(0,E.jsxs)("div",{className:"text-size-16-18 text-weight-500 text-color-dark-grey-dark pl-16",children:[" ",a]})]}),t?(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[(0,E.jsx)(d.Z,{component:Ky.r,className:"text-size-24 mr-4"}),(0,E.jsx)("div",{className:"text-size-14-16 text-weight-500 text-color-green-dark",children:"Current Plan"})]}):(0,E.jsx)(E.Fragment,{})]}),(0,E.jsxs)("div",{className:"pt-12 pb-16 pr-16 pl-16 mt-12 background-yellow-2-light border border-width-1 border-radius-6 border-color-yellow",children:[(0,E.jsx)("div",{className:"text-size-12-14 text-weight-500 text-color-dark-grey mb-8",children:"What is this?"}),(0,E.jsx)("ul",{className:"text-size-14-16 text-color-dark-grey-dark pl-16 ml-8",style:{marginBottom:"0"},children:null===n||void 0===n?void 0:n.map((function(e){var t;return(0,E.jsxs)("li",{className:"line-height-20",children:[e.title,(null===(t=e.sublist)||void 0===t?void 0:t.length)&&(0,E.jsx)("ol",{type:"a",style:{paddingInlineStart:"24px"},children:e.sublist.map((function(e){return(0,E.jsx)("li",{children:e.subt
1itle},e.subtitle)}))})]},e.title)}))})]}),(0,E.jsxs)(y.Z,{visible:h,onCancel:function(){return f(!1)},footer:null,width:600,centered:!0,children:[(0,E.jsx)("div",{className:"text-color-dark-grey-dark text-size-16 text-lineHeight",children:(0,E.jsxs)("div",{className:"text-size-24 text-weight-500 mb-24",children:["Change to Insurance ",a]})}),(0,E.jsxs)(_.Z,{gutter:[16,16],children:[(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsx)("div",{children:"Are you sure to select this insurance plan?"})}),(0,E.jsx)(Z.Z,{xs:24,children:(0,E.jsxs)("div",{className:"d-flex justify-content-end ",children:[(0,E.jsx)(j.Z,{type:"default",className:"text-size-16 text-weight-500 btn-size-xl mr-16 border-radius-6 text-color-blue border-color-grey cursor-pointer",onClick:function(){return f(!1)},children:"Cancel"}),(0,E.jsx)(j.Z,{type:"primary",className:"text-size-16 text-weight-500 btn-size-xl border-radius-6 cursor-pointer",loading:m,onClick:function(){!function(){var e={clustering_company_id:c,country_code:u};o((0,w.fef)(e,{onSuccess:function(){f(!1),s()}}))}()},children:"Proceed"})]})})]})]})]})},rv=function(){return(0,E.jsx)("div",{className:"border-radius-50 d-flex justify-content-center align-items-center",style:{height:"48px",width:"48px",backgroundColor:ev[Math.floor(Math.random()*ev.length)],border:"none"},children:(0,E.jsx)(d.Z,{component:Gy,style:{fontSize:24}})})},iv=ja.Z.TabPane,av=function(e){var t=(0,za.Z)("(max-width: 767px)"),n=(0,a.useRouter)(),s=(0,i.v9)((function(e){return e.benefitsManager.companyCountryEntityList})),l=(0,i.v9)((function(e){return e.benefitsManager.currentCountryDetailsToShow})),o=(0,i.v9)((function(e){return e.auth.companyAccessRole}));return(0,r.useEffect)((function(){"admin"!==o&&n.push({pathname:"/company-portal/dashboard"})}),[o]),(0,E.jsx)("section",{className:"container-960 benefit-manager",style:{marginLeft:0},children:(0,E.jsxs)("div",{className:"page-wrapper ",style:{overflow:"visible",maxWidth:"600px"},children:[(0,E.jsx)(Fa.Z,{title:"Benefits Manager",style:{padding:"0 ".concat(t?"18px":"1.25rem")}}),(0,E.jsxs)("div",{className:"text-size-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat(t?"18px":"1.25rem")},children:[" ","Benefits Manager"]}),(0,E.jsx)(ja.Z,{defaultActiveKey:l.CountryCode,onChange:function(){},className:"tabs-blue",children:null===s||void 0===s?void 0:s.map((function(e){return(0,E.jsxs)(iv,{tab:e.name,children:[(0,E.jsx)(Sy,{}),(0,E.jsx)("div",{className:"text-size-18-20 text-weight-500 mb-12",style:{color:"#7C7F88"},children:"Other Benefits"}),(0,E.jsx)(tv,{}),(0,E.jsx)(Ly,{}),(0,E.jsx)(Ty,{})]},e.CountryCode)}))})]})})},sv=(n(50491),n(55959));function lv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ov(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lv(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cv=N.Z.Option;function dv(e){var t=e.onSelect,n=e.onClear,a=e.style,s=e.selectedOptionValue,l=(0,i.I0)(),o=(0,r.useState)(!1),c=o[0],u=o[1],m=(0,r.useState)([]),p=m[0],x=m[1],h=(0,r.useState)(""),f=(h[0],h[1]),g=(0,r.useState)(s||void 0),y=g[0],v=g[1],j=(0,i.v9)((function(e){return e.admin.dropdownEmployeeList})),b=(0,i.v9)((function(e){var t,n,r;return null===(t=e.auth)||void 0===t||null===(n=t.auth)||void 0===n||null===(r=n.login_meta.company)||void 0===r?void 0:r.company_id}));(0,r.useEffect)((function(){return l((0,sv.RF)(b)),function(){l((0,sv.FL)(""))}}),[]),(0,r.useEffect)((function(){var e=null===j||void 0===j?void 0:j.map((function(e){return{value:e.uuid,label:e.name}}));(null===e||void 0===e?void 0:e.length)>0&&x(e)}),[j]);return(0,E.jsx)(N.Z,{showSearch:!0,allowClear:!0,placeholder:(0,E.jsxs)("div",{className:"flex items-center",children:[c?(0,E.jsx)(d.Z,{component:ag.r}):(0,E.jsx)(d.Z,{component:$o.r}),(0,E.jsx)("span",{className:"ml-8 ",children:"By Employee"})]}),optionFilterProp:"children",filterOption:function(e,t){return t.props.label.toLowerCase().indexOf(e.toLowerCase())>=0}
1,filterSort:function(e,t){var n,r;return(null!==(n=null===e||void 0===e?void 0:e.label)&&void 0!==n?n:"").toLowerCase().localeCompare((null!==(r=null===t||void 0===t?void 0:t.label)&&void 0!==r?r:"").toLowerCase())},value:y,onSearch:function(e){f(e)},onChange:function(e){v(e),t(e)},onClear:n,notFoundContent:"",style:ov({minWidth:"200px"},a),className:"select-filter ".concat(y?"selected":""),open:c,onDropdownVisibleChange:function(e){u(e)},showArrow:!1,dropdownMatchSelectWidth:!1,size:"large",children:null===p||void 0===p?void 0:p.map((function(e){return(0,E.jsx)(cv,{value:e.value,label:e.label,children:(0,E.jsx)("div",{className:"demo-option-label-item",children:(0,Y.GF)(e.label)})},e.value)}))})}function uv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pv=ja.Z.TabPane,xv=function(){return(0,E.jsx)("div",{className:"dashboard-card pl-20 pr-20 pt-16",children:(0,E.jsx)(su.Z,{active:!0,title:!1,paragraph:{rows:2}})})},hv=(0,i.$j)((function(e){return{reimbursementDetails:e.employ.reimbursementDetails,reimbursementLogsLoading:e.employ.reimbursementLogsLoading,reimbursementLogsFailed:e.employ.reimbursementLogsFailed,legalEntity:e.auth.auth.legal_entity,companyAccessRole:e.auth.companyAccessRole}}),(function(e){return{fetchCompanyReimbursementLogs:function(t,n){return e(w.coz(t,n))},fetchEmployeeAllowanceDetails:function(t,n){return e(w.ZKi(t,n))},updateSelectedAllowance:function(t){return e(w.dAJ(t))}}}))((function(e){var t=(0,za.Z)("(max-width: 767px)"),n=e.reimbursementDetails,i=e.reimbursementLogsLoading,s=(e.reimbursementLogsFailed,e.fetchCompanyReimbursementLogs),l=e.fetchEmployeeAllowanceDetails,o=e.updateSelectedAllowance,c=e.legalEntity,d=e.companyAccessRole,u=n.reimbursement_claims,m=n.stats,p=(0,r.useState)(!1),x=p[0],h=p[1],f=(0,r.useState)([]),v=f[0],j=f[1],b=(0,r.useState)([]),w=b[0],k=b[1],N=(0,r.useState)([]),_=N[0],Z=N[1],C=(0,r.useState)([]),O=C[0],S=C[1],z=(0,r.useState)([]),P=z[0],D=z[1],F=(0,r.useState)(!1),L=F[0],A=F[1],I=(0,r.useState)(!1),M=I[0],R=I[1],T=(0,r.useState)([]),q=T[0],B=T[1],V=(0,r.useState)(null),Y=V[0],H=V[1],W=(0,a.useRouter)(),J=W.query.token,U=function(){s(Y,{onFail:function(e){g.Z.error(e)}})};(0,r.useEffect)((function(){U()}),[Y,d]),(0,r.useEffect)((function(){var e=[],t=["travel","food_and_beverages","other"];null===m||void 0===m||m.forEach((function(n){t.includes(n.category)&&e.push(n)})),B(e)}),[m]),(0,r.useEffect)((function(){var e=[],t=[],n=[],r=[],i=[];null===u||void 0===u||u.forEach((function(a){"approved"===a.status?t.push(a):"declined"===a.status?n.push(a):"withdrawn"===a.status?r.push(a):"disbursed"===a.status?i.push(a):e.push(a)})),j(e),k(t),Z(n),S(r),D(i)}),[u]);var $=function(e){o(e)};return(0,r.useEffect)((function(){J&&l({key:"token",data:J},{onSuccess:function(e){$(e),h(!0)}})}),[J]),(0,E.jsx)("div",{className:"container-960",style:{margin:"0"},children:(0,E.jsxs)("div",{className:"page-wrapper employee-allowance",style:{overflow:"visible"},children:[(0,E.jsx)(Fa.Z,{title:"Allowances",style:{padding:"0 ".concat(t?"18px":"1.25rem")}}),(0,E.jsxs)("div",{className:"text-size-20-24 text-weight-500 mb-24 page-title",style:{padding:"0 ".concat(t?"18px":"1.25rem")},children:[" ","Reimbursements"]}),(0,E.jsxs)("div",{style:{padding:"0 ".concat(t?"0":"1.25rem")},children:[null===m||void 0===m?void 0:m.map((function(e){return"travel"===(null===e||void 0===e?void 0:e.category)||"food_and_bevarages"===(null===e||void 0===e?void 0:e.category)||"other"===(null===e||void 0===e?void 0:e.category)})),(0,E.jsx)(dv,{onSelect:function(e){return H(e)},onClear:function(){H("")},style:{marginRight:"16px",marginBottom:"20px"}}),(0,E.jsx)(zg.Z,{statsToShow:q,monthlyStats:m,defaultCurrency:null===c||void 0===c?void 0:c.currency,isMobile:t}),(0,E.jsx)("br",{})]}),(0,E.jsx)("div",{style:{padding:"0 ".concat(t?"18px":"1.25rem")},children:(0,E.jsxs)(ja.Z,{className:"tabs-blue custom-tabs-with-arrow",animated:!1,defaultActiveFirstOption:!0,children:[(0,E.jsxs)(pv,{tab:"Requested (".concat(v.length,")"),children:[null===v||void 0===v?void 0:v.map((function(e){return(0,E.jsx)(_g,mv(mv({},e),{}
1,{updateShowDetails:h,selectAllowance:$,allowanceData:e,page:"reimbursement"}),e.uuid)})),!i&&0===(null===v||void 0===v?void 0:v.length)&&(0,E.jsx)(Wa.Z,{}),i&&(0,E.jsx)(xv,{})]},"requested"),(0,E.jsxs)(pv,{tab:"Approved (".concat(w.length,")"),children:[null===w||void 0===w?void 0:w.map((function(e){return(0,E.jsx)(_g,mv(mv({},e),{},{updateShowDetails:h,selectAllowance:$,allowanceData:e,page:"reimbursement"}),e.uuid)})),!i&&0===(null===w||void 0===w?void 0:w.length)&&(0,E.jsx)(Wa.Z,{}),i&&(0,E.jsx)(xv,{})]},"approved"),(0,E.jsxs)(pv,{tab:"Declined (".concat(_.length,")"),children:[null===_||void 0===_?void 0:_.map((function(e){return(0,E.jsx)(_g,mv(mv({},e),{},{updateShowDetails:h,selectAllowance:$,allowanceData:e,page:"reimbursement"}),e.uuid)})),!i&&0===(null===_||void 0===_?void 0:_.length)&&(0,E.jsx)(Wa.Z,{}),i&&(0,E.jsx)(xv,{})]},"rejected"),(0,E.jsxs)(pv,{tab:"Withdrawn (".concat(O.length,")"),children:[null===O||void 0===O?void 0:O.map((function(e){return(0,E.jsx)(_g,mv(mv({},e),{},{updateShowDetails:h,selectAllowance:$,allowanceData:e,page:"reimbursement"}),e.uuid)})),!i&&0===(null===O||void 0===O?void 0:O.length)&&(0,E.jsx)(Wa.Z,{}),i&&(0,E.jsx)(xv,{})]},"withdrawn"),(0,E.jsxs)(pv,{tab:"Disbursed (".concat(P.length,")"),children:[null===P||void 0===P?void 0:P.map((function(e){return(0,E.jsx)(_g,mv(mv({},e),{}
1,{updateShowDetails:h,selectAllowance:$,allowanceData:e,page:"reimbursement"}),e.uuid)})),!i&&0===(null===P||void 0===P?void 0:P.length)&&(0,E.jsx)(Wa.Z,{}),i&&(0,E.jsx)(xv,{})]},"disbursed")]})}),(0,E.jsx)(y.Z,{className:"leaves-details-modal full-screen-mobile-modal",visible:x,centered:!0,okType:"primary",destroyOnClose:!0,width:600,onCancel:function(){h(!1)},cancelButtonProps:{className:"btn-size-xl cancel",style:{display:"none"}},okButtonProps:{className:"btn-size-xl ok",style:{display:"none"}},footer:null,closeIcon:void 0,children:(0,E.jsx)(Og.Z,{showDetails:x,updateShowDetails:h,closeDetailsModal:function(){h(!1),$({}),J&&W.push({pathname:"/company-portal/hire/reimbursements"})},selectAllowance:$,updateShowSuccessModal:A,updateIsSuccessConfirmTypeApprove:R,page:"reimbursement"})}),(0,E.jsx)(Sg.Z,{showConfirmModal:L,isSuccessConfirmTypeApprove:M,handleSuccessModalCTAClicked:function(){A(!1),U()}})]})})}));var fv=n(99954),gv=n(72977),yv=(o.Z.Header,o.Z.Content),vv=o.Z.Sider,jv=c.Z.SubMenu,bv=function(e){var t=(0,gv.Z)().width,n=(0,fv.Xt)(t),s=e.section,h=e.tab,f=e.isAuthenticated,g=e.totalApplicationCount,y=e.loginMeta,v=e.firstName,j=e.photo,b=e.emailConfirmed,w=e.companyDetails,k=e.companyDetailsPresent,N=e.companyDetailsFetched,_=e.fetchCompanyDetails,Z=e.companyInfoRequired,C=e.legalEntityDetailsRequired,O=e.billingContactRequired,S=e.personalDetailsRequired,z=e.setFindCandiatesInitialLoaded,P=e.companyAccessRole,D=e.getCompanyAccessRole,F=e.isCollapsed,L=e.toggleSidebarCollapse,A=(0,a.useRouter)();(0,Bf.Z)();var I=(0,r.useState)(""),M=I[0],R=I[1],T=(0,r.useState)(""),q=T[0],B=T[1],V=(0,r.useState)(!0),Y=V[0],H=V[1],W=(0,i.v9)((function(e){return null===e||void 0===e?void 0:e.notification.unreadNotifications})),J=y?y.company&&y.company.company_id:null;(0,r.useEffect)((function(){n&&H(!1),!n&&F&&L()}),[!n]),(0,r.useEffect)((function(){f&&!J&&window.location.replace(to.newWebsiteUrl)}),[f]),(0,r.useEffect)((function(){y&&!P&&D()}),[y,P,D]);var U=(0,r.useMemo)((function(){return"source"===s?gg:function(){var e;if((null===y||void 0===y||null===(e=y.company)||void 0===e?void 0:e.roles.length)>0){if("manager"===P)return bg;if("hr"===P)return wg;if("admin"===P)return jg}return[]}()}),[y]),$=(0,r.useCallback)((function(){A.push("/company-portal/source/post-job")}),[]),G=(0,r.useCallback)((function(){A.push("/company-portal/source/all-jobs")}),[]),K=(0,r.useCallback)((function(){A.push("/company-portal/source/company-page")}),[]),Q=(0,r.useCallback)((function(){A.push("/company-portal/source/ats-integration")}),[]),X="source"===s?function(e){var t=null;switch(e){case"application":t=(0,E.jsx)(os,{});break;case"post-job":t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).length?(0,E.jsx)(Ra,{}):null}(w);break;case"all-jobs":t=(0,E.jsx)(kl,{companyUuid:J,changeViewToATS:Q});break;case"company-page":t=(0,E.jsx)(ms.Z,{category:"company",uuid:M,reqType:"internal"});break;case"setting":t=(0,E.jsx)("div",{className:"container-800-no-margin",children:(0,E.jsx)(xd.Z,{})});break;case"find-candidate":t=(0,E.jsx)(Id,{changeViewToPostJob:$,companyDetails:w});break;case"ats-integration":t=(0,E.jsx)(tu,{changeViewToPostJob:$,changeViewToAllJob:G});break;default:t=null}return t}:function(e){var t=null;switch(e){case"dashboard":t=(0,E.jsx)(qf,{});break;case"employees":t=(0,E.jsx)(pd,{});break;case"contractors":t=(0,E.jsx)(gm,{});break;case"leaves":t=(0,E.jsx)(hx,{});break;case"invoices":t=(0,E.jsx)(Lp,{});break;case"wallet":t=(0,E.jsx)(ex,{});break;case"settings":t=(0,E.jsx)(hf,{});break;case"allowances":t=(0,E.jsx)(Ag,{});break;case"benefits-manager":t=(0,E.jsx)(av,{});break;case"reimbursements":t=(0,E.jsx)(hv,{});break;default:t=null}return t},ee=function(e){var t=e.key;n&&L(),"find-candidate"!==t&&z(!1)};(0,r.useEffect)((function(){J&&"source"===s&&!N&&_({companyUuid:J})}),[J,s,N]),(0,r.useEffect)((function(){var e=y&&y.company&&y.company.company_node_id;J=y&&y.company&&y.company.company_id,R(e||cs.Z.get("company_node_uuid"))}),[y]),(0,r.useEffect)((function(){b||A.push("/verify-email"),(C||Z||S||O)&&A.push("/company-portal/onboarding")}),[b,C,Z,S,O]);var te=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=r&&(0,E.jsx)(d.Z,{component:r,style:{fontSize:"24px"}});return n?(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[i,(0,E.jsx)("div",{className:"flex-grow-1",children:e.title}),"leaves"===e.key?(0,E.jsx)("div",{className:"text-right d-flex align-items-center",children:(0,E.jsx)("div",{className:"text-size-8 border-radius-2 text-lineHeight d-inline-block",style:{padding:"2px 2px 1px",backgroundColor:"#FBAED2",marginTop:"2px"},children:"SOON"})}):null]}):"hire"!==s||"leaves"!==e.key&&"dashboard"!==e.key&&"settings"!==e.key?t?(0,E.jsx)(l(),{href:"/company-portal/".concat(s,"/").concat(e.key),children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[i,(0,E.jsx)("div",{children:e.title}),g?(0,E.jsxs)("div",{children:["(",g,")"]}):null]})}):(0,E.jsx)(l(),{href:"/company-portal/".concat(s,"/").concat(e.key),children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[i,(0,E.jsx)("div",{className:"text-size-16",children:e.title})]})}):(0,E.jsx)(l(),{href:"/company-portal/".concat(e.key),children:(0,E.jsxs)("div",{className:"d-flex align-items-center",children:[i,(0,E.jsx)("div",{className:"text-size-16",children:e.title})]})})};return(0,E.jsxs)(o.Z,{style:{minHeight:"100vh"},children:[(0,E.jsx)(hd.Z,{title:"An integrated platform to Hire & Employ Globally Distributed Full-time Talent",description:"Majority of the top talent seeks full-time employment and engagement. Source and vet efficiently to then employ with 100% compliance and IP Protection PLUS top-drawer employee onboarding experience without setting up your local entity in a new country."}),(0,E.jsx)(vv,{width:n?310:260,style:{backgroundColor:"#F4F7FB"},collapsible:Y,collapsedWidth:0,collapsed:F,reverseArrow:!0,children:(0,E.jsxs)("div",{className:"company-portal-aside pb-20 pt-20",children:[(0,E.jsxs)("div",{className:"company-portal-aside-top",children:[(0,E.jsx)("div",{className:"pl-20 pr-20",children:(0,E.jsx)(Fa.Z,{close:!0,title:h})}),(0,E.jsx)("div",{className:"company-portal-aside-logo desktop",children:(0,E.jsx)(x.Z,{isAuthenticated:f,homeLink:"/"})}),"onboarding"!==s?(0,E.jsxs)("div",{className:"company-portal-aside-switch",children:[(0,E.jsx)("div",{className:"company-portal-aside-switch-item ".concat("hire"===s?"active":""),onClick:function(){return A.push("/company-portal/dashboard")},children:"Hire"}),(0,E.jsx)("div",{className:"company-portal-aside-switch-item ".concat("source"===s?"active":""),onClick:function(){return A.push("/company-portal/source/application")},children:"Source"})]}):null,!N||k||"source"!==s&&h!==gg[1].key&&h!==gg[2].key?null:(0,E.jsx)(Bs,{changeViewToCompanyPage:K}),"onboarding"!==s?(0,E.jsx)("div",{style:{padding:"0 20px",minHeight:"0",overflow:"auto"},children:(0,E.jsx)(c.Z,{mode:"inline",className:"company-portal-aside-menu",onSelect:ee,selectedKeys:h,defaultSelectedKeys:[h],expandIcon:(0,E.jsx)(d.Z,{component:p.r,className:"text-size-24 arrow-icon"}),children:U.map((function(e){var t;
1return"23366f32-2309-42b0-a7f2-c8ce62821ad0 "===J&&"invoices"===e.key?null:(null===e||void 0===e||null===(t=e.children)||void 0===t?void 0:t.length)>0?(0,E.jsx)(jv,{className:"sub-menu",title:(0,E.jsxs)("span",{className:"d-flex align-items-center ml-8",children:[(0,E.jsx)(d.Z,{component:null===e||void 0===e?void 0:e._icon,className:"text-size-24"}),(0,E.jsx)("span",{className:"text-size-16 text-weight-500 text-color-dark-grey-dark",children:null===e||void 0===e?void 0:e.title})]}),children:null===e||void 0===e?void 0:e.children.map((function(e){return(0,E.jsx)(c.Z.Item,{onMouseEnter:function(){return B(e.key)},onMouseLeave:function(){return B("")},children:te(e,"application"===e.key,!1,e.key==h||q===e.key?e.icon:e._icon)},e.key)}))},"sub1"):(0,E.jsx)(c.Z.Item,{onMouseEnter:function(){return B(e.key)},onMouseLeave:function(){return B("")},children:te(e,"application"===e.key,!1,e.key==h||q===e.key?e.icon:e._icon)},e.key)}))})}):null]}),(0,E.jsx)("div",{className:"company-portal-aside-bottom",children:(0,E.jsxs)("div",{className:"company-portal-aside-user",children:[(0,E.jsxs)("div",{className:"company-portal-aside-user-info",children:[(0,E.jsx)("div",{className:"company-portal-aside-user-img",children:(0,E.jsx)(u.Z,{title:"You have ".concat(W," unread notification").concat(W>1?"s":""),placement:"bottomLeft",children:(0,E.jsx)(m.Z,{count:W,overflowCount:10,style:{backgroundColor:"#2a4cd5"},children:(0,E.jsx)(kg.Z,{size:32,photo:j,allowEdit:!1})})})}),(0,E.jsx)("span",{className:"text-weight-500",children:v})]}),(0,E.jsx)("div",{className:"company-portal-aside-user-dropdown",children:(0,E.jsx)(d.Z,{className:"cursor-pointer",onMouseEnter:function(){return B("logout")},onMouseLeave:function(){return B("")},component:"logout"===q?ds.r:us.r,onClick:function(){return A.replace("/logout")}})})]})})]})}),(0,E.jsx)(o.Z,{className:"company-portal-content",children:(0,E.jsx)(yv,{style:{background:"#F4F7FB",padding:"application"===h?"0":"0 "},className:F?"nav-closed":"nav-open",children:"onboarding"===s?(0,E.jsx)(Wg,{}):X(h)})})]})};bv.defaultProps={totalApplicationCount:null,section:"source",tab:"application"};var wv=(0,i.$j)((function(e){return{isAuthenticated:e.auth.isAuthenticated,loginMeta:e.auth.auth.login_meta,firstName:e.auth.auth.first_name,photo:e.auth.auth.photo,totalApplicationCount:e.company.totalApplicationCount,companyDetails:e.company.companyDetails,companyDetailsPresent:e.company.companyDetailsPresent,companyDetailsFetched:e.company.companyDetailsFetched,emailConfirmed:e.auth.auth.email_confirmed,legalEntityDetailsRequired:e.auth.auth.legal_entity_details_required,companyInfoRequired:e.auth.auth.company_info_required,billingContactRequired:e.auth.auth.billing_contact_required,personalDetailsRequired:e.auth.auth.personal_details_required,companyAccessRole:e.auth.companyAccessRole,isCollapsed:e.app.isCollapsed}}),(function(e){return{fetchCompanyDetails:function(t){return e(w.rUo(t))},setFindCandiatesInitialLoaded:function(t){return e(w.lWz(t))},getCompanyAccessRole:function(t){return e(w.yKy(t))},toggleSidebarCollapse:function(t,n){return e(w.Zg4(t,n))}}}))(bv)},88935:function(e,t,n){"use strict";n.d(t,{Z:function(){return W}});var r=n(67294),i=n(30381),a=n.n(i),s=n(71230),l=n(15746),o=n(72977),c=n(25675),d=n.n(c),u=n(5751),m=n(3260),p=n(61563),x=n(66744),h=n(55803),f=n(30154),g=n(85893);var y=function(){return(0,g.jsxs)("ul",{className:"social-link",children:[(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://www.linkedin.com/company/kaamwork",target:"_blank",rel:"noopener noreferrer",children:(0,g.jsx)(u.Z,{component:x.r})})}),(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://www.facebook.com/kaamworktechnologies",target:"_blank",rel:"noopener noreferrer",children:(0,g.jsx)(u.Z,{component:m.r})})}),(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://twitter.com/KaamWork",target:"_blank",rel:"noopener noreferrer",children:(0,g.jsx)(u.Z,{component:p.r})})}),(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://www.instagram.com/kaamwork/",target:"_blank",rel:"noopener noreferrer",children:(0,g.jsx)(u.Z,{component:f.r})})}),(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://www.youtube.com/channel/UCx0X45hHpRRhg5bXQv1Ba9g",target:"_blank",rel:"noopener noreferrer",children:(0,g.jsx)(u.Z,{component:h.r})})})]})},v=n(67745),j=n.n(v),b=n(39633),w=n.n(b),k=n(59499);function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?N(Object(n),!0).forEach((function(t){(0,k.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e){var t=e.text,n=e.link;return(0,g.jsx)("div",{className:"mb-28 text-size-16 line-height-20",children:(0,g.jsx)("a",{className:"text-color-white",href:n,target:"_self",children:t})})}var C=function(e){var t=e.title,n=e.items,i=void 0===n?[]:n;return(0,g.jsxs)("div",{children:[(0,g.jsx)("h4",{className:"text-color-dark-grey-light text-size-16 line-height-20 text-transform-uppercase mb-28",children:t}),i.map((function(e,t){return(0,r.createElement)(Z,_(_({},e),{},{key:t}))}))]})},O=[{title:"Companies",items:[{text:"Full-time Employees",link:"/employees"},{text:"Contractors",link:"/contractors"},{text:"Sourcing Talent",link:"/hiring"},{text:"Pricing",link:"/pricing"}]},{title:"Candidates",items:[{text:"Work From Anywhere",link:"/talent"},{text:"Find Jobs",link:"/findjobs"}]},{title:"Info",items:[{text:"About Us",link:"/about-us"},{text:"Blog",link:"/blog"},{text:"FAQs",link:"/faq"}]}],S=[{title:"LinkedIN",icon:x.r,link:"https://www.linkedin.com/company/kaamwork"},{title:"Facebook",icon:m.r,link:"https://www.facebook.com/kaamworktechnologies"},{title:"Twitter",icon:p.r,link:"https://twitter.com/KaamWork"},{title:"YouTube",icon:h.r,link:"https://www.youtube.com/channel/UCx0X45hHpRRhg5bXQv1Ba9g"},{title:"Instagram",icon:f.r,link:"https://www.instagram.com/kaamwork/"}],z=n(99954),E=n(94184),P=n.n(E),D=n(12550),F=n(51841);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){(0,k.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e){var t=e.title,n=e.icon,r=e.link;return(0,g.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",title:t,className:"text-color-dark-grey-light mr-16",children:[(0,g.jsx)(u.Z,{component:n,className:"icon-size-28"})," "]})}var M=function(){var e=(0,o.Z)().width;if(!(0,F.Z)())return(0,g.jsx)(D.Z,{});var t=(0,z.Xt)(e);return(0,g.jsxs)("div",{className:P()("container mb-20",t?"mt-60 text-center":"mt-100 d-flex align-items-end justify-content-between"),children:[(0,g.jsxs)("div",{className:P()("text-color-dark-grey-light",{"mb-52":(0,z.Xt)(e)}),children:[(0,g.jsx)("div",{className:"text-size-14 text-transform-uppercase mb-16",children:"Let's Stay in Touch"}),S.map((function(e,t){return(0,r.createElement)(I,A(A({},e),{},{key:t}))}))]}),(0,g.jsxs)("div",{className:P()("d-flex text-size-14"),children:[(0,g.jsx)("a",{href:"/terms-and-conditions",className:"text-color-dark-grey-light",children:"T&C"}),(0,g.jsx)("a",{href:"/privacy-policy",className:"text-color-dark-grey-light ml-20",children:"Privacy Policy"}),t&&(0,g.jsx)("div",{className:"flex-grow-1"}),(0,g.jsxs)("div",{className:P()("text-color-dark-grey-light",{"ml-40":!t}),children:["\xa9 ",(new Date).getFullYear()," Kaamwork Technologies, Inc."]})]})]})};var R=function(){var e=O[0],t=e.title,n=e.items;return(0,g.jsx)(C,{title:t,items:n})};var T=function(){var e=O[1],t=e.title,n=e.items;return(0,g.jsx)(C,{title:t,items:n})};var q=function(){var e=O[2],t=e.title,n=e.items;return(0,g.jsx)(C,{title:t,items:n})},B=n(41664),V=n.n(B),Y=function(e){return(0,g.jsxs)("ul",{className:"company-link",children:[(0,g.jsx)("li",{children:(0,g.jsx)(V(),{href:"/blog",children:"Blog"})}),(0,g.jsx)("li",{children:(0,g.jsx)(V(),{href:"/faq",children:"FAQs"})}),(0,g.jsx)("li",{children:(0,g.jsx)(V(),{href:"/terms-and-conditions",children:"T&C"})}),(0,g.jsx)("li",{children:(0,g.jsx)(V(),{href:"/privacy-policy",children:"Privacy Policy"})})]})};function H(e){var t=e.extendedFooter,n=(0,o.Z)().width;if(!(0,F.Z)())return(0,g.jsx)(D.Z,{});var r=(0,z.h_)(n);return t?(0,g.jsxs)("footer",{className:"footer-extended background-dark-grey text-color-white",children:[(0,g.jsx)("div",{className:"container",children:(0,g.jsxs)(s.Z,{gutter:[24,24],children:[(0,g.jsx)(l.Z,{lg:6,sm:12,xs:12,children:(0,g.jsx)(R,{})}),(0,g.jsx)(l.Z,{lg:6,sm:12,xs:12,children:(0,g.jsx)(T,{})}),!r&&(0,g.jsx)(l.Z,{lg:6,sm:12,xs:12,children:(0,g.jsx)(q,{})}),r&&(0,g.jsxs)(l.Z,{xs:24,className:"d-flex",children:[(0,g.jsx)("div",{className:"flex-grow-1",children:(0,g.jsx)(q,{})}),(0,g.jsxs)("div",{className:"flex-grow-1",children:[(0,g.jsx)("h4",{className:"text-color-dark-grey-light text-size-16 line-height-20 text-transform-uppercase mb-28",children:"Our legal partner"}),(0,g.jsx)(d(),{alt:"Kaamwork",src:w(),className:"w-60 mb-60",height:14,width:86,priority:!0})]})]}
1),r?(0,g.jsx)("div",{className:"w-100 d-inline-block text-center",children:(0,g.jsx)(d(),{alt:"Kaamwork",src:j(),className:"w-60",height:50,width:190,priority:!0})}):(0,g.jsx)(l.Z,{lg:6,sm:6,className:"text-center",children:(0,g.jsxs)("div",{className:"w-90 d-inline-block",children:[(0,g.jsx)(d(),{alt:"Kaamwork",src:j(),className:"w-100",height:60,width:240,priority:!0}),(0,g.jsx)("div",{className:"mt-40 text-left text-size-14 text-transform-uppercase text-color-dark-grey-light w-100",children:"Our legal partner"}),(0,g.jsx)("div",{className:" mt-12",children:(0,g.jsx)(d(),{alt:"Kaamwork",src:w(),className:"w-100",height:38,width:240,priority:!0})})]})})]})}),(0,g.jsx)(M,{}),(0,g.jsx)(J,{})]}):(0,g.jsxs)("footer",{className:"footer",children:[(0,g.jsxs)("div",{className:"copyright text-size-14",children:["\xa9 ",a()().format("YYYY")," Kaamwork Technologies, Inc."]}),(0,g.jsx)(Y,{}),(0,g.jsx)(y,{}),(0,g.jsx)(J,{})]})}H.defaultProps={extendedFooter:!1};var W=H,J=function(){return(0,r.useEffect)((function(){window._linkedin_data_partner_ids=window._linkedin_data_partner_ids||[],window._linkedin_data_partner_ids.push("3319162"),function(e){window.lintrk||(window.lintrk=function(e,t){window.lintrk.q.push([e,t])},window.lintrk.q=[]);var t=document.getElementsByTagName("script")[0],n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://snap.licdn.com/li.lms-analytics/insight.min.js",t.parentNode.insertBefore(n,t)}()}),[]),(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("noscript",{children:(0,g.jsx)("img",{height:"1",width:"1",style:"display:none;",alt:"",src:"https://px.ads.linkedin.com/collect/?pid=3319162&fmt=gif"})})})}},65395:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(67294),i=n(30381),a=n.n(i),s=n(36456),l=n(34300),o=n(5751),c=n(88961),d=n(44596),u=n(69677),m=n(15909);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function x(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var h=r.createElement("path",{d:"M21,12c0,4.96-4.04,9-9,9c-0.55,0-1-0.45-1-1s0.45-1,1-1c3.86,0,7-3.14,7-7c0-3.86-3.14-7-7-7 c-3.86,0-7,3.14-7,7c0,1.84,0.74,3.58,2,4.88V15c0-0.55,0.45-1,1-1s1,0.45,1,1v4c0,0.55-0.45,1-1,1H4c-0.55,0-1-0.45-1-1s0.45-1,1-1 h1.31C3.84,16.36,3,14.23,3,12c0-4.96,4.04-9,9-9C16.96,3,21,7.04,21,12z M12,7c-0.55,0-1,0.45-1,1v4c0,0.55,0.45,1,1,1h2 c0.55,0,1-0.45,1-1s-0.45-1-1-1h-1V8C13,7.45,12.55,7,12,7z"}),f=function(e){var t=e.svgRef,n=e.title,i=x(e,["svgRef","title"]);return r.createElement("svg",p({id:"history",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{enableBackground:"new 0 0 24 24"},xmlSpace:"preserve",ref:t},i),n?r.createElement("title",null,n):null,h)},g=r.forwardRef((function(e,t){return r.createElement(f,p({svgRef:t},e))})),y=n(58336),v=n(68683),j=n(85893);function b(e){var t,n=e.authProfileUuid,i=e.profileUuid,s=e.jobId,p=e.viewInviteModal,x=e.setInviteModal,h=e.source,f=e.loginMeta,b=e.renderNode,w=(0,r.useState)([]),k=w[0],N=w[1],_=(0,r.useState)(""),Z=_[0],C=_[1],O=(0,r.useState)(""),S=O[0],z=O[1],E=(0,r.useState)(!1),P=E[0],D=E[1];f&&(t=f.company&&f.company.company_id),(0,r.useEffect)((function(){t=f&&f.company&&f.company.company_id}),[f]);(0,r.useEffect)((function(){n&&p&&(0,v.IQ)("jobs/meeting-invite/history?inviter_id=".concat(n)).then((function(e){e&&N(e)})).catch((function(){}))}),[n,p]);var F=function(){x(!1),D(!1),z("")};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(l.Z,{visible:p&&!Z,closeIcon:(0,j.jsx)(o.Z,{component:m.r}),getContainer:b||document.body,centered:!0,width:"600px",footer:(0,j.jsxs)("div",{className:"d-flex justify-content-between align-items-center ml-24 mr-24 mt-8 mb-16",children:[(0,j.jsx)(c.Z,{type:"link",className:"link-grey",style:{padding:"0"},onClick:F,children:(0,j.jsx)("span",{className:"text-weight-500",children:"Cancel"})}),(0,j.jsx)(c.Z,{type:"primary",className:"btn-size-xl",onClick:function(){if(S){var e=s?{url:S,candidate_id:i,inviter_id:n,job_id:s,source:h}:{url:S,candidate_id:i,inviter_id:n,company_id:t,source:h};(0,v.IW)("jobs/meeting-invite",e).then((function(e){e&&C(e.tracking_id)})).catch((function(){}))}else D(!0)},children:"Send invite"})]}),onCancel:F,children:(0,j.jsxs)("div",{className:"pl-16 pr-16",children:[(0,j.jsx)("div",{className:"text-size-24 text-weight-500 text-color-dark-grey-dark mb-20",children:"Invite candidate"}),(0,j.jsx)("div",{className:"mb-24",children:(0,j.jsx)(d.Z,{children:(0,j.jsxs)(d.Z.Item,{label:"Paste link to your calendar here",children:[(0,j.jsx)(u.Z,{className:"input-size-48 input-light-blue",value:S,onChange:function(e){return z(e.target.value)}}),P?(0,j.jsx)("div",{className:"text-color-red",style:{lineHeight:"1.2"},children:"Enter meeting link"}):null,(0,j.jsx)("div",{className:"text-color-dark-grey-light text-size-14",style:{lineHeight:"1.5"},children:"Candidates will block time directly via your calendar link"})]})})}),k.length>0?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:"mb-4 text-size-16 text-color-dark-grey-dark d-flex align-items-center",children:[(0,j.jsx)(o.Z,{className:"icon-size-24 mr-8",component:g}),(0,j.jsx)("span",{className:"text-weight-500",children:"or choose one of the previously used links"})]}),k.map((function(e){return(0,j.jsxs)("div",{className:"cursor-pointer",style:{padding:"12px 20px",borderRadius:"4px",border:"1px solid #D5DAEC",marginBottom:"2px"},onClick:function(){return z(e.url)},children:[(0,j.jsx)("div",{className:"text-size-16 text-color-dark-grey-dark",children:e.url}),(0,j.jsxs)("div",{className:"text-size-14 text-color-dark-grey-light",children:["Last used on"," ",a()(e.last_invited_on).format("MMM DD, YYYY")]})]})}))]}):null,(0,j.jsxs)("div",{className:"text-size-14 text-color-dark-grey-dark mt-8",children:["Don't have a Calendar link, create one for free at ",(0,j.jsx)("a",{href:"https://calendly.com/",style:{textDecoration:"underline"},target:"_blank",rel:"noopener noreferrer",children:"Calendly"})]})]})}),(0,j.jsx)(l.Z,{visible:Z,closable:!1,getContainer:b||document.body,centered:!0,width:420,footer:null,children:(0,j.jsxs)("div",{className:"d-flex flex-column align-items-center pt-16",children:[(0,j.jsx)("div",{className:"mb-28",children:(0,j.jsx)(o.Z,{className:"icon-green icon-size-72",component:y.r})}),(0,j.jsx)("div",{className:"text-size-20 text-weight-500 text-color-dark-grey-dark mb-8",children:"Your inv
1ite has been sent succesfully"}),(0,j.jsx)("div",{className:"text-size-16 text-color-dark-grey-light text-center",style:{lineHeight:1.2,maxWidth:"300px",margin:" 0 auto 3rem"},children:"You will hear back from the candidate via email or the link you used."}),(0,j.jsx)(c.Z,{className:"btn-size-l btn-light-blue",type:"primary",style:{padding:"0 28px"},onClick:function(){x(!1),z(""),D(!1),C("")},children:(0,j.jsx)("span",{className:"text-weight-500",children:"Ok, got it"})})]})})]})}b.defaultProps={renderNode:null};var w=(0,s.$j)((function(e){return{authProfileUuid:e.auth.auth.profile_uuid,loginMeta:e.auth.auth.login_meta}}))(b)},49442:function(e,t,n){"use strict";n(67294);var r=n(85893);t.Z=function(e){var t=e.stepIndex,n=e.title,i=e.description;return(0,r.jsxs)("div",{className:"custom-steps-item",children:[(0,r.jsx)("div",{className:"custom-steps-item-tail"}),(0,r.jsx)("div",{className:"custom-steps-item-icon",children:(0,r.jsx)("span",{className:"custom-steps-icon",children:t})}),(0,r.jsxs)("div",{className:"custom-steps-item-content",children:[(0,r.jsx)("div",{className:"custom-steps-item-title",children:n}),(0,r.jsx)("div",{children:i})]})]})}},83238:function(e,t,n){"use strict";n(67294);var r=n(85893);function i(e){var t=e.containerClassName,n=e.children;return(0,r.jsx)("div",{className:t,children:n})}i.defaultProps={containerClassName:""},t.Z=i},1406:function(e,t,n){"use strict";n(67294);var r=n(34300),i=n(5751),a=n(88961),s=n(11101),l=n(85893);t.Z=function(e){var t=e.showConfirmModal,n=e.isSuccessConfirmTypeApprove,o=e.handleSuccessModalCTAClicked;return(0,l.jsx)(r.Z,{visible:t,centered:!0,footer:null,closable:!0,width:420,bodyStyle:{padding:"30px"},destroyOnClose:!0,onCancel:function(){},children:(0,l.jsxs)("div",{className:"d-flex flex-column align-items-center text-lineHeight",children:[(0,l.jsx)("div",{className:"p-12 mb-8",children:(0,l.jsx)(i.Z,{component:s.r,className:"text-size-48 text-color-green"})}),(0,l.jsx)("div",{className:"text-size-24 text-color-dark-grey-dark text-weight-500 mb-20",children:"Successful"}),(0,l.jsx)("div",{className:"text-size-16 text-color-dark-grey pl-40 pr-40 text-center mb-40",children:"You have successfully ".concat(n?"approved":"rejected"," the leave request.")}),(0,l.jsx)("div",{style:{width:"200px"},children:(0,l.jsx)(a.Z,{type:"primary",block:!0,className:"btn-size-xl text-size-16 text-weight-500",onClick:function(){return o()},children:"Ok, Got it"})})]})})}},12550:function(e,t,n){"use strict";var r=n(5751),i=(n(67294),n(85893));t.Z=function(){return(0,i.jsx)("div",{className:"text-center mt-200 mb-200",children:(0,i.jsx)(r.Z,{type:"loading",className:"icon-size-24"})})}},67745:function(e){e.exports="data:image/svg+xml,%3csvg width='200px' height='50px' viewBox='0 0 200 50' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3ctitle%3ekw-logo-white%3c/title%3e %3cg id='kw-logo-white' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e %3cpath d='M21.3926,26.4585 L21.3176,26.5455 C20.8986,27.0045 20.2946,27.2925 19.6236,27.2925 C18.3586,27.2925 17.3316,26.2655 17.3316,25.0005 C17.3316,23.7335 18.3586,22.7085 19.6236,22.7085 C20.2966,22.7085 20.9016,22.9985 21.3216,23.4585 L21.3926,23.5425 L22.6486,25.0005 L21.3926,26.4585 Z M29.6166,23.4585 L31.9336,20.7685 L32.8056,19.7565 L31.4866,18.4375 L29.7746,16.7255 L29.1136,17.4935 L26.3486,20.7045 L25.4676,21.7265 L24.6436,20.7685 L24.5556,20.6665 C23.3526,19.2975 21.5896,18.4355 19.6236,18.4355 C15.9986,18.4355 13.0586,21.3745 13.0586,25.0005 C13.0586,28.6255 15.9986,31.5645 19.6236,31.5645 C21.6066,31.5645 23.3836,30.6875 24.5876,29.2975 L24.5916,29.2935 L25.4686,28.2745 L26.3486,29.2955 C27.5526,30.6865 29.3306,31.5645 31.3136,31.5645 C32.3266,31.5645 33.2866,31.3355 34.1436,30.9255 C34.7306,30.6455 35.2676,30.2805 35.7426,29.8475 C36.9096,30.9135 38.4646,31.5645 40.1706,31.5645 C44.0926,31.5645 46.7356,28.2925 46.7356,25.0005 C46.7356,13.4265 37.3536,4.0435 25.7796,4.0435 C14.2056,4.0435 4.8246,13.4265 4.8246,25.0005 C4.8246,36.5745 14.2056,45.9565 25.7796,45.9565 C32.8396,45.9565 39.0836,42.4655 42.8806,37.1155 L39.3936,34.6455 C36.3716,38.9035 31.4006,41.6825 25.7796,41.6825 C16.5666,41.6825 9.0976,34.2145 9.0976,25.0005 C9.0976,15.7865 16.5666,8.3165 25.7796,8.3165 C32.6906,8.3165 38.6206,12.5195 41.1526,18.5085 C41.9966,20.5035 42.4626,22.6975 42.4626,25.0005 C42.4626,26.2655 41.4366,27.2925 40.1706,27.2925 C38.9046,27.2925 37.8786,26.2655 37.8786,25.0005 L37.8786,22.7085 L33.6056,22.7085 L33.6056,25.0005 C33.6056,26.2655 32.5796,27.2925 31.3136,27.2925 C30.6406,27.2925 30.0366,27.0025 29.6166,26.5415 L29.5446,26.4585 L28.2886,25.0005 L29.5446,23.5425 L29.6166,23.4585 Z' id='Fill-1' fill='%23FFFFFF'%3e%3c/path%3e %3cpath d='M185.0381,15.3364 L185.0381,25.5474 L189.7641,20.3734 L194.9831,20.3734 L190.1201,25.7664 L195.1761,34.4994 L189.7641,34.4994 L186.7681,29.2974 L185.0381,31.2134 L185.0381,34.4994 L180.2841,34.4994 L180.2841,15.3364 L185.0381,15.3364 Z M178.7741,24.5624 L176.9881,24.5624 C175.0651,24.5624 174.1041,25.6104 174.1041,27.7104 L174.1041,34.4994 L169.3501,34.4994 L169.3501,20.3734 L173.7201,20.3734 L174.1041,22.4534 C174.5251,21.7604 175.0471,21.2404 175.6701,20.8934 C176.2931,20.5464 177.0991,20.3734 178.0881,20.3734 L178.7741,20.3734 L178.7741,24.5624 Z M162.6211,27.4364 C162.6211,26.3954 162.3641,25.5614 161.8511,24.9314 C161.3391,24.3014 160.6341,23.9864 159.7361,23.9864 C158.8391,23.9864 158.1341,24.3014 157.6211,24.9314 C157.1071,25.5614 156.8511,26.3954 156.8511,27.4364 C156.8511,28.4764 157.1071,29.3114 157.6211,29.9404 C158.1341,30.5704 158.8391,30.8854 159.7361,30.8854 C160.6341,30.8854 161.3391,30.5704 161.8511,29.9404 C162.3641,29.3114 162.6211,28.4764 162.6211,27.4364 L162.6211,27.4364 Z M152.9641,31.2414 C152.3321,30.1464 152.0161,28.8784 152.0161,27.4364 C152.0161,25.9944 152.3321,24.7264 152.9641,23.6304 C153.5961,22.5364 154.4931,21.6924 155.6561,21.0994 C156.8191,20.5054 158.1801,20.2094 159.7361,20.2094 C161.2931,20.2094 162.6521,20.5054 163.8151,21.0994 C164.9781,21.6924 165.8771,22.5364 166.5091,23.6304 C167.1411,24.7264 167.4561,25.9944 167.4561,27.4364 C167.4561,28.8784 167.1411,30.1464 166.5091,31.2414 C16
15.8771,32.3364 164.9781,33.1804 163.8151,33.7734 C162.6521,34.3664 161.2931,34.6634 159.7361,34.6634 C158.1801,34.6634 156.8191,34.3664 155.6561,33.7734 C154.4931,33.1804 153.5961,32.3364 152.9641,31.2414 L152.9641,31.2414 Z M133.6101,20.3734 L136.1101,29.5164 L138.2251,20.3734 L142.4561,20.3734 L144.5451,29.5444 L147.0451,20.3734 L151.9071,20.3734 L147.2651,34.4994 L142.2641,34.4994 L140.2861,27.0254 L138.2801,34.4994 L133.2531,34.4994 L128.5821,20.3734 L133.6101,20.3734 Z M128.3091,26.9434 L128.3091,34.5264 L123.5571,34.5264 L123.5571,26.6694 C123.5571,25.7754 123.4001,25.1044 123.0891,24.6574 C122.7771,24.2114 122.2731,23.9864 121.5771,23.9864 C120.9001,23.9864 120.3501,24.2194 119.9301,24.6854 C119.5081,25.1494 119.2981,25.8114 119.2981,26.6694 L119.2981,34.5264 L114.5441,34.5264 L114.5441,26.6694 C114.5441,25.7574 114.3931,25.0824 114.0921,24.6434 C113.7891,24.2064 113.2811,23.9864 112.5661,23.9864 C111.8711,23.9864 111.3161,24.2194 110.9041,24.6854 C110.4921,25.1494 110.2861,25.8114 110.2861,26.6694 L110.2861,34.5264 L105.5331,34.5264 L105.5331,20.3734 L109.7091,20.3734 L110.0661,22.0704 C110.5601,21.4684 111.1421,21.0124 111.8101,20.7014 C112.4791,20.3924 113.3091,20.2274 114.2971,20.2094 C116.2571,20.2094 117.6311,20.9574 118.4181,22.4534 C118.9491,21.7234 119.6321,21.1674 120.4651,20.7844 C121.2991,20.4004 122.2281,20.2094 123.2541,20.2094 C124.7371,20.2094 125.9501,20.7154 126.8931,21.7284 C127.8371,22.7414 128.3091,24.4804 128.3091,26.9434 L128.3091,26.9434 Z M98.3631,27.4634 C98.3631,26.4234 98.1161,25.5834 97.6221,24.9454 C97.1271,24.3064 96.4401,23.9864 95.5611,23.9864 C94.7001,23.9864 94.0141,24.3064 93.5011,24.9454 C92.9871,25.5834 92.7311,26.4234 92.7311,27.4634 C92.7311,28.5034 92.9831,29.3384 93.4861,29.9684 C93.9901,30.5974 94.6821,30.9134 95.5611,30.9134 C96.4401,30.9134 97.1271,30.5974 97.6221,29.9684 C98.1161,29.3384 98.3631,28.5034 98.3631,27.4634 L98.3631,27.4634 Z M103.0611,34.4994 L98.8301,34.4994 L98.4741,32.6654 C97.9781,33.2674 97.3841,33.7464 96.6871,34.1024 C95.9921,34.4584 95.2041,34.6364 94.3241,34.6364 C93.0791,34.6364 91.9711,34.3344 91.0001,33.7324 C90.0291,33.1304 89.2691,32.2814 88.7211,31.1864 C88.1711,30.0914 87.8951,28.8324 87.8951,27.4094 C87.8951,25.9664 88.1711,24.6934 88.7211,23.5894 C89.2691,22.4854 90.0341,21.6364 91.0151,21.0444 C91.9941,20.4504 93.0981,20.1544 94.3241,20.1544 C96.0281,20.1544 97.4021,20.8114 98.4451,22.1254 L98.8571,20.3734 L103.0611,20.3734 L103.0611,34.4994 Z M81.3041,27.4634 C81.3041,26.4234 81.0571,25.5834 80.5611,24.9454 C80.0671,24.3064 79.3811,23.9864 78.5021,23.9864 C77.6411,23.9864 76.9541,24.3064 76.4411,24.9454 C75.9281,25.5834 75.6721,26.4234 75.6721,27.4634 C75.6721,28.5034 75.9241,29.3384 76.4271,29.9684 C76.9311,30.5974 77.6221,30.9134 78.5021,30.9134 C79.3811,30.9134 80.0671,30.5974 80.5611,29.9684 C81.0571,29.3384 81.3041,28.5034 81.3041,27.4634 L81.3041,27.4634 Z M86.0021,34.4994 L81.7701,34.4994 L81.4141,32.6654 C80.9191,33.2674 80.3241,33.7464 79.6281,34.1024 C78.9321,34.4584 78.1441,34.6364 77.2651,34.6364 C76.0191,34.6364 74.9111,34.3344 73.9401,33.7324 C72.9701,33.1304 72.2101,32.2814 71.6611,31.1864 C71.1111,30.0914 70.8361,28.8324 70.8361,27.4094 C70.8361,25.9664 71.1111,24.6934 71.6611,23.5894 C72.2101,22.4854 72.9751,21.6364 73.9551,21.0444 C74.9341,20.4504 76.0381,20.1544 77.2651,20.1544 C78.9691,20.1544 80.3421,20.8114 81.3861,22.1254 L81.7981,20.3734 L86.0021,20.3734 L86.0021,34.4994 Z M61.1391,15.3364 L61.1391,25.5474 L65.8641,20.3734 L71.0851,20.3734 L66.2221,25.7664 L71.2761,34.4994 L65.8641,34.4994 L62.8701,29.2974 L61.1391,31.2134 L61.1391,34.4994 L56.3861,34.4994 L56.3861,15.3364 L61.1391,15.3364 Z' id='Fill-3' fill='%23FFFFFF'%3e%3c/path%3e %3c/g%3e %3c/svg%3e"},39633:function(e){e.exports="https://next.kaam.work/_next/static/images/wilmerhale-logo-monochrome-5ab6f29cfb2996a4e49425af00c0b099.png"}}]);
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.