delete_product_window.js 659 B

1234567891011121314151617181920212223242526272829
  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-to-remove-it");
  12. }
  13. get _description() {
  14. let content = _("you-try-to-remove-__name__").format({
  15. name: this.#target.name
  16. });
  17. return content;
  18. }
  19. async _action () {
  20. new delete_request(this.#target).connect();
  21. searcher.reload();
  22. }
  23. }