1import{V as T,aa as Q,aB as d,N as g,F as B,J as n,aV as c,b1 as e,R as l,M as w,bd as i,Q as S,aI as X,L as A,e as k,aL as Y,H as y,aG as L,_ as Z,aD as K}from"./vue-CEdsXs9J.js";import{hp as D,cw as E,cC as _,X as b,e7 as R,G as N,gV as r,b_ as P,bZ as ee,hU as te,hV as se,ht as ae,_ as oe,c4 as ne,dj as le,fR as ie}from"./index-CjrlTE-d.js";import{a as re,g as ce,h as ue}from"./shared-yvLX0_-o.js";import{c as $}from"./symbols-AwoF4VYA.js";import{u as pe}from"./useRouteState-oY0XMVTJ.js";import{B as de}from"./BaseInfoCard-BttJ9PyF.js";import{B as me,t as fe}from"./lodash-BpnefVj1.js";import{s as _e,a as ge}from"./breadcrumbs-B1CTl1A-.js";import{_ as he}from"./BaseExportFile.vue_vue_type_script_setup_true_lang-Czbt_DCR.js";import{B as ve}from"./BaseTable-hmGldAHZ.js";import"./bootstrap-Cvcg56Lw.js";import"./bundle-oH7WGSC4.js";import"./customization-B28NJ2sk.js";import"./languages-DCtWyWtD.js";import"./tiptap-BTM6ymCR.js";import"./BaseFilterTags-COY6y9-M.js";/* empty css */import"./BasePagination-BSyGRtIl.js";/* empty css */import"./BaseTableGrid-DvtzCiqb.js";import"./shared-y162eL53.js";/* empty css *//* empty css */import"./BaseTableItem-Dpi8nwvV.js";/* empty css */import"./symbols-DgF3aVKi.js";import"./BaseTableActions-5Ou58Bqm.js";/* empty css */import"./currency-CdF2UedL.js";import"./currency-symbol-map-BiuZ2-54.js";import"./BaseProgress-DA0kRDsJ.js";import"./number-H5ZE8bPa.js";/* empty css */import"./statusCodeColor-B-QmwDyk.js";/* empty css */import"./BaseTableV2Loading-tb7ncNWO.js";/* empty css */const ye={class:"detail-header"},we={class:"d-flex flex-column align-items-start"},xe={class:"fs-2 fw-bold mr-2"},Ce={class:"d-flex justify-content-end align-items-center mt-6"}
1,Fe={class:"d-flex justify-content-center align-items-center"},Ie={class:"ps-3 text-gray-700"},Be={key:0,class:"d-flex justify-content-center align-items-center ms-6"},Se={class:"ps-3 text-gray-700"},De={key:0,class:"edit-buttons"},Ee={class:"d-flex justify-content-start flex-wrap align-items-center gap-4 my-6"},Pe=T({__name:"CourseFlowDetailHeader",setup(O){const{canEdit:x,flowInfo:s,flowId:p}=Q($),h=pe(),a=()=>h.push(E.COURSES.children.FLOW_EDIT.getPath(s.value.course.id,p.value)),v=D(_.courses.flow.deleteCourseFlow,({data:u})=>u,{onSuccess:()=>{h.push(E.COURSES.children.DETAIL.children.FLOW.getPath(s.value.course.id))}}),C=async()=>{const u=await ue(p.value);if(me(u))v.fetch({pathParams:{flow:p.value},params:{replacement_flow:u}});else if(fe(u)&&u===!0)v.fetch({pathParams:{flow:p.value}});else return};return(u,F)=>(d(),g(B,null,[n("header",ye,[n("div",we,[n("div",null,[n("span",xe,c(e(s).name),1),l(b,{color:e(R)(e(s).status.code),inverse:e(s).status.code==="planned",text:e(s).status.name},null,8,["color","inverse","text"])]),n("div",Ce,[n("div",Fe,[l(N,{name:"file-earmark-fill",spacer:4,color:"gray700"}),n("span",Ie,c(e(s).course.name),1)]),e(s).days?(d(),g("div",Be,[l(N,{name:"calendar",spacer:4,color:"gray700"}),n("span",Se,c(e(r)("datetime.days",{},e(s).days)),1)])):w("",!0)])]),e(x)?(d(),g("div",De,[l(P,{color:"light","text-active-color":"danger","prepend-icon":"delete-7",onClick:C},{default:i(()=>[S(c(e(r)("actions.toDelete")),1)]),_:1}),l(P,{"prepend-icon":"pencil-6","text-active-color":"primary",color:"light",class:"ms-6",onClick:a},{default:i(()=>[S(c(e(r)("actions.toEdit")),1)]),_:1})])):w("",!0)]),n("div",Ee,[(d(!0),g(B,null,X(e(s).items,(f,I)=>(d(),A(de,{key:I,title:f.name,count:f.count,gap:6,"title-icon":e(ce)(f.code),color:e(re)(f.code),class:"min-w-[150px]"},null,8,["title","count","title-icon","color"]))),128))])],64))}}),ke=ee(Pe,[["__scopeId","data-v-7174b364"]]),Le={class:"fs-2 fw-bold"},Ne={key:0},gt=T({__name:"CourseFlowDetailPage",setup(O){_e(!1,!0);const x=te();se();const s=y(()=>Number(x.params.id)),p=L(!0),h=L(),a=ae(t=>_.courses.flow.getCourseFlowDetail(s.value,t),"data.items",{immediate:!0,query:!0,onSuccess:({response:t})=>{ge(`${r("flow.title")} - ${t.data?.info?.name}`),p.value&&(p.value=!1)}}),{isLoading:v}=a,C=y(()=>a.root.value?.info),u=y(()=>a.root.value?.canEdit),F=y(()=>a.root.value?.canNotifyAll===!0),f=[{code:"user",min:"200px"},{code:"progress",size:"200px"},{code:"status",min:"125px"}],I=t=>r("flow.progress",{passed:t.score.passed,count:t.score.count}),V=t=>t?`${t.count} ${t.all?"/ "+t.all:" / â"}`:"-";function U(t){return E.COURSES.children.STUDENT_DETAIL.getPath(s.value,t.user.participantId)}function j(t){ie(()=>_.courses.flow.deleteFlowParticipant(s.value,t,a.requestParams.value)).then(m=>a.patch(m)).catch(()=>!1)}const{fetch:q}=D(t=>_.courses.flow.notifyFlowParticipant(s.value,t),{onSuccess:({state:t})=>{k({message:t.message||r("notifications.sent"),type:"success"})}}),{fetch:G,isLoading:H}=D(()=>_.courses.flow.notifyAllFlowParticipants(s.value),{onSuccess:({state:t})=>{k({message:t.message||r("notifications.sent"),type:"success"})}});function M(t,m){if(t==="delete"){j(m.user.participantId);return}t==="notify"&&q(m.user.participantId)}function W(){G()}function z(){h.value=`${a.root.value?.reportName} ${Z().format(le)}`}return K($,{canEdit:u,canNotifyAll:F,flowInfo:C,flowId:s}),(t,m)=>{const J=Y("el-skeleton");return d(),g(B,null,[l(oe,{title:e(r)("education.title")},{default:i(()=>[l(he,{"api-method":e(_).courses.flow.exportFlow.bind(null,s.value),filters:e(a).filters,"file-name":h.value,"dto-values":[e(a).requestParams.value],"color-button":"gray100",onBeforeExport:z},null,8,["api-method","filters","file-name","dto-values"])]),_:1},8,["title"]),l(J,{animated:"",loading:p.value},{default:i(()=>[l(ne,null,{default:i(()=>[l(ke,{onUpdate:m[0]||(m[0]=o=>e(a).patch(o))}),n("span",Le,c(e(r)("flow.participants")),1),l(ve,{"actions-as-icons":"",instance:e(a),searchable:"","columns-width":f,loading:e(v),class:"mt-6","row-link":U,onAction:M},{"near-tabs-after":i(()=>[F.value?(d(),A(P,{key:0,"prepend-icon":"send-message","text-active-color":"primary",color:"light",loading:e(H),onClick:W},{default:i(()=>[S(c(e(r)("education.courses.notifyAllFlowParticipants")),1)]),_:1},8,["loading"])):w("",!0)]),status:i(({item:o})=>[l(b,{color:e(R)(o?.status.code),inverse:o?.status.code==="planned",text:o?.status.name},null,8,["color","inverse","text"])]),score:i(({item:o})=>[o.score?(d(),g("span",Ne,c(I(o)),1)):w("",!0)]),attempts:i(({item:o})=>[n("span",null,c(V(o.attempts)),1)]),assignment_type:i(({item:o})=>[n("span",null,c(o.assignment_type.name),1)]),_:1},8,["instance","loading"])]),_:1})]),_:1},8,["loading"])],64)}}});
1export{gt 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.