mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
- initiate new Vue component - cleaning buildForm in Filter - add HiddenType with ModelTransformer - use ObjectToIdTransformer in HiddenType fields - setting mount() and teleport - list fetch url in api.js - html/bootstrap form structure - add Multiselect actionType - i18n import - add multiselect for goals and results - add and remove options in multiselect (wip) - fix basic vue add/remove element from data store - vue cleaning - add ids in value hiddenFields - adapt Filter in AlterQuery (wip) - improve code lisibility
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
import { fetchResults } from 'ChillMainAssets/lib/api/apiMethods';
|
|
|
|
const getSocialActions = () => fetchResults(
|
|
'/api/1.0/person/social/social-action.json', {
|
|
item_per_page: 200
|
|
}
|
|
);
|
|
|
|
const getGoalByAction = (id) => {
|
|
let url = `/api/1.0/person/social-work/goal/by-social-action/${id}.json`;
|
|
return fetch(url)
|
|
.then(response => {
|
|
if (response.ok) { return response.json(); }
|
|
throw Error('Error with request resource response');
|
|
});
|
|
};
|
|
|
|
const getResultByAction = (id) => {
|
|
let url = `/api/1.0/person/social-work/result/by-social-action/${id}.json`;
|
|
return fetch(url)
|
|
.then(response => {
|
|
if (response.ok) { return response.json(); }
|
|
throw Error('Error with request resource response');
|
|
});
|
|
};
|
|
|
|
const getResultByGoal = (id) => {
|
|
let url = `/api/1.0/person/social-work/result/by-goal/${id}.json`;
|
|
return fetch(url)
|
|
.then(response => {
|
|
if (response.ok) { return response.json(); }
|
|
throw Error('Error with request resource response');
|
|
});
|
|
};
|
|
|
|
export {
|
|
getSocialActions,
|
|
getGoalByAction,
|
|
getResultByAction,
|
|
getResultByGoal,
|
|
} |