mirror of https://github.com/interlegis/sapl.git
Browse Source
* feat: impl HEADER LastModifiedDecorator na api * fix: ajuste no frontend para evitar cache automático devido a LastModified sem tratamento adequado * rebuild frontend * fix: corrige last_modified_func para retorna sob retrieve * refact: impl LastModified diretamente nos models que possuem campos específicos3.1.x
committed by
GitHub
100 changed files with 214 additions and 59 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@ |
|||||
(()=>{"use strict";var u,p,e,t={8020:(e,a,t)=>{t(3792),t(3362),t(9085),t(9391),t(6918),t(2008),t(2712),t(3288),t(6099),t(8781);var r=t(2893),i=t(8246),s=t(7906),n=t(2543);s.A.defaults.xsrfCookieName="csrftoken",s.A.defaults.xsrfHeaderName="X-CSRFToken",r.Ay.use(i.m0),new r.Ay({delimiters:["[[","]]"],el:"#app2",data:function(){return{nome_pesquisa:"",is_pesquisa:!1,legislatura_selecionada:"",legislaturas:[],parlamentares:[],visible_parlamentares:[],size_parlamentares:0,filter_ativo:!0,filter_titular:""}},watch:{nome_pesquisa:function(e){this.debouncepesquisaParlamentar()}},created:function(){this.debouncepesquisaParlamentar=n.debounce(this.pesquisaParlamentar,500)},methods:{getParlamentares:function(e){var a=this;!this.legislatura_selecionada&&"0"!==this.legislatura_selecionada.toString()||s.A.get("/api/parlamentares/legislatura/"+this.legislatura_selecionada+"/parlamentares/?get_all=true").then(function(e){a.parlamentares=e.data,a.visible_parlamentares=a.parlamentares,a.size_parlamentares=a.visible_parlamentares.length,a.checkTitularAtivo()}).catch(function(e){console.error("Ocorreu um erro ao obter os dados de parlamentares:"+e)})},pesquisaParlamentar:function(e){var a=this;s.A.get("/api/parlamentares/parlamentar/search_parlamentares/",{params:{nome_parlamentar:this.nome_pesquisa}}).then(function(e){a.parlamentares=e.data,a.visible_parlamentares=a.parlamentares,a.size_parlamentares=a.visible_parlamentares.length}).catch(function(e){console.error("Erro ao procurar parlamentar:"+e)})},checkTitularAtivo:function(e){this.visible_parlamentares=this.parlamentares,this.filter_ativo&&(this.visible_parlamentares=this.visible_parlamentares.filter(function(e){return e.ativo})),this.filter_titular&&(this.visible_parlamentares=this.visible_parlamentares.filter(function(e){return"Sim"===e.titular})),this.size_parlamentares=this.visible_parlamentares.length},pesquisaChange:function(e){this.is_pesquisa=!this.is_pesquisa,this.filter_ativo=!0,this.is_pesquisa?this.parlamentares=[]:this.getParlamentares()}},mounted:function(){var a=this;s.A.get("/api/parlamentares/legislatura/?get_all=true").then(function(e){a.legislaturas=e.data;var i=(new Date).getFullYear();a.legislatura_selecionada=a.legislaturas.reduce(function(e,a){var t=new Date(a.data_inicio+" 00:00").getFullYear(),r=new Date(a.data_fim+" 00:00").getFullYear();return e=t<=i&&i<=r?a.id:e},"")}).then(function(e){a.getParlamentares()}).catch(function(e){console.error("Ocorreu um erro ao obter os dados de legislação: "+e)})}})}},r={};function c(e){var a=r[e];return void 0!==a||(a=r[e]={id:e,loaded:!1,exports:{}},t[e].call(a.exports,a,a.exports,c),a.loaded=!0),a.exports}c.m=t,u=[],c.O=(e,a,t,r)=>{if(!a){for(var i=1/0,s=0;s<u.length;s++){for(var n,[a,t,r]=u[s],l=!0,o=0;o<a.length;o++)(!1&r||r<=i)&&Object.keys(c.O).every(e=>c.O[e](a[o]))?a.splice(o--,1):(l=!1,r<i&&(i=r));l&&(u.splice(s--,1),void 0!==(n=t()))&&(e=n)}return e}r=r||0;for(var s=u.length;0<s&&u[s-1][2]>r;s--)u[s]=u[s-1];u[s]=[a,t,r]},c.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return c.d(a,{a:a}),a},c.d=(e,a)=>{for(var t in a)c.o(a,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),c.j=788,p={788:0},c.O.j=e=>0===p[e],a=(e,a)=>{var t,r,i,[s,n,l]=a,o=0;if(s.some(e=>0!==p[e])){for(t in n)c.o(n,t)&&(c.m[t]=n[t]);l&&(i=l(c))}for(e&&e(a);o<s.length;o++)r=s[o],c.o(p,r)&&p[r]&&p[r][0](),p[r]=0;return c.O(i)},(e=self.webpackChunksapl_frontend=self.webpackChunksapl_frontend||[]).forEach(a.bind(null,0)),e.push=a.bind(null,e.push.bind(e));var a=c.O(void 0,[504],()=>c(8020));c.O(a)})(); |
|
||||
Binary file not shown.
@ -0,0 +1 @@ |
|||||
|
(()=>{"use strict";var u,c,e,t={8020:(e,a,t)=>{t(3792),t(3362),t(9085),t(9391),t(6918),t(2008),t(2712),t(3288),t(6099),t(8781);var r=t(2893),s=t(8246),i=t(7906),n=t(2543);i.A.defaults.headers.get["Cache-Control"]="no-cache, no-store, must-revalidate",i.A.defaults.headers.get.Pragma="no-cache",i.A.defaults.headers.get.Expires="0",i.A.defaults.xsrfCookieName="csrftoken",i.A.defaults.xsrfHeaderName="X-CSRFToken",r.Ay.use(s.m0),new r.Ay({delimiters:["[[","]]"],el:"#app2",data:function(){return{nome_pesquisa:"",is_pesquisa:!1,legislatura_selecionada:"",legislaturas:[],parlamentares:[],visible_parlamentares:[],size_parlamentares:0,filter_ativo:!0,filter_titular:""}},watch:{nome_pesquisa:function(e){this.debouncepesquisaParlamentar()}},created:function(){this.debouncepesquisaParlamentar=n.debounce(this.pesquisaParlamentar,500)},methods:{getParlamentares:function(e){var a=this;!this.legislatura_selecionada&&"0"!==this.legislatura_selecionada.toString()||i.A.get("/api/parlamentares/legislatura/"+this.legislatura_selecionada+"/parlamentares/?get_all=true").then(function(e){a.parlamentares=e.data,a.visible_parlamentares=a.parlamentares,a.size_parlamentares=a.visible_parlamentares.length,a.checkTitularAtivo()}).catch(function(e){console.error("Ocorreu um erro ao obter os dados de parlamentares:"+e)})},pesquisaParlamentar:function(e){var a=this;i.A.get("/api/parlamentares/parlamentar/search_parlamentares/",{params:{nome_parlamentar:this.nome_pesquisa}}).then(function(e){a.parlamentares=e.data,a.visible_parlamentares=a.parlamentares,a.size_parlamentares=a.visible_parlamentares.length}).catch(function(e){console.error("Erro ao procurar parlamentar:"+e)})},checkTitularAtivo:function(e){this.visible_parlamentares=this.parlamentares,this.filter_ativo&&(this.visible_parlamentares=this.visible_parlamentares.filter(function(e){return e.ativo})),this.filter_titular&&(this.visible_parlamentares=this.visible_parlamentares.filter(function(e){return"Sim"===e.titular})),this.size_parlamentares=this.visible_parlamentares.length},pesquisaChange:function(e){this.is_pesquisa=!this.is_pesquisa,this.filter_ativo=!0,this.is_pesquisa?this.parlamentares=[]:this.getParlamentares()}},mounted:function(){var a=this;i.A.get("/api/parlamentares/legislatura/?get_all=true").then(function(e){a.legislaturas=e.data;var s=(new Date).getFullYear();a.legislatura_selecionada=a.legislaturas.reduce(function(e,a){var t=new Date(a.data_inicio+" 00:00").getFullYear(),r=new Date(a.data_fim+" 00:00").getFullYear();return e=t<=s&&s<=r?a.id:e},"")}).then(function(e){a.getParlamentares()}).catch(function(e){console.error("Ocorreu um erro ao obter os dados de legislação: "+e)})}})}},r={};function p(e){var a=r[e];return void 0!==a||(a=r[e]={id:e,loaded:!1,exports:{}},t[e].call(a.exports,a,a.exports,p),a.loaded=!0),a.exports}p.m=t,u=[],p.O=(e,a,t,r)=>{if(!a){for(var s=1/0,i=0;i<u.length;i++){for(var n,[a,t,r]=u[i],l=!0,o=0;o<a.length;o++)(!1&r||r<=s)&&Object.keys(p.O).every(e=>p.O[e](a[o]))?a.splice(o--,1):(l=!1,r<s&&(s=r));l&&(u.splice(i--,1),void 0!==(n=t()))&&(e=n)}return e}r=r||0;for(var i=u.length;0<i&&u[i-1][2]>r;i--)u[i]=u[i-1];u[i]=[a,t,r]},p.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return p.d(a,{a:a}),a},p.d=(e,a)=>{for(var t in a)p.o(a,t)&&!p.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),p.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),p.j=788,c={788:0},p.O.j=e=>0===c[e],a=(e,a)=>{var t,r,s,[i,n,l]=a,o=0;if(i.some(e=>0!==c[e])){for(t in n)p.o(n,t)&&(p.m[t]=n[t]);l&&(s=l(p))}for(e&&e(a);o<i.length;o++)r=i[o],p.o(c,r)&&c[r]&&c[r][0](),c[r]=0;return p.O(s)},(e=self.webpackChunksapl_frontend=self.webpackChunksapl_frontend||[]).forEach(a.bind(null,0)),e.push=a.bind(null,e.push.bind(e));var a=p.O(void 0,[504],()=>p(8020));p.O(a)})(); |
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue