Commit b9562157 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Adaptations à UnicaenVue

parent 00619d0d
Loading
Loading
Loading
Loading
+1 −1
Changes for code/DiagrammeBdd.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ foreach ($cls as $cl) {

    $(function () {

        WidgetInitializer.includeJs(Util.url('vendor/go.js'));
        WidgetInitializer.includeJs(unicaenVue.url('vendor/go.js'));

        var $ = go.GraphObject.make;

+69 −24
Changes for code/test2.php: 69 added lines, 24 removed lines.
Original line number Diff line number Diff line
@@ -9,39 +9,84 @@ use Unicaen\OpenDocument\Calc;
 * @var $viewName   string
 * @var $viewFile   string
 */
?>
<script>

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;
    }

    public function getRue(): string
    {
        return $this->rue;
    }

    public function getCp(): int
    {
        return $this->cp;
    }

    public function getVille(): string
    {
        return $this->ville;
    }


    const a = {
        languages: ["Spanish", "Portuguese"],
        name: "Todd",
        adresse: {
            rue: '1 rue George Sand',
            cp: 14400,
            ville: 'Saint Martin des Entrées'
        },
        age: 20
    };

    const b = {
        languages: ["Français", "Portuguese"],
        married: true,
        adresse: {
            cp: 14400,
            ville: 'Bayeux',
            pays: 'France'
        },
    };
    public function axiosDefinition(): array
    {
        return ['cp', 'ville'];
    }

}

    const c = mergeDeep(a, b);
class Personne
{
    protected string $nom = 'Dupont';
    protected string $prenom = 'Robert';
    protected int $age = 42;
    protected Adresse $adresse;

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

</script>
    public function getNom(): string
    {
        return $this->nom;
    }

    public function getPrenom(): string
    {
        return $this->prenom;
    }

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

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

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


}

$personne = new Personne();

$properties = ['nom', 'prenom', 'isMajeur', 'adresse'];
$extracted = \UnicaenVue\Axios\AxiosExtractor::extract($personne,$properties);
var_dump($extracted);
 No newline at end of file
+9 −9
Changes for composer.lock: 9 added lines, 9 removed lines.
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": "eaaf620540bcff5aa39674783e28c3757c57dc60"
                "reference": "1e0c5d524005554e01f987e4418e84b023ff49d7"
            },
            "type": "library",
            "autoload": {
@@ -7309,8 +7309,8 @@
                    "./Module.php"
                ]
            },
            "description": "Module d'intégration de Vue.js avec l'écosystème Unicaen",
            "time": "2023-03-21T09:57:26+00:00"
            "description": "Module pour utiliser Vue.js",
            "time": "2023-03-28T14:07:20+00:00"
        },
        {
            "name": "unicaen/zfc-user",
@@ -8151,16 +8151,16 @@
        },
        {
            "name": "phpdocumentor/type-resolver",
            "version": "1.7.0",
            "version": "1.7.1",
            "source": {
                "type": "git",
                "url": "https://github.com/phpDocumentor/TypeResolver.git",
                "reference": "1534aea9bde19a5c85c5d1e1f834ab63f4c5dcf5"
                "reference": "dfc078e8af9c99210337325ff5aa152872c98714"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/1534aea9bde19a5c85c5d1e1f834ab63f4c5dcf5",
                "reference": "1534aea9bde19a5c85c5d1e1f834ab63f4c5dcf5",
                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/dfc078e8af9c99210337325ff5aa152872c98714",
                "reference": "dfc078e8af9c99210337325ff5aa152872c98714",
                "shasum": ""
            },
            "require": {
@@ -8203,9 +8203,9 @@
            "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
            "support": {
                "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
                "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.0"
                "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.1"
            },
            "time": "2023-03-12T10:13:29+00:00"
            "time": "2023-03-27T19:02:04+00:00"
        },
        {
            "name": "phpmd/phpmd",
+4 −4
Changes for doc/dev.md: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ Enfin, commitez le tout et testez avant de déployer!!!
## Création de composants Vue

Ose embarque BootstrapVue.
A privilégier pour utiliser des composants Boottrap.
A privilégier pour utiliser des composants Bootstrap.

Sites officiels :
- https://vuejs.org/
@@ -157,11 +157,11 @@ let data = {
    'param2' => 'mon deuxième paramètre'
};

// URL à utiliser. Ici, on la construit à partir d'une route avec Util.url
let url = Util.url('mission/modifier/:intervenant', {intervenant: 1000000}); 
// URL à utiliser. Ici, on la construit à partir d'une route avec unicaenVue.url
let url = unicaenVue.url('mission/modifier/:intervenant', {intervenant: 1000000}); 

// on utilise axios pour poster et récupérer le résultat
axios.post(
unicaenVue.axios.post(
    url,
    data
).then((response) => {
+47 −0
Changes for front/Exemple/MonTest.vue: 47 added lines, 0 removed lines.
Original line number Diff line number Diff line
<template>
    <p>Mon ID : {{ monId }}</p>

    <h2>Contacts</h2>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>Nom</th>
            <th>Prénom</th>
        </tr>
        </thead>
        <tbody>
        <tr v-for="c in contacts">
            <td>{{ c.nom }}</td>
            <td>{{ c.prenom }}</td>
        </tr>
        </tbody>
    </table>
</template>

<script>
export default {
    name: "MonTest",
    props: {
        monId: {required: true, type: Number}
    },
    data()
    {
        return {
            contacts: []
        };
    },
    mounted()
    {
        unicaenVue.axios.get(
            unicaenVue.url("mission/test-data/:monId", {monId: this.monId})
        ).then(response => {
            this.contacts = response.data;
        });
    }
}

</script>

<style scoped>

</style>
 No newline at end of file
Loading