Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

w_orderitem.js 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Transact;
  6. (function (Transact) {
  7. let Components;
  8. (function (Components) {
  9. class OrderItem extends Unibase.Platform.Core.BaseComponent {
  10. constructor() {
  11. super();
  12. }
  13. cssFiles() {
  14. return [];
  15. }
  16. jsFiles() {
  17. return ['apps/transact/managers/orders/ordermanager.js'];
  18. }
  19. html(id, containerid) {
  20. return "";
  21. }
  22. load(id, containerid, callback) {
  23. }
  24. deleteOrderItem(OrderItemId) {
  25. let instance = this;
  26. instance.fileCacheHelper.loadJsFile("apps/transact/managers/orders/ordermanager.js", function () {
  27. bootbox.confirm("Do you want to Delete Order Item ?", function (result) {
  28. if (result == true) {
  29. Bizgaze.Apps.Transact.Managers.OrderManager.Instance().deleteOrderItem(OrderItemId).then(function (response) {
  30. if (response.errors == null) {
  31. var detailInstance = Unibase.Themes.Compact.Components.Details.Instance();
  32. var panel = "#" + detailInstance._containerId;
  33. var obj = Unibase.Themes.Compact.Components.Details.Instance();
  34. obj._recordId = Unibase.Themes.Providers.DetailHelper.recordId;
  35. obj._installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  36. detailInstance.loadAppDefaultWidget(obj, panel, detailInstance._containerId, function () {
  37. detailInstance.loadDefaultWidgets(obj._installedAppId, panel);
  38. detailInstance.LoadApprovals(obj._recordId, obj._installedAppId);
  39. });
  40. MessageHelper.Instance().showSuccess("Order Item Deleted Successfully", "");
  41. }
  42. else {
  43. MessageHelper.Instance().showError(response.message, "div_message");
  44. }
  45. }, function (response) {
  46. MessageHelper.Instance().showError(response.message, "div_message");
  47. });
  48. }
  49. });
  50. });
  51. }
  52. static Instance() {
  53. if (this._instance === undefined)
  54. this._instance = new OrderItem();
  55. return this._instance;
  56. }
  57. }
  58. Components.OrderItem = OrderItem;
  59. })(Components = Transact.Components || (Transact.Components = {}));
  60. })(Transact = Apps.Transact || (Apps.Transact = {}));
  61. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  62. })(Bizgaze || (Bizgaze = {}));