PageSourceSearch

https://grassrootsworkshops.com/build/assets/EvaluationSubmissions-ce01b07c.js

js grassrootsworkshops.com collected 2026-09-24 11:08:36 UTC 38,096 bytes, 1 lines download raw bytes

1import{L as Z,C as G}from"./ChartBar-00df6ca0.js";import{_ as P,r as v,o as a,d as D,b as N,i as J,c as o,a as d,f,w as I,e as w,n as V,g as c,t as b,j as S,F as g,l as M,h as C}from"./app-346e2910.js";import{m as r}from"./index-42957e6c.js";import{_ as m}from"./lodash-b5ace6a0.js";import"./moment-e9e012b5.js";const K={props:["chartData","options","reload"],components:{Line:Z},computed:{chartDataComputed(){return this.chartData}},watch:{},mounted(){}};function X(t,s,l,u,e,i){const y=v("Line");return a(),D(y,{data:i.chartDataComputed,options:l.options},null,8,["data","options"])}const $=P(K,[["render",X],["__file","ChartLine.vue"]]);const tt={inject:["user"],props:["workshopId","settings"],components:{ChartBar:G,ChartLine:$},data(){return{otherResponsesModal:!1,evaluationSubmissionModal:!1,evalSubmissionsColumnModal:!1,selectedSubmission:null,showOverview:!1,questionsAvailable:[],workshopsAvailable:[],semestersAvailable:[],quartersAvailable:[],isLoading:!1,evaluationSubmissions:[],orderByQuestion:null,pagination:{},startDateInput:"",endDateInput:"",regStartDateInput:"",regEndDateInput:"",fetchRequestId:0,startDatePlaceholder:"Submitted From",endDatePlaceholder:"Submitted To",regStartDatePlaceholder:"Registered From",regEndDatePlaceholder:"Registered To",defaultFilters:{},dateValidationError:"",savingColumnSettings:!1,workshopTitle:null,overview:{},totals:{},chartReload:1,pieChartOptions:{responsive:!0,maintainAspectRatio:!1,hoverBorderWidth:20,hoverOffset:16,plugins:{legend:{display:!0,position:"left",fullWidth:!1,maxWidth:300}},showTooltips:!0,onAnimationComplete:function(){this.showTooltip(this.segments,!0)},tooltipEvents:[],tooltips:{position:"average",bodyAlign:"center",titleAlign:"center",footerAlign:"center",callbacks:{label:(t,s)=>{s.labels[t.index];let l=s.labels[t.index],u=s.datasets[0].data[t.index],e=s.datasets[0].percent[t.index];return s.datasets[0]&&(l+=": "+e+"% ("+u+" responses)"),l}}}},chartOptions:{responsive:!0,maintainAspectRatio:!1,scales:{y:{max:100,beginAtZero:!0,scaleLabel:{display:!0,labelString:"% of Responses"},ticks:{callback:function(t,s,l){return t}}}},plugins:{legend:{display:!1}},tooltips:{position:"average",bodyAlign:"center",titleAlign:"center",footerAlign:"center",callbacks:{label:(t,s)=>{s.labels[t.index];let l=s.labels[t.index],u=s.datasets[0].count[t.index],e=s.datasets[0].data[t.index];return s.datasets[0]&&(l=e+"% ("+u+" responses)"),l}}}},lineChartOptions:{responsive:!0,maintainAspectRatio:!1,scales:{y:{ticks:{beginAtZero:!0,suggestedMax:10,maxTicksLimit:10},min:0}},plugins:{legend:{display:!1}},tooltips:{position:"average",bodyAlign:"center",titleAlign:"center",footerAlign:"center",callbacks:{label:(t,s)=>{let l=s.datasets[0].label,u=t.yLabel+l,e=s.datasets[0].data[t.index],i=s.datasets[0].responses;return i[t.index]&&(u=e+" average from "+i[t.index]+" responses"),u}}}},tableHeaders:[{name:"name",label:"Name",order:!0},{name:"email",label:"Email",order:!0},{name:"created_at",label:"Submit Date",date:!0,order:!0},{name:"semester_name",label:"Reg. Semester",order:!0},{name:"registration_date",label:"Reg. Date",date:!0,order:!0},{name:"followup_count",label:"Follow-up?",order:!0},{name:"registration_completed",label:"Completed %",order:!0},{name:"invoice_id",label:"Order ID",order:!0},{name:"workshop_title",label:"Workshop",order:!0}],followupCountLabels:{0:"-",1:"1 month",2:"6 months",3:"12 months"},visibleColumns:{},visibleQuestions:{},showAllQuestions:!0,showAllQuestionsNull:!1,filters:{search:"",workshop:null,semester:null,quarter:null,followup:null,submit_start_date:null,submit_end_date:null,reg_start_date:null,reg_end_date:null},otherResponsesQuestion:{},followupOptions:[{label:"All submissions",value:null},{label:"First submission only",value:1},{label:"1 month only",value:2},{label:"6 month only",value:3},{label:"12 month only",value:4}],orderBy:"",orderDirection:""}},computed:{regDateFilterTooltip(){return this.filters.quarter?{html:"To edit registration date filters, remove quarter filter by selecting All Quarters"}:null},regStartDateMin(){return r("01/01/19","MM/DD/YY").startOf("day").toDate()},regStartDateMax(){if(this.regEndDateInput){let t=null;if(this.regEndDateInput instanceof Date?isNaN(this.regEndDateInput.getTime())||(t=r(this.regEndDateInput)):typeof this.regEndDateInput=="string"&&this.regEndDateInput.trim()&&(t=r(this.regEndDateInput,"MM/DD/YY")),t&&t.isValid())return t.startOf("day").toDate()}return r().startOf("day").toDate()},regEndDateMin(){if(this.regStartDateInput){let t=null;if(this.regStartDateInput instanceof Date?isNaN(this.regStartDateInput.getTime())||(t=r(this.regStartDateInput)):typeof this.regStartDateInput=="string"&&this.regStartDateInput.trim()&&(t=r(this.regStartDateInput,"MM/DD/YY")),t&&t.isValid())return t.startOf("day").toDate()}return r("01/01/19","MM/DD/YY").startOf("day").toDate()},regEndDateMax(){return r().startOf("day").toDate()},startDateMin(){return r("01/01/19","MM/DD/YY").startOf("day").toDate()},startDateMax(){if(this.endDateInput){let t=null;if(this.endDateInput instanceof Date?isNaN(this.endDateInput.getTime())||(t=r(this.endDateInput)):typeof this.endDateInput=="string"&&this.endDateInput.trim()&&(t=r(this.endDateInput,"MM/DD/YY")),t&&t.isValid())return t.startOf("day").toDate()}return r().startOf("day").toDate()},endDateMin(){if(this.startDateInput){let t=null;if(this.startDateInput instanceof Date?isNaN(this.startDateInput.getTime())||(t=r(this.startDateInput)):typeof this.startDateInput=="string"&&this.startDateInput.trim()&&(t=r(this.startDateInput,"MM/DD/YY")),t&&t.isValid())return t.startOf("day").toDate()}return r("01/01/19","MM/DD/YY").startOf("day").toDate()},endDateMax(){return r().startOf("day").toDate()},workshopOptions(){if(!this.workshopsAvailable||!this.workshopsAvailable.length)return[];let t=0,s=0,l=1,u=m.map(this.workshopsAvailable,e=>(e.mini&&s++,e.mini||t++,{label:e.title_no_html,value:e.id}));return u.splice(0,0,{label:"All Workshops",value:null}),t>1&&(u.splice(1,0,{label:"All Regular",value:"regular"}),l=2),s>1&&u.splice(l,0,{label:"All Mini",value:"mini"}),u},semesterOptions(){if(!this.semestersAvailable||!this.semestersAvailable.length)return[];let t=m.map(this.semestersAvailable,s=>({label:s.name,value:s.id}));return t.splice(0,0,{label:"All Semesters",value:null}),t},quarterOptions(){if(!this.quartersAvailable||!this.quartersAvailable.length)return[];let t=m.map(this.quartersAvailable,s=>({label:s.name,value:s.key}));return t.splice(0,0,{label:"All Quarters",value:null}),t},hasPagination(){return this.pagination&&this.pagination.last_page&&this.pagination.last_page>1}},methods:{viewSubmission(t){this.selectedSubmission={...t},this.evaluationSubmissionModal=!0},questionLongitudinalData(t){let s=m.find(this.overview.questions,{id:t}).longitudinal;return{labels:["Original","1 month","6 month","1 year"].slice(0,s.length),datasets:[{label:"Average",backgroundColor:"rgba(62, 92, 89, 0.5)",borderColor:"rgba(62, 92, 89, 1)",borderWidth:1,data:m.map(s,"average"),responses:m.map(s,"responses")}]}},questionChartData(t){const s=m.find(this.overview.questions,{id:t}).answers;return{labels:m.map(s,"label"),datasets:[{backgroundColor:"rgba(138, 171, 61, 0.5)",borderColor:"rgba(138, 171, 61, 1)",borderWidth:2,data:m.map(s,"percent"),count:m.map(s,"count")}]}},showOtherResponses(t){this.otherResponsesQuestion=t,this.otherResponsesModal=!0},triggerUpdateFilters:m.debounce(function(){this.fetchEvaluationSubmissions()},1500),findAnswerAverage(t){const s=m.find(this.overview.questions,{id:t})||null;if(!s||s.type!="range")return"";const l=s.answers;let u=0,e=0;return m.each(l,i=>{u+=i.count,e+=i.count*parseInt(i.answer,10)}),Math.round(e/u*100)/100},findAnswer(t,s){let l="-";if(m.each(t,u=>{if(u.question_id==s)return l=u.answer,!1}),l&&Array.isArray(l)){let u='<ul class="mb-0 pl-0">';return m.each(l,e=>{u+=`<li>${e}</li>`}),u+="</ul>",u}return l},formatDate(t){return r.utc(t,"YYYY-MM-DD HH:mm:ss").local().format("MM/DD/YY hh:mma")},clearFilters(){if(this.filters={...this.defaultFilters},this.startDateInput=this.filters.submit_start_date,this.endDateInput=this.filters.submit_end_date,this.filters.reg_start_date)if(this.filters.reg_start_date instanceof Date)this.regStartDateInput=r(this.filters.reg_start_date).startOf("day").toDate();else{const t=r(this.filters.reg_start_date,"MM/DD/YY");this.regStartDateInput=t.isValid()?t.startOf("day").toDate():this.filters.reg_start_date}else this.regStartDateInput="";if(this.filters.reg_end_date)if(this.filters.reg_end_date instanceof Date)this.regEndDateInput=r(this.filters.reg_end_date).startOf("day").toDate();else{const t=r(this.filters.reg_end_date,"MM/DD/YY");this.regEndDateInput=t.isValid()?t.startOf("day").toDate():this.filters.reg_end_date}else this.regEndDateInput="";this.dateValidationError="",this.triggerUpdateFilters()},showColumn(t){return!(!this.visibleColumns[t.name]||t.name=="workshop_title"&&this.workshopId||t.name=="semester_name"&&!this.semesterOptions.length)},startDateUpdated(t){if(t instanceof Date?this.startDateInput=r(t).startOf("day").toDate():this.startDateInput=t,this.dateValidationError="",!this.startDateInput){this.filters.submit_start_date=null,this.triggerUpdateFilters();return}if(this.startDateInput&&this.endDateInput){let l,u;if(this.startDateInput instanceof Date?l=r(this.startDateInput):this.startDateInput&&(l=r(this.startDateInput,"MM/DD/YY")),this.endDateInput instanceof Date?u=r(this.endDateInput):this.endDateInput&&(u=r(this.endDateInput,"MM/DD/YY")),l&&u&&l.isValid()&&u.
1isValid()){const e=l.startOf("day"),i=u.startOf("day");if(e.isAfter(i)){this.dateValidationError="Submitted From date cannot be after Submitted To date",this.startDateInput=this.filters.submit_start_date||null;return}}}let s=this.startDateInput;this.startDateInput instanceof Date?s=r(this.startDateInput).format("MM/DD/YY"):this.startDateInput||(s=null),this.filters.submit_start_date=s,this.triggerUpdateFilters()},endDateUpdated(t){if(t instanceof Date?this.endDateInput=r(t).startOf("day").toDate():this.endDateInput=t,this.dateValidationError="",!this.endDateInput){this.filters.submit_end_date=null,this.triggerUpdateFilters();return}if(this.startDateInput&&this.endDateInput){let l,u;if(this.startDateInput instanceof Date?l=r(this.startDateInput):this.startDateInput&&(l=r(this.startDateInput,"MM/DD/YY")),this.endDateInput instanceof Date?u=r(this.endDateInput):this.endDateInput&&(u=r(this.endDateInput,"MM/DD/YY")),l&&u&&l.isValid()&&u.isValid()){const e=l.startOf("day");if(u.startOf("day").isBefore(e)){this.dateValidationError="Submitted To date cannot be before Submitted From date",this.endDateInput=this.filters.submit_end_date||null;return}}}let s=this.endDateInput;this.endDateInput instanceof Date?s=r(this.endDateInput).format("MM/DD/YY"):this.endDateInput||(s=null),this.filters.submit_end_date=s,this.triggerUpdateFilters()},regStartDateUpdated(t){if(t instanceof Date?this.regStartDateInput=r(t).startOf("day").toDate():this.regStartDateInput=t,!this.regStartDateInput){this.filters.reg_start_date=null,this.triggerUpdateFilters();return}if(this.regStartDateInput&&this.regEndDateInput){let l,u;if(this.regStartDateInput instanceof Date?l=r(this.regStartDateInput):this.regStartDateInput&&(l=r(this.regStartDateInput,"MM/DD/YY")),this.regEndDateInput instanceof Date?u=r(this.regEndDateInput):this.regEndDateInput&&(u=r(this.regEndDateInput,"MM/DD/YY")),l&&u&&l.isValid()&&u.isValid()){const e=l.startOf("day"),i=u.startOf("day");if(e.isAfter(i)){this.regStartDateInput=this.filters.reg_start_date||null;return}}}let s=this.regStartDateInput;this.regStartDateInput instanceof Date?s=r(this.regStartDateInput).format("MM/DD/YY"):this.regStartDateInput||(s=null),this.filters.reg_start_date=s,this.triggerUpdateFilters()},regEndDateUpdated(t){if(t instanceof Date?this.regEndDateInput=r(t).startOf("day").toDate():this.regEndDateInput=t,!this.regEndDateInput){this.filters.reg_end_date=null,this.triggerUpdateFilters();return}if(this.regStartDateInput&&this.regEndDateInput){let l,u;if(this.regStartDateInput instanceof Date?l=r(this.regStartDateInput):this.regStartDateInput&&(l=r(this.regStartDateInput,"MM/DD/YY")),this.regEndDateInput instanceof Date?u=r(this.regEndDateInput):this.regEndDateInput&&(u=r(this.regEndDateInput,"MM/DD/YY")),l&&u&&l.isValid()&&u.isValid()){const e=l.startOf("day");if(u.startOf("day").isBefore(e)){this.regEndDateInput=this.filters.reg_end_date||null;return}}}let s=this.regEndDateInput;this.regEndDateInput instanceof Date?s=r(this.regEndDateInput).format("MM/DD/YY"):this.regEndDateInput||(s=null),this.filters.reg_end_date=s,this.triggerUpdateFilters()},async fetchEvaluationSubmissions(t){const s=++this.fetchRequestId,l={submit_start_date:this.startDateInput instanceof Date?r(this.startDateInput).format("MM/DD/YY"):this.startDateInput||null,submit_end_date:this.endDateInput instanceof Date?r(this.endDateInput).format("MM/DD/YY"):this.endDateInput||null,reg_start_date:this.regStartDateInput instanceof Date?r(this.regStartDateInput).format("MM/DD/YY"):this.regStartDateInput||null,reg_end_date:this.regEndDateInput instanceof Date?r(this.regEndDateInput).format("MM/DD/YY"):this.regEndDateInput||null};this.isLoading=!0;let u="/api/evaluation-submissions";typeof t>"u"?t=1:t=="reload"&&(t=this.pagination.current_page),t>1&&(u+="?page="+t),this.startDateInput instanceof Date?this.filters.submit_start_date=r(this.startDateInput).format("MM/DD/YY"):this.filters.submit_start_date=this.startDateInput||null,this.endDateInput instanceof Date?this.filters.submit_end_date=r(this.endDateInput).format("MM/DD/YY"):this.filters.submit_end_date=this.endDateInput||null,this.regStartDateInput instanceof Date?this.filters.reg_start_date=r(this.regStartDateInput).format("MM/DD/YY"):this.filters.reg_start_date=this.regStartDateInput||null,this.regEndDateInput instanceof Date?this.filters.reg_end_date=r(this.regEndDateInput).format("MM/DD/YY"):this.filters.reg_end_date=this.regEndDateInput||null;const e={workshop:this.workshopId?this.workshopId:this.filters.workshop,semester:this.filters.semester,quarter:this.filters.quarter,followup:this.filters.followup,submit_start_date:this.filters.submit_start_date,submit_end_date:this.filters.submit_end_date,reg_start_date:this.filters.reg_start_date,reg_end_date:this.filters.reg_end_date,search:this.filters.search,order_by:this.orderBy,order_direction:this.orderDirection,order_by_question:this.orderByQuestion},{data:i}=await N.get(u,{params:e});
1if(s===this.fetchRequestId){if(i.filters){this.filters=i.filters;const y=h=>h?h instanceof Date?r(h).format("MM/DD/YY"):h:null;if(i.filters.submit_start_date!==null&&i.filters.submit_start_date!==void 0&&i.filters.submit_start_date!==""){const h=y(this.startDateInput);if(h===l.submit_start_date||!h)if(i.filters.submit_start_date instanceof Date)this.startDateInput=r(i.filters.submit_start_date).startOf("day").toDate();else{const _=r(i.filters.submit_start_date,"MM/DD/YY");this.startDateInput=_.isValid()?_.startOf("day").toDate():i.filters.submit_start_date}}if(i.filters.submit_end_date!==null&&i.filters.submit_end_date!==void 0&&i.filters.submit_end_date!==""){const h=y(this.endDateInput);if(h===l.submit_end_date||!h)if(i.filters.submit_end_date instanceof Date)this.endDateInput=r(i.filters.submit_end_date).startOf("day").toDate();else{const _=r(i.filters.submit_end_date,"MM/DD/YY");this.endDateInput=_.isValid()?_.startOf("day").toDate():i.filters.submit_end_date}}if(i.filters.reg_start_date!==null&&i.filters.reg_start_date!==void 0&&i.filters.reg_start_date!==""){const h=y(this.regStartDateInput);if(h===l.reg_start_date||!h)if(i.filters.reg_start_date instanceof Date)this.regStartDateInput=r(i.filters.reg_start_date).startOf("day").toDate();else{const _=r(i.filters.reg_start_date,"MM/DD/YY");this.regStartDateInput=_.isValid()?_.startOf("day").toDate():i.filters.reg_start_date}}if(i.filters.reg_end_date!==null&&i.filters.reg_end_date!==void 0&&i.filters.reg_end_date!==""){const h=y(this.regEndDateInput);if(h===l.reg_end_date||!h)if(i.filters.reg_end_date instanceof Date)this.regEndDateInput=r(i.filters.reg_end_date).startOf("day").toDate();else{const _=r(i.filters.reg_end_date,"MM/DD/YY");this.regEndDateInput=_.isValid()?_.startOf("day").toDate():i.filters.reg_end_date}}}i.questions&&this.reloadQuestions(i.questions),i.overview&&(this.overview=i.overview),i.totals&&(this.totals=i.totalss),this.pagination=i,i.workshop_options&&(this.workshopsAvailable=i.workshop_options,this.workshopId&&m.each(i.workshop_options,y=>{y.id==this.workshopId&&(this.workshopTitle=y.title)})),i.semester_options&&(this.semestersAvailable=i.semester_options),i.quarter_options&&(this.quartersAvailable=i.quarter_options),this.evaluationSubmissions=i.data,this.isLoading=!1}},reloadQuestions(t){const s=this.showAllQuestions===!0;this.questionsAvailable=t,m.each(t,l=>{typeof this.visibleQuestions[l.question_id]>"u"&&(this.visibleQuestions[l.question_id]=s)})},updateColumnVisibility(){this.visibleColumns={...this.visibleColumns}},updateQuestionVisibility(){this.visibleQuestions={...this.visibleQuestions}},async saveColumnSettings(){var t=this,s="/api/users/"+this.user.id+"/dashboard_settings";t.isLoading=!0,t.savingColumnSettings=!0;try{let{data:l}=await N.post(s,{section:"evaluation_submissions",settings:{filters:t.filters,columns:t.visibleColumns,question_columns:t.visibleQuestions,all_questions:t.showAllQuestions,order_by:t.orderBy,order_direction:t.orderDirection,order_by_question:t.orderByQuestion}});t.savingColumnSettings=!1,t.isLoading=!1,this.evalSubmissionsColumnModal=!1}catch(l){console.log(l),t.savingDashSettings=!1,t.errorMessage="Something went wrong. Please refresh the page or try again later.",t.loading=!1}},setupUserSettings(){if(this.settings&&this.settings.filters){let t={...this.filters};m.each(t,(s,l)=>{this.settings.filters[l]&&(t[l]=this.settings.filters[l])}),this.filters=t}if(this.settings&&this.settings.order_by&&(this.orderBy=this.settings.order_by),this.settings&&this.settings.order_direction&&(this.orderDirection=this.settings.order_direction),this.settings&&this.settings.order_by_question&&(this.orderByQuestion=this.settings.order_by_question),this.filters.submit_start_date)if(this.filters.submit_start_date instanceof Date)this.startDateInput=r(this.filters.submit_start_date).startOf("day").toDate();else{const t=r(this.filters.submit_start_date,"MM/DD/YY");this.startDateInput=t.isValid()?t.startOf("day").toDate():this.filters.submit_start_date}else this.startDateInput="";if(this.filters.submit_end_date)if(this.filters.submit_end_date instanceof Date)this.endDateInput=r(this.filters.submit_end_date).startOf("day").toDate();else{const t=r(this.filters.submit_end_date,"MM/DD/YY");this.endDateInput=t.isValid()?t.startOf("day").toDate():this.filters.submit_end_date}else this.endDateInput="";if(this.endDateInput&&!this.startDateInput?(this.startDateInput=this.endDateInput,this.$nextTick(()=>{this.startDateInput=""})):this.startDateInput&&!this.endDateInput&&(this.endDateInput=this.startDateInput,this.$nextTick(()=>{this.endDateInput=""})),this.filters.reg_start_date)if(this.filters.reg_start_date instanceof Date)this.regStartDateInput=r(this.filters.reg_start_date).startOf("day").toDate();else{const t=r(this.filters.reg_start_date,"MM/DD/YY");this.regStartDateInput=t.isValid()?t.startOf("day").toDate():this.filters.reg_start_date}else this.regStartDateInput="";if(this.filters.reg_end_date)if(this.filters.reg_end_date instanceof Date)this.regEndDateInput=r(this.filters.reg_end_date).startOf("day").toDate();else{const t=r(this.filters.reg_end_date,"MM/DD/YY");this.regEndDateInput=t.isValid()?t.startOf("day").toDate():this.filters.reg_end_date}else this.regEndDateInput="";this.regEndDateInput&&!this.regStartDateInput?(this.regStartDateInput=this.regEndDateInput,this.$nextTick(()=>{this.regStartDateInput=""})):this.regStartDateInput&&!this.regEndDateInput&&(this.regEndDateInput=this.regStartDateInput,this.$nextTick(()=>{this.regEndDateInput=""})),this.settings&&this.settings.question_columns&&(this.visibleQuestions=this.settings.question_columns),this.settings&&typeof this.settings.all_questions<"u"&&(this.showAllQuestions=this.settings.all_questions),this.settings&&this.settings.columns?this.visibleColumns=this.settings.columns:this.makeAllColumnsVisible(),window.localStorage&&window.localStorage.gwEvalSubmissionOverviewOpen&&(this.showOverview=window.localStorage.gwEvalSubmissionOverviewOpen=="true")},onSort(t){this.orderBy===t?this.orderDirection=this.orderDirection==="asc"?"desc":"asc":(this.orderBy=t,this.orderDirection="asc"),this.fetchEvaluationSubmissions()},sortByQuestion(t){this.orderBy==="question"&&this.orderByQuestion==t?this.orderDirection=this.orderDirection==="asc"?"desc":"asc":(this.orderBy="question",this.orderByQuestion=t,this.orderDirection="asc"),this.fetchEvaluationSubmissions()},makeAllColumnsVisible(){m.each(this.tableHeaders,t=>{this.visibleColumns[t.name]=!0})},makeAllQuestionsVisible(){var t={...this.visibleQuestions};t=m.mapValues(t,()=>!0),this.visibleQuestions=t},makeAllQuestionsInvisible(){var t={...this.visibleQuestions};t=m.mapValues(t,()=>!1),this.visibleQuestions=t}},watch:{showOverview(t){window.localStorage&&(localStorage.gwEvalSubmissionOverviewOpen=t)},showAllQuestions(t){if(t===!1){this.makeAllQuestionsInvisible(),this.showAllQuestionsNull=!1;return}if(t===!0){this.makeAllQuestionsVisible(),this.showAllQuestionsNull=!1;return}t===null&&(this.showAllQuestionsNull=!0)},visibleQuestions:{handler(t){let s=!0,l=!0;m.each(t,u=>{u===!1&&s&&(s=!1),u===!0&&l&&(l=!1)}),s?this.showAllQuestions=!0:l?this.showAllQuestions=!1:this.showAllQuestions=null},deep:!0}},mounted(){this.defaultFilters={...this.filters},this.setupUserSettings(),this.fetchEvaluationSubmissions()}},et={class:"pb-lg-5"},st={class:"shadow rounded bg-white mb-4"},it={class:"p-3"},nt={class:"grid sm:grid-cols-12 gap-2"},at={class:"sm:col-span-6 xl:col-span-3"},rt={class:"flex items-center gap-1"},lt={class:"sm:col-span-6 xl:col-span-3"},ot={key:2,class:"sm:col-span-6 lg:col-span-4 xl:col-span-2"},dt={class:"sm:col-span-12 xl:col-span-5"},ut={class:"grid grid-cols-2 gap-2"},ht={key:0,class:"text-danger-500 text-xs mt-1"},pt={class:"sm:col-span-12 xl:col-span-5"},ft={class:"grid grid-cols-2 gap-2"},ct={class:"sm:col-span-12 xl:col-span-2"},mt={class:"grid grid-cols-3 gap-2"},_t={class:"grid"},gt={class:"grid"},Dt={class:"grid"},bt={class:"p-3"},vt={key:0,class:"text-center"},yt={key:1},It={class:"flex flex-row items-center"},Mt=d("div",null,[d("h4",{class:"mb-0"},[C("Overview"),d("span",{class:"hidden sm:inline"}," Data")])],-1),wt={class:"ms-auto ps-3 text-right",cols:"auto"},kt={key:0,id:"eval-submit-overview"},St={class:"pt-3"},Vt={class:"grid gap-3 sm:grid-cols-3"},Ct={class:"t-border-default rounded bg-white p-3"},xt={class:"p-2 text-center"},Yt={class:"mb-3 text-primary-500"},Et={class:"text-xs mt-0.5 font-bold text-dark-400 uppercase tracking-widest"},Ot={class:"t-border-default rounded bg-white mt-4 p-3"},At=["innerHTML"],Qt={key:0},qt={class:"grid gap-3 lg:grid-cols-12"},Tt={class:"lg:col-span-7"},Lt={class:"lg:col-span-5"},Ut={key:1},Ft={key:2,class:"mb-0 text-sm"},Ht=["onClick"],Rt={class:"overflow-x-auto max-w-full bg-white rounded t-border-default mb-4"},Bt={class:"t-table text-sm mb-0"}
1,Nt={class:"bg-dark-50"},Pt=["onClick"],zt=["innerHTML"],Wt={key:0,class:"question-cell"},jt={class:"question-cell-inner"},Zt=["onClick"],Gt=["innerHTML"],Jt={key:0},Kt={key:1},Xt=["innerHTML"],$t={key:0},te={class:"relative"},ee={key:0},se=["colspan"],ie={key:1},ne=["colspan"],ae=["onClick"],re={key:0},le=["href"],oe=["innerHTML"],de=["onClick"],ue={key:2},he={key:3},pe={key:4},fe=["innerHTML"],ce={key:0,class:"question-cell"},me=["innerHTML"],_e={key:0,class:"question-cell font-bold"},ge=["innerHTML"],De=d("h3",{class:"mb-4"},"Select Visible Columns",-1),be=d("p",null,"Select which columns you'd like to display in the Evaluation Submissions dashboard.",-1),ve={method:"post"},ye={class:"mb-2"},Ie={key:0},Me={key:1},we={class:"mb-2"},ke={class:"pl-3"},Se={class:"mb-2"},Ve={key:0},Ce=d("h3",{class:"mb-6"},"Other Responses",-1),xe={key:0},Ye=["innerHTML"],Ee={class:"mb-4 list-disc ps-4"},Oe=["innerHTML"];function Ae(t,s,l,u,e,i){var q,T,L,U,F,H,R,B;const y=v("t-input"),h=v("font-awesome-icon"),_=v("t-button"),x=v("t-select"),Y=v("datepicker"),A=v("loading"),Q=v("chart-bar"),z=v("chart-line"),W=v("pagination"),E=v("t-checkbox"),O=v("Modal"),j=v("evaluation-submission"),k=J("tooltip");return a(),o("div",et,[d("div",st,[d("div",it,[d("div",nt,[d("div",at,[d("div",rt,[f(y,{disabled:e.isLoading,onChange:i.triggerUpdateFilters,placeholder:"Search...",size:"sm",modelValue:e.filters.search,"onUpdate:modelValue":s[0]||(s[0]=n=>e.filters.search=n),lazy:!0},null,8,["disabled","onChange","modelValue"]),f(_,{size:"sm",disabled:e.isLoading,onClick:w(i.triggerUpdateFilters,["prevent"]),variant:"primary"},{default:I(()=>[f(h,{icon:"fa-solid fa-magnifying-glass"})]),_:1},8,["disabled","onClick"])])]),d("div",lt,[l.workshopId?(a(),D(y,{key:0,size:"sm",class:"no-readonly",readonly:"",value:e.workshopTitle},null,8,["value"])):(a(),D(x,{key:1,disabled:e.isLoading,onChange:i.triggerUpdateFilters,size:"sm",modelValue:e.filters.workshop,"onUpdate:modelValue":s[1]||(s[1]=n=>e.filters.workshop=n),options:i.workshopOptions},null,8,["disabled","onChange","modelValue","options"]))]),i.semesterOptions.length?(a(),o("div",{key:0,class:V([i.quarterOptions.length?"sm:col-span-6 lg:col-span-4 xl:col-span-2":"sm:col-span-6 lg:col-span-8 xl:col-span-4"])},[f(x,{onChange:i.triggerUpdateFilters,disabled:e.isLoading,size:"sm",modelValue:e.filters.semester,"onUpdate:modelValue":s[2]||(s[2]=n=>e.filters.semester=n),options:i.semesterOptions},null,8,["onChange","disabled","modelValue","options"])],2)):c("",!0),i.quarterOptions.length?(a(),o("div",{key:1,class:V([i.quarterOptions.length?"sm:col-span-6 lg:col-span-4 xl:col-span-2":"sm:col-span-6 lg:col-span-8 xl:col-span-4"])},[f(x,{size:"sm",onChange:i.triggerUpdateFilters,disabled:e.isLoading,modelValue:e.filters.quarter,"onUpdate:modelValue":s[3]||(s[3]=n=>e.filters.quarter=n),options:i.quarterOptions},null,8,["onChange","disabled","modelValue","options"])],2)):c("",!0),e.followupOptions.length?(a(),o("div",ot,[f(x,{size:"sm",onChange:i.triggerUpdateFilters,disabled:e.isLoading,modelValue:e.filters.followup,"onUpdate:modelValue":s[4]||(s[4]=n=>e.filters.followup=n),options:e.followupOptions},null,8,["onChange","disabled","modelValue","options"])])):c("",!0),d("div",dt,[d("div",ut,[d("div",null,[(a(),D(Y,{key:`start-${(q=i.startDateMin)==null?void 0:q.getTime()}-${(T=i.startDateMax)==null?void 0:T.getTime()}`,size:"sm","enable-time-picker":!1,onDpShow:s[5]||(s[5]=n=>e.startDatePlaceholder="MM/DD/YY"),onDpHide:s[6]||(s[6]=n=>e.startDatePlaceholder="Submitted From"),"onUpdate:modelValue":[i.startDateUpdated,s[7]||(s[7]=n=>e.startDateInput=n)],placeholder:e.startDatePlaceholder,"min-date":i.startDateMin,"max-date":i.startDateMax,modelValue:e.startDateInput},null,8,["onUpdate:modelValue","placeholder","min-date","max-date","modelValue"])),e.dateValidationError?(a(),o("p",ht,b(e.dateValidationError),1)):c("",!0)]),d("div",null,[(a(),D(Y,{key:`end-${(L=i.endDateMin)==null?void 0:L.getTime()}-${(U=i.endDateMax)==null?void 0:U.getTime()}`,size:"sm","enable-time-picker":!1,onDpShow:s[8]||(s[8]=n=>e.endDatePlaceholder="MM/DD/YY"),onDpHide:s[9]||(s[9]=n=>e.endDatePlaceholder="Submitted To"),"onUpdate:modelValue":[i.endDateUpdated,s[10]||(s[10]=n=>e.endDateInput=n)],placeholder:e.endDatePlaceholder,"min-date":i.endDateMin,"max-date":i.endDateMax,modelValue:e.endDateInput},null,8,["onUpdate:modelValue","placeholder","min-date","max-date","modelValue"]))])])]),d("div",pt,[d("div",ft,[d("div",null,[S((a(),D(Y,{key:`reg-start-${(F=i.regStartDateMin)==null?void 0:F.getTime()}-${(H=i.regStartDateMax)==null?void 0:H.getTime()}`,size:"sm","enable-time-picker":!1,readonly:e.filters.quarter,onDpShow:s[11]||(s[11]=n=>e.regStartDatePlaceholder="MM/DD/YY"),onDpHide:s[12]||(s[12]=n=>e.regStartDatePlaceholder="Registered From"),"onUpdate:modelValue":[i.regStartDateUpdated,s[13]||(s[13]=n=>e.regStartDateInput=n)],placeholder:e.regStartDatePlaceholder,"min-date":i.regStartDateMin,"max-date":i.regStartDateMax,modelValue:e.regStartDateInput},null,8,["readonly","onUpdate:modelValue","placeholder","min-date","max-date","modelValue"])),[[k,i.regDateFilterTooltip]])]),d("div",null,[S((a(),D(Y,{key:`reg-end-${(R=i.regEndDateMin)==null?void 0:R.getTime()}-${(B=i.regEndDateMax)==null?void 0:B.getTime()}`,size:"sm","enable-time-picker":!1,readonly:e.filters.quarter,onDpShow:s[14]||(s[14]=n=>e.regEndDatePlaceholder="MM/DD/YY"),onDpHide:s[15]||(s[15]=n=>e.regEndDatePlaceholder="Registered To"),"onUpdate:modelValue":[i.regEndDateUpdated,s[16]||(s[16]=n=>e.regEndDateInput=n)],placeholder:e.regEndDatePlaceholder,"min-date":i.regEndDateMin,"max-date":i.regEndDateMax,modelValue:e.regEndDateInput},null,8,["readonly","onUpdate:modelValue","placeholder","min-date","max-date","modelValue"])),[[k,i.regDateFilterTooltip]])])])]),d("div",ct,[d("div",mt,[d("div",_t,[S((a(),D(_,{onClick:w(i.
1clearFilters,["prevent"]),size:"sm",variant:"outline-secondary"},{default:I(()=>[f(h,{icon:"fa-solid fa-eraser"})]),_:1},8,["onClick"])),[[k,{html:"Clear filters"}]])]),d("div",gt,[S((a(),D(_,{title:"Edit columns",onClick:s[17]||(s[17]=w(n=>e.evalSubmissionsColumnModal=!0,["prevent"])),size:"sm",variant:"outline-secondary"},{default:I(()=>[f(h,{icon:"fa-solid fa-columns"})]),_:1})),[[k,{html:"Edit columns"}]])]),d("div",Dt,[S((a(),D(_,{href:"evaluation-submissions/export",block:"",size:"sm",variant:"secondary",target:"_blank"},{default:I(()=>[f(h,{icon:"fa-solid fa-file-csv"})]),_:1})),[[k,{html:"Download CSV"}]])])])])])]),d("div",bt,[e.isLoading&&!e.overview.main?(a(),o("div",vt,[f(A,{class:"dark"})])):e.overview.main?(a(),o("div",yt,[d("div",It,[Mt,d("div",wt,[d("button",{class:"px-3 py-2 rounded cursor-pointer hover:bg-primary-50 hover:text-primary-600 transition-colors",onClick:s[18]||(s[18]=w(n=>e.showOverview=!e.showOverview,["prevent"]))},[f(h,{icon:`fa-solid fa-${e.showOverview?"angle-down":"angle-up"}`},null,8,["icon"])])])]),e.showOverview?(a(),o("div",kt,[d("div",St,[d("div",Vt,[(a(!0),o(g,null,M(e.overview.main,(n,p)=>(a(),o("div",Ct,[S((a(),o("div",xt,[d("h3",Yt,b(n.value.toLocaleString())+b(n.append||""),1),d("p",Et,b(n.label),1)])),[[k,{html:n.tooltip?n.tooltip:null}]])]))),256))])]),d("div",null,[(a(!0),o(g,null,M(e.overview.questions,n=>(a(),o("div",Ot,[d("h4",{innerHTML:n.question,class:"mb-3"},null,8,At),n.longitudinal&&n.longitudinal.length>0?(a(),o("div",Qt,[d("div",qt,[d("div",Tt,[f(Q,{"chart-data":i.questionChartData(n.id),options:e.chartOptions,height:360,style:{height:"360px",width:"100%"}},null,8,["chart-data","options"])]),d("div",Lt,[f(z,{reload:e.chartReload,options:e.lineChartOptions,height:360,style:{height:"360px",width:"100%"},"chart-data":i.questionLongitudinalData(n.id)},null,8,["reload","options","chart-data"])])])])):(a(),o("div",Ut,[f(Q,{reload:e.chartReload,"chart-data":i.questionChartData(n.id),options:e.chartOptions,height:360,style:{height:"360px",width:"100%"}},null,8,["reload","chart-data","options"])])),n.other&&n.other.length?(a(),o("p",Ft,[d("a",{class:"t-link-default",onClick:w(p=>i.showOtherResponses(n),["prevent"]),href:"#"},[C("View Other Responses "),f(h,{icon:"fa-solid fa-arrow-right"})],8,Ht)])):c("",!0)]))),256))])])):c("",!0)])):c("",!0)])]),d("div",Rt,[d("table",Bt,[d("thead",Nt,[d("tr",null,[(a(!0),o(g,null,M(e.tableHeaders,n=>(a(),o(g,null,[i.showColumn(n)?(a(),o("th",{key:0,class:V(n.class||"whitespace-nowrap")},[n.order?S((a(),o("a",{key:0,href:"#",class:V({"text-primary-500":e.orderBy==n.name}),onClick:w(p=>i.onSort(n.name),["prevent"])},[d("span",null,b(n.label),1),e.orderBy==n.name?(a(),D(h,{key:0,class:"ms-1.5",icon:`fa-solid fa-${e.orderDirection==="asc"?"caret-up":"caret-down"}`},null,8,["icon"])):c("",!0),n.name=="followup_count"?(a(),D(h,{key:1,class:"ms-1.5 text-info-500",icon:"fa-solid fa-info-circle"})):c("",!0)],10,Pt)),[[k,{html:n.name=="followup_count"?"Some evaluation questions are automatically asked again 1, 6, and 12 months later.  This column shows if the submission was a follow-up.":""}]]):(a(),o("span",{key:1,innerHTML:n.label},null,8,zt))],2)):c("",!0)],64))),256)),(a(!0),o(g,null,M(e.questionsAvailable,n=>(a(),o(g,null,[e.visibleQuestions[n.question_id]?S((a(),o("th",Wt,[d("div",jt,[n.type!="checkboxes"?(a(),o("a",{key:0,href:"#",class:V({"text-primary":e.orderBy=="question"&&e.orderByQuestion==n.question_id}),onClick:w(p=>i.sortByQuestion(n.question_id),["prevent"])},[d("span",{innerHTML:n.question},null,8,Gt),n.repeatable?(a(),o("span",Jt,"*")):c("",!0),e.orderBy==="question"&&e.orderByQuestion==n.question_id?(a(),D(h,{key:1,class:"ms-1.5",icon:`fa-solid fa-${e.orderDirection==="asc"?"caret-up":"caret-down"}`},null,8,["icon"])):c("",!0)],10,Zt)):(a(),o("span",Kt,[d("span",{innerHTML:n.question},null,8,Xt),n.repeatable?(a(),o("span",$t,"*")):c("",!0)]))])])),[[k,{html:n.repeatable?"Longitudinal question":""}]]):c("",!0)],64))),256))])]),d("tbody",te,[!e.isLoading&&!e.evaluationSubmissions.length?(a(),o("tr",ee,[d("td",{colspan:e.tableHeaders.length,class:"text-center py-4"}," No results were found matching your filters. ",8,se)])):c("",!0),e.isLoading&&!e.evaluationSubmissions.length?(a(),o("tr",ie,[d("td",{colspan:e.tableHeaders.length,class:"text-center p-4"},[f(A,{class:"lg"})],8,ne)])):(a(!0),o(g,{key:2},M(e.evaluationSubmissions,n=>(a(),o("tr",{onClick:w(p=>i.viewSubmission(n),["prevent"]),class:V(["hover:bg-dark-50 transition-colors cursor-pointer"])},[(a(!0),o(g,null,M(e.tableHeaders,p=>(a(),o(g,null,[i.showColumn(p)?(a(),o("td",{key:0,class:V(p.class||"")},[p.name=="invoice_id"?(a(),o("span",re,[n.invoice_hash?(a(),o("a",{key:0,target:"_blank",href:"/invoice/"+n.invoice_hash},b(n[p.name]),9,le)):(a(),o("span",{key:1,innerHTML:n[p.name]},null,8,oe))])):p.name=="name"?(a(),o("a",{key:1,href:"#",onClick:w(Qe=>i.viewSubmission(n),["prevent"])},b(n[p.name]),9,de)):p.name=="registration_completed"?(a(),o("span",ue,b(n[p.name])+"% ",1)):p.name=="followup_count"?(a(),o("span",he,b(e.followupCountLabels[n[p.name]]),1)):p.date?(a(),o("span",pe,b(i.formatDate(n[p.name])),1)):(a(),o("span",{key:5,innerHTML:n[p.name]},null,8,fe))],2)):c("",!0)],64))),256)),(a(!0),o(g,null,M(e.questionsAvailable,p=>(a(),o(g,null,[e.visibleQuestions[p.question_id]?(a(),o("td",ce,[d("div",{class:"question-cell-inner",innerHTML:i.findAnswer(n.answers,p.question_id)},null,8,me)])):c("",!0)],64))),256))],8,ae))),256))]),d("tfoot",null,[d("tr",null,[(a(!0),o(g,null,M(e.tableHeaders,n=>(a(),o(g,null,[i.showColumn(n)?(a(),o("td",{key:0,class:V(n.class||"")},null,2)):c("",!0)],64))),256)),(a(!0),o(g,null,M(e.questionsAvailable,n=>(a(),o(g,null,[e.visibleQuestions[n.question_id]?(a(),o("td",_e,[d("div",{class:"question-cell-inner",innerHTML:i.findAnswerAverage(n.question_id)},null,8,ge)])):c("",!0)],64))),256))])])])]),i.hasPagination?(a(),D(W,{key:0,"item-name":"evaluation submissions",pagination:e.pagination,onFetch:i.fetchEvaluationSubmissions},null,8,["pagination","onFetch"])):c("",!0),f(O,{id:"evalSubmissionsColumnSelect","body-classes":"p-4 sm:p-6","wrapper-classes":"max-w-screen-md",modelValue:e.evalSubmissionsColumnModal,"onUpdate:modelValue":s[20]||(s[20]=n=>e.evalSubmissionsColumnModal=n),ref:"columns_modal"},{default:I(()=>[De,be,d("form",ve,[(a(!0),o(g,null,M(e.tableHeaders,n=>(a(),o("div",null,[d("div",ye,[f(E,{onChange:i.updateColumnVisibility,modelValue:e.visibleColumns[n.name],"onUpdate:modelValue":p=>e.visibleColumns[n.name]=p,name:"evaluation_columns["+n.name+"]",value:!0,id:"toggle-column-"+n.name},{default:I(()=>[n.label?(a(),o("span",Ie,b(n.label),1)):(a(),o("span",Me,b(n.name|t.capitalize),1))]),_:2},1032,["onChange","modelValue","onUpdate:modelValue","name","id"])])]))),256)),d("div",we,[f(E,{modelValue:e.showAllQuestions,"onUpdate:modelValue":s[19]||(s[19]=n=>e.showAllQuestions=n),value:!0,indeterminate:e.showAllQuestionsNull},{default:I(()=>[C(" Questions ")]),_:1},8,["modelValue","indeterminate"])]),d("div",ke,[(a(!0),o(g,null,M(e.questionsAvailable,n=>(a(),o("div",Se,[f(E,{onChange:i.updateQuestionVisibility,modelValue:e.visibleQuestions[n.question_id],"onUpdate:modelValue":p=>e.visibleQuestions[n.question_id]=p,name:"question_columns["+n.question_id+"]",value:!0,id:"toggle-column-question-"+n.question_id},{default:I(()=>[n.repeatable?S((a(),o("span",Ve,[C("**")])),[[k,{html:"Longitudinal question"}]]):c("",!0),C(" "+b(n.question),1)]),_:2},1032,["onChange","modelValue","onUpdate:modelValue","name","id"])]))),256))]),f(_,{type:"button",disabled:e.savingColumnSettings,loading:e.s
1avingColumnSettings,onClick:w(i.saveColumnSettings,["prevent"]),variant:"secondary",class:"mt-4"},{default:I(()=>[C(" Save Column Settings ")]),_:1},8,["disabled","loading","onClick"])])]),_:1},8,["modelValue"]),f(O,{id:"other-responses-modal",modelValue:e.otherResponsesModal,"onUpdate:modelValue":s[22]||(s[22]=n=>e.otherResponsesModal=n),"body-classes":"p-4 sm:p-6","wrapper-classes":"max-w-screen-sm"},{default:I(()=>[Ce,e.otherResponsesQuestion&&e.otherResponsesQuestion.other&&e.otherResponsesQuestion.other.length?(a(),o("div",xe,[d("h3",{class:"mb-4",innerHTML:e.otherResponsesQuestion.question},null,8,Ye),d("ul",Ee,[(a(!0),o(g,null,M(e.otherResponsesQuestion.other,n=>(a(),o("li",{innerHTML:n},null,8,Oe))),256))])])):c("",!0),d("p",null,[f(_,{variant:"outline-dark",onClick:s[21]||(s[21]=w(n=>e.otherResponsesModal=!1,["prevent"]))},{default:I(()=>[C("Done")]),_:1})])]),_:1},8,["modelValue"]),f(O,{modelValue:e.evaluationSubmissionModal,"onUpdate:modelValue":s[23]||(s[23]=n=>e.evaluationSubmissionModal=n),"body-classes":"p-4 sm:p-6","wrapper-classes":"max-w-screen-md"},{default:I(()=>[f(j,{ref:"viewSubmission","set-submission":e.selectedSubmission},null,8,["set-submission"])]),_:1},8,["modelValue"])])}const He=P(tt,[["render",Ae],["__file","EvaluationSubmissions.vue"]]);export{He 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.