1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- var Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Transact;
- (function (Transact) {
- let Components;
- (function (Components) {
- class EstimateItem extends Unibase.Platform.Core.BaseComponent {
- constructor() {
- super();
- this.estimateid = 0;
- }
- cssFiles() {
- return [];
- }
- jsFiles() {
- return ['apps/transact/managers/estimates/estimatemanager.js'];
- }
- html(id, containerid) {
- return "";
- }
- load(id, containerid, callback) {
- }
- deleteEstimateItem(EstimateItemId) {
- var instance = this;
- bootbox.confirm("Do you want to Delete Item ?", function (result) {
- if (result == true) {
- instance.fileCacheHelper.loadJsFile("apps/transact/managers/estimates/estimatemanager.js", function () {
- Bizgaze.Apps.Transact.Managers.EstimateManager.Instance().adjustEstimateItem(EstimateItemId).then(function (response) {
- var id = $("#hf_" + $("#hfLayout_InstalledPageId").val() + "_EstimateId").val();
- if (response.errors == null) {
- var detailInstance = Unibase.Themes.Compact.Components.Details.Instance();
- var panel = "#" + detailInstance._containerId;
- var obj = Unibase.Themes.Compact.Components.Details.Instance();
- obj._recordId = Unibase.Themes.Providers.DetailHelper.recordId;
- obj._installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
- var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
- detailInstance.loadAppDefaultWidget(obj, panel, detailInstance._containerId, function () {
- detailInstance.loadDefaultWidgets(obj._installedAppId, panel);
- detailInstance.LoadApprovals(obj._recordId, obj._installedAppId);
- });
- MessageHelper.Instance().showSuccess("Item Deleted Successfully", "");
- }
- else {
- MessageHelper.Instance().showError(response.message, "div_message");
- }
- }, function (response) {
- MessageHelper.Instance().showError(response.message, "div_message");
- });
- });
- }
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new EstimateItem();
- return this._instance;
- }
- }
- Components.EstimateItem = EstimateItem;
- })(Components = Transact.Components || (Transact.Components = {}));
- })(Transact = Apps.Transact || (Apps.Transact = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|