We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have to create initializer and services for all referenceList
reference-list-initializer import { config } from 'focus-core/reference'; // Path to the reference service. const referenceService = require('../../services/commun/reference'); // chargez ici toutes vos listes de référence export const referenceNameList = [ 'etatDeclaration', 'etatLrb', 'profil', 'role', 'typeTaxe', 'typePeriode', 'trimestre', 'etatPaiement', 'classeAeroport', 'moyenPaiement' ]; //See AutoForm export const referenceNameMap = { edeCd: 'etatDeclaration', elrCd: 'etatLrb', proId: 'profil', rolCd: 'role', ttaCd: 'typeTaxe', tpeCd: 'typePeriode', triCd: 'trimestre', epaCd: 'etatPaiement', claCd: 'classeAeroport', mpaCd: 'moyenPaiement' }; const specificReferences = {}; const getServiceConfig = function() { const referenceConfig = specificReferences; for (const key in referenceNameList) { if(referenceNameList.hasOwnProperty(key)) { const referenceName = referenceNameList[key]; referenceConfig[referenceName] = referenceService.getDefaultReferenceService(referenceName); } } return referenceConfig; }; export default () => { config.set(getServiceConfig()); }; services/commun//reference.js export default { getDefaultReferenceService(referenceName) { return () => { return server.get(referenceServiceRoot + '/' + referenceName, null); }; }, getAutoCompleteServices(referenceName) { return { querySearcher: (texte) => { return server.get(referenceServiceRoot + '/querySearcher/' + referenceName + '?texte=${texte}', { texte }, { parser: totalCountWrapperJsonParser }); }, keyResolver: (id) =>{ return server.get(referenceServiceRoot + '/keyResolver/' + referenceName + '?id=${id}', { id }); } }; } };
The text was updated successfully, but these errors were encountered:
c3dr0x
No branches or pull requests
Current behaviour
We have to create initializer and services for all referenceList
Expected behaviour
The text was updated successfully, but these errors were encountered: