From 4f284ffd04ba2e491ebff1543f7f8fb3f2afe6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC?= Date: Sun, 26 Jul 2020 12:33:05 +0500 Subject: [PATCH] new build react --- php/react/asset-manifest.json | 8 ++++---- php/react/index.html | 2 +- ...precache-manifest.6bc64b0a93f7b548a2715c1719407491.js} | 8 ++++---- php/react/service-worker.js | 2 +- php/react/static/js/main.2ddfba3e.chunk.js | 2 ++ php/react/static/js/main.2ddfba3e.chunk.js.map | 1 + php/react/static/js/main.e8973654.chunk.js | 2 -- php/react/static/js/main.e8973654.chunk.js.map | 1 - 8 files changed, 13 insertions(+), 13 deletions(-) rename php/react/{precache-manifest.1262320cc007905719ae15cc8785c84f.js => precache-manifest.6bc64b0a93f7b548a2715c1719407491.js} (76%) create mode 100644 php/react/static/js/main.2ddfba3e.chunk.js create mode 100644 php/react/static/js/main.2ddfba3e.chunk.js.map delete mode 100644 php/react/static/js/main.e8973654.chunk.js delete mode 100644 php/react/static/js/main.e8973654.chunk.js.map diff --git a/php/react/asset-manifest.json b/php/react/asset-manifest.json index 4dbbfe1..678b77a 100644 --- a/php/react/asset-manifest.json +++ b/php/react/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "./static/css/main.629dc5cc.chunk.css", - "main.js": "./static/js/main.e8973654.chunk.js", - "main.js.map": "./static/js/main.e8973654.chunk.js.map", + "main.js": "./static/js/main.2ddfba3e.chunk.js", + "main.js.map": "./static/js/main.2ddfba3e.chunk.js.map", "runtime-main.js": "./static/js/runtime-main.f5e9acab.js", "runtime-main.js.map": "./static/js/runtime-main.f5e9acab.js.map", "static/css/2.764ccc25.chunk.css": "./static/css/2.764ccc25.chunk.css", "static/js/2.3e36c635.chunk.js": "./static/js/2.3e36c635.chunk.js", "static/js/2.3e36c635.chunk.js.map": "./static/js/2.3e36c635.chunk.js.map", "index.html": "./index.html", - "precache-manifest.1262320cc007905719ae15cc8785c84f.js": "./precache-manifest.1262320cc007905719ae15cc8785c84f.js", + "precache-manifest.6bc64b0a93f7b548a2715c1719407491.js": "./precache-manifest.6bc64b0a93f7b548a2715c1719407491.js", "service-worker.js": "./service-worker.js", "static/css/2.764ccc25.chunk.css.map": "./static/css/2.764ccc25.chunk.css.map", "static/css/main.629dc5cc.chunk.css.map": "./static/css/main.629dc5cc.chunk.css.map", @@ -20,6 +20,6 @@ "static/css/2.764ccc25.chunk.css", "static/js/2.3e36c635.chunk.js", "static/css/main.629dc5cc.chunk.css", - "static/js/main.e8973654.chunk.js" + "static/js/main.2ddfba3e.chunk.js" ] } \ No newline at end of file diff --git a/php/react/index.html b/php/react/index.html index 6b3cb4e..844382f 100644 --- a/php/react/index.html +++ b/php/react/index.html @@ -1 +1 @@ -Tasks
\ No newline at end of file +Tasks
\ No newline at end of file diff --git a/php/react/precache-manifest.1262320cc007905719ae15cc8785c84f.js b/php/react/precache-manifest.6bc64b0a93f7b548a2715c1719407491.js similarity index 76% rename from php/react/precache-manifest.1262320cc007905719ae15cc8785c84f.js rename to php/react/precache-manifest.6bc64b0a93f7b548a2715c1719407491.js index 124cf13..d2c423c 100644 --- a/php/react/precache-manifest.1262320cc007905719ae15cc8785c84f.js +++ b/php/react/precache-manifest.6bc64b0a93f7b548a2715c1719407491.js @@ -1,6 +1,6 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "4b4104b96e3c5f5cf3a04f3adde56600", + "revision": "1775a784ad352fe0ea5463ac4da0888f", "url": "./index.html" }, { @@ -8,7 +8,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "./static/css/2.764ccc25.chunk.css" }, { - "revision": "e3672ccaa4f73b49f584", + "revision": "b3baf3ee24f94f4dd64b", "url": "./static/css/main.629dc5cc.chunk.css" }, { @@ -20,8 +20,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "./static/js/2.3e36c635.chunk.js.LICENSE" }, { - "revision": "e3672ccaa4f73b49f584", - "url": "./static/js/main.e8973654.chunk.js" + "revision": "b3baf3ee24f94f4dd64b", + "url": "./static/js/main.2ddfba3e.chunk.js" }, { "revision": "43ae00e8c71e27ece866", diff --git a/php/react/service-worker.js b/php/react/service-worker.js index 314be4a..6844fb4 100644 --- a/php/react/service-worker.js +++ b/php/react/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "./precache-manifest.1262320cc007905719ae15cc8785c84f.js" + "./precache-manifest.6bc64b0a93f7b548a2715c1719407491.js" ); self.addEventListener('message', (event) => { diff --git a/php/react/static/js/main.2ddfba3e.chunk.js b/php/react/static/js/main.2ddfba3e.chunk.js new file mode 100644 index 0000000..44f1e48 --- /dev/null +++ b/php/react/static/js/main.2ddfba3e.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpspa-react"]=this["webpackJsonpspa-react"]||[]).push([[0],{25:function(e,t,a){},43:function(e,t,a){e.exports=a(84)},52:function(e,t,a){},53:function(e,t,a){},55:function(e,t,a){},59:function(e,t,a){},60:function(e,t,a){},61:function(e,t,a){},62:function(e,t,a){},83:function(e,t,a){},84:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),s=a(20),i=a.n(s),o=a(13),c=a(7),l=a(36),u={name:"",surname:"",patronymic:"",userId:0},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"GET_USER_INFO":return t.payload;default:return e}},d=a(42),h=a(24),_=function(e,t,a){return e.length>=t&&e.length<=a},p=function(e){var t=(new Date).getTime();return new Date(E(e)).getTime()2&&void 0!==arguments[2]?arguments[2]:{};(a=Object(h.a)({path:"/"},a)).expires instanceof Date&&(a.expires=a.expires.toUTCString());var n=encodeURIComponent(e)+"="+encodeURIComponent(t);for(var r in a){n+="; "+r;var s=a[r];!0!==s&&(n+="="+s)}document.cookie=n}(e,"",{"max-age":-1})},E=function(e){return e.split(".").reverse().join("-")},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";switch(e){case"/my-tasks-done":return"\u041c\u043e\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.";case"/designated-tasks":return"\u042f \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b \u0437\u0430\u0434\u0430\u0447\u0438.";case"/designated-tasks-done":return"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438.";case"/search":return'\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 - "'.concat(t,'"');default:return"\u041c\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438."}},k=function(e){return Object.assign({},e,{task_status:"1"})},N=function(e){var t=e.search,a=new URLSearchParams(t).get("q")||"";return decodeURIComponent(a)},T=function(){return g("userInfo")&&g("PHPSESSID")},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_TASK":return t.payload;case"EXECUTE_TASK":return k(t.payload);default:return e}},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"GET_ALL_USERS":return t.payload;default:return e}},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"GET_TASKS":return t.payload;default:return e}},y=Object(o.c)({user:m,task:b,users:S,tasks:C}),w=(a(52),a(4)),O=a(5),x=a(9),L=a(6),D=a(8);function j(e){return r.a.createElement("div",{className:"container"},e.children)}a(53);function I(){return r.a.createElement("footer",{className:"footer"},r.a.createElement(j,null,r.a.createElement("p",null,"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0414\u043c\u0438\u0442\u0440\u0438\u0435\u0432 \u041c\u0430\u043a\u0441\u0438\u043c. \xa9 2019 \u0433.")))}var R=a(2),F=a(14),M=function(e){return{type:"GET_USER_INFO",payload:e}},G=a(11),P=function(e){function t(e){var a;return Object(w.a)(this,t),(a=Object(x.a)(this,Object(L.a)(t).call(this,e))).initialState={textSearch:e.textSearch||"",valid:!1},a.state=a.initialState,a._handleChangeTextSearch=a._handleChangeTextSearch.bind(Object(G.a)(a)),a._handleSubmitFormSearch=a._handleSubmitFormSearch.bind(Object(G.a)(a)),a}return Object(D.a)(t,e),Object(O.a)(t,[{key:"render",value:function(){return r.a.createElement("form",{onSubmit:this._handleSubmitFormSearch,className:"form form_search",method:"get"},r.a.createElement("h3",{className:"form__title visually-hidden"},"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0437\u0430\u0434\u0430\u0447\u0430\u043c."),r.a.createElement("div",{className:"form__row form__row_search"},r.a.createElement("input",{className:"form__input form__input_search",type:"search",name:"search-field",placeholder:"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0437\u0430\u0434\u0430\u0447\u0430\u043c",value:this.state.textSearch,onChange:this._handleChangeTextSearch}),r.a.createElement("button",{disabled:!this.state.valid,className:"form__button submit",type:"submit"},"\u041d\u0430\u0439\u0442\u0438")))}},{key:"_handleChangeTextSearch",value:function(e){var t=e.target.value;this.setState({textSearch:t,valid:Boolean(t.trim())})}},{key:"_handleSubmitFormSearch",value:function(e){e.preventDefault(),this.props.history.push("/search?q=".concat(encodeURIComponent(this.state.textSearch.trim())))}}]),t}(n.Component),A=Object(F.g)(P),H=(a(55),a(18)),X=a.n(H),q=function(e){var t,a,n=arguments;return X.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{method:"GET",cache:"no-store"},r.next=3,X.a.awrap(fetch("/ajax/".concat(e),t));case 3:return a=r.sent,r.next=6,X.a.awrap(a.json());case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}))},U=function(){return q("get-my-tasks.php?my-tasks=ajax")},W=function(){return q("get-my-tasks-done.php?my-tasks-done=ajax")},K=function(){return q("get-designated-tasks.php?get-designated-task=ajax")},B=function(){return q("get-designated-tasks-done.php?get-designated-task-done=ajax")},z=function(e){return q("execute-task.php?execute-task=ajax&action=execute&id=".concat(e))},$=function(e){return q("add-task.php",{method:"POST",body:e})},J=function(e){return q("signup.php",{method:"POST",body:e})},Q=function(e){return q("signin.php",{method:"POST",body:e})},Y=a(16),V=a.n(Y);V.a.options={closeButton:!1,debug:!1,newestOnTop:!1,progressBar:!0,positionClass:"toast-top-center",onclick:null,showDuration:"300",hideDuration:"1000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut"};var Z,ee,te=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{time:5e3,preventDuplicates:!1};V.a.options.timeOut=n.time,V.a.options.preventDuplicates=n.preventDuplicates,a?V.a[e](t,a):V.a[e](t)},ae={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error"},ne=Object(F.g)(Object(c.b)((function(e){return{user:e.user}}))((function(e){var t=e.user,a=e.url,n=e.history;return r.a.createElement("nav",{className:"user-menu"},r.a.createElement("span",{className:"user-menu__user-name"},"".concat(t.surname," ").concat(t.name," ").concat(t.patronymic)),function(e){switch(e){case"/":return[{textLink:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043d\u043e\u044e",href:"/my-tasks-done"},{textLink:"\u042f \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b \u0437\u0430\u0434\u0430\u0447\u0438",href:"/designated-tasks"}];case"/my-tasks-done":return[{textLink:"\u041c\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438",href:"/"},{textLink:"\u042f \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b \u0437\u0430\u0434\u0430\u0447\u0438",href:"/designated-tasks"}];case"/designated-tasks":case"/designated-tasks-done":return[{textLink:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438",href:"/designated-tasks-done"},{textLink:"\u041c\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438",href:"/"}];case"/search":default:return[{textLink:"\u041c\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438",href:"/"},{textLink:"\u042f \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b \u0437\u0430\u0434\u0430\u0447\u0438",href:"/designated-tasks"}]}}(a).map((function(e,t){return r.a.createElement(R.b,{className:"user-menu__link link",key:e.href+t,to:e.href},e.textLink)})),r.a.createElement(R.b,{className:"user-menu__link link",to:"/add-task"},"\u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443"),r.a.createElement("a",{className:"user-menu__link user-menu__logout link",onClick:function(e){e.preventDefault(),window.confirm("\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u0439\u0442\u0438?")&&q("logout.php?logout=ajax&action=exit").then((function(e){return te(e.msgsType,"",e.textMsgs),"success"===e.msgsType&&(f("PHPSESSID"),f("userInfo"),n.push("/sing-in")),!0})).catch((function(e){console.error(e),te(ae.ERROR,e)}))},href:"/log-out"},"\u0412\u044b\u0439\u0442\u0438"))}))),re=(a(59),a(38)),se=a.n(re).a.sanitize,ie=function(e){var t,a,n=e.isShowDesc,s=e.isMore,i=e.task,o=e.userId,c=i.task_date_end,l=i.task_title,u=i.task_desc,m=i.task_date_start,d=i.task_status,_=i.task_date_no_limit,p=i.task_id,g=i.author_name,f=i.author_surname,E=i.author_patronymic,v=i.executor_id,k=i.executor_name,N=i.executor_patronymic,T=i.executor_surname;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h3",{className:"task__title"},l),r.a.createElement("div",{className:"task__desc",dangerouslySetInnerHTML:{__html:(t=n,a=u,t?se(a):"")}}),r.a.createElement("footer",{className:"task__footer"},r.a.createElement("div",{className:"task__date-start"},"\u041d\u0430\u0447\u0430\u043b\u043e \u0437\u0430\u0434\u0430\u0447\u0438: ",m),r.a.createElement("div",{className:"task__date-end"},"\u0417\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u043e: ",1===Number(_)?"\u0431\u0435\u0437 \u0434\u0430\u0442\u044b \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f":c),r.a.createElement("div",{className:"task__status"},"\u0421\u0442\u0430\u0442\u0443\u0441: ",Number(d)?"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.":"\u0412 \u0440\u0430\u0431\u043e\u0442\u0435."),r.a.createElement("div",{className:"task__execute"},Number(d)||o!==Number(v)?"":r.a.createElement("button",{"data-id-task":p,"data-title":l,onClick:e.handleClickExecuteTask},"\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443")),r.a.createElement("div",{className:"task__author"},"\u041d\u0430\u0437\u043d\u0430\u0447\u0438\u043b: ",f," ",g," ",E),r.a.createElement("div",{className:"task__executor"},"\u0418\u0441\u043f\u043e\u043d\u0438\u0442\u0435\u043b\u044c: ",T," ",k," ",N)),s?r.a.createElement(R.b,{to:function(e){return Object(h.a)({},e,{pathname:"/task/".concat(p)})},className:"link"},"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"):"")},oe=function(e){var t=e.isShowDesc,a=e.isTasks,n=e.task,s=n.task_date_end,i=n.task_date_no_limit;if(a)return ie(e);var o=p(s)&&0===Number(i)?"task_expired":"";return r.a.createElement("section",{className:"task ".concat(o," ").concat(t?"task_single":"")},ie(e))},ce=(a(60),!0),le=!1,ue=!0,me=function(e){var t=e.title,a=e.tasks,n=e.userId;return r.a.createElement("section",{className:"tasks"},r.a.createElement("h2",{className:"tasks__title"},t),a.length?r.a.createElement("ul",{className:"tasks__lists"},a.map((function(t){var a=ue?"task":"",s=p(t.task_date_end)&&0===Number(t.task_date_no_limit)?"task_expired":"";return r.a.createElement("li",{className:"tasks__item ".concat(a," ").concat(s),key:t.task_id},r.a.createElement(oe,{isMore:ce,isShowDesc:le,isTasks:ue,task:t,userId:n,handleClickMore:e.handleClickMore,handleClickExecuteTask:e.handleClickExecuteTask}))}))):r.a.createElement("div",null,"\u041d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447"))},de=(a(61),function(e){var t=e.pagesCount,a=e.pageCurrentPagination,n=new Array(t).fill(t),s=n.length,i=a-1===0?1:a-1,o=a+1>s?s:a+1;return r.a.createElement("ul",{className:"pagination-list"},r.a.createElement("li",{className:"pagination-list__item pagination-list__item_prev"},i===a?r.a.createElement("a",{className:"pagination-list__link",onClick:function(e){return e.preventDefault()},href:"#prev"},"<"):r.a.createElement("a",{className:"pagination-list__link",onClick:e.handleClickChangePagePagination,"data-page-id-pag":i,href:"page-"+i},"<")),n.map((function(t,n){return r.a.createElement("li",{className:"pagination-list__item".concat(a===n+1?" pagination-list__item_active":""),key:"page-"+n},r.a.createElement("a",{className:"pagination-list__link",onClick:e.handleClickChangePagePagination,"data-page-id-pag":n+1,href:"page-"+(n+1)},n+1))})),r.a.createElement("li",{className:"pagination-list__item pagination-list__item_next"},o===a?r.a.createElement("a",{className:"pagination-list__link",onClick:function(e){return e.preventDefault()},href:"#next"},">"):r.a.createElement("a",{className:"pagination-list__link",onClick:e.handleClickChangePagePagination,"data-page-id-pag":o,href:"page-"+o},">")))}),he=(a(62),function(){return r.a.createElement("div",{className:"loader-container"},r.a.createElement("div",{className:"loader"},r.a.createElement("div",{className:"text"},"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445"),r.a.createElement("div",{className:"dots"},r.a.createElement("div",{className:"dot"}),r.a.createElement("div",{className:"dot"}),r.a.createElement("div",{className:"dot"}),r.a.createElement("div",{className:"dot"}))))}),_e=function(e){function t(e){var a;return Object(w.a)(this,t),(a=Object(x.a)(this,Object(L.a)(t).call(this,e))).initialState={itemsTasks:9,pagesCount:0,pageCurrentPagination:1,loading:!0},a.state=a.initialState,a._handleClickExecuteTask=a._handleClickExecuteTask.bind(Object(G.a)(a)),a._handleClickChangePagePagination=a._handleClickChangePagePagination.bind(Object(G.a)(a)),a}return Object(D.a)(t,e),Object(O.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.match.url;if("/search"===e){var t=N(this.props.location);this._getSearchData(t)}else{var a=this._getFuncData(e);this._getData(a)}}},{key:"shouldComponentUpdate",value:function(e,t){var a=this.props.match.url,n=e.match.url;if(a!==n&&"/search"!==n){var r=this._getFuncData(n);return this._getData(r),!0}var s=N(this.props.location),i=N(e.location);return("/search"===a||"/search"===n)&&s!==i?(this._getSearchData(i),!0):t.loading!==this.state.loading||t.pageCurrentPagination!==this.state.pageCurrentPagination}},{key:"render",value:function(){if(!T())return r.a.createElement(F.a,{to:"/sing-in"});var e=this.props,t=e.tasks,a=e.user,n=e.match,s=e.location,i=n.url,o=a.userId,c=N(s),l=this.state,u=l.pageCurrentPagination,m=l.itemsTasks,d=l.pagesCount,h=t.length?t.slice((u-1)*m,u*m):t;return r.a.createElement(r.a.Fragment,null,r.a.createElement(ne,{url:i}),this.state.loading?r.a.createElement(he,null):r.a.createElement(r.a.Fragment,null,r.a.createElement(A,{textSearch:c}),r.a.createElement(me,{tasks:h,title:v(i,c),userId:o,handleClickExecuteTask:this._handleClickExecuteTask}),t.length>m?r.a.createElement(de,{pagesCount:d,pageCurrentPagination:u,handleClickChangePagePagination:this._handleClickChangePagePagination}):null))}},{key:"_getData",value:function(e){var t=this;this.setState({loading:!0,pageCurrentPagination:this.initialState.pageCurrentPagination}),e().then((function(e){if("error"===e.msgsType)return t.props.getTasksDispatch([]),!0;t.props.getTasksDispatch(e);var a=e.length;t.setState((function(e){var t=e.itemsTasks;return{pagesCount:Math.ceil(a/t)}}))})).catch((function(e){console.error(e),te(ae.ERROR,e,"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.")})).finally((function(){t.setState({loading:!1})}))}},{key:"_getFuncData",value:function(e){switch(e){case"/my-tasks-done":return W;case"/designated-tasks":return K;case"/designated-tasks-done":return B;default:return U}}},{key:"_handleClickExecuteTask",value:function(e){var t=this,a=e.target.dataset.idTask,n=e.target.dataset.title;window.confirm("\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 - ".concat(n,"?"))&&z(a).then((function(e){if(te(e.msgsType,"",e.textMsgs),"success"===e.msgsType){var n=function(e,t){var a=Object(d.a)(e),n=a.findIndex((function(e){return Number(e.task_id)===Number(t)}));return-1!==n&&a.splice(n,1),a}(t.props.tasks,a);t.props.getTasksDispatch(n)}})).catch((function(e){console.error(e),te(ae.ERROR,e,"\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.")}))}},{key:"_handleClickChangePagePagination",value:function(e){e.preventDefault(),this.setState({pageCurrentPagination:+e.target.dataset.pageIdPag})}},{key:"_getSearchData",value:function(e){var t,a=this;(t=e,q("get-result-search.php?search-field=".concat(t))).then((function(e){if("warning"===e.msgsType)return a.props.getTasksDispatch([]),a.setState({pageCurrentPagination:a.initialState.pageCurrentPagination}),!0;a.props.getTasksDispatch(e);var t=e.length;a.setState((function(e){var a=e.itemsTasks;return{pagesCount:Math.ceil(t/a)}}))})).catch((function(e){console.error(e),te(ae.ERROR,e,"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.")})).finally((function(){a.setState({loading:!1})}))}}]),t}(n.Component),pe=Object(c.b)((function(e){return{user:e.user,tasks:e.tasks}}),(function(e){return{getTasksDispatch:function(t){e({type:"GET_TASKS",payload:t})}}}))(Object(F.g)(_e)),ge=(a(25),Object.freeze({MIN_LENGTH_LOGIN:2,MAX_LENGTH_LOGIN:20,MIN_LENGTH_PASSWORD:6,MAX_LENGTH_PASSWORD:20,MIN_LENGTH_TEXT:2,MAX_LENGTH_TEXT:20})),fe=Object.freeze({MIN_LENGTH_TEXT:2,MAX_LENGTH_TEXT_TITLE:255,MAX_LENGTH_TEXT_DESK:255}),Ee=(Object.freeze({REDIRECTION_SIGN_IN_TIME:3e3,REDIRECTION_TASKS_TIME:3e3}),function(e){function t(e){var a;return Object(w.a)(this,t),(a=Object(x.a)(this,Object(L.a)(t).call(this,e)))._validateForm=function(e){var t=e.login,a=e.password,n=_(t,ge.MIN_LENGTH_LOGIN,ge.MAX_LENGTH_LOGIN),r=_(a,ge.MIN_LENGTH_PASSWORD,ge.MAX_LENGTH_PASSWORD);return n&&r},a._handleLoginChange=function(e){var t=e.target.value;a.setState((function(e){return{login:t,validForm:a._validateForm(Object.assign({},e,{login:t}))}}))},a._handlePasswordChange=function(e){var t=e.target.value;a.setState((function(e){return{password:t,validForm:a._validateForm(Object.assign({},e,{password:t}))}}))},a._handleSubmitForm=function(e){e.preventDefault();var t=new FormData(e.target);t.append("signin","ajax"),Q(t).then((function(e){if(te(e.msgsType,"",e.textMsgs),"success"===e.msgsType&&(a.setState(a.initialState),T())){var t=g("userInfo").split(";"),n=M({name:t[0],surname:t[1],patronymic:t[2],userId:Number(t[3])});a.props.getUserInfoToProps(n),a.props.history.push("/")}})).catch((function(e){console.error(e),te(ae.ERROR,e,"\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.")}))},a.initialState={login:"",password:"",validForm:!1},a.state=a.initialState,a}return Object(D.a)(t,e),Object(O.a)(t,[{key:"render",value:function(){return r.a.createElement("form",{onSubmit:this._handleSubmitForm,className:"form form_center form_auth",method:"post"},r.a.createElement("h3",{className:"form__title"},"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f"),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",{htmlFor:"login"},"\u0412\u0430\u0448 \u043b\u043e\u0433\u0438\u043d:"),r.a.createElement("input",{value:this.state.login,onChange:this._handleLoginChange,className:"form__input input",id:"login",type:"text",name:"login",minLength:ge.MIN_LENGTH_LOGIN,maxLength:ge.MAX_LENGTH_LOGIN,required:"required"})),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",{htmlFor:"password"},"\u041f\u0430\u0440\u043e\u043b\u044c:"),r.a.createElement("input",{value:this.state.password,onChange:this._handlePasswordChange,className:"form__input input",id:"password",type:"password",name:"password",minLength:ge.MIN_LENGTH_PASSWORD,maxLength:ge.MAX_LENGTH_PASSWORD,required:"required"})),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("button",{className:"form__button submit",disabled:!this.state.validForm,type:"submit"},"\u0412\u043e\u0439\u0442\u0438")),r.a.createElement("div",{className:"form__row form__row_text-center"},r.a.createElement(R.b,{to:"/sing-up",className:"form__link-signup link"},"\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f")))}}]),t}(n.Component)),ve=Object(F.g)(Object(c.b)(null,(function(e){return{getUserInfoToProps:function(t){return e(t)}}}))(Ee)),ke=function(){return T()?r.a.createElement(F.a,{to:"/"}):r.a.createElement(ve,null)},Ne=function(e){function t(e){var a;return Object(w.a)(this,t),(a=Object(x.a)(this,Object(L.a)(t).call(this,e)))._validateForm=function(e){var t=e.login,a=e.password,n=e.password2,r=e.name,s=e.surname,i=e.patronymic,o=_(t,ge.MIN_LENGTH_LOGIN,ge.MAX_LENGTH_LOGIN),c=_(a,ge.MIN_LENGTH_PASSWORD,ge.MAX_LENGTH_PASSWORD),l=_(n,ge.MIN_LENGTH_PASSWORD,ge.MAX_LENGTH_PASSWORD),u=a===n,m=_(r,ge.MIN_LENGTH_TEXT,ge.MAX_LENGTH_TEXT),d=_(s,ge.MIN_LENGTH_TEXT,ge.MAX_LENGTH_TEXT),h=_(i,ge.MIN_LENGTH_TEXT,ge.MAX_LENGTH_TEXT);return o&&c&&l&&u&&m&&d&&h},a._handleLoginChange=function(e){var t=e.target.value;a.setState((function(e){return{login:t,validForm:a._validateForm(Object.assign({},e,{login:t}))}}))},a._handlePasswordChange=function(e){var t=e.target.value;a.setState((function(e){return{password:t,validForm:a._validateForm(Object.assign({},e,{password:t}))}}))},a._handlePassword2Change=function(e){var t=e.target.value;a.setState((function(e){return{password2:t,validForm:a._validateForm(Object.assign({},e,{password2:t}))}}))},a._handleNameChange=function(e){var t=e.target.value;a.setState((function(e){return{name:t,validForm:a._validateForm(Object.assign({},e,{name:t}))}}))},a._handleSurnameChange=function(e){var t=e.target.value;a.setState((function(e){return{surname:t,validForm:a._validateForm(Object.assign({},e,{surname:t}))}}))},a.handlePatronymicChange=function(e){var t=e.target.value;a.setState((function(e){return{patronymic:t,validForm:a._validateForm(Object.assign({},e,{patronymic:t}))}}))},a._handleSubmitForm=function(e){e.preventDefault();var t=new FormData(e.target);t.append("signup","ajax"),J(t).then((function(e){if(te(e.msgsType,"",e.textMsgs),"success"===e.msgsType)return a.setState(a.initialState),!0})).catch((function(e){console.error(e),te(ae.ERROR,e,"\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.")}))},a._onBlurInput=function(){var e=a.state,t=e.password,n=e.password2;t.length>=ge.MIN_LENGTH_PASSWORD&&t!==n&&te(ae.WARNING,'\u0412 \u043f\u043e\u043b\u0435 "\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c", \u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043f\u043e\u043b\u0435\u043c "\u041f\u0430\u0440\u043e\u043b\u044c"!')},a.initialState={login:"",password:"",password2:"",name:"",surname:"",patronymic:"",validForm:!1},a.state=a.initialState,a}return Object(D.a)(t,e),Object(O.a)(t,[{key:"render",value:function(){return r.a.createElement("form",{onSubmit:this._handleSubmitForm,className:"form form_center form_reg",method:"post"},r.a.createElement("h3",{className:"form__title"},"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f"),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",{htmlFor:"login"},"\u0412\u0430\u0448 \u043b\u043e\u0433\u0438\u043d:"),r.a.createElement("input",{value:this.state.login,onChange:this._handleLoginChange,className:"form__input input",id:"login",type:"text",name:"login",minLength:ge.MIN_LENGTH_LOGIN,maxLength:ge.MAX_LENGTH_LOGIN,required:"required"})),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",{htmlFor:"password"},"\u041f\u0430\u0440\u043e\u043b\u044c:"),r.a.createElement("input",{value:this.state.password,onChange:this._handlePasswordChange,className:"form__input input",id:"password",type:"password",name:"password",minLength:ge.MIN_LENGTH_PASSWORD,maxLength:ge.MAX_LENGTH_PASSWORD,required:"required"})),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",{htmlFor:"password2"},"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c:"),r.a.createElement("input",{value:this.state.password2,onChange:this._handlePassword2Change,onBlur:this._onBlurInput,className:"form__input input",id:"password2",type:"password",name:"password2",minLength:ge.MIN_LENGTH_PASSWORD,maxLength:ge.MAX_LENGTH_PASSWORD,required:"required"})),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",{htmlFor:"name"},"\u0418\u043c\u044f:"),r.a.createElement("input",{value:this.state.name,onChange:this._handleNameChange,className:"form__input input",id:"name",type:"text",name:"name",minLength:ge.MIN_LENGTH_TEXT,maxLength:ge.MAX_LENGTH_TEXT,required:"required"})),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",{htmlFor:"surname"},"\u0424\u0430\u043c\u0438\u043b\u0438\u044f:"),r.a.createElement("input",{value:this.state.surname,onChange:this._handleSurnameChange,className:"form__input input",id:"surname",type:"text",name:"surname",minLength:ge.MIN_LENGTH_TEXT,maxLength:ge.MAX_LENGTH_TEXT,required:"required"})),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",{htmlFor:"patronymic"},"\u041e\u0442\u0447\u0435\u0441\u0442\u0432\u043e:"),r.a.createElement("input",{value:this.state.patronymic,onChange:this.handlePatronymicChange,className:"form__input input",id:"patronymic",type:"text",name:"patronymic",minLength:ge.MIN_LENGTH_TEXT,maxLength:ge.MAX_LENGTH_TEXT,required:"required"})),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("button",{disabled:!this.state.validForm,className:"form__button submit",type:"submit"},"\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f")),r.a.createElement("div",{className:"form__row form__row_text-center"},r.a.createElement(R.b,{to:"/sing-in",className:"form__link-signup link"},"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f")))}}]),t}(n.Component),Te=function(){return T()?r.a.createElement(F.a,{to:"/"}):r.a.createElement(Ne,null)},be=a(39),Se=a.n(be),Ce={locale:a(40).Russian,defaultDate:"today",mode:"range",dateFormat:"d.m.Y",minDate:"today",weekNumbers:!0,wrap:!0},ye=function(){Z.clear(),Z.setDate(+new Date,!0,Ce.dateFormat)},we=a(41),Oe=a.n(we),xe=(a(81),{removePlugins:["ImageUpload"],toolbar:["Heading","bold","italic","|","Link","bulletedList","numberedList","blockQuote","MediaEmbed","Undo","Redo"],language:"ru",mediaEmbed:{previewsInData:!0}}),Le=function(){ee.setData("")},De=function(e){function t(e){var a;return Object(w.a)(this,t),(a=Object(x.a)(this,Object(L.a)(t).call(this,e)))._validateForm=function(e){var t=e.selectedDates,a=e.valueSelect,n=e.titleTask,r=e.descTask,s="disabled"!==a,i=_(n,fe.MIN_LENGTH_TEXT,fe.MAX_LENGTH_TEXT_TITLE),o=_(r,fe.MIN_LENGTH_TEXT,fe.MAX_LENGTH_TEXT_DESK);return t&&s&&i&&o},a._handleDatesChange=function(e){var t=e.target.value;a.setState((function(e){return{selectedDates:t,validForm:a._validateForm(Object.assign(e,{selectedDates:t}))}}))},a._handleDateNoLimitChange=function(){a.setState((function(e){return{isCheckedDateNoLimit:!e.isCheckedDateNoLimit}}))},a._handleTitleTaskChange=function(e){var t=e.target.value;a.setState((function(e){return{titleTask:t,validForm:a._validateForm(Object.assign(e,{titleTask:t}))}}))},a._handleDescTaskChange=function(e){a.setState((function(t){return{descTask:e,validForm:a._validateForm(Object.assign(t,{descTask:e}))}}))},a._handleSelectChange=function(e){var t=e.target.value;a.setState((function(e){return{valueSelect:t,validForm:a._validateForm(Object.assign(e,{valueSelect:t}))}}))},a.handleSubmitForm=function(e){e.preventDefault();var t=new FormData(e.target);t.append("add-task","ajax"),$(t).then((function(e){te(e.msgsType,"",e.textMsgs),"success"===e.msgsType&&(a.setState({isCheckedDateNoLimit:!1,valueSelect:"disabled",titleTask:"",validForm:!1}),Le(),ye())})).catch((function(e){console.error(e),te(ae.ERROR,e,"\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.")}))},a.initialState={selectedDates:"",isCheckedDateNoLimit:!1,valueSelect:"disabled",titleTask:"",descTask:"",validForm:!1},a.state=a.initialState,a.inputDatesRef=r.a.createRef(),a.textareaRef=r.a.createRef(),a}return Object(D.a)(t,e),Object(O.a)(t,[{key:"componentDidMount",value:function(){var e,t=this;e=this.inputDatesRef.current,(Z=Se()(e,Ce)).setDate(+new Date,!0,Ce.dateFormat),function(e,t){Oe.a.create(e,xe).then((function(e){(ee=e).model.document.on("change:data",(function(){var e=ee.getData();t(e)}))})).catch((function(e){console.error(e)}))}(this.textareaRef.current,this._handleDescTaskChange),q("get-all-users.php?all-users=ajax").then((function(e){"error"!==e.msgsType?t.props.getAllUsersDispatch(e):t.props.getAllUsersDispatch([])})).catch((function(e){console.error(e),te(ae.ERROR,e,"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.")}))}},{key:"componentWillUnmount",value:function(){ee.destroy().catch((function(e){console.log(e)})),Z.destroy()}},{key:"render",value:function(){var e=this.props.user.userId;return r.a.createElement("form",{onSubmit:this.handleSubmitForm,className:"form form_task-add",action:"",method:"post"},r.a.createElement("div",{className:"form__row form__row_label-group-two"},r.a.createElement("label",{htmlFor:"date"},"\u0414\u0430\u0442\u0430 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438"),r.a.createElement("div",{ref:this.inputDatesRef,className:"flatpickr"},r.a.createElement("input",{className:"form__date input",onInput:this._handleDatesChange,id:"date",type:"text",name:"date",placeholder:"\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0430\u0442\u0443 \u0438\u043b\u0438 \u0434\u0430\u0442\u044b","data-input":"data-input",required:"required"}),r.a.createElement("button",{type:"button",title:"\u041e\u0442\u043a\u0440\u044b\u0442/\u0417\u0430\u043a\u0440\u044b\u0442\u044c \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c","data-toggle":""},"\u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c"),r.a.createElement("button",{type:"button",title:"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c","data-clear":""},"\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c"))),r.a.createElement("div",{className:"form__row"},r.a.createElement("input",{className:"form__checkbox",onChange:this._handleDateNoLimitChange,checked:this.state.isCheckedDateNoLimit,type:"checkbox",name:"date-no-limit",id:"date-no-limit"}),r.a.createElement("label",{htmlFor:"date-no-limit"},"\u0411\u0435\u0437 \u0434\u0430\u0442\u044b \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f (\u0434\u0430\u0442\u0430 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435, \u0431\u0443\u0434\u0435\u0442 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430)")),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("span",null,"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f"),r.a.createElement("select",{value:this.state.valueSelect,onChange:this._handleSelectChange,className:"form__select",name:"executor",required:"required"},r.a.createElement("option",{value:"disabled",disabled:"disabled"},"\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043e"),this.props.users.map((function(t){return r.a.createElement("option",{value:t.user_id,key:t.user_id}," ",e===Number(t.user_id)?"\u042f":"".concat(t.user_surname," ").concat(t.user_name," ").concat(t.user_patronymic)," ")})))),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",null,"\u0417\u0430\u0433\u0430\u043b\u043e\u0432\u043e\u043a \u0437\u0430\u0434\u0430\u0447\u0438"),r.a.createElement("textarea",{value:this.state.titleTask,onChange:this._handleTitleTaskChange,className:"form__title-add textarea",name:"title",maxLength:"255",placeholder:"\u0441\u0434\u0435\u043b\u0430\u0442\u044c ...",required:"required"})),r.a.createElement("div",{className:"form__row form__row_content-column"},r.a.createElement("label",null,"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u0437\u0430\u0434\u0430\u0447\u0435"),r.a.createElement("textarea",{className:"textarea",ref:this.textareaRef,value:this.state.descTask,onChange:this._handleDescTaskChange,id:"textarea-text",name:"text",maxLength:"1000",placeholder:"\u041e\u0431\u044c\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 ...",required:"required"})),r.a.createElement("div",{className:"form__row form__row_text-center"},r.a.createElement("button",{disabled:!this.state.validForm,className:"form__submit submit",type:"submit"},"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443"),r.a.createElement(R.b,{className:"form__link link",to:"/"},"\u041a \u0441\u043f\u0438\u0441\u043a\u0443 \u043c\u043e\u0438\u0445 \u0437\u0430\u0434\u0430\u0447")))}}]),t}(n.Component),je=Object(c.b)((function(e){return{user:e.user,users:e.users}}),(function(e){return{getAllUsersDispatch:function(t){e({type:"GET_ALL_USERS",payload:t})}}}))(De),Ie=function(){return T()?r.a.createElement(je,null):r.a.createElement(F.a,{to:"/sing-in"})},Re=!1,Fe=!0,Me=function(e){function t(e){var a;return Object(w.a)(this,t),(a=Object(x.a)(this,Object(L.a)(t).call(this,e))).initialState={loading:!0},a.state=a.initialState,a._handleClickExecuteTask=a._handleClickExecuteTask.bind(Object(G.a)(a)),a}return Object(D.a)(t,e),Object(O.a)(t,[{key:"componentDidMount",value:function(){var e=this;(function(e){return q("get-task.php?task=ajax&id=".concat(e))})(this.props.idTask).then((function(t){"error"===t.msgsType&&e.props.fetchTaskDispatch(null),e.props.fetchTaskDispatch(t)})).catch((function(e){console.error(e),te(ae.ERROR,e,"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.")})).finally((function(){e.setState({loading:!1})}))}},{key:"render",value:function(){if(!T())return r.a.createElement(F.a,{to:"/sing-in"});var e=this.props,t=e.user,a=e.handleClickExit,n=e.url,s=e.task,i=t.userId;return r.a.createElement(r.a.Fragment,null,r.a.createElement(ne,{handleClickExit:a,user:t,url:n}),this.state.loading?r.a.createElement(he,null):s?r.a.createElement(oe,{isMore:Re,isShowDesc:Fe,task:s,userId:i,handleClickExecuteTask:this._handleClickExecuteTask}):r.a.createElement("p",null,"\u0422\u0430\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442!"))}},{key:"_handleClickExecuteTask",value:function(e){var t=this,a=e.target.dataset.idTask,n=e.target.dataset.title;window.confirm("\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 - ".concat(n,"?"))&&z(a).then((function(e){te(e.msgsType,"",e.textMsgs),"success"===e.msgsType&&t.props.executeTaskDispatch(t.props.task)})).catch((function(e){console.error(e),te(ae.ERROR,e,"\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.")}))}}]),t}(n.Component),Ge=Object(c.b)((function(e){return{user:e.user,task:e.task}}),(function(e){return{fetchTaskDispatch:function(t){e({type:"FETCH_TASK",payload:t})},executeTaskDispatch:function(t){e({type:"EXECUTE_TASK",payload:t})}}}))(Me),Pe=(a(82),a(83),function(e){function t(){return Object(w.a)(this,t),Object(x.a)(this,Object(L.a)(t).apply(this,arguments))}return Object(D.a)(t,e),Object(O.a)(t,[{key:"componentDidMount",value:function(){if(T()){var e=g("userInfo").split(";"),t=M({name:e[0],surname:e[1],patronymic:e[2],userId:Number(e[3])});this.props.getUserInfoDispatch(t)}}},{key:"render",value:function(){return r.a.createElement(R.a,{basename:"/react/"},r.a.createElement("main",{className:"bg main"},r.a.createElement(j,null,r.a.createElement(F.d,null,r.a.createElement(F.b,{path:"/",exact:!0},r.a.createElement(pe,null)),r.a.createElement(F.b,{path:"/search"},r.a.createElement(pe,null)),r.a.createElement(F.b,{path:"/my-tasks-done"},r.a.createElement(pe,null)),r.a.createElement(F.b,{path:"/designated-tasks"},r.a.createElement(pe,null)),r.a.createElement(F.b,{path:"/designated-tasks-done"},r.a.createElement(pe,null)),r.a.createElement(F.b,{path:"/sing-up"},r.a.createElement(Te,null)),r.a.createElement(F.b,{path:"/sing-in"},r.a.createElement(ke,null)),r.a.createElement(F.b,{path:"/add-task"},r.a.createElement(Ie,null)),r.a.createElement(F.b,{path:"/task/:id",render:function(e){var t=e.match,a=t.params.id;return r.a.createElement(Ge,{url:t.url,idTask:a})}}),r.a.createElement(F.b,null,r.a.createElement("h1",null,"\u0422\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0435\u0442\u0443!"))))),r.a.createElement(I,null))}}]),t}(n.Component)),Ae=Object(c.b)(null,(function(e){return{getUserInfoDispatch:function(t){e(t)}}}))(Pe);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var He=Object(o.a)(l.a),Xe=Object(o.d)(He),qe=Object(o.e)(y,void 0,Xe);i.a.render(r.a.createElement(c.a,{store:qe},r.a.createElement(Ae,null)),document.querySelector(".root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[43,1,2]]]); +//# sourceMappingURL=main.2ddfba3e.chunk.js.map \ No newline at end of file diff --git a/php/react/static/js/main.2ddfba3e.chunk.js.map b/php/react/static/js/main.2ddfba3e.chunk.js.map new file mode 100644 index 0000000..98ced6a --- /dev/null +++ b/php/react/static/js/main.2ddfba3e.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["reducers/user.js","helpers/helpers.js","reducers/task.js","reducers/users.js","reducers/tasks.js","reducers/index.js","components/container/container.js","components/footer/footer.js","actions/user.js","components/search-by-tasks/search-by-tasks.js","data/data.js","plugins/show-message.js","plugins/flatpickr.js","plugins/editor.js","components/user-menu/user-menu.js","components/task/task.js","components/tasks/tasks.js","components/pagination/pagination.js","components/loading-data/loading-data.js","pages/page-tasks.js","actions/tasks.js","vars/vars.js","components/forms/form-sing-in.js","pages/page-sign-in.js","components/forms/form-sing-up.js","pages/page-sign-up.js","components/forms/form-add-task.js","actions/users.js","pages/page-add-task.js","pages/page-task.js","actions/task.js","App.js","serviceWorker.js","index.js"],"names":["initialState","name","surname","patronymic","userId","reducerUser","state","action","type","payload","checkLengthMinMaxStr","str","minLengthStr","maxLengthStr","length","hasDateExpired","dateTask","today","Date","getTime","reverseDate","getCookie","matches","document","cookie","match","RegExp","replace","decodeURIComponent","undefined","deleteCookie","value","options","path","expires","toUTCString","updatedCookie","encodeURIComponent","optionKey","optionValue","setCookie","date","split","reverse","join","getActiveTitleTasks","url","textSearch","changeStatusTask","task","Object","assign","task_status","getTextInSearchParams","location","search","searchTextEncode","URLSearchParams","get","checkLoggedUser","reducerTask","reducerUsers","reducerTasks","combineReducers","user","users","tasks","Container","props","className","children","Footer","getUserInfo","SearchByTasks","valid","_handleChangeTextSearch","bind","_handleSubmitFormSearch","onSubmit","this","method","placeholder","onChange","disabled","evt","target","setState","Boolean","trim","preventDefault","history","push","Component","withRouter","fetchRequest","link","a","async","params","cache","fetch","response","json","getMyTasks","getMyTasksDone","getDesignatedTasks","getDesignatedTasksDone","executeTask","idTask","addTask","formData","body","signUpUser","signInUser","toastr","closeButton","debug","newestOnTop","progressBar","positionClass","onclick","showDuration","hideDuration","extendedTimeOut","showEasing","hideEasing","showMethod","hideMethod","fp","editor","showMessage","message","title","time","preventDuplicates","timeOut","TypeMessage","INFO","SUCCESS","WARNING","ERROR","connect","textLink","href","getActiveMenuLinks","map","item","index","key","to","onClick","window","confirm","then","msgsType","textMsgs","catch","e","console","error","sanitizer","dompurify","sanitize","getTaskContent","isShow","stringAndTags","isShowDesc","isMore","task_date_end","task_title","task_desc","task_date_start","task_date_no_limit","task_id","author_name","author_surname","author_patronymic","executor_id","executor_name","executor_patronymic","executor_surname","Fragment","dangerouslySetInnerHTML","__html","Number","data-id-task","data-title","handleClickExecuteTask","pathname","Task","isTasks","classTaskExpired","option","Tasks","classTaskItem","handleClickMore","Pagination","pagesCount","pageCurrentPagination","arr","Array","fill","lastPage","pagePrev","pageNext","handleClickChangePagePagination","data-page-id-pag","it","LoadingData","PageTasks","itemsTasks","loading","_handleClickExecuteTask","_handleClickChangePagePagination","_getSearchData","dataFunc","_getFuncData","_getData","nextProps","nextState","currUrl","nextUrl","textSearchCurr","textSearchNext","visibleTasks","slice","fn","getTasksDispatch","lengthTasks","Math","ceil","finally","dataset","result","newTasks","copyTasks","indexTask","findIndex","splice","deleteTaskFromArrTasks","pageIdPag","text","dispatch","ConfMinAndMax","freeze","MIN_LENGTH_LOGIN","MAX_LENGTH_LOGIN","MIN_LENGTH_PASSWORD","MAX_LENGTH_PASSWORD","MIN_LENGTH_TEXT","MAX_LENGTH_TEXT","ConfMinAndMaxAddTask","MAX_LENGTH_TEXT_TITLE","MAX_LENGTH_TEXT_DESK","FormSingIn","REDIRECTION_SIGN_IN_TIME","REDIRECTION_TASKS_TIME","_validateForm","login","password","isValidLogin","isValidPassword","_handleLoginChange","validForm","_handlePasswordChange","_handleSubmitForm","FormData","append","userInfo","getUserInfoToProps","htmlFor","id","minLength","maxLength","required","PageSingIn","FormSingUp","password2","isValidPassword2","isValidEquallyPassword","isValidName","isValidSurname","isValidPatronymic","_handlePassword2Change","_handleNameChange","_handleSurnameChange","handlePatronymicChange","_onBlurInput","onBlur","PageSingUp","CONFIG_FLATPICKR","locale","Russian","defaultDate","mode","dateFormat","minDate","weekNumbers","wrap","clearDataFlatpickr","clear","setDate","CONFIG","removePlugins","toolbar","language","mediaEmbed","previewsInData","clearDataEditor","setData","FormAddTask","selectedDates","valueSelect","titleTask","descTask","isValidValueSelect","isValidTitleTask","isValidDescTask","_handleDatesChange","_handleDateNoLimitChange","isCheckedDateNoLimit","_handleTitleTaskChange","_handleDescTaskChange","data","_handleSelectChange","handleSubmitForm","FORM_DATA","inputDatesRef","React","createRef","textareaRef","elem","current","flatpickr","ClassicEditor","create","newEditor","model","on","getData","initEditor","getAllUsersDispatch","destroy","log","userIdCurrent","ref","onInput","data-input","data-toggle","data-clear","checked","user_id","user_surname","user_name","user_patronymic","PageAddTask","PageTask","getTask","fetchTaskDispatch","handleClickExit","executeTaskDispatch","App","getUserInfoDispatch","basename","exact","render","hostname","middlewareEnhancer","applyMiddleware","thunkMiddleware","composedEnhancers","compose","store","createStore","rootReducer","ReactDOM","querySelector","navigator","serviceWorker","ready","registration","unregister"],"mappings":"iZAAMA,EAAe,CACjBC,KAAM,GACNC,QAAS,GACTC,WAAY,GACZC,OAAQ,GAYGC,EATK,WAAoC,IAAnCC,EAAkC,uDAA1BN,EAAcO,EAAY,uCACnD,OAAQA,EAAOC,MACX,IAAK,gBACD,OAAOD,EAAOE,QAClB,QACI,OAAOH,I,gBCLNI,EAAuB,SAACC,EAAKC,EAAcC,GACpD,OAAQF,EAAIG,QAAUF,GAAkBD,EAAIG,QAAUD,GAO7CE,EAAiB,SAACC,GAC3B,IAAMC,GAAQ,IAAIC,MAAOC,UAGzB,OAFgB,IAAID,KAAKE,EAAYJ,IAAWG,UAE/BF,GAORI,EAAY,SAACpB,GACtB,IAAIqB,EAAUC,SAASC,OAAOC,MAAM,IAAIC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State = {\r\n name: '',\r\n surname: '',\r\n patronymic: '',\r\n userId: 0\r\n}\r\n\r\nconst reducerUser = (state = initialState, action ) => {\r\n switch (action.type) {\r\n case 'GET_USER_INFO':\r\n return action.payload;\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nexport default reducerUser;\r\n","/**\r\n * Функция для проверки длины строки, в промежутке - >= && <=\r\n * @param str\r\n * @param minLengthStr\r\n * @param maxLengthStr\r\n * @returns {boolean|boolean}\r\n */\r\nexport const checkLengthMinMaxStr = (str, minLengthStr, maxLengthStr) => {\r\n return (str.length >= minLengthStr) && (str.length <= maxLengthStr);\r\n};\r\n/**\r\n * Истекла ли задача\r\n * @param dateTask - дата задачи.\r\n * @returns {boolean}\r\n */\r\nexport const hasDateExpired = (dateTask) => {\r\n const today = new Date().getTime();\r\n const dateEnd = new Date(reverseDate(dateTask)).getTime();\r\n\r\n return dateEnd < today;\r\n};\r\n/**\r\n * Получение Cookie по имени\r\n * @param name - имя Cookie\r\n * @returns {any}\r\n */\r\nexport const getCookie = (name) => {\r\n let matches = document.cookie.match(new RegExp(\r\n // eslint-disable-next-line no-useless-escape\r\n \"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"\r\n ));\r\n return matches ? decodeURIComponent(matches[1]) : undefined;\r\n};\r\n/**\r\n * Устанавливает куки с именем name и значением value c опциями.\r\n * @param {String} name\r\n * @param {String} value\r\n * @param {Object} options\r\n */\r\nfunction setCookie(name, value, options = {}) {\r\n options = {\r\n path: '/',\r\n ...options\r\n };\r\n\r\n if (options.expires instanceof Date) {\r\n options.expires = options.expires.toUTCString();\r\n }\r\n\r\n let updatedCookie = encodeURIComponent(name) + \"=\" + encodeURIComponent(value);\r\n\r\n for (let optionKey in options) {\r\n updatedCookie += \"; \" + optionKey;\r\n let optionValue = options[optionKey];\r\n if (optionValue !== true) {\r\n updatedCookie += \"=\" + optionValue;\r\n }\r\n }\r\n\r\n document.cookie = updatedCookie;\r\n}\r\n/**\r\n * Удаление Cookie по её имени.\r\n * @param {String} name\r\n */\r\nexport const deleteCookie = (name) => {\r\n setCookie(name, \"\", {\r\n 'max-age': -1\r\n })\r\n}\r\n/**\r\n * Переворачивает дату с сервера для js\r\n * @param {String} date\r\n */\r\nexport const reverseDate = (date) => {\r\n return date.split('.').reverse().join('-');\r\n}\r\n/**\r\n * Возврашает заголовок для задач в зависимомти от активного скрина.\r\n * @param {String} url\r\n * @param {String} textSearch\r\n */\r\nexport const getActiveTitleTasks = (url, textSearch=\"\") => {\r\n switch (url) {\r\n case \"/my-tasks-done\":\r\n return \"Мои выполненые задачи.\";\r\n case \"/designated-tasks\":\r\n return \"Я назначил задачи.\";\r\n case \"/designated-tasks-done\":\r\n return \"Выполненные задачи другими.\";\r\n case \"/search\":\r\n return `Результаты поиска по запросу - \"${textSearch}\"`;\r\n default:\r\n return \"Мои задачи.\";\r\n }\r\n}\r\n/**\r\n * Удаление задачи. Для страниц с задачами.\r\n * @param {Object} tasks\r\n * @param {Number} idTask\r\n */\r\nexport const deleteTaskFromArrTasks = (tasks, idTask) => {\r\n let copyTasks = [...tasks];\r\n const indexTask = copyTasks.findIndex((task) => Number(task.task_id) === Number(idTask));\r\n\r\n if (indexTask !== -1) {\r\n copyTasks.splice(indexTask, 1);\r\n }\r\n\r\n return copyTasks;\r\n}\r\n/**\r\n * Изменение статуса задачи для страницы задач.\r\n * @param {Object} task\r\n */\r\nexport const changeStatusTask = (task) => {\r\n return Object.assign({}, task, { task_status: \"1\" });\r\n}\r\n/**\r\n * Получение массива активных(изменяемых в зависимости от типа адреса) ссылок для меню.\r\n * @param {String} url\r\n */\r\nexport const getActiveMenuLinks = (url) => {\r\n switch (url) {\r\n case \"/\":\r\n return [\r\n { textLink: \"Выполненые задачи мною\", href: \"/my-tasks-done\" },\r\n { textLink: \"Я назначил задачи\", href: \"/designated-tasks\" },\r\n ]\r\n case \"/my-tasks-done\":\r\n return [\r\n { textLink: \"Мои задачи\", href: \"/\"},\r\n { textLink: \"Я назначил задачи\", href: \"/designated-tasks\" },\r\n ]\r\n case \"/designated-tasks\":\r\n return [\r\n { textLink: \"Выполненые задачи другими\", href: \"/designated-tasks-done\" },\r\n { textLink: \"Мои задачи\", href: \"/\"},\r\n ]\r\n case \"/designated-tasks-done\":\r\n return [\r\n { textLink: \"Выполненые задачи другими\", href: \"/designated-tasks-done\" },\r\n { textLink: \"Мои задачи\", href: \"/\"},\r\n ]\r\n case \"/search\":\r\n return [\r\n { textLink: \"Мои задачи\", href: \"/\"},\r\n { textLink: \"Я назначил задачи\", href: \"/designated-tasks\" },\r\n ]\r\n default:\r\n return [\r\n { textLink: \"Мои задачи\", href: \"/\" },\r\n { textLink: \"Я назначил задачи\", href: \"/designated-tasks\" },\r\n ]\r\n }\r\n}\r\n/**\r\n * Получаем текст для поиска из параметра q\r\n * @param location\r\n * @returns {string}\r\n */\r\nexport const getTextInSearchParams = (location) => {\r\n const { search } = location;\r\n const searchParams = new URLSearchParams(search);\r\n const searchTextEncode = searchParams.get(\"q\") || '';\r\n return decodeURIComponent(searchTextEncode);\r\n}\r\n/**\r\n * Проверяет залогинился ли пользователь\r\n * @returns { Boolean }\r\n */\r\nexport const checkLoggedUser = () => (getCookie(\"userInfo\") && getCookie(\"PHPSESSID\"));\r\n","import { changeStatusTask } from \"../helpers/helpers\";\r\n\r\nconst reducerTask = (state = null, action ) => {\r\n switch (action.type) {\r\n case 'FETCH_TASK':\r\n return action.payload;\r\n case 'EXECUTE_TASK':\r\n return changeStatusTask(action.payload);\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nexport default reducerTask;\r\n","const reducerUsers = (state = [], action ) => {\r\n switch (action.type) {\r\n case 'GET_ALL_USERS':\r\n return action.payload;\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nexport default reducerUsers;\r\n","const reducerTasks = (state = [], action ) => {\r\n switch (action.type) {\r\n case 'GET_TASKS':\r\n return action.payload;\r\n default:\r\n return state;\r\n }\r\n}\r\n\r\nexport default reducerTasks;\r\n","import { combineReducers } from 'redux';\r\nimport user from \"./user\";\r\nimport task from \"./task\";\r\nimport users from \"./users\";\r\nimport tasks from \"./tasks\";\r\n\r\n\r\n\r\nexport default combineReducers({\r\n user,\r\n task,\r\n users,\r\n tasks\r\n})\r\n","import React from \"react\";\r\n\r\nexport default function Container(props) {\r\n return (\r\n
{props.children}
\r\n )\r\n}","import React from \"react\";\r\nimport Container from \"../container/container\";\r\nimport './footer.scss'\r\n\r\nexport default function Footer() {\r\n return (
\r\n \r\n

