diff --git a/src/Bundle/ChillMainBundle/Resources/public/img/draggable.svg b/src/Bundle/ChillMainBundle/Resources/public/img/draggable.svg new file mode 100644 index 000000000..0b3561cce --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/img/draggable.svg @@ -0,0 +1,121 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Bundle/ChillMainBundle/Resources/public/js/date.js b/src/Bundle/ChillMainBundle/Resources/public/js/date.js index 35499e1aa..7b9bf88a2 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/js/date.js +++ b/src/Bundle/ChillMainBundle/Resources/public/js/date.js @@ -1,5 +1,7 @@ /** * Some utils for manipulating dates + * + * **WARNING** experimental */ /** @@ -8,6 +10,8 @@ * The date is valid for the same timezone as the date's locale * * Do not take time into account + * + * **Experimental** */ const dateToISO = (date) => { return [ @@ -19,16 +23,36 @@ const dateToISO = (date) => { /** * Return a date object from iso string formatted as YYYY-mm-dd + * + * **Experimental** */ const ISOToDate = (str) => { - let + let [year, month, day] = str.split('-'); return new Date(year, month-1, day); } +/** + * Return a date object from iso string formatted as YYYY-mm-dd:HH:MM:ss+01:00 + * + * **Experimental** + */ +const ISOToDatetime = (str) => { + console.log(str); + let + [cal, times] = str.split('T'), + [year, month, date] = cal.split('-'), + [time, timezone] = cal.split(times.charAt(9)), + [hours, minutes, seconds] = cal.split(':') + ; + + return new Date(year, month-1, date, hours, minutes, seconds); +} + /** * Convert a date to ISO8601, valid for usage in api + * */ const datetimeToISO = (date) => { let cal, time, offset; @@ -52,7 +76,6 @@ const datetimeToISO = (date) => { ].join(''); let x = cal + 'T' + time + offset; - console.log('return date', x); return x; }; @@ -60,5 +83,6 @@ const datetimeToISO = (date) => { export { dateToISO, ISOToDate, + ISOToDatetime, datetimeToISO }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/modules/bootstrap/bootstrap.scss b/src/Bundle/ChillMainBundle/Resources/public/modules/bootstrap/bootstrap.scss index 37bf2f253..6b91d1bf0 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/modules/bootstrap/bootstrap.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/modules/bootstrap/bootstrap.scss @@ -17,7 +17,7 @@ // @import "bootstrap/scss/grid"; // @import "bootstrap/scss/tables"; // @import "bootstrap/scss/forms"; -// @import "bootstrap/scss/buttons"; +@import "bootstrap/scss/buttons"; @import "bootstrap/scss/transitions"; // @import "bootstrap/scss/dropdown"; // @import "bootstrap/scss/button-group"; @@ -30,7 +30,7 @@ // @import "bootstrap/scss/pagination"; @import "bootstrap/scss/badge"; // @import "bootstrap/scss/jumbotron"; -// @import "bootstrap/scss/alert"; +@import "bootstrap/scss/alert"; // @import "bootstrap/scss/progress"; // @import "bootstrap/scss/media"; // @import "bootstrap/scss/list-group"; diff --git a/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss index 2eb1f9bc7..1f4124f44 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss @@ -112,7 +112,7 @@ div.flex-bloc { display: flex; flex-direction: column; - div.item-row { + & > div.item-row { flex-grow: 1; flex-shrink: 1; flex-basis: auto; display: flex; flex-direction: column; diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js index 025aeeb44..d89470bc4 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js @@ -62,7 +62,7 @@ const messages = { person: "un nouvel usager", thirdparty: "un nouveau tiers" }, - } + }, } }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/sass/person_with_period.scss b/src/Bundle/ChillPersonBundle/Resources/public/sass/person_with_period.scss index dc1c96274..bea5bdba2 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/sass/person_with_period.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/sass/person_with_period.scss @@ -47,7 +47,9 @@ div.list-household-members--summary { .chill-entity__person { .chill-entity__person__first-name, - .chill-entity__person__last-name { + .chill-entity__person__last-name, + // text is used in vue component 'Person' + .chill-entity__person__text { font-size: 1.3em; font-weight: 700; } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue index 8757febcd..3008441ee 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue @@ -1,25 +1,56 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_js/i18n.js index 0f019c26b..f83004ce8 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_js/i18n.js @@ -15,7 +15,15 @@ const personMessages = { person: { firstname: "Prénom", lastname: "Nom", - born: "né{e} le ", + born: (ctx) => { + if (ctx.gender === 'man') { + return 'Né le'; + } else if (ctx.gender === 'woman') { + return 'Née le'; + } else { + return 'Né·e le'; + } + }, center_id: "Identifiant du centre", center_type: "Type de centre", center_name: "Territoire", // vendée diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig index f0433a812..d409ec38f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig @@ -1,8 +1,14 @@ {% extends '@ChillMain/layout.html.twig' %} +{% block title 'household.Edit household members'|trans %} + {% block content %} -

Editor

-
+
+
+

{{ block('title') }}

+
+
+
{% endblock %} {% block js %}