Employers working - onboarding to card print
This commit is contained in:
@@ -17,6 +17,20 @@ export default class extends Controller {
|
||||
|
||||
}
|
||||
|
||||
remove(event) {
|
||||
event.preventDefault();
|
||||
const wrapper = event.target.closest(".plan-item");
|
||||
if (wrapper.dataset.newRecord === "true") {
|
||||
wrapper.remove();
|
||||
} else {
|
||||
wrapper.style.display = "none";
|
||||
const destroyInput = wrapper.querySelector("input[name*='[_destroy]']");
|
||||
if (destroyInput) {
|
||||
destroyInput.value = "1";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#updateTemplatePlan() {
|
||||
const nextIndex = this.planTargets.length
|
||||
const num_of_colors = this.formColorValue.length
|
||||
|
||||
Reference in New Issue
Block a user