From 937be1af3ac781bf74e1eab49f122fd8da55316b Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 3 Jun 2021 14:34:52 +0200 Subject: [PATCH] fix html5 birthdate field on modal form OnTheFly --- .../public/vuejs/_components/OnTheFly.vue | 2 + .../Resources/public/vuejs/_api/OnTheFly.js | 16 +------ .../vuejs/_components/OnTheFly/Person.vue | 44 +++++++------------ 3 files changed, 20 insertions(+), 42 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly.vue index ac5362ce7..8e1e2227a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly.vue @@ -137,8 +137,10 @@ export default { } else if (this.type === 'thirdparty') { this.$refs.castThirdparty.postData(); } else { + // saveAction() ==cast=to==> child.castByType() ==cast=to==> grand-child.postData() this.$refs.castNew.castByType(); } + this.modal.showModal = false; } } } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js index 332f09e01..6adbc7028 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js @@ -11,20 +11,7 @@ const getPerson = (id) => { }; /* -* GET a thirdparty by id -* TODO move in ChillThirdpartyAssets !! -*/ -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 person +* POST a new person */ const postPerson = (body) => { const url = `/api/1.0/person/person.json`; @@ -43,6 +30,5 @@ const postPerson = (body) => { export { getPerson, - getThirdparty, postPerson }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue index 62fd20a2a..a3cf339e2 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue @@ -53,7 +53,6 @@
- {{ action }} @@ -68,18 +67,12 @@ - + /> @@ -91,9 +84,6 @@