SUTF#81048: Status toekomstig in jaaroverzicht periodieke taken is raar als deze te laat is.

svn path=/Website/trunk/; revision=68478
This commit is contained in:
Maykel Geerdink
2025-03-20 10:53:40 +00:00
parent 0dbceb3697
commit 75308e0bf5

View File

@@ -1782,7 +1782,7 @@ END:VCALENDAR
</td>
<td colspan="3" style="padding-top:10px;">
<xsl:call-template name="linebreaks">
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="string" select="fclt:fclthtml(notes/note[key=$mx_key]/omschrijving)"/>
</xsl:call-template>
</td>
@@ -2069,7 +2069,7 @@ END:VCALENDAR
</xsl:if>
<xsl:if test="behandelwijze=2 and not(/facilitor/opdracht)">
<xsl:for-each select="notes/note[flag=1]">
<xsl:sort select="aanmaak/timestamp" order="ascending"/>
<xsl:sort select="aanmaak/timestamp" order="ascending"/>
<tr>
<xsl:choose>
<xsl:when test="position() = 1">
@@ -2186,7 +2186,7 @@ END:VCALENDAR
</td>
<td colspan="5" style="padding-top:15px;padding-bottom:10px;">
<xsl:call-template name="linebreaks">
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="string" select="fclt:fclthtml(notes/note[key=$ox_key]/omschrijving)"/>
</xsl:call-template>
</td>
@@ -3153,7 +3153,7 @@ END:VCALENDAR
</xsl:template>
<xsl:template match="rapport">
<xsl:apply-templates select="." mode="default"/>
<xsl:apply-templates select="." mode="default"/>
</xsl:template>
<xsl:template match="sysrapport">
@@ -3176,163 +3176,178 @@ END:VCALENDAR
padding: 3px;
margin-left: 1px;
}
.stat-1 { background-color: #003366; color:white;}
.stat0 { background-color: #FFA500;}
.stat2 { background-color: #FFFF00;}
.statc1 { background-color: #339933; color:white;}
.statc0 { background-color: #990000; color:white;}
.stat-1 { background-color: #003366; color:white;}
.stat-1b { background-color: #FFC7CE; color: #CC0000;}
.stat0 { background-color: #FFA500;}
.stat2 { background-color: #FFFF00;}
.statc1 { background-color: #339933; color:white;}
.statc0 { background-color: #990000; color:white;}
</style>
<script language="javascript">
function filltd(tdid, pstatus, ctrmodesuccess)
{
var td = document.getElementById(tdid);
if (td)
{
if (pstatus == -1) td.innerHTML = "T"; // toekomstig
if (pstatus == -1) td.style.backgroundColor = "#003366";
if (pstatus == -1) td.style.color = "#FFFFFF";
if (pstatus == 0) td.innerHTML = "P"; // ingepland
if (pstatus == 0) td.style.backgroundColor = "#FFA500";
if (pstatus == 2) td.innerHTML = "S"; // gestart
if (pstatus == 2) td.style.backgroundColor = "#FFFF00";
if (ctrmodesuccess == 1) td.innerHTML = "G"; // succesvol
if (ctrmodesuccess == 1) td.style.backgroundColor = "#339933";
if (ctrmodesuccess == 1) td.style.color = "#FFFFFF";
if (ctrmodesuccess == 0) td.innerHTML = "F"; // niet succesvol
if (ctrmodesuccess == 0) td.style.backgroundColor = "#990000";
if (ctrmodesuccess == 0) td.style.color = "#FFFFFF";
}
}
function filltable()
{
<xsl:for-each select="rapport_data/data_row">
<xsl:sort select="deel_key" order="ascending"/>
<xsl:sort select="ins_srtcontrole_key" order="ascending"/>
filltd("<xsl:value-of select="concat(DEEL_KEY,'_', INS_SRTCONTROLE_KEY, '_', MAAND, '_', JAAR)"/>", "<xsl:value-of select="INSPECTIE_CODE"/>", "<xsl:value-of select="SUCCESVOL"/>");
</xsl:for-each>
var th = document.getElementsByClassName("th_lastyear");
$(".lastyear").hide();
$(".nextyear").hide();
}
function backoneyear()
{
if (!$(".thisyear").is(":hidden"))
{
$(".lastyear").show();
$(".thisyear").hide();
}
else if (!$(".nextyear").is(":hidden"))
{
$(".thisyear").show();
$(".nextyear").hide();
}
}
function forwardoneyear()
{
if (!$(".lastyear").is(":hidden"))
{
$(".lastyear").hide();
$(".thisyear").show();
}
else if (!$(".thisyear").is(":hidden"))
{
$(".thisyear").hide();
$(".nextyear").show();
}
}
</script>
</head>
<script language="javascript">
function filltd(tdid, pstatus, ctrmodesuccess, controldate)
{
var td = document.getElementById(tdid);
var cdate = new Date(new Date(new Date(new Date(controldate).setHours(0)).setMinutes(0)));
var today = new Date(new Date(new Date(new Date(new Date(new Date().setHours(0)).setMinutes(0))).setSeconds(0)).setMilliseconds(0));
if (td)
{
if (pstatus == -1) td.innerHTML = "T"; // toekomstig
if (pstatus == -1) td.style.color = "#FFFFFF";
if (pstatus == -1 &amp;&amp; (cdate.getTime() &gt;= today.getTime()))
{
td.style.color = "#FFFFFF";
td.style.backgroundColor = "#003366";
}
else if (pstatus == -1)
{
td.style.color = "#CC0000";
td.style.backgroundColor = "#FFC7CE";
}
if (pstatus == 0) td.innerHTML = "P"; // ingepland
if (pstatus == 0) td.style.backgroundColor = "#FFA500";
if (pstatus == 2) td.innerHTML = "S"; // gestart
if (pstatus == 2) td.style.backgroundColor = "#FFFF00";
if (ctrmodesuccess == 1) td.innerHTML = "G"; // succesvol
if (ctrmodesuccess == 1) td.style.backgroundColor = "#339933";
if (ctrmodesuccess == 1) td.style.color = "#FFFFFF";
if (ctrmodesuccess == 0) td.innerHTML = "F"; // niet succesvol
if (ctrmodesuccess == 0) td.style.backgroundColor = "#990000";
if (ctrmodesuccess == 0) td.style.color = "#FFFFFF";
}
}
function filltable()
{
<xsl:for-each select="rapport_data/data_row">
<xsl:sort select="deel_key" order="ascending"/>
<xsl:sort select="ins_srtcontrole_key" order="ascending"/>
filltd("<xsl:value-of select="concat(DEEL_KEY,'_', INS_SRTCONTROLE_KEY, '_', MAAND, '_', JAAR)"/>",
"<xsl:value-of select="INSPECTIE_CODE"/>",
"<xsl:value-of select="SUCCESVOL"/>",
"<xsl:value-of select="VOLGENDEDATUM"/>");
</xsl:for-each>
var th = document.getElementsByClassName("th_lastyear");
$(".lastyear").hide();
$(".nextyear").hide();
}
function backoneyear()
{
if (!$(".thisyear").is(":hidden"))
{
$(".lastyear").show();
$(".thisyear").hide();
}
else if (!$(".nextyear").is(":hidden"))
{
$(".thisyear").show();
$(".nextyear").hide();
}
}
function forwardoneyear()
{
if (!$(".lastyear").is(":hidden"))
{
$(".lastyear").hide();
$(".thisyear").show();
}
else if (!$(".thisyear").is(":hidden"))
{
$(".thisyear").hide();
$(".nextyear").show();
}
}
</script>
</head>
<body onLoad="filltable();">
<table width="100%" id="result">
<table width="100%" id="result">
<xsl:if test="count(rapport_data/data_row)=0">
<tr>
<td>
<center>
<b>Geen gegevens gevonden</b>
</center>
</td>
</tr>
</xsl:if>
<xsl:if test="count(rapport_data/data_row)=0">
<tr>
<td>
<center>
<b>Geen gegevens gevonden</b>
</center>
</td>
</tr>
</xsl:if>
<xsl:variable name="year">
<xsl:value-of select="preceding-sibling::header/dateYear"/>
</xsl:variable>
<xsl:variable name="year">
<xsl:value-of select="preceding-sibling::header/dateYear"/>
</xsl:variable>
<xsl:variable name="sorted">
<xsl:for-each select="rapport_data/data_row">
<xsl:sort select="DEEL_KEY"/>
<xsl:sort select="INS_SRTCONTROLE_KEY"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="sorted">
<xsl:for-each select="rapport_data/data_row">
<xsl:sort select="DEEL_KEY"/>
<xsl:sort select="INS_SRTCONTROLE_KEY"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="msxsl:node-set($sorted)/data_row">
<xsl:if test="position() = 1">
<tr>
<th style="text-align:left">Gebouw</th>
<th style="text-align:left">Object</th>
<th style="text-align:left">Controle</th>
<th><button type="submit" onclick="backoneyear()">&lt;</button></th>
<th class="lastyear"><xsl:value-of select="$year - 1" /><br></br>Jan</th>
<th class="lastyear"><br></br>Feb</th>
<th class="lastyear"><br></br>Mrt</th>
<th class="lastyear"><br></br>Apr</th>
<th class="lastyear"><br></br>Mei</th>
<th class="lastyear"><br></br>Jun</th>
<th class="lastyear"><br></br>Jul</th>
<th class="lastyear"><br></br>Aug</th>
<th class="lastyear"><br></br>Sep</th>
<th class="lastyear"><br></br>Okt</th>
<th class="lastyear"><br></br>Nov</th>
<th class="lastyear"><xsl:value-of select="$year - 1" /><br></br>Dec</th>
<xsl:for-each select="msxsl:node-set($sorted)/data_row">
<xsl:if test="position() = 1">
<tr>
<th style="text-align:left">Gebouw</th>
<th style="text-align:left">Object</th>
<th style="text-align:left">Controle</th>
<th><button type="submit" onclick="backoneyear()">&lt;</button></th>
<th class="lastyear"><xsl:value-of select="$year - 1" /><br></br>Jan</th>
<th class="lastyear"><br></br>Feb</th>
<th class="lastyear"><br></br>Mrt</th>
<th class="lastyear"><br></br>Apr</th>
<th class="lastyear"><br></br>Mei</th>
<th class="lastyear"><br></br>Jun</th>
<th class="lastyear"><br></br>Jul</th>
<th class="lastyear"><br></br>Aug</th>
<th class="lastyear"><br></br>Sep</th>
<th class="lastyear"><br></br>Okt</th>
<th class="lastyear"><br></br>Nov</th>
<th class="lastyear"><xsl:value-of select="$year - 1" /><br></br>Dec</th>
<th class="thisyear"><xsl:value-of select="$year" /><br></br>Jan</th>
<th class="thisyear"><br></br>Feb</th>
<th class="thisyear"><br></br>Mrt</th>
<th class="thisyear"><br></br>Apr</th>
<th class="thisyear"><br></br>Mei</th>
<th class="thisyear"><br></br>Jun</th>
<th class="thisyear"><br></br>Jul</th>
<th class="thisyear"><br></br>Aug</th>
<th class="thisyear"><br></br>Sep</th>
<th class="thisyear"><br></br>Okt</th>
<th class="thisyear"><br></br>Nov</th>
<th class="thisyear"><xsl:value-of select="$year" /><br></br>Dec</th>
<th class="thisyear"><xsl:value-of select="$year" /><br></br>Jan</th>
<th class="thisyear"><br></br>Feb</th>
<th class="thisyear"><br></br>Mrt</th>
<th class="thisyear"><br></br>Apr</th>
<th class="thisyear"><br></br>Mei</th>
<th class="thisyear"><br></br>Jun</th>
<th class="thisyear"><br></br>Jul</th>
<th class="thisyear"><br></br>Aug</th>
<th class="thisyear"><br></br>Sep</th>
<th class="thisyear"><br></br>Okt</th>
<th class="thisyear"><br></br>Nov</th>
<th class="thisyear"><xsl:value-of select="$year" /><br></br>Dec</th>
<th class="nextyear"><xsl:value-of select="$year + 1" /><br></br>Jan</th>
<th class="nextyear"><br></br>Feb</th>
<th class="nextyear"><br></br>Mrt</th>
<th class="nextyear"><br></br>Apr</th>
<th class="nextyear"><br></br>Mei</th>
<th class="nextyear"><br></br>Jun</th>
<th class="nextyear"><br></br>Jul</th>
<th class="nextyear"><br></br>Aug</th>
<th class="nextyear"><br></br>Sep</th>
<th class="nextyear"><br></br>Okt</th>
<th class="nextyear"><br></br>Nov</th>
<th class="nextyear"><xsl:value-of select="$year + 1" /><br></br>Dec</th>
<th><button type="submit" onclick="forwardoneyear()">&gt;</button></th>
</tr>
</xsl:if>
<th class="nextyear"><xsl:value-of select="$year + 1" /><br></br>Jan</th>
<th class="nextyear"><br></br>Feb</th>
<th class="nextyear"><br></br>Mrt</th>
<th class="nextyear"><br></br>Apr</th>
<th class="nextyear"><br></br>Mei</th>
<th class="nextyear"><br></br>Jun</th>
<th class="nextyear"><br></br>Jul</th>
<th class="nextyear"><br></br>Aug</th>
<th class="nextyear"><br></br>Sep</th>
<th class="nextyear"><br></br>Okt</th>
<th class="nextyear"><br></br>Nov</th>
<th class="nextyear"><xsl:value-of select="$year + 1" /><br></br>Dec</th>
<th><button type="submit" onclick="forwardoneyear()">&gt;</button></th>
</tr>
</xsl:if>
<xsl:variable name="prev_deel">
<xsl:choose>
<xsl:when test="position()=1">-1</xsl:when>
<xsl:otherwise>
<xsl:value-of select="preceding-sibling::data_row[1]/DEEL_KEY"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="prev_deel">
<xsl:choose>
<xsl:when test="position()=1">-1</xsl:when>
<xsl:otherwise>
<xsl:value-of select="preceding-sibling::data_row[1]/DEEL_KEY"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="prev_cont">
<xsl:choose>
<xsl:when test="position()=1">-1</xsl:when>
<xsl:otherwise>
<xsl:value-of select="preceding-sibling::data_row[1]/INS_SRTCONTROLE_KEY"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="prev_cont">
<xsl:choose>
<xsl:when test="position()=1">-1</xsl:when>
<xsl:otherwise>
<xsl:value-of select="preceding-sibling::data_row[1]/INS_SRTCONTROLE_KEY"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="DEEL_KEY != $prev_deel or INS_SRTCONTROLE_KEY != $prev_cont">
<tr>
@@ -3492,12 +3507,13 @@ END:VCALENDAR
<xsl:attribute name="class">nextyear</xsl:attribute>
</xsl:element>
<td></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</tr>
</xsl:if>
</xsl:for-each>
</table>
<div class="legenda">
<span class="stat-1">T</span><span>Toekomstig</span>
<span class="stat-1b">T</span><span>Te laat</span>
<span class="stat0">P</span><span >Gepland</span>
<span class="stat2">S</span><span>Gestart</span>
<span class="statc1">G</span><span>Succesvol uitgevoerd</span>
@@ -3505,7 +3521,7 @@ END:VCALENDAR
</div>
</body>
</html>
</xsl:when>
</xsl:when>
<xsl:when test="@view='cnd_v_rap_conditiemetingen' or @view='CND_V_RAP_CONDITIEMETINGEN'">
<html>
@@ -3553,7 +3569,7 @@ END:VCALENDAR
<xsl:value-of select="SUBRECEPT"/></td>
<td class="tekst">
<xsl:attribute name="onclick">FcltMgr.openDetail('appl/mld/mld_melding.asp?mld_key=<xsl:value-of select="MELDINGNUMMER"/>', '');</xsl:attribute>
<xsl:value-of select="GEBREK"/>&#xA;(<span style="cursor:pointer; text-decoration: underline;"><xsl:value-of select="MELDINGNUMMER"/></span>)</td>
<xsl:value-of select="GEBREK"/>&#xA;(<span style="cursor:pointer; text-decoration: underline;"><xsl:value-of select="MELDINGNUMMER"/></span>)</td>
<td class="tekst nobr"><xsl:value-of select="DATUM"/><br/>
<xsl:value-of select="INSPECTEUR"/><br/>
<xsl:value-of select="STATUS"/></td>
@@ -3599,7 +3615,7 @@ END:VCALENDAR
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="default"/>
<xsl:apply-templates select="." mode="default"/>
</xsl:otherwise>
</xsl:choose>
@@ -3801,7 +3817,7 @@ END:VCALENDAR
</td>
<td colspan="3" style="padding-top:10px;" class="value">
<xsl:call-template name="linebreaks">
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="string" select="fclt:fclthtml(notes/note[key=$mx_key]/omschrijving)"/>
</xsl:call-template>
</td>
@@ -4236,7 +4252,7 @@ END:VCALENDAR
</td>
<td colspan="3" style="padding-top:10px;" class="value">
<xsl:call-template name="linebreaks">
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="string" select="fclt:fclthtml(notes/note[key=$mx_key]/omschrijving)"/>
</xsl:call-template>
</td>
@@ -4482,7 +4498,7 @@ END:VCALENDAR
</td>
<td colspan="5" style="padding-top:15px;padding-bottom:10px;">
<xsl:call-template name="linebreaks">
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="escaping" select="'no'"/>
<xsl:with-param name="string" select="fclt:fclthtml(notes/note[key=$dx_key]/omschrijving)"/>
</xsl:call-template>
</td>
@@ -4702,12 +4718,12 @@ END:VCALENDAR
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2009. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios/>
<MapperMetaTag>
<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
<MapperBlockPosition></MapperBlockPosition>
<TemplateContext></TemplateContext>
<MapperFilter side="source"></MapperFilter>
</MapperMetaTag>
<scenarios/>
<MapperMetaTag>
<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
<MapperBlockPosition></MapperBlockPosition>
<TemplateContext></TemplateContext>
<MapperFilter side="source"></MapperFilter>
</MapperMetaTag>
</metaInformation>
-->