cityssm/lottery-licence-manager

View on GitHub
public/javascripts/location-view.min.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const e=document.querySelector("main").dataset.urlPrefix,t=document.querySelector("#is-location-restore-button");if(t){const o=()=>{cityssm.postJSON(e+"/locations/doRestore",{locationID:t.getAttribute("data-location-id")},e=>{e.success&&window.location.reload()})};t.addEventListener("click",()=>{cityssm.confirmModal("Restore Location?","Are you sure you want to restore this location, and make it available for use again?","Yes, Restore","warning",o)})}})();