sales.js 357 B

123456789101112
  1. $(() => {
  2. const $customerDropdown = $("#customer-id");
  3. $customerDropdown.select2({
  4. theme: "bootstrap-5"
  5. });
  6. const $selectAll = $("#sales-table-select-all");
  7. $selectAll.on("change", event => {
  8. const $table = $(event.currentTarget).closest("table");
  9. $table.find("tbody input[type=checkbox]").prop("checked", event.currentTarget.checked);
  10. });
  11. });