PageSourceSearch

https://promakod.uz/assets/DaromadDetail-B6UrJ6Q3.js

js promakod.uz collected 2026-10-02 02:10:27 UTC 9,522 bytes, 1 lines download raw bytes

1import{h as F,r as T,j as e,L as p}from"./vendor-react-CnqPvWtE.js";import{u as q,b as R,a as z,v as H,N as U,w as L,k as W,e as Y,H as G,j as I,s as A}from"./index-4OJGohLf.js";import{u as D}from"./vendor-query-BHo95kTe.js";import{B as K}from"./Breadcrumb-BL5iM2hO.js";import{d as Q,a as n,b as $,s as Z,v as g,r as J,j as X,C as ee,B as ae,E as se,t as te,c as re,V as C}from"./vacancies-D7J1LMX8.js";import{p as f,G as ne,$ as oe,a0 as ie,c as le,C as de,f as ce,V as me,E as xe}from"./vendor-icons-CD64bo--.js";import{f as E}from"./vendor-date-BEqYJ1wf.js";import"./vendor-radix-DmpERO9M.js";import"./vendor-supabase-DwTFzKkW.js";const pe=d=>d.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim(),we=()=>{const{slug:d}=F(),{t:s,language:t}=q(),c=R(),{data:a,isLoading:y}=D({queryKey:["vacancies","detail",d],queryFn:async()=>{const{data:r,error:k}=await A.from("vacancies").select(C).eq("slug",d).eq("is_active",!0).maybeSingle();if(k)throw k;return r??null},enabled:!!d,staleTime:5*60*1e3}),{data:u}=D({queryKey:["vacancies","others",a?.id],queryFn:async()=>{const{data:r}=await A.from("vacancies").select(C).eq("is_active",!0).or(`valid_through.is.null,valid_through.gte.${L()}`).neq("id",a.id).order("is_featured",{ascending:!1}).order("display_order",{ascending:!0}).limit(3);return r??[]},enabled:!!a?.id,staleTime:5*60*1e3});T.useEffect(()=>{a?.id&&Q(a.id)},[a?.id]),z(!y);const i=a?n(a,"description",t):"",P=T.useMemo(()=>i?H.sanitize(i,{ALLOWED_TAGS:["h1","h2","h3","h4","h5","h6","p","a","ul","ol","li","strong","em","u","br","img","blockquote","code","pre","div","span","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","src","alt","title","class","target","rel"],ALLOW_DATA_ATTR:!1}):"",[i]);if(y)return e.jsx("div",{className:"container mx-auto px-4 py-8",children:e.jsxs("div",{className:"max-w-3xl mx-auto space-y-4",children:[e.jsx("div",{className:"h-8 w-2/3 skeleton-shine rounded"}),e.jsx("div",{className:"h-64 skeleton-shine rounded-2xl"})]})});if(!a)return e.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[e.jsx(U,{title:`${s("incomeNotFound")} | Promakod.uz`}),e.jsx(f,{className:"w-10 h-10 mx-auto mb-3 text-muted-foreground"}),e.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:s("incomeNotFound")}),e.jsx("p",{className:"text-muted-foreground mb-6 max-w-md mx-auto",children:s("incomeNotFoundDesc")}),e.jsx(p,{to:c("/daromad"),className:$,children:s("incomeBackToList")})]});const o=n(a,"title",t),m=n(a,"short_text",t),x=Z(a,t),j=n(a,"location",t),N=n(a,"badge_text",t),l=g(a),S=a.kind==="referral"?s("incomeKindReferral"):s("incomeKindVacancy"),O=o.toLowerCase().includes(a.company_name.toLowerCase()),M=n(a,"meta_title",t)||(O?`${o} ${new Date().getFullYear()}`:`${o} — ${a.company_name}`),V=n(a,"meta_description",t)||m||pe(i).slice(0,155),h=a.valid_through||new Date(new Date(a.created_at).getTime()+90*864e5).toISOString().slice(0,10),b=L(),v=!!a.valid_through&&a.valid_through.slice(0,10)<b,w=W(a.apply_url),B=t==="ru"?`${a.view_count} ${J(a.view_count,"просмотр","просмотра","просмотров")}`:`${a.view_count} ${s("incomeViews")}`,_=a.kind==="vacancy"&&!v&&h.slice(0,10)>=b?{"@context":"https://schema.org","@type":"JobPosting",title:X(o),description:i||m||o,datePosted:a.created_at.slice(0,10),validThrough:h,employmentType:a.employment_type,hiringOrganization:{"@type":"Organization",name:a.company_name,...l?{logo:l}:{}},jobLocation:{"@type":"Place",address:{"@type":"PostalAddress",addressLocality:j||"Toshkent",addressRegion:t==="ru"?"Ташкент":"Toshkent",addressCountry:"UZ"}},...a.salary_min||a.salary_max?{baseSalary:{"@type":"MonetaryAmount",currency:"UZS",value:{"@type":"QuantitativeValue",...a.salary_min?{minValue:a.salary_min}:{},...a.salary_max?{maxValue:a.salary_max}:{},unitText:"MONTH"}}}:{},identifier:{"@type":"PropertyValue",name:"promakod.uz",value:a.id},directApply:!1}:null;return e.jsxs(e.Fragment,{children:[e.jsx(Y,{pageTitle:`${M} | Promakod.uz`,pageDescription:V,pageUrl:`https://promakod.uz/daromad/${a.slug}`}),e.jsxs(G,{children:[v&&e.jsx("meta",{name:"robots",content:"noindex, follow"}),e.jsx("meta",{property:"og:type",content:"website"}),l&&e.jsx("meta",{property:"og:image",content:l}),_&&e.jsx("script",{type:"application/ld+json",children:I(_)})]}),e.jsx("div",{className:"bg-background",children:e.jsxs("main",{className:"container mx-auto px-4 py-8",children:[e.jsx(K,{items:[{label:s("income"),href:"/daromad"},{label:o}]}),e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsxs("header",{className:"bg-card border border-border rounded-2xl p-5 md:p-7 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[e.jsx("div",{className:"w-12 h-12 sm:w-16 sm:h-16 rounded-xl bg-secondary flex items-center justify-center overflow-hidden shrink-0",children:l?e.jsx("img",{src:l,alt:a.company_name,className:"w-full h-full object-contain"}):a.kind==="referral"?e.jsx(ne,{className:"w-7 h-7 text-primary"}):e.jsx(f,{className:"w-7 h-7 text-primary"})}),e.jsxs("div",{className:"min-w-0 flex-1 flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[a.brand?.slug?e.jsx(p,{to:c(`/promokod/${a.brand.slug}`),className:"text-sm font-medium text-foreground hover:text-primary transition-colors",children:a.company_name}):e.jsx("span",{className:"text-sm font-medium text-foreground",children:a.company_name}),a.brand_id&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-primary",title:s("incomeOfficial"),children:[e.jsx(oe,{className:"w-4 h-4","aria-hidden":"true"}),s("incomeOfficial")]}),e.jsx("span",{className:ee,children:S}),N&&e.jsx("span",{className:ae,children:N})]})]}),e.jsx("h1",{className:"mt-4 text-2xl md:text-3xl font-bold text-foreground leading-tight",children:o}),m&&e.jsx("p",{className:"mt-2 text-muted-foreground",children:m}),e.jsxs("dl",{className:"mt-5 flex flex-wrap gap-x-8 gap-y-3 text-sm",children:[x.main&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ie,{className:"w-4 h-4 text-primary shrink-0 mt-0.5","aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:s("incomeSalary")}),e.jsx("dd",{className:"font-semibold text-foreground",children:x.main}),x.note&&e.jsx("dd",{className:"text-xs text-muted-foreground",children:x.note})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(le,{className:"w-4 h-4 text-primary shrink-0 mt-0.5","aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:s("incomeLocation")}),e.jsx("dd",{className:"font-semibold text-foreground",children:j})]})]}),a.kind==="vacancy"&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(de,{className:"w-4 h-4 text-primary shrink-0 mt-0.5","aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:s("incomeType")}),e.jsx("dd",{className:"font-semibold text-foreground",children:se[t][a.employment_type]||a.employment_type})]})]})]}),w&&e.jsxs("a",{href:w,target:"_blank",rel:"sponsored nofollow noopener",onClick:()=>te(a.id),className:`${$} mt-6 w-full sm:w-auto h-12 px-8 text-base`,children:[s("incomeApply"),e.jsx(ce,{className:"w-4 h-4","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:s("incomeNewWindow")})]}),e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:s("incomeDisclosure")})]}),i&&e.jsx("div",{className:"prose md:prose-lg max-w-none text-foreground break-words prose-headings:text-foreground prose-h2:text-xl md:prose-h2:text-2xl prose-h2:font-bold prose-h2:mt-8 prose-h2:mb-3 prose-h3:text-lg md:prose-h3:text-xl prose-p:text-muted-foreground prose-li:text-muted-foreground prose-a:text-primary prose-a:break-all prose-strong:text-foreground prose-img:max-w-full prose-img:h-auto prose-pre:overflow-x-auto prose-table:block prose-table:overflow-x-auto",dangerouslySetInnerHTML:{__html:P}}),e.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-x-5 gap-y-1 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(me,{className:"w-3.5 h-3.5","aria-hidden":"true"}),s("incomePosted"),": ",E(new Date(a.created_at),"dd.MM.yyyy")]}),e.jsxs("span",{children:[s("incomeValidThrough"),": ",E(new Date(h),"dd.MM.yyyy")]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(xe,{className:"w-3.5 h-3.5","aria-hidden":"true"}),B]})]}),u&&u.length>0&&e.jsxs("section",{className:"mt-12",children:[e.jsx("h2",{className:"text-xl md:text-2xl font-bold text-foreground mb-4",children:s("incomeOthers")}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:u.map(r=>e.jsxs(p,{to:c(`/daromad/${r.slug}`),className:"flex items-center gap-3 rounded-xl border border-border bg-card p-4 hover:border-primary/50 transition-colors",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-secondary overflow-hidden flex items-center justify-center shrink-0",children:g(r)?e.jsx("img",{src:g(r),alt:r.company_name,className:"w-full h-full object-contain",loading:"lazy"}):e.jsx(f,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:r.company_name}),e.jsx("div",{className:"font-medium text-foreground truncate",children:n(r,"title",t)})]})]},r.id))}),e.jsx(p,{to:c("/daromad"),className:`${re} mt-5`,children:s("incomeBackToList")})]})]})]})})]})};export{we 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.