Commit 494554d5 authored by Lowic Mangin's avatar Lowic Mangin

Merge branch 'dev' into integration-adp

parents ec4c19bd 01ba4feb
......@@ -39,11 +39,12 @@ export default class RiseForMap extends SIBTemplateElement {
next="action-preview-${this.uniqID}"
></sib-map>
<div id="map-${this.uniqID}" hidden></div>
<div id="action-preview-${this.uniqID}" hidden>
<sib-display
bind-resources
data-fields="status, theme.photo, name, description, date-and-location, cta"
data-fields="status, theme.photo, name, description, date-and-location, cta, close"
set-date-and-location="date, city"
......@@ -52,7 +53,10 @@ export default class RiseForMap extends SIBTemplateElement {
widget-date="rfm-display-date"
label-cta="Je participe"
label-close="🞩"
action-cta="action-detail"
action-close="map-${this.uniqID}"
></sib-display>
</div>
......@@ -70,7 +74,8 @@ export default class RiseForMap extends SIBTemplateElement {
</template>
</sib-widget>
<sib-router>
<sib-router default-route="map-${this.uniqID}">
<sib-route name="map-${this.uniqID}" hidden></sib-route>
<sib-route name="action-preview-${this.uniqID}" use-id hidden></sib-route>
</sib-router>
`;
......
......@@ -35,7 +35,7 @@
</button>
<sib-ac-checker permission="acl:Write" bind-resources>
<sib-link next="action-edit" bind-resources>Éditer l'action</sib-link>
<sib-link id="edit-action" next="action-edit" bind-resources>Éditer l'action</sib-link>
<button id="close-action" data-micromodal-trigger="action-closing-validation">Fermer l'action</button>
</sib-ac-checker>
</div>
......@@ -110,6 +110,7 @@
membershipButton.classList.add("show");
if (moment().diff(moment(action.date, "YYYY-MM-DD"), "days") > 0) {
membershipButton.classList.add("is-passed");
actionDetail.querySelectorAll("#close-action, #edit-action").forEach(el => el.setAttribute("hidden", true));
membershipButton.classList.remove("is-full", "is-member");
}
else if (membersId.includes(membershipButton.getAttribute("user-id"))) {// Member of...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment