(function(t,e){"object"==typeofexports&&"object"==typeofmodule?module.exports=e():"function"==typeofdefine&&define.amd?define([],e):"object"==typeofexports?exports.timesheetpersonresume=e():t.timesheetpersonresume=e()})("undefined"!=typeofself?self:this,function(){returnfunction(t){functione(i){if(s[i])returns[i].exports;varr=s[i]={i:i,l:!1,exports:{}};returnt[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}vars={};returne.m=t,e.c=s,e.d=function(t,s,i){e.o(t,s)||Object.defineProperty(t,s,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){vars=t&&t.__esModule?function(){returnt.default}:function(){returnt};returne.d(s,"a",s),s},e.o=function(t,e){returnObject.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=1)}([function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{datas:{required:!0}},data:function(){return{debug:null}},computed:{years:function(){vart=this,e={};returnObject.keys(this.datas.periods).forEach(function(s){if(!t.datas.periods[s].futur){vari=s.split("-"),r=i[0];i[1];e.hasOwnProperty(r)||(e[r]={periods:{},total:0,periodDuration:0,total_activities:0,total_horslots:0}),e[r].periods[s]=t.datas.periods[s],e[r].total+=t.datas.periods[s].total,e[r].periodDuration+=t.datas.periods[s].periodDuration,e[r].total_activities+=t.datas.periods[s].total_activities,e[r].total_horslots+=t.datas.periods[s].total_horslots}}),e},periods:function(){vart=this,e=[];returnObject.keys(this.datas.periods).forEach(function(s){e.push(t.datas.periods[s])}),e}},methods:{getActivity:function(t){}}}},function(t,e,s){t.exports=s(2)},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});vari=s(0),r=s.n(i);for(varaini)"default"!==a&&function(t){s.d(e,t,function(){returni[t]})}(a);varo=s(4),n=s(3),l=n(r.a,o.a,!1,null,null,null);e.default=l.exports},function(t,e){t.exports=function(t,e,s,i,r,a){varo,n=t=t||{},l=typeoft.default;"object"!==l&&"function"!==l||(o=t,n=t.default);varc="function"==typeofn?n.options:n;e&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0),s&&(c.functional=!0),r&&(c._scopeId=r);var_;if(a?(_=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof__VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=_):i&&(_=i),_){vard=c.functional,u=d?c.render:c.beforeCreate;d?(c._injectStyles=_,c.render=function(t,e){return_.call(e),u(t,e)}):c.beforeCreate=u?[].concat(u,_):[_]}return{esModule:o,exports:n,options:c}}},function(t,e,s){"use strict";vari=function(){vart=this,e=t.$createElement,s=t._self._c||e;returns("div",[s("h1",[t._v("Vos déclarations")]),t._v(""),t.debug?s("div",{staticClass:"overlay"},[s("div",{staticClass:"overlay-content"},[s("button",{on:{click:function(e){t.debug=null}}},[t._v("close")]),t._v(""),s("pre",[t._v(t._s(t.debug))])])]):t._e(),t._v(""),s("pre",[t._v(t._s(t.debug))]),t._v(""),s("table",{staticClass:"table declarations-resume"},[t._m(0),t._v(""),t._l(t.years,function(e,i){return[s("tr",{staticClass:"heading-year"},[s("th",{attrs:{colspan:"7"}},[t._v(t._s(i))])]),t._v(""),s("tbody",{staticClass:"yearrow"},[t._l(e.periods,function(e){returns("tr",{class:{"valid-100":e.total==e.periodDuration,"valid-95":e.total>=.95*e.periodDuration&&e.total<e.periodDuration,"valid-105":e.total<=1.05*e.periodDuration&&e.total>e.periodDuration,"error-105":e.total>1.05*e.periodDuration,"error-95":e.total<.95*e.periodDuration}},[s("th",{staticClass:"period"},[s("strong",{on:{click:function(s){t.debug=e}}},[0==e.activities_id.length?s("i",{staticClass:"icon-ellipsis",attrs:{title:"Aucune déclaration requise pour cette période"}}):t._e(),t._v(""),e.activities_id.length&&!e.validations_id.length&&e.past?s("i",{staticClass:"icon-attention-1",attrs:{title:"Il faut déclarer pour cette période"}}):t._e(),t._v(""),e.activities_id.length&&e.validations_id.length?s("i",{staticClass:"icon-calendar",attrs:{title:"Procédure de déclaration en cours"}}):t._e(),t._v("\n\n"+t._s(t._f("period")(e.period)))])]),t._v(""),s("td",{staticClass:"required"},[e.activities_id.length?s("em",[e.validations_id.length?s("span",[s("i",{class:"icon-"+e.validation_state}),t._v(""),e.validators.length?s("small",[t._v("\n Validateur(s) :\n"),t._l(e.validators,function(e){returns("strong",{staticClass:"cartouche"},[s("i",{staticClass:"icon-user"}),t._v("\n"+t._s(e))])})],2):t._e()]):t._e(),t._v(""),"valid"==e.validation_state?s("a",{attrs:{href:"/feuille-de-temps/excel?action=export&period="+e.period+"&personid="+e.person_id}},[s("i",{staticClass:"icon-download-outline"}),t._v("\n Télécharger la feuille de temps (Excel)\n")]):s("span",[t._v("Non")])]):s("em",[t._v("\n Facultatif\n")])]),t._v(""),s("td",[t._v(t._s(e.activities_id.length))]),t._v(""),s("td",{staticClass:"soustotal text-right"},[t._v(t._s(t._f("heures")(e.total_activities)))]),t._v(""),s("td",{staticClass:"soustotal text-right"},[t._v(t._s(t._f("heures")(e.total_horslots)))]),t._v(""),s("td",{staticClass:"total text-right"},[s("i",{staticClass:"icon-time icon-clock"}),t._v(""),s("strong",[t._v(t._s(t._f("heures")(e.total)))]),t._v(""),s("small",[t._v("/ "+t._s(t._f("heures")(e.periodDuration)))])]),t._v(""),s("td",{staticClass:"total text-right"},[s("em",{staticClass:"text-danger"},[t._v(t._s(e.error))]),t._v(""),s("a",{staticClass:"xs btn btn-primary btn-xs",attrs:{href:"/feuille-de-temps/declarant?month="+e.month+"&year="+e.year}},[s("i",{staticClass:"icon-calendar"}),t._v(""),e.validations_id.length>0?[t._v("Visualiser")]:[t._v("Déclarer")]],2)])])}),t._v(""),s("tr",[s("th",[t._v("Total "+t._s(i))]),t._v(""),s("th",[t._v("")]),t._v(""),s("th",[t._v("")]),t._v(""),s("th",{staticClass:"text-right"},[t._v(t._s(t._f("heures")(e.total_activities)))]),t._v(""),s("th",{staticClass:"text-right"},[t._v(t._s(t._f("heures")(e.total_horslots)))]),t._v(""),s("th",{staticClass:"text-right"},[s("strong",[t._v(t._s(t._f("heures")(e.total)))]),s("small",[t._v("/ "+t._s(t._f("heures")(e.periodDuration)))])]),t._v(""),s("th",[t._v("")])])],2)]})],2)])},r=[function(){vart=this,e=t.$createElement,s=t._self._c||e;returns("thead",[s("tr",[s("th",[t._v("Période")]),t._v(""),s("th",[t._v("Déclarations")]),t._v(""),s("th",[t._v("Activité")]),t._v(""),s("th",[t._v("Total activité")]),t._v(""),s("th",[t._v("Total hors-activité")]),t._v(""),s("th",[t._v("Total")]),t._v(""),s("th",[t._v("Actions")])])])}],a={render:i,staticRenderFns:r};e.a=a}])});