Skip to content
Snippets Groups Projects
Commit 1fd70115 authored by Antoine Dupré's avatar Antoine Dupré
Browse files

Merge branch 'auto-evaluation' into beta

parents ac2295db 591b399d
No related branches found
Tags v1.0.3-beta.2
No related merge requests found
Pipeline #15593 passed
File deleted
This diff is collapsed.
File deleted
File deleted
......@@ -17,7 +17,11 @@ tzcld-autoeval {
font-size: 16px;
font-weight: 800;
}
[name="evaluation_point_answer"] {
solid-form solid-form-dropdown-label select {
padding: 12px 40px 12px 14px;
}
}
}
......
......@@ -31,18 +31,6 @@
}
}
@font-face {
font-family: 'icomoon';
src: url('../fonts/icomoon.eot?edth72');
src: url('../fonts/icomoon.eot?edth72#iefix') format('embedded-opentype'),
url('../fonts/icomoon.ttf?edth72') format('truetype'),
url('../fonts/icomoon.woff?edth72') format('woff'),
url('../fonts/icomoon.svg?edth72#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
[class^="tz2icon-"], [class*=" tz2icon-"], [class^="tz2icon-"]:before, [class*=" tz2icon-"]:before {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
......
......@@ -27,6 +27,7 @@ import("./utils.js").then((utils) => {
kinds: "kinds",
territoriesStepStates: "territories-step-states",
territoriesOriginsMobilisation: "territories-origins-mobilisation",
apiUrl: "api-url",
};
}
......@@ -416,6 +417,7 @@ import("./utils.js").then((utils) => {
parts ="${this.parts}"
parts-points ="${this.partsPoints}"
point-answers ="${this.pointAnswers}"
api-url ="${this.apiUrl}"
solid-resource
`;
......@@ -528,6 +530,7 @@ import("./utils.js").then((utils) => {
this.kinds = props.kinds ;
this.territoriesStepStates = props.territoriesStapeStates ;
this.territoriesOriginsMobilisation = props.territoriesOriginsMobilisationn ;
this.apiUrl = props.apiUrl ;
//console.table(props);
......
......@@ -207,7 +207,7 @@ core.Sib.register({
empty() {
//console.debug();
this.element.innerHTML = "<div>rrrrr></div>";
this.element.innerHTML = "";
},
async populate() {
......@@ -225,6 +225,11 @@ core.Sib.register({
let tzcldPoint = {
point: await tzcldprofile.answer.evaluation_point
};
let parentContext = utils.findAncestor(this.element, 'tzcld-autoeval') ;
let apiUrl ='';
if (parentContext) {
apiUrl = parentContext.getAttribute('api-url') ;
}
let field_type = await tzcldPoint.point.fieldType ;
let field_name = 'answer_community_deliberation' ;
......@@ -250,8 +255,8 @@ core.Sib.register({
<div class="segment auto padding-none text-top">
<solid-form solid-resource fields="${field_name}" data-src="${await tzcldprofile.answer['@id']}"
widget-${field_name}="solid-form-dropdown-label"
range-${field_name}="https://api.tzcld-dev.startinblox.com/${await tzcldPoint.point.fieldType}/"
class-${field_name}="segment margin-bottom-none full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading"
range-${field_name}="${apiUrl}${await tzcldPoint.point.fieldType}/"
class-${field_name}="segment margin-bottom-none full padding-left-small padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading"
label-${field_name}=" "
class-submit-button=""
autosave
......@@ -326,12 +331,14 @@ core.Sib.register({
</div>
</div>
<div class="segment half padding-small text-top">
<solid-display
data-src="\${value}"
fields="comment"
widget-comment="solid-display-div"
editable-comment
></solid-display>
<solid-form
solid-resource bind-resources fields="comment" class="form" data-src="\${value}"
widget-comment="solid-form-textarea-label"
label-comment=" "
class-comment="segment margin-bottom-medium full sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge"
class-submit-button="hidden"
autosave
></solid-form>
</div>
</div>
</template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment