Loading front/src/TimesheetDeclarationsList.vue +1 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ </section> </template> <script> // nodejs node_modules/.bin/poi watch --format umd --moduleName TimesheetDeclarationsList --filename.css TimesheetDeclarationsList.css --filename.js TimesheetDeclarationsList.js --dist public/js/oscar/dist public/js/oscar/src/TimesheetDeclarationsList.vue // node node_modules/.bin/vue-cli-service build --name TimesheetDeclarationsList --dest ../public/js/oscar/dist/ --no-clean --formats umd,umd-min --target lib src/TimesheetDeclarationsList.vue import PersonAutoCompleter from "./components/PersonAutoCompleter"; import PersonSchedule from "./components/PersonSchedule"; Loading front/src/TimesheetMonth.vue +1 −1 Original line number Diff line number Diff line Loading @@ -692,7 +692,7 @@ <span v-else>Soumettre mes déclarations</span> </button> <span v-else> <span v-else :class="'alert-' +ts.submitableClass" class="alert"> Vous ne pouvez pas soumettre cette période<br> <small>{{ ts.submitableInfos }}</small> </span> Loading module/Oscar/src/Oscar/Service/TimesheetService.php +42 −1 Original line number Diff line number Diff line Loading @@ -4288,6 +4288,9 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat //////////////////////////////////////////////////////////////////////////////////////////////////////////////// $timesheets = $this->getTimesheetsPersonPeriod($person, $from, $to); $hasErrorWorkpackage = []; /** @var TimeSheet $t */ foreach ($timesheets as $t) { $dayInt = (int)$t->getDateFrom()->format('d'); Loading @@ -4296,8 +4299,37 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat if ($icsUid != null && !array_key_exists($icsUid, $icsUidList)) { $icsUidList[$icsUid] = $t->getIcsFileName(); } //throw new OscarException("Problème ICI $dayInt $t"); if (!$t->getActivity() || !$t->getWorkpackage()) { if( ($t->getActivity() && !$t->getWorkpackage()) || (!$t->getActivity() && $t->getWorkpackage()) ){ $hasErrorWorkpackage[] = "Un créneau le " . $t->getDateFrom()->format('d/M') . " n'a pas de lot de travail"; $otherInfo = $this->getOthersWPByCode($t->getLabel()); $label = $otherInfo['label']; $code = $otherInfo['code']; $group = $otherInfo['group']; $datas = [ 'id' => $t->getId(), 'int' => $dayInt, 'label' => $label, 'code' => $code, 'group' => $group, 'description' => $t->getComment(), 'duration' => $t->getDuration(), 'status_id' => $t->getValidationPeriod() ? $t->getValidationPeriod()->getStatus() : 'draft', 'validations' => $t->getValidationPeriod() ? $t->getValidationPeriod()->json() : null ]; $duree = (float)$t->getDuration(); $daysInfos[$dayInt]['othersWP'][] = $datas; $daysInfos[$dayInt]['duration'] += $duree; $daysInfos[$dayInt]['total'] += $duree; $periodTotal += $duree; $others[$code]['total'] += $duree; continue; } elseif (!$t->getActivity() || !$t->getWorkpackage()) { $otherInfo = $this->getOthersWPByCode($t->getLabel()); $label = $otherInfo['label']; $code = $otherInfo['code']; Loading Loading @@ -4368,6 +4400,14 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat ]; } $submitableClass = 'info'; if ( count($hasErrorWorkpackage) ){ $submitable = false; $submitableClass = 'danger'; $submitableInfos = sprintf('Un ou plusieurs créneaux sont invalides : %s', implode(', ', $hasErrorWorkpackage)); } $output = [ 'icsUidList' => $icsUidList, Loading @@ -4393,6 +4433,7 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat 'to' => $periodLastDay->format('Y-m-d'), 'submitable' => $submitable, 'submitableInfos' => $submitableInfos, 'submitableClass' => $submitableClass, 'editable' => $editable, 'editableInfos' => $editableInfos, 'period_total_days' => $totalDays, Loading public/css/_common.scss +1 −0 Original line number Diff line number Diff line Loading @@ -6242,6 +6242,7 @@ $onColor: saturate($baseColor, 25%); &.sickleave { background-color: #808000; } &.wp { background-color: #6a5999; } &.conflict { background: #AA0000; } &.invalid { background: #AA0000; } } .loading-message { Loading public/css/adaj.css +3 −0 Original line number Diff line number Diff line Loading @@ -12372,6 +12372,9 @@ pre.alert-danger, pre.alert-info { .month .cartouche.conflict { background: #AA0000; } .month .cartouche.invalid { background: #AA0000; } .loading-message { background: white; Loading Loading
front/src/TimesheetDeclarationsList.vue +1 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ </section> </template> <script> // nodejs node_modules/.bin/poi watch --format umd --moduleName TimesheetDeclarationsList --filename.css TimesheetDeclarationsList.css --filename.js TimesheetDeclarationsList.js --dist public/js/oscar/dist public/js/oscar/src/TimesheetDeclarationsList.vue // node node_modules/.bin/vue-cli-service build --name TimesheetDeclarationsList --dest ../public/js/oscar/dist/ --no-clean --formats umd,umd-min --target lib src/TimesheetDeclarationsList.vue import PersonAutoCompleter from "./components/PersonAutoCompleter"; import PersonSchedule from "./components/PersonSchedule"; Loading
front/src/TimesheetMonth.vue +1 −1 Original line number Diff line number Diff line Loading @@ -692,7 +692,7 @@ <span v-else>Soumettre mes déclarations</span> </button> <span v-else> <span v-else :class="'alert-' +ts.submitableClass" class="alert"> Vous ne pouvez pas soumettre cette période<br> <small>{{ ts.submitableInfos }}</small> </span> Loading
module/Oscar/src/Oscar/Service/TimesheetService.php +42 −1 Original line number Diff line number Diff line Loading @@ -4288,6 +4288,9 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat //////////////////////////////////////////////////////////////////////////////////////////////////////////////// $timesheets = $this->getTimesheetsPersonPeriod($person, $from, $to); $hasErrorWorkpackage = []; /** @var TimeSheet $t */ foreach ($timesheets as $t) { $dayInt = (int)$t->getDateFrom()->format('d'); Loading @@ -4296,8 +4299,37 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat if ($icsUid != null && !array_key_exists($icsUid, $icsUidList)) { $icsUidList[$icsUid] = $t->getIcsFileName(); } //throw new OscarException("Problème ICI $dayInt $t"); if (!$t->getActivity() || !$t->getWorkpackage()) { if( ($t->getActivity() && !$t->getWorkpackage()) || (!$t->getActivity() && $t->getWorkpackage()) ){ $hasErrorWorkpackage[] = "Un créneau le " . $t->getDateFrom()->format('d/M') . " n'a pas de lot de travail"; $otherInfo = $this->getOthersWPByCode($t->getLabel()); $label = $otherInfo['label']; $code = $otherInfo['code']; $group = $otherInfo['group']; $datas = [ 'id' => $t->getId(), 'int' => $dayInt, 'label' => $label, 'code' => $code, 'group' => $group, 'description' => $t->getComment(), 'duration' => $t->getDuration(), 'status_id' => $t->getValidationPeriod() ? $t->getValidationPeriod()->getStatus() : 'draft', 'validations' => $t->getValidationPeriod() ? $t->getValidationPeriod()->json() : null ]; $duree = (float)$t->getDuration(); $daysInfos[$dayInt]['othersWP'][] = $datas; $daysInfos[$dayInt]['duration'] += $duree; $daysInfos[$dayInt]['total'] += $duree; $periodTotal += $duree; $others[$code]['total'] += $duree; continue; } elseif (!$t->getActivity() || !$t->getWorkpackage()) { $otherInfo = $this->getOthersWPByCode($t->getLabel()); $label = $otherInfo['label']; $code = $otherInfo['code']; Loading Loading @@ -4368,6 +4400,14 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat ]; } $submitableClass = 'info'; if ( count($hasErrorWorkpackage) ){ $submitable = false; $submitableClass = 'danger'; $submitableInfos = sprintf('Un ou plusieurs créneaux sont invalides : %s', implode(', ', $hasErrorWorkpackage)); } $output = [ 'icsUidList' => $icsUidList, Loading @@ -4393,6 +4433,7 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat 'to' => $periodLastDay->format('Y-m-d'), 'submitable' => $submitable, 'submitableInfos' => $submitableInfos, 'submitableClass' => $submitableClass, 'editable' => $editable, 'editableInfos' => $editableInfos, 'period_total_days' => $totalDays, Loading
public/css/_common.scss +1 −0 Original line number Diff line number Diff line Loading @@ -6242,6 +6242,7 @@ $onColor: saturate($baseColor, 25%); &.sickleave { background-color: #808000; } &.wp { background-color: #6a5999; } &.conflict { background: #AA0000; } &.invalid { background: #AA0000; } } .loading-message { Loading
public/css/adaj.css +3 −0 Original line number Diff line number Diff line Loading @@ -12372,6 +12372,9 @@ pre.alert-danger, pre.alert-info { .month .cartouche.conflict { background: #AA0000; } .month .cartouche.invalid { background: #AA0000; } .loading-message { background: white; Loading