Nav Bar do usuário deslogado.

Organização

Nome Organização

Nome Organização
Startup
Cidade
Estado
Paísss
  • Sobre
  • Infraestruturas
  • Demandas
  • Ofertas
  • Publicações
Sobre drop zone
An error occurred while processing the template.
The following has evaluated to null or missing:
==> organization.getExpandoBridge().getAttribute("journal-article")  [in template "34764#34807#null" at line 23, column 21]

----
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: articleId = organization.getExpandoBr...  [in template "34764#34807#null" at line 23, column 9]
----
1<#assign  
2	OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService")  
3	JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
4/> 
5 
6<#assign  
7	viewerHasPrivileges = false 
8	userId = themeDisplay.getUserId() 
9/> 
10 
11<#if userId?? > 
12	<#assign  
13		orgId = _CUSTOM_FIELD_organization.getData()?number 
14		viewerHasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId) 
15		organization = OrganizationLocalService.getOrganization(orgId) 
16	/> 
17</#if> 
18 
19 
20<#if viewerHasPrivileges || DDMStructure_Field04200031.getData() != "0"> 
21<#assign  
22	organization = OrganizationLocalService.getOrganization(_CUSTOM_FIELD_organization.getData()?number) 
23	articleId = organization.getExpandoBridge().getAttribute("journal-article") 
24	journalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),articleId?c)  
25	articleXml = journalArticle.getDocument().getRootElement() 
26	 
27	setores = articleXml.selectNodes("dynamic-element[@name='Text67772680']") 
28/> 
29<#else> 
30<#assign setores = ["privado"] /> 
31</#if> 
32 
33<#assign  
34 
35	sobre = (viewerHasPrivileges || DDMStructure_Field80037203.getData()!="0")?string(DDMStructure_Text54730891.getData()!"","") 
36	competencias = (viewerHasPrivileges || DDMStructure_Field75645729.getData()!="0")?string(DDMStructure_Text51537691.getData()!"","") 
37	 
38
39 
40<div> 
41 
42				<#if viewerHasPrivileges || DDMStructure_Field80037203.getData()!="0" > 
43					<div class="bioec_org_sobre"> 
44							<label>Sobre a organização</label> 
45							<div class="bioec_org_sobre_container"> 
46								<#if sobre != ""> 
47									${sobre} 
48								<#else> 
49									<div class="bioec_org_sobre_vazio"> 
50											Nenhuma descrição foi adicionada neste perfil ainda 
51									</div> 
52								</#if> 
53							</div> 
54					</div> 
55				</#if> 
56				 
57				<#if viewerHasPrivileges || DDMStructure_Field75645729.getData()!="0" > 
58					<div class="bioec_org_sobre"> 
59							<label>Competências tecnológicas</label> 
60							<div class="bioec_org_sobre_container"> 
61									<#if competencias != ""> 
62										${competencias} 
63									<#else> 
64										<div class="bioec_org_sobre_vazio"> 
65												Nenhuma descrição foi adicionada neste perfil ainda 
66										</div> 
67									</#if> 
68							</div> 
69					</div> 
70				</#if> 
71					 
72				<#if viewerHasPrivileges || DDMStructure_Field04200031.getData()!="0" > 
73					<div class="bioec_org_sobre"> 
74							<label>Setor(es) de atuação</label> 
75							<div class="bioec_org_sobre_container"> 
76							<#if setores[0]!="privado"> 
77									<#if setores?size == 1 && setores[0].getStringValue()?trim == "" > 
78										<div class="bioec_org_sobre_vazio"> 
79												Nenhum setor foi adicionado neste perfil ainda 
80										</div> 
81									<#else> 
82										<#if setores?size != 0 > 
83											<ul> 
84												<#list setores as setor> 
85													<li>${setor.getStringValue()}</li> 
86												</#list> 
87											</ul> 
88										<#else> 
89											<div class="bioec_org_sobre_vazio"> 
90													Nenhum setor foi adicionado neste perfil ainda 
91											</div> 
92										</#if> 
93									</#if> 
94								<#else> 
95								<div class="bioec_org_sobre_vazio"> 
96									Nenhum setor foi adicionado neste perfil ainda 
97								</div> 
98								</#if> 
99							</div> 
100					</div> 
101				</#if> 
102				 
103</div> 
104 
105<style> 
106.bioec_org_sobre label { 
107	color: #5B5C61; 
108	font-weight: 700; 
109	margin-bottom: 10px; 
110	font-size: 20px; 
111	line-height: 30px; 
112
113 
114.bioec_org_sobre_container { 
115	font-size: 16px; 
116	border: 1px solid #BEBEBE; 
117	padding: 24px; 
118	color: #5B5C61; 
119	margin-bottom: 40px; 
120
121 
122.bioec_org_sobre_vazio { 
123	color: #5B5C61; 
124	font-size: 16px; 
125	text-align: center; 
126	font-weight: 700; 
127
128 
129.bioec_org_sobre_container ul { 
130	color: #5B5C61; 
131	margin: 0; 
132
133</style> 
Infraestruturas drop zone
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy996.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy996 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@731e0017"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign journalArticle = JournalArtic...  [in template "34764#34807#41130" at line 33, column 41]
----
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 OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService") > 
5<#assign AssetTagLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService")> 
6<#-- <#assign  
7journalArticle = JournalArticleLocalService.getArticle(themeDisplay.getSiteGroupId(),.data_model["reserved-article-id"].data) 
8AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") 
9assetEntry = AssetEntryLocalService.getEntry(journalArticle.getModelClassName(), journalArticle.getResourcePrimKey()) 
10--> 
11<#assign  
12mbMessageLocalService = serviceLocator.findService("com.liferay.message.boards.service.MBMessageLocalService") 
13
14 
15<div id="upload-notice-container" style="display: none;"> 
16						<span id="close-btn-upload-container"> <i class="fa fa-xmark"></i> </span> 
17						<h5 class="upload-notice-title"> 
18							<i class="fa-sharp fa-solid fa-circle-exclamation"></i> 
19							Upload de infraestrutura em andamento 
20						</h5> 
21						<p> 
22							Caso os itens adicionados não estejam visíveis na página, aguarde um instante e <span>atualize a página</span> para visualizá-los. 
23						</p> 
24					</div> 
25				 
26<div class="bioec-profile-estrutura-main"> 
27		 
28    <div id="estruturas-lista" class="d-flex flex-column"> 
29				 
30				<#if entries?has_content> 
31					<#list entries as entry> 
32					 
33					<#assign journalArticle = JournalArticleLocalService.getLatestArticle(entry.getClassPK()) > 
34					<#assign articleXml = journalArticle.getDocument().getRootElement() > 
35					<#assign JournalArticleID = journalArticle.getId()> 
36					<#assign JournalArticleFrontId = journalArticle.getArticleId()> 
37					<#assign  
38						userIsAdmin = false 
39						orgId = "" 
40					  autorId = "" 
41
42						<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text57816561']")??> 
43								<#assign  
44						modelo = articleXml.selectSingleNode("dynamic-element[@field-reference='Text57816561']").getStringValue()!"" 
45						modelo = modelo?replace("\n\t\t", "") 
46						modelo = modelo?replace("\n\t", "")		 
47
48						</#if> 
49							 
50						<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text23707291']")??> 
51							<#assign  
52						marca = articleXml.selectSingleNode("dynamic-element[@field-reference='Text23707291']").getStringValue()!"" 
53						marca = marca?replace("\n\t\t", "") 
54						marca = marca?replace("\n\t", "")		 
55
56						</#if> 
57							 
58						<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text74754192']")??> 
59						    <#assign  
60						funcao = articleXml.selectSingleNode("dynamic-element[@field-reference='Text74754192']").getStringValue()!"" 
61						funcao = funcao?replace("\n\t\t", "") 
62						funcao = funcao?replace("\n\t", "")		 
63
64						</#if> 
65							 
66							<#if articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto02890219']")??> 
67								<#assign  
68						imageSrc = articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto02890219']").getStringValue()!"" 
69												  
70
71						</#if> 
72							 
73							<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text93109394']")??> 
74								<#assign  
75						autorId = articleXml.selectSingleNode("dynamic-element[@field-reference='Text93109394']").getStringValue()!"" 
76						autorId = autorId?replace("\n\t\t", "") 
77						autorId = autorId?replace("\n\t", "")		 
78						autorArticleId = "" 
79
80						</#if> 
81								<#assign  
82						commentsCount = mbMessageLocalService.getDiscussionMessagesCount(entry.getClassName(), entry.getClassPK(), 0)!"0" 
83					/> 
84					 
85					<#if autorId != "" && autorId??> 
86						<#assign 
87							autor = UserLocalService.fetchUser(autorId?number)!"" 
88							autorArticleId = autor.getExpandoBridge().getAttribute("journal-article")!"0" 
89						/> 
90						<#if autor != ""> 
91							<#assign autor = autor.getFullName()!""> 
92						<#else> 
93							<#assign autor = "Anônimo" > 
94						</#if> 
95					<#else>  
96						<#assign autor = "Anônimo" > 
97					</#if> 
98					 
99					<#assign categorias = AssetCategoryLocalService.getCategoryNames(entry.getClassName(), entry.getClassPK())!"" > 
100					 
101					<#assign 	categorias = AssetCategoryLocalService.getCategoryNames(entry.getClassName(), entry.getClassPK())!"" > 
102 
103					<#assign urlWC = ""> 
104					<#if autorArticleId != "0" && autorArticleId != "" && autor != "Anônimo"> 
105					<#assign autorArticle = JournalArticleLocalService.getLatestArticle(themeDisplay.getLayout().getGroupId(), autorArticleId?string) > 
106					<#assign urlWC = autorArticle.getUrlTitle()!""> 
107					</#if> 
108					 
109									 
110					<#assign tags = AssetTagLocalService.getTagNames("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()?number )  
111				 tagName = tags[0]!"" 
112				  
113
114				<#if tagName?contains("organization") && tagName != "" > 
115 
116					<#assign 
117					orgId = tagName?keep_after("organization-")				 
118					organization =  OrganizationLocalService.fetchOrganization(orgId?number)!"" 
119
120			 
121					 
122					<#if organization != "" && autor != "Anônimo" && autorArticleId != ""> 
123						<#assign	orgArticleId = organization.getExpandoBridge().getAttribute("journal-article") 
124							orgJournalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),orgArticleId?c)  
125							urlWC = orgJournalArticle.getUrlTitle()!"" 
126							autor = organization.getName()!"" 
127
128					</#if> 
129				</#if> 
130					 
131					<#if themeDisplay.isSignedIn() > 
132						<#assign tags = AssetTagLocalService.getTagNames(entry.getClassName(), entry.getClassPK()) > 
133						<#assign orgId = (tags[0]!"")?remove_beginning("organization-") > 
134						<#assign userIsAdmin = OrganizationLocalService.hasUserOrganization(themeDisplay.getUserId(), orgId?number)> 
135					</#if> 
136					 
137					<div class="estruturas-lista-item" id="InfraItem${JournalArticleID}"> 
138							<div class="lista-checkmark"> 
139								<#if categorias?seq_contains("aprovado") > <i title="Aprovado" style="color: #4ECD66" class="fa-solid fa-circle-check"></i> </#if> 
140								<#if categorias?seq_contains("pendente") >	<i title="Em análise" style="color: #D90000"class="fa-solid fa-spinner"></i> </#if> 
141								<#if categorias?seq_contains("recusado") >	<i title="Recusado" style="color: #D90000"class="fa-solid fa-exclamation-circle"></i> </#if> 
142							</div> 
143 
144							<div class="lista-pic"> 
145									<#if imageSrc?trim !="" > 
146										<div class="bioec_infra_img" style="background-image: url(${imageSrc})"> 
147										</div> 
148									<#else> 
149										<div class="bioec_infra_img_placeholder"> 
150											<i class="fa-solid fa-image"></i> 
151											sem imagem 
152										</div> 
153									</#if> 
154							</div> 
155 
156							<div class="lista-desc"> 
157									<h5>${entry.getHighlightedTitle()}</h5> 
158									<p>Modelo: ${modelo}</p> 
159									<p>Marca: ${marca}</p> 
160							</div> 
161 
162							<div class="lista-arrow"> 
163									<button class="btn" type="button" data-toggle="collapse" data-target="#collapse-${entry.getClassPK()}" aria-expanded="false" aria-controls="collapse-${entry.getClassPK()}"> 
164											<i class="fa-solid fa-chevron-down"></i> 
165									</button> 
166							</div> 
167 
168							<span id="collapse-${entry.getClassPK()}" class="collapse lista-collapse"> 
169									<div class="lista-func"> 
170											<h5>Função </h5> 
171											<p>${funcao}</p> 
172									</div> 
173									 
174							<#if categorias?seq_contains("recusado") > 
175							<div style="border-top: 1px solid #E8ECEF; font-weight: bold; padding-top: 24px;"> 
176							<p>Conteudo Em Análise Pelo Cetiqt:</p> 
177							<p>Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.</p> 
178							</div> 
179							</#if > 
180							 
181									<div class="lista-footnote"> 
182											<div> 
183													<span class="lista-date">${journalArticle.getDisplayDate()?string('dd/MM/yyyy')}</span> | <span class="lista-commentNumber">${commentsCount} comentários</span> <span class="barra-pipe"> | </span> <span class="lista-author">Publicado por <a <#if urlWC != ''>href="/w/${urlWC}</#if>">${autor}</a></span> 
184											</div> 
185											<#if userIsAdmin> 
186											<div class="buttonsActions"> 
187												<div style="cursor: pointer;font-size: 16px;" data-toggle="modal" data-target="#modalInfra${JournalArticleID}"> 
188													<i class="fa-solid fa-edit"></i> 
189												</div> 
190												<div style="cursor: pointer;font-size: 16px;" data-toggle="modal" data-target="#modal-infra-${entry.getClassPK()}"> 
191													<i class="fa-solid fa-trash-can"></i> 
192												</div> 
193												 
194											</div> 
195											</#if> 
196									</div> 
197							</span> 
198					</div> 
199					 
200					<#if userIsAdmin> 
201					<div style="display: none;" id="modal-infra-${entry.getClassPK()}" class="modal fade" role="dialog"> 
202						<div class="modal-dialog modal-lg" role="document"> 
203							<div class="modal-content"> 
204								<div class="modal-header" > 
205									<h4 class="m-0">Remover Infraestrutura</h4> 
206									<button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
207										<span aria-hidden="true"> 
208											<i class="fa-solid fa-close"></i> 
209										</span> 
210									</button>    
211								</div> 
212								<div class="modal-body"> 
213									<h5>Você tem certeza que deseja remover essa infraestrutura?</h5> 
214									<div> 
215										Ao clicar em continuar, a infraestrutura será removida do seu perfil. 
216									</div> 
217								</div> 
218								<div class="modal-footer justify-content-end"> 
219										<button class="bioec_secondary_button" data-dismiss="modal">CANCELAR</button> 
220										<button class="bioec_primary_button" type="button" onclick="excluirInfra(${JournalArticleFrontId}, ${orgId})">CONTINUAR</button>  
221								</div> 
222							</div> 
223						</div>			 
224					</div> 
225					</#if> 
226					 
227					<#-- modal edição --> 
228 
229<#if userIsAdmin> 
230<div style="display: none;" id="modalInfra${JournalArticleID}" class="modal fade bioec-profile-infra-modal" role="dialog"> 
231	<div  class="modal-dialog modal-lg" role="document"> 
232 
233		<form class="form-group modal-content" id="formularioInfraestrutura${JournalArticleID}"> 
234			<div id="infraModal-l1-${JournalArticleID}" class="modal-header infraModal-l1" > 
235				<h5>Adicionar Infraestrutura</h5> 
236				<button id="fecharModal${JournalArticleID}" type="button" class="close" data-dismiss="modal" aria-label="Close"> 
237					<span aria-hidden="true">&times;</span> 
238				</button>    
239			</div> 
240			<div id="infraModal-l2-${JournalArticleID}" class="modal-body infraModal-l2"> 
241				<div id="infraName${JournalArticleID}" class="infraName"> 
242					<label class="ReqLabel" for="inputInfraName${JournalArticleID}">Nome da infraestrutura</label> 
243					<input type="text" id="inputInfraName${JournalArticleID}" value="${entry.getHighlightedTitle()}" placeholder="Nome da infraestrutura" required> 
244				</div> 
245			<div id="infraModel${JournalArticleID}" class="infraModel"> 
246				<label class="ReqLabel" for="inputInfraModel${JournalArticleID}">Modelo</label> 
247				<input type="text" id="inputInfraModel${JournalArticleID}" value="${modelo}" placeholder="Modelo" required> 
248			</div> 
249			<div id="infraBrand${JournalArticleID}" class="infraBrand"> 
250				<label class="ReqLabel" for="inputInfraBrand${JournalArticleID}">Marca</label> 
251				<input type="text" id="inputInfraBrand${JournalArticleID}" value="${marca}" placeholder="Marca" required> 
252			</div> 
253			 
254			<div id="infraImg${JournalArticleID}" class="infraImg"> 
255				<div style="display: flex; flex-direction: column; gap: 8px"> 
256					<label>Imagem da infraestrutura (Máx. 10 MB)</label> 
257					<label class="bioec_secondary_button" id="carregarImagem${JournalArticleID}" for="inputCarregarImagemInfra${JournalArticleID}" style="font-size: 16px;color: #333244;align-self:start;"> 
258						CARREGAR IMAGEM 
259					</label> 
260					<input id="inputCarregarImagemInfra${JournalArticleID}" class="inputCarregarImagemInfra" type="file" accept="image/*" onchange="encodeInfraImageAsURL${JournalArticleID}(this)"> 
261					<input class="d-none" id="inputInfraBase64${JournalArticleID}" value="${imageSrc}" /> 
262					<div class="imagemCarregadaInfra${JournalArticleID} d-md-none d-block" style="background-image: url(${imageSrc})"></div> 
263					<button type="button" id="removerImagemInfra${JournalArticleID}" class="<#if imageSrc == "" || imageSrc?? == false> d-none </#if> removerImagemInfra" > 
264						<i class="fa fa-trash"></i> Remover imagem	 
265					</button> 
266				</div> 
267				<div class="imagemCarregadaInfra${JournalArticleID} d-md-block d-none" style="background-image: url(${imageSrc})"></div> 
268			</div> 
269			 
270			<div id="infraFunction${JournalArticleID}" class="infraFunction"> 
271				<label class="ReqLabel" for="inputInfraFunction${JournalArticleID}">Função</label> 
272				<input type="text" id="inputInfraFunction${JournalArticleID}" class="inputInfraFunction" value="${funcao}" placeholder="Função" required> 
273			</div> 
274		</div> 
275		<div class="TextImportant"> 
276			<p> 
277			Importante: O conteúdo enviado passará por um processo interno de aprovação. Só então o conteúdo adicionado aparecerá no portal. 
278			</p> 
279		</div> 
280		<div id="infraModal-l3-${JournalArticleID}" class="modal-footer infraModal-l3"> 
281					<button class="bioec_secondary_button" onclick="">SALVAR E FECHAR</button> 
282		</div> 
283	</form> 
284	 
285	</div>			 
286</div> 
287</#if>					 
288					 
289 
290 
291 
292<script> 
293const SHOW_NOTICE_CONTAINER_BIOECONOMIA = "SHOW_NOTICE_CONTAINER_BIOECONOMIA"; 
294	 
295 
296 
297function closeNoticeContainer() { 
298  document.getElementById("upload-notice-container").style.display = "none"; 
299 
300  window.localStorage.removeItem(SHOW_NOTICE_CONTAINER_BIOECONOMIA); 
301
302 
303document 
304  .getElementById("close-btn-upload-container") 
305  .addEventListener("click", closeNoticeContainer); 
306 
307document.addEventListener("DOMContentLoaded", function(event) {  
308	console.log('chegou aqui', window.localStorage.getItem(SHOW_NOTICE_CONTAINER_BIOECONOMIA)); 
309  var showNoticeContainer = window.localStorage.getItem(SHOW_NOTICE_CONTAINER_BIOECONOMIA); 
310  if (showNoticeContainer == "true") { 
311    document.getElementById("upload-notice-container").style.display = "block"; 
312    window.localStorage.removeItem(SHOW_NOTICE_CONTAINER_BIOECONOMIA); 
313
314}); 
315 
316 
317 
318<#if userIsAdmin> 
319 
320document.querySelector('#formularioInfraestrutura${JournalArticleID}').addEventListener('submit', event => { 
321	event.preventDefault(); 
322	if (boolAddInfraestrutura == 0){ 
323		event.preventDefault(); 
324
325	editarSubmissao${JournalArticleID}(); 
326}); 
327 
328function editarSubmissao${JournalArticleID}(){ 
329 
330 
331		Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""}); 
332		const infraData = { 
333			nome: document.getElementById("inputInfraName${JournalArticleID}").value, 
334			marca: document.getElementById("inputInfraBrand${JournalArticleID}").value, 
335			funcao: document.getElementById("inputInfraFunction${JournalArticleID}").value, 
336			modelo: document.getElementById("inputInfraModel${JournalArticleID}").value, 
337			autor: Liferay.ThemeDisplay.getUserName(), 
338			imagem: document.getElementById("inputInfraBase64${JournalArticleID}").value, 
339
340		console.log(JSON.stringify(infraData)); 
341 
342		fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/infraestrutura/equipamento/${JournalArticleFrontId}", { 
343			method: 'PUT', 
344			"headers": { 
345				"x-csrf-token": Liferay.authToken, 
346				"Content-Type": "application/json" 
347			}, 
348			body: JSON.stringify(infraData) 
349		}) 
350		.then(res => { 
351			if(res.status == 200) { 
352			 
353				Liferay.Util.openToast({ 
354            message: "Infraestrutura editada com sucesso. Após a submissão, será iniciado um novo processo interno de aprovação do conteúdo enviado. Só então o conteúdo submetido aparecerá novamente no portal.", 
355            type: "success", 
356            title: "", 
357            toastProps: { 
358                autoClose: 5000 
359
360        }) 
361			 
362setTimeout(function(){ location.reload(); }, 2000); 
363				 
364			} else { 
365				Liferay.Util.openToast({ 
366            message: "Erro ao editar infraestrutura", 
367            type: "danger", 
368            title: "", 
369            toastProps: { 
370                autoClose: 5000 
371
372        }) 
373
374		}); 
375
376</#if> 
377 
378function excluirInfra(wcId, orgId) { 
379		Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""}); 
380		fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/infraestrutura/equipamento/" + wcId , { 
381			method: 'DELETE', 
382			"headers": { 
383				"x-csrf-token": Liferay.authToken, 
384				"Content-Type": "application/json" 
385
386		}) 
387		.then(res => { 
388			if(res.status == 200) { 
389				Liferay.Util.openToast({ 
390            message: "Infraestrutura excluida com sucesso", 
391            type: "success", 
392            title: "", 
393            toastProps: { 
394                autoClose: 5000 
395
396        }) 
397				setTimeout(function(){ location.reload(); }, 2000) 
398			} else { 
399				Liferay.Util.openToast({ 
400            message: "Erro ao excluir infraestrutura", 
401            type: "danger", 
402            title: "", 
403            toastProps: { 
404                autoClose: 5000 
405
406        }) 
407
408		}); 
409
410	 
411 
412	function encodeInfraImageAsURL${JournalArticleID}(element) { 
413  	let file = element.files[0]; 
414    let reader = new FileReader(); 
415    reader.onloadend = () => { 
416			if(reader.result)   { 
417				if(!validImageSize(reader.result)) return; 
418				try { 
419					Array.from(document.getElementsByClassName("imagemCarregadaInfra${JournalArticleID}")).forEach( el => el.style.backgroundImage = 'url(' + reader.result + ')' ) 
420					const base64_input = document.getElementById("inputInfraBase64${JournalArticleID}") 
421					base64_input.value = reader.result 
422					 
423					 
424					const removeImageButton = document.getElementById("removerImagemInfra${JournalArticleID}") 
425					removeImageButton.classList.remove("d-none") 
426				} catch (error) { 
427					console.error(error) 
428
429
430
431		reader.readAsDataURL(file); 
432
433	 
434	function removeImageInfra${JournalArticleID}() { 
435	try { 
436		const file_input = document.getElementById("inputCarregarImagemInfra${JournalArticleID}") 
437Array.from(document.getElementsByClassName("imagemCarregadaInfra${JournalArticleID}")).forEach( el => el.style.backgroundImage = "" ) 
438		const base64_input = document.getElementById("inputInfraBase64${JournalArticleID}") 
439		file_input.value = null 
440		base64_input.value = "" 
441		console.log("foi") 
442		const removeImageButton = document.getElementById("removerImagemInfra${JournalArticleID}") 
443		removeImageButton.classList.add("d-none") 
444	} catch (error) { 
445		console.error(error) 
446
447
448 
449 
450document.getElementById("removerImagemInfra${JournalArticleID}").addEventListener("click", removeImageInfra${JournalArticleID}); 
451	 
452</script> 
453<style> 
454 
455#upload-notice-container { 
456  background: var(--cinza-claro, #e8ecef); 
457  padding: 24px 24px 16px; 
458  width: 100%; 
459  position: relative; 
460  margin-bottom: 40px; 
461
462 
463#upload-notice-container #close-btn-upload-container { 
464  position: absolute; 
465  top: 0px; 
466  right: 2px; 
467  height: 24px; 
468  margin: 8px; 
469  cursor: pointer; 
470
471 
472#upload-notice-container #close-btn-upload-container i { 
473  font-size: 22px; 
474  color: #5B5C61; 
475
476 
477#upload-notice-container .upload-notice-title { 
478  font-size: 20px; 
479  /* font-family: Roboto; */ 
480  font-weight: 700; 
481  line-height: 150%; 
482  color: var(--texto, #5b5c61); 
483  display: flex; 
484  align-items: center; 
485  margin-bottom: 12px; 
486
487 
488#upload-notice-container .upload-notice-title i { 
489  color: #ffc806; 
490  margin-right: 12px; 
491  font-size: 24px; 
492
493 
494#upload-notice-container p { 
495  color: var(--texto, #5b5c61); 
496  font-size: 16px; 
497  /* font-family: Roboto; */ 
498  line-height: 150%; 
499  margin-bottom: 8px; 
500
501 
502#upload-notice-container p > span { 
503  font-weight: 700; 
504
505 
506 
507.imagemCarregadaInfra${JournalArticleID} { 
508	background-size: contain; 
509	background-position: center; 
510	background-repeat: no-repeat; 
511	height: 100px; 
512	width: 100px; 
513
514 
515#removerImagemInfra${JournalArticleID} { 
516	background: none; 
517	border: none; 
518	outline: none; 
519	color: #5B5C61; 
520	font-size: 16px; 
521	font-weight: 900; 
522	line-height: 24px; 
523	letter-spacing: 0em; 
524	width: fit-content; 
525	margin-left: 16px; 
526
527</style> 
528				</#list> 
529			</#if> 
530    </div> 
531</div> 
532 
533 
534<style> 
535 
536.bioec_infra_img { 
537    width: 140px; 
538    height: 140px; 
539    overflow: hidden; 
540		background-size: contain; 
541    background-position: center; 
542    background-repeat: no-repeat; 
543
544 
545.bioec_infra_img_placeholder { 
546    width: 140px; 
547    height: 140px; 
548    background-color: #E8ECEF; 
549    display: flex; 
550    flex-direction: column; 
551    align-items: center; 
552    justify-content: center; 
553    font-size: 14px; 
554    color: #5B5C61; 
555
556 
557.bioec_infra_img_placeholder i { 
558    font-size: 44px; 
559
560 
561 
562.bioec-profile-estrutura-main{ 
563	display: flex; 
564	gap: 40px; 
565	flex-direction: column; 
566	padding-bottom: 20px; 
567
568 
569.bioec-profile-estrutura-main h5, .bioec-profile-estrutura-main p, .bioec-profile-estrutura-main a{ 
570	color: #5B5C61; 
571
572 
573.bioec-profile-estrutura-main h5{ 
574	font-weight: 700; 
575
576.bioec-profile-estrutura-main h5, .bioec-profile-estrutura-main p{ 
577	 
578	font-size: 16px; 
579 
580
581 
582.bioec-profile-estrutura-main #estruturas-lista .estruturas-lista-item { 
583	border: 1px #BEBEBE solid;  
584	padding: 24px; 
585	display: grid; 
586	grid-template-columns: 24px 12px 138px 46px 1fr 12px 15px; 
587	grid-template-areas: "ck . pic . desc . arrw" 
588		". . clps clps clps clps clps"; 
589	margin-bottom: 40px; 
590
591 
592.bioec-profile-estrutura-main .lista-checkmark { grid-area: ck; } 
593.bioec-profile-estrutura-main .lista-pic { grid-area: pic; display: flex; justify-content: center;} 
594.bioec-profile-estrutura-main .lista-arrow { grid-area: arrw; } 
595.bioec-profile-estrutura-main .lista-collapse { grid-area: clps; } 
596 
597.bioec-profile-estrutura-main .lista-desc {  
598	grid-area: desc;  
599	display: flex;  
600	flex-direction: column; 
601	justify-content: center; 
602	 
603
604 
605.bioec-profile-estrutura-main .lista-desc h5{ 
606	margin-bottom: 12px; 
607}  
608 
609.bioec-profile-estrutura-main .lista-desc p{  
610	margin: 0; 
611
612 
613.bioec-profile-estrutura-main .lista-func {  
614	 
615	margin: 24px 0; 
616
617 
618.bioec-profile-estrutura-main .lista-footnote {  
619 
620	display: flex; 
621	justify-content: space-between; 
622	border-top: 1px solid #E8ECEF; 
623	padding-top: 12px; 
624	font-size: 14px; 
625	font-weight: 300; 
626	gap: 15px; 
627	color: #5B5C61; 
628 
629
630 
631.pagination-items-per-page.active > a,  
632.pagination-items-per-page.active > button,  
633.pagination-items-per-page.show > a,  
634.pagination-items-per-page.show > button, 
635.page-item.active .page-link,  
636.page-item.show .page-link{ 
637    border-color: #4ECD66; 
638    background-color: #4ECD66; 
639
640 
641.pagination-results, 
642.pagination-items-per-page > a,  
643.pagination-items-per-page > button, 
644.pagination-items-per-page > a:hover,  
645.pagination-items-per-page > button:hover, 
646.page-link{ 
647	color: #4ebe66; 
648
649 
650.estruturas-port{ 
651	border: 1px #BEBEBE solid;  
652	padding: 24px; 
653	display: flex; 
654	flex-direction: column; 
655	align-items: center; 
656	gap: 24px; 
657
658 
659.estruturas-port p{ 
660		text-align: center;	 
661    max-width: 760px; 
662    font-size: 18px; 
663    color: #5B5C61; 
664
665 
666.estruturas-port div{ 
667display: flex; 
668	justify-content: space-between; 
669	width: min(558px, 100%); 
670
671 
672.lista-arrow button{ 
673	padding: 0; 
674
675 
676.lista-arrow button:focus{ 
677	box-shadow: none; 
678
679 
680@media(max-width: 1100px){ 
681	.estruturas-port div{ 
682	flex-direction: column; 
683		gap: 30px; 
684
685 
686
687 
688@media(max-width: 450px){ 
689	.bioec-profile-estrutura-main .lista-footnote{ 
690		flex-direction: column; 
691		gap: 10px; 
692		align-items: flex-end; 
693		text-align: right; 
694
695
696 
697.bioec-profile-estrutura-main .lista-footnote .buttonsActions { 
698  display: flex; 
699  gap: 17px; 
700
701 
702@media(max-width:  768px){ 
703	.bioec-profile-estrutura-main #estruturas-lista .estruturas-lista-item{ 
704		grid-template-columns: 24px 1fr 10px 1fr 15px; 
705		grid-template-areas: "ck desc desc desc arrw" 
706													". pic pic pic ." 
707													"clps clps clps clps clps"; 
708 
709
710 
711	.bioec-profile-estrutura-main .lista-desc{ 
712	align-items: center; 
713
714 
715	.lista-pic{ 
716	display: flex; 
717	justify-content: center; 
718
719	 
720	.bioec-profile-estrutura-main .lista-footnote{ 
721		flex-direction: column; 
722    align-items: center; 
723
724	 
725	.bioec-profile-estrutura-main .lista-footnote > div { 
726    text-align: center; 
727
728   
729  .bioec-profile-estrutura-main .lista-footnote .barra-pipe { 
730    display: none; 
731
732  .bioec-profile-estrutura-main .lista-footnote .lista-author { 
733    display: flex; 
734    gap: 4px; 
735    justify-content: center; 
736
737  .bioec-profile-estrutura-main .lista-footnote .buttonsActions { 
738    width: 100%; 
739    justify-content: space-between; 
740
741
742</style> 
Demandas drop zone
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy996.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy996 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@731e0017"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign journalArticle = JournalArtic...  [in template "34764#34807#41127" at line 15, column 41]
----
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  
5mbMessageLocalService = serviceLocator.findService("com.liferay.message.boards.service.MBMessageLocalService") 
6	tagsLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService") 
7	 OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService") 
8
9 
10 
11<div class="bioec-profile-demanda-main"> 
12	<div id="demanda-lista-container" class="d-flex flex-column"> 
13			<#if entries?has_content> 
14				<#list entries as entry> 
15					<#assign journalArticle = JournalArticleLocalService.getLatestArticle(entry.getClassPK()) > 
16					<#assign JournalArticleID = journalArticle.getId()> 
17					<#assign JournalArticleFrontId = journalArticle.getArticleId()> 
18					<#assign articleXml = journalArticle.getDocument().getRootElement()  
19									 userIsAdmin = false 
20									 orgId = "" 
21									 autorId = "" 
22
23					 
24					<#assign nomeParaContato = ""> 
25					 
26					<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text77253735']")??> 
27					 
28					<#assign nomeParaContato = articleXml.selectSingleNode("dynamic-element[@field-reference='Text77253735']").getStringValue()!"" 
29								 nomeParaContato = nomeParaContato?replace("\n\t\t", "") 
30								 nomeParaContato = nomeParaContato?replace("\n\t", "")					 
31
32					 
33					</#if> 
34					<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text94974146']")??> 
35					<#assign telefone = articleXml.selectSingleNode("dynamic-element[@field-reference='Text94974146']").getStringValue()!"" 
36								 telefone = telefone?replace("\n\t\t", "") 
37								 telefone = telefone?replace("\n\t", "")						 
38
39					</#if> 
40						 
41						<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text68569631']")??> 
42				<#assign email = articleXml.selectSingleNode("dynamic-element[@field-reference='Text68569631']").getStringValue()!"" 
43								 email = email?replace("\n\t\t", "") 
44								 email = email?replace("\n\t", "")					 
45				>  
46					</#if> 
47							 
48				<#if articleXml.selectSingleNode("dynamic-element[@field-reference='CopyOfCopyOfText18267936']")??> 
49					<#assign desc = articleXml.selectSingleNode("dynamic-element[@field-reference='CopyOfCopyOfText18267936']").getStringValue()!"" 
50								 desc = desc?replace("\n\t\t", "") 
51								 desc = desc?replace("\n\t", "")		 
52
53						</#if> 
54					<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text97565506']")??> 
55				<#assign imagem = articleXml.selectSingleNode("dynamic-element[@field-reference='Text97565506']").getStringValue()!""				 
56							imagem = imagem?replace("(\r\n)+", "",'r') 
57							imagem = imagem?replace(" ", "",'r') 
58
59						</#if> 
60						<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text99746569']")??> 
61					<#assign 
62						autorId = articleXml.selectSingleNode("dynamic-element[@field-reference='Text99746569']").getStringValue()!"" 
63						autorId = autorId?replace("\n\t\t", "") 
64						autorId = autorId?replace("\n\t", "")		 
65						autorArticleId = "" 
66
67						</#if> 
68						<#assign 
69						commentsCount = mbMessageLocalService.getDiscussionMessagesCount(entry.getClassName(), entry.getClassPK(), 0)!"0" 
70
71				 
72					<#if autorId != "" && autorId??> 
73					<#assign 
74						autor = UserLocalService.fetchUser(autorId?number)!"" 
75						autorArticleId = autor.getExpandoBridge().getAttribute("journal-article")!"0"  
76				/> 
77				<#if autor != ""> 
78				<#assign autor = autor.getFullName()!""> 
79				<#else> 
80				<#assign autor = "Anônimo" > 
81				</#if> 
82				<#else>  
83				<#assign autor = "Anônimo" > 
84		</#if>		 
85				<#assign 	categorias = AssetCategoryLocalService.getCategoryNames(entry.getClassName(), entry.getClassPK())!"" > 
86				<#assign urlWC = ""> 
87				<#if autorArticleId != "0" && autorArticleId != "" && autor != "Anônimo"> 
88					<#assign autorArticle = JournalArticleLocalService.getLatestArticle(themeDisplay.getLayout().getGroupId(), autorArticleId?string) > 
89					<#assign urlWC = autorArticle.getUrlTitle()!""> 
90				</#if> 
91								 
92				<#assign tags = tagsLocalService.getTagNames("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()?number )  
93								 tagName = tags[0]!"" 
94								 orgOrUser = "" 
95
96				  
97				 <#if tagName?contains("organization") && tagName != "" > 
98					 <#assign orgOrUser = "org"> 
99					<#else> 
100					 <#assign orgOrUser = "user"> 
101				 </#if> 
102				  
103				<#if orgOrUser == "org" > 
104 
105					<#assign 
106					orgId = tagName?keep_after("organization-")				 
107					organization =  OrganizationLocalService.fetchOrganization(orgId?number)!"" 
108
109			 
110					 
111					<#if organization != "" && autor != "Anônimo"> 
112					 
113						<#assign	orgArticleId = organization.getExpandoBridge().getAttribute("journal-article") 
114							orgJournalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),orgArticleId?c)  
115							urlWC = orgJournalArticle.getUrlTitle()!"" 
116							autor = organization.getName()!"" 
117
118 
119					</#if> 
120				</#if> 
121				 
122				<#if themeDisplay.isSignedIn() > 
123							<#if tagName?contains("organization-")> 
124								<#assign userIsAdmin = OrganizationLocalService.hasUserOrganization(themeDisplay.getUserId(), orgId?number)> 
125								<#else> 
126								<#if autorId?number == themeDisplay.getUserId()> 
127								<script>console.log("oi");</script> 
128									<#assign userIsAdmin = true> 
129								</#if> 
130							</#if> 
131							 
132						 
133					</#if> 
134							 
135					 
136 
137				<div class="demanda-lista-item"> 
138				 
139				<div class="lista-checkmark"> 
140								<#if categorias?seq_contains("aprovado") > <i title="Aprovado" style="color: #4ECD66" class="fa-solid fa-circle-check"></i> </#if> 
141								<#if categorias?seq_contains("pendente") >	<i title="Em análise" style="color: #D90000"class="fa-solid fa-spinner"></i> </#if> 
142								<#if categorias?seq_contains("recusado") >	<i title="Recusado" style="color: #D90000"class="fa-solid fa-exclamation-circle"></i> </#if> 
143				</div> 
144	 
145 
146					<div class="lista-titulo"> 
147						<h5>${entry.getHighlightedTitle()}</h5> 
148					</div> 
149 
150					<div class="lista-arrow"> 
151						<button style="padding: 0;" class="btn" type="button" data-toggle="collapse" data-target="#collapseID${entry.getClassPK()}" aria-expanded="false" aria-controls="collapseID${entry.getClassPK()}"> 
152							<i class="fa-solid fa-chevron-down"></i> 
153						</button> 
154					</div> 
155 
156					<div class="lista-desc"> 
157						<p>${desc}</p> 
158					</div> 
159 
160					<div class="lista-collapse collapse" id="collapseID${entry.getClassPK()}"> 
161					<#if nomeParaContato != "" || telefone != "" || email != "" || imagem?trim !=""> 
162					<div class="lista-details"> 
163								<div class="lista-pic"> 
164									<i class="fa-solid fa-image-slash"></i> 
165									<#if imagem?trim !="" > 
166											<img class="bioec_demanda_img" src="${imagem}"> 
167										<#else> 
168											<div class="bioec_demanda_img_placeholder"> 
169												<i class="fa-solid fa-image"></i> 
170													sem imagem 
171											</div> 
172									</#if> 
173								</div> 
174							<#if nomeParaContato != "" || telefone != "" || email != "" > 
175							<div class="lista-contato"> 
176								<p>Contato</p> 
177								<p class="lista-author">${nomeParaContato}</p> 
178								<p class="lista-phone">${telefone}</p> 
179								<p class="lista-email">${email}</p> 
180							</div> 
181							</#if> 
182						</div> 
183						</#if> 
184						 
185							<#if categorias?seq_contains("recusado") > 
186							<div style="border-top: 1px solid #E8ECEF; font-weight: bold; padding-top: 24px;"> 
187							<p>Conteúdo Em Análise Pelo Cetiqt:</p> 
188							<p>Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.</p> 
189							</div> 
190							</#if> 
191						<div class="lista-footnote"> 
192								<div> 
193									<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> 
194								</div> 
195								<#if userIsAdmin> 
196									<div class="buttonsActions"> 
197									<div style="cursor: pointer;font-size: 16px;" data-toggle="modal" data-target="#modalDemanda${JournalArticleID}"> 
198											<i class="fa-solid fa-edit"></i> 
199										</div> 
200										<div style="cursor: pointer;font-size: 16px;" data-toggle="modal" data-target="#modal-demanda-${entry.getClassPK()}"> 
201												<i class="fa-solid fa-trash-can"></i> 
202										</div> 
203										 
204									</div> 
205								</#if>		 
206						</div> 
207					</div> 
208				</div> 
209				 
210					<#if userIsAdmin> 
211						<div style="display: none;" id="modal-demanda-${entry.getClassPK()}" class="modal fade" role="dialog"> 
212							<div class="modal-dialog modal-lg" role="document"> 
213								<div class="modal-content"> 
214									<div class="modal-header" > 
215										<h4 class="m-0">Remover Demanda</h4> 
216										<button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
217											<span aria-hidden="true"> 
218												<i class="fa-solid fa-close"></i> 
219											</span> 
220										</button>    
221									</div> 
222									<div class="modal-body"> 
223										<h5>Você tem certeza que deseja remover essa demanda?</h5> 
224										<div> 
225											Ao clicar em continuar, a demanda será removida do seu perfil. 
226										</div> 
227									</div> 
228									<div class="modal-footer justify-content-end"> 
229											<button class="bioec_secondary_button" data-dismiss="modal">CANCELAR</button> 
230											<button class="bioec_primary_button" type="button" onclick="excluirDemanda(${JournalArticleFrontId}, ${orgId})">CONTINUAR</button>  
231									</div> 
232								</div> 
233							</div>			 
234						</div> 
235						 
236						<#-- modal edição --> 
237						 
238						 
239						<div style="display: none;" id="modalDemanda${JournalArticleID}" class="modal fade bioec-profile-demanda-modal modalDemanda" role="dialog"> 
240									<div class="modal-dialog modal-lg" role="document"> 
241										<form id="formularioDemanda${JournalArticleID}" class="form-group modal-content formularioDemanda"> 
242												<div id="demandaModal-l1${JournalArticleID}" class="modal-header demandaModal-l1"> 
243													<h5>Adicionar demanda</h5> 
244														<button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
245															 <span aria-hidden="true">&times;</span> 
246														</button> 
247												</div> 
248												<div id="demandaModal-l2${JournalArticleID}" class="modal-body demandaModal-l2"> 
249														<div id="demandaTitle${JournalArticleID}" class="demandaTitle"> 
250																<label class="ReqLabel" for="demandaInputTitle${JournalArticleID}">Título da demanda</label> 
251																<input id="demandaInputTitle${JournalArticleID}" value="${entry.getHighlightedTitle()}" type="text" placeholder="Inserir um título" required> 
252														</div> 
253														<div id="demandaName${JournalArticleID}" class="demandaName"> 
254																<label class="" for="demandaInputName${JournalArticleID}">Nome para contato</label> 
255																<input value="${nomeParaContato}" id="demandaInputName${JournalArticleID}" placeholder="Inserir nome" type="text"> 
256														</div> 
257														<div id="demandaTelephone${JournalArticleID}" class="demandaTelephone"> 
258																<label class="" for="demandaInputPhone${JournalArticleID}">Telefone para contato</label> 
259																<input value="${telefone}" id="demandaInputPhone${JournalArticleID}" name="demandaInputPhone" type="text" placeholder ='(__)_____-_____' minlength="14"  /> 
260														</div> 
261														<div id="demandaEmail${JournalArticleID}" class="demandaEmail"> 
262																<label class="" for="demandaInputEmail${JournalArticleID}">E-mail para contato</label> 
263																<input value="${email}" id="demandaInputEmail${JournalArticleID}" placeholder="Inserir e-mail" type="text"> 
264														</div> 
265														<div id="demandaDesc${JournalArticleID}" class="demandaDesc"> 
266																<label class="ReqLabel" for="demandaInputDesc${JournalArticleID}">Descrição</label> 
267																<textarea id="demandaInputDesc${JournalArticleID}" style="max-width: 100%;font-size: 16px;height: 80px;border: 1px solid #BEBEBE;" required>${desc}</textarea> 
268														</div> 
269														<div id="demandaImg${JournalArticleID}" class="demandaImg"> 
270																<div style="display: flex; flex-direction: column; gap: 8px"> 
271																		<label>Imagem da demanda (Máx. 10 MB)</label> 
272																		<label class="btn carregarImagem" id="carregarImagem${JournalArticleID}" for="inputCarregarImagemDemanda${JournalArticleID}" style="font-size: 16px; cursor: pointer;">CARREGAR IMAGEM</label> 
273																		<input class="inputCarregarImagemDemanda" id="inputCarregarImagemDemanda${JournalArticleID}" type="file" accept="image/*" onchange="encodeDemandaImageAsURL${JournalArticleID}(this)"> 
274																		<input class="d-none" id="inputDemandaBase64${JournalArticleID}" value="${imagem}" /> 
275																		<div class="imagemCarregadaDemanda imagemCarregadaDemanda${JournalArticleID} d-md-none d-block" style="background-image: url(${imagem})"></div> 
276																		<button type="button" id="removerImagemDemanda${JournalArticleID}" class="<#if imagem == "" || imagem?? == false> d-none </#if> removerImagemDemanda" > 
277																			<i class="fa fa-trash"></i> Remover imagem	 
278																		</button> 
279																	</div> 
280																	<div class="imagemCarregadaDemanda imagemCarregadaDemanda${JournalArticleID} d-md-block d-none" style="background-image: url(${imagem})"></div> 
281														</div> 
282												</div> 
283													<div class="TextImportant"> 
284														<p> 
285															Importante: O conteúdo enviado passará por um processo interno de aprovação. Só então o conteúdo adicionado aparecerá no portal. 
286														</p> 
287													</div> 
288 
289												<div id="demandaModal-l3${JournalArticleID}" class="modal-footer demandaModal-l3"> 
290														<button  class="btn button-empty" onclick="" id="demandas-saveAndClose${JournalArticleID}">SALVAR E FECHAR</button> 
291												</div> 
292										</form> 
293									</div> 
294								</div> 
295						 
296						</#if> 
297						<#--  
298						 
299						 
300						 
301						 
302						<div style="display: none;" id="modalInfra${JournalArticleID}" class="modal fade bioec-profile-infra-modal" role="dialog"> 
303							<div  class="modal-dialog modal-lg" role="document"> 
304 
305								<form class="form-group modal-content" id="formularioInfraestrutura${JournalArticleID}"> 
306									<div id="infraModal-l1-${JournalArticleID}" class="modal-header infraModal-l1" > 
307										<h5>Adicionar Infraestrutura</h5> 
308										<button id="fecharModal${JournalArticleID}" type="button" class="close" data-dismiss="modal" aria-label="Close"> 
309											<span aria-hidden="true">&times;</span> 
310										</button>    
311									</div> 
312									<div id="infraModal-l2-${JournalArticleID}" class="modal-body infraModal-l2"> 
313										<div id="infraName${JournalArticleID}" class="infraName"> 
314											<label class="ReqLabel" for="inputInfraName${JournalArticleID}">Nome da infraestrutura</label> 
315											<input type="text" id="inputInfraName${JournalArticleID}" value="${entry.getHighlightedTitle()}" placeholder="Nome da infraestrutura" required> 
316										</div> 
317									<div id="infraModel${JournalArticleID}" class="infraModel"> 
318										<label class="ReqLabel" for="inputInfraModel${JournalArticleID}">Modelo</label> 
319										<input type="text" id="inputInfraModel${JournalArticleID}" value="${modelo}" placeholder="Modelo" required> 
320									</div> 
321									<div id="infraBrand${JournalArticleID}" class="infraBrand"> 
322										<label class="ReqLabel" for="inputInfraBrand${JournalArticleID}">Marca</label> 
323										<input type="text" id="inputInfraBrand${JournalArticleID}" value="${marca}" placeholder="Marca" required> 
324									</div> 
325 
326									<div id="infraImg${JournalArticleID}" class="infraImg"> 
327										<div style="display: flex; flex-direction: column; gap: 8px"> 
328											<label>Imagem da infraestrutura (Máx. 10 MB)</label> 
329											<label class="bioec_secondary_button" id="carregarImagem${JournalArticleID}" for="inputCarregarImagemInfra${JournalArticleID}" style="font-size: 16px;color: #333244;align-self:start;"> 
330												CARREGAR IMAGEM 
331											</label> 
332											<input id="inputCarregarImagemInfra${JournalArticleID}" class="inputCarregarImagemInfra" type="file" accept="image/*" onchange="encodeInfraImageAsURL${JournalArticleID}(this)"> 
333											<input class="d-none" id="inputInfraBase64${JournalArticleID}" /> 
334											<div class="imagemCarregadaInfra${JournalArticleID} d-md-none d-block"></div> 
335											<button type="button" id="removerImagemInfra${JournalArticleID}" class="d-none removerImagemInfra" > 
336												<i class="fa fa-trash"></i> Remover imagem	 
337											</button> 
338										</div> 
339										<div class="imagemCarregadaInfra${JournalArticleID} d-md-block d-none"></div> 
340									</div> 
341 
342									<div id="infraFunction${JournalArticleID}" class="infraFunction"> 
343										<label class="ReqLabel" for="inputInfraFunction${JournalArticleID}">Função</label> 
344										<input type="text" id="inputInfraFunction${JournalArticleID}" class="inputInfraFunction" value="${funcao}" placeholder="Função" required> 
345									</div> 
346								</div> 
347								<div class="TextImportant"> 
348									<p> 
349									Importante: O conteúdo enviado passará por um processo interno de aprovação. Só então o conteúdo adicionado aparecerá no portal. 
350									</p> 
351								</div> 
352								<div id="infraModal-l3-${JournalArticleID}" class="modal-footer infraModal-l3"> 
353											<button class="bioec_secondary_button" id="demandas-saveAndClose${JournalArticleID}" onclick="">SALVAR E FECHAR</button> 
354								</div> 
355							</form> 
356 
357							</div>			 
358						 
359						 
360						--> 
361						 
362					 
363 
364						<script> 
365						<#if userIsAdmin> 
366						function excluirDemanda(wcId, orgId) { 
367								Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""}); 
368								fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/demanda/" + wcId, { 
369									method: 'DELETE', 
370									"headers": { 
371										"x-csrf-token": Liferay.authToken, 
372										"Content-Type": "application/json" 
373
374								}) 
375								.then(res => { 
376									if(res.status == 200) { 
377										Liferay.Util.openToast({ 
378												message: "Infraestrutura excluida com sucesso", 
379												type: "success", 
380												title: "", 
381												toastProps: { 
382														autoClose: 5000 
383
384										}) 
385										setTimeout(function(){ location.reload(); }, 2000) 
386									} else { 
387										Liferay.Util.openToast({ 
388												message: "Erro ao excluir infraestrutura", 
389												type: "danger", 
390												title: "", 
391												toastProps: { 
392														autoClose: 5000 
393
394										}) 
395
396								}); 
397
398							 
399						 
400							 
401							 
402	function validImageSize(base64="") { 
403		const decoded = atob(base64.substring(base64.indexOf(',') + 1)); 
404		const sizeMB = decoded.length / 1e+6; 
405		console.log("MB: " + decoded.length / 1e+6); 
406		if(sizeMB > 10) { 
407			Liferay.Util.openToast({ 
408				message: "O tamanho da imagem não deve ultrapassar 10 MB.", 
409				type: "danger", 
410				title: "", 
411				toastProps: { 
412					autoClose: 5000 
413
414			}) 
415			return false 
416
417		return true 
418
419 
420	function encodeDemandaImageAsURL${JournalArticleID}(element) { 
421  	let file = element.files[0]; 
422    let reader = new FileReader(); 
423    reader.onloadend = () => { 
424			if(reader.result) { 
425				if(!validImageSize(reader.result)) return; 
426				try { 
427					const base64_input = document.getElementById("inputDemandaBase64${JournalArticleID}") 
428					base64_input.value = reader.result 
429					Array.from(document.getElementsByClassName("imagemCarregadaDemanda${JournalArticleID}")).forEach( el => el.style.backgroundImage = 'url(' + reader.result + ')' ) 
430					 
431					const removeImageButton = document.getElementById("removerImagemDemanda${JournalArticleID}") 
432					removeImageButton.classList.remove("d-none") 
433				} catch (error) { 
434					console.error(error) 
435
436
437
438		reader.readAsDataURL(file); 
439
440	 
441	function removeImageDemanda${JournalArticleID}() { 
442	try { 
443		const file_input = document.getElementById("inputCarregarImagemDemanda${JournalArticleID}") 
444		Array.from(document.getElementsByClassName("imagemCarregadaDemanda${JournalArticleID}")).forEach( el => el.style.backgroundImage = "" ) 
445		const base64_input = document.getElementById("inputDemandaBase64${JournalArticleID}") 
446		file_input.value = null 
447		base64_input.value = "" 
448		 
449		const removeImageButton = document.getElementById("removerImagemDemanda${JournalArticleID}") 
450		removeImageButton.classList.add("d-none") 
451	} catch (error) { 
452		console.error(error) 
453
454
455 
456 
457document.getElementById("removerImagemDemanda${JournalArticleID}").addEventListener("click", removeImageDemanda${JournalArticleID}); 
458 
459<#-- Rest da edição de organização --> 
460 
461<#if orgOrUser == "org"> 
462document.querySelector('#formularioDemanda${JournalArticleID}').addEventListener('submit', event => { 
463	event.preventDefault(); 
464	adicionarDemanda${JournalArticleID}();  
465}); 
466 
467function adicionarDemanda${JournalArticleID}() {		 
468		Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""}); 
469		$("#demandas-saveAndClose${JournalArticleID}").prop("disabled",true); 
470	 
471		 
472		 
473		const demandaData = { 
474			titulo: document.getElementById("demandaInputTitle${JournalArticleID}").value, 
475			nomeContato: document.getElementById("demandaInputName${JournalArticleID}").value, 
476			telefoneContato: document.getElementById("demandaInputPhone${JournalArticleID}").value, 
477			emailContato: document.getElementById("demandaInputEmail${JournalArticleID}").value, 
478			descricao: document.getElementById("demandaInputDesc${JournalArticleID}").value, 
479			imagem: document.getElementById("inputDemandaBase64${JournalArticleID}").value, 
480
481		 
482		console.log(demandaData); 
483	 
484			fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/demanda/${JournalArticleFrontId}", { 
485				method: 'PUT', 
486				"headers": { 
487					"x-csrf-token": Liferay.authToken, 
488					"Content-Type": "application/json" 
489				}, 
490				body: JSON.stringify(demandaData) 
491			}) 
492			.then(res => { 
493				if(res.status == 200) { 
494					Liferay.Util.openToast({ 
495							message: "Demanda 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.", 
496							type: "success", 
497							title: "", 
498							toastProps: { 
499									autoClose: 5000 
500
501					}) 
502					 setTimeout(function(){ location.reload(); }, 2000); 
503				} else { 
504				 $("#demandas-saveAndClose${JournalArticleID}").prop("disabled",false); 
505					Liferay.Util.openToast({ 
506							message: "Erro ao editada demanda", 
507							type: "danger", 
508							title: "", 
509							toastProps: { 
510									autoClose: 5000 
511
512					}) 
513
514			}) 
515		 
516
517</#if> 
518 
519<#-- Rest da edição de pessoa fisica --> 
520							 
521							 
522				<#if orgOrUser == "user"> 
523				 
524					document.querySelector('#formularioDemanda${JournalArticleID}').addEventListener('submit', event => { 
525					event.preventDefault(); 
526					adicionarDemanda${JournalArticleID}();  
527				});			 
528						 
529						function adicionarDemanda${JournalArticleID}() { 
530							Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""}); 
531							$("#demandas-saveAndClose${JournalArticleID}").prop("disabled",true); 
532	 
533							const demandaData = { 
534								titulo: document.getElementById("demandaInputTitle${JournalArticleID}").value, 
535								nomeContato: document.getElementById("demandaInputName${JournalArticleID}").value, 
536								telefoneContato: document.getElementById("demandaInputPhone${JournalArticleID}").value, 
537								emailContato: document.getElementById("demandaInputEmail${JournalArticleID}").value, 
538								descricao: document.getElementById("demandaInputDesc${JournalArticleID}").value, 
539								imagem: document.getElementById("inputDemandaBase64${JournalArticleID}").value, 
540
541							 
542							console.log(demandaData); 
543 
544							fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/demanda/${JournalArticleFrontId}", { 
545											method: 'PUT', 
546											"headers": { 
547													"x-csrf-token": Liferay.authToken, 
548													"Content-Type": "application/json" 
549											}, 
550											body: JSON.stringify(demandaData) 
551									}) 
552									.then( res => { 
553								if(res.status == 200) { 
554									Liferay.Util.openToast({ 
555										message: "Demanda 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.", 
556										type: "success", 
557										title: "", 
558										toastProps: { 
559											autoClose: 5000 
560
561									}) 
562									 setTimeout(function(){ location.reload(); }, 2000); 
563								} else { 
564								 $("#demandas-saveAndClose${JournalArticleID}").prop("disabled",false); 
565									Liferay.Util.openToast({ 
566										message: "Erro ao editar Demanda", 
567										type: "danger", 
568										title: "", 
569										toastProps: { 
570											autoClose: 5000 
571
572									}) 
573
574							}); 
575							 
576					}; 
577						 
578						 
579				</#if> 
580							 
581							 
582								</#if> 
583						</script> 
584					 
585				 
586				 
587				 
588			</#list> 
589		</#if> 
590	</div> 
591</div> 
592 
593<style> 
594.bioec_demanda_img { 
595    overflow: hidden; 
596		background-size: contain; 
597    background-position: center; 
598    background-repeat: no-repeat; 
599
600 
601.bioec_demanda_img_placeholder { 
602    width: 140px; 
603    height: 140px; 
604    background-color: #E8ECEF; 
605    display: flex; 
606    flex-direction: column; 
607    align-items: center; 
608    justify-content: center; 
609    font-size: 14px; 
610    color: #5B5C61; 
611
612 
613.bioec_demanda_img_placeholder i { 
614    font-size: 44px; 
615
616 
617 
618.pagination-items-per-page.active > a,  
619.pagination-items-per-page.active > button,  
620.pagination-items-per-page.show > a,  
621.pagination-items-per-page.show > button, 
622.page-item.active .page-link,  
623.page-item.show .page-link{ 
624    border-color: #4ECD66; 
625    background-color: #4ECD66; 
626
627 
628.pagination-results, 
629.pagination-items-per-page > a,  
630.pagination-items-per-page > button, 
631.pagination-items-per-page > a:hover,  
632.pagination-items-per-page > button:hover, 
633.page-link{ 
634	color: #4ebe66; 
635
636 
637.bioec-profile-demanda-main{ 
638	display: flex; 
639	gap: 40px; 
640	flex-direction: column; 
641	padding-bottom: 20px; 
642
643.bioec-profile-demanda-main h5{ 
644	font-weight: 700; 
645
646.bioec-profile-demanda-main h5, .bioec-profile-demanda-main p{ 
647	color: #5B5C61; 
648	margin-bottom: 0px; 
649	font-size: 16px; 
650 
651
652 
653.bioec-profile-demanda-main #demanda-lista-container>div{ 
654	border: 1px #BEBEBE solid;  
655	padding: 24px 24px 0 24px; 
656	margin-bottom: 40px; 
657	display: grid; 
658	grid-row-gap: 24px; 
659	grid-template-columns: 24px 12px 1fr 15px; 
660	grid-template-areas:  
661		"ck . tit arrw" 
662		"desc desc desc desc" 
663		"clps clps clps clps"; 
664
665 
666.bioec-profile-demanda-main .lista-checkmark { grid-area: ck; display: flex; } 
667.bioec-profile-demanda-main .lista-checkmark i { font-size: 24px; } 
668.bioec-profile-demanda-main .lista-pic { grid-area: pic; display: flex; justify-content: center;} 
669.bioec-profile-demanda-main .lista-arrow { grid-area: arrw; } 
670 
671.bioec-profile-demanda-main .lista-titulo {  
672	grid-area: tit;  
673	display: flex;  
674	flex-direction: column; 
675	justify-content: center; 
676	 
677
678 
679.bioec-profile-demanda-main .lista-titulo h5{ 
680	margin-bottom: 0px; 
681}  
682 
683.bioec-profile-demanda-main .lista-desc { 
684grid-area: desc;  
685}  
686 
687.bioec-profile-demanda-main .lista-desc p{  
688	margin: 0; 
689
690 
691.bioec-profile-demanda-main a{ 
692	color: #5B5C61; 
693
694 
695.demanda-port{ 
696	border: 1px #BEBEBE solid;  
697	padding: 24px; 
698	display: flex; 
699	flex-direction: column; 
700	align-items: center; 
701	gap: 24px; 
702
703 
704.demanda-port p{ 
705text-align: center;	 
706	 
707
708 
709.demanda-port div{ 
710display: flex; 
711	justify-content: space-between; 
712	width: min(558px, 100%); 
713
714 
715.button-empty { 
716border: solid 1px #4ECD66; 
717padding: 8px 24px; 
718color: #333244; 
719	transition: 250ms; 
720
721 
722.button-empty:hover{ 
723	background-color: #4ECD66; 
724
725 
726.button-filled { 
727background-color: #4ECD66; 
728border: solid 1px #4ECD66; 
729padding: 8px 24px; 
730color: #333244; 
731transition: 250ms; 
732	 
733
734 
735.button-filled:hover{ 
736	background-color: transparent; 
737
738 
739.bioec-profile-demanda-main .lista-footnote {  
740 
741	display: flex; 
742	justify-content: space-between; 
743	border-top: 1px solid #E8ECEF; 
744	padding-top: 12px; 
745	font-size: 14px; 
746	font-weight: 300; 
747	gap: 15px; 
748	color: #5B5C61; 
749 
750
751.lista-collapse{ 
752display: flex; 
753flex-direction: column; 
754gap: 24px; 
755grid-area: clps; 
756padding-bottom: 24px; 
757
758 
759 .lista-details{ 
760	display: flex; 
761	justify-content: flex-start; 
762	gap: 24px; 
763
764.lista-pic img { 
765	max-height: 138px; 
766	max-width: 138px; 
767
768 
769.bioec-profile-demanda-main p{ 
770 
771
772 
773.imagemCarregadaDemanda { 
774	height: 100px; 
775	width: 100px; 
776	background-size: contain; 
777	background-position: center; 
778	background-repeat: no-repeat; 
779
780 
781 
782.ButtonAddDemanda { 
783    background: #4ECD66; 
784    border-radius: 8px; 
785    padding: 8px 24px; 
786    border: none; 
787    font-weight: 700; 
788    color: #333244; 
789    font-family: 'Roboto'; 
790    float: right; 
791    text-transform: uppercase; 
792
793.ButtonAddDemanda:hover{ 
794	color: #333244; 
795	text-decoration: none; 
796
797 
798.bioec-profile-demanda-modal label { 
799    margin: 0; 
800    cursor: default; 
801    font-size: 20px; 
802    font-weight: 700; 
803    color: #5B5C61; 
804
805 
806.bioec-profile-demanda-modal div { 
807    width: 100%; 
808
809 
810#demandaModal-l1, .demandaModal-l1 { 
811    padding: 18px 24px; 
812    display: flex; 
813    justify-content: space-between; 
814
815 
816#demandaModal-l1 img, .demandaModal-l1 img { 
817    cursor: pointer; 
818
819 
820#demandaModal-l1 h5, .demandaModal-l1 h5 { 
821   	margin: 0; 
822    font-size: 20px; 
823    font-weight: 700; 
824    color: #5B5C61; 
825
826 
827#demandaModal-l2, .demandaModal-l2 { 
828		border-top: 1px solid #E8ECEF; 
829    display: grid; 
830    grid-template-columns: 1fr 1fr; 
831    grid-template-areas: 
832        "titu nome" 
833        "fone mail" 
834        "desc desc" 
835        "imagem ." 
836
837    column-gap: 24px; 
838    row-gap: 40px; 
839    padding: 24px; 
840
841 
842#demandaModal-l2>div, .demandaModal-l2>div { 
843    display: flex; 
844    flex-direction: column; 
845    gap: 8px; 
846
847 
848#demandaTitle, .demandaTitle { 
849    grid-area: titu; 
850
851 
852#demandaName, .demandaName { 
853    grid-area: nome; 
854
855 
856#demandaTelephone, .demandaTelephone { 
857    grid-area: fone; 
858
859 
860#demandaEmail, .demandaEmail { 
861    grid-area: mail; 
862
863 
864#demandaBrand, .demandaBrand { 
865    grid-area: marca; 
866
867 
868#demandaModal-l2>#demandaImg, .demandaModal-l2>.demandaImg { 
869    grid-area: imagem; 
870    display: flex; 
871    flex-direction: column; 
872
873 
874#demandaDesc, .demandaDesc { 
875    grid-area: desc; 
876 
877
878 
879#demandaDesc input, .demandaDesc input { 
880    height: 80px; 
881
882 
883.TextImportant{ 
884    border-bottom: 1px solid #E8ECEF; 
885 		padding: 24px; 
886		color: #5B5C61;		 
887
888 
889.bioec-profile-demanda-modal input[type="text"] { 
890    border-top: none; 
891    border-left: none; 
892    border-right: none; 
893    border-bottom: 1px solid #BEBEBE; 
894    width: 100%; 
895    font-size: 16px; 
896 
897
898 
899 
900.bioec-profile-demanda-modal input[type="text"]:focus-visible { 
901    outline: none; 
902    border-bottom: 1px solid black; 
903 
904
905 
906.bioec-profile-demanda-modal .ReqLabel:before { 
907    content: "* "; 
908    color: #D90000; 
909 
910
911 
912#inputCarregarImagemDemanda, .inputCarregarImagemDemanda { 
913    display: none; 
914
915 
916#carregarImagem, .carregarImagem  { 
917    padding: 8px 24px; 
918    border: 1px solid #4ECD66; 
919    width: fit-content; 
920    transition: 250ms; 
921 
922
923 
924#carregarImagem:hover, .carregarImagem:hover { 
925    background-color: #4ECD66; 
926
927 
928.button-empty { 
929    border: solid 1px #4ECD66; 
930    padding: 8px 24px; 
931    color: #333244; 
932    transition: 250ms; 
933    font-weight: bold; 
934
935 
936.button-empty:hover { 
937    background-color: #4ECD66; 
938
939 
940.button-filled { 
941    background-color: #4ECD66; 
942    border: solid 1px #4ECD66; 
943    padding: 8px 24px; 
944    color: #333244; 
945    transition: 250ms; 
946    font-weight: bold; 
947
948 
949.button-filled:hover { 
950    background-color: transparent; 
951
952 
953#demandaModal-l3, .demandaModal-l3 { 
954    gap: 24px; 
955    display: flex; 
956    justify-content: flex-end; 
957    padding: 24px; 
958
959 
960.modal { 
961    padding: initial !important; 
962    border-radius: 4px !important; 
963    
964
965 
966.modal a.close-modal { 
967    display: none; 
968
969 
970#removerImagemDemanda, .removerImagemDemanda { 
971	background: none; 
972	border: none; 
973	outline: none; 
974	color: #5B5C61; 
975	font-size: 16px; 
976	font-weight: 900; 
977	line-height: 24px; 
978	letter-spacing: 0em; 
979	width: fit-content; 
980	margin-left: 16px; 
981
982 
983 
984@media(max-width: 964px){ 
985    .lista-pic img { 
986        width: 100%; 
987        max-height: unset; 
988        max-width: unset; 
989 
990
991
992 
993@media (max-width: 550px) { 
994    #demandaModal-l2, .demandaModal-l2 { 
995        display: flex; 
996        flex-direction: column; 
997
998 
999    #demandaModal-l3, .demandaModal-l3 { 
1000        display: flex; 
1001        flex-direction: column; 
1002
1003
1004 
1005@media(max-width: 450px){ 
1006	.bioec-profile-demanda-main .lista-details{ 
1007		flex-direction: column; 
1008
1009 
1010	.lista-contato{ 
1011		text-align: center; 
1012
1013 
1014	.bioec-profile-demanda-main .lista-footnote{ 
1015	flex-direction: column; 
1016		gap: 10px; 
1017		align-items: flex-end; 
1018		text-align: right; 
1019
1020
1021 
1022@media(max-width: 992px){ 
1023	#demanda-lista-container { 
1024		padding-inline: 15px; 
1025
1026
1027 
1028.bioec-profile-demanda-main .lista-footnote .buttonsActions { 
1029  display: flex; 
1030  gap: 17px; 
1031
1032 
1033@media (max-width: 768px) { 
1034  .bioec-profile-demanda-main .lista-desc { 
1035    gap: 24px; 
1036    flex-direction: column-reverse; 
1037
1038  .bioec-profile-demanda-main .lista-footnote { 
1039    flex-direction: column; 
1040    align-items: center; 
1041
1042  .bioec-profile-demanda-main .lista-footnote > div { 
1043    text-align: center; 
1044
1045   
1046  .bioec-profile-demanda-main .lista-footnote .barra-pipe { 
1047    display: none; 
1048
1049  .bioec-profile-demanda-main .lista-footnote .lista-author { 
1050    display: flex; 
1051    gap: 4px; 
1052    justify-content: center; 
1053
1054  .bioec-profile-demanda-main .lista-footnote .buttonsActions { 
1055    width: 100%; 
1056    justify-content: space-between; 
1057
1058
1059 
1060 
1061</style> 
1062 
1063 
1064<script> 
1065 
1066 
1067 
1068</script> 
Ofertas drop zone
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy996.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy996 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@731e0017"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign journalArticle = JournalArtic...  [in template "34764#34807#41133" at line 20, column 33]
----
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">&times;</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">&times;</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> 
Publicações drop zone
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy996.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy996 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@731e0017"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign journalArticle = JournalArtic...  [in template "34764#34807#41154" at line 18, column 65]
----
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 PortletFileRepositoryUtil = staticUtil["com.liferay.portal.kernel.portletfilerepository.PortletFileRepositoryUtil"] 
5							 JSONFactoryUtil = staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"] 
6							 mbMessageLocalService = serviceLocator.findService("com.liferay.message.boards.service.MBMessageLocalService") 
7							 tagsLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService") 
8							 OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService") 
9
10				<#assign journalArticles = JournalArticleLocalService.getArticlesByStructureId(themeDisplay.getLayout().getGroupId(), 47601, 0, -1, -1, ORDER_BY_ASC) /> 
11 
12				<script src="https://unpkg.com/imask"></script> 
13 
14				<div class="bioec-profile-post-main"> 
15					<div id="post-lista-container" class="d-flex flex-column"> 
16						<#if entries?has_content> 
17							<#list entries as entry> 
18								<#assign journalArticle = JournalArticleLocalService.getLatestArticle(entry.getClassPK()) > 
19									<#assign JournalArticleID = journalArticle.getId()>										 
20										<#assign JournalArticleFrontId = journalArticle.getArticleId()> 
21											<#assign tipoDePost = "" > 
22												<#assign urlWC = ""> 
23													<#assign articleXml = journalArticle.getDocument().getRootElement()  
24																	 userIsAdmin = false 
25																	 orgId = "" 
26																	 imagem = "" 
27																	 autorId = "" 
28																	 desc = "" 
29
30														<#assign tags = tagsLocalService.getTagNames("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()?number )  
31																		 tagName = tags[0]!"" 
32																		 orgOrUser = "" 
33																		 link = "" 
34
35 
36															<#if tagName?contains("organization") && tagName != "" > 
37																<#assign orgOrUser = "org"> 
38																	<#else> 
39																		<#assign orgOrUser = "user" /> 
40																		</#if> 
41 
42																	<#assign tituloDoPost = ""> 
43 
44																		<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text33341198']")??> 
45 
46																			<#assign tituloDoPost = articleXml.selectSingleNode("dynamic-element[@field-reference='Text33341198']").getStringValue()!"" 
47																							 tituloDoPost = tituloDoPost?replace("\n\t\t", "") 
48																							 tituloDoPost = tituloDoPost?replace("\n\t", "")					 
49																							 /> 
50 
51																			</#if> 
52 
53																		<#if articleXml.selectSingleNode("dynamic-element[@field-reference='RichText67646278']")??> 
54																			<#assign desc = articleXml.selectSingleNode("dynamic-element[@field-reference='RichText67646278']").getStringValue()!"" 
55																							 desc = desc?replace("\n\t\t", "") 
56																							 desc = desc?replace("\n\t", "")						 
57																							 /> 
58																			</#if> 
59 
60																		<#if articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto05403380']")??> 
61																			<#assign link = articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto05403380']").getStringValue()!"" 
62																							 link = link?replace("\n\t\t", "") 
63																							 link = link?replace("\n\t", "")						 
64																							 /> 
65																			</#if> 
66 
67																		<#if articleXml.selectNodes("dynamic-element[@name='CampoDeTexto47994077']")??> 
68																			<#assign contRelacionado = articleXml.selectNodes("dynamic-element[@name='CampoDeTexto47994077']")!"" 	 
69																							 /> 
70																			</#if>																																														  
71 
72																		<#if articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto12713402']")??> 
73																			<#assign imagem = articleXml.selectSingleNode("dynamic-element[@field-reference='CampoDeTexto12713402']").getStringValue()!"" 
74																							 imagem = imagem?replace("\n\t\t", "") 
75																							 imagem = imagem?replace("\n\t", "")			 
76
77																				<#--if imagem?? && imagem?trim != ""> 
78																					<#assign  
79																									 jsonObject = JSONFactoryUtil.createJSONObject(imagem)  
80																									 fileEntryId = jsonObject.getLong("fileEntryId")	 
81
82																						<#if fileEntryId != 0> 
83																							<#assign 
84																											 fileEntry = PortletFileRepositoryUtil.getPortletFileEntry(fileEntryId) 
85																											 fileEntryURL = PortletFileRepositoryUtil.getDownloadPortletFileEntryURL(themeDisplay, fileEntry,"") 
86
87																								</#if> 
88																							</#if-->		 
89																						</#if> 
90 
91																					<#assign 	categorias = AssetCategoryLocalService.getCategoryNames(entry.getClassName(), entry.getClassPK())!""> 
92																						<#if  categorias?is_sequence> 
93																							<#if  categorias?seq_contains("Notícias")> 
94																								<#assign tipoDePost = "Notícia" > 
95																									</#if> 
96																								<#if  categorias?seq_contains("Notas Técnicas e Relatórios")> 
97																									<#assign tipoDePost = "Nota Técnica e Relatório" > 
98																										</#if> 
99																									<#if  categorias?seq_contains("Artigos")> 
100																										<#assign tipoDePost = "Artigo" > 
101																											</#if> 
102																										</#if> 
103 
104 
105																									<#if articleXml.selectSingleNode("dynamic-element[@field-reference='Text26813532']")??> 
106																										<#assign  
107																														 autorId = articleXml.selectSingleNode("dynamic-element[@field-reference='Text26813532']").getStringValue()!"" 
108																														 autorId = autorId?replace("\n\t\t", "") 
109																														 autorId = autorId?replace("\n\t", "")		 
110
111																											</#if> 
112																										<#assign  
113																														 autorArticleId = "" 
114																														 commentsCount = mbMessageLocalService.getDiscussionMessagesCount(entry.getClassName(), entry.getClassPK(), 0)!"0" 
115
116																											<#if orgOrUser == "user" > 
117																												<#if autorId != "" && autorId??> 
118																													<#assign 
119																																	 autor = UserLocalService.fetchUser(autorId?number)!"" 
120																																	 autorArticleId = autor.getExpandoBridge().getAttribute("journal-article")!"0"  
121																																	 /> 
122																													<#if autor != ""> 
123																														<#assign autor = autor.getFullName()!""> 
124																															<#else> 
125																																<#assign autor = "Anônimo" > 
126																																	</#if> 
127																																<#else>  
128																																	<#assign autor = "Anônimo" > 
129																																		</#if>	 
130 
131 
132 
133																																	<#if autorArticleId != "0" && autorArticleId != "" && autor != "Anônimo"> 
134																																		<#assign autorArticle = JournalArticleLocalService.getLatestArticle(themeDisplay.getLayout().getGroupId(), autorArticleId?string) > 
135																																			<#assign urlWC = autorArticle.getUrlTitle()!""> 
136																																				</#if> 
137 
138																																			</#if> 
139 
140																																		<#if orgOrUser == "org" > 
141																																			<#assign orgId = tagName?keep_after("organization-")				 
142																																							 organization =  OrganizationLocalService.fetchOrganization(orgId?number)!""> 
143																																				<#if organization != ""> 
144																																					<#assign	orgArticleId = organization.getExpandoBridge().getAttribute("journal-article") 
145																																									 orgJournalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),orgArticleId?c)  
146																																									 urlWC = orgJournalArticle.getUrlTitle()!"" 
147																																									 autor = organization.getName()!""> 
148																																						</#if> 
149																																					</#if> 
150 
151																																				<#if themeDisplay.isSignedIn() > 
152																																					<#if tagName?contains("organization-")> 
153																																						<#assign userIsAdmin = OrganizationLocalService.hasUserOrganization(themeDisplay.getUserId(), orgId?number)> 
154																																							<#else> 
155																																								<#if autorId != ""> 
156																																									<#if autorId?number == themeDisplay.getUserId()> 
157 
158																																										<#assign userIsAdmin = true> 
159																																											</#if> 
160																																										</#if> 
161																																									</#if> 
162 
163 
164																																								</#if> 
165 
166 
167 
168																																							<div class="post-lista-item"> 
169																																								<div class="lista-checkmark"> 
170																																									<#if categorias?seq_contains("aprovado") > <i title="Aprovado" style="color: #4ECD66" class="fa-solid fa-circle-check"></i> </#if> 
171																																									<#if categorias?seq_contains("pendente") >	<i title="Em análise" style="color: #D90000"class="fa-solid fa-spinner"></i> </#if> 
172																																									<#if categorias?seq_contains("recusado") >	<i title="Recusado" style="color: #D90000"class="fa-solid fa-exclamation-circle"></i> </#if> 
173 
174																																								</div> 
175 
176																																								<div class="lista-titulo"> 
177																																									<h5>${tipoDePost}</h5> 
178																																								</div> 
179 
180																																								<div class="lista-arrow"> 
181																																									<button style="padding: 0;" class="btn" type="button" data-toggle="collapse" data-target="#collapseID${JournalArticleID}" aria-expanded="false" aria-controls="collapseID${JournalArticleID}"> 
182																																										<i class="fa-solid fa-chevron-down"></i> 
183																																									</button> 
184																																								</div> 
185 
186																																								<div class="lista-desc"> 
187																																									<#if imagem?trim != "" > 
188																																										<div> 
189																																											<img src="${imagem}" /> 
190																																										</div> 
191																																										<#else> 
192																																											<div class="bioec_post_img_placeholder"> 
193																																												<i class="fa-solid fa-image"></i> 
194																																												sem imagem 
195																																											</div> 
196																																											</#if> 
197																																										<p>${tituloDoPost}</p> 
198																																										</div> 
199 
200																																									<div class="lista-collapse collapse" id="collapseID${JournalArticleID}"> 
201																																										<#if desc !=""> 
202																																											<div class="lista-details"> 
203																																												<div class="lista-contato"> 
204																																													${desc} 
205																																												</div> 
206																																											</div> 
207																																											</#if> 
208 
209																																										<#if categorias?seq_contains("recusado") > 
210																																											<div style="border-top: 1px solid #E8ECEF; font-weight: bold; padding-top: 24px;"> 
211																																												<p>Conteúdo Em Análise Pelo Cetiqt:</p> 
212																																												<p>Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.</p> 
213																																											</div> 
214																																											</#if> 
215 
216																																										<div class="lista-footnote"> 
217																																											<div> 
218																																												<span class="post-type" style="text-transform: uppercase;" id="postInputTipodePost${JournalArticleID}" vlaue="${tipoDePost}">${tipoDePost}</span> <span class="barra-pipe"> | </span>  
219																																												<span class="lista-date">${journalArticle.getDisplayDate()?string('dd/MM/yyyy')}</span> | <span class="lista-commentNumber">${commentsCount} comentários</span> <span class="barra-pipe"> | </span> <span class="lista-author">Publicado por <a <#if urlWC != ''>href="/w/${urlWC}</#if>"><#if autor??>${autor}<#else>Anônimo</#if></a></span> 
220																																									</div> 
221																																									<#if userIsAdmin> 
222																																										<div class="buttonsActions"> 
223																																											<div style="cursor: pointer;font-size: 16px;" data-toggle="modal" data-target="#modalEditPost${JournalArticleID}"> 
224																																												<i class="fa-solid fa-edit"></i> 
225																																											</div> 
226																																											<div style="cursor: pointer;font-size: 16px;" data-toggle="modal" data-target="#modal-post-${entry.getClassPK()}"> 
227																																												<i class="fa-solid fa-trash-can"></i> 
228																																											</div> 
229																																										</div> 
230																																										</#if>		 
231																																								</div> 
232																																							</div> 
233																																							</div> 
234 
235 
236																																						<#if userIsAdmin> 
237																																							<div style="display: none;" id="modal-post-${entry.getClassPK()}" class="modal fade" role="dialog"> 
238																																								<div class="modal-dialog modal-lg" role="document"> 
239																																									<div class="modal-content"> 
240																																										<div class="modal-header" > 
241																																											<h4 class="m-0">Remover Publicação</h4> 
242																																											<button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
243																																												<span aria-hidden="true"> 
244																																													<i class="fa-solid fa-close"></i> 
245																																												</span> 
246																																											</button>    
247																																										</div> 
248																																										<div class="modal-body"> 
249																																											<h5>Você tem certeza que deseja remover essa publicação?</h5> 
250																																											<div> 
251																																												Ao clicar em continuar, a publicação será removida do seu perfil. 
252																																											</div> 
253																																										</div> 
254																																										<div class="modal-footer justify-content-end"> 
255																																											<button class="bioec_secondary_button" data-dismiss="modal">CANCELAR</button> 
256																																											<button class="bioec_primary_button" type="button" onclick="excluirPost${JournalArticleID}()">CONTINUAR</button>  
257																																										</div> 
258																																									</div> 
259																																								</div>			 
260																																							</div> 
261 
262																																							<#-- modal edição --> 
263 
264 
265																																								<div style="display: none" id="modalEditPost${JournalArticleID}" class="modal fade bioec-profile-edit-post-modal" role="dialog"> 
266																																									<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document"> 
267																																										<form class="form-group modal-content" id="formularioEditPost${JournalArticleID}"> 
268																																											<div id="editPostModal-l1${JournalArticleID}" class="editPostModal-l1 modal-header"> 
269																																												<h5>Editar ${tipoDePost}</h5> 
270																																												<button 
271																																																type="button" 
272																																																class="close" 
273																																																data-dismiss="modal" 
274																																																aria-label="Close" 
275
276																																													<span aria-hidden="true">&times;</span> 
277																																												</button> 
278																																											</div> 
279 
280																																											<div id="editPostModal-l2${JournalArticleID}" class="editPostModal-l2 modal-body"> 
281																																												<div id="editPostTitle${JournalArticleID}" class="postTitle"> 
282																																													<label class="reqLabel" for="editPostInputTitle${JournalArticleID}" 
283																																																 >Título</label 
284
285																																													<input 
286																																																 id="editPostInputTitle${JournalArticleID}" 
287																																																 class="postInputTitle" 
288																																																 type="text" 
289																																																 value="${tituloDoPost}" 
290																																																 placeholder="Inserir um título" 
291																																																 required 
292																																																 /> 
293																																												</div> 
294																																												<div id="editPostDesc${JournalArticleID}" class="postDesc"> 
295																																													<label class="reqLabel" for="editPostInputDesc${JournalArticleID}" 
296																																																 >Texto principal</label 
297
298																																													<textarea 
299																																																		id="editPostInputDesc${JournalArticleID}" 
300																																																		class="postInputDesc" 
301																																																		rows="7" 
302																																																		style="border: 1px solid #bebebe" 
303																																																		required 
304																																																		>${desc}</textarea> 
305																																												</div> 
306 
307																																												<div id="editPostImg${JournalArticleID}" class="postImg"> 
308																																													<div style="display: flex; flex-direction: column; gap: 8px"> 
309																																														<label>Imagem de ${tipoDePost}</label> 
310																																														<label 
311																																																	 class="btn carregarImagemPost" 
312																																																	 id="carregarImagemPost${JournalArticleID}" 
313																																																	 for="inputCarregarImagemPost${JournalArticleID}" 
314																																																	 style="font-size: 16px; cursor: pointer" 
315																																																	 >CARREGAR IMAGEM</label 
316
317																																														<input 
318																																																	 id="inputCarregarImagemPost${JournalArticleID}" 
319																																																	 class="inputCarregarImagemPost" 
320																																																	 type="file" 
321																																																	 accept="image/*" 
322																																																	 /> 
323																																														<input class="d-none inputPostBase64" id="inputPostBase64${JournalArticleID}" value="${imagem}" /> 
324																																														<button type="button" id="removerImagemPost${JournalArticleID}" class="removerImagemPost <#if imagem == "" || imagem?? == false> d-none </#if>"> 
325																																															<i class="fa fa-trash"></i> Remover imagem 
326																																														</button> 
327 
328																																													</div> 
329																																													<div id="imagemCarregadaPost${JournalArticleID}"  class="imagemCarregadaPost" style="background-image: url(${imagem})"></div> 
330																																												</div> 
331 
332																																												<div id="postLink${JournalArticleID}" class="postLink"> 
333																																													<label for="postInputLinkMoreInfo${JournalArticleID}">Link para saber mais</label> 
334																																													<small id="postLinkMoreInfo${JournalArticleID}" class="postLinkMoreInfo"> 
335																																														Espaço opcional para adicionar um link externo com mais 
336																																														informações sobre o assunto. 
337																																													</small> 
338																																													<input 
339																																																 id="postInputLinkMoreInfo${JournalArticleID}" 
340																																																 type="text" 
341																																																 placeholder="Inserir link" 
342																																																 aria-describedby="postLinkMoreInfo${JournalArticleID}" 
343																																																 value="${link}" 
344																																																 /> 
345																																												</div> 
346 
347																																												<div id="editContentRel${JournalArticleID}"> 
348																																													<div style="display: flex; flex-direction: column; gap: 8px"> 
349																																														<label for="conteudoRelacionadoInput${JournalArticleID}">Conteúdos relacionados</label> 
350																																														<small id="conteudoRelacionado${JournalArticleID}"> 
351																																															Espaço opcional para adicionar conteúdos relacionados de notícias ou artigos do Portal de Bioeconomia. 
352																																														</small> 
353 
354																																														<#assign containerLink = [] 
355																																																		 containerId = [] /> 
356 
357																																															<#assign i = 0 /> 
358 
359																																															<#list contRelacionado as links> 
360																																																<#assign valLink = links.getStringValue() 
361																																																				 valLink = valLink?replace("\n\t\t", "") 
362																																																				 valLink = valLink?replace("\n\t", "")		/>		 
363 
364																																																<#list journalArticles as entrada> 
365																																																	<#assign 
366																																																					 checkId = entrada.getId()?string 
367																																																					 articleXml = entrada.getDocument().getRootElement() 
368																																																					 titleInput = articleXml.selectSingleNode("dynamic-element[@field-reference='Text33341198']").getStringValue() 
369																																																					 titleInput = titleInput?replace("\n\t\t", "") 
370																																																					 titleInput = titleInput?replace("\n\t", "")		/> 
371 
372																																																	<#if valLink = checkId>																																																				 
373																																																		<#assign containerLink += [titleInput] />				 
374																																																		<#assign containerId += [checkId] />				 
375																																																		</#if> 
376																																																	</#list> 
377 
378																																																</#list>	 
379 
380																																															<#list 1..4 as j> 
381 
382																																																<input class="form-control search-select-post postName-${JournalArticleID}-${j}" list="postList-${j}" id="${containerId[i]!''}" placeholder="Selecione nova publicação" value="${containerLink[i]!''}"> 
383 
384																																																<datalist id="postList-${j}" class="contRel${JournalArticleID}"> 
385																																																	<#list journalArticles as entry> 
386																																																		<#assign 
387																																																						 postId = entry.getId()?string 
388																																																						 articleXml = entry.getDocument().getRootElement() 
389																																																						 titulo = articleXml.selectSingleNode("dynamic-element[@field-reference='Text33341198']").getStringValue() 
390																																																						 titulo = titulo?replace("\n\t\t", "") 
391																																																						 titulo = titulo?replace("\n\t", "")		 
392																																																						 categorias = AssetCategoryLocalService.getCategoryNames("com.liferay.journal.model.JournalArticle", entry.resourcePrimKey)!"" 
393																																																						 />				 
394																																																		<option value="${titulo}" id="${postId}"> 
395																																																			Categorias: ${categorias?join(", ")}		 
396																																																		</#list>  
397																																																</datalist>	 
398																																																<#assign i = i + 1 /> 
399																																																</#list> 
400 
401																																															</div> 
402																																													</div> 
403 
404 
405 
406 
407																																												</div> 
408																																												<div class="importantText"> 
409																																													<p> 
410																																														Importante: O conteúdo enviado passará por um processo interno de 
411																																														aprovação. Só então o conteúdo adicionado aparecerá no portal. 
412																																													</p> 
413																																												</div> 
414																																												<div id="editPostModal-l3${JournalArticleID}" class="editPostModal-l3 modal-footer"> 
415																																													<button class="btn button-empty" id="editPost-saveAndClose${JournalArticleID}"> 
416																																														SALVAR E FECHAR 
417																																													</button> 
418																																												</div> 
419																																												</form> 
420																																											</div> 
421																																									</div> 
422 
423																																									</#if> 
424 
425																																								<script> 
426 
427																																									<#if userIsAdmin> 
428																																										function validImageSize(base64 = "") { 
429																																										const decoded = atob(base64.substring(base64.indexOf(",") + 1)); 
430																																										const sizeMB = decoded.length / 1e6; 
431																																										console.log("MB: " + decoded.length / 1e6); 
432																																										if (sizeMB > 10) { 
433																																											Liferay.Util.openToast({ 
434																																												message: "O tamanho da imagem não deve ultrapassar 10 MB.", 
435																																												type: "danger", 
436																																												title: "", 
437																																												toastProps: { 
438																																													autoClose: 5000 
439
440																																											}); 
441																																											return false; 
442
443																																										return true; 
444
445																																									 
446																																																 
447																																									 
448																																									 
449 
450																																									function editPost${JournalArticleID}() { 
451																																										Liferay.Util.openToast({ 
452																																											message: "Enviando requisição", 
453																																											type: "info", 
454																																											title: "", 
455																																										}); 
456																																										$("#editPost-saveAndClose").prop("disabled", true); 
457																																										 
458																																										var conteudoRelNew = []; 
459																																										var totalLists = document.getElementsByClassName("contRel${JournalArticleID}"); 
460 
461																																										for (var i = 1; i < totalLists.length + 1; i++){ 
462																																											var postSel = document.getElementsByClassName("postName-${JournalArticleID}-" + i)[0]; 
463																																											var valueId = postSel.value; 
464																																											var idPost = document.querySelector("option[value='"+valueId+"']").id; 
465																																											conteudoRelNew.push(idPost);																																										 
466																																										}		 
467																																										 
468																																										 
469																																										const postData = { 
470																																											"titulo": document.getElementById("editPostInputTitle${JournalArticleID}").value, 
471																																											"conteudo": document.getElementById("editPostInputDesc${JournalArticleID}").value, 
472																																											"imagem": document.getElementById("inputPostBase64${JournalArticleID}").value, 
473																																											"link": document.getElementById("postInputLinkMoreInfo${JournalArticleID}").value, 
474																																											"conteudoRelacionado": conteudoRelNew 
475
476																																										 
477																																										fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/postagem/${JournalArticleFrontId}", { 
478																																											method: 'PUT', 
479																																											"headers": { 
480																																												"x-csrf-token": Liferay.authToken, 
481																																												"Content-Type": "application/json" 
482																																											},																																									 
483																																											body: JSON.stringify(postData), 
484 
485																																										}).then((res) => { 
486																																											console.log(res); 
487																																											if (res.status == 200) { 
488																																												Liferay.Util.openToast({ 
489																																													message: 
490																																													"Publicação 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.", 
491																																													type: "success", 
492																																													title: "", 
493																																													toastProps: { 
494																																														autoClose: 5000, 
495
496																																												 
497																																												}); 
498																																												 
499																																												document.getElementById("formularioEditPost${JournalArticleID}").reset(); 
500																																												document.getElementById("imagemCarregadaPost${JournalArticleID}").style.backgroundImage = 
501																																													""; 
502																																												 
503																																											} else { 
504																																												Liferay.Util.openToast({ 
505																																													message: "Erro ao adicionar Artigo", 
506																																													type: "danger", 
507																																													title: "", 
508																																													toastProps: { 
509																																														autoClose: 5000, 
510
511																																												}); 
512
513 
514																																										}); 
515 
516																																										setTimeout(function () { 
517																																											location.reload(); 
518																																										}, 2000); 
519 
520
521 
522																																									 
523																																									function encodeEditImageAsURL${JournalArticleID}() { 
524																																										let file = document.getElementById("inputCarregarImagemPost${JournalArticleID}").files[0]; 
525																																										let reader = new FileReader(); 
526																																										reader.onloadend = () => { 
527																																											if (reader.result) { 
528																																												if (!validImageSize(reader.result)) return; 
529																																												try { 
530																																													const pic_container = document.getElementById("imagemCarregadaPost${JournalArticleID}"); 
531																																													const base64_input = document.getElementById("inputPostBase64${JournalArticleID}"); 
532																																													base64_input.value = reader.result; 
533																																													pic_container.style.backgroundImage = "url(" + reader.result + ")"; 
534 
535																																													const removeImageButton = document.getElementById( 
536																																														"removerImagemPost${JournalArticleID}" 
537																																													); 
538																																													removeImageButton.classList.remove("d-none"); 
539																																												} catch (error) { 
540																																													console.error(error); 
541
542
543																																										}; 
544																																										reader.readAsDataURL(file); 
545
546 
547																																									document 
548																																										.querySelector("#formularioEditPost${JournalArticleID}") 
549																																										.addEventListener("submit", (event) => { 
550																																										event.preventDefault(); 
551																																										editPost${JournalArticleID}(); 
552																																									}); 
553 
554																																									function removeImagemPost${JournalArticleID}() { 
555																																										try { 
556																																											const file_input = document.getElementById("inputCarregarImagemPost${JournalArticleID}"); 
557																																											const pic_container = document.getElementById("imagemCarregadaPost${JournalArticleID}"); 
558																																											const base64_input = document.getElementById("inputPostBase64${JournalArticleID}"); 
559																																											file_input.value = null; 
560																																											base64_input.value = ""; 
561																																											pic_container.style.backgroundImage = null; 
562 
563																																											const removeImageButton = document.getElementById("removerImagemPost${JournalArticleID}"); 
564																																											removeImageButton.classList.add("d-none"); 
565																																										} catch (error) { 
566																																											console.error(error); 
567
568
569 
570																																									document 
571																																										.getElementById("removerImagemPost${JournalArticleID}") 
572																																										.addEventListener("click", removeImagemPost${JournalArticleID}); 
573 
574 
575																																									document 
576																																										.getElementById("inputCarregarImagemPost${JournalArticleID}") 
577																																										.addEventListener("change", encodeEditImageAsURL${JournalArticleID}); 
578 
579 
580																																									function excluirPost${JournalArticleID}() { 
581																																										Liferay.Util.openToast({ 
582																																											message: "Enviando requisição", 
583																																											type: "info", 
584																																											title: "" 
585																																										}); 
586 
587																																										fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/postagem/${JournalArticleFrontId}", { 
588																																											method: 'DELETE', 
589																																											"headers": { 
590																																												"x-csrf-token": Liferay.authToken, 
591																																												"Content-Type": "application/json" 
592
593																																										}) 
594																																											.then(res => { 
595																																											if(res.status == 200) { 
596																																												Liferay.Util.openToast({ 
597																																													message: "Publicação excluida com sucesso", 
598																																													type: "success", 
599																																													title: "", 
600																																													toastProps: { 
601																																														autoClose: 5000 
602
603																																												}) 
604																																												setTimeout(function(){ location.reload(); }, 2000) 
605																																											} else { 
606																																												Liferay.Util.openToast({ 
607																																													message: "Erro ao excluir publicação", 
608																																													type: "danger", 
609																																													title: "", 
610																																													toastProps: { 
611																																														autoClose: 5000 
612
613																																												}) 
614
615																																										}); 
616
617 
618 
619																																									</#if> 
620 
621 
622 
623																																									var button = document.querySelector('[data-target="#collapseID${JournalArticleID}"]'); 
624 
625																																									var chevron = button.querySelector("i.fa-solid"); 
626 
627																																									button.addEventListener("click", function () { 
628																																										if (chevron.classList.contains("fa-chevron-up")) { 
629																																											chevron.classList.remove("fa-chevron-up"); 
630																																											chevron.classList.add("fa-chevron-down"); 
631																																										} else { 
632																																											chevron.classList.remove("fa-chevron-down"); 
633																																											chevron.classList.add("fa-chevron-up"); 
634
635																																									}); 
636 
637 
638 
639 
640																																								</script> 
641 
642 
643 
644 
645																																								</#list> 
646																																							</#if> 
647																																						</div> 
648																																					</div> 
649 
650																																				<style> 
651																																					.bioec_post_img { 
652																																						overflow: hidden; 
653																																						background-size: contain; 
654																																						background-position: center; 
655																																						background-repeat: no-repeat; 
656
657 
658																																					.bioec_post_img_placeholder { 
659																																						width: 140px; 
660																																						height: 140px; 
661																																						background-color: #E8ECEF; 
662																																						display: flex; 
663																																						flex-direction: column; 
664																																						align-items: center; 
665																																						justify-content: center; 
666																																						font-size: 14px; 
667																																						color: #5B5C61; 
668
669 
670																																					.bioec_post_img_placeholder i { 
671																																						font-size: 44px; 
672
673 
674 
675																																					.pagination-items-per-page.active > a,  
676																																					.pagination-items-per-page.active > button,  
677																																					.pagination-items-per-page.show > a,  
678																																					.pagination-items-per-page.show > button, 
679																																					.page-item.active .page-link,  
680																																					.page-item.show .page-link{ 
681																																						border-color: #4ECD66; 
682																																						background-color: #4ECD66; 
683
684 
685																																					.pagination-results, 
686																																					.pagination-items-per-page > a,  
687																																					.pagination-items-per-page > button, 
688																																					.pagination-items-per-page > a:hover,  
689																																					.pagination-items-per-page > button:hover, 
690																																					.page-link{ 
691																																						color: #4ebe66; 
692
693 
694																																					.bioec-profile-post-main{ 
695																																						display: flex; 
696																																						gap: 40px; 
697																																						flex-direction: column; 
698																																						padding-bottom: 20px; 
699
700																																					.bioec-profile-post-main h5{ 
701																																						font-weight: 700; 
702
703																																					.bioec-profile-post-main h5, .bioec-profile-post-main p{ 
704																																						color: #5B5C61; 
705																																						margin-bottom: 0px; 
706																																						font-size: 16px; 
707 
708
709 
710																																					.bioec-profile-post-main #post-lista-container>div{ 
711																																						border: 1px #BEBEBE solid;  
712																																						padding: 24px 24px 0 24px; 
713																																						margin-bottom: 40px; 
714																																						display: grid; 
715																																						grid-row-gap: 24px; 
716																																						grid-template-columns: 24px 12px 1fr 15px; 
717																																						grid-template-areas:  
718																																							"ck . tit arrw" 
719																																							"desc desc desc desc" 
720																																							"clps clps clps clps"; 
721
722 
723																																					.bioec-profile-post-main .lista-checkmark { grid-area: ck; } 
724																																					.bioec-profile-post-main .lista-checkmark i { 
725																																						font-size: 24px; 
726
727 
728																																					.bioec-profile-post-main .lista-pic { grid-area: pic; display: flex; justify-content: center;} 
729																																					.bioec-profile-post-main .lista-arrow { grid-area: arrw; } 
730 
731																																					.bioec-profile-post-main .lista-titulo {  
732																																						grid-area: tit;  
733																																						display: flex;  
734																																						flex-direction: column; 
735																																						justify-content: center; 
736 
737
738 
739																																					.bioec-profile-post-main .lista-titulo h5{ 
740																																						margin-bottom: 0px; 
741																																						font-weight: 400; 
742																																						font-size: 16px; 
743																																						line-height: 150%; 
744																																						text-transform: uppercase; 
745																																					}  
746 
747																																					.bioec-profile-post-main .lista-desc { 
748																																						grid-area: desc;  
749																																						display: flex; 
750																																						align-items: center; 
751																																						gap: 46px; 
752																																					}  
753 
754																																					.bioec-profile-post-main .lista-desc > div { 
755																																						height: 138px; 
756
757 
758																																					.bioec-profile-post-main .lista-desc img { 
759																																						height: 100%; 
760
761 
762																																					.bioec-profile-post-main .lista-desc p { 
763																																						margin: 0; 
764																																						font-weight: 700; 
765																																						font-size: 16px; 
766																																						line-height: 150%; 
767
768 
769																																					.bioec-profile-post-main a{ 
770																																						color: #5B5C61; 
771
772 
773																																					.post-port{ 
774																																						border: 1px #BEBEBE solid;  
775																																						padding: 24px; 
776																																						display: flex; 
777																																						flex-direction: column; 
778																																						align-items: center; 
779																																						gap: 24px; 
780
781 
782																																					.post-port p{ 
783																																						text-align: center;	 
784 
785
786 
787																																					.post-port div{ 
788																																						display: flex; 
789																																						justify-content: space-between; 
790																																						width: min(558px, 100%); 
791
792 
793																																					.button-empty { 
794																																						border: solid 1px #4ECD66; 
795																																						padding: 8px 24px; 
796																																						color: #333244; 
797																																						transition: 250ms; 
798
799 
800																																					.button-empty:hover{ 
801																																						background-color: #4ECD66; 
802
803 
804																																					.button-filled { 
805																																						background-color: #4ECD66; 
806																																						border: solid 1px #4ECD66; 
807																																						padding: 8px 24px; 
808																																						color: #333244; 
809																																						transition: 250ms; 
810 
811
812 
813																																					.button-filled:hover{ 
814																																						background-color: transparent; 
815
816 
817																																					.bioec-profile-post-main .lista-footnote {  
818 
819																																						display: flex; 
820																																						justify-content: space-between; 
821																																						border-top: 1px solid #E8ECEF; 
822																																						padding-top: 12px; 
823																																						font-size: 14px; 
824																																						font-weight: 300; 
825																																						gap: 15px; 
826																																						color: #5B5C61; 
827 
828
829																																					.lista-collapse{ 
830																																						display: flex; 
831																																						flex-direction: column; 
832																																						gap: 24px; 
833																																						grid-area: clps; 
834																																						padding-bottom: 24px; 
835
836 
837																																					.lista-details{ 
838																																						display: flex; 
839																																						justify-content: flex-start; 
840																																						gap: 24px; 
841																																						color: #5B5C61; 
842
843																																					.lista-pic img { 
844																																						max-height: 138px; 
845																																						max-width: 138px; 
846
847 
848																																					.bioec-profile-post-main p{ 
849 
850
851 
852																																					.imagemCarregadaPost { 
853																																						height: 100px; 
854																																						width: 100px; 
855																																						background-size: contain; 
856																																						background-position: center; 
857																																						background-repeat: no-repeat; 
858
859 
860 
861																																					.ButtonAddPost { 
862																																						background: #4ECD66; 
863																																						border-radius: 8px; 
864																																						padding: 8px 24px; 
865																																						border: none; 
866																																						font-weight: 700; 
867																																						color: #333244; 
868																																						font-family: 'Roboto'; 
869																																						float: right; 
870																																						text-transform: uppercase; 
871
872																																					.ButtonAddPost:hover{ 
873																																						color: #333244; 
874																																						text-decoration: none; 
875
876 
877																																					.bioec-profile-post-modal label { 
878																																						margin: 0; 
879																																						cursor: default; 
880																																						font-size: 20px; 
881																																						font-weight: 700; 
882																																						color: #5B5C61; 
883
884 
885																																					.bioec-profile-post-modal div { 
886																																						width: 100%; 
887
888 
889																																					#postModal-l1, .postModal-l1 { 
890																																						padding: 18px 24px; 
891																																						display: flex; 
892																																						justify-content: space-between; 
893
894 
895																																					#postModal-l1 img, .postModal-l1 img { 
896																																						cursor: pointer; 
897
898 
899																																					#postModal-l1 h5, .postModal-l1 h5 { 
900																																						margin: 0; 
901																																						font-size: 20px; 
902																																						font-weight: 700; 
903																																						color: #5B5C61; 
904
905 
906																																					#postModal-l2, .postModal-l2 { 
907																																						border-top: 1px solid #E8ECEF; 
908																																						display: grid; 
909																																						grid-template-columns: 1fr 1fr; 
910																																						grid-template-areas: 
911																																							"titu nome" 
912																																							"fone mail" 
913																																							"desc desc" 
914																																							"imagem ." 
915
916																																						column-gap: 24px; 
917																																						row-gap: 40px; 
918																																						padding: 24px; 
919
920 
921																																					#postModal-l2>div, .postModal-l2>div { 
922																																						display: flex; 
923																																						flex-direction: column; 
924																																						gap: 8px; 
925
926 
927																																					#postTitle, .postTitle { 
928																																						grid-area: titu; 
929
930 
931																																					#postName, .postName { 
932																																						grid-area: nome; 
933
934 
935																																					#postTelephone, .postTelephone { 
936																																						grid-area: fone; 
937
938 
939																																					#postEmail, .postEmail { 
940																																						grid-area: mail; 
941
942 
943																																					#postBrand, .postBrand { 
944																																						grid-area: marca; 
945
946 
947																																					#postModal-l2>#postImg, .editPostModal-l2>.postImg { 
948																																						grid-area: imagem; 
949																																						display: flex; 
950																																						flex-direction: row; 
951
952 
953																																					#postDesc, .postDesc { 
954																																						grid-area: desc; 
955 
956
957 
958																																					#postDesc input, .postDesc input { 
959																																						height: 80px; 
960
961 
962																																					.TextImportant{ 
963																																						border-bottom: 1px solid #E8ECEF; 
964																																						padding: 24px; 
965																																						color: #5B5C61;		 
966
967 
968																																					.bioec-profile-post-modal input[type="text"] { 
969																																						border-top: none; 
970																																						border-left: none; 
971																																						border-right: none; 
972																																						border-bottom: 1px solid #BEBEBE; 
973																																						width: 100%; 
974																																						font-size: 16px; 
975 
976
977 
978 
979																																					.bioec-profile-post-modal input[type="text"]:focus-visible { 
980																																						outline: none; 
981																																						border-bottom: 1px solid black; 
982 
983
984 
985																																					.bioec-profile-post-modal .ReqLabel:before { 
986																																						content: "* "; 
987																																						color: #D90000; 
988 
989
990 
991																																					#inputCarregarImagemPost, .inputCarregarImagemPost { 
992																																						display: none; 
993
994 
995																																					#carregarImagem, .carregarImagem  { 
996																																						padding: 8px 24px; 
997																																						border: 1px solid #4ECD66; 
998																																						width: fit-content; 
999																																						transition: 250ms; 
1000 
1001
1002 
1003																																					#carregarImagem:hover, .carregarImagem:hover { 
1004																																						background-color: #4ECD66; 
1005
1006 
1007																																					.button-empty { 
1008																																						border: solid 1px #4ECD66; 
1009																																						padding: 8px 24px; 
1010																																						color: #333244; 
1011																																						transition: 250ms; 
1012																																						font-weight: bold; 
1013
1014 
1015																																					.button-empty:hover { 
1016																																						background-color: #4ECD66; 
1017
1018 
1019																																					.button-filled { 
1020																																						background-color: #4ECD66; 
1021																																						border: solid 1px #4ECD66; 
1022																																						padding: 8px 24px; 
1023																																						color: #333244; 
1024																																						transition: 250ms; 
1025																																						font-weight: bold; 
1026
1027 
1028																																					.button-filled:hover { 
1029																																						background-color: transparent; 
1030
1031 
1032																																					#postModal-l3, .postModal-l3 { 
1033																																						gap: 24px; 
1034																																						display: flex; 
1035																																						justify-content: flex-end; 
1036																																						padding: 24px; 
1037
1038 
1039																																					.modal { 
1040																																						padding: initial !important; 
1041																																						border-radius: 4px !important; 
1042 
1043
1044 
1045																																					.modal a.close-modal { 
1046																																						display: none; 
1047
1048 
1049																																					#removerImagemPost, .removerImagemPost { 
1050																																						background: none; 
1051																																						border: none; 
1052																																						outline: none; 
1053																																						color: #5B5C61; 
1054																																						font-size: 16px; 
1055																																						font-weight: 900; 
1056																																						line-height: 24px; 
1057																																						letter-spacing: 0em; 
1058																																						width: fit-content; 
1059																																						margin-left: 16px; 
1060
1061 
1062 
1063																																					@media(max-width: 964px){ 
1064																																						.lista-pic img { 
1065																																							width: 100%; 
1066																																							max-height: unset; 
1067																																							max-width: unset; 
1068 
1069
1070
1071 
1072																																					@media (max-width: 550px) { 
1073																																						#postModal-l2, .postModal-l2 { 
1074																																							display: flex; 
1075																																							flex-direction: column; 
1076
1077 
1078																																						#postModal-l3, .postModal-l3 { 
1079																																							display: flex; 
1080																																							flex-direction: column; 
1081
1082
1083 
1084																																					@media(max-width: 450px){ 
1085																																						.bioec-profile-post-main .lista-details{ 
1086																																							flex-direction: column; 
1087
1088 
1089																																						.lista-contato{ 
1090																																							text-align: center; 
1091
1092 
1093																																						.bioec-profile-post-main .lista-footnote{ 
1094																																							flex-direction: column; 
1095																																							gap: 10px; 
1096																																							align-items: flex-end; 
1097																																							text-align: right; 
1098
1099
1100 
1101 
1102 
1103 
1104 
1105																																					.bioec-profile-edit-post-modal label { 
1106																																						margin: 0; 
1107																																						cursor: default; 
1108																																						font-size: 20px; 
1109																																						font-weight: 700; 
1110																																						color: #5b5c61; 
1111
1112 
1113																																					.bioec-profile-edit-post-modal small { 
1114																																						font-weight: 300; 
1115																																						font-size: 14px; 
1116																																						line-height: 150%; 
1117																																						color: #5b5c61; 
1118																																						margin-top: -4px; 
1119
1120 
1121																																					.bioec-profile-edit-post-modal div { 
1122																																						/* width: 100%; */ 
1123
1124 
1125																																					#editPostModal-l1, .editPostModal-l1 { 
1126																																						padding: 18px 24px; 
1127																																						display: flex; 
1128																																						justify-content: space-between; 
1129
1130 
1131																																					#editPostModal-l1 h5, .editPostModal-l1 h5 { 
1132																																						line-height: 150%; 
1133																																						margin: 0; 
1134																																						font-size: 20px; 
1135																																						font-weight: 700; 
1136																																						color: #5b5c61; 
1137
1138 
1139																																					#editPostModal-l2, .editPostModal-l2 { 
1140																																						padding: 24px; 
1141
1142 
1143																																					#editPostModal-l2 > div, .editPostModal-l2 > div { 
1144																																						display: flex; 
1145																																						flex-direction: column; 
1146																																						gap: 8px; 
1147																																						margin-bottom: 40px; 
1148
1149 
1150																																					#editPostModal-l2 > div:last-child, .editPostModal-l2 > div:last-child { 
1151																																						margin-bottom: -4px; 
1152
1153 
1154																																					#editPostModal-l2 > #editPostImg, .editPostModal-l2 > .editPostImg { 
1155																																						/* grid-area: imagem; */ 
1156																																						display: flex; 
1157																																						flex-direction: row; 
1158
1159 
1160																																					.importantText { 
1161																																						padding: 24px; 
1162																																						color: #5b5c61; 
1163
1164 
1165																																					.importantText p { 
1166																																						margin-bottom: 0; 
1167
1168 
1169																																					.bioec-profile-edit-post-modal input[type="text"] { 
1170																																						border-top: none; 
1171																																						border-left: none; 
1172																																						border-right: none; 
1173																																						border-bottom: 1px solid #bebebe; 
1174																																						width: 100%; 
1175																																						font-size: 16px; 
1176
1177 
1178 
1179																																					.bioec-profile-edit-post-modal 
1180																																					input[type="text"]:focus-visible { 
1181																																						outline: none; 
1182																																						border-bottom: 1px solid black; 
1183
1184 
1185																																					.bioec-profile-edit-post-modal .reqLabel:before { 
1186																																						content: "* "; 
1187																																						color: #d90000; 
1188
1189 
1190																																					#imagemCarregadaPost, .imagemCarregadaPost { 
1191																																						height: 110px; 
1192																																						width: 110px; 
1193																																						margin-left: 3rem; 
1194																																						background-size: contain; 
1195																																						background-position: center; 
1196																																						background-repeat: no-repeat; 
1197
1198 
1199																																					#removerImagemPost, .removerImagemPost { 
1200																																						background: none; 
1201																																						cursor: pointer; 
1202																																						border: none; 
1203																																						outline: none; 
1204																																						color: #5b5c61; 
1205																																						font-size: 16px; 
1206																																						font-weight: 900; 
1207																																						line-height: 24px; 
1208																																						letter-spacing: 0em; 
1209																																						width: fit-content; 
1210																																						margin-left: 16px; 
1211
1212 
1213																																					#inputCarregarImagemPost, .inputCarregarImagemPost { 
1214																																						display: none; 
1215
1216 
1217																																					#carregarImagemPost, .carregarImagemPost { 
1218																																						padding: 8px 24px; 
1219																																						border: 1px solid #4ecd66; 
1220																																						width: fit-content; 
1221																																						transition: 250ms; 
1222																																						border-radius: 8px; 
1223
1224 
1225																																					#carregarImagemPost:hover, .carregarImagemPost:hover { 
1226																																						background-color: #4ecd66; 
1227
1228 
1229																																					.button-empty { 
1230																																						border: solid 1px #4ecd66; 
1231																																						padding: 8px 24px; 
1232																																						color: #333244; 
1233																																						transition: 250ms; 
1234																																						font-weight: bold; 
1235
1236 
1237																																					.button-empty:hover { 
1238																																						background-color: #4ecd66; 
1239
1240 
1241																																					.button-filled { 
1242																																						background-color: #4ecd66; 
1243																																						border: solid 1px #4ecd66; 
1244																																						padding: 8px 24px; 
1245																																						color: #333244; 
1246																																						transition: 250ms; 
1247																																						font-weight: bold; 
1248
1249 
1250																																					.button-filled:hover { 
1251																																						background-color: transparent; 
1252
1253 
1254																																					#editPostModal-l3, .editPostModal-l3 { 
1255																																						gap: 24px; 
1256																																						display: flex; 
1257																																						justify-content: flex-end; 
1258																																						padding: 15px; 
1259
1260 
1261																																					#editPostModal-l3 button, .editPostModal-l3 button { 
1262																																						text-transform: uppercase; 
1263																																						border-radius: 8px; 
1264
1265 
1266																																					@media (max-width: 550px) { 
1267																																						#editPostModal-l2, .editPostModal-l2  { 
1268																																							display: flex; 
1269																																							flex-direction: column; 
1270
1271 
1272																																						#editPostModal-l3, .editPostModal-l3 { 
1273																																							display: flex; 
1274																																							flex-direction: column; 
1275
1276
1277 
1278																																					/* .modal { 
1279																																					padding: initial !important; 
1280																																					border-radius: 4px !important; 
1281																																					height: initial !important; 
1282
1283 
1284																																					.modal a.close-modal { 
1285																																					display: none; 
1286																																					} */ 
1287 
1288																																					/* final */ 
1289																																					.bioec-profile-post-main .lista-footnote .buttonsActions { 
1290																																						display: flex; 
1291																																						gap: 17px; 
1292
1293 
1294																																					@media (max-width: 992px) { 
1295																																						#post-lista-container { 
1296																																							padding-inline: 15px; 
1297
1298
1299 
1300																																					@media (max-width: 768px) { 
1301																																						.bioec-profile-post-main .lista-desc { 
1302																																							gap: 24px; 
1303																																							flex-direction: column-reverse; 
1304
1305																																						.bioec-profile-post-main .lista-footnote { 
1306																																							flex-direction: column; 
1307																																							align-items: center; 
1308
1309																																						.bioec-profile-post-main .lista-footnote > div { 
1310																																							text-align: center; 
1311
1312																																						.bioec-profile-post-main .lista-footnote .post-type, 
1313																																						.bioec-profile-post-main .lista-footnote .barra-pipe { 
1314																																							display: none; 
1315
1316																																						.bioec-profile-post-main .lista-footnote .lista-author { 
1317																																							display: flex; 
1318																																							gap: 4px; 
1319																																							justify-content: center; 
1320
1321																																						.bioec-profile-post-main .lista-footnote .buttonsActions { 
1322																																							width: 100%; 
1323																																							justify-content: space-between; 
1324
1325
1326 
1327 
1328																																				</style> 
  • Sobre
  • Infraestruturas
  • Demandas
  • Ofertas
  • Publicações
Sort
Category
Tag