Industry offence reference tool

Industry Offence Finder

The Industry Offence Finder is designed to make offence identification faster, clearer and more practical for every organisation. Instead of searching through different laws and documents separately, users can filter by sector, industry and offence category to quickly understand the possible offence, relevant legislation, legal description, organisational application and punishment. This makes the table a powerful reference tool for managers, trainers, investigators, compliance officers and decision-makers.

It also helps users recognise legal risks before problems become serious. Whether you are preparing a report, advising management, conducting training, reviewing workplace incidents or improving compliance awareness, this tool gives you a simple starting point. The Industry Offence Finder does not replace legal advice, but it helps organisations ask better questions, make better recommendations and take more informed action.

Important Notice: This tool is for training, compliance awareness and general reference only. It is not legal advice and does not decide whether an offence has been committed. Please verify the latest law and seek professional legal advice before relying on this information for any report, investigation, disciplinary action or management decision.
0Total loaded offences
0Sector categories prepared
0Industry categories prepared
0Offence categories
🔐 Protected CSV upload area

Enter the admin password to unlock offence-data upload and category-meaning upload. This protects the content-changing functions from public visitors.

How to use: Use this area to build a focused offence list for a report, training discussion, compliance review or investigation support. Filter the table, tick the relevant offences, then press Select Checked Offences.
Selected offence tools
0 offence(s) selectedUse filters, tick offences, then select them.
Important Notice: By downloading or printing this information, you acknowledge that it is provided for general reference and training purposes only. It should not be treated as legal advice, legal opinion or a final legal assessment.
Showing 0 offences. Search applies to the Offences column.
Offences, legislation, legal description, organisational application and punishment
Select Offence Number Offences Legislation
With hyperlinks
Legal Description Org. Application Punishment
Legend: What the offence categories mean
Choose a sector or industry to view relevant category meanings, search all categories, or choose Show All Categories.
`; const blob = new Blob(['' + htmlDoc], { type: 'application/vnd.ms-excel;charset=utf-8;' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'industry-offence-finder-displayed.xls'; document.body.appendChild(a); a.click(); a.remove(); setTimeout(() => URL.revokeObjectURL(url), 1000); actionStatus.textContent = `Downloaded ${currentVisibleRows.length.toLocaleString()} displayed row(s) only.`; } function printDisplayedRows() { if (!currentVisibleRows.length) return; const rowsHtml = currentVisibleRows.map(row => ` ${escapeHTML(row.displayNo)} ${escapeHTML(row.offences)}
${escapeHTML(row.industry)} | ${escapeHTML(row.offenceCategory)} ${escapeHTML(row.legislation)} ${escapeHTML(row.legalDescription)} ${escapeHTML(row.orgApplication)} ${escapeHTML(row.punishment)} `).join(''); const printWindow = window.open('', '_blank', 'width=1100,height=800'); if (!printWindow) { actionStatus.textContent = 'Print window was blocked. Please allow pop-ups for this page.'; return; } printWindow.document.write(`Displayed Industry Offence Finder Rows

Industry Offence Finder

Printed output contains only the rows currently displayed in the table: ${currentVisibleRows.length.toLocaleString()} row(s).

