PageSourceSearch

https://awsentrena.com/dist/ResetAssessments-BdsPIuPk.js

js awsentrena.com collected 2026-10-05 18:56:33 UTC 7,220 bytes, 1 lines download raw bytes

1import{_ as L,aJ as U,f as N,g as F,L as O,S as z,aa as K,i as P,h as q,r as n,o as u,k as f,l as p,m as s,q as j,p as _,w as a,s as h,n as o,t as r,F as J,v as G,a3 as Q,D as W,E as X,u as Y}from"./main-CW3c1lbs.js";import{A as Z}from"./MultiSelect2-xM-tO7RE.js";import{P as ee}from"./PageHeader-DhtVZcXw.js";import{M as se}from"./MenuButton-D6ev3YDA.js";import{_ as te,a as ae,b as ne,c as le,d as oe}from"./TableHeader-CQRknPYC.js";import{_ as re}from"./TableBody-CwZsw-TT.js";import{_ as ie}from"./TableEmpty-ByAb2BTs.js";import{R as ce}from"./rotate-ccw-CTE8Yv9z.js";import{E as de}from"./eraser-BR9IiLwx.js";const me={name:"ResetAssessments",emits:[],data(){return{isSearching:!1,ui:Y}},methods:{...X("resetAssessment",["getAssessments","resetAssessment"]),...W("resetAssessment",["RESET_SEARCH"]),async getData(){this.isSearching=!0,this.criteria.entityID.length!=0&&this.criteria.userID.length!=0&&await this.getAssessments(),this.isSearching=!1},async clearKeyword(){this.criteria.keyword="",await this.getData()},startMultiSelectUser(){this.$nextTick(()=>{this.criteria.entityID.length!=0&&(this.$refs.users.clearAllClicked(),this.$refs.users.loadOptions(""))})},getActionMenu(e){return[{id:"Reset",name:this.$t("resx.Reset"),data:e,iconCssClass:"fa-redo",enabled:e.CompletionStatus!="None",click:(l,g)=>{this.resetAssessmentClicked(g)}}]},async resetAssessmentClicked(e){this.$refs.OkCancelMsgBox.show("question",this.$t("resx.Confirmation"),this.$t("resx.ConfirmResetAssessment"),async()=>(await this.resetAssessment([e.SID]),this.getData(),!0))},async resetAllAssessmentClicked(){const e=this.assessments.list.filter(l=>l.selected).map(l=>l.SID);this.$refs.OkCancelMsgBox.show("question",this.$t("resx.Confirmation"),this.$t("resx.ConfirmResetAssessment"),async()=>(await this.resetAssessment(e),this.getData(),!0))}},computed:{...Q("resetAssessment",{assessments:"assessments",criteria:"criteria"}),disabledResetAllAssessment(){return!(this.criteria.entityID.length!=0&&this.criteria.userID.length!=0)},disabledUserDropDown(){return!(this.criteria.entityID.length!=0&&this.criteria.entityID!=null)}},mounted(){this.RESET_SEARCH()},components:{Loading:q,AppMultiSelect:Z,AppOkCancelMessageBox:P,AppOkMessageBox:K,PageHeader:ee,MenuButton:se,Search:z,Loader2:O,Eraser:de,RotateCcw:ce,Button:F,Input:N,Checkbox:U,Table:oe,TableBody:re,TableCell:le,TableHead:ne,TableHeader:ae,TableRow:te,TableEmpty:ie}},ue={class:"tw"},pe={class:"w-full px-4 py-6 sm:px-6"},fe={class:"mt-5 grid grid-cols-1 gap-3 md:grid-cols-3"},_e={class:"flex items-center gap-2"},he={class:"relative flex-1 rounded-lg border bg-card"},ge=["title"],be={class:"mt-6"},ye={class:"mt-4 flex justify-end"};function Ce(e,l,g,De,m,i){const D=n("PageHeader"),b=n("app-multi-select"),w=n("Search"),A=n("Input"),k=n("Eraser"),x=n("Loader2"),y=n("Button"),c=n("TableHead"),C=n("TableRow"),S=n("TableHeader"),T=n("TableEmpty"),$=n("Checkbox"),d=n("TableCell"),v=n("MenuButton"),I=n("TableBody"),R=n("Table"),B=n("RotateCcw"),E=n("loading"),M=n("app-ok-cancel-message-box"),V=n("app-ok-message-box");
1return u(),f("div",ue,[p("div",pe,[s(D,{title:e.$t("resx.ResetAssessments")},null,8,["title"]),p("div",fe,[s(b,{name:"entities",placeholder:e.$t("resx.AllEntities"),"get-async-method":"v1.0/entity/listForDropDownList","clear-on-select":!0,modelValue:e.criteria.entityID,"onUpdate:modelValue":l[0]||(l[0]=t=>e.criteria.entityID=t),"max-selected-options":1,"close-on-select":!0,onChange:i.startMultiSelectUser},null,8,["placeholder","modelValue","onChange"]),s(b,{ref:"users",name:"users",placeholder:e.$t("resx.AllUsers"),"post-async-method":e.criteria.entityID.length!=0?"v1.0/user/listEntityForDropDownList":"v1.0/entity/listForDropDownList","clear-on-select":!0,modelValue:e.criteria.userID,"onUpdate:modelValue":l[1]||(l[1]=t=>e.criteria.userID=t),payload:{entityID:e.criteria.entityID.length!=0?e.criteria.entityID[0].Value:""},"max-selected-options":1,disabled:i.disabledUserDropDown,"close-on-select":!0,onChange:l[2]||(l[2]=t=>i.getData())},null,8,["placeholder","post-async-method","modelValue","payload","disabled"]),p("div",_e,[p("div",he,[s(w,{class:"text-muted-foreground pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2"}),s(A,{modelValue:e.criteria.keyword,"onUpdate:modelValue":l[3]||(l[3]=t=>e.criteria.keyword=t),placeholder:e.$t("resx.SearchPlaceholder"),class:"border-0 bg-transparent pl-9 pr-9 shadow-none focus-visible:ring-0",onKeyup:l[4]||(l[4]=j(t=>i.getData(),["enter"]))},null,8,["modelValue","placeholder"]),e.criteria.keyword?(u(),f("button",{key:0,type:"button",class:"text-muted-foreground hover:text-foreground absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer",title:e.$t("resx.Clear"),onClick:l[5]||(l[5]=(...t)=>i.clearKeyword&&i.clearKeyword(...t))},[s(k,{class:"size-4"})],8,ge)):_("",!0)]),s(y,{size:"sm",disabled:m.isSearching,onClick:l[6]||(l[6]=t=>i.getData())},{default:a(()=>[m.isSearching?(u(),h(x,{key:0,class:"size-4 animate-spin"})):_("",!0),o(" "+r(e.$t("resx.Search")),1)]),_:1},8,["disabled"])])]),p("div",be,[s(R,{class:"table-fixed"},{default:a(()=>[s(S,null,{default:a(()=>[s(C,null,{default:a(()=>[s(c,{class:"w-10 text-center"}),s(c,{class:"w-[24%]"},{default:a(()=>[o(r(e.$t("resx.AssessmentName")),1)]),_:1}),s(c,{class:"w-[14%]"},{default:a(()=>[o(r(e.$t("resx.Status")),1)]),_:1}),s(c,{class:"w-[16%]"},{default:a(()=>[o(r(e.$t("resx.CompletionStatus")),1)]),_:1}),s(c,{class:"w-[18%]"},{default:a(()=>[o(r(e.$t("resx.StartedDate")),1)]),_:1}),s(c,{class:"w-[18%]"},{default:a(()=>[o(r(e.$t("resx.CompletedDate")),1)]),_:1}),s(c,{class:"w-10 text-center"},{default:a(()=>[o(r(e.$t("resx.Actions")),1)]),_:1})]),_:1})]),_:1}),s(I,null,{default:a(()=>[!e.assessments.list.length&&!m.isSearching?(u(),h(T,{key:0,colspan:7},{default:a(()=>[o(r(e.$t("resx.NoRecordsFound")),1)]),_:1})):_("",!0),(u(!0),f(J,null,G(e.assessments.list,t=>(u(),h(C,{key:t.SID},{default:a(()=>[s(d,{class:"text-center"},{default:a(()=>[s($,{"model-value":t.selected,disabled:t.CompletionStatus=="None","onUpdate:modelValue":H=>t.selected=H},null,8,["model-value","disabled","onUpdate:modelValue"])]),_:2},1024),s(d,{class:"whitespace-normal break-words font-medium"},{default:a(()=>[o(r(t.ContentItemName),1)]),_:2},1024),s(d,{class:"text-muted-foreground text-sm"},{default:a(()=>[o(r(t.Status),1)]),_:2},1024),s(d,{class:"text-muted-foreground text-sm"},{default:a(()=>[o(r(t.CompletionStatus),1)]),_:2},1024),s(d,{class:"text-muted-foreground text-sm"},{default:a(()=>[o(r(m.ui.formatDate(t.CreatedDate)),1)]),_:2},1024),s(d,{class:"text-muted-foreground text-sm"},{default:a(()=>[o(r(m.ui.formatDate(t.CompletedDate)),1)]),_:2},1024),s(d,{class:"text-center"},{default:a(()=>[s(v,{items:i.getActionMenu(t)},null,8,["items"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),p("div",ye,[s(y,{disabled:i.disabledResetAllAssessment,onClick:i.resetAllAssessmentClicked},{default:a(()=>[s(B,{class:"size-4"}),o(" "+r(e.$t("resx.ResetAllSelected")),1)]),_:1},8,["disabled","onClick"])])])]),s(E,{active:m.isSearching,"can-cancel":!1,"is-full-page":!1},null,8,["active"]),s(M,{ref:"OkCancelMsgBox"},null,512),s(V,{ref:"OkMsgBox"},null,512)])}const Re=L(me,[["render",Ce]]);export{Re 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.