Разработка Дмитриев Максим. © 2019 г.

\r\n
\r\n
);\r\n}\r\n","export const getUserInfo = (payload) => ({ type: 'GET_USER_INFO', payload });\r\n","import React, { Component } from \"react\";\r\nimport { withRouter } from \"react-router-dom\";\r\n\r\nclass SearchByTasks extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.initialState = {\r\n textSearch: props.textSearch || '',\r\n valid: false\r\n };\r\n this.state = this.initialState;\r\n\r\n this._handleChangeTextSearch = this._handleChangeTextSearch.bind(this);\r\n this._handleSubmitFormSearch = this._handleSubmitFormSearch.bind(this);\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n

Поиск по задачам.

\r\n
\r\n \r\n \r\n
\r\n
\r\n )\r\n }\r\n\r\n _handleChangeTextSearch(evt) {\r\n const value = evt.target.value;\r\n this.setState({\r\n textSearch: value,\r\n valid: Boolean(value.trim())\r\n })\r\n }\r\n\r\n _handleSubmitFormSearch(evt) {\r\n evt.preventDefault();\r\n this.props.history.push(`/search?q=${encodeURIComponent(this.state.textSearch.trim())}`)\r\n }\r\n}\r\n\r\nexport default withRouter(SearchByTasks);\r\n","/**\r\n * Получение моих задач\r\n */\r\nexport const fetchRequest = async (\r\n link,\r\n params = {\r\n method: 'GET',\r\n cache: 'no-store'\r\n }\r\n ) => {\r\n\r\n const response = await fetch(`/ajax/${link}`, params);\r\n\r\n return await response.json();\r\n};\r\n/**\r\n * Получение моих задач\r\n */\r\nexport const getMyTasks = () => fetchRequest('get-my-tasks.php?my-tasks=ajax');\r\n/**\r\n * Получение моих выполненых задач\r\n */\r\nexport const getMyTasksDone = () => fetchRequest('get-my-tasks-done.php?my-tasks-done=ajax');\r\n/**\r\n * Получение задач поставленных мною\r\n */\r\nexport const getDesignatedTasks = () => fetchRequest('get-designated-tasks.php?get-designated-task=ajax');\r\n/**\r\n * Выполненные задачи другими\r\n */\r\nexport const getDesignatedTasksDone = () => fetchRequest('get-designated-tasks-done.php?get-designated-task-done=ajax');\r\n/**\r\n * Получение всех ользователей\r\n */\r\nexport const getAllUsers = () => fetchRequest('get-all-users.php?all-users=ajax');\r\n/**\r\n * Выполнение задачи\r\n */\r\nexport const executeTask = (idTask) => fetchRequest(`execute-task.php?execute-task=ajax&action=execute&id=${idTask}`);\r\n/**\r\n * Добавление заддачи\r\n * @param {Object} formData \r\n */\r\nexport const addTask = (formData) => fetchRequest(\r\n `add-task.php`,\r\n {\r\n method: 'POST',\r\n body: formData\r\n }\r\n );\r\n/**\r\n * Регистрация пользователя на сайте.\r\n * @param {Object} formData\r\n */\r\nexport const signUpUser = (formData) => fetchRequest(\r\n `signup.php`,\r\n {\r\n method: 'POST',\r\n body: formData\r\n }\r\n );\r\n/**\r\n * Авторизация пользователя на сайте.\r\n * @param {Object} formData\r\n */\r\nexport const signInUser = (formData) => fetchRequest(\r\n `signin.php`,\r\n {\r\n method: 'POST',\r\n body: formData\r\n }\r\n );\r\n/**\r\n * Выход с сайта.\r\n */\r\nexport const logOut = () => fetchRequest(`logout.php?logout=ajax&action=exit`);\r\n/**\r\n * Поиск задачи\r\n * @param {String} text \r\n */\r\nexport const getResultSearchText = (text) => fetchRequest(`get-result-search.php?search-field=${text}`);\r\n/**\r\n * Получение задаччи по её ID\r\n * @param {Number} idTask \r\n */\r\nexport const getTask = (idTask) => fetchRequest(`get-task.php?task=ajax&id=${idTask}`);","import toastr from 'toastr';\r\n\r\ntoastr.options = {\r\n closeButton: false,\r\n debug: false,\r\n newestOnTop: false,\r\n progressBar: true,\r\n positionClass: `toast-top-center`,\r\n onclick: null,\r\n showDuration: `300`,\r\n hideDuration: `1000`,\r\n extendedTimeOut: `1000`,\r\n showEasing: `swing`,\r\n hideEasing: `linear`,\r\n showMethod: `fadeIn`,\r\n hideMethod: `fadeOut`\r\n};\r\n/**\r\n * Сообщение для пользователя\r\n * @param {String} type (`info`, `success`, `warning`, `error`)\r\n * @param {String} message `text`\r\n * @param {String} title `text`\r\n * @param {Number} time\r\n */\r\nconst showMessage = (type, message, title = ``, options = { time: 5000, preventDuplicates: false }) => {\r\n toastr.options.timeOut = options.time;\r\n toastr.options.preventDuplicates = options.preventDuplicates;\r\n if (title) {\r\n toastr[type](message, title)\r\n } else {\r\n toastr[type](message)\r\n }\r\n};\r\n/**\r\n * Типы сообщений для функции showMessage\r\n */\r\nconst TypeMessage = {\r\n INFO: `info`,\r\n SUCCESS: `success`,\r\n WARNING: `warning`,\r\n ERROR: `error`\r\n};\r\n\r\nexport { showMessage, TypeMessage }\r\n","import flatpickr from 'flatpickr';\r\nimport { Russian } from 'flatpickr/dist/l10n/ru';\r\n\r\nconst CONFIG_FLATPICKR = {\r\n locale: Russian,\r\n defaultDate: `today`,\r\n mode: `range`,\r\n dateFormat: `d.m.Y`,\r\n minDate: `today`,\r\n weekNumbers: true,\r\n wrap: true\r\n};\r\nlet fp;\r\n\r\n/**\r\n * Иницилизация flatpickr\r\n * @param elem\r\n */\r\nexport const initFlatpickr = (elem) => {\r\n fp = flatpickr(elem, CONFIG_FLATPICKR);\r\n fp.setDate(+new Date(), true, CONFIG_FLATPICKR.dateFormat);\r\n};\r\n/**\r\n * Размонтирование flatpickr\r\n */\r\nexport const destroyFlatpickr = () => {\r\n fp.destroy();\r\n}\r\n/**\r\n * Очишает данные в flatpickr и устанавливает текушую дату\r\n */\r\nexport const clearDataFlatpickr = () => {\r\n fp.clear();\r\n fp.setDate(+new Date(), true, CONFIG_FLATPICKR.dateFormat);\r\n};\r\n","import ClassicEditor from '@ckeditor/ckeditor5-build-classic';\r\nimport '@ckeditor/ckeditor5-build-classic/build/translations/ru';\r\n// import { showMessage, TypeMessage } from './show-user-message';\r\n\r\nconst CONFIG = {\r\n removePlugins: ['ImageUpload'],\r\n toolbar: ['Heading', 'bold', 'italic', '|', 'Link', 'bulletedList', 'numberedList', 'blockQuote', 'MediaEmbed', 'Undo', 'Redo'],\r\n language: 'ru',\r\n mediaEmbed: {\r\n previewsInData: true\r\n }\r\n};\r\nlet editor;\r\n/**\r\n * Инициализация ckeditor5\r\n * @param elem\r\n * @param fn - функция получения данных из редактора.\r\n */\r\nexport const initEditor = (elem, fn) => {\r\n // const MAX_CHARACTERS = 1000 || TEXTAREA.maxLength;\r\n\r\n ClassicEditor.create(elem, CONFIG)\r\n .then(newEditor => {\r\n editor = newEditor;\r\n editor.model.document.on('change:data', () => {\r\n const data = editor.getData();\r\n fn(data);\r\n });\r\n // return true\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n });\r\n\r\n};\r\n/**\r\n * Размонтирование Редактора\r\n */\r\nexport const destroyEditor = () => {\r\n editor.destroy()\r\n .catch(error => {\r\n console.log(error);\r\n });\r\n}\r\n/**\r\n * Очишает введеные данные в ckeditor5\r\n */\r\nexport const clearDataEditor = () => {\r\n editor.setData('')\r\n};\r\n","import React from \"react\";\r\nimport \"./user-menu.scss\"\r\nimport PropTypes from \"prop-types\";\r\nimport { Link, withRouter } from \"react-router-dom\";\r\nimport {deleteCookie, getActiveMenuLinks } from \"../../helpers/helpers\";\r\nimport {logOut} from \"../../data/data\";\r\nimport {showMessage, TypeMessage} from \"../../plugins/show-message\";\r\nimport { connect} from \"react-redux\";\r\n\r\nconst UserMenu = ({ user, url, history}) => {\r\n const handleClickExit = (evt) => {\r\n evt.preventDefault();\r\n\r\n const isQuestion = window.confirm(`Вы действительно хотите выйти?`);\r\n if (isQuestion) {\r\n logOut()\r\n .then(response => {\r\n showMessage(response.msgsType, '', response.textMsgs);\r\n if (response.msgsType === 'success') {\r\n deleteCookie('PHPSESSID');\r\n deleteCookie('userInfo');\r\n history.push('/sing-in');\r\n }\r\n return true;\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, );\r\n });\r\n }\r\n }\r\n\r\n return (\r\n \r\n )\r\n};\r\n\r\nUserMenu.propTypes = {\r\n url: PropTypes.string.isRequired,\r\n user: PropTypes.shape({\r\n surname: PropTypes.string,\r\n name: PropTypes.string,\r\n patronymic: PropTypes.string\r\n }).isRequired\r\n};\r\n\r\nconst mapStateToProps = (state) => ({ user: state.user })\r\n\r\nexport default withRouter(\r\n connect(mapStateToProps)(UserMenu)\r\n)\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport \"./task.scss\";\r\nimport {hasDateExpired} from \"../../helpers/helpers\";\r\nimport dompurify from 'dompurify';\r\nimport { Link } from \"react-router-dom\";\r\n\r\nconst sanitizer = dompurify.sanitize;\r\n\r\nconst renderDesc = (isShow, stringAndTags) => {\r\n return isShow ? sanitizer(stringAndTags) : \"\";\r\n}\r\n\r\nconst getTaskContent = (props) => {\r\n const {\r\n isShowDesc,\r\n isMore,\r\n task,\r\n userId\r\n } = props;\r\n const {\r\n task_date_end,\r\n task_title,\r\n task_desc,\r\n task_date_start,\r\n task_status,\r\n task_date_no_limit,\r\n task_id,\r\n author_name,\r\n author_surname,\r\n author_patronymic,\r\n executor_id,\r\n executor_name,\r\n executor_patronymic,\r\n executor_surname\r\n } = task;\r\n \r\n return (\r\n \r\n

