{"version":3,"sources":["components/Idea.jsx","services/httpService.js","services/ideaService.js","services/userService.js","components/IdeaVotes.jsx","components/IdeaForm.jsx","components/IdeasList.jsx","services/authService.js","components/RegisterUserForm.jsx","components/LoginForm.jsx","components/LoginRegister.jsx","components/ForgotPassword.jsx","components/DeleteButton.jsx","components/Admin.jsx","components/AdminUsers.jsx","components/ResetPassword.jsx","common/protectedRoute.jsx","components/AdminMenu.jsx","App.js","serviceWorker.js","index.js"],"names":["Idea","props","state","toggle","bind","popoverOpen","this","setState","description","length","href","className","onClick","idea","userAlreadyVoted","icon","status","onVote","Fragment","data-order","totalVotes","module","replace","role","style","width","aria-valuenow","aria-valuemin","aria-valuemax","renderVoteButton","title","whiteSpace","substring","renderViewMore","Collapse","isOpen","Component","axios","interceptors","response","use","error","console","log","Swal","fire","html","data","errorMessage","type","confirmButtonText","Promise","reject","get","post","put","delete","setJwt","token","defaults","headers","common","a","httpService","config","apiEndpoint","result","id","ideaId","getIdeas","createIdea","voteIdea","deleteIdea","updateIdea","getIdea","getIdeaVotes","user","isOk","getUser","IdeaVotes","votes","loadData","ideaService","map","vote","key","fullName","voted","company","Date","toLocaleDateString","toLocaleTimeString","IdeaForm","active","errors","users","schema","Joi","string","required","label","number","manualAdjustment","boolean","created","date","validate","abortEarly","details","item","path","message","handleSubmit","e","preventDefault","submitButton","setAttribute","removeAttribute","parseInt","mode","onSubmit","text","submitResult","handleChange","input","currentTarget","name","checked","value","userService","authorId","author","modal","prevState","linkTitle","Button","color","closeBtn","renderIdeaLink","Modal","ModalHeader","close","ModalBody","htmlFor","onChange","aria-describedby","placeholder","rows","ModalFooter","ref","btn","IdeasList","ideas","receivedIdeas","handleVote","index","indexOf","setTimeout","sortIdeas","refresh","newIdea","readIdeas","mixer1","mixitup","sort","destroy","filterIdeasByStatus","filter","x","filteredStatus","email","password","http","username","localStorage","setItem","JSON","stringify","getToken","getCurrentUser","parse","getItem","fullname","hash","forgetPasswordToken","newPassword","userId","login","loginWithJwt","logout","removeItem","register","forgotPassword","resetPassword","IsAdmin","deleteUser","RegisterUserForm","account","recaptchaRef","React","createRef","current","getValue","auth","onLogin","history","registerResult","autoComplete","sitekey","LoginForm","loginResult","to","LoginRegister","ForgotPassword","forhtml","DeleteButton","onDelete","Admin","$","DataTable","ajax","reload","url","datatype","beforeSend","request","setRequestHeader","authService","dataSrc","r","order","columns","createdCell","td","cellData","rowData","row","col","ReactDOM","render","reloadDataTable","meta","fn","dataTable","display","moment","format","language","emptyTable","loadDataTable","showCancelButton","cancelButtonText","then","AdminUsers","ResetPassword","qs","queryString","location","search","parseHash","ProtectedRoute","component","rest","pathname","from","AdminMenu","library","add","faLightbulb","faCheck","faThumbsUp","faTrash","faTrashAlt","App","readUser","aria-label","renderUserName","exact","renderHomePage","Boolean","window","hostname","match","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"ieAiHeA,E,kDA5Gb,WAAYC,GAAQ,IAAD,8BACjB,cAAMA,IAFRC,MAAQ,GAIN,EAAKC,OAAS,EAAKA,OAAOC,KAAZ,gBACd,EAAKF,MAAQ,CACXG,aAAa,GALE,E,qDAUjBC,KAAKC,SAAS,CACZF,aAAcC,KAAKJ,MAAMG,gB,qCAGdG,GACb,GAAIA,EAAYC,OAAS,IACvB,OACE,uBACEC,KAAK,KACLC,UAAWL,KAAKJ,MAAMG,YAAc,YAAc,UAClDO,QAASN,KAAKH,QAHhB,a,uCAUWU,GAAO,IAAD,OACrB,OAAKA,EAAKC,iBAiBN,0BAAMH,UAAU,qBACd,kBAAC,IAAD,CAAiBI,KAAK,UADxB,UAhBkB,wBAAhBF,EAAKG,OAEL,6BACE,4BACEL,UAAU,sCACVC,QAAS,WACP,EAAKX,MAAMgB,OAAOJ,KAGpB,kBAAC,IAAD,CAAiBE,KAAK,cANxB,eAHN,I,kCAsBQF,M,+BACF,IACAA,EAASP,KAAKL,MAAdY,KACR,OACE,kBAAC,IAAMK,SAAP,KACE,yBAAKP,UAAU,qBAAqBQ,aAAYN,EAAK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Q,SAAA9O,GAAK,OAAI,kBAAC,GAAUA,MAE9B,kBAAC,GAAD,CACE6G,KAAK,cACLiI,OAAQ,SAAA9O,GAAK,OAAI,kBAAC,GAAeA,MAEnC,kBAAC,KAAD,CACE6G,KAAK,SACLiI,OAAQ,SAAA9O,GAAK,OACX,kBAAC,GAAD,iBACMA,EADN,CAEE2M,QAAS,WACP,EAAKsE,kBAKb,kBAAC,KAAD,CACEpK,KAAK,mBACLiI,OAAQ,SAAA9O,GAAK,OAAI,kBAAC,GAAmBA,MAEvC,kBAAC,KAAD,CACE6G,KAAK,kBACLiI,OAAQ,SAAA9O,GAAK,OACX,kBAAC,GAAD,iBACMA,EADN,CAEE2M,QAAS,WACP,EAAKsE,kBAKb,kBAAC,GAAD,CACEG,OAAK,EACLvK,KAAK,IACLiI,OAAQ,SAAA9O,GAAK,OAAI,EAAKqR,eAAerR,iB,GA1GzCmC,aCVEmP,QACW,cAA7BC,OAAOvB,SAASwB,UAEe,UAA7BD,OAAOvB,SAASwB,UAEhBD,OAAOvB,SAASwB,SAASC,MACvB,2D,qBCNN5C,IAASC,OACP,kBAAC,KAAD,KACE,kBAAC,GAAD,OAEF4C,SAASC,eAAe,SDiHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMnC,MAAK,SAAAoC,GACjCA,EAAaC,kB","file":"static/js/main.754b0b0d.chunk.js","sourcesContent":["import React, { Component } from \"react\";\r\nimport { Collapse } from \"reactstrap\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nclass Idea extends Component {\r\n state = {};\r\n constructor(props) {\r\n super(props);\r\n\r\n this.toggle = this.toggle.bind(this);\r\n this.state = {\r\n popoverOpen: false,\r\n };\r\n }\r\n\r\n toggle() {\r\n this.setState({\r\n popoverOpen: !this.state.popoverOpen,\r\n });\r\n }\r\n renderViewMore(description) {\r\n if (description.length > 500) {\r\n return (\r\n \r\n ...more\r\n \r\n );\r\n }\r\n }\r\n renderVoteButton(idea) {\r\n if (!idea.userAlreadyVoted) {\r\n if (idea.status === \"Under Consideration\") {\r\n return (\r\n
\r\n {\r\n this.props.onVote(idea);\r\n }}\r\n >\r\n Vote\r\n \r\n
\r\n );\r\n }\r\n } else {\r\n return (\r\n \r\n Voted\r\n \r\n );\r\n }\r\n }\r\n showDetails(idea) {}\r\n render() {\r\n const { idea } = this.props;\r\n return (\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {idea.totalVotes}\r\n\r\n

votes

\r\n
\r\n\r\n {this.renderVoteButton(idea)}\r\n
\r\n
\r\n
{idea.title}
\r\n \r\n {idea.module}\r\n
\r\n
\r\n {idea.description.substring(0, 500)}\r\n {this.renderViewMore(idea.description)}\r\n \r\n {idea.description.substring(500, 10000)}{\" \"}\r\n \r\n ...less\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 Idea;\r\n","import axios from \"axios\";\r\nimport Swal from \"sweetalert2\";\r\n\r\naxios.interceptors.response.use(null, error => {\r\n console.log(error.response);\r\n console.log(error);\r\n Swal.fire({\r\n title: \"Unexpected error occured\",\r\n html: error.response.data.errorMessage + \"
Please, try again later\",\r\n type: \"warning\",\r\n confirmButtonText: \"OK\"\r\n });\r\n return Promise.reject(error);\r\n});\r\nfunction setJwt(token) {\r\n axios.defaults.headers.common[\"Authorization\"] = \"Bearer \" + token;\r\n}\r\n\r\nexport default {\r\n get: axios.get,\r\n post: axios.post,\r\n put: axios.put,\r\n delete: axios.delete,\r\n setJwt\r\n};\r\n","import httpService from './httpService';\r\nimport config from '../config.json';\r\nfunction getIdeas() {\r\n return httpService.get(config.apiEndpoint + 'ideas');\r\n}\r\nfunction getIdeaVotes(ideaId) {\r\n return httpService.get(config.apiEndpoint + 'ideas/' + ideaId + '/votes');\r\n}\r\nexport async function createIdea(idea) {\r\n const result = await httpService.post(config.apiEndpoint + 'ideas', idea);\r\n return result.data;\r\n}\r\nexport async function updateIdea(idea) {\r\n const result = await httpService.put(\r\n config.apiEndpoint + 'ideas/' + idea.id,\r\n idea\r\n );\r\n return result.data;\r\n}\r\nexport async function getIdea(ideaId) {\r\n const result = await httpService.get(config.apiEndpoint + 'ideas/' + ideaId);\r\n return result.data.idea;\r\n}\r\nexport async function voteIdea(idea) {\r\n const result = await httpService.post(\r\n config.apiEndpoint + 'ideas/' + idea.id + '/vote'\r\n );\r\n return result.data;\r\n}\r\nexport async function deleteIdea(ideaId) {\r\n const result = await httpService.delete(\r\n config.apiEndpoint + 'ideas/' + ideaId\r\n );\r\n return result.data;\r\n}\r\nexport default {\r\n getIdeas,\r\n createIdea,\r\n voteIdea,\r\n deleteIdea,\r\n updateIdea,\r\n getIdea,\r\n getIdeaVotes\r\n};\r\n","import httpService from './httpService';\r\nimport config from '../config.json';\r\n\r\nasync function getUser(id) {\r\n let user = null;\r\n const result = await httpService.get(config.apiEndpoint + 'users/' + id);\r\n if (result.data.isOk) {\r\n user = result.data.user;\r\n }\r\n return user;\r\n}\r\nexport default {\r\n getUser\r\n};\r\n","import React, { Component } from 'react';\r\nimport ideaService from '../services/ideaService.js';\r\n\r\nclass IdeaVotes extends Component {\r\n state = {\r\n votes: [],\r\n idea: { title: '', module: '', description: '' }\r\n };\r\n async componentDidMount() {\r\n await this.loadData();\r\n }\r\n async loadData() {\r\n const idea = await ideaService.getIdea(this.props.ideaId);\r\n const votes = await ideaService.getIdeaVotes(idea.id);\r\n this.setState({\r\n idea: {\r\n title: idea.title,\r\n module: idea.module,\r\n description: idea.description\r\n },\r\n votes: votes.data.votes\r\n });\r\n }\r\n render() {\r\n return (\r\n
\r\n
Votes
\r\n
\r\n

\r\n {this.state.idea.title}{' '}\r\n \r\n {this.state.idea.module}\r\n \r\n

\r\n
{this.state.idea.description}
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default IdeaVotes;\r\n","import React, { Component } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport ideaService from \"../services/ideaService.js\";\r\nimport userService from \"../services/userService.js\";\r\nimport Joi from \"joi-browser\";\r\nimport Swal from \"sweetalert2\";\r\nimport IdeaVotes from \"./IdeaVotes.jsx\";\r\n\r\nclass IdeaForm extends Component {\r\n state = {\r\n idea: { title: \"\", module: \"General\", description: \"\", active: true },\r\n errors: { title: \"\", description: \"\" },\r\n users: [],\r\n };\r\n schema = {\r\n title: Joi.string().required().label(\"Title\"),\r\n description: Joi.string().required().label(\"Description\"),\r\n id: Joi.number().label(\"id\"),\r\n manualAdjustment: Joi.number().label(\"Adjustment\"),\r\n module: Joi.string().required(),\r\n active: Joi.boolean(),\r\n created: Joi.date(),\r\n status: Joi.string().required().label(\"Status\"),\r\n };\r\n constructor(props) {\r\n super(props);\r\n //await this.loadData();\r\n this.toggle = this.toggle.bind(this);\r\n }\r\n async componentDidMount() {\r\n await this.loadData();\r\n }\r\n async loadData() {\r\n if (this.props.mode === \"edit\") {\r\n const idea = await ideaService.getIdea(this.props.ideaId);\r\n const author = await userService.getUser(idea.authorId);\r\n this.setState({\r\n modal: false,\r\n idea: {\r\n id: idea.id,\r\n title: idea.title,\r\n module: idea.module,\r\n description: idea.description,\r\n active: idea.active,\r\n manualAdjustment: idea.manualAdjustment,\r\n created: idea.created,\r\n status: idea.status,\r\n },\r\n errors: { title: \"\", description: \"\" },\r\n author: author,\r\n });\r\n } else {\r\n this.setState({\r\n modal: false,\r\n idea: {\r\n title: \"\",\r\n module: \"General\",\r\n description: \"\",\r\n active: true,\r\n manualAdjustment: 0,\r\n status: \"Under Consideration\",\r\n },\r\n errors: { title: \"\", description: \"\" },\r\n });\r\n }\r\n }\r\n\r\n validate = () => {\r\n const result = Joi.validate(this.state.idea, this.schema, {\r\n abortEarly: false,\r\n });\r\n if (!result.error) return null;\r\n const errors = {};\r\n for (let item of result.error.details) errors[item.path[0]] = item.message;\r\n return errors;\r\n };\r\n\r\n toggle() {\r\n this.setState((prevState) => ({\r\n modal: !prevState.modal,\r\n idea: this.state.idea,\r\n }));\r\n }\r\n handleSubmit = async (e) => {\r\n e.preventDefault();\r\n this.submitButton.setAttribute(\"disabled\", \"disabled\");\r\n const idea = { ...this.state.idea };\r\n\r\n const errors = this.validate();\r\n this.setState({ errors: errors || {} });\r\n if (errors) {\r\n this.submitButton.removeAttribute(\"disabled\");\r\n return;\r\n }\r\n let result;\r\n idea.manualAdjustment = 0 + parseInt(idea.manualAdjustment, 10);\r\n\r\n if (this.props.mode === \"edit\") {\r\n result = await ideaService.updateIdea(idea);\r\n } else {\r\n result = await ideaService.createIdea(idea);\r\n }\r\n if (result.isOk) {\r\n this.setState({\r\n idea: {\r\n title: \"\",\r\n module: \"General\",\r\n description: \"\",\r\n manualAdjustment: 0,\r\n },\r\n });\r\n this.props.onSubmit(idea);\r\n Swal.fire({\r\n type: \"success\",\r\n title: \"Thank you!\",\r\n text: \"Your suggestion will be considered by our product team\",\r\n });\r\n this.toggle();\r\n } else {\r\n const errors = {};\r\n errors.submitResult = result.errorMessage;\r\n this.setState({ errors });\r\n }\r\n this.submitButton.removeAttribute(\"disabled\");\r\n };\r\n handleChange = ({ currentTarget: input }) => {\r\n const idea = { ...this.state.idea };\r\n if (input.type === \"checkbox\") {\r\n idea[input.name] = input.checked;\r\n } else {\r\n idea[input.name] = input.value;\r\n }\r\n const errors = { ...this.state.errors };\r\n this.setState({ idea, errors });\r\n };\r\n renderIdeaLink() {\r\n if (this.props.mode === \"edit\") {\r\n return (\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n render() {\r\n const { errors } = this.state;\r\n const closeBtn = (\r\n \r\n );\r\n\r\n return (\r\n \r\n {this.renderIdeaLink()}\r\n
\r\n \r\n \r\n Suggest Product Improvement\r\n \r\n \r\n {errors.submitResult && (\r\n
{errors.submitResult}
\r\n )}\r\n
\r\n \r\n \r\n {errors.title && (\r\n
{errors.title}
\r\n )}\r\n \r\n Breif description of you suggestion\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.props.mode === \"edit\" && (\r\n
\r\n \r\n \r\n
\r\n )}\r\n {this.props.mode === \"edit\" && (\r\n
\r\n \r\n \r\n {errors.manualAdjustment && (\r\n
\r\n {errors.manualAdjustment}\r\n
\r\n )}\r\n
\r\n )}\r\n {this.props.mode === \"edit\" && (\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 {errors.description && (\r\n
{errors.description}
\r\n )}\r\n
\r\n {this.state.author && (\r\n
\r\n \r\n
\r\n {this.state.author.fullName}{\" \"}\r\n \r\n {this.state.author.company}\r\n {\" \"}\r\n {new Date(this.state.idea.created).toLocaleDateString() +\r\n \" \" +\r\n new Date(this.state.idea.created).toLocaleTimeString()}\r\n
\r\n
\r\n )}\r\n {this.state.idea.id && }\r\n
\r\n \r\n {\r\n this.submitButton = btn;\r\n }}\r\n className=\"btn btn-primary\"\r\n onClick={this.handleSubmit}\r\n type=\"submit\"\r\n >\r\n Submit\r\n {\" \"}\r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default IdeaForm;\r\n","import React, { Component } from \"react\";\r\nimport Idea from \"./Idea\";\r\nimport mixitup from \"mixitup\";\r\nimport IdeaForm from \"./IdeaForm\";\r\nimport ideaService from \"../services/ideaService.js\";\r\n\r\nclass IdeasList extends Component {\r\n state = {\r\n ideas: [],\r\n receivedIdeas: [],\r\n };\r\n handleVote = async (idea) => {\r\n const ideas = [...this.state.ideas];\r\n const index = ideas.indexOf(idea);\r\n idea.totalVotes++;\r\n idea.userAlreadyVoted = true;\r\n ideas[index] = { ...idea };\r\n this.setState({ ideas });\r\n setTimeout(this.sortIdeas, 100);\r\n await ideaService.voteIdea(idea);\r\n };\r\n refresh = (newIdea) => {\r\n this.readIdeas();\r\n };\r\n componentDidMount() {\r\n this.readIdeas();\r\n }\r\n async readIdeas() {\r\n const { data: result } = await ideaService.getIdeas();\r\n this.setState({ receivedIdeas: result.ideas });\r\n this.filterIdeasByStatus(\"Under Consideration\");\r\n //this.sortIdeas();\r\n }\r\n filterIdeasByStatus(status) {\r\n this.setState({\r\n ideas: this.state.receivedIdeas.filter((x) => x.status === status),\r\n filteredStatus: status,\r\n });\r\n }\r\n sortIdeas = () => {\r\n var mixer1 = mixitup(\".ideas-list\");\r\n mixer1.sort(\"order:desc\");\r\n mixer1.destroy();\r\n };\r\n render() {\r\n return (\r\n
\r\n

