PageSourceSearch

https://firmapp-backend.netlify.app/_next/static/chunks/pages/contract-communities-9c797763b0622cd4.js

js firmapp-backend.netlify.app collected 2026-10-03 10:44:52 UTC 9,615 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5925],{12381:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/contract-communities",function(){return n(98774)}])},2407:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(85893),a=n(28309);function c(e){var t=e.className,n=e.error,c=e.icon,s=e.id,o=e.invalid,i=e.label,l=e.name,u=e.onChange,d=e.placeholder,p=e.type,f=e.value,m=e.disabled;return(0,r.jsxs)("div",{className:t,children:[i&&(0,r.jsx)("label",{htmlFor:"price",className:"block text-sm mb-1 font-medium text-gray-700",children:i}),(0,r.jsxs)("div",{className:"relative rounded-md shadow-sm",children:[c&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:(0,r.jsx)("span",{className:"text-gray-500 sm:text-sm",children:(0,r.jsx)(a.e,{icon:c,className:"w-6 h-6 text-gray-300",outline:!0})})}),(0,r.jsx)("input",{name:l,id:s,className:"\n              block w-full rounded-md border-gray-300 pr-12 focus:border-blue-500 focus:ring-blue-500 sm:text-sm placeholder-gray-400\n              ".concat(c&&"pl-10","\n              ").concat(!!o&&"border-red-400","\n            "),placeholder:d,onChange:u,type:p||"text",value:f||"",disabled:m||!1})]}),!!n&&(0,r.jsx)("p",{className:"text-xs text-red-600 ml-1",children:n})]})}},98774:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return k},default:function(){return S}});var r=n(85893),a=n(34051),c=n.n(a),s=n(67294),o=n(97568),i=n(37887),l=n(93054),u=n(2407),d=n(40182);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){f(e,t,n[t])}))}return e}function h(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e){var t,n,a=e.onChange,c=(0,o.$G)(["contract-communities"],{keyPrefix:"contract-communities"}).t,p=(0,s.useState)({search:"",accepted:!0,notAccepted:!0,parish:{label:"Alle",value:null}}),f=p[0],x=p[1],v=(0,i.a)(d.Re);return(0,s.useEffect)((function(){"function"===typeof a&&a(f)}),[f]),(0,r.jsxs)("div",{className:"flex justify-start items-center gap-4 text-sm p-2 rounded-md",children:[(0,r.jsx)(u.Z,{placeholder:c("text_search_placeholder"),value:f.search,onChange:function(e){x(m({},f,{search:e.target.value}))}}),(0,r.jsxs)("div",{children:[(0,r.jsx)("button",{className:"\n          border rounded-l  px-4 py-1 h-[38px] relative\n          ".concat(f.accepted?"bg-slate-200 border-slate-300 z-10":"z-0","\n        "),onClick:function(){return x(m({},f,{accepted:!f.accepted}))},children:c("filter_accepted")}),(0,r.jsx)("button",{className:"\n          border rounded-r  px-4 py-1 h-[38px] -ml-[1px] relative\n          ".concat(f.notAccepted?"bg-slate-200 border-slate-300 z-10":"z-0","\n        "),onClick:function(){return x(m({},f,{notAccepted:!f.notAccepted}))},children:c("filter_not_accepted")})]}),(0,r.jsx)(l.ZP,{className:"w-[150px]",isSearchable:!1,options:[{label:"Alle",value:null}].concat(h((null===(t=v.data)||void 0===t||null===(n=t.parishes)||void 0===n?void 0:n.map((function(e){var t=e.id;return{label:e.name,value:t}})))||[])),value:f.parish,onChange:function(e){return x(m({},f,{parish:e}))}})]})}var v=n(28309),b=n(94452),g=n(95526),_=n(65266),j=n(20921);function y(e,t,n,r,a,c,s){try{var o=e[c](s),i=o.value}catch(l){return void n(l)}o.done?t(i):Promise.resolve(i).then(r,a)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function s(e){y(c,r,a,s,o,"next",e)}function o(e){y(c,r,a,s,o,"throw",e)}s(void 0)}))}}var N=function(){var e,t=(0,o.$G)(["contract-communities","dioceses"]).t,n=(0,s.use
1State)(),a=n[0],l=n[1],u=(0,s.useState)(),d=u[0],p=u[1],f=(0,s.useState)(!0),m=f[0],h=f[1],y=(0,s.useState)([]),N=y[0],k=y[1],S=(0,s.useState)([]),A=S[0],C=S[1],E=(0,s.useState)({first_name:g.Lqo.Asc})[0],O=(0,s.useState)({role:{name:{_eq:"moderator"}},active:{_eq:!0}})[0],P=(0,i.a)(_.fo,{variables:{condition:O,offset:0,limit:5e3,order_by:E}});return(0,s.useEffect)((function(){w(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.Yi)();case 2:(t=e.sent).contracts.length>0&&p(t.contracts[0].id);case 4:case"end":return e.stop()}}),e)})))()}),[]),(0,s.useEffect)((function(){w(c().mark((function e(){var n,r,a,s,o,i,l,u,p,f,m,x;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===P||void 0===P||null===(n=P.data)||void 0===n?void 0:n.users)&&d){e.next=3;break}return e.abrupt("return");case 3:if(r=P.data.users,a=Array.from(new Set(r.map((function(e){return e.parish_id})).filter((function(e){return Boolean(e)})))),s=new Map,!(a.length>0)){e.next=27;break}return e.next=9,(0,b.XW)(d,a);case 9:for(o=e.sent,i=!0,l=!1,u=void 0,e.prev=11,p=o.parish_x_contract[Symbol.iterator]();!(i=(f=p.next()).done);i=!0)m=f.value,s.has(m.parish_id)||s.set(m.parish_id,{contract_accepted_at:m.contract_accepted_at,contract_file:m.contract_file||null});e.next=19;break;case 15:e.prev=15,e.t0=e.catch(11),l=!0,u=e.t0;case 19:e.prev=19,e.prev=20,i||null==p.return||p.return();case 22:if(e.prev=22,!l){e.next=25;break}throw u;case 25:return e.finish(22);case 26:return e.finish(19);case 27:x=r.map((function(e){var n=t("dioceses.diocese.".concat(null===e||void 0===e?void 0:e.bistum),{ns:"dioceses"}),r=e.parish_id,a=r?s.get(r):void 0;return{bistum:n,parish:"("+(e.parish||"")+")",user:e.first_name+" "+e.last_name+" ("+e.email+")",accepted_at:null===a||void 0===a?void 0:a.contract_accepted_at,pdf:(null===a||void 0===a?void 0:a.contract_file)||null}})),C(x),h(!1);case 30:case"end":return e.stop()}}),e,null,[[11,15,19,27],[20,,22,26]])})))()}),[null===P||void 0===P||null===(e=P.data)||void 0===e?void 0:e.users,d]),(0,s.useEffect)((function(){if(a){var e=[];A.forEach((function(t){null!=a.parish.value?t.parish.includes(a.parish.label)&&(a.accepted&&void 0!=t.accepted_at&&e.push(t),a.notAccepted&&void 0===t.accepted_at&&e.push(t)):""!=a.search?(t.user.toLowerCase().includes(a.search.toLowerCase())||t.bistum.toLowerCase().includes(a.search.toLowerCase())||t.parish.toLowerCase().includes(a.search.toLowerCase()))&&(a.accepted&&void 0!=t.accepted_at&&e.push(t),a.notAccepted&&void 0===t.accepted_at&&e.push(t)):(a.accepted&&void 0!=t.accepted_at&&e.push(t),a.notAccepted&&void 0===t.accepted_at&&e.push(t))})),k(e)}else k(A)}),[a,A]),(0,s.useEffect)((function(){N.length>0&&h(!1)}),[N]),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 h-full text-sm max-w-screen-lg",children:[(0,r.jsx)("div",{className:"flex justify-between items-center h-16 rounded bg-slate-50",children:(0,r.jsx)(x,{onChange:l})}),m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-center text-gray-600",children:"Daten werden geladen. Dieser Vorgang kann 1-2 Minuten dauern."}),(0,r.jsx)(j.Z,{className:"h-14 w-14 mx-auto my-4"})]}),N.map((function(e,n){return(0,r.jsx)("div",{className:"text-sm text-slate-600 p-2 rounded pb-5 ".concat(n%2===0?"bg-white":"bg-slate-100"),children:(0,r.jsxs)("div",{className:"grid grid-cols-10 gap-6",children:[(0,r.jsxs)("div",{className:"col-span-5 mt-2",children:[(0,r.jsx)("p",{className:"font-bold",children:e.bistum}),(0,r.jsx)("p",{className:"font-bold",children:e.parish}),(0,r.jsx)("p",{className:"",children:e.user})]}),(0,r.jsxs)("div",{className:"col-span-3 flex items-center mt-2",children:[e.accepted_at&&(0,r.jsx)("span",{className:"rounded p-1 whitespace-break-spaces text-green-800 bg-green-200 text-xs",children:e.accepted_at}),!e.accepted_at&&(0,r.jsx)("span",{className:"rounded p-1 whitespace-break-spaces bg-red-200 text-xs",children:t("contract-communities.message_not_accepted")})]}),(0,r.jsx)("div",{className:"flex items-center text-right mt-2",children:(0,r.jsxs)("a",{type:"button",className:"inline-flex items-center px-4 py-2 text-sm font-medium rounded-md shadow-sm text-boni-blue bg-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 border border-solid border-1 ".concat(e.pdf?"":"pointer-events-none cursor-default opacity-75"),href:e.pdf?e.pdf:"",target:"_blank",rel:"noreferrer",children:[(0,r.jsx)(v.e,{icon:"DocumentArrowDownIcon",className:"w-6 h-6 text-boni-blue flex-none"}),"Download"]})})]})},n)}))]})})},k=!0;function S(){return(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-lg font-semibold mb-4",children:"Gemeinden und Vertr\xe4ge"}),(0,r.jsx)(N,{}),(0,r.jsx)("div",{children:(0,r.jsx)("div",{className:"h-32"})})]})}}},function(e){e.O(0,[3054,7887,2418,5266,5526,1651,4452,9774,2888,179],(function(){return t=12381,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.