{task_title}

\r\n
\r\n
\r\n
\r\n
Начало задачи: {task_date_start}\r\n
\r\n
Закончить задачу до: {Number(task_date_no_limit) === 1 ? 'без даты окончания' : task_date_end}\r\n
\r\n
Статус: {Number(task_status) ? 'Выполнено.': 'В работе.'}\r\n
\r\n
\r\n {\r\n !Number(task_status) && (userId === Number(executor_id))\r\n ? Выполнить задачу\r\n : \"\"\r\n }\r\n
\r\n
Назначил: {author_surname} {author_name} {author_patronymic}\r\n
\r\n
Испонитель: {executor_surname} {executor_name} {executor_patronymic}\r\n
\r\n
\r\n {\r\n isMore ?\r\n ({ ...location, pathname: `/task/${task_id}` })}\r\n className=\"link\"\r\n >Подробнее\r\n : ''\r\n }\r\n
\r\n )\r\n}\r\n\r\nexport const Task = (props) => {\r\n const {\r\n isShowDesc,\r\n isTasks,\r\n task\r\n } = props;\r\n const {\r\n task_date_end,\r\n task_date_no_limit\r\n } = task;\r\n\r\n if (isTasks) {\r\n return (\r\n getTaskContent(props)\r\n )\r\n }\r\n\r\n const classTaskExpired = hasDateExpired(task_date_end) && Number(task_date_no_limit) === 0 ? `task_expired` : ``;\r\n\r\n return (\r\n
\r\n {getTaskContent(props)}\r\n
\r\n )\r\n}\r\n\r\nTask.propTypes = {\r\n isShowDesc: PropTypes.bool.isRequired,\r\n isMore: PropTypes.bool.isRequired,\r\n task: PropTypes.shape({\r\n task_date_end: PropTypes.string.isRequired,\r\n task_title: PropTypes.string.isRequired,\r\n task_date_start: PropTypes.string.isRequired,\r\n task_status: PropTypes.string.isRequired,\r\n author_name: PropTypes.string.isRequired,\r\n executor_name: PropTypes.string.isRequired,\r\n task_id: PropTypes.string.isRequired\r\n }).isRequired,\r\n handleClickMore: PropTypes.func\r\n};\r\n\r\nexport default Task\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport Task from \"../task/task\";\r\nimport { hasDateExpired } from \"../../helpers/helpers\";\r\nimport \"./tasks.scss\";\r\n\r\nconst option = {\r\n isMore: true,\r\n isShowDesc: false,\r\n isTasks: true\r\n};\r\n\r\nexport const Tasks = (props) => {\r\n const {\r\n title,\r\n tasks,\r\n userId\r\n } = props;\r\n\r\n return (\r\n
\r\n

