Skip to content

Commit

Permalink
Update example dates (#6363)
Browse files Browse the repository at this point in the history
Signed-off-by: Giovanni Ferrari <giovanni.ferrari@soft.it>
  • Loading branch information
quinarygio authored and vlo-rte committed May 14, 2024
1 parent ae6c70a commit 9da4a25
Showing 1 changed file with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) 2021-2023, RTE (http://www.rte-france.com) -->
<!-- Copyright (c) 2021-2024, RTE (http://www.rte-france.com) -->
<!-- See AUTHORS.txt -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public -->
<!-- License, v. 2.0. If a copy of the MPL was not distributed with this -->
Expand All @@ -12,9 +12,9 @@
<h4> Outage needed for 2 hours on the France-England HVDC line</h4>
<br/>
Could you please confirm the time frames that are ok for you ? <br/> <br/>
<label class="opfab-checkbox" style="margin-left:40px"> The 10/08/2021 between 8AM and 10AM <input type="checkbox" id="choice1" name="choice1" > <span id="question-choice1" class="opfab-checkbox-checkmark"> </span> </label>
<label class="opfab-checkbox" style="margin-left:40px"> The 10/08/2021 between 10AM and 12PM <input type="checkbox" id="choice2" name="choice2" > <span id="question-choice2" class="opfab-checkbox-checkmark"> </span> </label>
<label class="opfab-checkbox" style="margin-left:40px"> The 11/08/2021 between 8AM and 10AM <input type="checkbox" id="choice3" name="choice3" > <span id="question-choice3" class="opfab-checkbox-checkmark"> </span> </label>
<label class="opfab-checkbox" style="margin-left:40px"> The <span id="date1"></span> between 8AM and 10AM <input type="checkbox" id="choice1" name="choice1" > <span id="question-choice1" class="opfab-checkbox-checkmark"> </span> </label>
<label class="opfab-checkbox" style="margin-left:40px"> The <span id="date2"></span> between 10AM and 12PM <input type="checkbox" id="choice2" name="choice2" > <span id="question-choice2" class="opfab-checkbox-checkmark"> </span> </label>
<label class="opfab-checkbox" style="margin-left:40px"> The <span id="date3"></span> between 8AM and 10AM <input type="checkbox" id="choice3" name="choice3" > <span id="question-choice3" class="opfab-checkbox-checkmark"> </span> </label>
</div>
<div id="responseRequired"></div>
<div id="responseDisabled" class="opfab-color-danger"></div>
Expand All @@ -27,8 +27,22 @@
<div id="childs-div"></div>

<script>
init();
function init() {
let today = new Date();
let tomorrow = new Date(today.getTime() + 24 * 3600 * 1000);
let dayAfterTomorrow = new Date(today.getTime() + 48 * 3600 * 1000);
let date1 = Intl.DateTimeFormat('en-GB').format(tomorrow);
let date2 = Intl.DateTimeFormat('en-GB').format(dayAfterTomorrow);
document.getElementById('date1').innerHTML = date1;
document.getElementById('date2').innerHTML = date1;
document.getElementById('date3').innerHTML = date2;
opfab.currentCard.listenToChildCards((childCards) => {
let childsDiv = document.getElementById("childs-div");
Expand All @@ -37,9 +51,9 @@
{
let responses = '<center> <h4>Responses received </h4> <br/>';
responses += ' <table width="100%""> <tr> <th> Entity </th>';
responses += ' <th> 10/08/2020 8AM-10AM </th>';
responses += ' <th> 10/08/2020 10AM-12PM </th>';
responses += ' <th> 11/08/2020 8AM-10AM </th>';
responses += ' <th> ' + date1 + ' 8AM-10AM </th>';
responses += ' <th> ' + date1 + ' 10AM-12PM </th>';
responses += ' <th> ' + date2 + ' 8AM-10AM </th>';
responses += ' </tr>';
childCards.forEach( (c, i) => {
Expand Down Expand Up @@ -134,6 +148,7 @@
responseRequired.innerHTML="";
}
}
}
</script>

Expand Down

0 comments on commit 9da4a25

Please sign in to comment.