Commit 2eb17af7 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Merge branch 'master' into alc-offres-emplois

# Conflicts:
#	composer.lock
#	module/Mission/config/module.config.php
parents 49e733f7 d7fab00c
Loading
Loading
Loading
Loading
+2 −46
Original line number Diff line number Diff line
@@ -8,50 +8,6 @@
 * @var $viewFile   string
 */

/** @var \Mission\Service\MissionService $smi */
$smi = $container->get(\Mission\Service\MissionService::class);
$d = new \DateTime();

$intervenant = $container->get(\Application\Service\IntervenantService::class)->get(1000000000);

$guid = '31-20230309-0900-1031-0-0';
$guid = '31-20230308-1400-1700-0-0';

$missionSuivi = $smi->suivi($intervenant, $guid);


//$missionSuivi->setDescription('test');
//$missionSuivi->setHeures(10);

$data = \Application\Controller\Plugin\Axios::extract($missionSuivi);

var_dump($data);

foreach( $missionSuivi->getVolumesHoraires() as $vhm ){
    $vhSpec = $vhm->axiosDefinition();
    $vhSpec[] = 'guid';
    $vhSpec[] = 'heureDebut';
    $vhSpec[] = 'horaireFin';
    $vhSpec[] = 'description';
    $vhSpec[] = 'nocturne';
    $vhSpec[] = 'formation';

    $vhData = \Application\Controller\Plugin\Axios::extract($vhm, $vhSpec);
    unset($vhData['histoCreateur']);
    unset($vhData['histoCreation']);
    unset($vhData['canValider']);
    unset($vhData['canDevalider']);
    unset($vhData['canSupprimer']);
    var_dump($vhData);
}


?>
<script>

    let date = new Date();



    console.log(Util.affDate(date, Util.FORMAT_DATE));

</script>
$d->setTime(0, 0, 0, 0);
 No newline at end of file
+58 −66
Original line number Diff line number Diff line
@@ -10,83 +10,75 @@ use Unicaen\OpenDocument\Calc;
 * @var $viewFile   string
 */

class Adresse implements \UnicaenVue\Axios\AxiosExtractorInterface {
    protected int $numero = 1;
    protected string $rue = 'Allée des mésanges';
    protected int $cp = 14000;
    protected string $ville = 'Caen';

    public function getNumero(): int
    {
        return $this->numero;
?>

<button onclick="ts()">Suceess</button>
<button onclick="te()">Error</button>

<script>


    function toast(message, severity) {
        const bgClasses = {
            info: 'bg-info',
            success: 'bg-success',
            warning: 'bg-warning',
            error: 'bg-danger'
        };
        const iconClasses = {
            info: 'info-circle',
            success: 'check-circle',
            warning: 'exclamation-circle',
            error: 'exclamation-triangle'
        };

        let toastContainer = document.getElementById('unicaen-vue-toast-container');
        if (!toastContainer) {
            toastContainer = document.createElement('div');
            toastContainer.id = 'unicaen-vue-toast-container';
            toastContainer.classList.add('toast-container', 'position-fixed', 'top-0', 'end-0', 'p-3');
            document.body.appendChild(toastContainer);
        }

    public function getRue(): string
    {
        return $this->rue;
    }
        // Création de l'élément HTML pour le toast
        const toast = document.createElement('div');
        toast.classList.add('toast', 'show', 'text-white', bgClasses[severity] ? bgClasses[severity] : 'bg-secondary');
        toast.setAttribute('role', 'alert');
        toast.setAttribute('aria-live', 'assertive');
        toast.setAttribute('aria-atomic', 'true');

    public function getCp(): int
    {
        return $this->cp;
        if (severity === 'error'){
            toast.setAttribute('style', 'width:100%');
        }

    public function getVille(): string
    {
        return $this->ville;
    }
        const toastContent =
            '<button class="btn-close btn-close-white h5" style="float:right" data-bs-dismiss="toast" aria-label="Close"></button>' +
            '<i class="icon fas fa-' + iconClasses[severity] + '" style="float: left;font-size: 26pt;padding-left: .4rem;margin-top:.4rem;padding-right: 1rem;"></i>' +
            '<div class="toast-body">' + message + '  </div>';


        toast.innerHTML = toastContent;

    public function axiosDefinition(): array
    {
        return ['cp', 'ville'];
    }

}
        // Ajout du toast à l'élément du conteneur de toasts
        toastContainer.appendChild(toast);

class Personne
{
    protected string $nom = 'Dupont';
    protected string $prenom = 'Robert';
    protected int $age = 42;
    protected Adresse $adresse;

    public function __construct()
    {
        $this->adresse = new Adresse();
    }

    public function getNom(): string
    {
        return $this->nom;
    }
        // Affichage du toast
        //const bsToast = new bootstrap.Toast(toast);
        //bsToast.show();

    public function getPrenom(): string
    {
        return $this->prenom;
        // Masquage du toast si ce n'est pas une erreur
        if (severity !== 'error') {
            // setTimeout(() => {
            //     toast.classList.remove('show');
            // }, 3000);
        }

    public function getAge(): int
    {
        return $this->age;
    }

    public function isMajeur(): bool
    {
        return $this->age >= 18;
    }

    public function getAdresse(): Adresse
    {
        return $this->adresse;
    }


    }

$personnes = [new Personne(),new Personne()];
    $(() => {
        toast('mon success est phénoménal et j\'ai envie d\'en parler tout le temps mais ce serait bien trop long à expliquer et patati et patatta', 'success');
        toast('Et voici une info à ne pas rater!!', 'info');
        toast('Warning', 'warning');
        toast('Erreur magistrale!!!', 'error');
    });

$properties = ['nom', 'prenom', 'isMajeur', 'adresse'];
$extracted = \UnicaenVue\Axios\AxiosExtractor::extract($personnes,$properties);
var_dump($extracted);
 No newline at end of file
</script>
+2 −2
Original line number Diff line number Diff line
@@ -7298,7 +7298,7 @@
            "source": {
                "type": "git",
                "url": "https://git.unicaen.fr/lib/unicaen/vue.git",
                "reference": "c3de98637d9f5654486e9cbb099f40dd0ccbe6fd"
                "reference": "d97686f3adfd79a11046229ea84f005ad6b35462"
            },
            "type": "library",
            "autoload": {
@@ -7310,7 +7310,7 @@
                ]
            },
            "description": "Module pour utiliser Vue.js",
            "time": "2023-04-05T13:52:02+00:00"
            "time": "2023-04-06T13:55:38+00:00"
        },
        {
            "name": "unicaen/zfc-user",
+14 −0
Original line number Diff line number Diff line
<?php

//@formatter:off

return [
    'name'    => 'TBL_PJ_PIECE_JOINTE_FK',
    'unique'  => FALSE,
    'table'   => 'TBL_PIECE_JOINTE',
    'columns' => [
        'PIECE_JOINTE_ID',
    ],
];

//@formatter:on
+98 −84

File changed.

Preview size limit exceeded, changes collapsed.

Loading