{"version":3,"sources":["components/googleMap.js","components/textControl.js","components/emailControl.js","components/contactUs.js","helpers/cookies.js","components/login.js","components/utils.js","components/HelpTip.js","components/herdListFilter.js","components/Pagination.js","components/CertGenButton.js","components/DownloadedCerts.js","components/herdList.js","components/HerdListData.js","serviceWorker.js","index.js"],"names":["GoogleMap","props","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","_ref","isScriptLoadSucceed","map","window","google","maps","Map","document","getElementById","zoom","center","lat","lng","mapTypeId","MapTypeId","ROADMAP","Marker","position","LatLng","alert","react_default","a","createElement","id","className","style","height","Component","scriptLoader","TextControl","_React$Component","_this","OnBlur","bind","assertThisInitialized","OnChange","checkRequired","validationText","state","valid","inherits","createClass","key","value","validationResult","required","setState","validation","name","onBlur","event","target","fieldChange","_this2","type","placeholder","onChange","_this3","message","control","textarea","renderTextArea","renderInput","Fragment","label","renderValidation","React","EmailControl","LoseFocus","validEmail","require","validate","textControl","formData","email","ContactUs","FieldChange","assign","ValidationCheck","submitForm","disabled","onClick","emailControl","renderButton","formOrMessage","renderForm","confirmationMessage","postData","objectSpread","thisState","axios","post","Content-Type","then","response","responseStatus","data","catch","error","console","log","wrapper","getAttribute","ReactDOM","render","contactUs_ContactUs","setCookie","cname","cvalue","exdays","d","Date","setTime","getTime","expires","toUTCString","cookie","deleteCookie","toGMTString","getCookie","ca","decodeURIComponent","split","i","length","c","charAt","substring","indexOf","defaultState","redirect","username","password","breedId","showModal","Breeds","breeds","breed","Login","handleUsernameChange","handlePasswordChange","handleSubmit","handleCancel","handleBreedChange","handleShowModal","handleCloseModal","expiryDate","isNaN","location","replace","Username","Password","SocietyId","ReCaptchaId","returndata","SesssionTokenID","Data","TokenExpiry","sesssionTokenID","setAccount","href","Button","variant","Spinner_default","animation","radioButtons","Form","Check","checked","Group","controlId","Label","Container","fluid","Row","Col","renderBreeds","Control","Text","renderFailedLogon","renderLoginButton","renderSpinner","Modal","show","onHide","Header","closeButton","Title","Body","Footer","renderPage","login_Login","logout","getPDF","userSessionGuid","filepath","filename","guid","status","method","responseType","file","Blob","fileURL","URL","createObjectURL","download","body","appendChild","click","hintCloseStyle","float","cursor","marginTop","marginRight","defaultClass","HelpTip","hintTextStyle","class","stage","closeHelpText","topMargin","marginLeft","topMarginValue","Number","undefined","zIndex","hintTextStyleFunction","leftMargin","updateParent","counter","no","role","text","SliderFilter","lazy","Promise","all","__webpack_require__","e","HerdListFilter","filterColumn","handleAgeGroup","handleDOB","handleCheckChange","handleDeadChange","filterState","updateHelpTip","resetTable","filterValue","filtered","searchText","ApplyFilter","column","startValue","endValue","fromValue","toValue","dob","min","max","ageGroup","sex","dead","xs","sm","md","lg","xl","animalCount","react","fallback","rangemin","rangemax","sliderStep","maxRangeDisplayValue","components_HelpTip","helpTipCounter","ToggleButtonGroup","ToggleButton","defaultButton","children","Pagination","filterPages","visiblePages","totalPages","filter","page","getVisiblePages","total","changePage","pages","nextProps","onPageChange","_this$props$PageButto","PageButtonComponent","activePage","previousText","index","array","concat","nextText","CertGenButton","handleGenerate","handleAddToBatch","handleRemoveFromBatch","applyStatus","animalID","filePath","prefix","BatchID","Button_default","block","handleView","sexcode","setAppElement","DownloadedCerts","renderBackdrop","top","bottom","left","right","backgroundColor","opacity","table","es","columns","PaginationComponent","pageSize","defaultSorted","desc","accessor","width","Cell","cellProps","components_CertGenButton","original","SessionGUID","FilePath","Status","BatchId","Completed","dateFormat","batchID","newStatus","findIndex","x","react_modal_lib_default","overlayClassName","isOpen","modalIsOpen","onRequestClose","hide","linkStyle","fontWeight","pageSizeOptions","HELPTIPCOUNTER","HerdList","applyFilter","changeItemsPerPage","applyStatusByBatch","hideDownloadedCertsModal","showDownloadedCertsModal","helptipCounter","getHelpTipCounter","update","updateBatchStatus","submitBatch","resetBatch","downloadAll","updateDataTableRow","updateDataDownloadedTableRow","defaultColumns","animalName","AnimalName","Animal_ID","Sex_Code","minWidth","filterMethod","row","String","toLowerCase","includes","Line_No","HBN","ear_Tag","StrippedEarTag","link","data-tip","color","DateOfBirth","DownloadedCertsModalIsOpen","downloadedCerts","seconds","batchesProcessing","batchAnimalIDs","numberOfRecords","selectedItemsPerPage","columnFilter","makeDefaultState","prevState","distinctBatches","toConsumableArray","Set","randomItemIndex","Math","floor","random","refreshRow","batchId","url","push","incrementHelpTipCounter","sessionGUID","completed","forEach","element","updateRowStatus","rowIndex","_this4","updateDataTableRowByAnimalID","_this5","_this6","sessionGUIDList","b","rows","_this7","animalIDQS","JSON","stringify","path","generateCertificateBatch","result","selectTable","getResolvedState","sortedData","oldState","slice","copy","selected","components_DownloadedCerts","_this8","downloadedCertsDataisLoaded","tableDataisLoaded","herdListFilter","getRowCount","noGutters","renderSubmitBatchButton","renderResetBatch","DropdownButton","title","item","Dropdown","Item","onSelect","eventKey","data-test","parseInt","renderViewBatches","noDataText","defaultPageSize","onPageSizeChange","onFilteredChange","ref","r","onSortedChange","newSorted","shiftKey","newFilter","splice","_this9","_this10","cols","AgeGroup","apply","Sex","distinctSexes","filterStateDob","Infinity","isUndefined","prevProps","_this11","redirectToLogin","GetDOBMinMax","GetAgeGroupMinMax","interval","setInterval","refresh","clearInterval","getData","getDownloadedCertificatesData","herdList_HerdList","Boolean","hostname","match","googleMap","navigator","serviceWorker","ready","registration","unregister"],"mappings":"oNAMMA,cAEF,SAAAA,EAAYC,GAAQ,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAJ,GAAAE,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAF,GAAAO,KAAAH,KACVH,8FAMN,GAD4CO,EAArBC,oBAGnB,KAAIC,EAAM,IAAIC,OAAOC,OAAOC,KAAKC,IAAIC,SAASC,eAAe,iBAAkB,CAC3EC,KAAM,GACNC,OAAQ,CAACC,IAAK,UAAWC,KAAM,UAC/BC,UAAWV,OAAOC,OAAOC,KAAKS,UAAUC,UAG7B,IAAIZ,OAAOC,OAAOC,KAAKW,OAAO,CAC3CC,SAAU,IAAId,OAAOC,OAAOC,K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C,eAAe,mBAClCgB,GAAY6E,GAAUA,GAAQC,aAAa,kBAAoB,KACjED,IACFE,IAASC,OAAOpF,EAAAC,EAAAC,cAACyd,EAAD,CAAYvd,UAAWA,KAAa6E,IDoHhD,kBAAmB2Y,WACrBA,UAAUC,cAAcC,MAAMrZ,KAAK,SAAAsZ,GACjCA,EAAaC","file":"static/js/main.72540d92.chunk.js","sourcesContent":["import React, { Component } from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport scriptLoader from 'react-async-script-loader';\r\n\r\n\r\n\r\nclass GoogleMap extends Component {\r\n \r\n constructor(props) {\r\n super(props); \r\n \r\n }\r\n \r\n\r\n componentWillReceiveProps({isScriptLoadSucceed}){ \r\n if (isScriptLoadSucceed) { \r\n\r\n var map = new window.google.maps.Map(document.getElementById('map_container'), {\r\n zoom: 16,\r\n center: {lat: 52.676882, lng: -2.430622},\r\n mapTypeId: window.google.maps.MapTypeId.ROADMAP\r\n });\r\n\r\n const marker = new window.google.maps.Marker({\r\n position: new window.google.maps.LatLng(52.676882, -2.430622),\r\n map: map \r\n }); \r\n }\r\n else{\r\n alert(\"script not loaded\")\r\n }\r\n }\r\n\r\n render() { \r\n return (\r\n
Loading Google Map
\r\n );\r\n }\r\n}\r\nexport default scriptLoader([\"https://maps.googleapis.com/maps/api/js?key=AIzaSyAkpoMYjeBPoLw83ZNtvVsXBneHUCFdQbI&sensor=false\"])(GoogleMap);\r\n\r\n\r\n","import React from 'react';\r\n\r\n\r\nexport class TextControl extends React.Component {\r\n\r\n constructor(props){\r\n super(props); \r\n this.OnBlur = this.OnBlur.bind(this);\r\n this.OnChange = this.OnChange.bind(this);\r\n this.checkRequired = this.checkRequired.bind(this);\r\n let validationText = \"\";\r\n if(typeof(props.validationText)!==\"undefined\")\r\n {\r\n validationText = props.validationText;\r\n }\r\n this.state = {validationText , valid: true};\r\n }\r\n \r\n\r\n checkRequired(value){ \r\n let validationResult = true;\r\n if(this.props.required){\r\n validationResult = value!=='';\r\n this.setState({validationText: \"Required\", valid: validationResult});\r\n }\r\n this.props.validation(this.props.name,validationResult, value);\r\n }\r\n\r\n OnBlur() { \r\n if(this.props.onBlur!=null){\r\n this.props.onBlur(this.props.value);\r\n }\r\n if(this.props.validation!=null){ \r\n this.checkRequired(this.props.value);\r\n }\r\n }\r\n\r\n OnChange(event) {\r\n this.checkRequired(event.target.value);\r\n this.props.fieldChange(this.props.name, event.target.value); \r\n }\r\n\r\n renderInput() {\r\n return (\r\n this.OnChange(event)} \r\n onBlur={this.OnBlur}\r\n className=\"form-control\"\r\n />\r\n )\r\n }\r\n\r\n renderTextArea() {\r\n return (\r\n \r\n )\r\n }\r\n\r\n renderValidation(){\r\n let message = this.state.validationText;\r\n if(this.state.valid && (this.props.valid || this.props.valid===null || typeof(this.props.valid) === \"undefined\")){\r\n message = \"\";\r\n } \r\n return message;\r\n }\r\n\r\n render() {\r\n let control = null;\r\n if(this.props.textarea) {\r\n control = this.renderTextArea();\r\n } else {\r\n control = this.renderInput();\r\n }\r\n return(\r\n <>
\r\n \r\n {control} \r\n {this.renderValidation()}\r\n
\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default TextControl;","import React from 'react';\r\nimport TextControl from './textControl';\r\n\r\nexport class EmailControl extends React.Component {\r\n\r\n constructor(){\r\n super(); \r\n this.LoseFocus = this.LoseFocus.bind(this);\r\n this.state = {validEmail : null};\r\n }\r\n \r\n LoseFocus(name, required, value) { \r\n const validator = require(\"email-validator\"); \r\n const validationResult = validator.validate(value); \r\n this.setState({validEmail : validationResult});\r\n this.props.validation(this.props.name, validationResult);\r\n }\r\n \r\n\r\n render() { \r\n return(\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default EmailControl;","import React, { Component } from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport TextControl from './textControl';\r\nimport EmailControl from './emailControl';\r\nimport axios from \"axios\";\r\n\r\n\r\nconst formData = { name :'', message:'', email:'' };\r\nconst validation = { name :false, message:false, email:false };\r\n\r\n\r\nclass ContactUs extends Component {\r\n \r\n constructor(props) {\r\n super(props); \r\n this.state={formData, validation, state:'Form'}; \r\n this.submitForm = this.submitForm.bind(this);\r\n }\r\n \r\n\r\n FieldChange = (name,value) => { \r\n let formData = Object.assign(this.state.formData); \r\n formData[name]= value; \r\n this.setState({ formData }); \r\n } \r\n\r\n\r\n ValidationCheck = (name, value) => {\r\n let validation = Object.assign(this.state.validation); \r\n validation[name] = value;\r\n this.setState({validation}); \r\n }\r\n\r\n renderButton(){\r\n const valid = this.state.validation['name'] && this.state.validation['email'] && this.state.validation['message'];\r\n const disabled = !valid ? 'disabled' : ''; \r\n return (\r\n \r\n )\r\n }\r\n\r\n renderForm(){\r\n return (\r\n <> \r\n \r\n \r\n \r\n {this.renderButton()} \r\n \r\n );\r\n }\r\n\r\n render() { \r\n let formOrMessage = '';\r\n if (this.state.state===\"Form\") {\r\n formOrMessage = this.renderForm();\r\n } else if(this.state.state===\"Success\") {\r\n formOrMessage = this.props.confirmationMessage;\r\n } else {\r\n formOrMessage = this.state.state;\r\n }\r\n return (\r\n <>\r\n {formOrMessage}\r\n \r\n )\r\n }\r\n\r\n submitForm(event) {\r\n \r\n const headers = { 'Content-Type': 'application/x-www-form-urlencoded' };\r\n const postData = { ...this.state.formData }; \r\n const thisState = this; \r\n axios.post('/umbraco/api/ContactUs/SubmitForm', \r\n postData\r\n , headers)\r\n .then(function (response) { \r\n const responseStatus = response.data;\r\n if(responseStatus==='Success') {\r\n thisState.setState({state:'Success'}); \r\n }\r\n else if(responseStatus==='Recaptcha Failure') { \r\n thisState.setState({state:'There has been a problem submiting your form.'})\r\n }\r\n })\r\n .catch(function (error) { \r\n console.log(error); \r\n }); \r\n }\r\n}\r\nexport default ContactUs;\r\n\r\n\r\nconst wrapper = document.getElementById(\"react-contactUs\");\r\nconst className = wrapper ? wrapper.getAttribute('data-className') : null;\r\nconst confirmationMessage = wrapper ? wrapper.getAttribute('data-confirmationMessage') : null;\r\nif (wrapper) {\r\n ReactDOM.render(,wrapper);\r\n}","export function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\r\n var expires = \"expires=\" + d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n }\r\n \r\n export function deleteCookie(cname) {\r\n var d = new Date();\r\n d.setTime(d.getTime() - (1000 * 60 * 60 * 24)); \r\n var expires = \"expires=\" + d.toGMTString();\r\n document.cookie = cname + \"=; \" + expires + \";path=/\";\r\n }\r\n \r\n \r\n export function getCookie(cname) {\r\n var name = cname + \"=\";\r\n var decodedCookie = decodeURIComponent(document.cookie);\r\n var ca = decodedCookie.split(';');\r\n for (var i = 0; i < ca.length; i++) {\r\n var c = ca[i];\r\n while (c.charAt(0) === ' ') {\r\n c = c.substring(1);\r\n }\r\n if (c.indexOf(name) === 0) {\r\n return c.substring(name.length, c.length);\r\n }\r\n }\r\n return \"\";\r\n }","import {Form,Button, Row, Col, Container, Modal} from \"react-bootstrap\";\r\nimport React, { Component } from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport axios from \"axios\";\r\nimport { setCookie, getCookie } from \"../helpers/cookies\";\r\nimport Spinner from 'react-bootstrap/Spinner'\r\n\r\nfunction defaultState(redirect) {\r\n return {username: getCookie(\"Prefix\"), password:'', breedId:(getCookie(\"Breed\")==\"\" ? 1 : getCookie(\"Breed\")), showModal:false, redirect: redirect, state:'start'};\r\n}\r\nconst Breeds =\r\n {\"breeds\": \r\n [\r\n {\r\n \"id\":1,\r\n \"breed\":\"Holstein and British Friesian\",\r\n \"key\":1\r\n },\r\n {\r\n \"id\":5,\r\n \"breed\":\"Ayrshire\",\r\n \"key\":5\r\n },\r\n {\r\n \"id\":7,\r\n \"breed\":\"Brown Swiss\",\r\n \"key\":7\r\n },\r\n {\r\n \"id\":4,\r\n \"breed\":\"Guernsey\",\r\n \"key\":4\r\n },\r\n {\r\n \"id\":2,\r\n \"breed\":\"Jersey UK\",\r\n \"key\":2\r\n },/*\r\n {\r\n \"id\":12,\r\n \"breed\":\"Jersey Island\",\r\n \"key\":12\r\n },*/\r\n {\r\n \"id\":11,\r\n \"breed\":\"Montbeliarde\",\r\n \"key\":11\r\n }\r\n ]\r\n \r\n }\r\nfunction setAccount(sesssionTokenID, username, password, breedId, )\r\n{\r\n var headers = { 'Content-Type': 'application/x-www-form-urlencoded' };\r\n var postData = { SesssionTokenID : sesssionTokenID, Username: username, Password: password, SocietyId: breedId, ReCaptchaId: '' };\r\n return axios.post('/umbraco/api/WebDataAcount/Account', postData, headers).then(function () { \r\n\r\n });\r\n\r\n}\r\nexport function redirectToLogin(error)\r\n{\r\n\r\n const expiryDate = new Date(getCookie('expiryDate')).getTime();\r\n\r\n if(isNaN(expiryDate) || (new Date().getTime() + (5 * 60 * 1000))> expiryDate || error)\r\n {\r\n const wrapper = document.getElementById(\"react-herdList\");\r\n const redirect = wrapper ? (wrapper.getAttribute('data-redirect') ? wrapper.getAttribute('data-redirect') : '/member-login' ) : '/member-login';\r\n window.location.replace(redirect);\r\n return true;\r\n }\r\n \r\n}\r\nclass Login extends Component {\r\n \r\n constructor(props) {\r\n super(props); \r\n this.state = defaultState(this.props.redirect); \r\n this.handleUsernameChange = this.handleUsernameChange.bind(this);\r\n this.handlePasswordChange = this.handlePasswordChange.bind(this);\r\n this.handleSubmit = this.handleSubmit.bind(this);\r\n this.handleCancel = this.handleCancel.bind(this);\r\n this.handleBreedChange = this.handleBreedChange.bind(this);\r\n this.handleShowModal = this.handleShowModal.bind(this);\r\n this.handleCloseModal = this.handleCloseModal.bind(this);\r\n }\r\n handleCloseModal() {\r\n this.setState({ showModal: false });\r\n }\r\n \r\n handleShowModal() {\r\n this.setState({ showModal: true });\r\n }\r\n\r\n handleUsernameChange(event) {\r\n this.setState({username: event.target.value, state:'start'});\r\n }\r\n\r\n handlePasswordChange(event) {\r\n this.setState({password: event.target.value, state:'start'});\r\n }\r\n \r\n handleLoggedIn()\r\n {\r\n const expiryDate = new Date(getCookie('expiryDate')).getTime();\r\n console.log(expiryDate);\r\n if(!isNaN(expiryDate))\r\n {\r\n if((new Date().getTime() + (5 * 60 * 1000)) < expiryDate)\r\n {\r\n if (getCookie('SesssionTokenID'))\r\n {\r\n const wrapper = document.getElementById(\"react-login\");\r\n const redirect = wrapper ? (wrapper.getAttribute('data-redirect') ? wrapper.getAttribute('data-redirect') : 'herd-list' ) : 'herd-list';\r\n window.location.replace(redirect);\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n handleSubmit(event) {\r\n this.setState({state : \"started\"});\r\n var headers = { 'Content-Type': 'application/x-www-form-urlencoded' };\r\n var postData = { Username: this.state.username, Password: this.state.password, SocietyId: this.state.breedId, ReCaptchaId: '' };\r\n //var postData = { Username: prefix, Password: pin, SocietyId: societyId, ReCaptchaId: getCookie(\"recaptchaID\") };\r\n var redirect = this.state.redirect;\r\n var returndata = null; \r\n var thisState = this;\r\n var username = this.state.username;\r\n var password = this.state.password;\r\n var breedId = this.state.breedId;\r\n axios.post('/umbraco/api/Login/Authenticate', \r\n postData\r\n , headers)\r\n .then(function (response) { \r\n returndata = { SesssionTokenID: response.data.Data.SesssionTokenID, TokenExpiry: response.data.Data.TokenExpiry } \r\n if(returndata.SesssionTokenID!=='LOGON_FAIL') {\r\n setCookie('expiryDate',response.data.Data.TokenExpiry);\r\n setCookie('SesssionTokenID', returndata.SesssionTokenID); \r\n setCookie('Prefix', username);\r\n setCookie('Breed', breedId);\r\n setAccount(returndata.SesssionTokenID,username, password, breedId).then(function (response) { \r\n window.location.href = redirect;\r\n });\r\n \r\n }\r\n else\r\n {\r\n thisState.setState({state:'LOGIN_FAIL'})\r\n }\r\n })\r\n .catch(function (error) { \r\n thisState.setState({state:'LOGIN_FAIL'})\r\n console.log(error); \r\n }); \r\n\r\n }\r\n handleBreedChange(breed) { \r\n this.setState({breedId: breed.target.value}); \r\n }\r\n\r\n handleCancel(event) {\r\n this.setState(defaultState);\r\n } \r\n\r\n renderDefaultBreed(breed){\r\n if (breed === this.state.breed) {\r\n return 'defaultChecked';\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n\r\n renderFailedLogon(){ \r\n if (this.state.state==='LOGIN_FAIL'){\r\n return(
Login failed, please try again
);\r\n }\r\n }\r\n renderLoginButton()\r\n {\r\n if (this.state.state==='started'){\r\n return (\r\n \r\n )\r\n }\r\n else{\r\n return (\r\n )\r\n }\r\n \r\n }\r\n renderSpinner()\r\n {\r\n if (this.state.state==='started')\r\n {\r\n return (\r\n \r\n )\r\n }\r\n }\r\n renderBreeds() {\r\n \r\n const radioButtons = Breeds.breeds.map(breed => \r\n \r\n ); \r\n return (\r\n \r\n Choose society: \r\n {radioButtons} \r\n \r\n )\r\n }\r\n renderPage()\r\n {\r\n /*\r\n if (this.handleLoggedIn())\r\n {\r\n return <>;\r\n }\r\n else {*/\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n { this.renderBreeds() }\r\n \r\n \r\n Prefix:\r\n \r\n \r\n We'll never share your prefix with anyone else.\r\n \r\n \r\n \r\n Pin:\r\n \r\n \r\n We'll never share your pin with anyone else.\r\n \r\n \r\n {this.renderFailedLogon()} \r\n {this.renderLoginButton()}\r\n  \r\n\r\n \r\n  \r\n \r\n  \r\n {this.renderSpinner()}\r\n
\r\n \r\n
\r\n \r\n \r\n Forgotten pin/prefix\r\n \r\n You need to call Membership services on 03458 734 210\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n /* }*/\r\n }\r\n render() {\r\n return this.renderPage()\r\n }\r\n}\r\nexport default Login;\r\n\r\n\r\nconst wrapper = document.getElementById(\"react-login\");\r\nconst redirect = wrapper ? wrapper.getAttribute('data-redirect') : null;\r\n//wrapper ? ReactDOM.render(, wrapper) : false;\r\n\r\nif (wrapper) {\r\n ReactDOM.render(,wrapper);\r\n}","import axios from \"axios\"\r\nimport { deleteCookie } from \"../helpers/cookies\";\r\n\r\nexport function logout()\r\n{\r\n deleteCookie('expiryDate');\r\n deleteCookie(\"SesssionTokenID\");\r\n window.location.replace(\"/login\");\r\n}\r\n\r\nexport function getPDF(userSessionGuid, filepath, filename, guid, status){\r\n\r\n axios('/umbraco/api/Cert/GetCert?userSessionGuid=' + userSessionGuid + '&file=' + filepath + '&guid=' + guid + \"&status=\" + status, {\r\n method: 'GET',\r\n responseType: 'blob'\r\n})\r\n.then(response => {\r\n const file = new Blob(\r\n [response.data], \r\n {type: 'application/pdf'});\r\n const fileURL = URL.createObjectURL(file);\r\n\r\n let a = document.createElement(\"a\");\r\n if (typeof a.download === \"undefined\") {\r\n window.location.href = fileURL;\r\n } else {\r\n a.href = fileURL;\r\n a.download = filename + \".pdf\";\r\n document.body.appendChild(a);\r\n a.click();\r\n }\r\n},\r\n(error) => {\r\n console.log(error);\r\n if (error.response.status === 401)\r\n {\r\n logout();\r\n }\r\n }\r\n);\r\n\r\n}\r\n\r\n","import React, { Component } from \"react\";\r\nimport { getCookie, setCookie } from \"../helpers/cookies\";\r\n \r\n function hintTextStyleFunction(topMargin, marginLeft) {\r\n var topMarginValue = Number(topMargin) + 'px'\r\n \r\n if (marginLeft === undefined)\r\n {\r\n marginLeft = 10;\r\n }\r\n var marginLeftValue = Number(marginLeft) + 'px'\r\n return ({\r\n zIndex:1000,\r\n position:'absolute',\r\n marginLeft:marginLeftValue,\r\n marginTop: topMarginValue\r\n });\r\n }\r\n\r\n export function getHelpTipCounter(name) {\r\n var helptipCounter = getCookie(name);\r\n if(helptipCounter===''){\r\n helptipCounter=0;\r\n setCookie(name, helptipCounter);\r\n }\r\n return helptipCounter;\r\n }\r\n\r\n export function incrementHelpTipCounter(name, helpTipCounter) {\r\n helpTipCounter ++;\r\n setCookie(name, helpTipCounter);\r\n return helpTipCounter;\r\n }\r\n\r\n const hintCloseStyle ={\r\n float:'right',\r\n cursor: 'pointer',\r\n marginTop:'-15px',\r\n marginRight:'-5px'\r\n }\r\n\r\nconst defaultClass = 'helpTipContainer';\r\n\r\nclass HelpTip extends Component {\r\n\r\n hintTextStyle ={};\r\n\r\n constructor(props) {\r\n super(props); \r\n this.state = {class: defaultClass + ' d-none', stage:'loading' }; \r\n this.closeHelpText = this.closeHelpText.bind(this);\r\n this.hintTextStyle = hintTextStyleFunction(this.props.topMargin, this.props.leftMargin);\r\n }\r\n\r\n closeHelpText() { \r\n this.setState({class:defaultClass + ' d-none', stage:'close'}) \r\n this.props.updateParent();\r\n }\r\n\r\n render() {\r\n var className = defaultClass;\r\n if(this.props.counter!==this.props.no) {\r\n className = className + ' d-none';\r\n }\r\n return (\r\n
\r\n x
\r\n {this.props.text}\r\n
\r\n \r\n
\r\n \r\n );\r\n }\r\n}\r\nexport default HelpTip;","import React, { Component, Suspense } from \"react\";\r\nimport { Container, Button, Row, Col, ToggleButtonGroup, ToggleButton } from \"react-bootstrap\";\r\nimport { getCookie } from \"../helpers/cookies\";\r\nimport HelpTip from './HelpTip.js';\r\n\r\nconst SliderFilter = React.lazy(() => import('./SliderFilter'));\r\n\r\nclass HerdListFilter extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.filterColumn = this.filterColumn.bind(this);\r\n this.handleAgeGroup = this.handleAgeGroup.bind(this);\r\n this.handleDOB = this.handleDOB.bind(this);\r\n this.handleCheckChange = this.handleCheckChange.bind(this);\r\n this.handleDeadChange = this.handleDeadChange.bind(this);\r\n this.state = { filterState: this.props.filterState };\r\n this.updateHelpTip = this.updateHelpTip.bind(this);\r\n this.resetTable = this.resetTable.bind(this);\r\n\r\n }\r\n updateHelpTip() {\r\n this.props.updateHelpTip();\r\n }\r\n filterColumn(e) {\r\n const { value } = e.target;\r\n const filterValue = value;\r\n const filtered = [{ id: e.target.id, value: filterValue }];\r\n\r\n const filterState = this.state.filterState;\r\n\r\n filterState.searchText = value;\r\n\r\n this.setState({ filterState: filterState });\r\n\r\n this.props.ApplyFilter(filtered, filterState);\r\n\r\n }\r\n\r\n handleDOB(column, startValue, endValue) {\r\n const filtered = [{ id: column, fromValue: startValue, toValue: endValue }];\r\n\r\n const filterState = this.state.filterState;\r\n\r\n filterState.dob.min = startValue;\r\n filterState.dob.max = endValue;\r\n\r\n this.setState({ filterState: filterState });\r\n\r\n this.props.ApplyFilter(filtered, this.state.filterState);\r\n }\r\n\r\n handleAgeGroup(column, startValue, endValue) {\r\n const filtered = [{ id: column, fromValue: startValue, toValue: endValue }];\r\n const filterState = this.state.filterState;\r\n\r\n filterState.ageGroup.min = startValue;\r\n filterState.ageGroup.max = endValue;\r\n\r\n this.setState({ filterState: filterState });\r\n\r\n this.props.ApplyFilter(filtered, this.state.filterState);\r\n }\r\n\r\n handleCheckChange(value, event) {\r\n const filtered = [{ id: \"Sex\", value: value }];\r\n\r\n const filterState = this.state.filterState;\r\n\r\n filterState.sex = value;\r\n\r\n this.setState({ filterState: filterState });\r\n\r\n this.props.ApplyFilter(filtered, this.state.filterState);\r\n\r\n }\r\n\r\n handleDeadChange(value, event) {\r\n\r\n const filtered = [{ id: \"Dead\", value: value }];\r\n\r\n const filterState = this.state.filterState;\r\n\r\n filterState.dead = value;\r\n\r\n this.setState({ filterState: filterState });\r\n\r\n this.props.ApplyFilter(filtered, this.state.filterState);\r\n\r\n }\r\n resetTable() {\r\n this.props.resetTable();\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n \r\n
{getCookie(\"Prefix\")}
\r\n
\r\n
\r\n {this.props.animalCount}\r\n
\r\n
\r\n
\r\n Animals listed\r\n
\r\n \r\n \r\n\r\n Loading...
}>\r\n \r\n \r\n \r\n \r\n \r\n\r\n Loading...
}>\r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n
\r\n \r\n Animal Search \r\n
\r\n \r\n \r\n
\r\n
\r\n Dead\r\n
\r\n\r\n
\r\n\r\n \r\n All\r\n Yes\r\n No\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n
\r\n
\r\n Sex\r\n
\r\n\r\n
\r\n\r\n \r\n All\r\n Male\r\n Female\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n\r\n \r\n \r\n\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n\r\n\r\n \r\n\r\n\r\n );\r\n }\r\n\r\n}\r\nexport default HerdListFilter;","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nconst defaultButton = props => ;\r\n\r\nclass Pagination extends React.Component {\r\n constructor(props) {\r\n super();\r\n\r\n this.changePage = this.changePage.bind(this);\r\n\r\n this.state = {\r\n visiblePages: this.getVisiblePages(null, props.pages)\r\n };\r\n }\r\n\r\n static propTypes = {\r\n pages: PropTypes.number,\r\n page: PropTypes.number,\r\n PageButtonComponent: PropTypes.any,\r\n onPageChange: PropTypes.func,\r\n previousText: PropTypes.string,\r\n nextText: PropTypes.string\r\n };\r\n\r\n componentWillReceiveProps(nextProps) {\r\n if (this.props.pages !== nextProps.pages) {\r\n this.setState({\r\n visiblePages: this.getVisiblePages(null, nextProps.pages)\r\n });\r\n }\r\n\r\n this.changePage(nextProps.page + 1);\r\n }\r\n\r\n filterPages = (visiblePages, totalPages) => {\r\n return visiblePages.filter(page => page <= totalPages);\r\n };\r\n\r\n getVisiblePages = (page, total) => {\r\n if (total < 7) {\r\n return this.filterPages([1, 2, 3, 4, 5, 6], total);\r\n } else {\r\n if (page % 5 >= 0 && page > 4 && page + 2 < total) {\r\n return [1, page - 1, page, page + 1, total];\r\n } else if (page % 5 >= 0 && page > 4 && page + 2 >= total) {\r\n return [1, total - 3, total - 2, total - 1, total];\r\n } else {\r\n return [1, 2, 3, 4, 5, total];\r\n }\r\n }\r\n };\r\n\r\n changePage(page) {\r\n const activePage = this.props.page + 1;\r\n\r\n if (page === activePage) {\r\n return;\r\n }\r\n\r\n const visiblePages = this.getVisiblePages(page, this.props.pages);\r\n\r\n this.setState({\r\n visiblePages: this.filterPages(visiblePages, this.props.pages)\r\n });\r\n\r\n this.props.onPageChange(page - 1);\r\n }\r\n\r\n render() {\r\n const { PageButtonComponent = defaultButton } = this.props;\r\n const { visiblePages } = this.state;\r\n const activePage = this.props.page + 1;\r\n\r\n return (\r\n
\r\n {\r\n if (activePage === 1) return;\r\n this.changePage(activePage - 1);\r\n }}\r\n disabled={activePage === 1}\r\n >\r\n {this.props.previousText}\r\n \r\n {visiblePages.map((page, index, array) => {\r\n return (\r\n \r\n {array[index - 1] + 2 < page ? `...${page}` : page}\r\n \r\n );\r\n })}\r\n {\r\n if (activePage === this.props.pages) return;\r\n this.changePage(activePage + 1);\r\n }}\r\n disabled={activePage === this.props.pages}\r\n >\r\n {this.props.nextText}\r\n \r\n
\r\n );\r\n }\r\n}\r\nexport default Pagination;","import React, { Component } from \"react\";\r\nimport Button from 'react-bootstrap/Button'\r\nimport Spinner from 'react-bootstrap/Spinner'\r\nimport {getPDF} from './utils'\r\n\r\nclass CertGenButton extends Component {\r\n \r\n constructor(props) {\r\n super();\r\n this.handleGenerate = this.handleGenerate.bind(this);\r\n this.handleAddToBatch = this.handleAddToBatch.bind(this);\r\n this.handleRemoveFromBatch = this.handleRemoveFromBatch.bind(this);\r\n //this.state = {status: props.status}\r\n }\r\n \r\n handleAddToBatch(e) {\r\n //console.log(this.props.animalID);\r\n //this.setState({status: e});\r\n this.props.applyStatus(this.props.animalID, \"B\");\r\n }\r\n\r\n handleRemoveFromBatch(e) {\r\n this.props.applyStatus(this.props.animalID, \"\");\r\n }\r\n handleGenerate(e) {\r\n //console.log(this.props.animalID);\r\n //this.setState({status: e});\r\n this.props.applyStatus(this.props.animalID, 1);\r\n }\r\n\r\n handleView(e) {\r\n getPDF(this.props.userSessionGuid,this.props.filePath, this.props.prefix + \"-\" + this.props.guid, this.props.guid, this.props.status);\r\n if (this.props.animalID){\r\n this.props.applyStatus(this.props.animalID, \"R\");\r\n }\r\n else if (this.props.BatchID)\r\n {\r\n this.props.applyStatus(this.props.BatchID, \"R\");\r\n }\r\n\r\n }\r\n\r\nrenderButton()\r\n{\r\n if (this.props.status==\"E\") //ERROR\r\n {\r\n return \r\n }\r\n if (this.props.status==\"P\" || this.props.status==\"N\") //processing\r\n {\r\n return \r\n }\r\n else if (this.props.status==\"F\") //finished - unread/not downloaded\r\n {\r\n return \r\n }\r\n else if (this.props.status==\"R\") //is read/downloaded\r\n {\r\n return \r\n }\r\n else if (this.props.status==\"B\") //is batched\r\n {\r\n return \r\n }\r\n else if(this.props.sexcode == \"19\"){ \r\n return \r\n }\r\n else{\r\n return \r\n }\r\n}\r\n\r\n on\r\n\r\n render() { \r\n return (\r\n <>\r\n {this.renderButton()}\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default CertGenButton;","import React, { Component } from \"react\";\r\nimport ReactDOM from 'react-dom';\r\nimport Modal from 'react-modal';\r\nimport {Button, Container, Row, Col} from \"react-bootstrap\";\r\nimport ReactTable from 'react-table';\r\nimport Pagination from \"./Pagination.js\";\r\nimport { getCookie } from \"../helpers/cookies\";\r\nimport CertGenButton from \"./CertGenButton\";\r\n\r\n\r\nModal.setAppElement('#react-modal');\r\n\r\nclass DownloadedCerts extends Component {\r\n \r\n constructor(props) {\r\n super();\r\n this.applyStatus = this.applyStatus.bind(this);\r\n const columns = ( \r\n [ \r\n {\r\n Header: \"BatchId\", \r\n accessor:\"BatchId\",\r\n show: false\r\n },\r\n { \r\n Header: \"SessionGUID\", \r\n accessor:\"SessionGUID\",\r\n show: false\r\n },\r\n { \r\n Header: \"SocietyID\", \r\n accessor:\"SocietyID\",\r\n show: false\r\n },\r\n { \r\n Header: \"Started\", \r\n accessor:\"Started\",\r\n show: false\r\n }\r\n ,\r\n { \r\n accessor: \"Status\",\r\n width:120,\r\n Cell:(cellProps) => {\r\n return (\r\n <>\r\n \r\n\r\n \r\n )\r\n \r\n }\r\n },\r\n { \r\n Header: \"Date & Time\", \r\n accessor:\"Completed\", \r\n Cell:(cellProps) => {\r\n if (cellProps.original.Completed)\r\n {\r\n var dateFormat = require('dateformat');\r\n return dateFormat(cellProps.original.Completed, \"dd/mm/yyyy HH:MM\");\r\n }\r\n else\r\n {\r\n return '';\r\n }\r\n }\r\n }\r\n ,\r\n { \r\n Header: \"FilePath\", \r\n accessor:\"FilePath\",\r\n show: false\r\n }\r\n ]);\r\n\r\n this.state = {\r\n columns : columns\r\n };\r\n }\r\n\r\n renderBackdrop = (props)=> {\r\n return
;\r\n }\r\n applyStatus (batchID, newStatus)\r\n {\r\n if (newStatus == \"R\") //only required for read status atm\r\n {\r\n const data = this.props.data;\r\n const rowIndex = data.findIndex(x=>x.BatchId == batchID);\r\n this.props.applyStatus(batchID, newStatus);\r\n }\r\n }\r\n\r\n table = () => {\r\n return (\r\n )}\r\n PaginationComponent={Pagination} \r\n pageSize={10} \r\n defaultSorted={[\r\n {\r\n id: \"Completed\",\r\n desc: true\r\n }\r\n ]}\r\n />\r\n \r\n )\r\n }\r\n\r\n on\r\n\r\n render() { \r\n return (\r\n
\r\n \r\n\r\n\r\n \r\n\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n Completed Batches\r\n
\r\n \r\n
\r\n \r\n \r\n {this.table()}\r\n \r\n \r\n
\r\n \r\n
\r\n )\r\n }\r\n}\r\n/*\r\n\r\n\r\n\r\n class DownloadedCerts extends React.Component {\r\n constructor() {\r\n super();\r\n this.closeModal = this.closeModal.bind(this);\r\n }\r\n\r\n \r\n closeModal() {\r\n this.props.hide();\r\n }\r\n \r\n render() {\r\n\r\n }\r\n }\r\n */\r\n export default DownloadedCerts;\r\n","import React, { Component } from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport ReactTable from 'react-table';\r\nimport { getTableData, getDownloadedCertsData, refreshCertificatesWebControlData, generateCertificateBatch } from \"./HerdListData.js\";\r\nimport 'react-table/react-table.css';\r\nimport HerdListFilter from \"./herdListFilter.js\";\r\nimport Pagination from \"./Pagination.js\";\r\nimport {DropdownButton,Dropdown,Button, Container, Row, Col} from \"react-bootstrap\";\r\nimport { isDate, isObject, isUndefined } from \"util\";\r\nimport { logout } from \"./utils.js\";\r\nimport { getCookie } from \"../helpers/cookies\";\r\nimport CertGenButton from \"./CertGenButton\";\r\nimport HelpTip, {getHelpTipCounter, incrementHelpTipCounter} from './HelpTip.js';\r\nimport {getPDF} from './utils';\r\nimport DownloadedCerts from \"./DownloadedCerts\";\r\nimport {redirectToLogin} from \"./login\";\r\n\r\nconst linkStyle = {fontWeight:700};\r\n\r\nconst pageSizeOptions = [10, 20, 50, 100];\r\nconst refreshInterval = 30000;\r\n\r\nfunction defaultFilter() {\r\n return [{id: \"Dead\", value: \"N\"}];\r\n} \r\n\r\nfunction makeDefaultState (defaultColumns, helpTipCounter) {\r\n return {\r\n DownloadedCertsModalIsOpen: false,\r\n downloadedCerts: [],\r\n seconds: 0 ,\r\n data :[],\r\n batchesProcessing: [],\r\n batchAnimalIDs: [],\r\n error: null,\r\n helpTipCounter: helpTipCounter,\r\n numberOfRecords: 0,\r\n columns : defaultColumns,\r\n filtered:defaultFilter(),\r\n selectedItemsPerPage: \"10\",\r\n columnFilter : false,\r\n page: 0,\r\n filterState: {\r\n searchText:'',\r\n sex:'',\r\n dead: 'N',\r\n ageGroup : {\r\n min:0,\r\n max:4,\r\n rangemax: 4,\r\n rangemin:0,\r\n sliderStep:1\r\n },\r\n dob : {\r\n min:0,\r\n max:0,\r\n //rangemax: 0,\r\n //rangemin:0,\r\n sliderStep:1\r\n }\r\n }\r\n };\r\n}\r\nconst HELPTIPCOUNTER = 'herdlist_HelpTipCounter';\r\n\r\nclass HerdList extends Component {\r\n \r\n constructor(props) {\r\n super(props); \r\n\r\n this.applyFilter = this.applyFilter.bind(this);\r\n this.changeItemsPerPage = this.changeItemsPerPage.bind(this); \r\n this.applyStatus = this.applyStatus.bind(this);\r\n this.applyStatusByBatch = this.applyStatusByBatch.bind(this);\r\n this.hideDownloadedCertsModal = this.hideDownloadedCertsModal.bind(this);\r\n this.showDownloadedCertsModal = this.showDownloadedCertsModal.bind(this);\r\n var helpTipCounter = getHelpTipCounter(HELPTIPCOUNTER);\r\n this.update = this.update.bind(this);\r\n this.resetTable = this.resetTable.bind(this);\r\n this.updateBatchStatus = this.updateBatchStatus.bind(this);\r\n this.submitBatch = this.submitBatch.bind(this);\r\n this.resetBatch = this.resetBatch.bind(this);\r\n this.downloadAll = this.downloadAll.bind(this);\r\n this.updateDataTableRow = this.updateDataTableRow.bind(this);\r\n this.updateDataDownloadedTableRow = this.updateDataDownloadedTableRow.bind(this);\r\n const defaultColumns = [\r\n { \r\n Header: \"BatchID\",\r\n accessor: \"BatchID\",\r\n show:false\r\n },\r\n { \r\n Header: \"Animal_ID\",\r\n accessor: \"Animal_ID\",\r\n show:false\r\n },\r\n { \r\n Header: \"SessionGUID\",\r\n accessor: \"SessionGUID\",\r\n show:false\r\n },\r\n { \r\n accessor: \"Status\",\r\n width:120,\r\n Cell:(cellProps) => {\r\n\r\n return (\r\n <>\r\n \r\n \r\n )\r\n \r\n }\r\n },\r\n { \r\n Header: \"Name\",\r\n accessor: \"AnimalName\",\r\n className: \"rt-td-left\",\r\n minWidth:250,\r\n filterMethod: (filter, row) => {\r\n return String(row.AnimalName).toLowerCase().includes(String(filter.value).toLowerCase()) || \r\n String(row.Line_No).includes(String(filter.value)) || \r\n String(row.HBN).toLowerCase().includes(String(filter.value).toLowerCase()) ||\r\n String(row.ear_Tag).toLowerCase().includes(String(filter.value).toLowerCase()) ||\r\n String(row.StrippedEarTag).toLowerCase().includes(String(filter.value).toLowerCase());\r\n },\r\n Cell:(cellProps) => {\r\n var link;\r\n link = \"http://holstein-uk.org/animaldata/animal/ancestry/\" + cellProps.original.Animal_ID\r\n\r\n if(cellProps.original.Sex_Code == \"19\"){\r\n return <>\r\n \r\n {cellProps.original.AnimalName}\r\n
Please note this animal is ex herdbook
\r\n\r\n
\r\n \r\n }else{\r\n return <>\r\n \r\n {cellProps.original.AnimalName} \r\n \r\n \r\n } \r\n }\r\n },\r\n { \r\n Header: \"Ear Tag\",\r\n accessor: \"ear_Tag\",\r\n width:140\r\n },\r\n { \r\n Header: \"StrippedEarTag\", \r\n accessor: \"StrippedEarTag\",\r\n show: false\r\n },\r\n { \r\n Header: \"Line No\",\r\n accessor: \"Line_No\",\r\n width:105\r\n },\r\n { \r\n Header: \"HBN\",\r\n accessor: \"HBN\",\r\n width:140\r\n },\r\n { \r\n Header: \"DOB\",\r\n accessor: \"DateOfBirth\",\r\n sliderStep: 1,\r\n width:100,\r\n Cell:(cellProps) => {\r\n if (cellProps.original.DateOfBirth)\r\n {\r\n var dateFormat = require('dateformat');\r\n return dateFormat(cellProps.original.DateOfBirth, \"dd/mm/yyyy\");\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n filterMethod: (filter, row) => {\r\n \r\n if ((filter.fromValue === \"\" || filter.fromValue===null) && (filter.toValue === \"\" || filter.toValue===null))\r\n {\r\n return true;\r\n }\r\n else if (filter.fromValue === \"\" || filter.fromValue== null)\r\n {\r\n if (!row[filter.id] == \"\")\r\n {\r\n return (new Date(row[filter.id]) <=new Date(filter.toValue) );\r\n }\r\n }\r\n else if (filter.toValue === \"\" || filter.toValue== null)\r\n {\r\n if (!row[filter.id] == \"\")\r\n {\r\n return (new Date(row[filter.id]) >=new Date(filter.fromValue) );\r\n }\r\n }\r\n else\r\n {\r\n return (new Date(row[filter.id]) >= new Date(filter.fromValue) && new Date(row[filter.id]) <= new Date(filter.toValue));\r\n }\r\n },\r\n },\r\n { \r\n Header: \"Sex\",\r\n accessor: \"Sex\",\r\n width:80\r\n },\r\n { \r\n Header: \"Dead\",\r\n accessor: \"Dead\",\r\n width:80\r\n },\r\n {\r\n Header: \"Age Group\",\r\n accessor: \"AgeGroup\",\r\n show:false,\r\n filterMethod: (filter, row) => {\r\n return (row[filter.id]>=filter.fromValue && row[filter.id]<=filter.toValue) \r\n }\r\n },\r\n {\r\n Header: \"Generated\",\r\n accessor: \"Completed\",\r\n width:130,\r\n Cell:(cellProps) => {\r\n if (cellProps.original.Completed)\r\n {\r\n var dateFormat = require('dateformat');\r\n return dateFormat(cellProps.original.Completed, \"dd/mm/yyyy\");\r\n }\r\n else\r\n {\r\n return '';\r\n }\r\n }\r\n }\r\n ]\r\n this.state = makeDefaultState(defaultColumns, helpTipCounter);\r\n }\r\n\r\n refresh() {\r\n //console.log(\"tick\");\r\n this.setState(prevState => ({\r\n seconds: prevState.seconds + 1\r\n }));\r\n if (this.state.batchesProcessing.length > 0)\r\n //if any rows are of processing state then refresh the row to see if processing \r\n //has finished\r\n {//just refresh one batch at a time and select one at random until all batches are processed\r\n const distinctBatches = [...new Set(this.state.batchesProcessing)]; \r\n const randomItemIndex = Math.floor(Math.random() * distinctBatches.length);\r\n this.refreshRow(distinctBatches[randomItemIndex]);\r\n }\r\n }\r\n refreshRow(batchId)\r\n {\r\n refreshCertificatesWebControlData(batchId).then(response => {\r\n if (response !=null)\r\n {\r\n if (response.Status !== 'P' && response.Status !== 'N')\r\n {\r\n let batchAnimalIDs = this.state.data.filter(x=>x.BatchID == batchId).map(a=>a.Animal_ID);\r\n this.updateBatchStatus(batchAnimalIDs, response.Status, batchId, response.SessionGUID, response.FilePath, response.Completed);\r\n\r\n\r\n if (response.Status == 'R' || response.Status == 'F') //if batch has processed remove from batchesProcessing list\r\n {\r\n let batchesProcessing = this.state.batchesProcessing.filter(x=>x!= batchId);\r\n this.setState({batchesProcessing: batchesProcessing});\r\n if (response.Status == 'F')\r\n {\r\n let downloadedCerts = this.state.downloadedCerts;\r\n downloadedCerts.push(response);\r\n this.setState({downloadedCerts: downloadedCerts});\r\n }\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n update() { \r\n var helpTipCounter = this.state.helpTipCounter;\r\n helpTipCounter = incrementHelpTipCounter(HELPTIPCOUNTER, helpTipCounter); \r\n this.setState({helpTipCounter});\r\n }\r\n resetTable()\r\n {\r\n this.setState({filtered : [] });\r\n const filterState = this.state.filterState;\r\n filterState.sex = \"\";\r\n filterState.searchText = \"\";\r\n this.setState({filterState : filterState});\r\n this.setState({page : 0});\r\n }\r\n \r\n updateBatchStatus(batchAnimalIDs,newStatus, batchID,sessionGUID, filePath, completed )\r\n {\r\n //console.log('updateBatchStatus ' + filePath);\r\n batchAnimalIDs.forEach((element) => {\r\n this.updateRowStatus(element, newStatus, batchID,sessionGUID, filePath, completed);\r\n }\r\n )\r\n }\r\n\r\n \r\n updateRowStatus(animalID, newStatus, batchID,sessionGUID, filePath, completed)\r\n {\r\n //console.log('updateRowStatus ' + filePath);\r\n const data = this.state.data;\r\n const rowIndex = data.findIndex(x=>x.Animal_ID == animalID);\r\n this.updateDataTableRow(rowIndex, newStatus, filePath, sessionGUID, batchID, completed);\r\n }\r\n\r\n applyStatusByBatch(batchID, newStatus)\r\n {\r\n if (newStatus == \"R\") //only required for read status atm\r\n {\r\n if (batchID)\r\n {\r\n const data = this.state.data;\r\n const batchRows = data.filter(x=>x.BatchID == batchID);\r\n\r\n batchRows.forEach((element) => {\r\n this.updateDataTableRowByAnimalID(element.Animal_ID, newStatus);\r\n }); \r\n\r\n }\r\n }\r\n }\r\n\r\n applyStatus(animalID, newStatus) {\r\n\r\n const data = this.state.data;\r\n const rowIndex = data.findIndex(x=>x.Animal_ID == animalID);\r\n\r\n if (newStatus==\"B\") //add to batch and update status\r\n {\r\n if (this.state.batchAnimalIDs.length < 10) //allow 10 per batch only\r\n {\r\n this.state.batchAnimalIDs.push(animalID);\r\n this.updateDataTableRow(rowIndex, newStatus);\r\n }\r\n else\r\n {\r\n alert('Only 10 animals are allowed per batch.');\r\n }\r\n }\r\n else if (newStatus == \"R\")\r\n {\r\n const batchID = data[rowIndex].BatchID;\r\n if (batchID)\r\n {\r\n const batchRows = data.filter((x=>x.BatchID == batchID));\r\n\r\n batchRows.forEach((element) => {\r\n this.updateDataTableRowByAnimalID(element.Animal_ID, newStatus);\r\n }); \r\n \r\n let downloadedCerts = this.state.downloadedCerts;\r\n const rowIndex = downloadedCerts.findIndex(x=>x.BatchId == batchID);\r\n this.updateDataDownloadedTableRow(rowIndex, newStatus);\r\n \r\n }\r\n }\r\n else if (newStatus==\"\") //remove from batch and update status\r\n {\r\n let batchAnimalIDs = this.state.batchAnimalIDs;\r\n\r\n batchAnimalIDs = batchAnimalIDs.filter(function(value){\r\n return value != animalID;\r\n });\r\n this.setState({batchAnimalIDs: batchAnimalIDs});\r\n this.updateDataTableRow(rowIndex, newStatus);\r\n }\r\n \r\n }\r\n downloadAll()\r\n {\r\n let sessionGUIDList = this.state.data.filter(x=>x.Status == \"R\" || x.Status == \"F\").map(b=>b.SessionGUID);\r\n sessionGUIDList = [...new Set(sessionGUIDList)]\r\n sessionGUIDList.forEach((sessionGUID) => {\r\n let rows = this.state.data.filter(x=>x.SessionGUID == sessionGUID);\r\n if (rows.length > 0)\r\n {\r\n let element = rows[0];\r\n getPDF(getCookie('SesssionTokenID'),element.FilePath, getCookie('Prefix') + \"-\" + element.SessionGUID, element.SessionGUID, element.Status);\r\n }\r\n }\r\n )\r\n }\r\n resetBatch()\r\n {\r\n this.updateBatchStatus(this.state.batchAnimalIDs, \"\");\r\n this.setState({batchAnimalIDs: []});\r\n }\r\n submitBatch()\r\n {\r\n let batchAnimalIDs = this.state.batchAnimalIDs;\r\n this.setState({batchAnimalIDs: []});\r\n //run in batches of 10\r\n generateCertificateBatch(batchAnimalIDs).then(\r\n (result) => { \r\n let batchesProcessing = this.state.batchesProcessing;\r\n batchesProcessing.push(result.data);\r\n this.setState({batchesProcessing : batchesProcessing});\r\n this.updateBatchStatus(batchAnimalIDs,\"P\", result.data);\r\n //downloadedCerts.push(result.data);\r\n\r\n //add to batch list\r\n },\r\n (error) => {\r\n this.updateBatchStatus(batchAnimalIDs, \"E\");\r\n },\r\n )\r\n }\r\n\r\n getRowCount()\r\n {\r\n if(this.selectTable!=undefined){\r\n return this.selectTable.getResolvedState().sortedData.length;\r\n }\r\n return this.state.data.length;\r\n }\r\n updateDataTableRowByAnimalID(animalID, status, filePath, sessionGUID, batchID, completed)\r\n {\r\n const rowIndex = this.state.data.findIndex(x=>x.Animal_ID == animalID);\r\n if (rowIndex > -1)\r\n {\r\n //console.log('update ' + rowIndex);\r\n //console.log('updateDataTableRowByAnimalID ' + filePath);\r\n this.updateDataTableRow(rowIndex, status, filePath , sessionGUID, batchID, completed);\r\n }\r\n }\r\n updateDataDownloadedTableRow(index, status)\r\n {\r\n //console.log('updateDataTableRow ' + filePath);\r\n this.setState(oldState => {\r\n let downloadedCerts = oldState.downloadedCerts.slice();\r\n let copy = Object.assign({}, downloadedCerts[index]);\r\n copy.Status = status;// generateCertificate(1, col.Animal_ID);;;\r\n downloadedCerts[index] = copy;\r\n return {\r\n downloadedCerts: downloadedCerts\r\n };\r\n });\r\n \r\n }\r\n\r\n\r\n updateDataTableRow(index, status, filePath, sessionGUID, batchID, completed)\r\n {\r\n //console.log('updateDataTableRow ' + filePath);\r\n this.setState(oldState => {\r\n let data = oldState.data.slice();\r\n let copy = Object.assign({}, data[index]);\r\n copy.Status = status;// generateCertificate(1, col.Animal_ID);;;\r\n copy.BatchID = batchID;\r\n if (filePath && sessionGUID)\r\n {\r\n copy.FilePath = filePath;\r\n copy.SessionGUID = sessionGUID;\r\n }\r\n if (completed)\r\n {\r\n copy.Completed = completed;\r\n }\r\n \r\n copy.selected = true;\r\n data[index] = copy;\r\n\r\n return {\r\n data: data\r\n };\r\n });\r\n \r\n }\r\n renderDownloadAllButton()\r\n {\r\n return \r\n }\r\n renderSubmitBatchButton()\r\n {\r\n if (this.state.batchAnimalIDs.length > 0)\r\n {\r\n return \r\n }\r\n return \r\n }\r\n renderResetBatch()\r\n {\r\n if (this.state.batchAnimalIDs.length > 0)\r\n {\r\n return \r\n }\r\n return \r\n }\r\n\r\n renderViewBatches()\r\n {\r\n if (this.state.downloadedCerts.length > 0)\r\n {\r\n return (\r\n
\r\n \r\n \r\n
\r\n )\r\n }\r\n else\r\n {\r\n return (\r\n
\r\n \r\n
\r\n )\r\n }\r\n \r\n }\r\n\r\n\r\n render() {\r\n\r\n const error = this.state.error;\r\n const downloadedCertsDataisLoaded = this.state.downloadedCertsDataisLoaded;\r\n const tableDataisLoaded = this.state.tableDataisLoaded;\r\n\r\n if (error) {\r\n //console.log(error);\r\n //return
Your session may have expired. Please login again.
;\r\n return
Your session may have expired. Please login again.
;\r\n } else if (!tableDataisLoaded || !downloadedCertsDataisLoaded) {\r\n return
Loading...
;\r\n } else {\r\n return (\r\n <>\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n {this.renderSubmitBatchButton()}\r\n
\r\n
\r\n
\r\n
\r\n {this.renderResetBatch()}\r\n
\r\n\r\n
\r\n \r\n
\r\n Animals Selected ({this.state.batchAnimalIDs.length})\r\n
\r\n \r\n \r\n\r\n\r\n
\r\n\r\n \r\n \r\n \r\n {pageSizeOptions.map((item) => (\r\n {item}\r\n \r\n ))}\r\n \r\n
\r\n \r\n
\r\n
\r\n {this.renderViewBatches()}\r\n
\r\n\r\n
\r\n\r\n\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \"\r\n PaginationComponent={Pagination}\r\n defaultPageSize={10}\r\n page={this.state.page}\r\n pageSize={this.state.pageSize}\r\n pageSizeOptions={this.state.pageSizeOptions}\r\n onPageChange={page => this.setState({ page })}\r\n onPageSizeChange={(pageSize, page) =>this.setState({ page, pageSize })}\r\n data={this.state.data}\r\n columns={this.state.columns}\r\n filtered={this.state.filtered}\r\n onFilteredChange={this.applyFilter.bind(this)}\r\n ref={(r) => { this.selectTable = r;}}\r\n onSortedChange={(newSorted, column, shiftKey) => {column.selected = true}}\r\n // Called when a sortable column header is clicked with the column itself and if the shiftkey was held. If the column is a pivoted column, `column` will be an array of columns\r\n defaultSorted={[\r\n {\r\n id: \"AnimalName\",\r\n desc: false\r\n }\r\n ]}\r\n \r\n />\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n \r\n}\r\n\r\n hideDownloadedCertsModal(){\r\n this.setState({DownloadedCertsModalIsOpen: false})\r\n }\r\n\r\n showDownloadedCertsModal()\r\n {\r\n this.setState({DownloadedCertsModalIsOpen: true})\r\n }\r\n\r\n\r\n applyFilter(newFilter, filterState){\r\n \r\n const filtered = this.state.filtered.slice();\r\n for( var i = 0; i < filtered.length; i++){ \r\n if (filtered[i].id === newFilter[0].id) {\r\n filtered.splice(i, 1); \r\n }\r\n }\r\n //console.log(filtered.id);\r\n filtered.push(newFilter[0]);\r\n this.setState({ filtered : filtered });\r\n //var lastFilterApplied = newFilter[0];\r\n this.setState({ filterState : filterState });\r\n }\r\n\r\n getDownloadedCertificatesData()\r\n {\r\n getDownloadedCertsData().then(\r\n (result) => {\r\n this.setState({downloadedCerts: result});\r\n },\r\n (error) => {\r\n console.log('error');\r\n this.setState({\r\n downloadedCertsDataisLoaded: true,\r\n error:error\r\n });\r\n }\r\n ).then(\r\n (result) => {\r\n this.setState(\r\n {\r\n downloadedCertsDataisLoaded: true\r\n });\r\n }\r\n )\r\n }\r\n\r\n getData(){\r\n\r\n getTableData()\r\n .then(\r\n (result) => {\r\n\r\n this.setState({data: result});\r\n let batchesProcessing = result.filter(x=>x.Status == 'P' || x.Status == 'N').map(b=>b.BatchID);\r\n \r\n //console.log(this.state.data.count);\r\n //console.log(this.state.data.filter(x=>x.status == 'P' || x.status == 'N').length);\r\n this.setState({batchesProcessing : batchesProcessing});\r\n },\r\n (error) => {\r\n this.setState({\r\n tableDataisLoaded: true,\r\n error\r\n });\r\n }\r\n ).then(\r\n (result) => {\r\n this.setState(\r\n {\r\n tableDataisLoaded: true\r\n });\r\n }\r\n )\r\n }\r\n\r\n GetAgeGroupMinMax(data)\r\n {\r\n var cols =data.map(\r\n function(x) {\r\n if (!isNaN(x.AgeGroup))\r\n return x.AgeGroup\r\n });\r\n\r\n var max = Math.max(...cols);\r\n var min = Math.min(...cols);\r\n \r\n const filterState = this.state.filterState;\r\n\r\n filterState.ageGroup.min = min;\r\n filterState.ageGroup.max = max;\r\n\r\n this.setState({filterState : filterState});\r\n }\r\n getSex(data)\r\n {\r\n var sex =data.map(\r\n function(x) {\r\n return x.Sex;\r\n });\r\n const distinctSexes = [...new Set(sex)]\r\n\r\n const filterState = this.state.filterState;\r\n\r\n if (distinctSexes.length==2)\r\n {\r\n filterState.sex = \"\";\r\n }\r\n else\r\n {\r\n filterState.sex = distinctSexes[0]; \r\n }\r\n this.setState({filterState : filterState});\r\n\r\n }\r\n GetDOBMinMax(data)\r\n {\r\n if (this.state.tableDataisLoaded && this.state.downloadedCertsDataisLoaded)\r\n {\r\n var dates =data.map(\r\n function(x) {\r\n return new Date(x.DateOfBirth).getTime();\r\n });\r\n\r\n var cols = dates.filter(x => x > 0);\r\n \r\n\r\n const filter = this.state.filtered.filter(x=>x.id==\"DateOfBirth\")[0];\r\n \r\n var max = Math.max(...cols);\r\n var min = Math.min(...cols);\r\n\r\n const filterStateDob = this.state.filterState;\r\n \r\n if (min==Infinity || min==-Infinity)\r\n {\r\n if (!isUndefined(filter))\r\n {\r\n min = filter.fromValue;\r\n }\r\n }\r\n\r\n if (max==Infinity || max==-Infinity)\r\n {\r\n if (!isUndefined(filter))\r\n {\r\n max = filter.toValue;\r\n }\r\n }\r\n\r\n filterStateDob.dob.min = min;\r\n filterStateDob.dob.max = max;\r\n \r\n if (!filterStateDob.dob.rangemax)\r\n {\r\n filterStateDob.dob.rangemax = max;\r\n }\r\n if (!filterStateDob.dob.rangemin)\r\n {\r\n filterStateDob.dob.rangemin = min;\r\n }\r\n this.setState({filterState : filterStateDob});\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState){\r\n redirectToLogin(this.state.error);\r\n if(this.selectTable!=undefined)\r\n {\r\n //this.selectTable.data = this.state.data;\r\n if(this.state.columnFilter == prevState.columnFilter) \r\n { \r\n this.GetDOBMinMax(this.selectTable.getResolvedState().sortedData);\r\n this.GetAgeGroupMinMax(this.selectTable.getResolvedState().sortedData);\r\n this.setState({columnFilter : !this.state.columnFilter});\r\n }\r\n }\r\n if (this.state.batchesProcessing.length > 0)\r\n {\r\n if (this.state.seconds == 0)\r\n {\r\n this.setState({seconds:1});\r\n this.interval = setInterval(() => this.refresh(), refreshInterval);\r\n //console.log('new interval set as:' + this.interval);\r\n }\r\n }\r\n else\r\n {\r\n if (this.state.seconds > 0)\r\n {\r\n clearInterval(this.interval);\r\n this.setState({seconds:0});\r\n //console.log(\"Interval cleared\");\r\n }\r\n }\r\n }\r\n\r\n componentDidMount(){\r\n this.getData();\r\n this.getDownloadedCertificatesData();\r\n }\r\n\r\n\r\n componentWillUnmount() {\r\n clearInterval(this.interval);\r\n }\r\n\r\n changeItemsPerPage(item) \r\n { \r\n this.setState({ page: 0});\r\n this.setState({ selectedItemsPerPage: item});\r\n this.setState({ pageSize: parseInt(item)});\r\n \r\n }\r\n\r\n}\r\n\r\n\r\nexport default HerdList;\r\n\r\n\r\nconst wrapper = document.getElementById(\"react-herdList\");\r\n\r\nif (wrapper) {\r\n ReactDOM.render(,wrapper);\r\n}","import axios from \"axios\";\r\nimport { getCookie } from \"../helpers/cookies\";\r\nimport { logout } from \"./utils.js\";\r\n\r\nexport function getTableData()\r\n{\r\n var name ='';\r\n var sex = '';\r\n var dtFrom = '' ;\r\n var dtTo = '';\r\n var excludedead = false;\r\n const data = axios({\r\n url: '/umbraco/api/herdlist/getHerd?userSessionGuid=' + getCookie(\"SesssionTokenID\") + '&Name=' + name+ '&Sex=' + sex + '&dtFrom=' + dtFrom + '&dtTo=' + dtTo + '&own=false' + '&excludedead=' + excludedead,\r\n method: 'GET',\r\n responseType: 'json'\r\n })\r\n .then(function (response) { \r\n return response.data\r\n })\r\n return data;\r\n\r\n}\r\n\r\nexport function getDownloadedCertsData()\r\n{\r\n var name ='';\r\n var sex = '';\r\n var dtFrom = '' ;\r\n var dtTo = '';\r\n var excludedead = false;\r\n const data = axios({\r\n url: '/umbraco/api/Cert/GetDownloadedCerts?userSessionGuid=' + getCookie(\"SesssionTokenID\"),\r\n method: 'GET',\r\n responseType: 'json'\r\n })\r\n .then(function (response) { \r\n return response.data\r\n }\r\n ,\r\n (error) => {\r\n console.log(error);\r\n }\r\n )\r\n\r\n \r\n return data;\r\n}\r\n\r\nexport function refreshCertificatesWebControlData(batchID)\r\n{\r\n const data = axios({\r\n url: '/umbraco/api/cert/GetLatestCertificatesWebControlData?userSessionGuid=' + getCookie(\"SesssionTokenID\") + '&batchID=' + batchID,\r\n method: 'GET',\r\n responseType: 'json'\r\n })\r\n .then(response => {\r\n return response.data\r\n })\r\n return data;\r\n}\r\n\r\nexport function generateCertificateBatch(batchAnimalIDs)\r\n{\r\n var animalIDQS = JSON.stringify(batchAnimalIDs);\r\n var path = '/umbraco/api/Cert/PostCertificateBatch?userSessionGuid=' + getCookie(\"SesssionTokenID\") + '&societyID=' + getCookie(\"Breed\") + '&animalID=' +animalIDQS;\r\n //console.log(path);\r\n var headers = {'Content-Type': 'application/json'};\r\n\r\n const data = axios.post(path,'',headers).then(function (response) { \r\n return response\r\n },\r\n (error) => {\r\n if (error.response.status === 401)\r\n {\r\n logout();\r\n }\r\n else{\r\n return error\r\n }\r\n }\r\n )\r\n \r\n \r\n return data;\r\n}\r\nfunction generateCertificate(societyID, animalID)\r\n{\r\n //console.log(\"animalID\" + animalID);\r\n var path = '/umbraco/api/Cert/PostCertificate?userSessionGuid=' + getCookie(\"SesssionTokenID\") + '&societyID=' + getCookie(\"Breed\") + '&animalID=' + animalID;\r\n var headers = {'Content-Type': 'application/json'};\r\n\r\n const data = axios.post(path,'',headers).then(function (response) { \r\n return response\r\n },\r\n (error) => {\r\n if (error.response.status === 401)\r\n {\r\n logout();\r\n }\r\n else{\r\n return error\r\n }\r\n }\r\n )\r\n \r\n \r\n return data;\r\n}","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport GoogleMap from './components/googleMap';\r\nimport ContactUs from './components/contactUs';\r\nimport Login from './components/login';\r\nimport HerdList from './components/herdList';\r\nimport './css/App.css';\r\n//ReactDOM.render(, document.getElementById('root'));\r\nimport * as serviceWorker from './serviceWorker';\r\n\r\nconst wrapper = document.getElementById(\"react-googleMap\");\r\nconst className = wrapper ? wrapper.getAttribute('data-className') : null;\r\nif (wrapper) {\r\n ReactDOM.render(,wrapper);\r\n}\r\n\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""}