mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
referrer get users: preparation
This commit is contained in:
parent
3e83891744
commit
6a8c96cdae
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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) });
|
||||
|
Loading…
x
Reference in New Issue
Block a user