Commit aa510999 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix : édition de la fréquence d'envoi

Up : Migration de l'écran d'affichage de la répartition horaire dans les paramètres personnels
parent a5c0bc73
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -93,7 +93,11 @@ oscar:
    template: '%env(VOLUMES_TEMPLATE_MAIL)%'
    administrators:


  ##############################################################
  # NOTIFICATIONS
  notifications:
    override: '%env(bool:NOTIFICATIONS_OVERRIDE)%'
    fixed: '%env(array:NOTIFICATIONS_FIXED)%'

  ##############################################################
  # RECHERCHE
+3 −0
Original line number Diff line number Diff line
@@ -129,6 +129,9 @@ OSCAR_SPENT_PARAMS_SPENT_QUERY="select MEASURE AS pfi, RLDNR as AB9, STUNR as
# FEUILLE de TEMPS -----------------------------------------------------------
OSCAR_TIMESHEET_IMPORT_ENABLE=true

# NOTIFICATIONS
NOTIFICATIONS_OVERRIDE=false
NOTIFICATIONS_FIXED=Lun8

# ----------------------------------------------------------------------------
# TECHNIQUE ------------------------------------------------------------------
+3 −0
Original line number Diff line number Diff line
@@ -129,6 +129,9 @@ OSCAR_SPENT_PARAMS_SPENT_QUERY="select MEASURE AS pfi, RLDNR as AB9, STUNR as
# FEUILLE de TEMPS -----------------------------------------------------------
OSCAR_TIMESHEET_IMPORT_ENABLE=false

# NOTIFICATIONS
NOTIFICATIONS_OVERRIDE=true
NOTIFICATIONS_FIXED=Lun8,Mar10

# ----------------------------------------------------------------------------
# TECHNIQUE ------------------------------------------------------------------
+0 −2
Original line number Diff line number Diff line
@@ -57,8 +57,6 @@
    </section>
</template>
<script>
    // poi watch --format umd --moduleName  PersonSchedule --filename.css PersonSchedule.css --filename.js PersonSchedule.js --dist public/js/oscar/dist public/js/oscar/src/PersonSchedule.vue
    import AjaxResolve from "./AjaxResolve";

    export default {
        name: 'PersonSchedule',
+21 −6
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ class PublicController extends AbstractOscarController implements UseTimesheetSe

    public function parametersAction()
    {

        /** @var Authentification $auth */
        $auth = $this->getOscarUserContextService()->getAuthentification();

@@ -97,6 +98,10 @@ class PublicController extends AbstractOscarController implements UseTimesheetSe
        // Récupération des envois automatiques
        $forceSend = $this->getOscarConfigurationService()->getConfiguration('notifications.fixed');

        $notificationsFixed = $this->getOscarConfigurationService()->getConfiguration('notifications.fixed');
        $notificationsOverride = $this->getOscarConfigurationService()->getConfiguration('notifications.override');


        $method = $this->getHttpXMethod();


@@ -108,8 +113,7 @@ class PublicController extends AbstractOscarController implements UseTimesheetSe
            if ($method == 'GET') {
                $datas = $timesheetService->getDayLengthPerson($this->getCurrentPerson());
                return $this->ajaxResponse($datas);
            }
            elseif ($method == 'POST') {
            } elseif ($method == 'POST') {
                $schedule = $this->params()->fromPost('days');
                try {
                    $this->getUserParametersService()->performChangeSchedule(
@@ -170,6 +174,18 @@ class PublicController extends AbstractOscarController implements UseTimesheetSe
            return $this->getResponseBadRequest("Erreur d'usage");
        }

        if ($this->isAjax() && $this->params()->fromQuery('a') == 'frequency') {
            if ($method == 'GET') {
                $userSettings = $auth->getSettings() ?: [];
                return $this->jsonOutput([
                    'frequency' => array_key_exists('frequency', $userSettings) ? $userSettings['frequency'] : [],
                    'parameters' => $auth->getSettings() ?: [],
                    'notificationsFixed' => $notificationsFixed,
                    'notificationsOverride' => $notificationsOverride,
                ]);
            }
        }

        /** @var TimesheetService $timesheetService */
        $timesheetService = $this->getTimesheetService();

@@ -178,6 +194,7 @@ class PublicController extends AbstractOscarController implements UseTimesheetSe
            'declarationsHoursOverwriteByAuth'
        );


        return [
            'subordinates' => $this->getPersonService()->getSubordinates($this->getCurrentPerson()),
            'managers' => $this->getPersonService()->getManagers($this->getCurrentPerson()),
@@ -264,8 +281,7 @@ class PublicController extends AbstractOscarController implements UseTimesheetSe
                // Accès globale
                if ($this->getOscarUserContextService()->hasPrivileges(Privileges::ACTIVITY_REQUEST_MANAGE)) {
                    $requests = $serviceDemandeActivite->getAllRequestActivityUnDraft();
                }
                elseif (count(
                } elseif (count(
                        $organizations = $this->getOscarUserContextService()->getOrganizationsWithPrivilege(
                            Privileges::ACTIVITY_REQUEST_MANAGE
                        )
@@ -334,8 +350,7 @@ class PublicController extends AbstractOscarController implements UseTimesheetSe
            return [
                'contenu' => "super doc"
            ];
        }
        else {
        } else {
            return [
                'contenu' => 'foo'
            ];
Loading