Commit a89ba0ea authored by Stéphane Bouvry's avatar Stéphane Bouvry
Browse files

Fic buf de l'état de validation mal calculé

parent 8a1b169f
Loading
Loading
Loading
Loading
+10 −3
Changes for module/Oscar/src/Oscar/Service/TimesheetService.php: 10 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -665,6 +665,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
        $group = [];
        $periodIds = [];
        $output = [];
        $hasValidableStep = false;

        /** @var ValidationPeriod $period */
        foreach ($periods as $period) {
@@ -674,7 +675,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
            $validators = [];
            foreach ( $period->getCurrentValidators() as $v ){
                if( $v->getId() == $validator->getId() ){
                    $validateCurrentState = true;
                    $hasValidableStep = $validateCurrentState = true;
                }
                $validators[] = (string)$v;
            }
@@ -683,14 +684,15 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
            if( !array_key_exists($key, $group) ){
                $group[$key] = [
                    'period' => $period->getPeriod(),
                    'validators' => $validators,
                    'totalDays' => $periodBounds['totalDays'],
                    'periodFirstDay' => $periodBounds['firstDay'],
                    'periodLastDay' => $periodBounds['lastDay'],
                    'validableStep' => false,
                    'person' => (string)$period->getDeclarer(),
                    'person_id' => $period->getDeclarer()->getId(),
                    'declarations_activities' => [],
                    'declarations_others' => [],
                    'validableStep' => $validateCurrentState,
                    'declarations_off' => [
                        'timesheets' => [],
                        'total' => 0.0,
@@ -699,13 +701,17 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
                ];
            }

            if( $validateCurrentState == true ){
                $group[$key]['validableStep'] = true;
            }

            // Modèle commun
            $periodDatas = [
                'validationperiod_id' => $period->getId(),
                'validationperiod_object' => $period->getObject(),
                'validationperiod_objectid' => $period->getObjectId(),
                'validableStep' => $validateCurrentState,
                'validabe' => $period->isValidable(),
                'validable' => $period->isValidable(),
                'validators' => $validators,
                'currentStep' => 5,
                'total' => 0.0,
@@ -714,6 +720,7 @@ class TimesheetService implements ServiceLocatorAwareInterface, EntityManagerAwa
                'statusMessage' => $this->getStatusMessage($period->getStatus()),
            ];


            // Déclarations sur des activités
            if( $period->getObject() == 'activity' ){
                /** @var Activity $activity */
+1 −1
Changes for public/js/oscar/dist/ValidationPeriod.js: 1 added line, 1 removed line.
Original line number Diff line number Diff line
(function(t,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.ValidationPeriod=s():t.ValidationPeriod=s()})("undefined"!=typeof self?self:this,function(){return function(t){function s(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,s),n.l=!0,n.exports}var a={};return s.m=t,s.c=a,s.d=function(t,a,e){s.o(t,a)||Object.defineProperty(t,a,{configurable:!1,enumerable:!0,get:e})},s.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(a,"a",a),a},s.o=function(t,s){return Object.prototype.hasOwnProperty.call(t,s)},s.p="/",s(s.s=1)}([function(t,s,a){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var e={valid:"Validée","send-prj":"Validation projet","send-sci":"Validation scientifique","send-adm":"Validation administrative",reject:"Refusée"};s.default={filters:{status:function(t){return e[t]}},data:function(){return{error:null,declarations:null,group:"monthLabel"}},props:{bootbox:{required:!0}},computed:{periodsPerson:function(){return this.declarations}},methods:{fetch:function(){var t=this;this.$http.get().then(function(s){var a=[];Object.keys(s.body).forEach(function(t){s.body[t].open=s.body[t].validableStep,a.push(s.body[t])}),t.declarations=a},function(s){t.error="Impossible de charger les données : "+s.body})},validate:function(t){var s=this;this.bootbox.confirm("Valider cette déclaration ?",function(a){a&&s.send("valid",t,"")})},reject:function(t){var s=this;this.bootbox.prompt("Refuser cette déclaration ?",function(a){a&&s.send("reject",t,a)})},send:function(t,s,a){var e=this,n=new FormData;n.append("period_id",s),n.append("action",t),n.append("message",a),this.$http.post("",n).then(function(t){e.fetch()},function(t){e.error="Erreur : "+t.body})}},mounted:function(){this.fetch()}}},function(t,s,a){t.exports=a(2)},function(t,s,a){"use strict";function e(t){a(3)}Object.defineProperty(s,"__esModule",{value:!0});var n=a(0),i=a.n(n);for(var o in n)"default"!==o&&function(t){a.d(s,t,function(){return n[t]})}(o);var r=a(5),l=a(4),c=e,d=l(i.a,r.a,!1,c,null,null);s.default=d.exports},function(t,s){},function(t,s){t.exports=function(t,s,a,e,n,i){var o,r=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(o=t,r=t.default);var c="function"==typeof r?r.options:r;s&&(c.render=s.render,c.staticRenderFns=s.staticRenderFns,c._compiled=!0),a&&(c.functional=!0),n&&(c._scopeId=n);var d;if(i?(d=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__),e&&e.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=d):e&&(d=e),d){var _=c.functional,u=_?c.render:c.beforeCreate;_?(c._injectStyles=d,c.render=function(t,s){return d.call(s),u(t,s)}):c.beforeCreate=u?[].concat(u,d):[d]}return{esModule:o,exports:r,options:c}}},function(t,s,a){"use strict";var e=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[t.error?a("div",{staticClass:"overlay",staticStyle:{"z-index":"2002"}},[a("div",{staticClass:"content container overlay-content"},[t._m(0),t._v(" "),a("pre",{staticClass:"alert alert-danger"},[t._v(t._s(t.error))]),t._v(" "),a("p",{staticClass:"text-danger"},[t._v("\n                Si ce message ne vous aide pas, transmettez le à l'administrateur Oscar.\n            ")]),t._v(" "),a("nav",{staticClass:"buttons"},[a("button",{staticClass:"btn btn-primary",on:{click:function(s){t.error=""}}},[t._v("Fermer")])])])]):t._e(),t._v(" "),t.declarations&&t.declarations.length?a("section",{staticClass:"validation"},t._l(t.periodsPerson,function(s){return a("section",[a("h3",{class:{"has-validation":s.validableStep},on:{click:function(t){s.open=!s.open}}},[a("strong",{staticClass:"person"},[a("i",{staticClass:"icon-user"}),t._v(" "+t._s(s.person))]),t._v(" "),a("strong",{staticClass:"period"},[a("i",{staticClass:"icon-calendar"}),t._v(" "+t._s(t._f("period")(s.period)))]),t._v(" "),s.validableStep?a("small",[a("i",{staticClass:"icon-clock"}),t._v("\n                    Validation à faire\n                ")]):t._e()]),t._v(" "),a("transition",{attrs:{name:"slide"}},[a("section",{directives:[{name:"show",rawName:"v-show",value:s.open,expression:"period.open"}],staticClass:"activity card"},[a("table",{staticClass:"table table-condensed"},[a("thead",{staticClass:"heading-days"},[a("th",[t._v("~")]),t._v(" "),t._l(s.details,function(s,e){return a("th",{class:{locked:s.locked}},[a("small",[t._v(t._s(s.label))]),t._v(" "),a("strong",[t._v(t._s(e))])])}),t._v(" "),a("th",[t._v("Total")]),t._v(" "),a("th",{staticStyle:{width:"150px"}},[a("i",{staticClass:"icon-cog"}),t._v(" Validation")])],2),t._v(" "),a("tbody",[t._l(s.declarations_activities,function(e){return[a("tr",{staticClass:"heading-activity heading"},[a("th",{attrs:{colspan:s.totalDays+3}},[a("i",{staticClass:"icon-cube"}),t._v(t._s(e.label)+"\n\n                                "),a("span",{staticClass:"state",class:"state-"+e.status},[a("i",{class:"icon-"+e.status}),t._v("\n                                    "+t._s(t._f("status")(e.status))+"\n                                ")])])]),t._v(" "),t._l(e.workpackages,function(e){return a("tr",{staticClass:"datas"},[a("th",{attrs:{title:e.label}},[a("i",{staticClass:"icon-archive"}),t._v(t._s(e.code))]),t._v(" "),t._l(s.totalDays,function(s){return a("td",[e.timesheets[s]?a("strong",[t._v(t._s(t._f("duration2")(e.timesheets[s])))]):a("em",[t._v("-")])])}),t._v(" "),a("th",{staticClass:"total"},[t._v("\n                                "+t._s(t._f("duration2")(e.total))+"\n                            ")]),t._v(" "),a("th",[t._v("-")])],2)}),t._v(" "),a("tr",[a("th",{staticStyle:{"padding-left":"1em"},attrs:{colspan:s.totalDays-1}},[t._v("\n                                    Total\n                                ")]),t._v(" "),a("th",{attrs:{colspan:"2"}},[t._v(" ")]),t._v(" "),a("th",{staticClass:"total"},[t._v("\n                                    "+t._s(t._f("duration2")(e.total))+"\n                                ")]),t._v(" "),a("th",[a("small",[a("i",{class:"icon-"+e.status}),t._v(" "+t._s(e.statusMessage))]),t._v(" "),e.validableStep?a("span",[e.validableStep?a("button",{staticClass:"btn btn-success btn-xs",on:{click:function(s){t.validate(e.validationperiod_id)}}},[t._v("Valider")]):t._e(),t._v(" "),e.validableStep?a("button",{staticClass:"btn btn-danger btn-xs",on:{click:function(s){t.reject(e.validationperiod_id)}}},[t._v("Rejeter")]):t._e()]):a("span",[e.validable?a("span",[0==e.validators.length?a("span",{staticClass:"text-danger"},[a("i",{staticClass:"icon-attention-1"}),t._v(" Aucun validateur\n                                            ")]):a("div",t._l(e.validators,function(s){return a("span",{staticClass:"cartouche xs"},[t._v(t._s(s))])}))]):t._e()])])])]}),t._v(" "),s.declarations_others?[a("tr",{staticClass:"heading-activity heading"},[a("th",{attrs:{colspan:s.totalDays+3}},[a("i",{staticClass:"icon-tags"}),t._v("Hors-lot")])]),t._v(" "),t._l(s.declarations_others,function(e,n){return a("tr",{staticClass:"datas"},[a("th",[a("i",{staticClass:"hors-lot",class:"icon-"+n}),t._v(t._s(e.label)+"\n                                    "),a("span",{staticClass:"state",class:"state-"+e.status},[a("i",{class:"icon-"+e.status}),t._v("\n                                    "+t._s(t._f("status")(e.status))+"\n                                ")])]),t._v(" "),t._l(s.totalDays,function(s){return a("td",[e.timesheets[s]?a("strong",[t._v(t._s(t._f("duration2")(e.timesheets[s])))]):a("em",[t._v("-")])])}),t._v(" "),a("th",{staticClass:"total"},[t._v("\n                                    "+t._s(t._f("duration2")(e.total))+"\n                                ")]),t._v(" "),a("th",[a("small",[a("i",{class:"icon-"+e.status}),t._v(" "+t._s(e.statusMessage))]),t._v(" "),e.validableStep?a("span",[a("button",{staticClass:"btn btn-success btn-xs",on:{click:function(s){t.validate(e.validationperiod_id)}}},[t._v("Valider")]),t._v(" "),a("button",{staticClass:"btn btn-danger btn-xs",on:{click:function(s){t.reject(e.validationperiod_id)}}},[t._v("Rejeter")])]):e.validabe?a("span",[0==e.validators.length?a("span",[a("i",{staticClass:"icon-attention-1"}),t._v(" Aucun validateur\n                                        ")]):a("div",t._l(e.validators,function(s){return a("span",{staticClass:"cartouche xs"},[t._v(t._s(s))])}))]):t._e()])],2)})]:t._e(),t._v(" "),s.declarations_off&&s.declarations_off.total>0?[a("tr",{staticClass:"heading-activity heading"},[a("th",{attrs:{colspan:s.totalDays+2}},[a("i",{staticClass:"icon-lock"}),t._v("Autres déclarations ")])]),t._v(" "),a("tr",{staticClass:"datas"},[a("th",[a("small",[t._v("Vous ne pouvez pas voir le détails pour ces créneaux")])]),t._v(" "),t._l(s.totalDays,function(e){return a("td",[s.declarations_off.timesheets[e]?a("strong",[t._v(t._s(t._f("duration2")(s.declarations_off.timesheets[e])))]):a("em",[t._v("-")])])}),t._v(" "),a("th",{staticClass:"total"},[t._v("\n                                    "+t._s(t._f("duration2")(s.declarations_off.total))+"\n                                ")]),t._v(" "),a("td",[t._v("~")])],2)]:t._e()],2),t._v(" "),a("tfoot",[a("tr",{staticClass:"total-row"},[a("th",[t._v("Total période")]),t._v(" "),t._l(s.details,function(s,e){return a("td",{class:{locked:s.locked}},[s.duration?a("strong",[t._v(t._s(t._f("duration2")(s.duration)))]):a("small",[t._v("0.0")])])}),t._v(" "),a("th",{staticClass:"total"},[t._v(t._s(t._f("duration2")(s.total)))]),t._v(" "),a("td",[t._v("-")])],2)])])])])],1)})):a("section",{staticClass:"alert alert-info"},[t._v("\n        Aucune déclaration en attente\n    ")])])},n=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("h2",[a("i",{staticClass:"icon-attention-1"}),t._v(" Oups !")])}],i={render:e,staticRenderFns:n};s.a=i}])});
(function(t,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.ValidationPeriod=s():t.ValidationPeriod=s()})("undefined"!=typeof self?self:this,function(){return function(t){function s(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,s),n.l=!0,n.exports}var a={};return s.m=t,s.c=a,s.d=function(t,a,e){s.o(t,a)||Object.defineProperty(t,a,{configurable:!1,enumerable:!0,get:e})},s.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(a,"a",a),a},s.o=function(t,s){return Object.prototype.hasOwnProperty.call(t,s)},s.p="/",s(s.s=1)}([function(t,s,a){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var e={valid:"Validée","send-prj":"Validation projet","send-sci":"Validation scientifique","send-adm":"Validation administrative",conflict:"Refusée"};s.default={filters:{status:function(t){return e[t]}},data:function(){return{error:null,declarations:null,group:"monthLabel"}},props:{bootbox:{required:!0}},computed:{periodsPerson:function(){return this.declarations}},methods:{fetch:function(){var t=this;this.$http.get().then(function(s){var a=[];Object.keys(s.body).forEach(function(t){s.body[t].open=s.body[t].validableStep,a.push(s.body[t])}),t.declarations=a},function(s){t.error="Impossible de charger les données : "+s.body})},validate:function(t){var s=this;this.bootbox.confirm("Valider cette déclaration ?",function(a){a&&s.send("valid",t,"")})},reject:function(t){var s=this;this.bootbox.prompt("Refuser cette déclaration ?",function(a){a&&s.send("reject",t,a)})},send:function(t,s,a){var e=this,n=new FormData;n.append("period_id",s),n.append("action",t),n.append("message",a),this.$http.post("",n).then(function(t){e.fetch()},function(t){e.error="Erreur : "+t.body})}},mounted:function(){this.fetch()}}},function(t,s,a){t.exports=a(2)},function(t,s,a){"use strict";function e(t){a(3)}Object.defineProperty(s,"__esModule",{value:!0});var n=a(0),i=a.n(n);for(var o in n)"default"!==o&&function(t){a.d(s,t,function(){return n[t]})}(o);var r=a(5),l=a(4),c=e,d=l(i.a,r.a,!1,c,null,null);s.default=d.exports},function(t,s){},function(t,s){t.exports=function(t,s,a,e,n,i){var o,r=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(o=t,r=t.default);var c="function"==typeof r?r.options:r;s&&(c.render=s.render,c.staticRenderFns=s.staticRenderFns,c._compiled=!0),a&&(c.functional=!0),n&&(c._scopeId=n);var d;if(i?(d=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__),e&&e.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=d):e&&(d=e),d){var _=c.functional,u=_?c.render:c.beforeCreate;_?(c._injectStyles=d,c.render=function(t,s){return d.call(s),u(t,s)}):c.beforeCreate=u?[].concat(u,d):[d]}return{esModule:o,exports:r,options:c}}},function(t,s,a){"use strict";var e=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[t.error?a("div",{staticClass:"overlay",staticStyle:{"z-index":"2002"}},[a("div",{staticClass:"content container overlay-content"},[t._m(0),t._v(" "),a("pre",{staticClass:"alert alert-danger"},[t._v(t._s(t.error))]),t._v(" "),a("p",{staticClass:"text-danger"},[t._v("\n                Si ce message ne vous aide pas, transmettez le à l'administrateur Oscar.\n            ")]),t._v(" "),a("nav",{staticClass:"buttons"},[a("button",{staticClass:"btn btn-primary",on:{click:function(s){t.error=""}}},[t._v("Fermer")])])])]):t._e(),t._v(" "),t.declarations&&t.declarations.length?a("section",{staticClass:"validation"},t._l(t.periodsPerson,function(s){return a("section",[a("h3",{class:{"has-validation":s.validableStep},on:{click:function(t){s.open=!s.open}}},[a("strong",{staticClass:"person"},[a("i",{staticClass:"icon-user"}),t._v(" "+t._s(s.person))]),t._v(" "),a("strong",{staticClass:"period"},[a("i",{staticClass:"icon-calendar"}),t._v(" "+t._s(t._f("period")(s.period)))]),t._v(" "),s.validableStep?a("small",[a("i",{staticClass:"icon-clock"}),t._v("\n                    Validation à faire\n                ")]):t._e()]),t._v(" "),a("transition",{attrs:{name:"slide"}},[a("section",{directives:[{name:"show",rawName:"v-show",value:s.open,expression:"period.open"}],staticClass:"activity card"},[a("table",{staticClass:"table table-condensed"},[a("thead",{staticClass:"heading-days"},[a("th",[t._v("~")]),t._v(" "),t._l(s.details,function(s,e){return a("th",{class:{locked:s.locked}},[a("small",[t._v(t._s(s.label))]),t._v(" "),a("strong",[t._v(t._s(e))])])}),t._v(" "),a("th",[t._v("Total")]),t._v(" "),a("th",{staticStyle:{width:"150px"}},[a("i",{staticClass:"icon-cog"}),t._v(" Validation")])],2),t._v(" "),a("tbody",[t._l(s.declarations_activities,function(e){return[a("tr",{staticClass:"heading-activity heading"},[a("th",{attrs:{colspan:s.totalDays+3}},[a("i",{staticClass:"icon-cube"}),t._v(t._s(e.label)+"\n\n                                "),a("span",{staticClass:"state",class:"state-"+e.status},[a("i",{class:"icon-"+e.status}),t._v("\n                                    "+t._s(t._f("status")(e.status))+"\n                                ")]),t._v(" "),e.validators.length?a("span",[t._v("\n                                    Validateurs :\n                                    "),t._l(e.validators,function(s){return a("span",{staticClass:"cartouche cartouche-xs xs"},[t._v("\n                                        "+t._s(s)+"\n                                    ")])})],2):t._e()])]),t._v(" "),t._l(e.workpackages,function(e){return a("tr",{staticClass:"datas"},[a("th",{attrs:{title:e.label}},[a("i",{staticClass:"icon-archive"}),t._v(t._s(e.code))]),t._v(" "),t._l(s.totalDays,function(s){return a("td",[e.timesheets[s]?a("strong",[t._v(t._s(t._f("duration2")(e.timesheets[s])))]):a("em",[t._v("-")])])}),t._v(" "),a("th",{staticClass:"total"},[t._v("\n                                "+t._s(t._f("duration2")(e.total))+"\n                            ")]),t._v(" "),a("th",[t._v("-")])],2)}),t._v(" "),a("tr",[a("th",{staticStyle:{"padding-left":"1em"},attrs:{colspan:s.totalDays-1}},[t._v("\n                                    Total\n                                ")]),t._v(" "),a("th",{attrs:{colspan:"2"}},[t._v(" ")]),t._v(" "),a("th",{staticClass:"total"},[t._v("\n                                    "+t._s(t._f("duration2")(e.total))+"\n                                ")]),t._v(" "),a("th",[a("small",[a("i",{class:"icon-"+e.status}),t._v(" "+t._s(e.statusMessage))]),t._v(" "),e.validableStep?a("span",[e.validableStep?a("button",{staticClass:"btn btn-success btn-xs",on:{click:function(s){t.validate(e.validationperiod_id)}}},[t._v("Valider")]):t._e(),t._v(" "),e.validableStep?a("button",{staticClass:"btn btn-danger btn-xs",on:{click:function(s){t.reject(e.validationperiod_id)}}},[t._v("Rejeter")]):t._e()]):a("span",[e.validable?a("span",[0==e.validators.length?a("span",{staticClass:"text-danger"},[a("i",{staticClass:"icon-attention-1"}),t._v(" Aucun validateur\n                                            ")]):a("div",t._l(e.validators,function(s){return a("span",{staticClass:"cartouche xs"},[t._v(t._s(s))])}))]):t._e()])])])]}),t._v(" "),s.declarations_others?[a("tr",{staticClass:"heading-activity heading"},[a("th",{attrs:{colspan:s.totalDays+3}},[a("i",{staticClass:"icon-tags"}),t._v("Hors-lot")])]),t._v(" "),t._l(s.declarations_others,function(e,n){return a("tr",{staticClass:"datas"},[a("th",[a("i",{staticClass:"hors-lot",class:"icon-"+n}),t._v(t._s(e.label)+"\n                                    "),a("span",{staticClass:"state",class:"state-"+e.status},[a("i",{class:"icon-"+e.status}),t._v("\n                                    "+t._s(t._f("status")(e.status))+"\n                                ")])]),t._v(" "),t._l(s.totalDays,function(s){return a("td",[e.timesheets[s]?a("strong",[t._v(t._s(t._f("duration2")(e.timesheets[s])))]):a("em",[t._v("-")])])}),t._v(" "),a("th",{staticClass:"total"},[t._v("\n                                    "+t._s(t._f("duration2")(e.total))+"\n                                ")]),t._v(" "),a("th",[a("small",[a("i",{class:"icon-"+e.status}),t._v(" "+t._s(e.statusMessage))]),t._v(" "),e.validableStep?a("span",[a("button",{staticClass:"btn btn-success btn-xs",on:{click:function(s){t.validate(e.validationperiod_id)}}},[t._v("Valider")]),t._v(" "),a("button",{staticClass:"btn btn-danger btn-xs",on:{click:function(s){t.reject(e.validationperiod_id)}}},[t._v("Rejeter")])]):e.validabe?a("span",[0==e.validators.length?a("span",[a("i",{staticClass:"icon-attention-1"}),t._v(" Aucun validateur\n                                        ")]):a("div",t._l(e.validators,function(s){return a("span",{staticClass:"cartouche xs"},[t._v(t._s(s))])}))]):t._e()])],2)})]:t._e(),t._v(" "),s.declarations_off&&s.declarations_off.total>0?[a("tr",{staticClass:"heading-activity heading"},[a("th",{attrs:{colspan:s.totalDays+2}},[a("i",{staticClass:"icon-lock"}),t._v("Autres déclarations ")])]),t._v(" "),a("tr",{staticClass:"datas"},[a("th",[a("small",[t._v("Vous ne pouvez pas voir le détails pour ces créneaux")])]),t._v(" "),t._l(s.totalDays,function(e){return a("td",[s.declarations_off.timesheets[e]?a("strong",[t._v(t._s(t._f("duration2")(s.declarations_off.timesheets[e])))]):a("em",[t._v("-")])])}),t._v(" "),a("th",{staticClass:"total"},[t._v("\n                                    "+t._s(t._f("duration2")(s.declarations_off.total))+"\n                                ")]),t._v(" "),a("td",[t._v("~")])],2)]:t._e()],2),t._v(" "),a("tfoot",[a("tr",{staticClass:"total-row"},[a("th",[t._v("Total période")]),t._v(" "),t._l(s.details,function(s,e){return a("td",{class:{locked:s.locked}},[s.duration?a("strong",[t._v(t._s(t._f("duration2")(s.duration)))]):a("small",[t._v("0.0")])])}),t._v(" "),a("th",{staticClass:"total"},[t._v(t._s(t._f("duration2")(s.total)))]),t._v(" "),a("td",[t._v("-")])],2)])])])])],1)})):a("section",{staticClass:"alert alert-info"},[t._v("\n        Aucune déclaration en attente\n    ")])])},n=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("h2",[a("i",{staticClass:"icon-attention-1"}),t._v(" Oups !")])}],i={render:e,staticRenderFns:n};s.a=i}])});
//# sourceMappingURL=ValidationPeriod.js.map
 No newline at end of file
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+10 −1
Changes for public/js/oscar/src/ValidationPeriod.vue: 10 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@

        <section v-if="declarations && declarations.length" class="validation">
            <section v-for="period in periodsPerson">

                <h3 @click="period.open = !period.open" :class="{ 'has-validation': period.validableStep }">
                    <strong class="person"><i class="icon-user"></i> {{ period.person }}</strong>
                    <strong class="period"><i class="icon-calendar"></i> {{ period.period | period}}</strong>
@@ -26,6 +27,7 @@

                <transition name="slide">
                <section class="activity card" v-show="period.open">

                    <table class="table table-condensed">

                        <thead class="heading-days">
@@ -48,6 +50,13 @@
                                        <i :class="'icon-'+activity.status"></i>
                                        {{ activity.status | status }}
                                    </span>

                                    <span v-if="activity.validators.length">
                                        Validateurs :
                                        <span v-for="v in activity.validators" class="cartouche cartouche-xs xs">
                                            {{ v }}
                                        </span>
                                    </span>
                                </th>

                            </tr>
@@ -250,7 +259,7 @@
        'send-prj': 'Validation projet',
        'send-sci': 'Validation scientifique',
        'send-adm': 'Validation administrative',
        'reject': 'Refusée'
        'conflict': 'Refusée'
    };

    export default {