Loading module/Oscar/src/Oscar/Service/ProjectGrantApiService.php +2 −8 Original line number Diff line number Diff line Loading @@ -991,21 +991,15 @@ class ProjectGrantApiService implements UseEntityManager, UsePersonService, UseO 'pfi' => $pfis ]; try { $masses = $this->getOscarConfigurationService()->getMasses(); if (count($pfis) == 0) { return $this->getResponseInternalError("Pas de numéro financier"); } // Construction des données de dépense $out['masses'] = $masses; $out['dateUpdated'] = $activity->getDateTotalSpent(); $out['synthesis'] = $this->getSpentService()->getSynthesisDatasPFI( $out = $this->getSpentService()->getSynthesisDatasPFI( $pfis, true, 'basic' ); $out['dateUpdated'] = $activity->getDateTotalSpent(); } catch (Exception $e) { return $this->getResponseInternalError("Impossible de charger les dépenses pour la/les activité(s)"); } Loading ui/src/views/Activity.vue +15 −2 Original line number Diff line number Diff line Loading @@ -474,7 +474,10 @@ <section id="spents" class="section-infos" v-if="credentials.spents.read"> <h2><i class="icon-bank"></i>Dépenses </h2> <ActivitySpentSynthesis :url="spentsUrl"/> <ActivitySpentSynthesis :standalone="false" :datas="spents" /> <nav class="buttons xs"> <a :href="spentsUrlDetails" class="btn btn-primary btn" v-if="credentials.spents.details"> <i class="icon-file-excel"></i> Loading Loading @@ -589,6 +592,8 @@ export default { workpackages: null, workpackagesUrl: null, spents: null, activity: {}, Loading Loading @@ -725,12 +730,19 @@ export default { this.loading = true; axios.get(this.url).then(response => { console.log(response.data); // TODO tester la clef activity.datas this.budget = response.data.activity.datas.budget; this.core = response.data.activity.datas.core; this.persons = response.data.activity.datas.persons.entities; if (response.data.activity.datas.spents) { this.spents = response.data.activity.datas.spents; } if (response.data.activity.datas.documents) { this.documents = response.data.activity.datas.documents; } if (response.data.activity.datas.notes) { this.notes = response.data.activity.datas.notes.entities; Loading @@ -757,6 +769,7 @@ export default { } if (response.data.activity.datas.persons) { this.persons = response.data.activity.datas.persons.entities; this.personsUrlNew = response.data.activity.datas.persons.urlNew; this.personsUrl = response.data.activity.datas.persons.url; this.rolesPersons = response.data.activity.datas.persons.roles; Loading ui/src/views/ActivitySpentSynthesis.vue +14 −10 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ </thead> <tbody> <tr v-for="dt,key in synthesis.masses"> <tr v-for="(dt,key) in synthesis.masses"> <th> <small>{{ dt }}</small> <a class="label label-info xs" :href="'#repport-' + key">{{ synthesis.synthesis[key].nbr_effectue }} / Loading Loading @@ -91,9 +91,9 @@ </tbody> </table> <div v-if="manageRecettes"> <div> <h3><i class="icon-calculator"></i>Recettes</h3> <table class="table table-condensed card synthesis" v-if="spentlines"> <table class="table table-condensed card synthesis"> <tbody> <tr> <th>Recette <a class="label label-info xs" href="#repport-1">{{ synthesis.synthesis['1'].nbr}}</a></th> Loading Loading @@ -126,6 +126,7 @@ Données mise à jour : <strong v-if="dateUpdated">{{ $filters.fullDate(dateUpdated.date) }}</strong> </small> </section> </template> <script> Loading @@ -133,14 +134,18 @@ import axios from "axios"; export default { props: { url: { required: true } url: { default: "" }, standalone: { default: true }, datas: { default: {} } }, computed:{ synthesis(){ return this.infos if( this.standalone ){ return this.infos; } else { return this.datas; } } }, Loading @@ -149,8 +154,7 @@ export default { infos: null, pendingMsg: null, showCuration: false, masses: [], synthesis: null masses: [] } }, Loading @@ -159,7 +163,7 @@ export default { this.pendingMsg = "Chargement des données financières"; axios.get(this.url).then( ok => { this.synthesis = ok.data.synthesis; this.infos = ok.data.synthesis; this.masses = ok.data.masses; }, ko => { Loading Loading
module/Oscar/src/Oscar/Service/ProjectGrantApiService.php +2 −8 Original line number Diff line number Diff line Loading @@ -991,21 +991,15 @@ class ProjectGrantApiService implements UseEntityManager, UsePersonService, UseO 'pfi' => $pfis ]; try { $masses = $this->getOscarConfigurationService()->getMasses(); if (count($pfis) == 0) { return $this->getResponseInternalError("Pas de numéro financier"); } // Construction des données de dépense $out['masses'] = $masses; $out['dateUpdated'] = $activity->getDateTotalSpent(); $out['synthesis'] = $this->getSpentService()->getSynthesisDatasPFI( $out = $this->getSpentService()->getSynthesisDatasPFI( $pfis, true, 'basic' ); $out['dateUpdated'] = $activity->getDateTotalSpent(); } catch (Exception $e) { return $this->getResponseInternalError("Impossible de charger les dépenses pour la/les activité(s)"); } Loading
ui/src/views/Activity.vue +15 −2 Original line number Diff line number Diff line Loading @@ -474,7 +474,10 @@ <section id="spents" class="section-infos" v-if="credentials.spents.read"> <h2><i class="icon-bank"></i>Dépenses </h2> <ActivitySpentSynthesis :url="spentsUrl"/> <ActivitySpentSynthesis :standalone="false" :datas="spents" /> <nav class="buttons xs"> <a :href="spentsUrlDetails" class="btn btn-primary btn" v-if="credentials.spents.details"> <i class="icon-file-excel"></i> Loading Loading @@ -589,6 +592,8 @@ export default { workpackages: null, workpackagesUrl: null, spents: null, activity: {}, Loading Loading @@ -725,12 +730,19 @@ export default { this.loading = true; axios.get(this.url).then(response => { console.log(response.data); // TODO tester la clef activity.datas this.budget = response.data.activity.datas.budget; this.core = response.data.activity.datas.core; this.persons = response.data.activity.datas.persons.entities; if (response.data.activity.datas.spents) { this.spents = response.data.activity.datas.spents; } if (response.data.activity.datas.documents) { this.documents = response.data.activity.datas.documents; } if (response.data.activity.datas.notes) { this.notes = response.data.activity.datas.notes.entities; Loading @@ -757,6 +769,7 @@ export default { } if (response.data.activity.datas.persons) { this.persons = response.data.activity.datas.persons.entities; this.personsUrlNew = response.data.activity.datas.persons.urlNew; this.personsUrl = response.data.activity.datas.persons.url; this.rolesPersons = response.data.activity.datas.persons.roles; Loading
ui/src/views/ActivitySpentSynthesis.vue +14 −10 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ </thead> <tbody> <tr v-for="dt,key in synthesis.masses"> <tr v-for="(dt,key) in synthesis.masses"> <th> <small>{{ dt }}</small> <a class="label label-info xs" :href="'#repport-' + key">{{ synthesis.synthesis[key].nbr_effectue }} / Loading Loading @@ -91,9 +91,9 @@ </tbody> </table> <div v-if="manageRecettes"> <div> <h3><i class="icon-calculator"></i>Recettes</h3> <table class="table table-condensed card synthesis" v-if="spentlines"> <table class="table table-condensed card synthesis"> <tbody> <tr> <th>Recette <a class="label label-info xs" href="#repport-1">{{ synthesis.synthesis['1'].nbr}}</a></th> Loading Loading @@ -126,6 +126,7 @@ Données mise à jour : <strong v-if="dateUpdated">{{ $filters.fullDate(dateUpdated.date) }}</strong> </small> </section> </template> <script> Loading @@ -133,14 +134,18 @@ import axios from "axios"; export default { props: { url: { required: true } url: { default: "" }, standalone: { default: true }, datas: { default: {} } }, computed:{ synthesis(){ return this.infos if( this.standalone ){ return this.infos; } else { return this.datas; } } }, Loading @@ -149,8 +154,7 @@ export default { infos: null, pendingMsg: null, showCuration: false, masses: [], synthesis: null masses: [] } }, Loading @@ -159,7 +163,7 @@ export default { this.pendingMsg = "Chargement des données financières"; axios.get(this.url).then( ok => { this.synthesis = ok.data.synthesis; this.infos = ok.data.synthesis; this.masses = ok.data.masses; }, ko => { Loading