Built files from Bizgaze WebServer
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

w_estimateitem.js 3.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 EstimateItem extends Unibase.Platform.Core.BaseComponent {
  10. constructor() {
  11. super();
  12. this.estimateid = 0;
  13. }
  14. cssFiles() {
  15. return [];
  16. }
  17. jsFiles() {
  18. return ['apps/transact/managers/estimates/estimatemanager.js'];
  19. }
  20. html(id, containerid) {
  21. return "";
  22. }
  23. load(id, containerid, callback) {
  24. }
  25. deleteEstimateItem(EstimateItemId) {
  26. var instance = this;
  27. bootbox.confirm("Do you want to Delete Item ?", function (result) {
  28. if (result == true) {
  29. instance.fileCacheHelper.loadJsFile("apps/transact/managers/estimates/estimatemanager.js", function () {
  30. Bizgaze.Apps.Transact.Managers.EstimateManager.Instance().adjustEstimateItem(EstimateItemId).then(function (response) {
  31. var id = $("#hf_" + $("#hfLayout_InstalledPageId").val() + "_EstimateId").val();
  32. if (response.errors == null) {
  33. var detailInstance = Unibase.Themes.Compact.Components.Details.Instance();
  34. var panel = "#" + detailInstance._containerId;
  35. var obj = Unibase.Themes.Compact.Components.Details.Instance();
  36. obj._recordId = Unibase.Themes.Providers.DetailHelper.recordId;
  37. obj._installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  38. var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  39. detailInstance.loadAppDefaultWidget(obj, panel, detailInstance._containerId, function () {
  40. detailInstance.loadDefaultWidgets(obj._installedAppId, panel);
  41. detailInstance.LoadApprovals(obj._recordId, obj._installedAppId);
  42. });
  43. MessageHelper.Instance().showSuccess("Item Deleted Successfully", "");
  44. }
  45. else {
  46. MessageHelper.Instance().showError(response.message, "div_message");
  47. }
  48. }, function (response) {
  49. MessageHelper.Instance().showError(response.message, "div_message");
  50. });
  51. });
  52. }
  53. });
  54. }
  55. static Instance() {
  56. if (this._instance === undefined)
  57. this._instance = new EstimateItem();
  58. return this._instance;
  59. }
  60. }
  61. Components.EstimateItem = EstimateItem;
  62. })(Components = Transact.Components || (Transact.Components = {}));
  63. })(Transact = Apps.Transact || (Apps.Transact = {}));
  64. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  65. })(Bizgaze || (Bizgaze = {}));