{title}

\r\n {\r\n tasks.length ?\r\n
    \r\n {\r\n tasks.map((task)=> {\r\n const classTaskItem = option.isTasks ? 'task' : '';\r\n const classTaskExpired = hasDateExpired(task.task_date_end) && Number(task.task_date_no_limit) === 0 ? `task_expired` : ``;\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n })\r\n }\r\n
:\r\n
Нет никаких задач
\r\n }\r\n
\r\n )\r\n};\r\n\r\nTasks.propTypes = {\r\n title: PropTypes.string.isRequired,\r\n tasks: PropTypes.array.isRequired,\r\n handleClickMore: PropTypes.func\r\n};\r\nexport default Tasks","import React from \"react\";\r\nimport \"./pagination.scss\"\r\n\r\nconst Pagination = (props) => {\r\n const {pagesCount, pageCurrentPagination} = props;\r\n const arr = new Array(pagesCount).fill(pagesCount);\r\n const lastPage = arr.length;\r\n const pagePrev = (pageCurrentPagination - 1) === 0 ? 1 : (pageCurrentPagination - 1);\r\n const pageNext = (pageCurrentPagination + 1) > lastPage ? lastPage : (pageCurrentPagination + 1);\r\n\r\n return (\r\n \r\n )\r\n};\r\n\r\nexport default Pagination","import React from \"react\";\r\nimport \"./loading-data.scss\";\r\n\r\nconst LoadingData = () => {\r\n return (\r\n
\r\n
\r\n
Загрузка данных
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n )\r\n};\r\n\r\nexport default LoadingData","import React, { Component } from \"react\";\r\nimport SearchByTasks from \"../components/search-by-tasks/search-by-tasks\";\r\nimport UserMenu from \"../components/user-menu/user-menu\";\r\nimport Tasks from \"../components/tasks/tasks\";\r\nimport Pagination from \"../components/pagination/pagination\";\r\nimport {\r\n getActiveTitleTasks,\r\n deleteTaskFromArrTasks,\r\n checkLoggedUser,\r\n getTextInSearchParams\r\n} from \"../helpers/helpers\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport {\r\n getMyTasks,\r\n getMyTasksDone,\r\n getDesignatedTasks,\r\n getDesignatedTasksDone,\r\n executeTask,\r\n getResultSearchText\r\n} from \"../data/data\";\r\nimport { TypeMessage, showMessage } from '../plugins/show-message';\r\nimport LoadingData from '../components/loading-data/loading-data';\r\nimport { connect } from \"react-redux\";\r\nimport { allTasks } from \"../actions\";\r\nimport { withRouter } from \"react-router-dom\";\r\n\r\nclass PageTasks extends Component {\r\n constructor(props){\r\n super(props);\r\n this.initialState = {\r\n itemsTasks: 9,\r\n pagesCount: 0,\r\n pageCurrentPagination: 1,\r\n loading: true,\r\n };\r\n this.state = this.initialState;\r\n\r\n this._handleClickExecuteTask = this._handleClickExecuteTask.bind(this);\r\n this._handleClickChangePagePagination = this._handleClickChangePagePagination.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n const { url } = this.props.match;\r\n\r\n if (url === '/search') {\r\n const textSearch = getTextInSearchParams(this.props.location);\r\n this._getSearchData(textSearch);\r\n } else {\r\n const dataFunc = this._getFuncData(url);\r\n this._getData(dataFunc);\r\n }\r\n }\r\n\r\n shouldComponentUpdate(nextProps, nextState) {\r\n const { url: currUrl } = this.props.match;\r\n const { url: nextUrl } = nextProps.match;\r\n\r\n const isUpdate = (currUrl !== nextUrl) && (nextUrl !== '/search');\r\n\r\n if (isUpdate) {\r\n const dataFunc = this._getFuncData(nextUrl);\r\n this._getData(dataFunc);\r\n return true;\r\n }\r\n\r\n const textSearchCurr = getTextInSearchParams(this.props.location);\r\n const textSearchNext = getTextInSearchParams(nextProps.location);\r\n const isPageSearch = (currUrl === '/search') || (nextUrl === '/search');\r\n\r\n if (isPageSearch && (textSearchCurr !== textSearchNext)) {\r\n this._getSearchData(textSearchNext);\r\n return true;\r\n }\r\n\r\n return (nextState.loading !== this.state.loading) ||\r\n (nextState.pageCurrentPagination !== this.state.pageCurrentPagination);\r\n }\r\n\r\n render() {\r\n if (!checkLoggedUser()) {\r\n return ()\r\n }\r\n\r\n const {\r\n tasks,\r\n user,\r\n match,\r\n location\r\n } = this.props;\r\n\r\n const { url } = match;\r\n const { userId } = user;\r\n const textSearch = getTextInSearchParams(location);\r\n\r\n const {\r\n pageCurrentPagination,\r\n itemsTasks,\r\n pagesCount\r\n } = this.state;\r\n\r\n const visibleTasks = tasks.length ?\r\n tasks.slice((pageCurrentPagination - 1) * itemsTasks, pageCurrentPagination * itemsTasks) :\r\n tasks;\r\n\r\n return (\r\n \r\n \r\n {\r\n this.state.loading ?\r\n :\r\n \r\n \r\n \r\n {\r\n tasks.length > itemsTasks ?\r\n \r\n :\r\n null\r\n }\r\n \r\n }\r\n \r\n )\r\n }\r\n\r\n _getData(fn) {\r\n this.setState({\r\n loading: true,\r\n pageCurrentPagination: this.initialState.pageCurrentPagination\r\n });\r\n\r\n fn()\r\n .then(tasks => {\r\n if (tasks.msgsType === 'error') {\r\n this.props.getTasksDispatch([])\r\n return true\r\n }\r\n\r\n this.props.getTasksDispatch(tasks);\r\n\r\n const lengthTasks = tasks.length;\r\n\r\n this.setState((state) => {\r\n const { itemsTasks } = state;\r\n\r\n return {\r\n pagesCount: Math.ceil((lengthTasks / itemsTasks))\r\n }\r\n });\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, 'Ошибка получения данных.');\r\n })\r\n .finally(() => {\r\n this.setState({ loading: false });\r\n });\r\n }\r\n\r\n _getFuncData(url) {\r\n switch (url) {\r\n case \"/my-tasks-done\":\r\n return getMyTasksDone\r\n case \"/designated-tasks\":\r\n return getDesignatedTasks\r\n case \"/designated-tasks-done\":\r\n return getDesignatedTasksDone\r\n default:\r\n return getMyTasks\r\n }\r\n }\r\n\r\n _handleClickExecuteTask(evt) {\r\n const idTask = evt.target.dataset.idTask;\r\n const title = evt.target.dataset.title;\r\n\r\n const isQuestion = window.confirm(`Вы хотите выполнить задачу - ${title}?`)\r\n\r\n if (isQuestion) {\r\n executeTask(idTask)\r\n .then(result => {\r\n showMessage(result.msgsType, '', result.textMsgs);\r\n if (result.msgsType === 'success') {\r\n const newTasks = deleteTaskFromArrTasks(this.props.tasks, idTask);\r\n\r\n this.props.getTasksDispatch(newTasks);\r\n }\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, 'Произошла ошибка.');\r\n });\r\n }\r\n }\r\n\r\n _handleClickChangePagePagination(evt) {\r\n evt.preventDefault();\r\n this.setState({\r\n pageCurrentPagination: +evt.target.dataset.pageIdPag\r\n });\r\n }\r\n\r\n _getSearchData(textSearch) {\r\n getResultSearchText(textSearch)\r\n .then(tasks => {\r\n if (tasks.msgsType === 'warning') {\r\n this.props.getTasksDispatch([]);\r\n this.setState({\r\n pageCurrentPagination: this.initialState.pageCurrentPagination\r\n })\r\n return true\r\n }\r\n\r\n this.props.getTasksDispatch(tasks);\r\n\r\n const lengthTasks = tasks.length;\r\n\r\n this.setState((state) => {\r\n const { itemsTasks } = state;\r\n\r\n return {\r\n pagesCount: Math.ceil((lengthTasks / itemsTasks))\r\n }\r\n })\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, 'Ошибка получения данных.');\r\n })\r\n .finally(() => {\r\n this.setState({ loading: false });\r\n });\r\n }\r\n}\r\n\r\nconst mapStateToProps = (state) => ({\r\n user: state.user,\r\n tasks: state.tasks\r\n})\r\n\r\nconst mapDispatchToProps = (dispatch) => {\r\n return {\r\n getTasksDispatch: (tasks) => {\r\n dispatch(allTasks(tasks));\r\n }\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(PageTasks));\r\n","export const allTasks = (payload) => ({ type: 'GET_TASKS', payload });\r\n","export const ConfMinAndMax = Object.freeze({\r\n MIN_LENGTH_LOGIN: 2,\r\n MAX_LENGTH_LOGIN: 20,\r\n MIN_LENGTH_PASSWORD: 6,\r\n MAX_LENGTH_PASSWORD: 20,\r\n MIN_LENGTH_TEXT: 2,\r\n MAX_LENGTH_TEXT: 20\r\n });\r\nexport const ConfMinAndMaxAddTask = Object.freeze({\r\n MIN_LENGTH_TEXT: 2,\r\n MAX_LENGTH_TEXT_TITLE: 255,\r\n MAX_LENGTH_TEXT_DESK: 255,\r\n });\r\nexport const ConfTimes = Object.freeze({\r\n REDIRECTION_SIGN_IN_TIME: 3000,\r\n REDIRECTION_TASKS_TIME: 3000,\r\n });\r\n","import React, { Component } from \"react\";\r\nimport \"./forms.scss\";\r\nimport {checkLengthMinMaxStr, getCookie} from \"../../helpers/helpers\";\r\nimport { ConfMinAndMax } from \"../../vars/vars\";\r\nimport { checkLoggedUser } from \"../../helpers/helpers\";\r\nimport { signInUser } from \"../../data/data\";\r\nimport { TypeMessage, showMessage } from '../../plugins/show-message';\r\n\r\nimport { Link, withRouter } from \"react-router-dom\";\r\nimport { connect} from \"react-redux\";\r\nimport { getUserInfo } from \"../../actions\";\r\n\r\n\r\nclass FormSingIn extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.initialState = {\r\n login: \"\",\r\n password: \"\",\r\n validForm: false\r\n };\r\n this.state = this.initialState;\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n

