1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8475],{58475:(e,t,n)=>{n.r(t),n.d(t,{default:()=>z});var r=n(96540),i=n(30995),a=n(14073),l=n(48139),o=n(73029),c=n.n(o),s=n(17632),u=n(78889),d=n(97950),v=n(90666),p=n(38680),f=n(83041),m=n(30444),h=n(54792),E=n(74353),b=n.n(E),g=n(32389);function y(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]:{};t%2?y(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function D(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function P(e){var t=function(e,t){if("object"!=C(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==C(t)?t:t+""}function N(e,t,n){return t=j(t),function(e,t){if(t&&("object"==C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}
1function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}var x=(0,r.lazy)(function(){return Promise.all([n.e(3984),n.e(7963),n.e(5065)]).then(n.bind(n,75065))}),A=null,T=function(e){if(!e)return null;if(e instanceof Date)return e;if("object"===C(e)&&e.date){var t=e.date.replace(" ","T");return new Date(t)}if("string"==typeof e){var n=e.replace(" ","T");return new Date(n)}return new Date(e)},M={id:null,title:"",description:"",start:new Date,end:new Date((new Date).getTime()+6e5)},Y=function(e){function t(e){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=N(this,t,[e])).state={calendarEvents:e.events,openEventDialog:!1,currentEvent:M,cui:e.cui,firma:e.firma,loaded:!1},i.handleDateClick=function(t){var a=new Date(t.date.getTime()+6e5);void 0!==e.firma&&i.setState(w(w({},i.state),{},{currentEvent:{start:t.date,end:a,description:"",cui:e.cui,firma:e.firma},openEventDialog:!0})),x=(0,r.lazy)(function(){return Promise.all([n.e(3984),n.e(7963),n.e(5065)]).then(n.bind(n,75065))})},i.handleEventClick=function(e){var t=e.event.start?new Date(e.event.start.getTime()+6e5):new Date((new Date).getTime()+6e5);i.setState(w(w({},i.state),{},{currentEvent:{id:e.event.id,title:e.event.title,description:e.event.extendedProps.description,cui:e.event.extendedProps.cui,firma:e.event.extendedProps.firma,tip:e.event.extendedProps.tip,start:e.event.start||new Date,end:t},openEventDialog:!0}))},i.handleSaveEvent=function(e,t,n,r,a,l){n=i.isEmpty(n)?new Date:new Date(n);var o=new Date(n.getTime()+6e5),c=null;(0,u.k8)("/v3/liste-vanzari/salveaza-actiune",{id:i.state.currentEvent.id,title:e.trim(),description:t?t.trim():null,start:b()(n).format("YYYY-MM-DD hh:mm:ss"),end:b()(o).format("YYYY-MM-DD hh:mm:ss"),firma:r,cui:a,tip:l}).then(function(o){null!=o.data.id&&(c=o.data.id);var s=i.addToCalendarEvents(e,t,n,r,l,c,a);i.setState(function(e){return w(w({},e),{},{calendarEvents:s,currentEvent:M,openEventDialog:!1})}),i.props.setEvents(s)})},i.addToCalendarEvents=function(e,t,n,r,a,l,o){var c=i.props.events||[];return i.eventIsNew()?c.concat({id:l,title:e,description:t||" ",start:n,end:new Date(n.getTime()+6e5),firma:r,tip:a,cui:o}):c.filter(function(e){return e.id!=i.state.currentEvent.id}).concat({id:i.state.currentEvent.id,title:e,description:t||" ",start:n,end:new Date(n.getTime()+1e5),firma:r,tip:a,cui:o})},i.handleDeleteEvent=function(){i.eventIsNew()||(0,u.k8)("/v3/liste-vanzari/sterge-actiune",{id:i.state.currentEvent.id}).then(function(){var e=(i.props.events||[]).filter(function(e){return e.id!=i.state.currentEvent.id});i.setState(w(w({},i.state),{},{calendarEvents:e,currentEvent:M,openEventDialog:!1})),i.props.setEvents(e)})},i.eventIsNew=function(){return null==i.state.currentEvent.id||""==i.state.currentEvent.id||null==i.state.currentEvent.id||!i.state.currentEvent.id},i.isEmpty=function(e){return null==e||!e||null==e||0===e.length},i.handleCloseEventDialog=function(){i.setState(w(w({},i.state),{},{currentEvent:M,openEventDialog:!1}))},i.handleMouseEnter=function(e){var t=i.fetchTitleTooltip(e);e.event.extendedProps.description&&(A=new(c())(e.el,{title:t,html:!0,placement:"top",trigger:"hover",container:"body"})).show()},i.handleMouseLeave=function(e){A&&(A.dispose(),A=null)},i.fetchTitleTooltip=function(e){var t="";return e.event.extendedProps.firma&&(t+="<strong>"+e.event.extendedProps.firma+"</strong><br />"),e.event.extendedProps.description&&(t+=e.event.extendedProps.description),t},i.handleAdaugaActiuneClick=function(e){i.setState(w(w({},i.state),{},{currentEvent:M,openEventDialog:!0}))},i.handleSaveEvent=i.handleSaveEvent.bind(i),i.handleCloseEventDialog=i.handleCloseEventDialog.bind(i),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),o=t,E=[{key:"render",value:function(){var e=this,t=this.props.t,n=(this.props.events||[]).map(function(e){return w(w({},e),{},{start:T(e.start),end:T(e.end)})}),o=this.props.cui?n.filter(function(t){return String(t.cui)===String(e.props.cui)}):n;return r.createElement("div",null,0===o.length&&r.createElement("div",{className:"fc-list-empty"},r.createElement("div",{className:"box-actiuni-empty text-center"},r.createElement("div",{className:"icon-wrapper-decor mx-auto mb-3"},r.createElement("div",{className:"stage"},r.createElement("div",{className:"spark tl"}),r.createElement("div",{className:"spark br"}),r.createElement("div",{className:"calendar"},r.createElement("div",{className:"ring left"}),r.createElement("div",{className:"ring right"}),r.createElement("div",{className:"cal-header"}),r.createElement("div",{className:"grid"},r.createElement("div",{className:"cell light"}),r.createElement("div",{className:"cell"}),r.createElement("div",{className:"cell light"}),r.createElement("div",{className:"cell"}),r.createElement("div",{className:"cell accent"}),r.createElement("div",{className:"cell light"}))),r.createElement("div",{className:"bubble"},r.createElement("span",{className:"dot"}),r.createElement("span",{className:"dot"}),r.createElement("span",{className:"dot"})))),r.createElement("p",{className:"mb-3 fs-12 color-text-grey-2"},t("Inca nu ai definit actiuni pentru clientii tai. Mergi in pagina clientului facand click pe un client dintr-o lista si adauga o actiune in sectiunea"),' "',t("Actiunile Mele"),'". ',t("Actiunile pot fi de tipul Telefon, Email, Discutie, Intalnire, Oferta, Altele"),"."))),"listYear"===this.props.initialView&&void 0===this.props.hideAdaugaActiune&&r.createElement(i.A,{direction:"row",spacing:2,className:"mb-3 align-items-center justify-content-between flex-wrap"},r.createElement(a.A,{variant:"body1",className:"text-dark",sx:{fontSize:"1rem",fontWeight:"bold"}},t("Actiunile Mele")),r.createElement(l.A,{onClick:this.handleAdaugaActiuneClick,disabled:this.props.disabled,variant:"outlined",color:"primary",sx:{fontSize:"12px",lineHeight:"18px"},className:"text-capitalize m-0"},t("Adauga Actiune"))),r.createElement("div",{style:this.props.disabled?{pointerEvents:"none",opacity:.6}:{}},r.createElement(s.A,D(D(D(D(D(D(D(D({editable:!0,locale:null!=siteLang&&"en"===siteLang?h.A:m.A,allDaySlot:!1,views:{day:{titleFormat:{month:"short",day:"2-digit"}},listYear:{titleFormat:{month:"short",day:"2-digit"},showNonCurrentDates:!0}},headerToolbar:this.props.headerToolbar,slotLabelFormat:{weekdays:"long"},initialView:this.props.initialView,height:"auto",plugins:[d.A,v.A,p.Ay,f.A]},"slotLabelFormat",{hour:"numeric",minute:"2-digit",omitZeroMinute:!1,meridiem:"short",hour12:!0}),"validRange",this.props.validRange),"events",o),"dateClick",this.handleDateClick),"eventClick",this.handleEventClick),"eventMouseEnter",this.handleMouseEnter),"eventMouseLeave",this.handleMouseLeave),"eventClassNames",function(e){var t,n=null===(t=e.event.extendedProps)||void 0===t?void 0:t.t
1ip;return 1==n?["cal-telefon"]:2==n?["cal-email"]:3==n?["cal-discutie"]:4==n?["cal-intalnire"]:5==n?["cal-oferta"]:6==n?["cal-altele"]:void 0}))),r.createElement(r.Suspense,{fallback:r.createElement("h1",null,t("Se incarca..."))},r.createElement(x,{openEventDialog:this.state.openEventDialog,handleCloseEventDialog:this.handleCloseEventDialog,handleSaveEvent:this.handleSaveEvent,handleDeleteEvent:this.handleDeleteEvent,title:this.state.currentEvent.title,description:this.state.currentEvent.description,start:this.state.currentEvent.start,deleteIcon:this.state.currentEvent.id,firma:this.state.currentEvent.firma||this.props.firma,cui:this.state.currentEvent.cui||this.props.cui,tip:this.state.currentEvent.tip,t})))}}],g=[{key:"getDerivedStateFromProps",value:function(e,t){var n;return(null===(n=e.events)||void 0===n?void 0:n.length)>0&&!1===t.loaded?w(w({},t),{},{calendarEvents:e.events,currentEvent:M,loaded:!0}):null}}],E&&O(o.prototype,E),g&&O(o,g),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,E,g}(r.Component);const z=(0,g.CI)("calendar",{useSuspense:!0})(Y)}}]);
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.