PageSourceSearch

https://app.przetargi.io/assets/index-B49u5cr2.js

js przetargi.io collected 2026-10-09 01:28:00 UTC 9,240 bytes, 1 lines download raw bytes

1var L=Object.freeze,V=Object.defineProperty;var z=(t,n)=>L(V(t,"raw",{value:L(n||t.slice())}));import{cT as q,bL as _,r as p,Q,O as U,aw as J,aJ as W,j as e,aN as R,aE as D,ar as N,bM as X,b9 as O,bt as Y,cE as Z,ca as ee}from"./index-Ozl4GyvN.js";import{P as te}from"./pageHeadline.component-CUy7vhIi.js";import{u as se,d as ae,s as re,t as ie,v as ne,C as b,e as w,S as v,h as C,R as le,U as oe}from"./app.component-CSz9esQu.js";function de(t,n){return $(t,n)}function $(t,n,s){if(s===void 0&&(s=new Map),s.has(t))return s.get(t);var l=!1;if(Array.isArray(t)){var h=[];if(s.set(t,h),t.forEach(function(a,u){var f=$(a,n,s);l||(l=f!==a),h[u]=f}),l)return h}else if(q(t)){var m=Object.create(Object.getPrototypeOf(t));if(s.set(t,m),Object.keys(t).forEach(function(a){if(a===n){l=!0;return}var u=$(t[a],n,s);l||(l=u!==t[a]),m[a]=u}),l)return m}return t}function ce(t){return de(t,"__typename")}var B;const ue=_(B||(B=z(["\n    query DailyReportsCriteria($tenantId: String!) {\n        tenantReportSelectionCriteria(tenantId: $tenantId) {\n            id\n            criteria\n            filters {\n                isTenderAmountBelowEu\n                hasDocumentation\n                cpvCodes\n                organizationCity\n                organizationProvince\n                organizationName\n                organizationNationalId\n                bzpNumber\n                bidBondRequired\n                bidBondValue {\n                    minValue\n                    maxValue\n                }\n            }\n            keywords\n        }\n    }\n"])));var G;const he=_(G||(G=z(["\n  mutation UpdateTenantReportSelectionCriteria($tenantId: String!, $criteria: String, $filters: TenderSearchFiltersInput, $keywords: [String!]) {\n    updateTenantReportSelectionCriteria(tenantId: $tenantId, criteria: $criteria, filters: $filters, keywords: $keywords) {\n        ok\n    }\n  }\n"]))),me=()=>{var g;const{data:t}=se(),[n,s]=p.useState(""),[l,h]=p.useState(void 0),[m,a]=p.useState(""),u=(g=t==null?void 0:t.id)!=null?g:"",{toast:f}=Q(),d=U(),{data:r,loading:i,error:c,refetch:y}=J(ue,{variables:{tenantId:u},skip:!u,fetchPolicy:"network-only"}),x=d.formatMessage({id:"Tenant daily report settings / Criteria header",defaultMessage:"Additional criteria"}),T=d.formatMessage({id:"Tenant daily report settings / Criteria placeholder",defaultMessage:"Tenders issued by public authorities for all types of road works—from building new motorways and bridges, through pavement milling and road rehabilitation, to structural repairs."}),I=d.formatMessage({id:"Tenant daily report settings / Criteria helper",defaultMessage:"Tenders that contain the keywords and meet the selected filters will be analysed by AI for alignment with these criteria."}),M=d.formatMessage({id:"Tenant daily report settings / Filters header",defaultMessage:"Filters"}),A=d.formatMessage({id:"Tenant daily report settings / Filters helper",defaultMessage:"All suggested tenders will match these filters."}),E=d.formatMessage({id:"Tenant daily report settings / Keywords header",defaultMessage:"Keywords"}),H=d.formatMessage({id:"Tenant daily report settings / Keywords placeholder",defaultMessage:"Keyword"}),P=d.formatMessage({id:"Tenant daily report settings / Keywords helper",defaultMessage:"Each proposed tender will contain at least one of the specified keywords. The search is full-text and uses lemmatization—word inflections and endings do not matter."}),[F,{loading:K}]=W(he,{onCompleted:()=>{y()}});return p.useEffect(()=>{var k,j;const o=r==null?void 0:r.tenantReportSelectionCriteria;o!=null&&o.criteria&&s(o.criteria),(k=r==null?void 0:r.tenantReportSelectionCriteria)!=null&&k.filters&&h((j=r==null?void 0:r.tenantReportSelectionCriteria)==null?void 0:j.filters),o!=null&&o.keywords&&a(o.keywords.join(", "))},[r==null?void 0:r.tenantReportSelectionCriteria]),{text:n,setText:s,filters:l,setFilters:h,keywords:m,setKeywords:a,data:r,loading:i,error:c,saving:K,handleSave:async()=>{try{const o=m.split(",").map(j=>j.trim()).filter(j=>j),k=l?ce(l):void 0;await F({variables:{tenantId:u,criteria:n.trim()||null,filters:k,keywords:o}}),f({description:d.formatMessage({id:"Tenant daily report settings / Success",defaultMessage:"Daily Report Criteria saved successfully."})})}catch(o){f({description:d.formatMessage({id:"Tenant daily report settings / Failure",defaultMessage:"There was an error when s
1aving the daily report criteria."}),variant:"destructive"})}},criteriaHeader:x,criteriaPlaceholder:T,criteriaHelper:I,keywordsHeader:E,keywordsPlaceholder:H,keywordsHelper:P,filtersHeader:M,filtersHelper:A}},pe=(t,n)=>{const[s,l]=p.useState([""]),h=s.includes(""),m=!s.some(i=>i!="");p.useEffect(()=>{if(t!==void 0){const i=t.split(",").map(y=>y.trim()).filter(Boolean),c=i.length>0?i:[""];l(c),n(c.join(","))}},[t]);const a=p.useCallback(i=>{l(i);const c=i.map(y=>y.trim()).filter(Boolean);n(c.join(","))},[n]),u=p.useCallback(()=>{s.includes("")||a([...s,""])},[s,a]),f=p.useCallback((i,c)=>{const y=s.map((x,T)=>T===i?c:x);a(y)},[s,a]),d=p.useCallback(i=>{const c=s.filter((y,x)=>x!==i);a(c.length>0?c:[""])},[s,a]),r=p.useCallback(()=>{a([""])},[a]);return{list:s,add:u,update:f,remove:d,clear:r,disableAdd:h,disableClear:m}},fe=({placeholder:t,value:n,onChange:s})=>{const{list:l,add:h,update:m,remove:a,clear:u,disableAdd:f,disableClear:d}=pe(n,s);return e.jsxs("div",{children:[e.jsxs("div",{className:"space-x-4",children:[e.jsx(R,{onClick:h,variant:"outline","aria-label":"Add keyword",disabled:f,icon:e.jsx(D,{icon:"heroicons:plus",size:16}),children:e.jsx(N,{defaultMessage:"Add keyword",id:"Tenant daily report settings / Add keyword"})}),e.jsx(R,{onClick:u,variant:"outline","aria-label":"Remove all keywords",disabled:d,icon:e.jsx(D,{icon:"heroicons:trash",size:16}),children:e.jsx(N,{defaultMessage:"Remove all",id:"Tenant daily report settings / Remove all keywords"})})]}),e.jsx("div",{className:"space-y-3 mt-2",children:l.map((r,i)=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(X,{value:r,placeholder:String(i+1)+" "+t,onChange:c=>m(i,c.target.value),className:"w-full"}),r!==""&&e.jsx(R,{type:"button",variant:"outline",className:"w-10 h-10 mt-4","aria-label":"Clear",icon:e.jsx(D,{icon:"heroicons:x-mark",size:16}),onClick:()=>a(i)})]},i))})]})},be=()=>{const{text:t,setText:n,filters:s,setFilters:l,keywords:h,setKeywords:m,handleSave:a,saving:u,loading:f,criteriaHeader:d,criteriaPlaceholder:r,criteriaHelper:i,keywordsHeader:c,keywordsPlaceholder:y,keywordsHelper:x,filtersHeader:T,filtersHelper:I}=me(),M=ae(),A=M(O.tenant.settings.general),{loading:E,activeSubscription:H}=re(),P=ie(H,ne.GOLD),F=p.useCallback(()=>{},[]);if(!P&&!E)return e.jsx(Y,{to:A,replace:!0});const S=f&&s===void 0;return e.jsx(Z,{value:M(O.tenant.settings.dailyReports),children:e.jsx("div",{className:"relative min-h-screen",children:e.jsxs("div",{className:"space-y-6 pt-4 mt-2 pb-10",children:[e.jsx(te,{header:e.jsx(N,{defaultMessage:"Daily Report Settings",id:"Tenant daily report settings / Header"}),subheader:e.jsx(N,{defaultMessage:"Define your criteria in this panel and our system will take care of the rest—each evening it will automatically scan for tenders that meet your specifications, assemble the findings into a clear, concise report, and dispatch tailored recommendation emails to every user in your organization, ensuring that each team member receives timely, relevant opportunities",id:"Tenant daily report settings / Subheading"})}),S?e.jsxs(b,{className:"mt-2",children:[e.jsx(w,{children:e.jsx(v,{className:"h-6 w-40"})}),e.jsx(C,{className:"space-y-4",children:[...Array(2)].map((g,o)=>e.jsx(v,{className:"h-4 w-full"},o))})]}):e.jsxs(b,{children:[e.jsxs(w,{children:[e.jsx("h2",{className:"text-xl font-bold",children:c}),e.jsx("p",{className:"text-sm text-muted-foreground",children:x})]}),e.jsx(C,{children:e.jsx(fe,{placeholder:y,value:h,onChange:g=>{m(g)}})})]}),S?e.jsxs(b,{className:"mt-2",children:[e.jsx(w,{children:e.jsx(v,{className:"h-6 w-40"})}),e.jsx(C,{className:"space-y-4",children:[...Array(3)].map((g,o)=>e.jsx(v,{className:"h-4 w-full"},o))})]}):e.jsxs(b,{children:[e.jsxs(w,{children:[e.jsx("h2",{className:"text-xl font-bold",children:T}),e.jsx("p",{className:"text-sm text-muted-foreground",children:I})]}),e.jsx(C,{children:e.jsx(le,{handleSearch:F,saveFiltersInUrl:!1,initialFilters:s,onFiltersChange:g=>l(g),mode:oe.SETTINGS})})]}),S?e.jsxs(b,{className:"mt-2",children:[e.jsx(w,{children:e.jsx(v,{className:"h-6 w-40"})}),e.jsx(C,{className:"space-y-4",children:[...Array(1)].map((g,o)=>e.jsx(v,{className:"h-4 w-full"},o))})]}):e.jsxs(b,{children:[e.jsxs(w,{children:[e.jsx("h2",{className:"text-xl font-bold",children:d}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i})]}),e.jsx(C,{children:e.jsx(ee,{value:t,onChange:g=>n(g.target.value),placeholder:r,className:"w-full mb-4"})})]}),!S&&e.jsx("div",{className:"sticky bottom-0 left-0 right-0 bg-gray-50 dark:bg-gray-900 border-t border-gray-200 dark:border-gray-700 p-4 shadow flex justify-start",children:e.jsx(R,{variant:"default",onClick:a,disabled:u,children:e.jsx(N,{defaultMessage:"Save report settings",id:"Tenant daily report settings / Save"})})})]})})})};export{be as default};

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.