Merge branch 'features/household-editor' into features/household-validation

This commit is contained in:
2021-06-11 17:08:38 +02:00
36 changed files with 1661 additions and 44 deletions

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
id="svg34"
version="1.1"
viewBox="0 0 32 32">
<metadata
id="metadata40">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs38" />
<rect
id="rect2"
x="0"
y="4"
width="4"
height="4" />
<rect
id="rect4"
x="0"
y="12"
width="4"
height="4" />
<rect
id="rect6"
x="0"
y="20"
width="4"
height="4" />
<rect
id="rect8"
x="0"
y="28"
width="4"
height="4" />
<rect
id="rect10"
x="8"
y="4"
width="4"
height="4" />
<rect
id="rect12"
x="8"
y="12"
width="4"
height="4" />
<rect
id="rect14"
x="8"
y="20"
width="4"
height="4" />
<rect
id="rect16"
x="8"
y="28"
width="4"
height="4" />
<rect
id="rect18"
x="16"
y="4"
width="4"
height="4" />
<rect
id="rect20"
x="16"
y="12"
width="4"
height="4" />
<rect
id="rect22"
x="16"
y="20"
width="4"
height="4" />
<rect
id="rect24"
x="16"
y="28"
width="4"
height="4" />
<rect
id="rect26"
x="24"
y="4"
width="4"
height="4" />
<rect
id="rect28"
x="24"
y="12"
width="4"
height="4" />
<rect
id="rect30"
x="24"
y="20"
width="4"
height="4" />
<rect
id="rect32"
x="24"
y="28"
width="4"
height="4" />
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,88 @@
/**
* Some utils for manipulating dates
*
* **WARNING** experimental
*/
/**
* Return the date to local ISO date, like YYYY-mm-dd
*
* The date is valid for the same timezone as the date's locale
*
* Do not take time into account
*
* **Experimental**
*/
const dateToISO = (date) => {
return [
this.$store.state.startDate.getFullYear(),
(this.$store.state.startDate.getMonth() + 1).toString().padStart(2, '0'),
this.$store.state.startDate.getDate().toString().padStart(2, '0')
].join('-');
};
/**
* Return a date object from iso string formatted as YYYY-mm-dd
*
* **Experimental**
*/
const ISOToDate = (str) => {
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;
cal = [
date.getFullYear(),
(date.getMonth() + 1).toString().padStart(2, '0'),
date.getDate().toString().padStart(2, '0')
].join('-');
time = [
date.getHours().toString().padStart(2, '0'),
date.getMinutes().toString().padStart(2, '0'),
date.getSeconds().toString().padStart(2, '0')
].join(':');
offset = [
date.getTimezoneOffset() <= 0 ? '+' : '-',
Math.abs(Math.floor(date.getTimezoneOffset() / 60)).toString().padStart(2, '0'),
':',
Math.abs(date.getTimezoneOffset() % 60).toString().padStart(2, '0'),
].join('');
let x = cal + 'T' + time + offset;
return x;
};
export {
dateToISO,
ISOToDate,
ISOToDatetime,
datetimeToISO
};

View File

@@ -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";

View File

@@ -121,7 +121,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;

View File

@@ -62,7 +62,7 @@ const messages = {
person: "un nouvel usager",
thirdparty: "un nouveau tiers"
},
}
},
}
};