aaaaaaaaaaaaaaaaaaaaaaaaaaa
Organização
aaaaaaaaaaaaaaaaaaaaaaaaaaa
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: organization = OrganizationLocalServi... [in template "34764#34807#null" at line 14, column 17] ----
1<#assign
2 OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService")
3/>
4
5<#assign
6 viewerHasPrivileges = false
7 userId = themeDisplay.getUserId()
8/>
9
10<#if userId?? && _CUSTOM_FIELD_organization.getData()?? && _CUSTOM_FIELD_organization.getData() !="" >
11 <#assign
12 orgId = _CUSTOM_FIELD_organization.getData()?number
13 viewerHasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId)
14 organization = OrganizationLocalService.getOrganization(orgId)
15 />
16</#if>
17
18<#assign
19 nome = organization.getName()!""
20 imagem = (viewerHasPrivileges || DDMStructure_Field84114755.getData()!="0")?string(DDMStructure_CampoDeTexto18329557.getData()!"","")
21 tipo = (viewerHasPrivileges || DDMStructure_Numrico28474992.getData()!="0")?string(DDMStructure_Text61401294.getData()!"","")
22 tipo = tipo?replace("\n", "")
23 tipo = tipo?replace("\t", "")
24 tipo = tipo?replace("\r", "")
25 pais = (viewerHasPrivileges || DDMStructure_Field45654872.getData()!="0")?string(DDMStructure_Text47038833.getData()!"","")
26 cidade = (viewerHasPrivileges || DDMStructure_Field81614178.getData()!="0")?string(DDMStructure_Text38119908.getData()!"","")
27 estado = (viewerHasPrivileges || DDMStructure_Field89862022.getData()!="0")?string(DDMStructure_Text87845472.getData()!"","")!""
28
29 site = (viewerHasPrivileges || DDMStructure_Field62760436.getData()!="0")?string(DDMStructure_Text98734375.getData()!"","")
30 instagram = ""
31 linkedin = (viewerHasPrivileges || DDMStructure_Field18557678.getData()!="0")?string(DDMStructure_Text82629110.getData()!"","")
32 facebook = ""
33
34 sobre = (DDMStructure_Field80037203.getData()!="0")?string(DDMStructure_Text54730891.getData()!"","")
35 competencias = (DDMStructure_Numrico42321087.getData()!="0")?string(DDMStructure_Text51537691.getData()!"","")
36 setores = (DDMStructure_Field04200031.getData()!="0")?string("yes","")
37
38 instituicao = (viewerHasPrivileges || DDMStructure_Numrico42321087.getData()!="0")?string(DDMStructure_Text31001996.getData()!"","")
39 tipoDeEntidade = (viewerHasPrivileges || DDMStructure_Numrico28474992.getData()!="0")?string(DDMStructure_Text53411607.getData()!"","")
40
41
42>
43
44<div class="bioec_org_info_container">
45
46 <#if viewerHasPrivileges>
47 <!--<div class="botoesSidebarMobile mb-5">
48 <button class="bioec_secondary_button" data-toggle="modal" data-target="#bioec-org-delete-modal">
49 EXCLUIR ORGANIZAÇÃO
50 </button>
51 <button class="bioec_primary_button" data-toggle="modal" data-target="#bioec-org-edit-modal">
52 EDITAR
53 </button>
54 </div> -->
55 </#if>
56
57 <div id="profilePic">
58 <#if imagem?trim == "">
59 <div class="profilePic-container">
60 <i class="fa fa-user"></i>
61 <a id="btnEditOrgModal" type="button" data-toggle="modal" data-target="#bioec-org-edit-modal">
62 <i class="fa fa-edit"></i>
63 </a>
64 </div>
65 <#else>
66 <div id="ProfilePic_Frame">
67 <img src="${imagem}" />
68 <a id="btnEditOrgModal" type="button" data-toggle="modal" data-target="#bioec-org-edit-modal">
69 <i class="fa fa-edit"></i>
70 </a>
71 </div>
72 </#if>
73
74 </div>
75
76 <#if nome!="">
77 <label class="bioec_org_info_label">Nome da Organização</label>
78 <div class="bioec_org_info_content">${nome}</div>
79 </#if>
80
81 <#if tipo!="">
82 <label class="bioec_org_info_label">Tipo de Organização</label>
83 <div class="bioec_org_info_content">${tipo}</div>
84 </#if>
85
86 <#if instituicao!="" && tipo == "Grupo de Pesquisa/Universidade">
87 <label class="bioec_org_info_label">Instituição</label>
88 <div class="bioec_org_info_content">${instituicao}</div>
89 </#if>
90
91 <#if tipoDeEntidade!="" && tipo == "Investidor/Agência de Fomento">
92 <label class="bioec_org_info_label">Tipo de Entidade</label>
93 <div class="bioec_org_info_content">${tipoDeEntidade}</div>
94 </#if>
95
96 <#if cidade!="">
97 <label class="bioec_org_info_label">Cidade</label>
98 <div class="bioec_org_info_content">${cidade}</div>
99 </#if>
100
101 <#if estado!="">
102 <label class="bioec_org_info_label">Estado</label>
103 <div class="bioec_org_info_content">${estado}</div>
104 </#if>
105
106 <#if pais!="">
107 <label class="bioec_org_info_label">País</label>
108 <div class="bioec_org_info_content">${pais}</div>
109 </#if>
110
111 <div class="bioec_org_info_social_container">
112 <#if site != "">
113 <a href="${site}" target="_blank" rel="noopener noreferrer">
114 <i class="fa-solid fa-laptop"></i>
115 </a>
116 </#if>
117
118 <#if instagram != "">
119 <a href="${instagram}" target="_blank" rel="noopener noreferrer">
120 <i class="fa-brands fa-instagram"></i>
121 </a>
122 </#if>
123
124 <#if linkedin != "">
125 <a href="${linkedin}" target="_blank" rel="noopener noreferrer">
126 <i class="fa-brands fa-linkedin-in"></i>
127 </a>
128 </#if>
129
130 <#if facebook != "">
131 <a href="${facebook}" target="_blank" rel="noopener noreferrer">
132 <i class="fa-brands fa-facebook"></i>
133 </a>
134 </#if>
135
136 </div>
137
138 <#if false && viewerHasPrivileges>
139 <button data-toggle="modal" data-target="#privacyModal" class="bioec_primary_button">
140 CONFIGURAÇÕES DE PRIVACIDADE
141 </button>
142 </#if>
143</div>
144
145<style>
146.bioec_org_info_container {
147 display: flex;
148 flex-direction: column;
149 background-color: #E8ECEF;
150 height: 100%;
151 padding: 40px 24px 40px 0;
152}
153
154.bioec_org_info_img_placeholder {
155 align-self: center;
156 height: 120px;
157 width: 120px;
158 background-color: #595A5F;
159 border-radius: 50%;
160 display: flex;
161 align-items: center;
162 justify-content: center;
163 color: var(--white-1);
164 font-size: 72px;
165 cursor: default;
166}
167
168.bioec_org_info_label {
169 display: block;
170 font-weight: 700;
171 font-size: 20px;
172 line-height: 150%;
173 color: #5B5C61;
174 margin-bottom: 8px;
175 margin-top: 24px;
176 cursor: text;
177}
178
179.bioec_org_info_content {
180 display: block;
181 font-weight: 400;
182 font-size: 16px;
183 line-height: 150%;
184 color: #5B5C61;
185 border-bottom: 1px solid #BEBEBE;
186 padding-bottom: 4px;
187}
188
189.bioec_org_info_social_container {
190 display: flex;
191 flex-direction: row;
192 align-items: center;
193 justify-content: center;
194 margin: 40px 0;
195}
196
197.bioec_org_info_social_container a {
198 font-size: 35px;
199 color: #5B5C61;
200 margin: 0 15px;
201}
202
203.botoesSidebarMobile{
204display: none;
205justify-content: flex-end;
206gap: 20px;
207}
208#profilePic {
209 display: flex;
210 justify-content: center;
211 width: 120px;
212 height: 120px;
213 margin: auto;
214 position: relative;
215}
216
217#profilePic a:hover {
218 text-decoration: none;
219}
220
221#profilePic a#btnEditOrgModal {
222 text-decoration: none;
223 position: absolute;
224 right: 0;
225 bottom: 0;
226 color: var(--white);
227 background-color: var(--color-3);
228 height: 40px;
229 width: 40px;
230 border-radius: 50%;
231 border: none;
232 outline: none;
233 display: flex;
234 align-items: center;
235 justify-content: center;
236 padding: 0;
237 font-size: 18px;
238
239}
240
241#ProfilePic_Frame {
242 border-radius: 50%;
243 width: 100%;
244 height: 100%;
245 overflow: hidden;
246}
247 #ProfilePic_Frame img {
248 width: 100%;
249 height: 100%;
250 object-fit: cover;
251}
252
253.profilePic-container {
254 color: #FFF;
255 background-color: #595A5F;
256 border-radius: 50%;
257 position: relative;
258 display: flex;
259 align-items: center;
260 justify-content: center;
261 padding: 35px;
262 width: 100%;
263 height: 100%;
264 font-size: 70px;
265}
266
267
268@media (max-width: 1200px) {
269 .bioec_org_info_container {
270 padding: 40px 24px;
271 }
272}
273
274@media (max-width: 994px) {
275.botoesSidebarMobile{
276display: flex;
277}
278}
279</style>
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: organization = OrganizationLocalServi... [in template "34764#34807#null" at line 20, column 17] ----
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 hasPrivileges = false
8 userId = themeDisplay.getUserId()
9/>
10
11<#assign
12 orgTypes = ["Entidade Governamental","Associação","Outras ICT's","Comunidade Tradicional/Cooperativa","Startup",
13 "Entidade do Terceiro Setor","Investidor/Agência de Fomento","Grupo de Pesquisa/Universidade","Empresa"]
14/>
15
16<#if userId?? && _CUSTOM_FIELD_organization.getData()?? && _CUSTOM_FIELD_organization.getData() !="" >
17<#assign
18 orgId = _CUSTOM_FIELD_organization.getData()?number
19 hasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId)
20 organization = OrganizationLocalService.getOrganization(orgId)
21/>
22</#if>
23
24<#if hasPrivileges>
25 <#assign
26 organization = OrganizationLocalService.getOrganization(_CUSTOM_FIELD_organization.getData()?number)
27 articleId = organization.getExpandoBridge().getAttribute("journal-article")
28 journalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),articleId?c)
29 articleXml = journalArticle.getDocument().getRootElement()
30
31 setoresXml = articleXml.selectNodes("dynamic-element[@name='Text40807358']")
32 setores = ""
33 />
34 <#list setoresXml as setor>
35 <#assign setores = setores + "'" + setor.getStringValue()?trim + "'," >
36 </#list>
37
38 <button class="bioec_secondary_button mx-3" data-toggle="modal" style="display: flex;margin-left: auto !important;margin-right: auto !important;margin-top: 24px;" data-target="#bioec-org-delete-modal">EXCLUIR ORGANIZAÇÃO</button>
39 <!-- <div class="mt-4 d-md-flex d-none align-items-center justify-content-end">
40 <button class="bioec_primary_button bioec_editar" data-toggle="modal" data-target="#bioec-org-edit-modal">EDITAR</button>
41 </div> -->
42
43 <#-- MODAL DE EXLUIR ORGANIZAÇÃO -->
44 <div id="bioec-org-delete-modal" class="modal fade" style="display: none;" role="dialog" aria-hidden="true">
45 <div class="modal-dialog" role="document">
46 <div class="modal-content px-4 py-3">
47 <div class="modal-header">
48 <h5 class="modal-title">Excluir organização</h5>
49 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
50 <span aria-hidden="true">×</span>
51 </button>
52 </div>
53 <div class="d-flex justify-content-end py-3">
54 <button type="button" class="bioec_secondary_button mx-3" data-dismiss="modal">CANCELAR</button>
55 <button type="button" class="bioec_primary_button" onclick="deleteOrg()" >CONTINUAR</button>
56 </div>
57 </div>
58 </div>
59 </div>
60
61
62
63 <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
64 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
65 <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
66 <link
67 rel="stylesheet"
68 href="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.5/croppie.min.css"
69 integrity="sha512-zxBiDORGDEAYDdKLuYU9X/JaJo/DPzE42UubfBw9yg8Qvb2YRRIQ8v4KsGHOx2H1/+sdSXyXxLXv5r7tHc9ygg=="
70 crossorigin="anonymous"
71 referrerpolicy="no-referrer"
72 />
73
74 <script
75 src="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.5/croppie.min.js"
76 integrity="sha512-Gs+PsXsGkmr+15rqObPJbenQ2wB3qYvTHuJO6YJzPe/dTLvhy0fmae2BcnaozxDo5iaF8emzmCZWbQ1XXiX2Ig=="
77 crossorigin="anonymous"
78 referrerpolicy="no-referrer"
79 ></script>
80
81
82<style>
83
84 .bioec_profile-form h1 {
85 font-weight: 400;
86 font-size: 39px;
87 line-height: 150%;
88 color: #5B5C61;
89 }
90
91 .bioec_profile-form-control {
92 margin-bottom: 40px;
93 }
94
95 .bioec_profile-form-control label {
96 color: #5B5C61;
97 font-size: 20px;
98 font-weight: 700;
99 line-height: 30px;
100 margin-bottom: 8px;
101 }
102
103 .bioec_profile-form-control label[required]::before {
104 content: "*";
105 color: #ff0000;
106 margin-right: 0.4rem;
107 }
108
109 .bioec_profile-form-control input,
110 .bioec_profile-form-control select {
111 border-radius: 0;
112 outline: none;
113 border: none;
114 border-bottom: 1px solid #BEBEBE;
115 font-size: 16px;
116 font-weight: 400;
117 line-height: 24px;
118 color: #5B5C61;
119 width: 100%;
120 background-color: transparent;
121 padding: 2px;
122 margin: 0;
123 }
124
125 .submit-attempted .bioec_profile-form-control input:invalid,
126 .submit-attempted .bioec_profile-form-control select:invalid {
127 border-bottom: 1px solid #ff0000;
128 }
129
130 .bioec_profile-flex-container {
131 display: flex;
132 flex-direction: row;
133 justify-content: space-between;
134 flex-wrap: wrap;
135 }
136
137 .bioec_profile-flex-container .bioec_profile-form-control {
138 width: 50%;
139 padding-right: 1.5rem;
140 }
141
142 .bioec_profile-form-control textarea {
143 font-size: 16px;
144 font-weight: 400;
145 line-height: 24px;
146 color: #5B5C61;
147 width: 100%;
148 background-color: transparent;
149 border-radius: 0;
150 border: 1px solid #BEBEBE;
151 resize: none;
152 outline: none;
153 margin-top: 24px;
154 }
155
156 .modal-header h1{
157 color: #5B5C61;
158 margin-bottom: 0px;
159 font-size: 25px;
160 line-height: 58.5px;
161 font-weight: 400;
162 }
163
164 @media (max-width: 768px) {
165 .bioec_profile-flex-container .bioec_profile-form-control {
166 margin-bottom: 1.5rem;
167 width: 100%;
168 padding-right: 0rem;
169 }
170 }
171</style>
172
173<script>
174
175function deleteOrg() {
176 Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""});
177 fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}",
178 {
179 method: "DELETE",
180 headers: {
181 "x-csrf-token": Liferay.authToken,
182 "Content-Type": "application/json",
183 "Accept": "application/json"
184 }
185 })
186 .then( Liferay.Util.openToast({
187 message: "Estamos processando seu arquivo. Favor aguarde por alguns segundos e redireciorameos você automaticamente.",
188 type: "success",
189 title: "",
190 toastProps: {
191 autoClose: 2000
192 }
193 }))
194 .then(setTimeout(() => { window.location.href = Liferay.ThemeDisplay.getPortalURL() + "/meu-perfil#deleteOrg" }, 2000))
195
196
197
198}
199
200
201
202</script>
203
204</#if>
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: organization = OrganizationLocalServi... [in template "34764#34807#null" at line 20, column 17] ----
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 hasPrivileges = false
8 userId = themeDisplay.getUserId()
9/>
10
11<#assign
12 orgTypes = ["Entidade Governamental","Associação","Outras ICT's","Comunidade Tradicional/Cooperativa","Startup",
13 "Entidade do Terceiro Setor","Investidor/Agência de Fomento","Grupo de Pesquisa/Universidade","Empresa"]
14/>
15
16<#if userId?? && _CUSTOM_FIELD_organization.getData()?? && _CUSTOM_FIELD_organization.getData() !="" >
17<#assign
18 orgId = _CUSTOM_FIELD_organization.getData()?number
19 hasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId)
20 organization = OrganizationLocalService.getOrganization(orgId)
21/>
22</#if>
23
24<#if hasPrivileges && _CUSTOM_FIELD_organization.getData()?? && _CUSTOM_FIELD_organization.getData() !="">
25 <#assign
26 organization = OrganizationLocalService.getOrganization(_CUSTOM_FIELD_organization.getData()?number)
27 articleId = organization.getExpandoBridge().getAttribute("journal-article")
28 journalArticle = JournalArticleLocalService.getArticle(themeDisplay.getLayout().getGroupId(),articleId?c)
29 articleXml = journalArticle.getDocument().getRootElement()
30
31 setoresXml = articleXml.selectNodes("dynamic-element[@name='Text40807358']")
32 setores = ""
33 />
34 <#list setoresXml as setor>
35 <#assign setores = setores + "'" + setor.getStringValue()?trim + "'," >
36 </#list>
37
38 <div class="mt-4 d-md-flex d-none align-items-center justify-content-end" style="display:none!important;" >
39 <button class="bioec_secondary_button mx-3" data-toggle="modal" data-target="#bioec-org-delete-modal" >EXCLUIR ORGANIZAÇÃO</button>
40 <button class="bioec_primary_button bioec_editar" data-toggle="modal" data-target="#bioec-org-edit-modal" >EDITAR</button>
41 </div>
42
43
44
45
46
47 <#-- MODAL DE EXLUIR ORGANIZAÇÃO -->
48 <div id="bioec-org-delete-modal" class="modal fade" style="display: none;" role="dialog" aria-hidden="true">
49 <div class="modal-dialog" role="document">
50 <div class="modal-content px-4 py-3">
51 <div class="modal-header">
52 <h5 class="modal-title">Excluir organização</h5>
53 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
54 <span aria-hidden="true">×</span>
55 </button>
56 </div>
57 <div class="d-flex justify-content-end py-3">
58 <button type="button" class="bioec_secondary_button mx-3" data-dismiss="modal">CANCELAR</button>
59 <button type="button" class="bioec_primary_button" onclick="deleteOrg()" >CONTINUAR</button>
60 </div>
61 </div>
62 </div>
63 </div>
64
65 <#-- MODAL DE EDIÇÃO -->
66 <div id="bioec-org-edit-modal" class="modal fade" style="display: none;" tabindex="-1" role="dialog" aria-hidden="true">
67 <div class="modal-dialog modal-lg" role="document">
68 <div class="modal-content px-4 py-3">
69
70 <div class="modal-header">
71 <h1>Sobre a organização</h1>
72 <button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="closeAndReset()">
73 <span aria-hidden="true">×</span>
74 </button>
75 </div>
76
77 <div class="modal-body">
78 <form id="organization-form" class="bioec_profile-form">
79<#assign imagemOrg = DDMStructure_CampoDeTexto18329557.getData() >
80
81 <div class="d-flex justify-content-center my-5" style="
82 flex-direction: column;
83 align-items: center;
84 ">
85 <div id="orgPicContainer" class="bioec_form-picture-container" ${(imagemOrg != "")?string("style='background-image: url("+ imagemOrg +")'","")} >
86 <i id="user-icon" class="fa fa-user"></i>
87 <button type="button" onclick="openFileSelectImagem()">
88 <i class="fa fa-edit"></i>
89 </button>
90 </div>
91 <input name="imagem" id="file-input" class="d-none" type="file" onchange="encodeImageAsURL(this)" accept="image/*"/>
92 <input class="d-none" id="inputOrgBase64OrgModal" />
93 <button type="button" onclick="removeImageOrgModal(this)" id="removerImagemOrgModal" ${(imagemOrg != "")?string("", "class='d-none'")}>
94 <i class="fa fa-trash"></i> Remover imagem
95 </button>
96 </div>
97
98 <div class="bioec_profile-flex-container">
99 <div class="bioec_profile-form-control">
100 <label required>Tipo de Organização</label>
101 <select id="tipo-de-organizacao" name="tipo" required title="Selecionar" value="${DDMStructure_Text61401294.getData()}">
102 <option value="" disabled selected>Selecionar</option>
103 <#list orgTypes as type>
104 <option value="${type}" ${(type==DDMStructure_Text61401294.getData())?string("selected","")} >${type}</option>
105 </#list>
106 </select>
107 </div>
108
109 <div class="bioec_profile-form-control">
110 <div id="org-tipo-6" class="d-none">
111 <label>Tipo de entidade</label>
112 <input name="investimento" type="text" id="tipodeentidadeOrganizacao" value="${DDMStructure_Text53411607.getData()}" />
113 </div>
114 <div id="org-tipo-7" class="d-none">
115 <label>Instituição</label>
116 <input name="instituicao" type="text" id="instituicaoOrganizacao" value="${DDMStructure_Text31001996.getData()}" />
117 </div>
118 </div>
119
120 <div class="bioec_profile-form-control">
121 <label required for="nomeOrganizacao">Nome da Organização</label>
122 <input id="nomeOrganizacao" name="nome" type="text" required value="${organization.getName()}" />
123 </div>
124
125 <div class="bioec_profile-form-control">
126 <label for="cidadeOrganizacao">Cidade</label>
127 <input id="cidadeOrganizacao" name="cidade" type="text" value="${DDMStructure_Text38119908.getData()}" />
128 </div>
129
130 <div class="bioec_profile-form-control">
131 <label for="estadoOrganizacao">Estado</label>
132 <input id="estadoOrganizacao" name="estado" type="text" value="${DDMStructure_Text87845472.getData()}" />
133 </div>
134
135
136 <div class="bioec_profile-form-control">
137 <label for="paisOrganizacao">País</label>
138 <input id="paisOrganizacao" name="pais" type="text" value="${DDMStructure_Text47038833.getData()}" />
139 </div>
140
141 </div>
142
143 <h1 class="my-5">Informações digitais</h1>
144
145 <div class="bioec_profile-flex-container">
146 <div class="bioec_profile-form-control">
147 <label for="siteOrganizacao">Site</label>
148 <input id="siteOrganizacao" name="site" type="url" value="${DDMStructure_Text98734375.getData()}" />
149 </div>
150 <div class="bioec_profile-form-control">
151 <label for="linkedinOrganizacao">Linkedin</label>
152 <input id="linkedinOrganizacao" name="linkedin" type="url" value="${DDMStructure_Text82629110.getData()}" />
153 </div>
154 <#-- <div class="bioec_profile-form-control">
155 <label>Instagram</label>
156 <input name="instagram" type="url" value="${Text28208517.getData()}" />
157 </div>
158 <div class="bioec_profile-form-control">
159 <label>Facebook</label>
160 <input name="facebook" type="url" value="${Text71851201.getData()}" />
161 </div> -->
162 </div>
163
164 <h1 class="my-5">Campo de atuação</h1>
165
166 <div>
167 <div class="bioec_profile-form-control">
168 <label required for="sobreOrganizacao">Sobre a organização</label>
169 <textarea id="sobreOrganizacao" name="sobre" rows="5" >${DDMStructure_Text54730891.getData()}</textarea>
170 </div>
171
172 <div class="bioec_profile-form-control">
173 <label required for="competenciasOrganizacao">Competências tecnológicas</label>
174 <textarea id="competenciasOrganizacao" name="competencias" rows="5" >${DDMStructure_Text51537691.getData()}</textarea>
175 </div>
176
177 <div class="bioec_profile-form-control">
178 <label required>Setores de atuação</label>
179 <select id="setores-de-atuacao" name="setores" multiple="multiple" style="width: 100%">
180 <option value="Agroindústria">Agroindústria</option>
181 <option value="Água Potável e Saneamento">Água Potável e Saneamento</option>
182 <option value="Alimentos e Bebidas">Alimentos e Bebidas</option>
183 <option value="Análise de Ciclo de Vida">Análise de Ciclo de Vida</option>
184 <option value="Biotecnologia">Biotecnologia</option>
185 <option value="Educação">Educação</option>
186 <option value="Energia e Biocombustíveis">Energia e Biocombustíveis</option>
187 <option value="Higiene Pessoal, Perfumaria e Cosméticos">Higiene Pessoal, Perfumaria e Cosméticos</option>
188 <option value="Inovação">Inovação</option>
189 </select>
190 </div>
191
192 <!-- <h1 class="mt-5 mb-4">Você na organização</h1>
193
194 <div class="bioec_profile-flex-container">
195 <div class="bioec_profile-form-control">
196 <label>Cargo/Função</label>
197 <input name="cargo" type="text" value="Administrador" />
198 </div>
199 </div> -->
200
201 </div>
202
203 <div class="d-flex justify-content-center my-5">
204 <button type="button" data-dismiss="modal" class="bioec_secondary_button mx-3" onclick="closeAndReset()">CANCELAR</a>
205 <button type="button" class="bioec_primary_button mx-3" onclick="submitOrganization()">SALVAR</button>
206 </div>
207
208 </form>
209 </div>
210 </div>
211 </div>
212 </div>
213
214 <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
215 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
216 <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
217
218<script>
219
220
221function toggleSpecialFields(value) {
222 if(value == "Investidor/Agência de Fomento") {
223 $("#org-tipo-6").removeClass("d-none")
224 $("#org-tipo-7").addClass("d-none")
225 } else if(value == "Grupo de Pesquisa/Universidade") {
226 $("#org-tipo-7").removeClass("d-none")
227 $("#org-tipo-6").addClass("d-none")
228 } else {
229 $("#org-tipo-6").addClass("d-none")
230 $("#org-tipo-7").addClass("d-none")
231 }
232}
233
234$("#tipo-de-organizacao").change((obj) => {
235 const v = obj.target.value
236 toggleSpecialFields(v)
237});
238
239toggleSpecialFields(document.getElementById("tipo-de-organizacao").value)
240
241$(document).ready(() => {
242 $("#setores-de-atuacao").select2({
243 language: {
244 noResults: () => "Nenhum resultado encontrado",
245 },
246 selectionCssClass: "bioec_multi_select",
247 });
248 $("#setores-de-atuacao").val([${setores}]);
249 $("#setores-de-atuacao").trigger('change');
250
251 let urlSearchParams = new URLSearchParams(window.location.search);
252
253 if( urlSearchParams.has('popup_editar') == 1){
254 $('.bioec_editar').click();
255 urlSearchParams.delete('popup_editar');
256 if (history.replaceState) {
257 let searchString = urlSearchParams.toString().length > 0 ? '?' + urlSearchParams.toString() : '';
258 let newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + searchString + window.location.hash;
259 history.replaceState(null, '', newUrl);
260 }
261 }
262});
263
264function validImageSize(base64="") {
265 const decoded = atob(base64.substring(base64.indexOf(',') + 1));
266 const sizeMB = decoded.length / 1e+6;
267 console.log("MB: " + decoded.length / 1e+6);
268 if(sizeMB > 10) {
269 Liferay.Util.openToast({
270 message: "O tamanho da imagem não deve ultrapassar 10 MB.",
271 type: "danger",
272 title: "",
273 toastProps: {
274 autoClose: 5000
275 }
276 })
277 return false
278 }
279 return true
280}
281
282 function encodeImageAsURL(element) {
283 let file = element.files[0];
284 let reader = new FileReader();
285 reader.onloadend = () => {
286 if(reader.result) {
287 if(!validImageSize(reader.result)) return;
288 try {
289 console.log("hi!")
290 const pic_container = document.getElementById("orgPicContainer")
291 const base64_input = document.getElementById("inputOrgBase64OrgModal")
292 base64_input.value = reader.result
293 pic_container.style.backgroundImage = 'url(' + reader.result + ')'
294 const removeImageButton = document.getElementById(
295 "removerImagemOrgModal"
296 );
297 const user_icon = document.getElementById("user-icon")
298 user_icon.style.display = "none";
299 removeImageButton.classList.remove("d-none");
300 } catch (error) {
301 console.error(error)
302 }
303 }
304 }
305 reader.readAsDataURL(file);
306 }
307
308 function removeImageOrgModal(element) {
309 try {
310 const file_input = document.getElementById("file-input");
311 const pic_container = document.getElementById("orgPicContainer")
312 const base64_input = document.getElementById("inputOrgBase64OrgModal");
313
314 file_input.value = null;
315 base64_input.value = "";
316 pic_container.style.backgroundImage = null;
317
318 const user_icon = document.getElementById("user-icon")
319 user_icon.style.display = "block";
320
321 const removeImageButton = document.getElementById("removerImagemOrgModal");
322 removeImageButton.classList.add("d-none");
323 } catch (error) {
324 console.error(error);
325 }
326 }
327
328function openFileSelectImagem() {
329 document.getElementById("file-input").click();
330}
331
332function initUrl(input, defaulthost) {
333 const value = input.value;
334 if(!value) {
335 input.value = defaulthost;
336 }
337}
338
339function submitForm() {
340console.log("Tentativa de envio")
341const form = document.getElementById("organization-form")
342form.classList.add("submit-attempted")
343}
344
345function closeAndReset() {
346 document.getElementById("organization-form").reset();
347}
348
349</script>
350
351<style>
352
353 .bioec_profile-form #removerImagemOrgModal {
354 background: none;
355 cursor: pointer;
356 border: none;
357 outline: none;
358 color: #5b5c61;
359 font-size: 16px;
360 font-weight: 900;
361 line-height: 24px;
362 letter-spacing: 0em;
363 width: fit-content;
364 margin-left: 16px;
365 margin-top: 22px;
366 }
367
368
369 .bioec_profile-form h1 {
370 font-weight: 400;
371 font-size: 39px;
372 line-height: 150%;
373 color: #5B5C61;
374 }
375
376 .bioec_profile-form-control {
377 margin-bottom: 40px;
378 }
379
380 .bioec_profile-form-control label {
381 color: #5B5C61;
382 font-size: 20px;
383 font-weight: 700;
384 line-height: 30px;
385 margin-bottom: 8px;
386 }
387
388 .bioec_profile-form-control label[required]::before {
389 content: "*";
390 color: #ff0000;
391 margin-right: 0.4rem;
392 }
393
394 .bioec_profile-form-control input,
395 .bioec_profile-form-control select {
396 border-radius: 0;
397 outline: none;
398 border: none;
399 border-bottom: 1px solid #BEBEBE;
400 font-size: 16px;
401 font-weight: 400;
402 line-height: 24px;
403 color: #5B5C61;
404 width: 100%;
405 background-color: transparent;
406 padding: 2px;
407 margin: 0;
408 }
409
410 .submit-attempted .bioec_profile-form-control input:invalid,
411 .submit-attempted .bioec_profile-form-control select:invalid {
412 border-bottom: 1px solid #ff0000;
413 }
414
415 .bioec_profile-flex-container {
416 display: flex;
417 flex-direction: row;
418 justify-content: space-between;
419 flex-wrap: wrap;
420 }
421
422 .bioec_profile-flex-container .bioec_profile-form-control {
423 width: 50%;
424 padding-right: 1.5rem;
425 }
426
427 .bioec_profile-form-control textarea {
428 font-size: 16px;
429 font-weight: 400;
430 line-height: 24px;
431 color: #5B5C61;
432 width: 100%;
433 background-color: transparent;
434 border-radius: 0;
435 border: 1px solid #BEBEBE;
436 resize: none;
437 outline: none;
438 margin-top: 24px;
439 }
440
441 .bioec_form-picture-container {
442 color: var(--white);
443 background-color: #595A5F;
444 border-radius: 50%;
445 position: relative;
446 display: flex;
447 align-items: center;
448 justify-content: center;
449 padding: 35px;
450 width: 180px;
451 height: 180px;
452 font-size: 100px;
453 background-size: cover;
454 }
455
456 .bioec_form-picture-container[style] > i {
457 display: none;
458 }
459
460 .bioec_form-picture-container button {
461 position: absolute;
462 right: 0;
463 bottom: 0;
464 color: var(--white);
465 background-color: var(--color-3);
466 height: 40px;
467 width: 40px;
468 border-radius: 50%;
469 border: none;
470 outline: none;
471 display: flex;
472 align-items: center;
473 justify-content: center;
474 padding: 0;
475 font-size: 18px
476 }
477
478 .bioec_multi_select {
479 font-size: 16px;
480 font-weight: 400;
481 line-height: 24px;
482 color: #5B5C61;
483 width: 100%;
484 background-color: transparent;
485 border-radius: 0 !important;
486 border: 1px solid #BEBEBE !important;
487 resize: none;
488 outline: none;
489 padding: 12px !important;
490 }
491
492 .bioec_multi_select .select2-selection__choice {
493 background-color: transparent !important;
494 margin-left: 12px !important;
495 margin-top: 0px !important;
496 }
497
498 .modal-header h1{
499 color: #5B5C61;
500 margin-bottom: 0px;
501 font-size: 25px;
502 line-height: 58.5px;
503 font-weight: 400;
504 }
505
506 @media (max-width: 768px) {
507 .bioec_profile-flex-container .bioec_profile-form-control {
508 margin-bottom: 1.5rem;
509 width: 100%;
510 padding-right: 0rem;
511 }
512 }
513</style>
514
515<script>
516
517function deleteOrg() {
518 Liferay.Util.openToast({message: "Enviando requisição",type: "info",title: ""});
519 fetch(Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}",
520 {
521 method: "DELETE",
522 headers: {
523 "x-csrf-token": Liferay.authToken,
524 "Content-Type": "application/json",
525 "Accept": "application/json"
526 }
527 })
528 .then( Liferay.Util.openToast({
529 message: "Estamos processando seu arquivo. Favor aguarde por alguns segundos e redireciorameos você automaticamente.",
530 type: "success",
531 title: "",
532 toastProps: {
533 autoClose: 2000
534 }
535 }))
536 .then(setTimeout(() => { window.location.href = Liferay.ThemeDisplay.getPortalURL() + "/meu-perfil#deleteOrg" }, 2000))
537
538
539
540}
541
542
543function submitOrganization() {
544 Liferay.Util.openToast({
545 message: "Enviando requisição",
546 type: "info",
547 title: "",
548 });
549 console.log("submitOrganization");
550 let site = document.getElementById("siteOrganizacao").value;
551 let linkedin = document.getElementById("linkedinOrganizacao").value;
552
553 if (site != "") {
554 if (
555 !site.startsWith("https://") &&
556 !site.startsWith("http://") &&
557 !site.startsWith("https://www") &&
558 !site.startsWith("http://www")
559 ) {
560 Liferay.Util.openToast({
561 message:
562 "O campo 'site' precisa começar com 'https://', 'http://', 'https://www' ou 'http://www' para ser válido",
563 type: "danger",
564 title: "",
565 toastProps: {
566 autoClose: 5000,
567 },
568 });
569 return;
570 }
571 }
572
573 if (linkedin != "") {
574 if (
575 !linkedin.startsWith("https://www.linkedin.com") &&
576 !site.startsWith("http://www.linkedin.com") &&
577 !linkedin.startsWith("https://linkedin.com") &&
578 !site.startsWith("http://linkedin.com")
579 ) {
580 Liferay.Util.openToast({
581 message:
582 "O campo 'linkedin' precisa começar com 'https://www.linkedin.com' ou 'http://www.linkedin.com' com ou sem os 'www.' para ser válido",
583 type: "danger",
584 title: "",
585 toastProps: {
586 autoClose: 5000,
587 },
588 });
589 return;
590 }
591 }
592
593 fetch(
594 Liferay.ThemeDisplay.getPortalURL() +
595 "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}",
596 {
597 method: "PUT",
598 headers: {
599 "x-csrf-token": Liferay.authToken,
600 "Content-Type": "application/json",
601 },
602 body: JSON.stringify({
603 imagem: document.getElementById("inputOrgBase64OrgModal").value,
604 tipo: document.getElementById("tipo-de-organizacao").value,
605 nome: document.getElementById("nomeOrganizacao").value.trim(),
606 cidade: document.getElementById("cidadeOrganizacao").value,
607 estado: document.getElementById("estadoOrganizacao").value,
608 pais: document.getElementById("paisOrganizacao").value,
609 site: document.getElementById("siteOrganizacao").value,
610 linkedin: document.getElementById("linkedinOrganizacao").value,
611 sobre: document.getElementById("sobreOrganizacao").value,
612 setores: $("#setores-de-atuacao").select2("val"),
613 competencias: document.getElementById("competenciasOrganizacao").value,
614 tipodeentidade: document.getElementById("tipodeentidadeOrganizacao")
615 .value,
616 instituicao: document.getElementById("instituicaoOrganizacao").value,
617 }),
618 }
619 )
620 .then(
621 (response) =>
622 new Promise((resolve, reject) => {
623 resolve({
624 status: response.status,
625 ok: response.ok,
626 }).then((r) => console.log(r));
627 reject({}).then((c) => console.log(c));
628 })
629 )
630 .then((res) => {
631 if (res.status == "200") {
632 Liferay.Util.openToast({
633 message: "Perfil alterado com sucesso.",
634 type: "success",
635 title: "",
636 toastProps: {
637 autoClose: 5000,
638 },
639 });
640 location.reload();
641 } else if(res.status == "302"){
642 Liferay.Util.openToast({
643 message: "Cadastre uma organização com SITE diferente.",
644 type: "danger",
645 title: "Site inserido já existe",
646 toastProps: {
647 autoClose: 5000
648 }
649 })
650 } else if(res.status == "409"){
651 Liferay.Util.openToast({
652 message: "Cadastre uma organização com Nome da Organização diferente.",
653 type: "danger",
654 title: "Nome da Organização cadastrada já existe",
655 toastProps: {
656 autoClose: 5000
657 }
658 })
659 }
660 })
661 .catch((e) => console.log(e));
662}
663
664
665</script>
666
667</#if>
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: organization = OrganizationLocalServi... [in template "34764#34807#null" at line 15, column 17] ----
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?? && _CUSTOM_FIELD_organization.getData()?? && _CUSTOM_FIELD_organization.getData() !="" >
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") && _CUSTOM_FIELD_organization.getData()?? && _CUSTOM_FIELD_organization.getData() !="" >
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>
Java method "com.sun.proxy.$Proxy136.getOrganization(long)" threw an exception when invoked on com.sun.proxy.$Proxy136 object "com.liferay.portal.service.impl.OrganizationLocalServiceImpl@51e5b32a"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: organization = OrganizationLocalServi... [in template "34764#34807#null" at line 24, column 9] ----
1<#assign
2 viewerHasPrivileges = false
3 userId = themeDisplay.getUserId()
4/>
5<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
6
7
8<#if userId?? && _CUSTOM_FIELD_organization.getData()?? && _CUSTOM_FIELD_organization.getData() !="" >
9 <#assign
10 OrganizationLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService")
11 />
12 <#assign
13 orgId = _CUSTOM_FIELD_organization.getData()?number
14 viewerHasPrivileges = OrganizationLocalService.hasUserOrganization(userId, orgId)
15 />
16</#if>
17
18<#assign
19 UserLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")
20/>
21<#assign
22 orgId = _CUSTOM_FIELD_organization.getData()?number
23 users = UserLocalService.getOrganizationUsers(orgId)
24 organization = OrganizationLocalService.getOrganization(orgId)
25 nomeDaOrg = organization.getName()!""
26/>
27
28<div class="bioec_org_admins">
29 <label>Administradores desse perfil</label>
30
31 <#list users as user>
32 <#assign userArticleId = user.getExpandoBridge().getAttribute("journal-article")!"0" >
33
34 <#assign urlWC = "">
35 <#if userArticleId != "0" && userArticleId != "">
36 <#assign userArticle = JournalArticleLocalService.getLatestArticle(themeDisplay.getLayout().getGroupId(), userArticleId?string) >
37 <#assign urlWC = userArticle.getUrlTitle()!"">
38 </#if>
39
40
41 <#assign
42 nome = user.getFullName()
43 />
44 <div class="bioec_org_admin_container">
45 <div class="bioec_org_admin_img_placeholder">
46 <i class="fa-solid fa-user"></i>
47 </div>
48 <div class="bioec_org_admin_content">
49 <b><a style="color: #5B5C61;" href="<#if urlWC != ''>/w/${urlWC}</#if>">${nome}</a></b>
50 Administrador
51 </div>
52 <#if viewerHasPrivileges>
53 <div class="bioec_org_admin_buttons_container">
54 <#if userId != user.getUserId() >
55 <button class="bioec_org_admin_button d-none" data-toggle="modal" data-target="#bioec-admin-modal">
56 <i class="fa-solid fa-pen-to-square"></i>
57 </button>
58 <button class="bioec_org_admin_button" onclick="removeAdminFromOrg(${user.getUserId()})">
59 <i class="fa-solid fa-trash-can"></i>
60 </button>
61 </#if>
62 </div>
63 </#if>
64 </div>
65 </#list>
66
67 <#if viewerHasPrivileges>
68 <div class="bioec_org_flex_end">
69 <#if (1 < users?size)>
70 <button class="bioec_secondary_button mx-3 mb-4 mb-md-0" data-toggle="modal" data-target="#bioec-leave-modal">DEIXAR DE SER ADMINISTRADOR</button>
71 </#if>
72 <button class="bioec_primary_button bioec_modal-adicionar" data-toggle="modal" data-target="#bioec-admin-modal">ADICIONAR ADMINISTRADOR</button>
73 </div>
74
75 <#-- MODAL DE ADICIONAR ADMINISTRADOR -->
76 <div id="bioec-admin-modal" class="modal fade" style="display: none;" role="dialog" aria-hidden="true">
77 <div class="modal-dialog modal-lg" role="document">
78 <div class="modal-content">
79 <div class="py-3 px-4 d-flex justify-content-between bioec_modal-line">
80 <div class="bioec_modal-title">Adicionar administrador</div>
81 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
82 <i class="fa-solid fa-xmark"></i>
83 </button>
84 </div>
85 <div class="bioec_modal-form">
86 <div class="py-3 px-4 bioec_modal-line">
87 <h1>${title.getData()}</h1>
88 <div class="bioec_modal-form-control">
89 <label>E-mail do administrador</label>
90 <input id="admin-email" type="text" placeholder="Digite aqui" value="" >
91 </div>
92 <div class="bioec_modal-form-control d-none">
93 <label>Cargo/Função</label>
94 <input id="admin-role" type="text" placeholder="Digite aqui" value="" >
95 </div>
96 </div>
97 <div class="py-3 px-4 d-flex justify-content-end">
98 <button type="button" class="bioec_secondary_button mx-3" data-dismiss="modal">CANCELAR</button>
99 <button type="button" class="bioec_primary_button" onclick="addAdminToOrg()">CONTINUAR</button>
100 </div>
101 </div>
102 </div>
103 </div>
104 </div>
105
106 <#-- MODAL DE DEIXAR ORGANIZAÇÃO -->
107 <div id="bioec-leave-modal" class="modal fade" style="display: none;" role="dialog" aria-hidden="true">
108 <div class="modal-dialog modal-lg" role="document">
109 <div class="modal-content px-4 py-4">
110 <div class="d-flex justify-content-between">
111 <h5 class="modal-title">Deixar de ser administrador</h5>
112 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
113 <span aria-hidden="true">×</span>
114 </button>
115 </div>
116 <div class="my-3">
117 <div class="mb-3">
118 ${title.getData()}
119 </div>
120 Ao clicar em continuar, a organização será removida do seu perfil. Caso possua outros administradores, ela continuará nos perfis desses usuários.
121 </div>
122 <div class="d-flex justify-content-end">
123 <button type="button" class="bioec_secondary_button mx-3" data-dismiss="modal">CANCELAR</button>
124 <button type="button" class="bioec_primary_button" onclick="quitOrganization()" >CONTINUAR</button>
125 </div>
126 </div>
127 </div>
128 </div>
129
130 </#if>
131</div>
132
133<script>
134
135$(document).ready(() => {
136 let urlSearchParams = new URLSearchParams(window.location.search);
137
138 if( urlSearchParams.has('popup_adicionar_admin') == 1){
139 $('.bioec_modal-adicionar').click();
140 urlSearchParams.delete("popup_adicionar_admin");
141 if (history.replaceState) {
142 let searchString = urlSearchParams.toString().length > 0 ? '?' + urlSearchParams.toString() : '';
143 let newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + searchString + window.location.hash;
144 history.replaceState(null, '', newUrl);
145 }
146 }
147});
148
149
150
151
152function quitOrganization() {
153 const url = Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}/user/" + ${userId}
154 fetch(url, {
155 method: 'DELETE',
156 "headers": {
157 "x-csrf-token": Liferay.authToken,
158 "Content-Type": "application/json"
159 }
160 })
161 .then(res => {
162 if(res.status == "200"){
163 Liferay.Util.openToast({
164 message: "Você deixou de ser Administrador",
165 type: "success",
166 title: "",
167 toastProps: {
168 autoClose: 5000
169 }
170 })
171 location.reload();
172 } else {throw "err";}
173 })
174 .catch(() => showErrorToast("Não foi possível adicionar o administrador. Verifique o email e tente novamente"))
175}
176
177function removeAdminFromOrg(userId) {
178 console.log(userId)
179 if(userId) {
180 const url = Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}/user/" + userId
181 fetch(url, {
182 method: 'DELETE',
183 "headers": {
184 "x-csrf-token": Liferay.authToken,
185 "Content-Type": "application/json"
186 }
187 })
188 .then(res => {
189 if(res.status == "200"){
190 Liferay.Util.openToast({
191 message: "Administrador deletado com sucesso.",
192 type: "success",
193 title: "",
194 toastProps: {
195 autoClose: 5000
196 }
197 })
198 location.reload();
199 } else {throw "err";}
200 })
201 .catch(() => showErrorToast("Não foi possível adicionar o administrador. Verifique o email e tente novamente"))
202 }
203}
204
205function addAdminToOrg() {
206 const userEmail = document.getElementById("admin-email").value
207 console.log(userEmail)
208 if(userEmail) {
209 const url = Liferay.ThemeDisplay.getPortalURL() + "/o/profile-management/organization/${_CUSTOM_FIELD_organization.getData()}/user/" + userEmail
210 fetch(url, {
211 method: 'POST',
212 "headers": {
213 "x-csrf-token": Liferay.authToken,
214 "Content-Type": "application/json"
215 }
216 })
217 .then(res => {
218 if(res.status == "200"){
219 Liferay.Util.openToast({
220 message: "Administrador adicionado com sucesso.",
221 type: "success",
222 title: "",
223 toastProps: {
224 autoClose: 5000
225 }
226 })
227 location.reload();
228 gtag('event', 'admnistrador_registrado', {
229 "orgName" : "${nomeDaOrg}"
230 });
231 } else {throw "err";}
232 })
233 .catch(() => showErrorToast("Não foi possível adicionar o administrador. Verifique o email e tente novamente"))
234 }
235}
236
237const showErrorToast = message => {
238 Liferay.Util.openToast({
239 message,
240 type: "danger",
241 title: "",
242 toastProps: {
243 autoClose: 5000,
244 style: { top: 0 },
245 }
246 })
247 }
248
249</script>
250
251<style>
252 .bioec_org_admins {
253 margin-bottom: 40px;
254 }
255
256 .bioec_org_admins label {
257 color: #5B5C61;
258 font-weight: 700;
259 margin-bottom: 10px;
260 font-size: 20px;
261 line-height: 30px;
262 }
263
264 .bioec_org_admin_container {
265 border: 1px solid #BEBEBE;
266 padding: 24px;
267 margin-bottom: 25px;
268 display: flex;
269 flex-direction: row;
270 align-items: center;
271 }
272
273 .bioec_org_flex_end {
274 display: flex;
275 flex-direction: row;
276 align-items: center;
277 justify-content: end;
278 }
279
280 .bioec_org_admin_img_placeholder {
281 align-self: center;
282 height: 48px;
283 width: 48px;
284 background-color: #595A5F;
285 border-radius: 50%;
286 display: flex;
287 align-items: center;
288 justify-content: center;
289 color: var(--white-1);
290 font-size: 28px;
291 }
292
293 .bioec_org_admin_content {
294 font-size: 16px;
295 color: #5B5C61;
296 flex: 1;
297 margin: 0 12px;
298 }
299
300 .bioec_org_admin_content b {
301 display: block;
302 }
303
304 .bioec_org_admin_button {
305 color: var(--white-1);
306 background-color: #595A5F;
307 border-radius: 8px;
308 border: none;
309 outline: none;
310 width: 34px;
311 height: 34px;
312 font-size: 16px;
313 padding: 0px;
314 margin-left: 12px;
315 }
316
317 .bioec_org_admin_buttons_container {
318 display: flex;
319 flex-direction: row;
320 }
321
322 .bioec_modal-title {
323 font-weight: 700;
324 font-size: 20px;
325 color: #5B5C61;
326 }
327
328 .bioec_modal-line {
329 border-bottom: 1px solid #E8ECEF;
330 }
331
332 .bioec_modal-form h1 {
333 font-weight: 400;
334 font-size: 24px;
335 line-height: 150%;
336 color: #5B5C61;
337 margin-bottom: 40px;
338 }
339
340 .bioec_modal-form-control {
341 margin-bottom: 24px;
342 }
343
344 .bioec_modal-form-control label {
345 color: #5B5C61;
346 font-size: 20px;
347 font-weight: 700;
348 line-height: 30px;
349 margin-bottom: 8px;
350 }
351
352 .bioec_modal-form-control label[required]::before {
353 content: "*";
354 color: #ff0000;
355 margin-right: 0.4rem;
356 }
357
358 .bioec_modal-form-control input {
359 border-radius: 0;
360 outline: none;
361 border: none;
362 border-bottom: 1px solid #BEBEBE;
363 font-size: 16px;
364 font-weight: 400;
365 line-height: 24px;
366 color: #5B5C61;
367 width: 100%;
368 background-color: transparent;
369 padding: 2px;
370 margin: 0;
371 }
372
373 @media (max-width: 767px) {
374 .bioec_org_admin_buttons_container {
375 flex-direction: column;
376 }
377 .bioec_org_admin_button {
378 margin-bottom: 12px;
379 }
380 .bioec_org_flex_end {
381 flex-direction: column;
382 align-items: center;
383 }
384 }
385</style>
The following has evaluated to null or missing: ==> autorArticleId [in template "34764#34807#41130" at line 104, column 46] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #if autorArticleId != "0" && autorArt... [in template "34764#34807#41130" at line 104, 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">×</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>
The following has evaluated to null or missing: ==> autorArticleId [in template "34764#34807#41127" at line 87, column 38] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #if autorArticleId != "0" && autorArt... [in template "34764#34807#41127" at line 87, 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
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">×</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">×</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>
tesde te oferta pf sem img neg
tesde te oferta pf sem img neg
Conteúdo Em Análise Pelo Cetiqt:
Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.
Teste de Oferta Org sem img neg
Teste de Oferta Org sem img neg
Teste de Oferta Org com img neg
Teste de Oferta Org com img neg
Contato
Conteúdo Em Análise Pelo Cetiqt:
Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.
Teste de Oferta Org sem img
Teste de Oferta Org sem img
Conteúdo Em Análise Pelo Cetiqt:
Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.
Aplicação de Plasma em substratos têxteis
Modificação de superfícies têxteis através da aplicação de plasma atmosférico. Serviço de prova de conceito de modificação de superfícies têxteis (fios, malhas ou tecidos planos) através do uso de plasma atmosférico de forma contínua (metragens grandes) ou descontínua (pequenas metragens). Possibilidade de funcionalização dos substratos têxteis por plasma atmosférico através do uso de precursores químicos. Exemplos do uso do plasma: tornar o material têxtil hidrofóbico ou hidrofílico, aumento da adesão do têxtil a outros materiais, tingimento de têxteis com classes de corantes diferentes, aumento da solidez de corantes e acabamentos, dentre outros.
Contato
(21)99308-4506
rbergamini@cetiqt.senai.br
Funcionalização de materiais têxteis
Realizar acabamento convencional ou especial em materiais têxteis por diferentes processos. Serviço de acabamento de materiais têxteis (fios, tecidos planos ou malhas) em escala piloto, através de diferentes processos, como: esgotamento, impregnação, spray, coating, dentre outros.
Contato
(21)99308-4506
rbergamini@cetiqt.senai.br
Tingimento de materias têxteis
Realizar tingimento em fios, tecidos naturais, sintéticos ou misturas, em escala piloto, pelos processos de esgotamento ou impregnação. Serviço de tingimento de materiais têxteis (fios, tecidos planos ou malhas) naturais, sintéticos ou misturas, em escala piloto, através dos processos contínuos ou descontímuos. Processos como: pad-batch, pad steam, pad dry, dentre outros.
Contato
(21)99308-4506
rbergamini@cetiqt.senai.br
Reciclagem de materiais têxteis
Reciclar materiais têxteis através de processos físicos e/ou químicos. Serviço de reciclagem de resíduos têxteis através de processos físicos (desfibragem) e/ou químicos para produção de novos fios e tecidos (economia circular).
Contato
(21)99308-4506
rbergamini@cetiqt.senai.br
Análises antivirais em têxteis
Analisar a atividade antiviral em materiais têxteis utilizando as cepas dos vírus do Sarampo em laboratório NB2 e da COVID-19 em laboratório NB3, através da norma ISO 18184, em parceria com a FIOCRUZ.
Contato
(21)99308-4506
rbergamini@cetiqt.senai.br
Identificação de produtos químicos têxteis
Identificar, através de técnicas analíticas (cromatografia, FTIR, XRF, etc.), os componentes químicos presentes nos produtos utilizados pela indústria têxtil, como: amaciantes, detergentes, espessantes, dentre outros.
Contato
(21)99308-4506
rbergamini@cetiqt.senai.br
Produção de Fibras Sintéticas
Produzir novas fibras sintéticas (polipropileno, poliéster, poliamida, etc.), aditivadas ou não, por fiação por fusão através do uso da extrusora localizada na Planta Piloto de Fibras Químicas do Instituto de Inovação. Podem ser produzidas multi ou monofilamentos contínuos com morfologias monocomponentes ou bicomponetes (núcleo/casca, lado a lado, ilhas no oceano e fatias segmentadas).
Contato
(07)03093-2219
rbergamini@cetiqt.senai.br
Otimização de produtos - Tecidos Planos
Produção de protótipos de tecido plano. Utilizar os teares planos da planta piloto de tecelagem do Instituto SENAI de Inovação para produzir protótipos em escala piloto com 50 cm de largura.
Contato
(07)03093-2219
rbergamini@cetiqt.senai.br
Investigação em Materiais Têxteis
Análises de microscopia (óptica, MEV e Força Atômica), análises de defeitos ocasionados no processo produtivo. Identificar os defeitos através de análises microscópicas e sugerir soluções para o problema.
Contato
(07)03093-2219
rbergamini@cetiqt.senai.br
HPLC-MS
Análise de carboidratos, ácidos orgânicos, moléculas derivadas de lignina, corantes, antioxidantes, farmacêuticos, intermediários químicos e desenvolvimento de metodologias para análise diversas sob consulta
Contato
gisi_analitica@cetiqt.senai.br
Cromatografia APC/GPC
Análise de polímeros sintéticos solúveis em solventes orgânicos para análise de distribuição de tamanho de cadeia e peso molecular.
Contato
gisi_analitica@cetiqt.senai.br
Cromatografia GC-MS
Análise de moléculas voláteis ou volatilizáveis através de cromatografia gasosa. Compostos como diesel, ácidos graxos, terpenos e produtos naturais, farmacêuticos e desenvolvimento de metodologias para análises diversas sob consulta com identificação através de espectrometria de massas e comparação com uma biblioteca interna de dados espectrográficos.
Contato
gisi_analitica@cetiqt.senai.br
Cromatografia GC-FID-BID-TCD
Análise de moléculas voláteis ou volatilizáveis através de cromatografia gasosa. Compostos como diesel, ácidos graxos, terpenos e produtos naturais, farmacêuticos e desenvolvimento de metodologias para análises diversas sob consulta.
Contato
gisi_analitica@cetiqt.senai.br
Caraterização de sólidos - BET
Análise da estrutura porosa de materiais sólidos determinando parâmetros como diâmetro de poros, volume de poros e área superficial.
Contato
gisi_analitica@cetiqt.senai.br
Caracterização de sólidos - Espectrômetro de Fluorescência de Raios X
Identificação e quantificação de elementos metálicos presentes em amostras diversas. Capacidade para leitura do sódio ao urânio.
Contato
gisi_analitica@cetiqt.senai.br
Caracterização de sólidos - Espectrômetro de Difração de Raios X (DRX)
Determinação da estrutura cristalográfica de materiais sólidos e grau de cristalinidade.
Contato
gisi_analitica@cetiqt.senai.br
Conteúdo Em Análise Pelo Cetiqt:
Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.
Conteúdo Em Análise Pelo Cetiqt:
Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.
Conteúdo Em Análise Pelo Cetiqt:
Conteúdo recusado pelo CETIQT por violar as políticas de privacidade.