PageSourceSearch

https://www.cab.org.nz/_resources/app/client/dist/assets/RecheckReport-BU5oqzEF.js

js cab.org.nz collected 2026-09-24 18:50:28 UTC 14,249 bytes, 23 lines download raw bytes

1import{i as v,a as d,m as u,l as _}from"./vendor-CHCIo3bd.js";import{n as h,k as p,D as f,l as m}from"./app-oVuUJ3MT.js";import"./vendor-filepond-C-Be2LEg.js";/* empty css            */const g={components:{icon:v},data(){return{page:1,localPrint:{}}},props:{results:{type:Array},print:{type:Object},items:{type:Number,default:25},count:{type:Number}},computed:{providers(){return this.results?this.results.map(i=>i.details).filter(i=>!!i).filter(i=>this.localPrint.all||!!this.localPrint[i.Code]):[]},currentPage(){let i=this.page*this.items;return i>this.count&&(i=this.count),{number:parseInt(this.page),start:(this.page-1)*this.items+1,end:i}},numPages(){return Math.ceil(this.count/this.items)}},methods:{formatDate(i){const t=d(i),e=d();let s;return t.isAfter(e)?s=t.diff(e,"days"):s=e.diff(t,"days"),s<1?"Today":s===1?"Yesterday":s<7?t.format("dddd"):t.format("DD/MM/YYYY")},goPrev(){this.$router.push(`/dashboard/recheck-report/${parseInt(this.page)-1}`),this.$emit("changePage")},goNext(){this.$router.push(`/dashboard/recheck-report/${parseInt(this.page)+1}`),this.$emit("changePage")}},created(){this.page=this.$route.params.page,this.print&&(this.localPrint={...this.print})},watch:{print:{handler(i){i&&(this.localPrint={...i})},deep:!0}}};var b=function(){var t=this,e=t._self._c;return e("div",[t.currentPage.number<=t.numPages&&t.results?e("div",{staticClass:"dashboard-list__list"},[e("div",{staticClass:"dashboard-list__row dashboard__service-provider-list__header hidden-print"},[e("div",{staticClass:"dashboard__service-provider-list__print hidden-print",attrs:{title:"Click to select all"},on:{click:function(s){return t.$emit("togglePrintAll")}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.localPrint.all,expression:"localPrint.all"}],staticClass:"ml-2",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.localPrint.all)?t._i(t.localPrint.all,null)>-1:t.localPrint.all},on:{input:function(s){return t.$emit("togglePrintAll")},click:function(s){s.stopPropagation()},change:function(s){var r=t.localPrint.all,a=s.target,n=!!a.checked;if(Array.isArray(r)){var o=null,l=t._i(r,o);a.checked?l<0&&t.$set(t.localPrint,"all",r.concat([o])):l>-1&&t.$set(t.localPrint,"all",r.slice(0,l).concat(r.slice(l+1)))}else t.$set(t.localPrint,"all",n)}}})]),t._v(" "),t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),t._m(5)]),t._v(" "),t._l(t.results,function(s){return[t.currentPage.number<=t.numPages?e("div",{key:s.code,staticClass:"dashboard-list__row hidden-print",attrs:{tabindex:"0"},on:{click:function(r){return t.$emit("togglePrint",s.code)}}},[e("div",{staticClass:"dashboard__service-provider-list__print hidden-print"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.localPrint[s.code],expression:"localPrint[provider.code]"}],staticClass:"ml-2",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.localPrint[s.code])?t._i(t.localPrint[s.code],null)>-1:t.localPrint[s.code]},on:{input:function(r){return t.$emit("togglePrint",s.code)},click:function(r){r.stopPropagation()},change:function(r){var a=t.localPrint[s.code],n=r.target,o=!!n.checked;if(Array.isArray(a)){var l=null,c=t._i(a,l);n.checked?c<0&&t.$set(t.localPrint,s.code,a.concat([l])):c>-1&&t.$set(t.localPrint,s.code,a.slice(0,c).concat(a.slice(c+1)))}else t.$set(t.localPrint,s.code,o)}}})]),t._v(" "),e("div",{staticClass:"dashboard__service-provider-list__name"},[t._v(`
2          `+t._s(s.title)+`
3        `)]),t._v(" "),e("div",{staticClass:"dashboard__service-provider-list__status"},[s.public?e("span",[t._v("Public")]):e("span",[t._v("Hidden")])]),t._v(" "),e("div",{staticClass:"dashboard__service-provider-list__recheck"},[s.review_date?e("span",[t._v(t._s(t.formatDate(s.review_date)))]):e("span",[t._v("N/A")])]),t._v(" "),e("div",{staticClass:"dashboard__service-provider-list__last-edited"},[t._v(`
4          `+t._s(t.formatDate(s.last_edited))+`
5        `)]),t._v(" "),e("div",{staticClass:"dashboard__service-provider-list__review-status"},[s.review_status?e("span",[t._v(t._s(s.review_status))]):e("span",[t._v("N/A")])]),t._v(" "),e("div",{staticClass:"dashboard__service-provider-list__tags"},[t._v(`
6          `+t._s(s.tags.join(", "))+`
7        `)])]):t._e()]}),t._v(" "),e("div",{staticClass:"dashboard-list__pagination hidden-print"},[t.currentPage.number>1?e("a",{staticClass:"dashboard-list__pagination__prev",attrs:{href:"/dashboard/recheck-report/"+(t.currentPage.number-1)},on:{click:function(s){return s.preventDefault(),t.goPrev.apply(null,arguments)}}},[e("icon",{attrs:{name:"chevron-left"}}),t._v(" "),e("span",[t._v("Previous")])],1):e("div",{staticClass:"dashboard-list__pagination__prev dashboard-list__pagination__prev--disabled"},[e("icon",{attrs:{name:"chevron-left"}})],1),t._v(" "),e("div",{staticClass:"dashboard-list__pagination__page"},[t._v(`
8        `+t._s(t.currentPage.start)+" - "+t._s(t.currentPage.end)+" of "+t._s(t.count)+`
9      `)]),t._v(" "),t.currentPage.number<t.numPages?e("a",{staticClass:"dashboard-list__pagination__next",attrs:{href:"/dashboard/recheck-report/"+(t.currentPage.number+1)},on:{click:function(s){return s.preventDefault(),t.goNext.apply(null,arguments)}}},[e("span",[t._v("Next")]),t._v(" "),e("icon",{attrs:{name:"chevron-right"}})],1):e("div",{staticClass:"dashboard-list__pagination__next dashboard-list__pagination__next--disabled"},[e("icon",{attrs:{name:"chevron-right"}})],1)])],2):e("div",{staticClass:"p-3 hidden-print"},[e("h1",{staticClass:"h1 font-avenir-medium"},[t._v("No results found.")])]),t._v(" "),e("div",{staticClass:"visible-print-block"},t._l(t.providers,function(s){return e("div",{key:s.Code,staticClass:"print-page-break-after"},[e("div",{staticClass:"hidden-warning hidden-content"},[s.IsPublic?e("h4",[t._v(`
10          Some content on this listing is only available to CAB personnel
11        `)]):e("h4",[t._v("This listing is only available to CAB personnel")])]),t._v(" "),e("h1",[t._v(t._s(s.Title))]),t._v(" "),e("div",{domProps:{innerHTML:t._s(s.Content)}}),t._v(" "),s.HiddenContent?e("span",{staticClass:"h3 hidden-content"},[t._v(`
12        Information only available to CAB personnel
13      `)]):t._e(),t._v(" "),s.HiddenContent?e("div",{staticClass:"hidden-content",domProps:{innerHTML:t._s(s.HiddenContent)}}):t._e(),t._v(" "),s.MailingAddress?e("span",{staticClass:"h3"},[t._v(`
14        Mailing Address
15      `)]):t._e(),t._v(" "),s.MailingAddress?e("p",{domProps:{innerHTML:t._s(s.MailingAddress)}}):t._e(),t._v(" "),s.PhysicalAddress?e("span",{staticClass:"h3"},[t._v(`
16        Physical Address
17      `)]):t._e(),t._v(" "),s.PhysicalAddress?e("p",{domProps:{innerHTML:t._s(s.PhysicalAddress)}}):t._e(),t._v(" "),t._l(s.ContactDetails,function(r,a){return[s.ContactDetails.length?e("div",{key:a,class:[r.IsPublic?"":"hidden-content"]},[e("span",{staticClass:"h3"},[t._v(t._s(r.Label))]),t._v(" "),e("p",[t._v(t._s(r.Value)+" "+t._s(r.Note))])]):t._e()]}),t._v(" "),s.OpeningHours?e("span",{staticClass:"h3"},[t._v(`
18        Opening Hours
19      `)]):t._e(),t._v(" "),s.OpeningHours?e("p",{domProps:{innerHTML:t._s(s.OpeningHours)}}):t._e(),t._v(" "),s.Contacts&&s.Contacts.length?e("div",t._l(s.Contacts,function(r,a){return e("div",{key:a,class:[r.IsPublic?"":"hidden-content"]},[e("h2",[t._v("Contact #"+t._s(a+1))]),t._v(" "),e("div",{class:[r.IsPublic&&r.HideName?"hidden-content":""]},[e("span",{staticClass:"h3"},[t._v("Name")]),t._v(" "),e("p",[t._v(t._s(r.Name)+" "+t._s(r.Note&&" Note: ")+" "+t._s(r.Note))])]),t._v(" "),e("div",{class:[r.IsPublic&&r.HideJobTitle?"hidden-content":""]},[e("span",{staticClass:"h3"},[t._v("Job Title")]),t._v(" "),e("p",[t._v(t._s(r.JobTitle))])]),t._v(" "),t._l(r.ContactDetails,function(n,o){return[r.ContactDetails.length?e("div",{key:o,class:[r.IsPublic&&!n.IsPublic?"hidden-content":""]},[e("span",{staticClass:"h3"},[t._v(`
20                `+t._s(n.Label)+`
21                `),n.PreferredContact?e("span",[t._v("(preferred)")]):t._e()]),t._v(" "),e("p",[t._v(t._s(n.Value)+" "+t._s(n.Note))])]):t._e()]})],2)}),0):t._e(),t._v(" "),e("div",{staticClass:"hidden-content"},[e("span",{staticClass:"h3"},[t._v("Recheck Notes")]),t._v(" "),e("p",[t._v(t._s(s.RecheckNotes))]),t._v(" "),e("span",{staticClass:"h3"},[t._v("Review Date")]),t._v(" "),e("p",[t._v(t._s(t._f("formatDate")(s.ReviewDate)))])]),t._v(" "),e("hr",{staticStyle:{"margin-top":"20px","margin-bottom":"20px"}})],2)}),0)])},P=[function(){var i=this,t=i._self._c;return t("div",{staticClass:"dashboard__service-provider-list__name"},[t("strong",[i._v("Name")])])},function(){var i=this,t=i._self._c;return t("div",{staticClass:"dashboard__service-provider-list__status"},[t("strong",[i._v("Visibility")])])},function(){var i=this,t=i._self._c;return t("div",{staticClass:"dashboard__service-provider-list__recheck"},[t("strong",[i._v("Recheck Date")])])},function(){var i=this,t=i._self._c;return t("div",{staticClass:"dashboard__service-provider-list__last-edited"},[t("strong",[i._v("Last Modified")])])},function(){var i=this,t=i._self._c;return t("div",{staticClass:"dashboard__service-provider-list__review-status"},[t("strong",[i._v("Review Status")])])},function(){var i=this,t=i._self._c;return t("div",{staticClass:"dashboard__service-provider-list__tags"},[t("strong",[i._v("Tags")])])}],C=h(g,b,P,!1,null,"c3505c0c");const w=C.exports,k={name:"recheckReport",components:{DatePicker:m,Dropdown:f,RecheckResults:w,icon:v},props:{items:{type:Number,default:25}},mixins:[p],data(){const i={filters:{recheck_date:0,review_method:"manual"},filterOptions:{tags:[]}};let t,e;return this.$store.state.filters[this.$options.name]?(t=_.cloneDeep(this.$store.state.filters[this.$options.name]),e=_.cloneDeep(this.$store.state.filterOptions[this.$options.name])):(t=_.cloneDeep(i.filters),e=_.cloneDeep(i.filterOptions)),{emptyFilters:i,filters:t,currentServiceProviders:null,previousServiceProviders:[],nextServiceProviders:[],sort:{NextReviewDate:"asc"},count:0,filterOptions:e,showFilters:!0,notifications:[],printItems:{all:!0}}},computed:{...u({currentUserRole:i=>i.currentUserRole})},methods:{fetchData(i=!1){const t=(this.$route.params.page-1)*this.items,e={sort:Object.keys(this.sort).map(s=>`${s},${this.sort[s]}`),limit:i?-1:this.items,offset:i?0:t,send_review_email:this.getReviewMethod()};this.filters.recheck_date&&this.filters.recheck_date.length&&(e.recheck_date=`${d(this.filters.recheck_date[0]).format("YYYY-MM-DD")},${d(this.filters.recheck_date[1]).format("YYYY-MM-DD")}`),this.currentServiceProviders=null,e.extraFields=["all_details"],this.$axios.get("/api/v1/service-provider/search",{params:e}).then(s=>{this.currentServiceProviders=s.data.results,this.count=s.data.meta.total,this.filterOptions.tags=s.data.filters.tags,this.$store.dispatch("updateFilters",{section:this.$options.name,filters:this.filters,filterOptions:this.filterOptions}),i?this.$nextTick(()=>{window.print(),this.currentServiceProviders=this.currentServiceProviders.slice(0,this.items)}):this.printItems.all&&this.togglePrintAll(!0)})},getReviewMethod(){return this.filters.review_method=="all"?"":this.filters.review_method=="manual"?0:1},print(){this.fetchData(!0)},togglePrint(i){this.$set(this.printItems,i,!this.printItems[i]),this.printItems.all=!Object.keys(this.printItems).filter(t=>t!="all"&&this.printItems[t]).length},togglePrintAll(i=null){this.printItems.all=i!==null?i:Object.keys(this.printItems).length==1||!this.printItems.all,this.currentServiceProviders.forEac
21h(t=>{this.$set(this.printItems,t.code,this.printItems.all)})},resize(){window.matchMedia("(min-width: 576px)").matches&&(this.showFilters=!0)},toggleFilters(){this.showFilters=!this.showFilters},openInNewTab(i){window.open(i,"_blank")}},created(){window.addEventListener("resize",this.resize)},mounted(){this.fetchData(),this.showFilters=!0}};var y=function(){var t=this,e=t._self._c;return e("div",{staticClass:"dashboard__interview-list dashboard-list"},[e("div",{staticClass:"dashboard-list__header flex flex--start"},[e("h3",{staticClass:"column column-40"},[t._v("Recheck Report")]),t._v(" "),e("div",{staticClass:"column column-60"},[e("button",{staticClass:"button button--blue float-right",attrs:{type:"button",role:"button",title:"Print"},on:{click:function(s){return t.print()}}},[e("span",{staticClass:"sr-only"},[t._v("Print")]),t._v(" "),e("icon",{attrs:{name:"print","aria-hidden":"true"}})],1)])]),t._v(" "),e("div",{staticClass:"dashboard__interview-filters hidden-print"},[e("h4",[t._v("Filters")]),t._v(" "),e("div",{class:{"dashboard__interview-filters__toggle":!0,"dashboard__interview-filters__toggle--open":!t.showFilters,"dashboard__interview-filters__toggle--close":t.showFilters},attrs:{tabindex:"0"},on:{click:t.toggleFilters}},[t._v(`
22       
23    `)]),t._v(" "),e("div",{class:{"dashboard__interview-filters__row":!0,"dashboard__interview-filters__row--open":t.showFilters,"dashboard__interview-filters__row--close":!t.showFilters}},[e("div",{staticClass:"dashboard__recheck-filters__date"},[e("DatePicker",{attrs:{placeholder:"Recheck date"},on:{input:t.filter},model:{value:t.filters.recheck_date,callback:function(s){t.$set(t.filters,"recheck_date",s)},expression:"filters.recheck_date"}})],1),t._v(" "),e("div",{staticClass:"dashboard__recheck-filters__status"},[e("Dropdown",{attrs:{placeholder:"Review method",options:[{value:"all",text:"All"},{value:"manual",text:"Manual"},{value:"automatic",text:"Automatic"}]},on:{input:t.filter},model:{value:t.filters.review_method,callback:function(s){t.$set(t.filters,"review_method",s)},expression:"filters.review_method"}})],1)])]),t._v(" "),e("RecheckResults",{directives:[{name:"show",rawName:"v-show",value:t.currentServiceProviders,expression:"currentServiceProviders"}],key:t.$route.params.page,attrs:{results:t.currentServiceProviders,print:t.printItems,count:t.count,items:t.items},on:{changePage:function(s){return t.fetchData()},togglePrint:t.togglePrint,togglePrintAll:t.togglePrintAll}}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.currentServiceProviders,expression:"!currentServiceProviders"}],staticClass:"m-5 text-center text--gray"},[e("icon",{attrs:{name:"spinner",scale:"4",pulse:""}})],1)],1)},$=[],x=h(k,y,$,!1,null,null);const R=x.exports;export{R 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.