El nostre pipeline
Última actualizació, juliol 2022.
The following has evaluated to null or missing:
==> row.category [in template "4257042#4257090#4793507" at line 41, column 24]
----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign key = row.category.getData() [in template "4257042#4257090#4793507" at line 41, column 9]
----
1<style>
2 .star{
3 position: absolute;
4 right: calc(100% - 55px);
5 top: 50%;
6 transform: translateY(-50%);
7 font-size: 16px;
8 visibility: visible;
9 }
10</style>
11<div class="pipeline-table">
12 <table class="table table-responsive page-table--pipeline" id="table-pipeline">
13 <thead>
14 <tr>
15 <th width="20%" scope="col">
16 <@liferay.language key="sep.almirall.pipeline.commercial.molecule" />
17 </th>
18 <th width="25%" scope="col">
19 <@liferay.language key="sep.almirall.pipeline.indication" />
20 </th>
21 <th width="12%" scope="col">
22 <@liferay.language key="sep.almirall.pipeline.phase.one" />
23 </th>
24 <th width="12%" scope="col">
25 <@liferay.language key="sep.almirall.pipeline.phase.two" />
26 </th>
27 <th width="12%" scope="col">
28 <@liferay.language key="sep.almirall.pipeline.phase.three" />
29 </th>
30 <th width="12%" scope="col">
31 <@liferay.language key="sep.almirall.pipeline.phase.under.registration" />
32 </th>
33 <th width="12%" scope="col" >
34 <@liferay.language key="sep.almirall.pipeline.geography" />
35 </th>
36 </tr>
37 </thead>
38 <tbody id="download-forms-table-tbody">
39 <#assign groupedData = {} />
40 <#list Project.getSiblings() as row>
41 <#assign key = row.category.getData() />
42 <#if groupedData[key]?exists>
43
44 <#assign newList = [] />
45 <#list groupedData[key] as existingRow>
46 <#assign newList = newList + [existingRow] />
47 </#list>
48 <#assign newList = newList + [row] />
49 <#assign groupedData = groupedData + { (key): newList } />
50 <#else>
51
52 <#assign groupedData = groupedData + { (key): [row] } />
53 </#if>
54 </#list>
55
56 <#list groupedData?keys as groupKey>
57 <tr>
58 <td colspan="7" class="category-row">
59 <strong>${groupKey}</strong>
60 </td>
61 </tr>
62 <#list groupedData[groupKey] as row>
63 <#assign nombreProducto=row.CommercialName.getData()>
64 <tr class="content">
65 <td class="first-row">
66 <div class="cell-content">${nombreProducto}</div>
67 </td>
68 <td class="td-border">
69 <div class="cell-content">${row.Indication.getData()}</div>
70 </td>
71 <td class="progressColumn td-border">
72 <div class="cell-content">
73 <#assign percentageNumber=row.PhasePercentage.getData()?number />
74 <div class="progressW-bar progressW">
75 <div class="progress-value progressW " style="overflow: hidden" data-progress-percent="${percentageNumber}">
76 <span style="visibility:hidden;">
77 ${percentageNumber} ${definePhase(percentageNumber)}
78 </span>
79 </div>
80 </div>
81 </div>
82 </td>
83 <td class="td-border"><div class="cell-content"></div></td>
84 <td class="td-border"><div class="cell-content"></div></td>
85 <td class="td-border"><div class="cell-content"></div></td>
86 <td>
87 <div class="cell-content">
88 <div class="wrap-geo">
89 <#list row.Country.getSiblings() as geo>
90 <div class="wrap-geo-icon">
91 <#assign country=geo.getData()?lower_case>
92 <#if country?starts_with("worldwide")>
93 <img src="/o/almirall-restyling-theme/images/icons/worldwide.svg" alt="Worldwide" />
94 <#assign isExChina="*" />
95 <#if country=="worldwide_exchina"><span class="star">
96 ${isExChina}
97 </span></#if>
98 <#if country=="worldwide_atopicderma"><span class="star"> **</span></#if>
99 <#break>
100 <#else>
101 <#if country=="eu" || country=="europe">
102 <img src="/o/almirall-restyling-theme/images/icons/EU.svg" alt="EU" />
103 </#if>
104 <#if country=="u.s" || country=="united states">
105 <img src="/o/almirall-restyling-theme/images/icons/US.svg" alt="U.S." />
106 </#if>
107 <#if country=="china">
108 <img src="/o/almirall-restyling-theme/images/icons/china.svg" alt="China" />
109 </#if>
110 <#if country=="uk">
111 <img src="/o/almirall-restyling-theme/images/icons/UK.svg" alt="UK" />
112 </#if>
113 </#if>
114 </div>
115 </#list>
116 </div>
117 </div>
118 </td>
119 </tr>
120 </#list>
121 </#list>
122 </tbody>
123 </table>
124
125 <#list Project.getSiblings() as row>
126 <#assign percentageNumber=row.PhasePercentage.getData()?number
127 countryList="" />
128 <#list row.Country.getSiblings() as geo>
129 <#assign currentCountry=geo.getData()?lower_case />
130 <#if currentCountry=="europe">
131 <#assign currentCountry="EU" />
132 <#elseif currentCountry=="united states" || currentCountry=="u.s." || currentCountry=="u.s">
133 <#assign currentCountry="U.S." />
134 </#if>
135 <#assign countryList+=" " +currentCountry />
136 </#list>
137 <p class="content"><span style="display:none;">
138 ${row.Indication.getData()} ${row.CommercialName.getData()} ${definePhase(percentageNumber)} ${countryList}
139 </span>
140 ${row.ProjectLegend.getData()}
141 </p>
142 </#list>
143</div>
144
145<#function definePhase n>
146 <#assign percentageNumber=n
147 phaseName=""
148 phasesNumber=4
149 number=0 />
150 <#list 1..phasesNumber as phase>
151 <#assign number=number+(100/phasesNumber) />
152 <#if percentageNumber <= number>
153 <#if phase==1>
154 <#assign phaseName="Phase 1">
155 <#elseif phase == phasesNumber>
156 <#assign phaseName="Under registration">
157 <#else>
158 <#assign phaseName="Fase" +(phase)>
159 </#if>
160 <#return phaseName />
161 <#break>
162 </#if>
163 </#list>
164 <#return phaseName />
165</#function>
166<script>
167$(function() {
168 moveProgressBar();
169 const startColor = "#C9FFF4";
170 const endColor = "#E9C3FF";
171 const barStartColor = "#008C93";
172 const barEndColor = "#8700D3";
173
174 var rows = $(".page-table--pipeline tbody").find(".cell-content");
175
176
177 if (rows.length > 0) {
178 const colorStep = 1 / (rows.length - 1);
179
180 rows.each(function(index) {
181
182 const position = index * colorStep;
183
184
185 const color = interpolateColor(startColor, endColor, position);
186 const barColor = interpolateColor(barStartColor, barEndColor, position);
187
188
189 $(this).css("background-color", color);
190 var progressBar = $(this).closest("td").find(".progress-value");
191
192 if (progressBar.length) {
193 progressBar.css("background-color", barColor);
194 }
195 });
196 }
197
198
199 function interpolateColor(color1, color2, factor) {
200 function hexToRgb(hex) {
201 return {
202 r: parseInt(hex.substr(1, 2), 16),
203 g: parseInt(hex.substr(3, 2), 16),
204 b: parseInt(hex.substr(5, 2), 16)
205 };
206 }
207
208 function rgbToHex(r, g, b) {
209 return "#" + (1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1).toUpperCase();
210 }
211
212
213 var color1Rgb = hexToRgb(color1);
214 var color2Rgb = hexToRgb(color2);
215
216
217 var r = Math.round(color1Rgb.r + (color2Rgb.r - color1Rgb.r) * factor);
218 var g = Math.round(color1Rgb.g + (color2Rgb.g - color1Rgb.g) * factor);
219 var b = Math.round(color1Rgb.b + (color2Rgb.b - color1Rgb.b) * factor);
220
221
222 return rgbToHex(r, g, b);
223 }
224})
225</script>