PageSourceSearch

https://onguardv3.com.au/static/js/9893.75ebacf7.chunk.js

js onguardv3.com.au collected 2026-09-24 12:34:37 UTC 13,915 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkonguard_v3_school_ui=self.webpackChunkonguard_v3_school_ui||[]).push([[7036,9893],{78003:(e,t,i)=>{i.d(t,{A:()=>P});var n=i(9950),r=i(4899),s=i(54694),c=i(70048),o=i(63318),a=i(66075),l=i(19307),d=i(77110);function h(e){return h="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},f.apply(this,arguments)}function p(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function y(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=m(e);if(t){var r=m(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"===typeof t))return t;return g(e)}(this,i)}}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var b=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i},v=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(h,e);var t,i,r,c=y(h);function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(t=c.call(this,e)).onConfirm=function(e){t.setVisible(!1,e);var i=t.props.onConfirm;i&&i.call(g(t),e)},t.onCancel=function(e){t.setVisible(!1,e);var i=t.props.onCancel;i&&i.call(g(t),e)},t.onVisibleChange=function(e){t.props.disabled||t.setVisible(e)},t.saveTooltip=function(e){t.tooltip=e},t.renderOverlay=function(e,i){var r=t.props,s=r.okButtonProps,c=r.cancelButtonProps,a=r.title,l=r.cancelText,d=r.okText,h=r.okType,p=r.icon;return n.createElement("div",null,n.createElement("div",{className:"".concat(e,"-inner-content")},n.createElement("div",{className:"".concat(e,"-message")},p,n.createElement("div",{className:"".concat(e,"-message-title")},a)),n.createElement("div",{className:"".concat(e,"-buttons")},n.createElement(o.A,f({onClick:t.onCancel,size:"small"},c),l||i.cancelText),n.createElement(o.A,f({onClick:t.onConfirm,type:h,size:"small"},s),d||i.okText))))},t.renderConfirm=function(e){var i=e.getPrefixCls,r=t.props,c=r.prefixCls,o=r.placement,d=b(r,["prefixCls","placement"]),h=i("popover",c),p=n.createElement(a.A,{componentName:"Popconfirm",defaultLocale:l.A.Popconfirm},function(e){return t.renderOverlay(h,e)});return n.createElement(s.A,f({},d,{prefixCls:h,placement:o,onVisibleChange:t.onVisibleChange,visible:t.state.visible,overlay:p,ref:t.saveTooltip}))},t.state={visible:e.visible},t}return t=h,r=[{key:"getDerivedStateFromProps",value:function(e){return"visible"in e?{visible:e.visible}:"defaultVisible"in e?{visible:e.defaultVisible}:null}}],(i=[{key:"getPopupDomNode",value:function(){return this.tooltip.getPopupDomNode()}},{key:"setVisible",value:function(e,t){var i=this.props;"visible"in i||this.setState({visible:e});var n=i.onVisibleChange;n&&n(e,t)}},{key:"render",value:function(){return n.createElement(d.TG,null,this.renderConfirm)}}
1])&&p(t.prototype,i),r&&p(t,r),h}(n.Component);v.defaultProps={transitionName:"zoom-big",placement:"top",trigger:"click",okType:"primary",icon:n.createElement(c.A,{type:"exclamation-circle",theme:"filled"}),disabled:!1},(0,r.polyfill)(v);const P=v},82274:(e,t,i)=>{i.r(t),i.d(t,{default:()=>_});var n=i(9950),r=i(63318),s=i(52765),c=i(41988),o=i(29917),a=i(45409),l=i(86925),d=i(78003),h=i(87094),f=i(90650),p=i(12916),u=i(54694),y=(i(63114),i(46685)),g=i(23065),m=i(59051),b=i.n(m),v=i(51189),P=i(46987),C=i(96847),x=i(44414);const A=s.A.Group,S=(0,x.jsx)(C.A,{children:" "});class j extends n.Component{constructor(){super(...arguments),this.state={proficiencyList:[],trainingId:"",viewModal:null,iconLoading:!1,testId:"",userName:"",trainingHasProficiency:!0,hasProficiency:!0,proficiency_date:"",checkAllProficiency:!1,ProficiencyIndeterminate:!1,proficiency_date_disable:!0,checkedProficiencyList:[],proficiency_date_string:"",multi_select:!1},this.show_notification_unavailable=()=>{l.A.info({message:"Unavailable",description:"Proficiency register is not available for this test"})},this.fetchProficiency=()=>{var e;let t=[];this.setState({loadingProficiency:!0,tableLoading:!0});let i={schoolId:(0,y.getCookie)(y.COOKIE.SCHOOL_PID),trainingId:this.state.trainingId,userRole:"Supervisor"};var n;null!==this&&void 0!==this&&null!==(e=this.props)&&void 0!==e&&e.testPublicId&&(i.testId=null===this||void 0===this||null===(n=this.props)||void 0===n?void 0:n.testPublicId);(0,g.Z)("/schools/fetch-training-proficiency-details","put",i).then(e=>{if(e){if(e.status&&"FAIL"===e.status)l.A.error({message:"Failed",description:"Failed to fetch training proficiencyList list."}),this.setState({loadingProficiency:!1,tableLoading:!1});else if(e.data&&e.data.training){let i=e.data.allProficiencyCriteria;if(i)for(let e=0;e<i.length;e++)"ENABLED"===i[e].status&&t.push(i[e]);this.setState({proficiencyList:t,iconLoading:!1},()=>{var t;let i=null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.selectedProficiencyCriteria;if(i&&i.length>0){let t=new Set(this.state.checkedProficiencyList),c=new Set(i.map(e=>e.proficiencyCriteriaId));if(c.size>0){var n,r,s;let{ProficiencyIndeterminate:i,checkAllProficiency:o}=this.state;c.size===(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.allProficiencyCriteria.length)?(i=!1,o=!0):(i=!0,o=!1),null===e||void 0===e||null===(r=e.data)||void 0===r||null===(s=r.allProficiencyCriteria)||void 0===s||s.forEach(e=>{c.has(e.proficiencyCriteriaId)&&t.add(e.proficiencyCriteriaId)}),this.setState({checkedProficiencyList:Array.from(t),ProficiencyIndeterminate:i,checkAllProficiency:o})}}this.setState({loadingProficiency:!1})})}}else l.A.error({message:"Failed",description:"Failed to fetch training proficiencyList list."}),this.setState({loadingProficiency:!1,tableLoading:!1})}).catch(e=>{console.log(e)})},this.showModal=()=>{if(!this.props.supervisorDemonstratedDate||"NOT-COMPLETED"===this.props.supervisorDemonstratedDate||!this.props.passedOn||"NOT-COMPLETED"===this.props.passedOn)return this.show_notification_unavailable(),void this.setState({loadingProficiency:!1,tableLoading:!1});this.setState({viewModal:!0},()=>{this.fetchProficiency()})},this.onCheckAllProficiencyChange=e=>{let t=!0;e.target.checked&&(t=!1);let i=[];this.state.proficiencyList.map(e=>i.push(e.proficiencyCriteriaId)),this.setState({checkedProficiencyList:e.target.checked?i:[],ProficiencyIndeterminate:!1,checkAllProficiency:e.target.checked,proficiency_date_disable:t,proficiency_date:"",proficiency_date_string:""})},this.onChangeProficiency=e=>{let t=!0,{test:i,proficiencyList:n,ProficiencyIndeterminate:r,checkAllProficiency:s,hasProficiency:c}=this.state,o="",a="";n.length===e.length&&(t=!1,o="",a=""),e.length<1?(r=!1,s=!1):e.length===n.length?(r=!1,s=!0):r=!0,c||(this.state.proficiency_date?o=this.state.proficiency_date:i.proficiencyList.date&&(o=b()(i.proficiencyList.date,v.DX))),this.setState({checkedProficiencyList:e,proficiency_date_disable:t,proficiency_date:o,proficiency_date_string:a,ProficiencyIndeterminate:r,checkAllProficiency:s})},this.onChangeProficiencyDate=(e,t)=>
1{this.setState({proficiency_date:e})},this.handleDateReset=()=>{this.setState({checkedProficiencyList:[],proficiency_date:null,proficiency_date_string:"",resetData:!0,ProficiencyIndeterminate:!1,checkAllProficiency:!1})},this.submitProficiency=()=>{let{checkedProficiencyList:e,proficiency_date:t,testId:i}=this.state,n=[],r=[];this.state.proficiencyList.forEach((t,i,s)=>{e.includes(t.proficiencyCriteriaId)&&(t.type?r.push(t.proficiencyCriteriaId):n.push(t.proficiencyCriteriaId))});let s={criteria:n,custom_criteria:r};t?s.date=(0,P.sq)(t):e.length<1&&(s.date=null);let c={publicId:[i],proficiency:s};this.setState({iconLoading:!0}),(0,g.Z)("/test-results/","put",c).then(e=>{this.setState({iconLoading:!1}),"SUCCESS"===e.status?(l.A.success({message:"Success",description:"Proficiency registered successfully"}),this.setState({viewModal:!1},()=>{this.props.demoProfHandleSubmit("Reload")})):l.A.error({message:"Failed",description:"Failed to register Proficiency."})})}}componentDidMount(){this.props.onRef(this),this.props.testPublicId&&this.setState({testId:this.props.testPublicId});let e="";this.props.user_name&&(e=this.props.user_name,this.setState({userName:e})),this.props.trainingHasProficiency&&this.setState({trainingHasProficiency:this.props.trainingHasProficiency}),this.props.hasProficiency&&this.setState({hasProficiency:this.props.hasProficiency}),this.props.trainingId&&this.setState({trainingId:this.props.trainingId}),this.props.multi_select&&this.setState({multi_select:this.props.multi_select})}render(){var e;let t=!1;this.props&&this.props.isSysAdmin&&(t=this.props.isSysAdmin);let{proficiencyList:i,proficiency_date_string:n,proficiency_date_disable:l,hasProficiency:y,proficiency_date:g}=this.state;return(0,x.jsxs)("div",{children:[(0,x.jsx)(a.A,{destroyOnClose:!0,title:"Register Student Training Details - "+this.state.userName,visible:this.state.viewModal,width:800,onCancel:()=>{this.setState({viewModal:!1},()=>{})},okButtonProps:{style:{display:"none"}},cancelText:"Close",children:(0,x.jsx)(f.A,{spinning:this.state.loadingProficiency,className:"onguardLoader",indicator:S,children:i&&i.length>0?(0,x.jsxs)("div",{children:[" ",this.state.trainingHasProficiency||this.state.multi_select?null:(0,x.jsx)("h4",{children:"This Training Unit does not have a proficiency Assessment"}),this.state.trainingHasProficiency||this.state.multi_select?(0,x.jsxs)("div",{className:"sub-section-container",children:[(0,x.jsx)("label",{className:"sub-header-modal",children:"Proficiency Assessment Criteria"}),(0,x.jsx)(p.A,{color:"orange",className:"mb-10",children:"Trainers can substitute the Safety proficiency Criteria listed with their own, as per their WHS training policy and procedures. As a guide trainers can use the Safety proficiency Criteria listed below to assess course participants."}),(0,x.jsx)("div",{children:(0,x.jsx)("b",{children:"The operator/participant/trainee has to have demonstrated - been observed by the trainer - displaying the following Safety Skills:"})}),(0,x.jsx)("br",{}),i.length>0&&(0,x.jsx)("div",{style:{borderBottom:"1px solid #E9E9E9",paddingBottom:"5px",marginBottom:"5px"},children:(0,x.jsx)(s.A,{indeterminate:this.state.ProficiencyIndeterminate,onChange:this.onCheckAllProficiencyChange,checked:this.state.checkAllProficiency,children:"Select all"})}),(0,x.jsx)("div",{children:(0,x.jsx)(A,{value:this.state.checkedProficiencyList,onChange:this.onChangeProficiency,children:(0,x.jsx)(c.A,{children:i?i.map((e,t)=>(0,x.jsx)(h.A,{children:(0,x.jsx)(s.A,{value:e.proficiencyCriteriaId,children:e.statementText},e.proficiencyCriteriaId)},t)):null})})}),(0,x.jsx)("br",{}),(0,x.jsxs)(h.A,{children:[(0,x.jsx)("b",{children:"The 'proficiency Assessment' date can ONLY be registered when ALL Safety proficiency Criteria are observed and assessed by the trainer."}),(0,x.jsx)("br",{}),(0,x.jsx)("br",{}),!0===this.state.trainingHasProficiency?(0,x.jsx)(p.A,{className:"mb-10",color:"orange",children:"Set by SysAdmin: Yes"}):(0,x.jsx)(p.A,{className:"mb-10",color:"orange",children:"Set by SysAdmin: No"})," ",(0,x.jsx)("br",{}),(0,x.jsx)("br",{}),(0,x.jsxs)("span",{children:[(0,x.jsx)("b",{style:{marginRight:10},children:"Register proficiency Assessment Date"}),n&&i.length>0&&(0,x.jsx)("span",{children:n}),(!n||0===i.length)&&(0,x.jsx)(o.A,{className:"mr-5",format:"DD/MM/YYYY",disabled:i.length>0&&y&&!this.state.checkAllProficiency,onChange:this.onChangeProficiencyDate,value:g})]})]}),(0,x.jsx)("br",{}),(0,x.jsx)(d.A,{title:"Are you sure you want to register the proficiency for the selected course participant?",onConfirm:this.submitProficiency,placement:"right",children:(0,x.jsx)(r.A,{type:"primary",className:"date-button",loading:this.state.iconLoading,children:"Save"})}),"\xa0 \xa0",t&&(0,x.jsx)(d.A,{title:"Are you sure you want to RESET the date and criteria?",disabled:this.state.iconLoading,onConfirm:()=>{this.handleDateReset()},children:(0,x.jsx)(r.A,{type:"primary",className:"save-btn-red fixedTableButtons",disabled:this.state.iconLoading,children:"Reset Date and Criteria"})})]}):null]}):(0,x.jsx)("p",{children:"No Active Proficiency Criteria available for this training."})})}),!1!==this.props.showLink&&(null!==this&&void 0!==this&&null!==(e=this.props)&&void 0!==e&&e.isProgressing?(0,x.jsx)("div",{children:(0,x.jsx)(u.A,{title:"Progressing",children:(0,x.jsx)("a",{onClick:()=>{this.showModal()},children:"Progressing"})})}):(0,x.jsx)("div",{children:(0,x.jsx)(u.A,{title:"Register Date",children:(0,x.jsx)("a",{onClick:()=>{this.showModal()},children:"Not Registered"})})}))]})}}const _=(0,v.y)(j)}}]);

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.