How can we improve Lanteria HR?

\r\n
\r\n You are welcome to suggest improvements, request new features, or vote\r\n for the features suggested by other users. The top-rated suggestions\r\n will be included in the product roadmap. Your feedback is appreciated!\r\n
\r\n
\r\n this.refresh(idea)}\r\n mode=\"new\"\r\n >\r\n
\r\n
\r\n this.filterIdeasByStatus(\"Under Consideration\")}\r\n >\r\n Under Consideration\r\n \r\n \r\n {\r\n this.state.receivedIdeas.filter(\r\n (x) => x.status === \"Under Consideration\"\r\n ).length\r\n }\r\n \r\n this.filterIdeasByStatus(\"Completed\")}\r\n className={\r\n this.state.filteredStatus === \"Completed\"\r\n ? \"text-secondary\"\r\n : \"text-primary\"\r\n }\r\n >\r\n Completed\r\n \r\n \r\n {\r\n this.state.receivedIdeas.filter((x) => x.status === \"Completed\")\r\n .length\r\n }\r\n \r\n this.filterIdeasByStatus(\"Development in Process\")}\r\n className={\r\n this.state.filteredStatus === \"Development in Process\"\r\n ? \"text-secondary\"\r\n : \"text-primary\"\r\n }\r\n >\r\n Development in Process\r\n \r\n\r\n \r\n {\r\n this.state.receivedIdeas.filter(\r\n (x) => x.status === \"Development in Process\"\r\n ).length\r\n }\r\n \r\n
\r\n {this.state.ideas.map((idea) => (\r\n this.handleVote(idea)}\r\n idea={idea}\r\n >\r\n ))}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default IdeasList;\r\n","import config from \"../config.json\";\r\nimport http from \"./httpService\";\r\nconst apiEndpoint = config.apiEndpoint + \"auth/\";\r\nconst tokenKey = \"user\";\r\n\r\nhttp.setJwt(getToken());\r\n\r\nexport async function login(email, password) {\r\n const result = await http.post(apiEndpoint + \"login\", {\r\n username: email,\r\n password: password\r\n });\r\n if (result.data.isOk) {\r\n localStorage.setItem(tokenKey, JSON.stringify(result.data.user));\r\n http.setJwt(getToken());\r\n }\r\n return result.data;\r\n}\r\nexport async function loginWithJwt(user) {\r\n localStorage.setItem(tokenKey, JSON.stringify(user));\r\n http.setJwt(getToken());\r\n}\r\nexport function logout() {\r\n localStorage.removeItem(tokenKey);\r\n}\r\nexport function getCurrentUser() {\r\n try {\r\n return JSON.parse(localStorage.getItem(tokenKey));\r\n } catch (error) {\r\n console.error(error);\r\n return null;\r\n }\r\n}\r\n\r\nexport function IsAdmin() {\r\n try {\r\n const user = getCurrentUser();\r\n if (user && user.role === \"Administrator\") return true;\r\n else return false;\r\n } catch (error) {\r\n console.error(error);\r\n return null;\r\n }\r\n}\r\n\r\nexport async function register(user) {\r\n const result = await http.post(apiEndpoint + \"register\", {\r\n username: user.username,\r\n password: user.password,\r\n fullName: user.fullname,\r\n company: user.company\r\n });\r\n return result.data;\r\n}\r\nexport function getToken() {\r\n const token = localStorage.getItem(tokenKey);\r\n if (token) {\r\n return JSON.parse(localStorage.getItem(tokenKey)).token;\r\n } else {\r\n return token;\r\n }\r\n\r\n //return \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxIiwidXNlck5hbWUiOiJiYWwiLCJuYmYiOjE1NzAyMDQ2OTcsImV4cCI6MTU3MDgwOTQ5NywiaWF0IjoxNTcwMjA0Njk3fQ.FHgqLsvkUCfJ189U3VtkBqEZk9NUqekpCdrWMnj7FuA\";\r\n}\r\nexport async function forgotPassword(username) {\r\n const result = await http.post(apiEndpoint + \"forgetpassword\", {\r\n username: username\r\n });\r\n return result.data;\r\n}\r\nexport async function resetPassword(hash, password) {\r\n const result = await http.post(apiEndpoint + \"resetpassword\", {\r\n forgetPasswordToken: hash,\r\n newPassword: password\r\n });\r\n if (result.data.isOk) {\r\n localStorage.setItem(tokenKey, JSON.stringify(result.data.user));\r\n http.setJwt(getToken());\r\n }\r\n return result.data;\r\n}\r\nexport async function deleteUser(userId) {\r\n const result = await http.delete(config.apiEndpoint + \"users/\" + userId);\r\n return result.data;\r\n}\r\nexport default {\r\n login,\r\n loginWithJwt,\r\n logout,\r\n getCurrentUser,\r\n register,\r\n forgotPassword,\r\n resetPassword,\r\n getToken,\r\n IsAdmin,\r\n deleteUser\r\n};\r\n","import React, { Component } from \"react\";\r\nimport ReCAPTCHA from \"react-google-recaptcha\";\r\nimport auth from \"../services/authService.js\";\r\nimport Joi from \"joi-browser\";\r\nclass RegisterUserForm extends Component {\r\n state = {\r\n account: { fullname: \"\", company: \"\", username: \"\", password: \"\" },\r\n errors: { fullname: \"\", company: \"\", username: \"\", password: \"\" }\r\n };\r\n\r\n schema = {\r\n username: Joi.string()\r\n .email()\r\n .required()\r\n .label(\"Email\"),\r\n password: Joi.string()\r\n .required()\r\n .label(\"Password\"),\r\n fullname: Joi.string()\r\n .required()\r\n .label(\"Full Name\"),\r\n company: Joi.string()\r\n .required()\r\n .label(\"Company\")\r\n };\r\n recaptchaRef = React.createRef();\r\n handleSubmit = async e => {\r\n e.preventDefault();\r\n\r\n const recaptchaValue = this.recaptchaRef.current.getValue();\r\n if (!recaptchaValue) return;\r\n\r\n const errors = this.validate();\r\n this.setState({ errors: errors || {} });\r\n if (errors) return;\r\n const result = await auth.register(this.state.account);\r\n if (result.isOk) {\r\n auth.loginWithJwt(result.user);\r\n this.props.onLogin();\r\n this.props.history.replace(\"/\");\r\n } else {\r\n const errors = {};\r\n errors.registerResult = result.errorMessage;\r\n this.setState({ errors });\r\n }\r\n };\r\n\r\n validate = () => {\r\n const result = Joi.validate(this.state.account, this.schema, {\r\n abortEarly: false\r\n });\r\n if (!result.error) return null;\r\n const errors = {};\r\n for (let item of result.error.details) errors[item.path[0]] = item.message;\r\n return errors;\r\n };\r\n handleChange = ({ currentTarget: input }) => {\r\n const account = { ...this.state.account };\r\n account[input.name] = input.value;\r\n this.setState({ account });\r\n };\r\n render() {\r\n const { account, errors } = this.state;\r\n return (\r\n
\r\n
\r\n
Register to share your suggestions
\r\n
\r\n {errors.registerResult && (\r\n
{errors.registerResult}
\r\n )}\r\n
\r\n \r\n {errors.fullname && (\r\n
{errors.fullname}
\r\n )}\r\n
\r\n
\r\n \r\n {errors.company && (\r\n
{errors.company}
\r\n )}\r\n
\r\n
\r\n \r\n {errors.username && (\r\n
{errors.username}
\r\n )}\r\n
\r\n
\r\n \r\n {errors.password && (\r\n
{errors.password}
\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 RegisterUserForm;\r\n","import React, { Component } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport auth from \"../services/authService\";\r\nimport Joi from \"joi-browser\";\r\nimport Swal from \"sweetalert2\";\r\n\r\nclass LoginForm extends Component {\r\n state = {\r\n account: { username: \"\", password: \"\" },\r\n errors: { username: \"\", password: \"\" }\r\n };\r\n schema = {\r\n username: Joi.string()\r\n .email()\r\n .required()\r\n .label(\"Email\"),\r\n password: Joi.string()\r\n .required()\r\n .label(\"Password\")\r\n };\r\n\r\n handleSubmit = async e => {\r\n e.preventDefault();\r\n\r\n const errors = this.validate();\r\n this.setState({ errors: errors || {} });\r\n if (errors) return;\r\n const result = await auth.login(\r\n this.state.account.username,\r\n this.state.account.password\r\n );\r\n if (result.isOk) {\r\n this.props.onLogin();\r\n this.props.history.replace(\"/\");\r\n } else {\r\n const errors = {};\r\n Swal.fire({\r\n type: \"error\",\r\n title: \"Oops...\",\r\n text: result.errorMessage\r\n });\r\n this.setState({ errors });\r\n }\r\n };\r\n\r\n validate = () => {\r\n const result = Joi.validate(this.state.account, this.schema, {\r\n abortEarly: false\r\n });\r\n if (!result.error) return null;\r\n const errors = {};\r\n for (let item of result.error.details) errors[item.path[0]] = item.message;\r\n return errors;\r\n };\r\n\r\n handleChange = ({ currentTarget: input }) => {\r\n const account = { ...this.state.account };\r\n account[input.name] = input.value;\r\n this.setState({ account });\r\n };\r\n\r\n render() {\r\n const { account, errors } = this.state;\r\n return (\r\n
\r\n
\r\n
Log in to your account to continue
\r\n
\r\n {errors.loginResult && (\r\n
{errors.loginResult}
\r\n )}\r\n
\r\n \r\n {errors.username && (\r\n
{errors.username}
\r\n )}\r\n
\r\n
\r\n \r\n {errors.password && (\r\n
{errors.password}
\r\n )}\r\n
\r\n \r\n Forgot Password\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 LoginForm;\r\n","import React, { Component } from \"react\";\r\nimport RegisterUserForm from \"./RegisterUserForm.jsx\";\r\nimport LoginForm from \"./LoginForm.jsx\";\r\nclass LoginRegister extends Component {\r\n state = {};\r\n render() {\r\n const props = this.props;\r\n return (\r\n
\r\n
\r\n

Suggest Product Feature or Improvement

\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 LoginRegister;\r\n","import React, { Component } from \"react\";\r\nimport Joi from \"joi-browser\";\r\nimport Swal from \"sweetalert2\";\r\nimport auth from \"../services/authService\";\r\nclass ForgotPassword extends Component {\r\n state = {\r\n account: { username: \"\" },\r\n errors: {}\r\n };\r\n schema = {\r\n username: Joi.string()\r\n .email()\r\n .required()\r\n .label(\"Email\")\r\n };\r\n\r\n handleSubmit = async e => {\r\n e.preventDefault();\r\n const errors = this.validate();\r\n this.setState({ errors: errors || {} });\r\n if (errors) return;\r\n const result = await auth.forgotPassword(this.state.account.username);\r\n if (result.isOk) {\r\n Swal.fire({\r\n type: \"info\",\r\n title: \"Forgot Password\",\r\n text: \"Please check your email to reset your password\"\r\n });\r\n this.props.history.replace(\"/\");\r\n } else {\r\n const errors = {};\r\n Swal.fire({\r\n type: \"error\",\r\n title: \"Oops...\",\r\n text: result.errorMessage\r\n });\r\n this.setState({ errors });\r\n }\r\n };\r\n\r\n validate = () => {\r\n const result = Joi.validate(this.state.account, this.schema, {\r\n abortEarly: false\r\n });\r\n if (!result.error) return null;\r\n const errors = {};\r\n for (let item of result.error.details) errors[item.path[0]] = item.message;\r\n return errors;\r\n };\r\n\r\n handleChange = ({ currentTarget: input }) => {\r\n const account = { ...this.state.account };\r\n account[input.name] = input.value;\r\n this.setState({ account });\r\n };\r\n render() {\r\n const { account, errors } = this.state;\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Forgot Password
\r\n {errors.loginResult && (\r\n
\r\n {errors.loginResult}\r\n
\r\n )}\r\n
\r\n \r\n \r\n {errors.username && (\r\n
\r\n {errors.username}\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 ForgotPassword;\r\n","import React, { Component } from \"react\";\r\n\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nclass DeleteButton extends Component {\r\n state = {};\r\n\r\n render() {\r\n return (\r\n
\r\n {\r\n this.props.onDelete(this.props.ideaId);\r\n }}\r\n className=\"btn btn-outline-danger btn-sm \"\r\n >\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default DeleteButton;\r\n","import React, { Component } from \"react\";\r\nimport config from \"../config.json\";\r\nimport authService from \"../services/authService\";\r\nimport ideaService from \"../services/ideaService.js\";\r\nimport $ from \"jquery\";\r\nimport \"datatables.net-bs4\";\r\nimport moment from \"moment\";\r\nimport DeleteButton from \"./DeleteButton\";\r\nimport ReactDOM from \"react-dom\";\r\nimport Swal from \"sweetalert2\";\r\nimport IdeaForm from \"./IdeaForm\";\r\n\r\nimport \"datatables.net-bs4/css/dataTables.bootstrap4.min.css\";\r\n\r\nclass Admin extends Component {\r\n reloadDataTable() {\r\n $(\"#tblData\").DataTable().ajax.reload();\r\n }\r\n loadDataTable() {\r\n $(\"#tblData\").DataTable({\r\n ajax: {\r\n url: config.apiEndpoint + \"ideas/all\",\r\n type: \"GET\",\r\n datatype: \"json\",\r\n beforeSend: function (request) {\r\n request.setRequestHeader(\r\n \"Authorization\",\r\n \"Bearer \" + authService.getToken()\r\n );\r\n },\r\n dataSrc: function (r) {\r\n return r.ideas;\r\n },\r\n },\r\n\r\n order: [[5, \"desc\"]],\r\n columns: [\r\n {\r\n data: \"title\",\r\n createdCell: (td, cellData, rowData, row, col) => {\r\n ReactDOM.render(\r\n
\r\n this.reloadDataTable()}\r\n mode=\"edit\"\r\n ideaId={rowData.id}\r\n linkTitle={cellData}\r\n >\r\n
,\r\n td\r\n );\r\n },\r\n width: \"15%\",\r\n },\r\n {\r\n data: \"active\",\r\n render: function (data, type, row) {\r\n return data\r\n ? 'Active'\r\n : 'Inactive';\r\n },\r\n width: \"5%\",\r\n },\r\n {\r\n data: \"status\",\r\n render: function (data, type, row) {\r\n if (data === \"Development in Process\") {\r\n return '' + data + \"\";\r\n } else if (data === \"Under Consideration\") {\r\n return '' + data + \"\";\r\n } else {\r\n return '' + data + \"\";\r\n }\r\n },\r\n width: \"5%\",\r\n },\r\n { data: \"module\", width: \"10%\" },\r\n {\r\n data: \"description\",\r\n width: \"20%\",\r\n render: function (data, type, row, meta) {\r\n var sanitized = $.fn.dataTable.render\r\n .text()\r\n .display(data, type, row, meta);\r\n return sanitized.substring(0, 100);\r\n },\r\n },\r\n { data: \"totalVotes\", width: \"10%\", className: \"text-right\" },\r\n { data: \"manualAdjustment\", width: \"10%\", className: \"text-right\" },\r\n {\r\n data: \"created\",\r\n width: \"15%\",\r\n type: \"date\",\r\n render: function (data, type, row) {\r\n return data ? moment(data).format(\"DD MMM YYYY HH:mm\") : \"\";\r\n },\r\n },\r\n {\r\n data: \"id\",\r\n createdCell: (td, cellData, rowData, row, col) => {\r\n ReactDOM.render(\r\n this.deleteIdea(cellData)}\r\n >,\r\n td\r\n );\r\n },\r\n width: \"15%\",\r\n },\r\n ],\r\n language: {\r\n emptyTable: \"No records found\",\r\n },\r\n width: \"100%\",\r\n });\r\n }\r\n state = {};\r\n componentDidMount() {\r\n this.loadDataTable();\r\n }\r\n deleteIdea(id) {\r\n Swal.fire({\r\n title: \"Are you sure?\",\r\n text: \"You will not be able to recover this item!\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Delete\",\r\n cancelButtonText: \"Cancel\",\r\n }).then(async (result) => {\r\n if (result.value) {\r\n await ideaService.deleteIdea(id);\r\n Swal.fire(\"Deleted!\", \"\", \"success\").then(this.reloadDataTable());\r\n }\r\n });\r\n }\r\n render() {\r\n return (\r\n
\r\n
\r\n this.reloadDataTable()}\r\n mode=\"new\"\r\n >\r\n
\r\n \r\n \r\n \r\n Name\r\n Active\r\n Status\r\n Module\r\n Description\r\n Votes\r\n Adjustment\r\n Added\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default Admin;\r\n","import React, { Component } from \"react\";\r\nimport config from \"../config.json\";\r\nimport authService from \"../services/authService\";\r\nimport $ from \"jquery\";\r\nimport \"datatables.net-bs4\";\r\nimport ReactDOM from \"react-dom\";\r\nimport Swal from \"sweetalert2\";\r\nimport DeleteButton from \"./DeleteButton\";\r\nimport moment from \"moment\";\r\nimport \"datatables.net-bs4/css/dataTables.bootstrap4.min.css\";\r\nclass AdminUsers extends Component {\r\n reloadDataTable() {\r\n $(\"#tblData\")\r\n .DataTable()\r\n .ajax.reload();\r\n }\r\n loadDataTable() {\r\n $(\"#tblData\").DataTable({\r\n ajax: {\r\n url: config.apiEndpoint + \"users/\",\r\n type: \"GET\",\r\n datatype: \"json\",\r\n beforeSend: function(request) {\r\n request.setRequestHeader(\r\n \"Authorization\",\r\n \"Bearer \" + authService.getToken()\r\n );\r\n },\r\n dataSrc: function(r) {\r\n return r.users;\r\n }\r\n },\r\n\r\n order: [[0, \"desc\"]],\r\n columns: [\r\n {\r\n data: \"fullName\",\r\n width: \"30%\",\r\n render: $.fn.dataTable.render.text()\r\n },\r\n\r\n { data: \"company\", width: \"20%\", render: $.fn.dataTable.render.text() },\r\n {\r\n data: \"username\",\r\n width: \"20%\",\r\n render: $.fn.dataTable.render.text()\r\n },\r\n {\r\n data: \"created\",\r\n width: \"15%\",\r\n type: \"date\",\r\n render: function(data, type, row) {\r\n return data ? moment(data).format(\"DD MMM YYYY HH:mm\") : \"\";\r\n }\r\n },\r\n {\r\n data: \"id\",\r\n createdCell: (td, cellData, rowData, row, col) => {\r\n ReactDOM.render(\r\n this.deleteUser(cellData)}\r\n >,\r\n td\r\n );\r\n },\r\n width: \"15%\"\r\n }\r\n ],\r\n language: {\r\n emptyTable: \"No records found\"\r\n },\r\n width: \"100%\"\r\n });\r\n }\r\n state = {};\r\n componentDidMount() {\r\n this.loadDataTable();\r\n }\r\n deleteUser(id) {\r\n Swal.fire({\r\n title: \"Are you sure?\",\r\n text: \"You will not be able to recover this item!\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Delete\",\r\n cancelButtonText: \"Cancel\"\r\n }).then(async result => {\r\n if (result.value) {\r\n await authService.deleteUser(id);\r\n Swal.fire(\"Deleted!\", \"\", \"success\").then(this.reloadDataTable());\r\n }\r\n });\r\n }\r\n state = {};\r\n render() {\r\n return (\r\n
\r\n \r\n \r\n \r\n Name\r\n Company\r\n Username\r\n Registered\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default AdminUsers;\r\n","import React, { Component } from \"react\";\r\nimport auth from \"../services/authService\";\r\nimport Joi from \"joi-browser\";\r\nimport Swal from \"sweetalert2\";\r\nimport queryString from \"query-string\";\r\n\r\nclass ResetPassword extends Component {\r\n state = {\r\n token: \"\",\r\n password: \"\",\r\n errors: {}\r\n };\r\n schema = {\r\n password: Joi.string()\r\n .required()\r\n .label(\"Password\")\r\n };\r\n parseHash() {\r\n const qs = queryString.parse(this.props.location.search);\r\n this.setState({ token: qs.hash });\r\n }\r\n\r\n handleSubmit = async e => {\r\n e.preventDefault();\r\n const errors = this.validate();\r\n this.setState({ errors: errors || {} });\r\n if (errors) return;\r\n const result = await auth.resetPassword(\r\n this.state.token,\r\n this.state.password\r\n );\r\n if (result.isOk) {\r\n this.props.onLogin();\r\n this.props.history.replace(\"/\");\r\n } else {\r\n const errors = {};\r\n Swal.fire({\r\n type: \"error\",\r\n title: \"Oops...\",\r\n text: result.errorMessage\r\n });\r\n this.setState({ errors });\r\n }\r\n };\r\n\r\n validate = () => {\r\n const result = Joi.validate(this.state.account, this.schema, {\r\n abortEarly: false\r\n });\r\n if (!result.error) return null;\r\n const errors = {};\r\n for (let item of result.error.details) errors[item.path[0]] = item.message;\r\n return errors;\r\n };\r\n\r\n handleChange = ({ currentTarget: input }) => {\r\n this.setState({ password: input.value });\r\n };\r\n componentDidMount() {\r\n this.parseHash();\r\n }\r\n render() {\r\n const { password, errors } = this.state;\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Reset Password
\r\n {errors.loginResult && (\r\n
\r\n {errors.loginResult}\r\n
\r\n )}\r\n
\r\n \r\n \r\n {errors.password && (\r\n
\r\n {errors.password}\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 ResetPassword;\r\n","import React, { Component } from \"react\";\r\nimport { Route, Redirect } from \"react-router-dom\";\r\nimport * as auth from \"../services/authService\";\r\n\r\nclass ProtectedRoute extends Component {\r\n render() {\r\n const { component: Component, render, ...rest } = this.props;\r\n return (\r\n {\r\n if (!auth.getCurrentUser())\r\n return (\r\n \r\n );\r\n return Component ? : render(props);\r\n }}\r\n />\r\n );\r\n }\r\n}\r\n\r\nexport default ProtectedRoute;\r\n","import React, { Component } from \"react\";\r\nimport auth from \"../services/authService\";\r\nimport { Link } from \"react-router-dom\";\r\nclass AdminMenu extends Component {\r\n state = {};\r\n\r\n render() {\r\n if (auth.IsAdmin()) {\r\n return (\r\n
\r\n Manage Ideas |{\" \"}\r\n Manage Users\r\n
\r\n );\r\n } else return \"\";\r\n }\r\n}\r\n\r\nexport default AdminMenu;\r\n","import React, { Component } from \"react\";\r\nimport IdeasList from \"./components/IdeasList\";\r\nimport LoginRegister from \"./components/LoginRegister\";\r\nimport ForgotPassword from \"./components/ForgotPassword\";\r\nimport Admin from \"./components/Admin\";\r\nimport AdminUsers from \"./components/AdminUsers\";\r\nimport ResetPassword from \"./components/ResetPassword\";\r\nimport { BrowserRouter as Switch, Route, Link } from \"react-router-dom\";\r\nimport auth from \"./services/authService.js\";\r\nimport { library } from \"@fortawesome/fontawesome-svg-core\";\r\nimport ProtectedRoute from \"./common/protectedRoute\";\r\nimport {\r\n faLightbulb,\r\n faCheck,\r\n faThumbsUp,\r\n faTrash,\r\n faTrashAlt\r\n} from \"@fortawesome/free-solid-svg-icons\";\r\nimport \"./App.css\";\r\nimport AdminMenu from \"./components/AdminMenu\";\r\nlibrary.add(faLightbulb, faCheck, faThumbsUp, faTrash, faTrashAlt);\r\n\r\nclass App extends Component {\r\n state = {};\r\n renderHomePage(props) {\r\n const user = auth.getCurrentUser();\r\n if (user) {\r\n return ;\r\n } else {\r\n return (\r\n {\r\n this.readUser();\r\n }}\r\n >\r\n );\r\n }\r\n }\r\n renderUserName() {\r\n if (this.state.user) {\r\n return (\r\n
\r\n Hello, {this.state.user.fullName} |{\" \"}\r\n {\r\n auth.logout();\r\n this.readUser();\r\n }}\r\n >\r\n Logout\r\n \r\n
\r\n );\r\n }\r\n }\r\n componentDidMount() {\r\n this.readUser();\r\n }\r\n readUser() {\r\n const user = auth.getCurrentUser();\r\n this.setState({ user });\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 Customer Feedback Portal\r\n \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
{this.renderUserName()}
\r\n
\r\n
\r\n }\r\n >\r\n }\r\n >\r\n (\r\n {\r\n this.readUser();\r\n }}\r\n />\r\n )}\r\n >\r\n }\r\n >\r\n (\r\n {\r\n this.readUser();\r\n }}\r\n />\r\n )}\r\n >\r\n this.renderHomePage(props)}\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 App;\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-app-polyfill/stable\";\r\nimport \"react-app-polyfill/ie11\";\r\nimport React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport \"./index.css\";\r\nimport App from \"./App\";\r\nimport { BrowserRouter } from \"react-router-dom\";\r\nimport * as serviceWorker from \"./serviceWorker\";\r\nimport \"bootstrap/dist/css/bootstrap.css\";\r\nimport \"./assets/css/theme.css\";\r\nimport \"unorm/lib/unorm\";\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""}