PageSourceSearch

https://talento-cloud.com/dist/BadgeDetails-Bt8NdhtZ.js

js talento-cloud.com collected 2026-10-06 15:27:32 UTC 11,092 bytes, 1 lines download raw bytes

1import{_ as L,av as U,cC as G,aE as Q,g as X,h as J,G as k,r as n,o as i,k as a,l as s,m as c,w as l,t as r,F as p,v as z,n as m,p as f,s as C,aj as _,y as q,x as W,C as M,z as S,B as w,dO as O,D as V,E as T}from"./main-CW3c1lbs.js";import{A as j}from"./ShareBadegeModal-C48kHM7B.js";import{I as Z}from"./image-down-Dti8pZuQ.js";import{S as H}from"./share-DAr2cUuP.js";import{I as Y}from"./image-off-LyZICdfg.js";import"./link-2-CpNP8JMZ.js";import"./copy-CiI0hG_e.js";const P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAABBCAYAAACAXrcqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAABPpJREFUeAHlm0FoG0cUhv9RHCdx5GCnJU4LdVe2oTTQoFMhIVC5EKjaQ2LIMSXKrbfaBHoLlq6FEuXWW2Xae9JDUUNL5UKh0EtFD4HSJCu3UJrSJqKWq9ixdjJvFQVrNZJ3Z2dWXvLB4mU1u9av997MvPckBh1crSwiwc6Js7Q4JqCHqnswXkB+voaQMIQhX7HAWUWcWTAKK6Lw1hJCoC60LfJn6LPgbpRQyFyGIgmo0rZkVCKJnBsiiqhZ9GolJ2LyM0RPXcRsSsRsHQFRs2iCXcJwIA/KQAFV101jWDhq/1tVaJSx2Q1jr0KBEUTE4dF9OD09gaT4S9x90MQvf60jKowLnUqO4sqZFE4eH+957X5jE9/c+RdfVP+EaYwJJQu+n34Z509M9R0zlTyAi2LM2bkXXLEk2hRGhNKbXzhxTIj193gSTFZfEB9K4bs7wtJb0I1WoeSeV85Y7htXYeboGFYunBSW/ce1sE7BWoSSQLKiLA5VODv3onuQWF3xG0qonzgMg874VRZK8X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CEkoYV2aAveLori8TmEpL1c8OuPkCyquGmfZ+olfPyyUhNjS7oEPnsqDBFUsI44HIQxoYS/+A22HqpiVGgHEsyd1iJjPN2xsLB2VWRKq00cLul20+eaJyQY7P9pDga/AAAAAElFTkSuQmCC",K={name:"BadgeDetails",emits:[],props:["id"],data(){return{isLoading:!1,url:null,CERT_DESIGN_W:1123,CERT_DESIGN_H:794,certScale:1}},methods:{...T("badgeDetails",["getBadgeDetail"]),...T("common",["updateBreadcrumbs"]),...V("badgeDetails",["RESET"]),async open(){this.isLoading=!0;try{this.RESET(),this.id&&await this.getBadgeDetail(this.id)}catch{this.$router.push({name:"AccessDenied"})}this.isLoading=!1},backClicked(){this.$router.push({name:"MyActivities",query:{tab:"Badges"}})},async downloadCertificateClicked(){if(this.hasCertificateTemplate){const e=await O.getHtml(this.certificate.certificateTemplateID,this.certificate.id);this.printCertificate(e)}else if(this.certificate.evidenceFile){const e=await S.createFileDownloadSession(this.certificate.evidenceFile.id);await w.download(this.certificate.evidenceFile.id,e)}},async downloadImageClicked(){const e=this.downloadableImage;if(!e)return;const d=await S.createFileDownloadSession(e.id);await w.download(e.id,d)},printCertificate(e){const d="@page { size: A4 landscape; margin: 0 !important; }",g="<style>"+d+"html, body { margin: 0 !important; padding: 0 !important; }* { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }</style>",A=/<\/head>/i.test(e)?e.replace(/<\/head>/i,g+"</head>"):g+e,h=document.createElement("style");h.textContent=d,document.head.appendChild(h);const t=document.createElement("iframe");t.setAttribute("aria-hidden","true"),t.style.cssText="position:fixed;left:-10000px;top:0;width:1123px;height:794px;border:0;",document.body.appendChild(t);const y=()=>{t.remove(),h.remove()};t.onload=()=>{const v=t.contentWindow;v.focus(),v.print(),v.onafterprint=y,setTimeout(y,6e4)};const o=t.contentWindow.document;o.open(),o.write(A),o.close()},shareClicked(){this.url="https://"+this.getApplicationContext.entity.domainName+"/badge?id="+this.certificate.id,this.$refs.shareBadge.open()},getPageHtml(){return M.getUrl(`v1.0/badge/getHtml?id=${this.certificate.certificateTemplateID}&badgeID=${this.certificate.id}`)},updateCertScale(){const e=this.$refs.certFrame;if(!e)return;const d=e.clientWidth;d>0&&(this.certScale=d/this.CERT_DESIGN_W)},ensureCertScaling(){const e=this.$refs.certFrame;e&&(!this.certResizeObserver&&typeof ResizeObserver<"u"&&(this.certResizeObserver=new ResizeObserver(()=>this.updateCertScale())),this.certResizeObserver&&(this.certResizeObserver.disconnect(),this.certResizeObserver.observe(e)),this.updateCertScale())}},computed:{...W("badgeDetails",{certificate:e=>e.certificate}),...q("common",["getApplicationContext"]),Globals:()=>k,shieldStarIcon:()=>P,isApproved(){return this.certificate.status=="Approved"},hasCertificateTemplate(){const e=this.certificate.certificateTemplateID;return!!e&&e!=k.Guid.Empty},evidenceType(){var e;return((e=this.certificate.evidenceFile)==null?void 0:e.type)||"other"},downloadableImage(){return this.certificate.svgFile?this.certificate.svgFile:this.evidenceType=="image"?this.certificate.evidenceFile:null},certIframeStyle(){return{width:this.CERT_DESIGN_W+"px",height:this.CERT_DESIGN_H+"px",transform:`scale(${this.certScale})`}},certFrameHeight(){return this.CERT_DESIGN_H*this.certScale+"px"}},watch:{"certificate.certificateTemplateID"(){this.$nextTick(this.ensureCertScaling)}},mounted(){this.updateBreadcrumbs([{name:"resx.Home",route:{name:"Home"}},{name:"resx.MyActivities",route:{name:"MyActivities"}},{name:"resx.MyCertificates",route:{name:"MyActivities",query:{tab:"Badges"}}},{name:"resx.AchievementDetails"}]),this.open(),this.$nextTick(this.ensureCertScaling)},beforeUnmount(){this.certResizeObserver&&(this.certResizeObserver.disconnect(),this.certResizeObserver=null)},components:{AppShareModal:j,Loading:J,Button:X,Card:Q,ChevronLeft:G,ImageOff:Y,Share:H,ImageDown:Z,FileText:U}},$={class:"tw"},ee={class:"w-full px-4 py-6 sm:px-6"},te={class:"mb-4 flex items-center gap-3"},ie={class:"text-xl font-semibold sm:text-2xl"},ae={key:0,class:"py-16 text-center"},se={class:"text-muted-foreground text-sm"},ce={key:1,class:"mx-auto max-w-3xl text-center"},re={class:"mx-auto mb-3 flex size-16 items-center justify-center rounded-full border bg-card shadow-sm"},ne=["src"],oe={class:"text-primary text-lg font-medium"},le={class:"mt-1 text-2xl font-bold sm:text-3xl"},de={class:"flex h-72 items-center justify-center overflow-hidden rounded-lg"},me=["src"],fe=["src","alt"],he={class:"mt-6 flex w-full gap-3"},ue={key:0,class:"certificate-frame"},pe=["src"],ge={key:1,class:"certificate-frame"},ve=["src","alt"],Ce={key:2,class:"certificate-frame"},ye=["src","title"],Ae={key:3,class:"text-muted-foreground mt-8 text-sm"},xe={class:"mt-6 flex w-full gap-3"};function be(e,d,g,A,h,t){const y=n("ChevronLeft"),o=n("Button"),v=n("router-link"),E=n("i18n-t"),F=n("ImageOff"),I=n("Card"),x=n("Share"),B=n("ImageDown"),b=n("FileText"),D=n("loading"),R=n("app-share-modal");return i(),a("div",$,[s("div",ee,[s("div",te,[c(o,{variant:"ghost",size:"icon","aria-label":e.$t("resx.Back"),onClick:t.backCl
1icked},{default:l(()=>[c(y,{class:"size-5"})]),_:1},8,["aria-label","onClick"]),s("h1",ie,r(e.$t("resx.AchievementDetails")),1)]),g.id?e.certificate.achievementType?(i(),a("div",ce,[s("div",re,[s("img",{src:t.shieldStarIcon,alt:"",class:"size-10"},null,8,ne)]),s("p",oe,r(e.$t("resx.BadgeEarnedEyebrow")),1),s("h2",le,r(e.$t("resx.BadgeEarnedGreeting",{name:e.certificate.issuedToName})),1),c(E,{keypath:"resx.BadgeEarnedCompleted",tag:"p",scope:"global",class:"text-muted-foreground mt-2"},{criteria:l(()=>[e.certificate.documents.length?(i(!0),a(p,{key:0},z(e.certificate.documents,(u,N)=>(i(),a(p,{key:u.id},[c(v,{to:{name:"EcoObjectView",query:{id:u.id}},class:"text-primary no-underline"},{default:l(()=>[m(r(u.name),1)]),_:2},1032,["to"]),N<e.certificate.documents.length-1?(i(),a(p,{key:0},[m(", ")],64)):f("",!0)],64))),128)):(i(),a(p,{key:1},[m(r(e.certificate.achievementName),1)],64))]),_:1}),e.certificate.achievementType=="Badge"?(i(),a(p,{key:0},[c(I,{class:"mt-6 w-full px-8 py-14"},{default:l(()=>{var u;return[s("div",de,[(u=e.certificate.svgFile)!=null&&u.data?(i(),a("img",{key:0,src:`data:image/svg+xml;utf8,${encodeURIComponent(e.certificate.svgFile.data)}`,alt:"Badge",class:"max-h-full max-w-full object-contain"},null,8,me)):t.evidenceType=="image"?(i(),a("img",{key:1,src:e.certificate.evidenceFile.url,alt:e.certificate.achievementName,class:"max-h-full max-w-full object-contain"},null,8,fe)):(i(),C(F,{key:2,class:"text-muted-foreground/50 size-16"}))])]}),_:1}),s("div",he,[t.isApproved?(i(),C(o,{key:0,class:"flex-1",onClick:t.shareClicked},{default:l(()=>[c(x,{class:"size-4"}),m(" "+r(e.$t("resx.ShareBadge")),1)]),_:1},8,["onClick"])):f("",!0),c(o,{variant:"outline",class:"flex-1",disabled:t.downloadableImage==null,onClick:t.downloadImageClicked},{default:l(()=>[c(B,{class:"size-4"}),m(" "+r(e.$t("resx.DownloadImage")),1)]),_:1},8,["disabled","onClick"]),t.hasCertificateTemplate?(i(),C(o,{key:1,variant:"outline",class:"flex-1",onClick:t.downloadCertificateClicked},{default:l(()=>[c(b,{class:"size-4"}),m(" "+r(e.$t("resx.DownloadCertificate")),1)]),_:1},8,["onClick"])):f("",!0)])],64)):e.certificate.achievementType=="Certificate"?(i(),a(p,{key:1},[t.hasCertificateTemplate?(i(),a("div",ue,[s("div",{ref:"certFrame",class:"certificate-stage",style:_({height:t.certFrameHeight})},[s("iframe",{src:t.getPageHtml(),class:"certificate-iframe",style:_(t.certIframeStyle),id:"myCertificateIframe",scrolling:"no",frameborder:"0"},null,12,pe)],4)])):t.evidenceType=="image"?(i(),a("div",ge,[s("img",{src:e.certificate.evidenceFile.url,alt:e.certificate.achievementName,class:"block w-full"},null,8,ve)])):t.evidenceType=="pdf"?(i(),a("div",Ce,[s("iframe",{src:e.certificate.evidenceFile.url+"#toolbar=0&navpanes=0",title:e.certificate.achievementName,class:"evidence-pdf",frameborder:"0"},null,8,ye)])):(i(),a("p",Ae,r(e.$t("resx.ContentNotFound")),1)),s("div",xe,[t.isApproved?(i(),C(o,{key:0,class:"flex-1",onClick:t.shareClicked},{default:l(()=>[c(x,{class:"size-4"}),m(" "+r(e.$t("resx.ShareCertificate")),1)]),_:1},8,["onClick"])):f("",!0),t.hasCertificateTemplate||e.certificate.evidenceFile?(i(),C(o,{key:1,variant:"outline",class:"flex-1",onClick:t.downloadCertificateClicked},{default:l(()=>[c(b,{class:"size-4"}),m(" "+r(e.$t("resx.DownloadCertificate")),1)]),_:1},8,["onClick"])):f("",!0)])],64)):f("",!0)])):f("",!0):(i(),a("div",ae,[s("p",se,r(e.$t("resx.ContentNotFound")),1)]))]),c(D,{active:h.isLoading,"can-cancel":!1,"is-full-page":!1},null,8,["active"]),c(R,{ref:"shareBadge",id:g.id,url:h.url,"achievement-type":e.certificate.achievementType},null,8,["id","url","achievement-type"])])}const Ie=L(K,[["render",be],["__scopeId","data-v-0a6f727f"]]);export{Ie 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.