${rowsHtml}
Offence NumberOffencesLegislationLegal DescriptionOrg. ApplicationPunishment
`); printWindow.document.close(); printWindow.focus(); printWindow.print(); actionStatus.textContent = `Print view opened for ${currentVisibleRows.length.toLocaleString()} displayed row(s) only.`; } function readFileText(file) { return new Promise((resolve, reject) => { if (!file) reject(new Error('No file selected')); const reader = new FileReader(); reader.onload = () => resolve(String(reader.result || '')); reader.onerror = () => reject(reader.error || new Error('File read failed')); reader.readAsText(file); }); } function downloadCSVFile(filename, csvText) { const blob = new Blob(['' + String(csvText || '')], { type: 'text/csv;charset=utf-8;' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); a.remove(); setTimeout(() => URL.revokeObjectURL(url), 1000); } function setupAdminUploads() { const adminStatus = app.querySelector('#lpsAdminStatus'); const offenceFile = app.querySelector('#lpsAdminOffenceFile'); const offenceAction = app.querySelector('#lpsAdminOffenceAction'); const offenceTarget = app.querySelector('#lpsAdminOffenceTarget'); const applyOffenceBtn = app.querySelector('#lpsAdminApplyOffenceBtn'); const legendFile = app.querySelector('#lpsAdminLegendFile'); const legendAction = app.querySelector('#lpsAdminLegendAction'); const legendTarget = app.querySelector('#lpsAdminLegendTarget'); const applyLegendBtn = app.querySelector('#lpsAdminApplyLegendBtn'); const downloadOffenceCsvBtn = app.querySelector('#lpsAdminDownloadOffenceCsvBtn'); const downloadLegendCsvBtn = app.querySelector('#lpsAdminDownloadLegendCsvBtn'); const downloadIndustry = app.querySelector('#lpsAdminDownloadIndustry'); if (!adminStatus) return; function resetAfterAdminChange() { selectedIds.clear(); selectedOnlyMode = false; sectorFilter.value = ''; industryFilter.value = ''; categoryFilter.value = ''; limitFilter.value = '10'; searchInput.value = ''; refreshAll(); } function makeRowsUnique(rows, tag) { const stamp = Date.now(); return rows.map((row, idx) => ({ ...row, uid: String(row.uid || row.displayNo || 'OFF') + '-' + tag + '-' + stamp + '-' + idx })); } function showAdminSuccess(message, fileInput) { if (fileInput) fileInput.value = ''; adminStatus.textContent = `✅ ${message}`; window.setTimeout(() => window.alert(message), 50); } function updateOffenceUploadMode() { if (!offenceAction || !offenceTarget || !offenceFile) return; const action = offenceAction.value; const needsTarget = action === 'replace-industry' || action === 'delete-industry'; const needsFile = action !== 'delete-industry'; offenceTarget.disabled = !needsTarget; offenceFile.disabled = !needsFile; if (!needsTarget) offenceTarget.value = ''; if (!needsFile) offenceFile.value = ''; } function updateLegendUploadMode() { if (!legendAction || !legendTarget || !legendFile) return; const action = legendAction.value; const needsTarget = action === 'replace-category' || action === 'delete-category'; const needsFile = action !== 'delete-category'; legendTarget.disabled = !needsTarget; legendFile.disabled = !needsFile; if (!needsTarget) legendTarget.value = ''; if (!needsFile) legendFile.value = ''; } async function readOffenceRowsFromUpload() { const file = offenceFile && offenceFile.files ? offenceFile.files[0] : null; if (!file) throw new Error('Please choose an offence CSV file.'); const rows = rowsFromCSV(await readFileText(file)); if (!rows.length) throw new Error('No offence rows found in the selected CSV file. Please use the supplied offence CSV template.'); const invalid = rows.filter(row => !clean(row.sector) || !clean(row.industry) || !clean(row.offenceCategory) || !clean(row.offences)); if (invalid.length) throw new Error(`${invalid.length} row(s) are missing Sector, Industry, Offence Category or Offences. Please correct the CSV and upload again.`); return makeRowsUnique(rows, 'UPLOAD'); } async function readLegendItemsFromUpload() { const file = legendFile && legendFile.files ? legendFile.files[0] : null; if (!file) throw new Error('Please choose an offence category CSV file.'); const items = legendFromCSV(await readFileText(file)); if (!items.length) throw new Error('No offence category meanings were found. Please use the supplied category legend CSV template.'); const invalid = items.filter(item => !clean(item.category) || (!clean(item.description) && !(item.examples || []).length)); if (invalid.length) throw new Error(`${invalid.length} category row(s) are missing the Offence Category and/or both Description and Examples. Please correct the CSV and upload again.`); return mergeLegend([], items); } if (offenceAction) offenceAction.addEventListener('change', updateOffenceUploadMode); if (legendAction) legendAction.addEventListener('change', updateLegendUploadMode); if (applyOffenceBtn) applyOffenceBtn.addEventListener('click', async () => { try { const action = offenceAction ? offenceAction.value : 'new'; if (action === 'new') { const rows = await readOffenceRowsFromUpload(); offenceData = offenceData.concat(rows); resetAfterAdminChange(); showAdminSuccess(`Offence CSV file uploaded successfully. ${rows.length.toLocaleString()} new offence row(s) were added and the Industry → Offence Category filter link has been refreshed.`, offenceFile); return; } if (action === 'replace-industry') { const target = offenceTarget ? offenceTarget.value : ''; if (!target) throw new Error('Please choose the industry to replace.'); const rows = await readOffenceRowsFromUpload(); const removed = offenceData.filter(row => sameKey(row.industry, target)).length; offenceData = offenceData.filter(row => !sameKey(row.industry, target)).concat(rows); resetAfterAdminChange(); showAdminSuccess(`Offence CSV file uploaded successfully. ${target} was replaced: ${removed.toLocaleString()} old row(s) removed and ${rows.length.toLocaleString()} new row(s) loaded.`, offenceFile); return; } if (action === 'delete-industry') { const target = offenceTarget ? offenceTarget.value : ''; if (!target) throw new Error('Please choose the industry to delete.'); const before = offenceData.length; offenceData = offenceData.filter(row => !sameKey(row.industry, target)); selectedIds.clear(); resetAfterAdminChange(); showAdminSuccess(`${target} was deleted successfully. ${(before - offenceData.length).toLocaleString()} offence row(s) were removed.`, null); return; } if (action === 'replace-all') { const rows = await readOffenceRowsFromUpload(); offenceData = rows; resetAfterAdminChange(); showAdminSuccess(`Offence CSV file uploaded successfully. All offence data was replaced with ${rows.length.toLocaleString()} row(s), and all Industry → Offence Category links were rebuilt.`, offenceFile); return; } } catch (e) { const message = e.message || 'Offence data change failed.'; adminStatus.textContent = `⚠ ${message}`; window.alert(message); } }); if (applyLegendBtn) applyLegendBtn.addEventListener('click', async () => { try { const action = legendAction ? legendAction.value : 'new'; if (action === 'new') { const items = await readLegendItemsFromUpload(); legendData = mergeLegend(legendData, items); refreshAll(); showAdminSuccess(`Offence Category CSV file uploaded successfully. ${items.length.toLocaleString()} unique category meaning item(s) were added or updated.`, legendFile); return; } if (action === 'replace-category') { const target = legendTarget ? legendTarget.value : ''; if (!target) throw new Error('Please choose the category meaning to replace.'); const items = await readLegendItemsFromUpload(); const before = legendData.length; const kept = legendData.filter(item => !sameKey(item.category, target)); const removed = before - kept.length; legendData = mergeLegend(kept, items); refreshAll(); showAdminSuccess(`Offence Category CSV file uploaded successfully. ${target} was replaced: ${removed.toLocaleString()} old meaning item(s) removed and ${items.length.toLocaleString()} unique item(s) loaded.`, legendFile); return; } if (action === 'delete-category') { const target = legendTarget ? legendTarget.value : ''; if (!target) throw new Error('Please choose the category meaning to delete.'); const before = legendData.length; legendData = legendData.filter(item => !sameKey(item.category, target)); refreshAll(); showAdminSuccess(`${target} category meaning was deleted successfully. ${(before - legendData.length).toLocaleString()} meaning item(s) were removed. Offence rows using that category were not deleted.`, null); return; } if (action === 'replace-all') { const items = await readLegendItemsFromUpload(); legendData = mergeLegend([], items); refreshAll(); showAdminSuccess(`Offence Category CSV file uploaded successfully. All category meanings were replaced with ${legendData.length.toLocaleString()} unique category item(s).`, legendFile); return; } } catch (e) { const message = e.message || 'Category meaning change failed.'; adminStatus.textContent = `⚠ ${message}`; window.alert(message); } }); if (downloadOffenceCsvBtn) downloadOffenceCsvBtn.addEventListener('click', function() { const selectedIndustry = downloadIndustry ? downloadIndustry.value : ''; const rows = selectedIndustry ? offenceData.filter(row => row.industry === selectedIndustry) : offenceData; const safeName = selectedIndustry ? selectedIndustry.toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/^_+|_+$/g, '') : 'all_industries'; downloadCSVFile(`industry_offence_finder_offence_data_${safeName || 'selected_industry'}.csv`, rowsToCSV(rows)); adminStatus.textContent = `Downloaded offence CSV for ${selectedIndustry || 'all industries'} with ${rows.length.toLocaleString()} row(s).`; }); if (downloadLegendCsvBtn) downloadLegendCsvBtn.addEventListener('click', function() { const dedupedLegend = mergeLegend([], legendData); downloadCSVFile('industry_offence_finder_current_category_meanings.csv', legendToCSV(dedupedLegend)); adminStatus.textContent = `Downloaded current category meanings CSV with ${dedupedLegend.length.toLocaleString()} item(s).`; }); updateOffenceUploadMode(); updateLegendUploadMode(); populateAdminTargetLists(); } tableBody.addEventListener('change', function(event) { const target = event.target; if (!target.classList || !target.classList.contains('lps-row-check')) return; const uid = target.getAttribute('data-uid'); if (target.checked) selectedIds.add(uid); else selectedIds.delete(uid); if (selectedOnlyMode) renderTable(); else updateSelectionUI(); }); selectCheckedBtn.addEventListener('click', function() { if (!selectedIds.size) { actionStatus.textContent = 'Please tick at least one offence first.'; return; } selectedOnlyMode = true; renderTable(); actionStatus.textContent = 'Selected-only view is now active.'; }); chooseMoreBtn.addEventListener('click', function() { selectedOnlyMode = false; renderTable(); actionStatus.textContent = 'Selection is kept. Use the filters to choose more offences.'; }); clearSelectedBtn.addEventListener('click', function() { selectedIds.clear(); selectedOnlyMode = false; renderTable(); actionStatus.textContent = 'Selected offences cleared.'; }); downloadDisplayedBtn.addEventListener('click', downloadDisplayedRows); printDisplayedBtn.addEventListener('click', printDisplayedRows); sectorFilter.addEventListener('change', function() { populateIndustryOptions(); populateCategoryOptions(); syncLegendFiltersFromMain(); selectedOnlyMode = false; renderLegend(); renderTable(); }); industryFilter.addEventListener('change', function() { populateCategoryOptions(); syncLegendFiltersFromMain(); selectedOnlyMode = false; renderLegend(); renderTable(); }); categoryFilter.addEventListener('change', function() { selectedOnlyMode = false; renderLegend(); renderTable(); }); if (legendSectorFilter) legendSectorFilter.addEventListener('change', function() { // Legend filters are independent from the main offence table filters. // Changing the Legend sector only refreshes the Legend industry list and Legend cards. populateLegendIndustryOptions(''); legendMode = 'relevant'; if (legendSearch) legendSearch.value = ''; renderLegend(); }); if (legendIndustryFilter) legendIndustryFilter.addEventListener('change', function() { // Changing the Legend industry must never alter or re-render the main offence table. legendMode = 'relevant'; if (legendSearch) legendSearch.value = ''; renderLegend(); }); if (legendSearch) legendSearch.addEventListener('input', renderLegend); if (legendRelevantBtn) legendRelevantBtn.addEventListener('click', function() { legendMode = 'relevant'; if (legendSearch) legendSearch.value = ''; renderLegend(); }); if (legendAllBtn) legendAllBtn.addEventListener('click', function() { legendMode = 'all'; if (legendSearch) legendSearch.value = ''; renderLegend(); }); limitFilter.addEventListener('change', renderTable); searchInput.addEventListener('input', function() { selectedOnlyMode = false; renderTable(); }); resetBtn.addEventListener('click', resetFilters); setupAdminPasswordGate(); setupAdminUploads(); refreshAll(); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', initLPSIndustryOffenceFinder); else initLPSIndustryOffenceFinder(); })();
Shopping Cart
Scroll to Top