referrer get users: preparation

This commit is contained in:
Mathieu Jaumotte 2021-06-23 13:40:49 +02:00
parent 3e83891744
commit 6a8c96cdae
3 changed files with 9 additions and 9 deletions

View File

@ -98,7 +98,7 @@ const postParticipation = (id, payload, method) => {
const postRequestor = (id, payload, method) => {
//console.log('payload', payload);
const body = (payload)? { type: payload.type, id: payload.id } : {};
console.log('body', body);
//console.log('body', body);
const url = `/api/1.0/person/accompanying-course/${id}/requestor.json`;
return fetch(url, {
method: method,
@ -131,7 +131,7 @@ const postResource = (id, payload, method) => {
default:
body['resource'] = { type: payload.type, id: payload.id };
}
console.log('body', body);
//console.log('body', body);
const url = `/api/1.0/person/accompanying-course/${id}/resource.json`;
return fetch(url, {
method: method,

View File

@ -36,7 +36,7 @@
<script>
import VueMultiselect from 'vue-multiselect';
//import { getUsers } from '../api';
import { getUsers } from '../api';
import { mapState } from 'vuex';
export default {
@ -57,13 +57,13 @@ export default {
},
methods: {
getOptions() {
//getUsers().then(response => new Promise((resolve, reject) => {
// console.log(response);
// resolve();
//})).catch(er => this.$store.commit('catchError'), error));
getUsers().then(response => new Promise((resolve, reject) => {
console.log(response);
resolve();
})).catch(er => this.$store.commit('catchError'), error);
},
updateReferrer(value) {
//this.$store.dispatch('updateReferrer', this.transformValue(value));
this.$store.dispatch('updateReferrer', this.transformValue(value));
},
transformValue(value) {
let payload = value;

View File

@ -192,7 +192,7 @@ let initPromise = getAccompanyingCourse(id)
confirmAccompanyingCourse(id)
.then(response => new Promise((resolve, reject) => {
window.location.replace(`/fr/parcours/${id}`);
console.log('fetch resolve');
//console.log('fetch resolve');
commit('confirmAccompanyingCourse', response);
resolve();
})).catch((error) => { commit('catchError', error) });