Loading front/gulpfile.js +10 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,16 @@ exports.activityDocumentWatch = function(cb){ watch(pathModuleSrc + "ActivityDocument.vue", activityDocument); } //// 2.4 Correspondance Type de contrat PCRU / Type d'activité Oscar function contratTypePCRU(cb) { compile("ContratTypePCRU"); cb(); } exports.contratTypePCRU = contratTypePCRU; exports.contratTypePCRUWatch = function(cb){ watch(pathModuleSrc + "ContratTypePCRU.vue", contratTypePCRU); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// 3. COMPOSANTS ///////////////////////// COMPOSANTS COMPILES Loading front/src/ActivityTypeTree.vue 0 → 100644 +30 −0 Original line number Diff line number Diff line <template> <div> <strong @click="handlerSelect">{{ tree.label}}</strong> <div v-if="tree.children"> <tree v-for="c in tree.children" :tree="c" :key="c.id" @select="$emit('select', $event)"></tree> {{ tree.children }} </div> </div> </template> <script> export default { props: { tree: { required: true } }, components: { 'tree': this }, methods: { handlerSelect() { this.$emit("select", this.tree); } }, mounted(){ console.log("mounted tree"); } } </script> No newline at end of file front/src/ContratTypePCRU.vue 0 → 100644 +103 −0 Original line number Diff line number Diff line <template> <div id="contrattypepcru"> <h1>Correspondance Type d'activité / Type de contrat PCRU</h1> <div class="overlay"> <div class="overlay-content" v-if="oscartypes.length"> TYPES OSCAR <tree :tree="oscartypes[0]"></tree> </div> </div> <div class="row"> <div class="col-md-6"> <h2>Types côté <strong>PCRU</strong></h2> <article class="card xs" v-for="t in pcrutypes" :key="t.id" :class="t.activitytype_id != null ? 'active' : 'disabled'"> <h3><code>[{{ t.id }}]</code> <strong>{{ t.label }}</strong> </h3> <div v-if="t.activitytype_id"> Associé au activité <strong>{{ t.activitytype_label }}</strong> </div> <button class="btn xs"> Associer à un type dans Oscar </button> </article> </div> </div> HOP {{ url }} </div> </template> <script> /******************************************************************************************************************/ /* ! DEVELOPPEUR Depuis la racine OSCAR : cd front Pour compiler en temps réél : node node_modules/.bin/gulp contratTypePCRUWatch Pour compiler : node node_modules/.bin/gulp contratTypePCRU */ import AjaxOscar from "./remote/AjaxOscar"; import OscarRemoteData from "./remote/OscarRemoteData"; import Tree from "./ActivityTypeTree"; // test let oscarRemoteData = new OscarRemoteData(); function flashMessage(){ // TODO } export default { components: { "ajax-oscar": AjaxOscar, "tree": Tree }, props: { url: { required: true } }, data(){ return { formData: null, remoterState: oscarRemoteData.state, configuration: null, oscartypes: [], pcrutypes: [] } }, methods:{ handlerSuccess(success){ let datas = success.data; this.oscartypes = datas.activitytypes; this.pcrutypes = datas.pcrucontracttypes; }, fetch(){ console.log("FETCH()"); oscarRemoteData .setDebug(true) .setPendingMessage("Chargement des types de contrat") .setErrorMessage("Impossible de charger la configuration") .performGet(this.url, this.handlerSuccess); } }, mounted(){ this.fetch(); } } </script> No newline at end of file module/Oscar/config/module.config.php +3 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ return array( 'connectorExecute', 'connectorsHome', 'connectorConfigure', 'contratTypePcru', 'discipline', // OK 'documentSections', 'index', Loading Loading @@ -218,6 +219,8 @@ return array( ['controller' => 'Api', 'action' => [ 'activity', 'activityType', 'activityTypePcru', 'help', 'organization', 'organizations', Loading module/Oscar/config/routes.yml +23 −1 Original line number Diff line number Diff line Loading @@ -106,6 +106,20 @@ api: defaults: action: activity typeactivity: type: segment options: route: /activity-type defaults: action: activityType typeactivitypcru: type: segment options: route: /activity-type-pcru defaults: action: activityTypePcru ################################################################################ # NOTIFICATIONS notification: Loading Loading @@ -1598,7 +1612,15 @@ administration: options: route: /documents-sections defaults: action: documentSections action: documentSection contrat-type-pcru: type: segment may_terminate: true options: route: /contrat-type-pcru defaults: action: contratTypePcru testconfig: type: segment Loading Loading
front/gulpfile.js +10 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,16 @@ exports.activityDocumentWatch = function(cb){ watch(pathModuleSrc + "ActivityDocument.vue", activityDocument); } //// 2.4 Correspondance Type de contrat PCRU / Type d'activité Oscar function contratTypePCRU(cb) { compile("ContratTypePCRU"); cb(); } exports.contratTypePCRU = contratTypePCRU; exports.contratTypePCRUWatch = function(cb){ watch(pathModuleSrc + "ContratTypePCRU.vue", contratTypePCRU); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// 3. COMPOSANTS ///////////////////////// COMPOSANTS COMPILES Loading
front/src/ActivityTypeTree.vue 0 → 100644 +30 −0 Original line number Diff line number Diff line <template> <div> <strong @click="handlerSelect">{{ tree.label}}</strong> <div v-if="tree.children"> <tree v-for="c in tree.children" :tree="c" :key="c.id" @select="$emit('select', $event)"></tree> {{ tree.children }} </div> </div> </template> <script> export default { props: { tree: { required: true } }, components: { 'tree': this }, methods: { handlerSelect() { this.$emit("select", this.tree); } }, mounted(){ console.log("mounted tree"); } } </script> No newline at end of file
front/src/ContratTypePCRU.vue 0 → 100644 +103 −0 Original line number Diff line number Diff line <template> <div id="contrattypepcru"> <h1>Correspondance Type d'activité / Type de contrat PCRU</h1> <div class="overlay"> <div class="overlay-content" v-if="oscartypes.length"> TYPES OSCAR <tree :tree="oscartypes[0]"></tree> </div> </div> <div class="row"> <div class="col-md-6"> <h2>Types côté <strong>PCRU</strong></h2> <article class="card xs" v-for="t in pcrutypes" :key="t.id" :class="t.activitytype_id != null ? 'active' : 'disabled'"> <h3><code>[{{ t.id }}]</code> <strong>{{ t.label }}</strong> </h3> <div v-if="t.activitytype_id"> Associé au activité <strong>{{ t.activitytype_label }}</strong> </div> <button class="btn xs"> Associer à un type dans Oscar </button> </article> </div> </div> HOP {{ url }} </div> </template> <script> /******************************************************************************************************************/ /* ! DEVELOPPEUR Depuis la racine OSCAR : cd front Pour compiler en temps réél : node node_modules/.bin/gulp contratTypePCRUWatch Pour compiler : node node_modules/.bin/gulp contratTypePCRU */ import AjaxOscar from "./remote/AjaxOscar"; import OscarRemoteData from "./remote/OscarRemoteData"; import Tree from "./ActivityTypeTree"; // test let oscarRemoteData = new OscarRemoteData(); function flashMessage(){ // TODO } export default { components: { "ajax-oscar": AjaxOscar, "tree": Tree }, props: { url: { required: true } }, data(){ return { formData: null, remoterState: oscarRemoteData.state, configuration: null, oscartypes: [], pcrutypes: [] } }, methods:{ handlerSuccess(success){ let datas = success.data; this.oscartypes = datas.activitytypes; this.pcrutypes = datas.pcrucontracttypes; }, fetch(){ console.log("FETCH()"); oscarRemoteData .setDebug(true) .setPendingMessage("Chargement des types de contrat") .setErrorMessage("Impossible de charger la configuration") .performGet(this.url, this.handlerSuccess); } }, mounted(){ this.fetch(); } } </script> No newline at end of file
module/Oscar/config/module.config.php +3 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ return array( 'connectorExecute', 'connectorsHome', 'connectorConfigure', 'contratTypePcru', 'discipline', // OK 'documentSections', 'index', Loading Loading @@ -218,6 +219,8 @@ return array( ['controller' => 'Api', 'action' => [ 'activity', 'activityType', 'activityTypePcru', 'help', 'organization', 'organizations', Loading
module/Oscar/config/routes.yml +23 −1 Original line number Diff line number Diff line Loading @@ -106,6 +106,20 @@ api: defaults: action: activity typeactivity: type: segment options: route: /activity-type defaults: action: activityType typeactivitypcru: type: segment options: route: /activity-type-pcru defaults: action: activityTypePcru ################################################################################ # NOTIFICATIONS notification: Loading Loading @@ -1598,7 +1612,15 @@ administration: options: route: /documents-sections defaults: action: documentSections action: documentSection contrat-type-pcru: type: segment may_terminate: true options: route: /contrat-type-pcru defaults: action: contratTypePcru testconfig: type: segment Loading