diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_api/OnTheFly.js b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_api/OnTheFly.js new file mode 100644 index 000000000..ed91ef415 --- /dev/null +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_api/OnTheFly.js @@ -0,0 +1,36 @@ +/* +* GET a thirdparty by id +*/ +const getThirdparty = (id) => { + const url = `/api/1.0/thirdparty/thirdparty/${id}.json`; + return fetch(url) + .then(response => { + if (response.ok) { + return response.json(); + } + throw Error('Error with request resource response'); + }); +}; + +/* +* POST a new person +*/ +const postThirdparty = (body) => { + const url = `/api/1.0/thirdparty/thirdparty.json`; + return fetch(url, { + method: 'POST', + headers: { + 'Content-Type': 'application/json;charset=utf-8' + }, + body: JSON.stringify(body) + }) + .then(response => { + if (response.ok) { return response.json(); } + throw Error('Error with request resource response'); + }); +}; + +export { + getThirdparty, + postThirdparty +}; \ No newline at end of file diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index 7f21e3379..a5142b9e6 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -26,7 +26,7 @@ - {{ thirdparty.age }} + {{ thirdparty.age }}

@@ -37,9 +37,9 @@ -
  • +
  • - {{ thirdparty.telephone }} + {{ thirdparty.phonenumber }}
  • diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue index a681952a7..b23121c56 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -9,6 +9,7 @@ addAltNames: true, addId: true, addLink: false, + addAge: false, hLevel: 3, addCenter: true, addNoData: true, @@ -40,7 +41,7 @@
    @@ -50,7 +51,8 @@ -