Secretaria Municipal da Fazenda
// Script original para mapas
const maps = document.querySelector(".psp-agencies-content iframe");
if(maps){
maps.removeAttribute("sandbox");
maps.src = maps.src;
}
// Script da galeria de imagens
(function() {
const articleId = document.querySelector('[data-article-id]').getAttribute('data-article-id');
const groupId = themeDisplay.getSiteGroupId();
async function fetchArticle() {
const article = await fetch(`/o/headless-delivery/v1.0/sites/11419089/structured-contents/by-key/11458483`)
const data = await article.json();
renderArticle(data);
}
async function fetchDoc(id) {
const doc = await fetch('/o/headless-delivery/v1.0/documents/' + id);
const data = await doc.json();
renderImage(data);
}
async function renderArticle(data) {
if(data.relatedContents.length > 0) removeDisplayNone();
const ids = data.relatedContents.map(object => object.id);
for (const id of ids) {
await fetchDoc(id);
}
}
function removeDisplayNone() {
const imageGalleryContainer = document.querySelector(`[data-article-id="11458483"]`);
imageGalleryContainer.classList.remove('d-none');
}
function removeStringDownload(stringToRemove){
return stringToRemove.replace(/(\?|&)download=true/g, '$1download=false');
}
function renderImage(img) {
if (!img.contentUrl) return;
const imgURL = img.contentUrl;
const galleryLink = document.createElement('a');
galleryLink.setAttribute('title', 'Link para a imagem da galeria');
galleryLink.setAttribute('href', removeStringDownload(imgURL));
galleryLink.setAttribute('data-pswp-width', '1200');
galleryLink.setAttribute('data-pswp-height', '800');
galleryLink.setAttribute('target', '_blank');
const picture = document.createElement('picture');
const smallerMedia = document.createElement('source');
smallerMedia.setAttribute('media', '(max-width:300px)');
smallerMedia.setAttribute('srcset', img.contentUrl);
picture.appendChild(smallerMedia);
const biggerMedia = document.createElement('source');
biggerMedia.setAttribute('media', '(max-width:1000px) and (min-width:300px)');
biggerMedia.setAttribute('srcset', img.contentUrl);
picture.appendChild(biggerMedia);
const imgElement = document.createElement('img');
imgElement.setAttribute('alt', 'Imagem da galeria');
imgElement.src = removeStringDownload(imgURL);
imgElement.setAttribute('loading', 'lazy');
picture.appendChild(imgElement);
galleryLink.appendChild(picture);
const captionContentDiv = document.createElement('div');
captionContentDiv.classList.add('hidden-caption-content');
img.customFields.forEach(cf => {
if (cf.name == "Descrição Imagem" && cf.customValue.data != "") {
const span = document.createElement('span');
const br = document.createElement('br');
span.textContent = cf.customValue.data;
captionContentDiv.appendChild(span);
captionContentDiv.appendChild(br);
}
if (cf.name == "Crédito Imagem" && cf.customValue.data != "") {
const span = document.createElement('span');
span.textContent = 'Fotos de: ' + cf.customValue.data;
captionContentDiv.appendChild(span);
}
});
galleryLink.appendChild(captionContentDiv);
const galleryContainer = document.querySelector('[data-input-gallery]');
galleryContainer.appendChild(galleryLink);
}
var galleryImageElem = document.querySelector(".psp-gallery-" + "stdw_");
if (galleryImageElem) {
const lightbox = new PSP.vendors.PhotoSwipeLightbox({
gallery: '.psp-gallery-' + "stdw_",
children: 'a',
pswpModule: () => import('https://unpkg.com/photoswipe'),
});
lightbox.on('uiRegister', function() {
lightbox.pswp.ui.registerElement({
name: 'custom-caption',
order: 9,
isButton: false,
appendTo: 'root',
html: 'Caption text',
onInit: (el, pswp) => {
lightbox.pswp.on('change', () => {
const currSlideElement = lightbox.pswp.currSlide.data.element;
let captionHTML = '';
if (currSlideElement) {
const hiddenCaption = currSlideElement.querySelector('.hidden-caption-content');
if (hiddenCaption) {
// get caption from element with class hidden-caption-content
captionHTML = hiddenCaption.innerHTML;
} else {
// get caption from alt attribute
captionHTML = currSlideElement.querySelector('img').getAttribute('alt');
}
}
if (!captionHTML.trim()) {
el.classList.add('d-none');
} else {
el.classList.remove('d-none');
}
el.innerHTML = captionHTML || '';
});
}
});
});
lightbox.init();
}
fetchArticle();
})();
Impugnação (Defesa) relativa à exigência fiscal de TFE
Tire suas dúvidas aqui.
Quarta-feira, 25 de Junho de 2025 | Horário: 14:00
A contestação da cobrança da TFE-Taxa de Fiscalização de Estabelecimento é efetuada:
- Tratando-se de lançamento: Exclusivamente, por meio de processo administrativo autuado pelo CAF - Centro de Atendimento da Fazenda, com prévio e obrigatório agendamento eletrônico. Clique aqui.
- Tratando-se de Auto de Infração: É realizada via internet, por meio da SAV - Solução de Atendimento Virtual. Clique aqui.
collections
Galeria de imagens
HAND TALK
Clique neste componente para ter acesso as configurações do plugin Hand Talk