Авторизация

\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n Войти\r\n
\r\n
\r\n Зарегистрироваться\r\n
\r\n \r\n )\r\n }\r\n\r\n _validateForm = (state) => {\r\n const {login, password} = state;\r\n const isValidLogin = checkLengthMinMaxStr(login, ConfMinAndMax.MIN_LENGTH_LOGIN, ConfMinAndMax.MAX_LENGTH_LOGIN);\r\n const isValidPassword = checkLengthMinMaxStr(password, ConfMinAndMax.MIN_LENGTH_PASSWORD, ConfMinAndMax.MAX_LENGTH_PASSWORD);\r\n\r\n return isValidLogin && isValidPassword;\r\n };\r\n\r\n _handleLoginChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n login: value,\r\n validForm: this._validateForm(Object.assign({}, state, {login: value}))\r\n }));\r\n };\r\n\r\n _handlePasswordChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n password: value,\r\n validForm: this._validateForm(Object.assign({}, state, {password: value}))\r\n }));\r\n };\r\n\r\n _handleSubmitForm = (evt) => {\r\n evt.preventDefault();\r\n\r\n let formData = new FormData(evt.target);\r\n formData.append('signin', 'ajax');\r\n\r\n signInUser(formData)\r\n .then(result => {\r\n showMessage(result.msgsType, '', result.textMsgs);\r\n if (result.msgsType === 'success') {\r\n this.setState(this.initialState);\r\n\r\n if (checkLoggedUser()) {\r\n const userInfo = getCookie(\"userInfo\").split(\";\");\r\n const user = getUserInfo({\r\n name: userInfo[0],\r\n surname: userInfo[1],\r\n patronymic: userInfo[2],\r\n userId: Number(userInfo[3])\r\n });\r\n\r\n this.props.getUserInfoToProps(user);\r\n this.props.history.push('/');\r\n }\r\n }\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, 'Произошла ошибка.');\r\n });\r\n };\r\n}\r\n\r\nconst mapDispatchToProps = (dispatch) => {\r\n return {\r\n getUserInfoToProps: (user) => (dispatch(user))\r\n }\r\n}\r\n\r\nexport default withRouter(\r\n connect(null, mapDispatchToProps)(FormSingIn)\r\n)\r\n","import React from \"react\";\r\nimport FormSingIn from \"../components/forms/form-sing-in\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport { checkLoggedUser} from \"../helpers/helpers\";\r\n\r\n\r\nconst PageSingIn = () => {\r\n\r\n if (checkLoggedUser()) {\r\n return ()\r\n }\r\n\r\n return (\r\n \r\n )\r\n};\r\nexport default PageSingIn\r\n","import React, { Component } from \"react\";\r\nimport \"./forms.scss\"\r\nimport { checkLengthMinMaxStr } from \"../../helpers/helpers\";\r\nimport { ConfMinAndMax } from \"../../vars/vars\";\r\nimport { showMessage, TypeMessage } from \"../../plugins/show-message\";\r\nimport { signUpUser } from \"../../data/data\";\r\n\r\nimport { Link} from \"react-router-dom\";\r\n\r\nclass FormSingUp extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.initialState = {\r\n login: \"\",\r\n password: \"\",\r\n password2: \"\",\r\n name: \"\",\r\n surname: \"\",\r\n patronymic: \"\",\r\n validForm: false\r\n };\r\n\r\n this.state = this.initialState;\r\n }\r\n\r\n render() { \r\n return (\r\n \r\n

Регистрация нового пользователя\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n Зарегистрироваться\r\n
\r\n
\r\n Авторизоваться\r\n
\r\n \r\n )\r\n }\r\n\r\n _validateForm = (state) => {\r\n const { login, password, password2, name, surname, patronymic } = state;\r\n const isValidLogin = checkLengthMinMaxStr(login, ConfMinAndMax.MIN_LENGTH_LOGIN, ConfMinAndMax.MAX_LENGTH_LOGIN);\r\n const isValidPassword = checkLengthMinMaxStr(password, ConfMinAndMax.MIN_LENGTH_PASSWORD, ConfMinAndMax.MAX_LENGTH_PASSWORD);\r\n const isValidPassword2 = checkLengthMinMaxStr(password2, ConfMinAndMax.MIN_LENGTH_PASSWORD, ConfMinAndMax.MAX_LENGTH_PASSWORD);\r\n const isValidEquallyPassword = password === password2;\r\n const isValidName = checkLengthMinMaxStr(name, ConfMinAndMax.MIN_LENGTH_TEXT, ConfMinAndMax.MAX_LENGTH_TEXT);\r\n const isValidSurname = checkLengthMinMaxStr(surname, ConfMinAndMax.MIN_LENGTH_TEXT, ConfMinAndMax.MAX_LENGTH_TEXT);\r\n const isValidPatronymic = checkLengthMinMaxStr(patronymic, ConfMinAndMax.MIN_LENGTH_TEXT, ConfMinAndMax.MAX_LENGTH_TEXT);\r\n\r\n return isValidLogin && isValidPassword && isValidPassword2 && isValidEquallyPassword && isValidName && isValidSurname && isValidPatronymic;\r\n };\r\n\r\n _handleLoginChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n login: value,\r\n validForm: this._validateForm(Object.assign({}, state, { login: value }))\r\n }));\r\n };\r\n\r\n _handlePasswordChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n password: value,\r\n validForm: this._validateForm(Object.assign({}, state, { password: value }))\r\n }));\r\n };\r\n\r\n _handlePassword2Change = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n password2: value,\r\n validForm: this._validateForm(Object.assign({}, state, { password2: value }))\r\n }));\r\n };\r\n\r\n _handleNameChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n name: value,\r\n validForm: this._validateForm(Object.assign({}, state, { name: value }))\r\n }));\r\n };\r\n\r\n _handleSurnameChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n surname: value,\r\n validForm: this._validateForm(Object.assign({}, state, { surname: value }))\r\n }));\r\n };\r\n\r\n handlePatronymicChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n patronymic: value,\r\n validForm: this._validateForm(Object.assign({}, state, { patronymic: value }))\r\n }));\r\n };\r\n\r\n _handleSubmitForm = (evt) => {\r\n evt.preventDefault();\r\n\r\n let formData = new FormData(evt.target);\r\n formData.append('signup', 'ajax');\r\n\r\n signUpUser(formData)\r\n .then(result => {\r\n showMessage(result.msgsType, '', result.textMsgs);\r\n if (result.msgsType === 'success') {\r\n this.setState(this.initialState);\r\n\r\n return true\r\n }\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, 'Произошла ошибка.');\r\n });\r\n };\r\n\r\n _onBlurInput = () => {\r\n const { password, password2 } = this.state;\r\n if (password.length >= ConfMinAndMax.MIN_LENGTH_PASSWORD && password !== password2) {\r\n showMessage(TypeMessage.WARNING, `В поле \"Повторите пароль\", пароль не совпадает с полем \"Пароль\"!`);\r\n }\r\n };\r\n}\r\nexport default FormSingUp","import React from \"react\";\r\nimport FormSingUp from \"../components/forms/form-sing-up\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport { checkLoggedUser} from \"../helpers/helpers\";\r\n\r\n\r\nconst PageSingUp = () => {\r\n if (checkLoggedUser()) {\r\n return ()\r\n }\r\n\r\n return (\r\n \r\n )\r\n};\r\nexport default PageSingUp\r\n","import React, { Component } from \"react\";\r\nimport \"./forms.scss\";\r\n\r\nimport { initFlatpickr, destroyFlatpickr } from \"../../plugins/flatpickr\";\r\nimport { initEditor, destroyEditor } from \"../../plugins/editor\";\r\nimport { checkLengthMinMaxStr } from \"../../helpers/helpers\";\r\nimport { ConfMinAndMaxAddTask } from \"../../vars/vars\";\r\nimport { getAllUsers } from \"../../data/data\";\r\nimport { TypeMessage, showMessage } from '../../plugins/show-message';\r\nimport { addTask } from \"../../data/data\";\r\nimport { clearDataEditor } from \"../../plugins/editor\";\r\nimport { clearDataFlatpickr } from \"../../plugins/flatpickr\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\nimport { connect } from \"react-redux\";\r\nimport { allUsers } from \"../../actions\";\r\n\r\n\r\nclass FormAddTask extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.initialState = {\r\n selectedDates: \"\",\r\n isCheckedDateNoLimit: false,\r\n valueSelect: \"disabled\",\r\n titleTask: \"\",\r\n descTask: \"\",\r\n validForm: false,\r\n };\r\n this.state = this.initialState;\r\n\r\n this.inputDatesRef = React.createRef();\r\n this.textareaRef = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n initFlatpickr(this.inputDatesRef.current);\r\n initEditor(this.textareaRef.current, this._handleDescTaskChange);\r\n getAllUsers()\r\n .then(users => {\r\n if (users.msgsType === 'error') {\r\n this.props.getAllUsersDispatch([]);\r\n return;\r\n }\r\n\r\n this.props.getAllUsersDispatch(users);\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, 'Ошибка получения данных.');\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n destroyEditor();\r\n destroyFlatpickr();\r\n }\r\n\r\n render() {\r\n const { userId: userIdCurrent } = this.props.user;\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n Выберите исполнителя\r\n \r\n \r\n {\r\n this.props.users.map(user => (\r\n { userIdCurrent === Number(user.user_id) ? \"Я\" : `${user.user_surname} ${user.user_name} ${user.user_patronymic}` } \r\n ))\r\n }\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n Добавить задачу\r\n К списку моих задач\r\n
\r\n \r\n )\r\n }\r\n\r\n _validateForm = (state) => {\r\n const { selectedDates, valueSelect, titleTask, descTask } = state;\r\n const isValidValueSelect = valueSelect !== \"disabled\";\r\n const isValidTitleTask = checkLengthMinMaxStr(titleTask, ConfMinAndMaxAddTask.MIN_LENGTH_TEXT, ConfMinAndMaxAddTask.MAX_LENGTH_TEXT_TITLE);\r\n const isValidDescTask = checkLengthMinMaxStr(descTask, ConfMinAndMaxAddTask.MIN_LENGTH_TEXT, ConfMinAndMaxAddTask.MAX_LENGTH_TEXT_DESK);\r\n\r\n return selectedDates && isValidValueSelect && isValidTitleTask && isValidDescTask;\r\n };\r\n\r\n _handleDatesChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n selectedDates: value,\r\n validForm: this._validateForm(Object.assign(state, { selectedDates: value }))\r\n }));\r\n };\r\n\r\n _handleDateNoLimitChange = () => {\r\n this.setState((state) => ({\r\n isCheckedDateNoLimit: !state.isCheckedDateNoLimit\r\n }));\r\n };\r\n\r\n _handleTitleTaskChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n titleTask: value,\r\n validForm: this._validateForm(Object.assign(state, { titleTask: value }))\r\n }));\r\n };\r\n\r\n _handleDescTaskChange = (data) => {\r\n this.setState((state) => ({\r\n descTask: data,\r\n validForm: this._validateForm(Object.assign(state, { descTask: data }))\r\n }));\r\n };\r\n\r\n _handleSelectChange = (evt) => {\r\n const value = evt.target.value;\r\n this.setState((state) => ({\r\n valueSelect: value,\r\n validForm: this._validateForm(Object.assign(state, { valueSelect: value }))\r\n }));\r\n };\r\n\r\n handleSubmitForm = (evt) => {\r\n evt.preventDefault();\r\n let FORM_DATA = new FormData(evt.target);\r\n FORM_DATA.append('add-task', 'ajax');\r\n\r\n addTask(FORM_DATA)\r\n .then(result => {\r\n showMessage(result.msgsType, '', result.textMsgs);\r\n if (result.msgsType === 'success') {\r\n this.setState({\r\n isCheckedDateNoLimit: false,\r\n valueSelect: \"disabled\",\r\n titleTask: \"\",\r\n validForm: false,\r\n })\r\n\r\n clearDataEditor();\r\n clearDataFlatpickr();\r\n }\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, 'Произошла ошибка.');\r\n });\r\n };\r\n}\r\n\r\nconst mapStateToProps = (state) => ({\r\n user: state.user,\r\n users: state.users\r\n})\r\n\r\nconst mapDispatchToProps = (dispatch) => {\r\n return {\r\n getAllUsersDispatch: (users) => {\r\n dispatch(allUsers(users));\r\n }\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(FormAddTask);\r\n","export const allUsers = (payload) => ({ type: 'GET_ALL_USERS', payload });\r\n","import React from \"react\";\r\nimport FormAddTask from \"../components/forms/form-add-task\";\r\n\r\nimport { Redirect } from \"react-router-dom\";\r\nimport { checkLoggedUser } from '../helpers/helpers'\r\n\r\nconst PageAddTask = () => {\r\n\r\n if (!checkLoggedUser()) {\r\n return ()\r\n }\r\n\r\n return (\r\n \r\n )\r\n};\r\nexport default PageAddTask\r\n","import React, { Component } from \"react\";\r\nimport Task from \"../components/task/task\"\r\nimport UserMenu from \"../components/user-menu/user-menu\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport LoadingData from '../components/loading-data/loading-data';\r\nimport { getTask, executeTask } from \"../data/data\";\r\nimport { TypeMessage, showMessage } from '../plugins/show-message';\r\nimport { checkLoggedUser } from \"../helpers/helpers\";\r\nimport {connect} from \"react-redux\";\r\nimport { fetchTask, toPerformTask } from \"../actions\";\r\n\r\n\r\nconst option = {\r\n isMore: false,\r\n isShowDesc: true\r\n};\r\n\r\nclass PageTask extends Component {\r\n constructor(props){\r\n super(props);\r\n this.initialState = {\r\n loading: true\r\n };\r\n this.state = this.initialState;\r\n\r\n this._handleClickExecuteTask = this._handleClickExecuteTask.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n const idTask = this.props.idTask;\r\n\r\n getTask(idTask)\r\n .then(task => {\r\n if (task.msgsType === 'error') {\r\n this.props.fetchTaskDispatch(null);\r\n }\r\n\r\n this.props.fetchTaskDispatch(task);\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, 'Ошибка получения данных.');\r\n })\r\n .finally(() => {\r\n this.setState({ loading: false });\r\n });\r\n }\r\n\r\n render() {\r\n if (!checkLoggedUser()) {\r\n return ()\r\n }\r\n\r\n const {\r\n user,\r\n handleClickExit,\r\n url,\r\n task\r\n } = this.props;\r\n\r\n const { userId } = user;\r\n\r\n return (\r\n \r\n \r\n {\r\n this.state.loading ?\r\n :\r\n task ?\r\n :\r\n

Такая задача не существует!

\r\n }\r\n
\r\n )\r\n }\r\n\r\n _handleClickExecuteTask(evt) {\r\n const idTask = evt.target.dataset.idTask;\r\n const title = evt.target.dataset.title;\r\n\r\n const isQuestion = window.confirm(`Вы хотите выполнить задачу - ${title}?`)\r\n\r\n if (isQuestion) {\r\n executeTask(idTask)\r\n .then(result => {\r\n showMessage(result.msgsType, '', result.textMsgs);\r\n if (result.msgsType === 'success') {\r\n this.props.executeTaskDispatch(this.props.task);\r\n }\r\n })\r\n .catch(e => {\r\n console.error(e);\r\n showMessage(TypeMessage.ERROR, e, 'Произошла ошибка.');\r\n });\r\n }\r\n }\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n user: state.user,\r\n task: state.task\r\n }\r\n}\r\n\r\nconst mapDispatchToProps = (dispatch) => {\r\n return {\r\n fetchTaskDispatch: (task) => {\r\n dispatch(fetchTask(task));\r\n },\r\n executeTaskDispatch: (task) => {\r\n dispatch(toPerformTask(task));\r\n }\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(PageTask);\r\n","export const fetchTask = (payload) => ({type: 'FETCH_TASK', payload});\r\nexport const toPerformTask = (payload) => ({type: 'EXECUTE_TASK', payload});\r\n","import React, { Component } from 'react';\nimport Container from \"./components/container/container\";\nimport Footer from './components/footer/footer';\nimport { getCookie, checkLoggedUser } from \"./helpers/helpers\";\n\nimport { BrowserRouter as Router, Route, Switch } from 'react-router-dom';\nimport { connect} from \"react-redux\";\nimport { getUserInfo} from \"./actions\";\n\nimport PageTasks from './pages/page-tasks';\nimport PageSingIn from './pages/page-sign-in';\nimport PageSingUp from './pages/page-sign-up';\nimport PageAddTask from \"./pages/page-add-task\";\nimport PageTask from \"./pages/page-task\";\n\nimport 'normalize.css';\nimport './Common.scss';\n\nexport class App extends Component {\n componentDidMount() {\n if (checkLoggedUser()) {\n const userInfo = getCookie(\"userInfo\").split(\";\");\n const user = getUserInfo({\n name: userInfo[0],\n surname: userInfo[1],\n patronymic: userInfo[2],\n userId: Number(userInfo[3])\n });\n\n this.props.getUserInfoDispatch(user);\n }\n }\n\n render() {\n return (\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {\n const { id } = match.params;\n\n return \n }\n }\n />\n \n

Такой страницы нету!

\n
\n
\n
\n
\n