delete_product_window.js 674 B

12345678910111213141516171819202122232425262728
  1. import { confirm_action } from "./confirm_action.js";
  2. import { delete_request } from "./delete_request.js";
  3. import { searcher } from "./searcher.js";
  4. export class delete_product_window extends confirm_action {
  5. #target;
  6. constructor(target) {
  7. super();
  8. this.#target = target;
  9. }
  10. get _title() {
  11. return "Do you want remove it?";
  12. }
  13. get _description() {
  14. let content = "You try to remove " + this.#target.name + ". ";
  15. content += "You can not restore it, when confirm.";
  16. return content;
  17. }
  18. async _action () {
  19. new delete_request(this.#target).connect();
  20. searcher.reload();
  21. }
  22. }