Meu Perfil
Meu Perfil
Título da Página
Teste de demanda virada sem img
Teste de demanda virada sem img
Contato
lais.silva.060223@teste.com
Café #41 – Prospectando alternativas proteicas sustentáveis para o futuro
Teste de demanda virada sem img
Contato
lais.silva.060223@teste.com
Café #40 – Bioeconomia circular: Estratégias circulares para um mundo sustentável
Teste de demanda virada sem img
Contato
lais.silva.060223@teste.com
Biodiversidade e fontes renováveis precisam estar no foco das discussões sobre mudanças climáticas
Teste de demanda virada sem img
Contato
lais.silva.060223@teste.com
The following has evaluated to null or missing:
==> autorArticleId [in template "34764#34807#41133" at line 98, column 22]
----
Tip: If the failing expression is known to 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: #if autorArticleId != "0" && autorArt... [in template "34764#34807#41133" at line 98, column 17]
----
1<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
2<#assign UserLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")>
3<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
4<#assign mbMessageLocalService = serviceLocator.findService("com.liferay.message.boards.service.MBMessageLocalService")>
5<#assign OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService")
6 tagsLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService")
7>
8
9
10
11
12
13
14
15
16<div class="bioec-profile-oferta-main">
17 <div id="oferta-lista-container" class="d-flex flex-column">
18 <#if entries?has_content>
19 <#list entries as entry>
20 <#assign journalArticle = JournalArticleLocalService.getLatestArticle(entry.getClassPK()) >
21 <#assign JournalArticleID = journalArticle.getId()>
22 <#assign JournalArticleFrontId = journalArticle.getArticleId()>
23 <#assign articleXml = journalArticle.getDocument().getRootElement()
24 userIsAdmin = false
25 orgId = ""
26 autorId = ""
27 >
28
29 <#if articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto50355704']")??>
30
31 <#assign nomeParaContato = articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto50355704']").getStringValue()!""
32 nomeParaContato = nomeParaContato?replace("\n\t\t", "")
33 nomeParaContato = nomeParaContato?replace("\n\t", "")
34 >
35 </#if>
36
37 <#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text90715721']")??>
38 <#assign telefone = articleXml.selectSingleNode("dynamic-element[@field-reference='Text90715721']")!""
39 telefone = telefone.getStringValue()!""
40 telefone = telefone?replace("\n\t\t", "")
41 telefone = telefone?replace("\n\t", "")
42 >
43
44 </#if>
45
46 <#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text68569631']")??>
47 <#assign email = articleXml.selectSingleNode("dynamic-element[@field-reference='Text68569631']").getStringValue()!""
48 email = email?replace("\n\t\t", "")
49 email = email?replace("\n\t", "")
50 >
51 </#if>
52
53
54 <#if articleXml.selectSingleNode("dynamic-element[@field-reference='CopyOfText18267936']")??>
55 <#assign desc = articleXml.selectSingleNode("dynamic-element[@field-reference='CopyOfText18267936']").getStringValue()!""
56 desc = desc?replace("\n\t\t", "")
57 desc = desc?replace("\n\t", "")
58 >
59 </#if>
60
61 <#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text80669990']")??>
62 <#assign imagem = articleXml.selectSingleNode("dynamic-element[@field-reference='Text80669990']").getStringValue()!""
63 imagem = imagem?replace("\n\t\t", "")
64 imagem = imagem?replace("\n\t", "")
65 >
66 </#if>
67
68 <#if articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto97452704']")??>
69 <#assign autorId = articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto97452704']").getStringValue()!""
70 autorId = autorId?replace("\n\t\t", "")
71 autorId = autorId?replace("\n\t", "")
72 autorArticleId = ""
73 >
74 </#if>
75
76 <#assign
77 commentsCount = mbMessageLocalService.getDiscussionMessagesCount(entry.getClassName(), entry.getClassPK(), 0)!"0"
78 >
79
80
81
82 <#if autorId != "" && autorId??>
83 <#assign
84 autor = UserLocalService.fetchUser(autorId?number)!""
85 autorArticleId = autor.getExpandoBridge().getAttribute("journal-article")!"0"
86 />
87 <#if autor != "">
88 <#assign autor = autor.getFullName()!"">
89 <#else>
90 <#assign autor = "Anônimo" >
91 </#if>
92 <#else>
93 <#assign autor = "Anônimo" >
94 </#if>
95 <#assign categorias = AssetCategoryLocalService.getCategoryNames(entry.getClassName(), entry.getClassPK())!"" >
96 <#assign urlWC = "">
97
98 <#if autorArticleId != "0" && autorArticleId != "" && autor != "Anônimo">
99 <#assign autorArticle = JournalArticleLocalService.getLatestArticle(themeDisplay.getLayout().getGroupId(), autorArticleId?string) >
100 <#assign urlWC = autorArticle.getUrlTitle()!"">
101 </#if>
102
103
104 <#assign tags = tagsLocalService.getTagNames("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()?number )
105 tagName = tags[0]!""
106 orgOrUser = ""
107 >
108
109 <#if tagName?contains("organization") && tagName != "" >
110 <#assign orgOrUser = "org">
111 <#else>
112 <#assign orgOrUser = "user">
113 </#if>
114
115 <#if orgOrUser == "org" >
116
117 <#assign
118 orgId = tagName?keep_after("organization-")
119 organization = OrganizationLocalService.fetchOrganization(orgId?number)!""
120 >
121
122
123 <#if organization != "" && autor != "Anônimo">
124 <#assign orgArticleId = organization.getExpandoBridge().getAttribute("journal-article")
125 orgJournalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),orgArticleId?c)
126 urlWC = orgJournalArticle.getUrlTitle()!""
127 autor = organization.getName()!""
128 >
129
130 </#if>
131 </#if>
132
133 <#if themeDisplay.isSignedIn() >
134 <#if tagName?contains("organization-")>
135 <#assign userIsAdmin = OrganizationLocalService.hasUserOrganization(themeDisplay.getUserId(), orgId?number)>
136 <#else>
137 <#if autorId?number == themeDisplay.getUserId()>
138 <script>console.log("oi");</script>
139 <#assign userIsAdmin = true>
140 </#if>
141 </#if>
142
143
144 </#if>
145
146
147 <div class="oferta-lista-item">
148 <div class="lista-checkmark">
149 <#if categorias?seq_contains("aprovado") > <i title="Aprovado" style="color: #4ECD66" class="fa-solid fa-circle-check"></i> </#if>
150 <#if categorias?seq_contains("pendente") > <i title="Em análise" style="color: #D90000"class="fa-solid fa-spinner"></i> </#if>
151 <#if categorias?seq_contains("recusado") > <i title="Recusado" style="color: #D90000"class="fa-solid fa-exclamation-circle"></i> </#if>
152 </div>
153
154
155 <div class="lista-titulo">
156 <h5>${entry.getHighlightedTitle()}</h5>
157 </div>
158
159 <div class="lista-arrow">
160 <button style="padding: 0;" class="btn" type="button" data-toggle="collapse" data-target="#collapseID${entry.getClassPK()}" aria-expanded="false" aria-controls="collapseID${entry.getClassPK()}">
161 <i class="fa-solid fa-chevron-down"></i>
162 </button>
163 </div>
164
165 <div class="lista-desc">
166 <p>${desc}</p>
167 </div>
168
169 <div class="lista-collapse collapse" id="collapseID${entry.getClassPK()}">
170 <#if nomeParaContato != "" || telefone != "" || email != "" || imagem?trim !="">
171 <div class="lista-details">
172 <div class="lista-pic">
173 <i class="fa-solid fa-image-slash"></i>
174 <#if imagem?trim !="" >
175 <img class="bioec_oferta_img" src="${imagem}">
176 <#else>
177 <div class="bioec_oferta_img_placeholder">
178 <i class="fa-solid fa-image"></i>
179 sem imagem
180 </div>
181 </#if>
182 </div>
183 <#if nomeParaContato != "" || telefone != "" || email != "" >
184 <div class="lista-contato">
185 <p>Contato</p>
186 <p class="lista-author">${nomeParaContato}</p>
187 <p class="lista-phone">${telefone}</p>
188 <p class="lista-email">${email}</p>
189 </div>
190 </#if>
191 </div>
192 </#if>
193
194 <#if categorias?seq_contains("recusado") >
195 <div style="border-top: 1px solid #E8ECEF; font-weight: bold; padding-top: 24px;">
196 <p>Conteúdo Em Análise Pelo Cetiqt:</p>
197 <p>Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.</p>
198 </div>
199 </#if>
200 <div class="lista-footnote">
201 <div>
202 <span class="lista-date">${journalArticle.getDisplayDate()?string('dd/MM/yyyy')}</span> | <span class="lista-commentNumber">${commentsCount} cometários</span> <span class="barra-pipe"> | </span> <span class="lista-author">Publicado por <a <#if urlWC != ''>href="/w/${urlWC}</#if>">${autor}</a></span>
203 </div>
204 <#if userIsAdmin>
205 <div class="buttonsActions">
206 <div style="cursor: pointer;font-size: 16px;" data-toggle="modal" data-target="#modalOferta${JournalArticleID}">
207 <i class="fa-solid fa-edit"></i>
208 </div>
209 <div style="cursor: pointer;font-size: 16px;" data-toggle="modal" data-target="#modal-oferta-${entry.getClassPK()}">
210 <i class="fa-solid fa-trash-can"></i>
211 </div>
212
213 </div>
214 </#if>
215 </div>
216 </div>
217 </div>
218
219 <#if userIsAdmin>
220 <div style="display: none;" id="modal-oferta-${entry.getClassPK()}" class="modal fade" role="dialog">
221 <div class="modal-dialog modal-lg" role="document">
222 <div class="modal-content">
223 <div class="modal-header" >
224 <h4 class="m-0">Remover Oferta</h4>
225 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
226 <span aria-hidden="true">
227 <i class="fa-solid fa-close"></i>
228 </span>
229 </button>
230 </div>
231 <div class="modal-body">
232 <h5>Você tem certeza que deseja remover essa oferta?</h5>
233 <div>
234 Ao clicar em continuar, a oferta será removida do seu perfil.
235 </div>
236 </div>
237 <div class="modal-footer justify-content-end">
238 <button class="bioec_secondary_button" data-dismiss="modal">CANCELAR</button>
239 <button class="bioec_primary_button" type="button" onclick="excluirOferta(${JournalArticleFrontId}, ${orgId})">CONTINUAR</button>
240 </div>
241 </div>
242 </div>
243 </div>
244
245 <#-- modal edição -->
246
247
248 <div style="display: none;" id="modalOferta${JournalArticleID}" class="modal fade bioec-profile-oferta-modal modalOferta" role="dialog">
249 <div class="modal-dialog modal-lg" role="document">
250 <form id="formularioOferta${JournalArticleID}" class="form-group modal-content formularioOferta">
251 <div id="ofertaModal-l1${JournalArticleID}" class="modal-header ofertaModal-l1">
252 <h5>Adicionar oferta</h5>
253 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
254 <span aria-hidden="true">×</span>
255 </button>
256 </div>
257 <div id="ofertaModal-l2${JournalArticleID}" class="modal-body ofertaModal-l2">
258 <div id="ofertaTitle${JournalArticleID}" class="ofertaTitle">
259 <label class="ReqLabel" for="ofertaInputTitle${JournalArticleID}">Título da oferta</label>
260 <input id="ofertaInputTitle${JournalArticleID}" value="${entry.getHighlightedTitle()}" type="text" placeholder="Inserir um título" required>
261 </div>
262 <div id="ofertaName${JournalArticleID}" class="ofertaName">
263 <label class="" for="ofertaInputName${JournalArticleID}">Nome para contato</label>
264 <input value="${nomeParaContato}" id="ofertaInputName${JournalArticleID}" placeholder="Inserir nome" type="text">
265 </div>
266 <div id="ofertaTelephone${JournalArticleID}" class="ofertaTelephone">
267 <label class="" for="ofertaInputPhone${JournalArticleID}">Telefone para contato</label>
268 <input value="${telefone}" id="ofertaInputPhone${JournalArticleID}" name="ofertaInputPhone" type="text" placeholder ='(__)_____-_____' minlength="14" />
269 </div>
270 <div id="ofertaEmail${JournalArticleID}" class="ofertaEmail">
271 <label class="" for="ofertaInputEmail${JournalArticleID}">E-mail para contato</label>
272 <input value="${email}" id="ofertaInputEmail${JournalArticleID}" placeholder="Inserir e-mail" type="text">
273 </div>
274 <div id="ofertaDesc${JournalArticleID}" class="ofertaDesc">
275 <label class="ReqLabel" for="ofertaInputDesc${JournalArticleID}">Descrição</label>
276 <textarea id="ofertaInputDesc${JournalArticleID}" style="max-width: 100%;font-size: 16px;height: 80px;border: 1px solid #BEBEBE;" required>${desc}</textarea>
277 </div>
278 <div id="ofertaImg${JournalArticleID}" class="ofertaImg">
279 <div style="display: flex; flex-direction: column; gap: 8px">
280 <label>Imagem da oferta (Máx. 10 MB)</label>
281 <label class="btn carregarImagem" id="carregarImagem${JournalArticleID}" for="inputCarregarImagemOferta${JournalArticleID}" style="font-size: 16px; cursor: pointer;">CARREGAR IMAGEM</label>
282 <input class="inputCarregarImagemOferta" id="inputCarregarImagemOferta${JournalArticleID}" type="file" accept="image/*" onchange="encodeOfertaImageAsURL${JournalArticleID}(this)">
283 <input class="d-none" id="inputOfertaBase64${JournalArticleID}" value="${imagem}"/>
284 <div class="imagemCarregadaOferta imagemCarregadaOferta${JournalArticleID} d-md-none d-block" style="background-image: url(${imagem})"></div>
285 <button type="button" id="removerImagemOferta${JournalArticleID}" class="<#if imagem == "" || imagem?? == false> d-none </#if> removerImagemOferta" >
286 <i class="fa fa-trash"></i> Remover imagem
287 </button>
288 </div>
289 <div class="imagemCarregadaOferta imagemCarregadaOferta${JournalArticleID} d-md-block d-none" style="background-image: url(${imagem})"></div>
290 </div>
291 </div>
292 <div class="TextImportant">
293 <p>
294 Importante: O conteúdo enviado passará por um processo interno de aprovação. Só então o conteúdo adicionado aparecerá no portal.
295 </p>
296 </div>
297
298 <div id="ofertaModal-l3${JournalArticleID}" class="modal-footer ofertaModal-l3">
299 <button class="btn button-empty" onclick="" id="ofertas-saveAndClose${JournalArticleID}">SALVAR E FECHAR</button>
300 </div>
301 </form>
302 </div>
303 </div>
304
305 </#if>
306 <#--
307
308
309
310
311 <div style="display: none;" id="modalInfra${JournalArticleID}" class="modal fade bioec-profile-infra-modal" role="dialog">
312 <div class="modal-dialog modal-lg" role="document">
313
314 <form class="form-group modal-content" id="formularioInfraestrutura${JournalArticleID}">
315 <div id="infraModal-l1-${JournalArticleID}" class="modal-header infraModal-l1" >
316 <h5>Adicionar Infraestrutura</h5>
317 <button id="fecharModal${JournalArticleID}" type="button" class="close" data-dismiss="modal" aria-label="Close">
318 <span aria-hidden="true">×</span>
319 </button>
320 </div>
321 <div id="infraModal-l2-${JournalArticleID}" class="modal-body infraModal-l2">
322 <div id="infraName${JournalArticleID}" class="infraName">
323 <label class="ReqLabel" for="inputInfraName${JournalArticleID}">Nome da infraestrutura</label>
324 <input type="text" id="inputInfraName${JournalArticleID}" value="${entry.getHighlightedTitle()}" placeholder="Nome da infraestrutura" required>
325 </div>
326 <div id="infraModel${JournalArticleID}" class="infraModel">
327 <label class="ReqLabel" for="inputInfraModel${JournalArticleID}">Modelo</label>
328 <input type="text" id="inputInfraModel${JournalArticleID}" value="${modelo}" placeholder="Modelo" required>
329 </div>
330 <div id="infraBrand${JournalArticleID}" class="infraBrand">
331 <label class="ReqLabel" for="inputInfraBrand${JournalArticleID}">Marca</label>
332 <input type="text" id="inputInfraBrand${JournalArticleID}" value="${marca}" placeholder="Marca" required>
333 </div>
334
335 <div id="infraImg${JournalArticleID}" class="infraImg">
336 <div style="display: flex; flex-direction: column; gap: 8px">
337 <label>Imagem da infraestrutura (Máx. 10 MB)</label>
338 <label class="bioec_secondary_button" id="carregarImagem${JournalArticleID}" for="inputCarregarImagemInfra${JournalArticleID}" style="font-size: 16px;color: #333244;align-self:start;">
339 CARREGAR IMAGEM
340 </label>
341 <input id="inputCarregarImagemInfra${JournalArticleID}" class="inputCarregarImagemInfra" type="file" accept="image/*" onchange="encodeInfraImageAsURL${JournalArticleID}(this)">
342 <input class="d-none" id="inputInfraBase64${JournalArticleID}" />
343 <div class="imagemCarregadaInfra${JournalArticleID} d-md-none d-block"></div>
344 <button type="button" id="removerImagemInfra${JournalArticleID}" class="d-none removerImagemInfra" >
345 <i class="fa fa-trash"></i> Remover imagem
346 </button>
347 </div>
348 <div class="imagemCarregadaInfra${JournalArticleID} d-md-block d-none"></div>
349 </div>
350
351 <div id="infraFunction${JournalArticleID}" class="infraFunction">
352 <label class="ReqLabel" for="inputInfraFunction${JournalArticleID}">Função</label>
353 <input type="text" id="inputInfraFunction${JournalArticleID}" class="inputInfraFunction" value="${funcao}" placeholder="Função" required>
354 </div>
355 </div>
356 <div class="TextImportant">
357 <p>
358 Importante: O conteúdo enviado passará por um processo interno de aprovação. Só então o conteúdo adicionado aparecerá no portal.
359 </p>
360 </div>
361 <div id="infraModal-l3-${JournalArticleID}" class="modal-footer infraModal-l3">
362 <button class="bioec_secondary_button" id="ofertas-saveAndClose${JournalArticleID}" onclick="">SALVAR E FECHAR</button>
363 </div>
364 </form>
365
366 </div>
367
368
369 -->
370
371
372
373 <script>
374 <#if userIsAdmin>
375 function excluirOferta(wcId, orgId) {
376 Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""});
377 fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/oferta/" + wcId, {
378 method: 'DELETE',
379 "headers": {
380 "x-csrf-token": Liferay.authToken,
381 "Content-Type": "application/json"
382 }
383 })
384 .then(res => {
385 if(res.status == 200) {
386 Liferay.Util.openToast({
387 message: "Infraestrutura excluida com sucesso",
388 type: "success",
389 title: "",
390 toastProps: {
391 autoClose: 5000
392 }
393 })
394 setTimeout(function(){ location.reload(); }, 2000)
395 } else {
396 Liferay.Util.openToast({
397 message: "Erro ao excluir infraestrutura",
398 type: "danger",
399 title: "",
400 toastProps: {
401 autoClose: 5000
402 }
403 })
404 }
405 });
406 }
407
408
409
410
411 function validImageSize(base64="") {
412 const decoded = atob(base64.substring(base64.indexOf(',') + 1));
413 const sizeMB = decoded.length / 1e+6;
414 console.log("MB: " + decoded.length / 1e+6);
415 if(sizeMB > 10) {
416 Liferay.Util.openToast({
417 message: "O tamanho da imagem não deve ultrapassar 10 MB.",
418 type: "danger",
419 title: "",
420 toastProps: {
421 autoClose: 5000
422 }
423 })
424 return false
425 }
426 return true
427 }
428
429 function encodeOfertaImageAsURL${JournalArticleID}(element) {
430 let file = element.files[0];
431 let reader = new FileReader();
432 reader.onloadend = () => {
433 if(reader.result) {
434 if(!validImageSize(reader.result)) return;
435 try {
436 const base64_input = document.getElementById("inputOfertaBase64${JournalArticleID}")
437 base64_input.value = reader.result
438 Array.from(document.getElementsByClassName("imagemCarregadaOferta${JournalArticleID}")).forEach( el => el.style.backgroundImage = 'url(' + reader.result + ')' )
439
440 const removeImageButton = document.getElementById("removerImagemOferta${JournalArticleID}")
441 removeImageButton.classList.remove("d-none")
442 } catch (error) {
443 console.error(error)
444 }
445 }
446 }
447 reader.readAsDataURL(file);
448 }
449
450 function removeImageOferta${JournalArticleID}() {
451 try {
452 const file_input = document.getElementById("inputCarregarImagemOferta${JournalArticleID}")
453 Array.from(document.getElementsByClassName("imagemCarregadaOferta${JournalArticleID}")).forEach( el => el.style.backgroundImage = "" )
454 const base64_input = document.getElementById("inputOfertaBase64${JournalArticleID}")
455 file_input.value = null
456 base64_input.value = ""
457
458 const removeImageButton = document.getElementById("removerImagemOferta${JournalArticleID}")
459 removeImageButton.classList.add("d-none")
460 } catch (error) {
461 console.error(error)
462 }
463}
464
465
466
467document.getElementById("removerImagemOferta${JournalArticleID}").addEventListener("click", removeImageOferta${JournalArticleID});
468
469<#-- Rest da edição de organização -->
470
471<#if orgOrUser == "org">
472document.querySelector('#formularioOferta${JournalArticleID}').addEventListener('submit', event => {
473 event.preventDefault();
474 adicionarOferta${JournalArticleID}();
475});
476
477function adicionarOferta${JournalArticleID}() {
478 Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""});
479 $("#ofertas-saveAndClose${JournalArticleID}").prop("disabled",true);
480
481
482
483 const ofertaData = {
484 titulo: document.getElementById("ofertaInputTitle${JournalArticleID}").value,
485 nomeContato: document.getElementById("ofertaInputName${JournalArticleID}").value,
486 telefoneContato: document.getElementById("ofertaInputPhone${JournalArticleID}").value,
487 emailContato: document.getElementById("ofertaInputEmail${JournalArticleID}").value,
488 descricao: document.getElementById("ofertaInputDesc${JournalArticleID}").value,
489 imagem: document.getElementById("inputOfertaBase64${JournalArticleID}").value,
490 }
491
492 console.log(ofertaData);
493
494 fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/oferta/${JournalArticleFrontId}", {
495 method: 'PUT',
496 "headers": {
497 "x-csrf-token": Liferay.authToken,
498 "Content-Type": "application/json"
499 },
500 body: JSON.stringify(ofertaData)
501 })
502 .then(res => {
503 if(res.status == 200) {
504 Liferay.Util.openToast({
505 message: "Oferta editada com sucesso. Após a submissão, será iniciado o processo interno de aprovação do conteúdo enviado. Só então o conteúdo submetido aparecerá no portal.",
506 type: "success",
507 title: "",
508 toastProps: {
509 autoClose: 5000
510 }
511 })
512 setTimeout(function(){ location.reload(); }, 2000);
513 } else {
514 $("#ofertas-saveAndClose${JournalArticleID}").prop("disabled",false);
515 Liferay.Util.openToast({
516 message: "Erro ao editar oferta",
517 type: "danger",
518 title: "",
519 toastProps: {
520 autoClose: 5000
521 }
522 })
523 }
524 })
525 }
526</#if>
527
528<#-- Rest da edição de pessoa fisica -->
529
530
531
532 <#if orgOrUser == "user">
533
534 document.querySelector('#formularioOferta${JournalArticleID}').addEventListener('submit', event => {
535 event.preventDefault();
536 adicionarOferta${JournalArticleID}();
537 });
538
539 function adicionarOferta${JournalArticleID}() {
540 Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""});
541 $("#ofertas-saveAndClose${JournalArticleID}").prop("disabled",true);
542
543 const ofertaData = {
544 titulo: document.getElementById("ofertaInputTitle${JournalArticleID}").value,
545 nomeContato: document.getElementById("ofertaInputName${JournalArticleID}").value,
546 telefoneContato: document.getElementById("ofertaInputPhone${JournalArticleID}").value,
547 emailContato: document.getElementById("ofertaInputEmail${JournalArticleID}").value,
548 descricao: document.getElementById("ofertaInputDesc${JournalArticleID}").value,
549 imagem: document.getElementById("inputOfertaBase64${JournalArticleID}").value,
550 }
551
552 console.log(ofertaData);
553
554 fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/oferta/${JournalArticleFrontId}", {
555 method: 'PUT',
556 "headers": {
557 "x-csrf-token": Liferay.authToken,
558 "Content-Type": "application/json"
559 },
560 body: JSON.stringify(ofertaData)
561 })
562 .then( res => {
563 if(res.status == 200) {
564 Liferay.Util.openToast({
565 message: "Oferta editada com sucesso. Após a submissão, será iniciado o processo interno de aprovação do conteúdo enviado. Só então o conteúdo submetido aparecerá no portal.",
566 type: "success",
567 title: "",
568 toastProps: {
569 autoClose: 5000
570 }
571 })
572 setTimeout(function(){ location.reload(); }, 2000);
573 } else {
574 $("#ofertas-saveAndClose${JournalArticleID}").prop("disabled",false);
575 Liferay.Util.openToast({
576 message: "Erro ao editar Oferta",
577 type: "danger",
578 title: "",
579 toastProps: {
580 autoClose: 5000
581 }
582 })
583 }
584 });
585
586 };
587
588
589 </#if>
590
591
592 </#if>
593 </script>
594
595
596
597
598 </#list>
599 </#if>
600 </div>
601</div>
602
603<style>
604.bioec_oferta_img {
605 overflow: hidden;
606 background-size: contain;
607 background-position: center;
608 background-repeat: no-repeat;
609}
610
611.bioec_oferta_img_placeholder {
612 width: 140px;
613 height: 140px;
614 background-color: #E8ECEF;
615 display: flex;
616 flex-direction: column;
617 align-items: center;
618 justify-content: center;
619 font-size: 14px;
620 color: #5B5C61;
621}
622
623.bioec_oferta_img_placeholder i {
624 font-size: 44px;
625}
626
627
628.pagination-items-per-page.active > a,
629.pagination-items-per-page.active > button,
630.pagination-items-per-page.show > a,
631.pagination-items-per-page.show > button,
632.page-item.active .page-link,
633.page-item.show .page-link{
634 border-color: #4ECD66;
635 background-color: #4ECD66;
636}
637
638.pagination-results,
639.pagination-items-per-page > a,
640.pagination-items-per-page > button,
641.pagination-items-per-page > a:hover,
642.pagination-items-per-page > button:hover,
643.page-link{
644 color: #4ebe66;
645}
646
647.bioec-profile-oferta-main{
648 display: flex;
649 gap: 40px;
650 flex-direction: column;
651 padding-bottom: 20px;
652}
653.bioec-profile-oferta-main h5{
654 font-weight: 700;
655}
656.bioec-profile-oferta-main h5, .bioec-profile-oferta-main p{
657 color: #5B5C61;
658 margin-bottom: 0px;
659 font-size: 16px;
660
661}
662
663.bioec-profile-oferta-main #oferta-lista-container>div{
664 border: 1px #BEBEBE solid;
665 padding: 24px 24px 0 24px;
666 margin-bottom: 40px;
667 display: grid;
668 grid-row-gap: 24px;
669 grid-template-columns: 24px 12px 1fr 15px;
670 grid-template-areas:
671 "ck . tit arrw"
672 "desc desc desc desc"
673 "clps clps clps clps";
674}
675
676.bioec-profile-oferta-main .lista-checkmark { grid-area: ck; display: flex; }
677.bioec-profile-oferta-main .lista-checkmark i { font-size: 24px; }
678.bioec-profile-oferta-main .lista-pic { grid-area: pic; display: flex; justify-content: center;}
679.bioec-profile-oferta-main .lista-arrow { grid-area: arrw; }
680
681.bioec-profile-oferta-main .lista-titulo {
682 grid-area: tit;
683 display: flex;
684 flex-direction: column;
685 justify-content: center;
686
687}
688
689.bioec-profile-oferta-main .lista-titulo h5{
690 margin-bottom: 0px;
691}
692
693.bioec-profile-oferta-main .lista-desc {
694grid-area: desc;
695}
696
697.bioec-profile-oferta-main .lista-desc p{
698 margin: 0;
699}
700
701.bioec-profile-oferta-main a{
702 color: #5B5C61;
703}
704
705.oferta-port{
706 border: 1px #BEBEBE solid;
707 padding: 24px;
708 display: flex;
709 flex-direction: column;
710 align-items: center;
711 gap: 24px;
712}
713
714.oferta-port p{
715text-align: center;
716
717}
718
719.oferta-port div{
720display: flex;
721 justify-content: space-between;
722 width: min(558px, 100%);
723}
724
725.button-empty {
726border: solid 1px #4ECD66;
727padding: 8px 24px;
728color: #333244;
729 transition: 250ms;
730}
731
732.button-empty:hover{
733 background-color: #4ECD66;
734}
735
736.button-filled {
737background-color: #4ECD66;
738border: solid 1px #4ECD66;
739padding: 8px 24px;
740color: #333244;
741transition: 250ms;
742
743}
744
745.button-filled:hover{
746 background-color: transparent;
747}
748
749.bioec-profile-oferta-main .lista-footnote {
750
751 display: flex;
752 justify-content: space-between;
753 border-top: 1px solid #E8ECEF;
754 padding-top: 12px;
755 font-size: 14px;
756 font-weight: 300;
757 gap: 15px;
758 color: #5B5C61;
759
760}
761.lista-collapse{
762display: flex;
763flex-direction: column;
764gap: 24px;
765grid-area: clps;
766padding-bottom: 24px;
767}
768
769 .lista-details{
770 display: flex;
771 justify-content: flex-start;
772 gap: 24px;
773}
774.lista-pic img {
775 max-height: 138px;
776 max-width: 138px;
777}
778
779.bioec-profile-oferta-main p{
780
781}
782
783.imagemCarregadaOferta {
784 height: 100px;
785 width: 100px;
786 background-size: contain;
787 background-position: center;
788 background-repeat: no-repeat;
789}
790
791
792.ButtonAddOferta {
793 background: #4ECD66;
794 border-radius: 8px;
795 padding: 8px 24px;
796 border: none;
797 font-weight: 700;
798 color: #333244;
799 font-family: 'Roboto';
800 float: right;
801 text-transform: uppercase;
802}
803.ButtonAddOferta:hover{
804 color: #333244;
805 text-decoration: none;
806}
807
808.bioec-profile-oferta-modal label {
809 margin: 0;
810 cursor: default;
811 font-size: 20px;
812 font-weight: 700;
813 color: #5B5C61;
814}
815
816.bioec-profile-oferta-modal div {
817 width: 100%;
818}
819
820#ofertaModal-l1, .ofertaModal-l1 {
821 padding: 18px 24px;
822 display: flex;
823 justify-content: space-between;
824}
825
826#ofertaModal-l1 img, .ofertaModal-l1 img {
827 cursor: pointer;
828}
829
830#ofertaModal-l1 h5, .ofertaModal-l1 h5 {
831 margin: 0;
832 font-size: 20px;
833 font-weight: 700;
834 color: #5B5C61;
835}
836
837#ofertaModal-l2, .ofertaModal-l2 {
838 border-top: 1px solid #E8ECEF;
839 display: grid;
840 grid-template-columns: 1fr 1fr;
841 grid-template-areas:
842 "titu nome"
843 "fone mail"
844 "desc desc"
845 "imagem ."
846 ;
847 column-gap: 24px;
848 row-gap: 40px;
849 padding: 24px;
850}
851
852#ofertaModal-l2>div, .ofertaModal-l2>div {
853 display: flex;
854 flex-direction: column;
855 gap: 8px;
856}
857
858#ofertaTitle, .ofertaTitle {
859 grid-area: titu;
860}
861
862#ofertaName, .ofertaName {
863 grid-area: nome;
864}
865
866#ofertaTelephone, .ofertaTelephone {
867 grid-area: fone;
868}
869
870#ofertaEmail, .ofertaEmail {
871 grid-area: mail;
872}
873
874#ofertaBrand, .ofertaBrand {
875 grid-area: marca;
876}
877
878#ofertaModal-l2>#ofertaImg, .ofertaModal-l2>.ofertaImg {
879 grid-area: imagem;
880 display: flex;
881 flex-direction: column;
882}
883
884#ofertaDesc, .ofertaDesc {
885 grid-area: desc;
886
887}
888
889#ofertaDesc input, .ofertaDesc input {
890 height: 80px;
891}
892
893.TextImportant{
894 border-bottom: 1px solid #E8ECEF;
895 padding: 24px;
896 color: #5B5C61;
897}
898
899.bioec-profile-oferta-modal input[type="text"] {
900 border-top: none;
901 border-left: none;
902 border-right: none;
903 border-bottom: 1px solid #BEBEBE;
904 width: 100%;
905 font-size: 16px;
906
907}
908
909
910.bioec-profile-oferta-modal input[type="text"]:focus-visible {
911 outline: none;
912 border-bottom: 1px solid black;
913
914}
915
916.bioec-profile-oferta-modal .ReqLabel:before {
917 content: "* ";
918 color: #D90000;
919
920}
921
922#inputCarregarImagemOferta, .inputCarregarImagemOferta {
923 display: none;
924}
925
926#carregarImagem, .carregarImagem {
927 padding: 8px 24px;
928 border: 1px solid #4ECD66;
929 width: fit-content;
930 transition: 250ms;
931
932}
933
934#carregarImagem:hover, .carregarImagem:hover {
935 background-color: #4ECD66;
936}
937
938.button-empty {
939 border: solid 1px #4ECD66;
940 padding: 8px 24px;
941 color: #333244;
942 transition: 250ms;
943 font-weight: bold;
944}
945
946.button-empty:hover {
947 background-color: #4ECD66;
948}
949
950.button-filled {
951 background-color: #4ECD66;
952 border: solid 1px #4ECD66;
953 padding: 8px 24px;
954 color: #333244;
955 transition: 250ms;
956 font-weight: bold;
957}
958
959.button-filled:hover {
960 background-color: transparent;
961}
962
963#ofertaModal-l3, .ofertaModal-l3 {
964 gap: 24px;
965 display: flex;
966 justify-content: flex-end;
967 padding: 24px;
968}
969
970.modal {
971 padding: initial !important;
972 border-radius: 4px !important;
973
974}
975
976.modal a.close-modal {
977 display: none;
978}
979
980#removerImagemOferta, .removerImagemOferta {
981 background: none;
982 border: none;
983 outline: none;
984 color: #5B5C61;
985 font-size: 16px;
986 font-weight: 900;
987 line-height: 24px;
988 letter-spacing: 0em;
989 width: fit-content;
990 margin-left: 16px;
991}
992
993
994@media(max-width: 964px){
995 .lista-pic img {
996 width: 100%;
997 max-height: unset;
998 max-width: unset;
999
1000 }
1001}
1002
1003@media (max-width: 550px) {
1004 #ofertaModal-l2, .ofertaModal-l2 {
1005 display: flex;
1006 flex-direction: column;
1007 }
1008
1009 #ofertaModal-l3, .ofertaModal-l3 {
1010 display: flex;
1011 flex-direction: column;
1012 }
1013}
1014
1015@media(max-width: 450px){
1016 .bioec-profile-oferta-main .lista-details{
1017 flex-direction: column;
1018 }
1019
1020 .lista-contato{
1021 text-align: center;
1022 }
1023
1024 .bioec-profile-oferta-main .lista-footnote{
1025 flex-direction: column;
1026 gap: 10px;
1027 align-items: flex-end;
1028 text-align: right;
1029 }
1030}
1031
1032@media(max-width: 992px){
1033 #oferta-lista-container {
1034 padding-inline: 15px;
1035 }
1036}
1037
1038.bioec-profile-oferta-main .lista-footnote .buttonsActions {
1039 display: flex;
1040 gap: 17px;
1041}
1042
1043@media (max-width: 768px) {
1044 .bioec-profile-oferta-main .lista-desc {
1045 gap: 24px;
1046 flex-direction: column-reverse;
1047 }
1048 .bioec-profile-oferta-main .lista-footnote {
1049 flex-direction: column;
1050 align-items: center;
1051 }
1052 .bioec-profile-oferta-main .lista-footnote > div {
1053 text-align: center;
1054 }
1055
1056 .bioec-profile-oferta-main .lista-footnote .barra-pipe {
1057 display: none;
1058 }
1059 .bioec-profile-oferta-main .lista-footnote .lista-author {
1060 display: flex;
1061 gap: 4px;
1062 justify-content: center;
1063 }
1064 .bioec-profile-oferta-main .lista-footnote .buttonsActions {
1065 width: 100%;
1066 justify-content: space-between;
1067 }
1068}
1069
1070
1071</style>
1072
1073
1074<script>
1075
1076
1077
1078</script>
Notícia
Café #41 – Prospectando alternativas proteicas sustentáveis para o futuro
A edição do dia 25 de outubro de 2023 do Café com Bioeconomia reuniu Anna Paola Pierucci (Coordenadora de Relações Internacionais do Instituto de Nutrição Josué de Castro da UFRJ), Cristiana Ambiel (Gerente de Ciência e Tecnologia do The Good Food Institute) e Ricardo Laurino (Presidente da Sociedade Vegetariana Brasileira). O encontro, que acontece quinzenalmente, foi mediado por Fernanda Cardoso (Pesquisadora do Instituto SENAI de Inovação em Biossintéticos e Fibras).
Fernanda iniciou o debate solicitando aos convidados que indicassem as principais oportunidades e desafios ligados à produção de proteínas alternativas no Brasil em termos tecnológicos, geográficos e culturais. Além disso, as tendências de mercado da área e vantagens nutricionais também foram tema da discussão.
Anna Paola destacou que ao abordar as proteínas alternativas devem ser consideradas questões que vão desde a produção no campo até a mesa do consumidor. Ela citou oportunidades relacionadas à obtenção de ingredientes a partir da biodiversidade brasileira e de coprodutos que atualmente não são aproveitados. Em termos de desafios, foram citados a logística de distribuição dos alimentos, a oferta constante das matérias-primas, a escala de produção, e a necessidade de mudanças de hábitos dos grandes produtores, que possuem cadeias produtivas voltadas para produtos de origem animal. Anna Paola pontuou ainda que estudos mais recentes indicam que as proteínas vegetais promovem maior biodiversidade da microbiota intestinal e, consequentemente, impactam na redução do risco de determinadas doenças.
Cristiana ressaltou que por muito tempo o mercado priorizou matrizes de origem animal como fontes de proteínas na dieta, mas que atualmente são vislumbradas outras fontes proteicas e de nutrientes para a alimentação. Nesse contexto, para ela o grande desafio é tornar os produtos acessíveis, além de melhorar aspectos sensoriais para que tenham maior aceitação pela população. Cristiana explicou que a fonte de proteína mais promissora no Brasil é a do feijão, mas pontuou que os produtos derivados de processos fermentativos são uma tendência, e que também existe a possibilidade de utilização de microrganismos como fontes proteicas em formulações alimentícias.
Ricardo indicou que por ser um mercado recente, é natural que existam desafios a serem vencidos em termos de regulamentações e desenvolvimento da cadeia produtiva. Pesquisas internas da SVB indicaram que produtos com o selo vegano dão mais segurança ao consumidor. Ricardo explicou ainda que as empresas tendem a desenvolver produtos com características semelhantes aos produtos comerciais já existentes, mas que há um leque de possibilidades na criação produtos plant-based com experiências sensoriais que surpreendam o consumidor. Ele citou como tendência de longo prazo a criação de equipamentos domésticos, como impressoras 3D, que possibilitem à população formular o produto em suas residências.
O Café com Bioeconomia é um evento quinzenal, on-line e interativo, no qual palestrantes e público discutem temas relevantes para a área. Quer receber nossa agenda e participar? Inscreva-se em: https://portaldebioeconomia.com/
Quer ouvir este e outros Cafés? Estamos no Spotify em Café com Bioeconomia.
Notícia
Café #40 – Bioeconomia circular: Estratégias circulares para um mundo sustentável
A edição do dia 11 de outubro de 2023 do Café com Bioeconomia reuniu Arilma Tavares (Coordenadora do Núcleo de Sustentabilidade e Meio Ambiente do SENAI CIMATEC), Beatriz Luz (Fundadora da Exchange 4 Change Brasil) e Marilia Nery (CEO da Amazon Reuse). O encontro, que acontece quinzenalmente, foi mediado por Carolina Zoccoli (Doutoranda do PPED/IE/UFRJ e pesquisadora em Economia Circular).
Carolina iniciou a discussão confrontando a perspectiva de crescimento populacional com a produção sustentável e solicitando às participantes que indicassem como a bioeconomia se relaciona com as propostas da circularidade. Carolina indagou ainda sobre os desafios para que a pauta supere obstáculos, pontuando a cultura de sustentabilidade, formação profissional, desafios sociais, indicadores, entre outros.
Arilma pontuou que, para além de viabilizar o retorno financeiro, o desafio é repensar os processos. Além disso, a participante abordou o conceito de ética e de pensamento sistêmico para avaliar os impactos de diversos ângulos.
Beatriz ressaltou que a economia circular não resolve o problema dos resíduos, mas redefine os sistemas e elimina a visão de poluição. Ela citou um case de sucesso de uma indústria que empregava apenas 6% do coco de babaçu e atualmente consegue aproveitar a matéria-prima em sua totalidade. Para Beatriz, para inspirar mudança é preciso nova narrativa e cultura.
Marilia destacou que é necessário pensar em soluções dentro das ciências sociais, uma vez que a circularidade e suas ferramentas, como reutilização, reciclagem, logística reversa, educação ambiental, possuem potencial de transformação social. Para ela deve haver uma reflexão sobre nossos hábitos para integrar o ser social às tecnologias.
O Café com Bioeconomia é um evento quinzenal, on-line e interativo, no qual palestrantes e público discutem temas relevantes para a área. Quer receber nossa agenda e participar? Inscreva-se em: https://portaldebioeconomia.com/
Quer ouvir este e outros Cafés? Estamos no Spotify em Café com Bioeconomia.
Notícia
Biodiversidade e fontes renováveis precisam estar no foco das discussões sobre mudanças climáticas
O Brasil tem uma grande oportunidade de estar à frente das ações para combater as mudanças climáticas, mas assim como o restante do mundo, precisa começar a fazer negócios de maneira diferente. Para saber mais, clique aqui.