change
This commit is contained in:
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1920,6 +1920,7 @@ var Bizgaze;
|
||||
$(".btn_Save_Form").addClass("hidden");
|
||||
$(".section_PriceDetails").addClass('hidden');
|
||||
$(".OrgContactNameLink").removeClass('hidden');
|
||||
$(".section_ContactName").removeClass('hidden');
|
||||
$(".section_OrderDetails").addClass("hidden");
|
||||
$(".section_Items").removeClass('hidden');
|
||||
if ($(".section_CartDetails").hasClass('hidden')) {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -5431,7 +5431,7 @@ var Bizgaze;
|
||||
loadControl(containerid, prop) {
|
||||
var instance = this;
|
||||
instance.transactionId = prop.FormPropertyId;
|
||||
var html = '<div class="col-sm-12 transactonList_div transactonList_div_TRN' + instance.transactionId + ' p-0"><div class="transactonList_item transactonList_item_TRN' + instance.transactionId + '" name="' + instance.transactionId + '"><div id="dueControl_transactonListDiv" class="col-sm-12 transactonList_div transactonList_div_TRN2 p-0"><div class="row rowDues" id="dueControlList"><input type="hidden" id="hf_TotalDiscountAmount" value=""/><input type="hidden" id="hf_DiscountAccountId" value="0"/><input type="hidden" id="hf_PenalityAccountId" value="0"/><input type="hidden" id="hf_TDSAccountId" value="0"/><input type="hidden" id="hf_DiscountAccountName" value=""/><input type="hidden" id="hf_PenalityAccountName" value=""/><input type="hidden" id="hf_TDSAccountName" value=""/><div class="col-sm-3 mt-20 text-ul"><u><a href="javascript:;" class="h6" onclick="Bizgaze.Apps.Transact.Controls.Dues.Instance().toggleDues(\'TRN' + instance.transactionId + '\');" style="color:#5ba8fb;">Dues : <span class="txtDuesTotalAmt">0.00</span></a></u></div>' +
|
||||
var html = '<div class="col-sm-12 transactonList_div transactonList_div_TRN' + instance.transactionId + ' p-0"><div class="transactonList_item transactonList_item_TRN' + instance.transactionId + '" name="' + instance.transactionId + '"><div id="dueControl_transactonListDiv" class="col-sm-12 transactonList_div transactonList_div_TRN2 p-0"><div class="row rowDues" id="dueControlList"><input type="hidden" id="hf_TotalDiscountAmount" value=""/><input type="hidden" id="hf_DiscountAccountId" value="0"/><input type="hidden" id="hf_PenalityAccountId" value="0"/><input type="hidden" id="hf_TDSAccountId" value="0"/><input type="hidden" id="hf_DiscountAccountName" value=""/><input type="hidden" id="hf_conversionrate" value=""/><input type="hidden" id="hf_currencyid" value=""/><input type="hidden" id="hf_PenalityAccountName" value=""/><input type="hidden" id="hf_TDSAccountName" value=""/><div class="col-sm-3 mt-20 text-ul"><u><a href="javascript:;" class="h6" onclick="Bizgaze.Apps.Transact.Controls.Dues.Instance().toggleDues(\'TRN' + instance.transactionId + '\');" style="color:#5ba8fb;">Dues : <span class="txtDuesTotalAmt">0.00</span></a></u></div>' +
|
||||
'<div class="col-sm-3"></div><div class="d-none d-sm-block col-sm-3 text-right m-r-n"><div class="mt-10"><a href="javascript:;" name="disabled" class="btn btn-sm btn-success" onclick="Bizgaze.Apps.Transact.Controls.Dues.Instance().AutoAdjustDues(\'TRN' + instance.transactionId + '\');" id="btnAutoAdjustDues">Auto Adjust</a></div></div><div class="block d-sm-none col-sm-2 m-r-n"><div class="mt-10"><a href="javascript:;" name="disabled" class="btn btn-sm btn-success" onclick="Bizgaze.Apps.Transact.Controls.Dues.Instance().AutoAdjustDues(\'TRN' + instance.transactionId + '\');" id="btnAutoAdjustDues">Auto Adjust</a></div></div><div class="col-sm-3"><div class="floating-label-form-group m-t-md"><input data-trnid="TRN' + instance.transactionId + '" class="form-control txtTotalDueAdjusted txtTotalDueAdjusted_TRN' + instance.transactionId + ' floating-label-control m-b-n" type="text" style="cursor: not-allowed;" disabled="disabled"/></div></div></div>' +
|
||||
'<input type="hidden" id="hdn_duecontrol" class="value-control" value="Bizgaze.Apps.Transact.Controls.Dues.Instance().dueControlObj(\'TRN' + instance.transactionId + '\');"/>' +
|
||||
'<section class="mt-5 secDues secDues_TRN' + instance.transactionId + ' hidden"><div class="list-group divDue_List"></div></section>';
|
||||
@@ -5537,6 +5537,10 @@ var Bizgaze;
|
||||
dBalance = Number(item.JournalAlloc.TotalAmount - item.JournalAlloc.AdjustedAmount);
|
||||
instance.damount = dBalance;
|
||||
tBalance = Number(item.JournalAlloc.TotalAmount);
|
||||
var conversionRate = item.ConversionRate;
|
||||
$("#hf_conversionrate").val(conversionRate);
|
||||
var currencyId = item.CurrencyId;
|
||||
$("#hf_currencyid").val(currencyId);
|
||||
var date = $(".date_journaldate").val().toString();
|
||||
var NumOfDays = 0;
|
||||
if (paymentid == 0) {
|
||||
@@ -5687,6 +5691,8 @@ var Bizgaze;
|
||||
var html = '<div class="list-group-item divDue_Item" id="divDue_List_item_' + journalAlloc.JournalId + '"><div class="row">' +
|
||||
'<input type="hidden" class="hf_JournalAllocId" value="' + journalAlloc.JournalAllocId + '" />' +
|
||||
'<input type="hidden" class="hf_RefAllocId" value="' + journalAlloc.RefAllocId + '" />' +
|
||||
'<input type="hidden" class="hf_conversionrate" value="' + item.ConversionRate + '" />' +
|
||||
'<input type="hidden" class="hf_currencyid" value="' + item.CurrencyId + '" />' +
|
||||
'<div class="col-sm-3"><div class="floating-label-form-group m-b floating-label-form-group-with-value" style="border:0px"><span class="h6">' + journalAlloc.JournalNo + ' (' + Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(tBalance, 2) + ')</span><br/><input class="form-control value-control text-dark" disabled type="text" value="' + Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(journalAlloc.JournalDate, null) + ' (' + NumOfDays + ' days)"></div></div>' +
|
||||
'<div class="col-sm-2"><div class="floating-label-form-group m-b floating-label-form-group-with-value" style="border:0px"><span class="h6">Balance</span><input class="hfOrgDueAmount" type="hidden" value="' + Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(dBalance - discAmount - item.TDSAmount, 2) + '"><input class="hfDueAmount" type="hidden" value="' + Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(dBalance - discAmount - item.TDSAmount, 2) + '"><input id="lblDueBalance_' + journalAlloc.JournalId + '" class="form-control value-control lblDueBalance text-dark" disabled type="text" value="' + Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(dBalance - discAmount - Amount - item.TDSAmount, 2) + '" placeholder="Balance" data-label="Balance"></div></div>' +
|
||||
'<div class="col-sm-2"><div class="floating-label-form-group m-b floating-label-form-group-with-value"><span class="h6">Discount</span><br /><input class="hfDiscountAmount" type="hidden" value="' + Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(discAmount, 2) + '" /><input class="form-control value-control floating-label-control txtDiscountAmount" type="text" value="' + Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(discAmount, 2) + '" id="txtDiscountAmount_' + journalAlloc.JournalId + '" class="form-control value-control floating-label-control txtCurrentAmount" placeholder="Discount Amount" data-label="Discount Amount" onclick="this.select()" onkeypress="return Bizgaze.Apps.Transact.Controls.Dues.Instance().isSignDecimalplusNoLongPress(event,this.id)" onkeyup="Bizgaze.Apps.Transact.Controls.Dues.Instance().discountValidation(event,this.id,\'' + journalAlloc.JournalId + '\',\'' + "TRN" + formPropId + '\')" /></div></div>' +
|
||||
@@ -6048,6 +6054,8 @@ var Bizgaze;
|
||||
}
|
||||
if (isDueObj) {
|
||||
var jAId = Number($(this).find('.hf_JournalAllocId').val());
|
||||
var conversionRate = Number($(this).find('.hf_conversionrate').val());
|
||||
var currencyId = Number($(this).find('.hf_currencyid').val());
|
||||
var journalTypeId = 2;
|
||||
var discountAmount = Number($(this).find('.txtDiscountAmount').val());
|
||||
var tdsAmount = Number($(this).find('.txtTdsAmount').val());
|
||||
@@ -6060,6 +6068,8 @@ var Bizgaze;
|
||||
AllocTypeId: 2,
|
||||
Discount: discountAmount,
|
||||
TDSAmount: tdsAmount,
|
||||
ConversionRate: conversionRate,
|
||||
CurrencyId: currencyId,
|
||||
});
|
||||
}
|
||||
else if (journalTypeId == 2) {
|
||||
@@ -6077,6 +6087,22 @@ var Bizgaze;
|
||||
});
|
||||
return data;
|
||||
}
|
||||
checkConversionnRateByOrganization(curContactId) {
|
||||
Bizgaze.Apps.Transact.Managers.PaymentManager.Instance().CheckConversionRateByOrganization(curContactId).then(function (response) {
|
||||
if (response.result != null) {
|
||||
$(".divCustomProperties_conversionrate").removeClass("hidden");
|
||||
$(".number_conversionrate").addClass("required");
|
||||
$("#div_ForeignExchange").removeClass("hidden");
|
||||
$("#txtAutoComplete_ForeignExchangeAccount").addClass("required");
|
||||
}
|
||||
else {
|
||||
$(".divCustomProperties_conversionrate").addClass("hidden");
|
||||
$(".number_conversionrate").removeClass("required");
|
||||
$("#div_ForeignExchange").addClass("hidden");
|
||||
$("#txtAutoComplete_ForeignExchangeAccount").removeClass("required");
|
||||
}
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
if (this.instance === undefined) {
|
||||
this.instance = new Dues();
|
||||
@@ -6125,6 +6151,10 @@ var Bizgaze;
|
||||
'<label for="lbl" id="lbl_Penality">Penality Account<span class="text-danger" id="spnlbl_Penality"> *</span></label>' +
|
||||
'<div class="input-group"><select id="txtAutoComplete_PenalityAccount" class="txtAutoComplete_PenalityAccount hidden form-control text-control select2-hidden-accessible" style="width:100%;" placeholder="Select Penality Account"></select><input type="hidden" id="hfAutoComplete_PenalityAccount" value="" class="hfAutoComplete_PenalityAccount form-control"/></div>' +
|
||||
'</div>' +
|
||||
'<div id="div_ForeignExchange" class="col-sm-12 form-group floating-label-form-group floating-label-form-group-with-value border-0 pb-10">' +
|
||||
'<label for="lbl" id="lbl_ForeignExchange">Foreign Exchange Account<span class="text-danger" id="spnlbl_ForeignExchange"> *</span></label>' +
|
||||
'<div class="input-group"><select id="txtAutoComplete_ForeignExchangeAccount" class="txtAutoComplete_ForeignExchangeAccount form-control text-control select2-hidden-accessible" style="width:100%;" placeholder="Select Foreign Exchange Account"></select><input type="hidden" id="hfAutoComplete_ForeignExchangeAccount" value="" class="hfAutoComplete_ForeignExchangeAccount form-control"/></div>' +
|
||||
'</div>' +
|
||||
'<div id="div_TDS" class="hidden col-sm-12 form-group floating-label-form-group floating-label-form-group-with-value border-0 pb-10">' +
|
||||
'<label for="lbl" id="lbl_TDS">TDS Account<span class="text-danger" id="spnlbl_TDS"> *</span></label>' +
|
||||
'<div class="input-group"><select id="txtAutoComplete_TDSAccount" class="txtAutoComplete_TDSAccount hidden form-control text-control select2-hidden-accessible" style="width:100%;" placeholder="Select TDS Account"></select><input type="hidden" id="hfAutoComplete_TDSAccount" value="" class="hfAutoComplete_TDSAccount form-control"/></div>' +
|
||||
@@ -6495,11 +6525,15 @@ var Bizgaze;
|
||||
loadAccounts() {
|
||||
var instance = this;
|
||||
var discount = 'Discount Account';
|
||||
var foreignExchnage = 'Foreign Exchange';
|
||||
var paymentTypeId = Number($(".hdn_paymenttypeid").val());
|
||||
var url = _appsettings.server_url() + '/apis/v4/bizgaze/transact/ledgers/ledgerautocomplete';
|
||||
var url1 = _appsettings.server_url() + '/apis/v4/bizgaze/transact/ledgers/receiptledgerautocomplete/discount/' + discount + '/paymenttypeid/' + paymentTypeId;
|
||||
var url2 = _appsettings.server_url() + '/apis/v4/bizgaze/transact/ledgers/receiptledgerautocomplete/discount/' + foreignExchnage + '/paymenttypeid/' + paymentTypeId;
|
||||
AutoCompleteHelper.getHelper().Create("#txtAutoComplete_DiscountAccount", "#hfAutoComplete_DiscountAccount", url1, function (response) {
|
||||
});
|
||||
AutoCompleteHelper.getHelper().Create("#txtAutoComplete_ForeignExchangeAccount", "#hfAutoComplete_ForeignExchangeAccount", url2, function (response) {
|
||||
});
|
||||
AutoCompleteHelper.getHelper().Create("#txtAutoComplete_PenalityAccount", "#hfAutoComplete_PenalityAccount", url, null);
|
||||
AutoCompleteHelper.getHelper().Create("#txtAutoComplete_TDSAccount", "#hfAutoComplete_TDSAccount", url, null);
|
||||
$("#txtAutoComplete_DiscountAccount").on('select2:select', function (e) {
|
||||
@@ -6591,6 +6625,10 @@ var Bizgaze;
|
||||
var selectedTDSAcc = new Option(accountsObj.TDSAccountName, accountsObj.TDSAccountId, true);
|
||||
$("#txtAutoComplete_TDSAccount").append(selectedTDSAcc);
|
||||
}
|
||||
if (accountsObj.ForeignExchangeAccountName != null && accountsObj.ForeignExchangeAccountName != "" && accountsObj.ForeignExchangeAccountName != undefined) {
|
||||
var selectedForeignExchangeAcc = new Option(accountsObj.ForeignExchangeAccountName, accountsObj.ForeignExchangeAccountId, true);
|
||||
$("#txtAutoComplete_ForeignExchangeAccount").append(selectedForeignExchangeAcc);
|
||||
}
|
||||
}
|
||||
showOrHideAccounts(discount, penality, tds) {
|
||||
if (discount == 0) {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1124,19 +1124,16 @@ var Unibase;
|
||||
MessageHelper.Instance().showError("Please select sub report columns ", "sub_report_error_message");
|
||||
return true;
|
||||
}
|
||||
if (isChart && subreportdata.Filters == '[]') {
|
||||
this._reportBuilder.linkReportId = subreportdata.ChildReportId;
|
||||
}
|
||||
if (subReportArray.length != 0 && typeof (subReportArray) == 'object') {
|
||||
var Index;
|
||||
if (instance.linkreport_aliasname)
|
||||
Index = subReportArray.findIndex(s => s.AliasName == instance.linkreport_aliasname);
|
||||
else
|
||||
Index = subReportArray.findIndex(s => s.RowClick == true);
|
||||
if (Index > -1 && subreportdata.Filters != "[]" && subreportdata.ChildReportId) {
|
||||
if (Index > -1 && subreportdata.ChildReportId) {
|
||||
subReportArray[Index] = subreportdata;
|
||||
}
|
||||
else if (subreportdata.Filters != "[]" && subreportdata.ChildReportId) {
|
||||
else if (subreportdata.ChildReportId) {
|
||||
subReportArray.push(subreportdata);
|
||||
}
|
||||
}
|
||||
@@ -1144,7 +1141,7 @@ var Unibase;
|
||||
if (subreportdata.ChildReportId)
|
||||
subReportArray.push(subreportdata);
|
||||
}
|
||||
instance._reportBuilder.subreporttabledata = subReportArray;
|
||||
instance._reportBuilder.subreportdata = subReportArray;
|
||||
return false;
|
||||
}
|
||||
saveSubReport_DetailFields() {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -3802,9 +3802,7 @@ var Unibase;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (filters.length) {
|
||||
this.linkReport(subReport.ChildReportId, filters, this.chartContainerId + "_viewall");
|
||||
}
|
||||
this.linkReport(subReport.ChildReportId, filters, this.chartContainerId + "_viewall");
|
||||
}
|
||||
else {
|
||||
if (rv_instance.reportResponse.result.ReportJsonData && rv_instance.reportResponse.result.ReportJsonData.Result.Data) {
|
||||
@@ -4447,6 +4445,7 @@ var Unibase;
|
||||
if (reportId != 0) {
|
||||
var rv_obj = Unibase.Platform.Analytics.Components.ReportViewer.Instance();
|
||||
rv_obj.dynamicFilters = dynamicFilters;
|
||||
rv_obj.isTable = true;
|
||||
let reportViewerInstance = Unibase.Platform.Helpers.NavigationHelper.reportViewerInstance;
|
||||
reportViewerInstance.push({
|
||||
instance: rv_obj,
|
||||
@@ -7103,7 +7102,7 @@ var Unibase;
|
||||
<div class="dropdown-menu dropdown-menu-left ViewerTypes_dropdown" id="dp_${containerid}_viewertypes"><a class="dropdown-item ddbtn_Edit" href = "javascript:;" title = "Edit" id = "edit_" onclick = "Unibase.Platform.Analytics.Components.ReportViewer.Instance().EditReport(${reportid},0,0,0,'${containerid}');">Edit</a>
|
||||
<a href="javascript:;" class="dropdown-item" id="DuplicateTable_${containerid}" onclick = "Unibase.Platform.Analytics.Components.ReportViewer.Instance().EditReport(${reportid},1,0,0,'${containerid}')";>Duplicate</a>
|
||||
</div>` : ''}<span class="dropdown pull-right mr-30 sp_widget_create_${containerid}" style = "position:static"></span></div>
|
||||
<div class="card-header-right d-flex align-items-center"><a class="btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover w-30p h-30p mr-1 chart-maximize-btn" href="javascript:;" id="chartMaximizeBtn_${containerid}" onclick="Unibase.Platform.Analytics.Components.ReportViewer.Instance().report_ViewAll(${reportid}, 0, 'fullscreen_${containerid}','${containerid}');" data-tooltip="true" title="Maximize Chart"><span class="btn-icon-wrap"><i class="las la-expand font-18"></i></span></a><a class="btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover w-30p h-30p mr-1 chart-minimize-btn d-none" href="javascript:;" id="chartMinimizeBtn_${containerid}" onclick="Unibase.Platform.Analytics.Components.ReportViewer.Instance().closeReportPopup('${containerid}');" data-tooltip="true" title="Minimize Chart"><span class="btn-icon-wrap"><i class="las la-compress font-18"></i></span></a><a class="btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover w-30p h-30p mr-1 d-none link-report-icon" id="linkreport${containerid}" href="javascript:;"><span class="btn-icon-wrap"><i class="las la-table font-18"></i></span></a><div class="filter-dp-wrapper biz-dropdown ${isRestrictHidden} d-none" id="filterDpWrap_${containerid}">
|
||||
<div class="card-header-right d-flex align-items-center"><a class="btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover w-30p h-30p mr-1 chart-maximize-btn" href="javascript:;" id="chartMaximizeBtn_${containerid}" onclick="Unibase.Platform.Analytics.Components.ReportViewer.Instance().report_ViewAll(${reportid}, 0, 'fullscreen_${containerid}','${containerid}');" data-tooltip="true" title="Maximize Chart"><span class="btn-icon-wrap"><i class="las la-expand font-18"></i></span></a><a class="btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover w-30p h-30p mr-1 chart-minimize-btn d-none" href="javascript:;" id="chartMinimizeBtn_${containerid}" onclick="Unibase.Platform.Analytics.Components.ReportViewer.Instance().closeReportPopup('${containerid}');" data-tooltip="true" title="Minimize Chart"><span class="btn-icon-wrap"><i class="las la-compress font-18"></i></span></a><a class="btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover w-30p h-30p mr-1 link-report-icon" id="linkreport${containerid}" href="javascript:;"><span class="btn-icon-wrap"><i class="las la-table font-18"></i></span></a><div class="filter-dp-wrapper biz-dropdown ${isRestrictHidden} d-none" id="filterDpWrap_${containerid}">
|
||||
<a href="javascript:;" class="filter-icon btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover w-30p h-30p" id="filter-icon${containerid}"
|
||||
onclick="Unibase.Platform.Analytics.Components.ReportViewer.Instance().loadDynamicFilters(${reportid},'${containerid}','.BindData_${containerid}')" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-tooltip="true" title="Dynamic Filters"><span class="btn-icon-wrap"><i class="las la-filter font-18"></i></span></a>
|
||||
<div class="dropdown-menu biz-custom-dropdown biz-filter-dropdown"
|
||||
@@ -7266,8 +7265,6 @@ var Unibase;
|
||||
}
|
||||
}
|
||||
instance.chart_dataSet();
|
||||
if (reportInfo.LinkReportId != 0)
|
||||
$(`#linkreport${containerid}`).removeClass("d-none");
|
||||
$(`#linkreport${containerid}`).click(function () {
|
||||
let widgetId = Number($(this).closest(".dashboardwidget-addeditem").find("#hf_widgetId").val());
|
||||
var commonFilters = Unibase.Platform.Analytics.Components._CommonFilter.Instance().appliedFilters;
|
||||
@@ -7283,8 +7280,7 @@ var Unibase;
|
||||
if (dynamicfilters && dynamicfilters.length) {
|
||||
filters = dynamicfilters;
|
||||
}
|
||||
(reportInfo.LinkReportId == reportInfo.ReportId) && (reportInfo.LinkReportId = 0);
|
||||
instance.linkReport(reportInfo.LinkReportId, filters, "div_linkreport" + containerid.substr(containerid.lastIndexOf("_")) + "_viewall");
|
||||
instance.linkReport(reportInfo.ReportId, filters, "div_linkreport" + containerid.substr(containerid.lastIndexOf("_")) + "_viewall");
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -7478,6 +7474,7 @@ var Unibase;
|
||||
this.isSubReport = false;
|
||||
this.isCategoriesReport = false;
|
||||
this.isCategoryViewer = false;
|
||||
this.isTable = false;
|
||||
this.desktopMode = Unibase.Themes.Compact.Components.Index.Instance().desktopMode;
|
||||
this.tabMode = Unibase.Themes.Compact.Components.Index.Instance().tabMode;
|
||||
this.layoutIndex = Unibase.Themes.Compact.Components.Index.Instance().layoutIndex;
|
||||
@@ -8143,7 +8140,7 @@ ${instance.getViewAllHtml(containerid, 'desktop', reportid)}
|
||||
parentcontainerid: "_" + instance.parentContainerId
|
||||
});
|
||||
}
|
||||
if (reportInfo.ReportTypeId == Unibase.Platform.Analytics.Reports.Enums.ReportType.Table) {
|
||||
if (reportInfo.ReportTypeId == Unibase.Platform.Analytics.Reports.Enums.ReportType.Table || rv_instance.isTable) {
|
||||
instance.ReportId = reportid;
|
||||
let name = reportInfo.DisplayName || reportInfo.ReportName;
|
||||
if (reportwidgetdata != null && reportwidgetdata != 0 && containerid.indexOf("_previewreport_") == -1) {
|
||||
@@ -11727,6 +11724,28 @@ var Unibase;
|
||||
});
|
||||
});
|
||||
}
|
||||
appUniqueId(uniqueid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/platform/apps/getappuniqueid/appuniqueid/' + uniqueid;
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
if (response.result != null && response.result != "") {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
getUniqueId(uniqueid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/platform/apps/getuniqueid/uniqueid/' + uniqueid;
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
if (response.result != null && response.result != "") {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
getDocumentFileId(documentid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/unibase/platform/apps/getdocumentfileid/id/' + documentid;
|
||||
@@ -12084,6 +12103,17 @@ var Unibase;
|
||||
});
|
||||
});
|
||||
}
|
||||
saveLatestVersionFromC02(obj) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var url = "apis/v4/unibase/platform/apps/upgradeversionsave";
|
||||
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
upgradeApp(installedappid, versionno) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var url = "apis/v4/unibase/platform/apps/upgradeappversion/installedappid/" + installedappid + "/versionno/" + versionno;
|
||||
@@ -13129,6 +13159,7 @@ var Unibase;
|
||||
this.pinDynamicFilters = false;
|
||||
this.showDynamicFilters = false;
|
||||
this.legendTypeId = 0;
|
||||
this.isCharttoTable = false;
|
||||
}
|
||||
cssFiles() {
|
||||
var cssfiles = ['platform/analytics/components/reportbuilder/style.reportbuilder.css'];
|
||||
@@ -14367,7 +14398,7 @@ var Unibase;
|
||||
instance.tabulatorColumns.push({ title: "LastColumn", field: "LastColumn", visible: false, headerSort: instance.HeaderSort });
|
||||
instance.table.options.dataTree = false;
|
||||
instance.table.setColumns(instance.tabulatorColumns);
|
||||
if (instance.reportid != 0) {
|
||||
if (instance.reportid != 0 && !instance.isCharttoTable) {
|
||||
instance.getSubReports(instance.reportid);
|
||||
}
|
||||
if (instance.dataTreeRowExpandedColumn.length == 0) {
|
||||
@@ -15663,6 +15694,7 @@ var Unibase;
|
||||
$("#dataset_base_value").val(instance._chartBuilder.chartBaseValue);
|
||||
}
|
||||
else {
|
||||
instance.isCharttoTable = true;
|
||||
if ($("#DataListsDiv").hasClass("hidden")) {
|
||||
$("#Categories").removeClass("hidden");
|
||||
}
|
||||
@@ -16115,106 +16147,118 @@ var Unibase;
|
||||
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
|
||||
}
|
||||
let uniqueId = instance.res && instance.res.UniqueId ? instance.res.UniqueId : "Bizgaze_Platform_Analytics_Reports_" + ReportName.replace(/\s/g, '');
|
||||
let model = new Unibase.Platform.Analytics.Requests.Report();
|
||||
model.SearchColumns = SearchCols;
|
||||
model.SubReports = instance.subreportdata;
|
||||
model.DependencyApps = dependencyapps.join('|');
|
||||
model.DynamicFilters = instance.dynamicFilters;
|
||||
model.ReportId = Number($("#txt_reportid").val());
|
||||
model.ReportName = String($("#txt_reportname").val());
|
||||
model.DisplayName = String($("#txt_displayname").val());
|
||||
model.ReportTypeId = instance.reportType;
|
||||
model.DataListId = instance.DataListId;
|
||||
model.Description = '';
|
||||
model.ReportGroupId = Number($("#RptGroup_AutoComplete").val());
|
||||
model.ReportColumns = instance.ReportColumns;
|
||||
model.ChartColumns = instance.ChartColumns;
|
||||
model.RoleSettings = instance.roleSettings;
|
||||
model.EditFilters = null;
|
||||
model.StaticFilter = instance.queryBuilderJson;
|
||||
model.SortColumns = JSON.stringify(SortArry);
|
||||
model.TopRecords = Number($("#txt_totalrecords").val());
|
||||
model.Parameters = String($("#txt_dynamicparameters").val()).trim();
|
||||
model.ChartTypeId = instance._chartBuilder.ChartTypeId;
|
||||
model.DateColumn = String($("#DateColumnDropDown").val());
|
||||
model.UniqueId = uniqueId;
|
||||
model.ViewerId = instance.ViewerId;
|
||||
model.ViewerTypeId = instance.ViewerTypeId;
|
||||
model.OnClick = String($("#txt_onclick").val());
|
||||
model.InstalledAppId = isNaN(Number($("#InstalledApp_AutoComplete option:selected").val())) == true ? 0 : Number($("#InstalledApp_AutoComplete option:selected").val());
|
||||
model.IsNotification = instance.IsNotification;
|
||||
model.TableTypeId = Number($("#tableTypeSelect").val());
|
||||
model.DisplayName = String($("#txt_displayname").val());
|
||||
model.IsLegend = instance._chartBuilder.displayLegend;
|
||||
model.LegendTypeId = isNaN(Number($("#legend-select").val())) == true ? 0 : Number($("#legend-select").val());
|
||||
model.IsInternalReport = instance.IsInternalReport;
|
||||
model.IsPivotTree = instance.IsPivotTree;
|
||||
model.PivotValue = (instance.pivot.PivotValue_Selected) ? Number(instance.pivot.PivotValue_Selected) : 0;
|
||||
model.IsEnableCount = instance.enableCount;
|
||||
model.IsEnableGlobalDatepicker = instance.enableGlobalDatepicker;
|
||||
model.PaletteId = instance.paletteId;
|
||||
model.ColorAppliedTypeId = instance._chartBuilder.colorAppliedOn;
|
||||
model.PivotTypeId = instance._pivot.pivotTypeId;
|
||||
model.TimeInterval = instance.Interval;
|
||||
model.ConnectedApps = connectedApps;
|
||||
model.LinkReportId = instance.linkReportId;
|
||||
model.IsTreeExpand = instance._pivot.isDataTreeExpand;
|
||||
model.ReportIndex = 0;
|
||||
model.ViewAll = instance.viewAll;
|
||||
model.ConnectedReports = connectedReports;
|
||||
model.LegendTitleTypeId = instance._chartBuilder.legendTitleTypeId;
|
||||
model.ChartBaseValue = baseValue === undefined ? 0 : Number(baseValue);
|
||||
model.FromDate = fromDate;
|
||||
model.ToDate = toDate;
|
||||
model.EnablePivotTableConfig = instance.enablePivotTableConfig;
|
||||
model.Js = String($("#txt_js").val());
|
||||
model.PinDynamicFilters = $('#pindynamicfilters_checkbox').is(":checked");
|
||||
model.IsDataLabel = $("#isdatalabel").prop("checked");
|
||||
model.IsTooltipHeader = $("#showtooltipheader_checkbox").prop("checked");
|
||||
model.ShowDataListColsOnDynFil = instance.showDynamicFilters;
|
||||
model.TickLabelLength = instance._chartBuilder.tickLabelLength;
|
||||
instance.reportManager.saveReport(model).then(function (response) {
|
||||
if (instance.reportType == Unibase.Platform.Analytics.Reports.Enums.ReportType.Table && instance.isCharttoTable) {
|
||||
instance.navigationHelper.hideLoading();
|
||||
if (response.status == Unibase.Data.Status.Error) {
|
||||
MessageHelper.Instance().showError(response.message, 'divReport_ErrorMessage');
|
||||
$('#save_as_modal #divReport_ErrorMessage #Bizgaze-messageInfo').addClass('btn mx-4 my-3');
|
||||
$('#save_as_modal #divReport_ErrorMessage #Bizgaze-messageInfo').css('border-radius', '.25rem');
|
||||
}
|
||||
else {
|
||||
MessageHelper.Instance().showSuccess(response.message, '');
|
||||
$('#' + containerid).modal('hide');
|
||||
$('#' + containerid).remove();
|
||||
instance._chartBuilder.clearSelectedChartFields();
|
||||
instance.clearSelectedTableFields();
|
||||
instance.querybuilderCheckboxes = [];
|
||||
var res = JSON.parse(response.result);
|
||||
if (reportid != 0 && !instance.isReportWidget) {
|
||||
const lastContainerId = instance.lastContainerId;
|
||||
$(`#${lastContainerId}`).modal("hide");
|
||||
$(`#${lastContainerId}`).remove();
|
||||
if (lastContainerId.includes('_viewall') || lastContainerId.includes('_ViewAllByUniqueId_') || lastContainerId.includes('fullscreen') || lastContainerId.includes('_linkedreport_')) {
|
||||
Unibase.Platform.Helpers.NavigationHelper.reportViewerInstance = Unibase.Platform.Helpers.NavigationHelper.reportViewerInstance.filter(instance => instance.childcontainerid !== lastContainerId);
|
||||
instance._reportViewer.report_ViewAll(reportid, 0, lastContainerId, null);
|
||||
if (lastContainerId.includes('fullscreen') && lastContainerId.includes('div_dashboardportletwidget')) {
|
||||
const widgetContainerId = lastContainerId.replace('fullscreen_', '');
|
||||
instance.reloadDashboardPortletWidget(widgetContainerId);
|
||||
bootbox.confirm("Do you want to switch Chart to Table ?", function (result) {
|
||||
if (result) {
|
||||
instance.navigationHelper.showLoading();
|
||||
instance.isCharttoTable = false;
|
||||
instance.saveReport(containerid, reportid);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
let model = new Unibase.Platform.Analytics.Requests.Report();
|
||||
model.SearchColumns = SearchCols;
|
||||
model.SubReports = instance.subreportdata;
|
||||
model.DependencyApps = dependencyapps.join('|');
|
||||
model.DynamicFilters = instance.dynamicFilters;
|
||||
model.ReportId = Number($("#txt_reportid").val());
|
||||
model.ReportName = String($("#txt_reportname").val());
|
||||
model.DisplayName = String($("#txt_displayname").val());
|
||||
model.ReportTypeId = instance.reportType;
|
||||
model.DataListId = instance.DataListId;
|
||||
model.Description = '';
|
||||
model.ReportGroupId = Number($("#RptGroup_AutoComplete").val());
|
||||
model.ReportColumns = instance.ReportColumns;
|
||||
model.ChartColumns = instance.ChartColumns;
|
||||
model.RoleSettings = instance.roleSettings;
|
||||
model.EditFilters = null;
|
||||
model.StaticFilter = instance.queryBuilderJson;
|
||||
model.SortColumns = JSON.stringify(SortArry);
|
||||
model.TopRecords = Number($("#txt_totalrecords").val());
|
||||
model.Parameters = String($("#txt_dynamicparameters").val()).trim();
|
||||
model.ChartTypeId = instance._chartBuilder.ChartTypeId;
|
||||
model.DateColumn = String($("#DateColumnDropDown").val());
|
||||
model.UniqueId = uniqueId;
|
||||
model.ViewerId = instance.ViewerId;
|
||||
model.ViewerTypeId = instance.ViewerTypeId;
|
||||
model.OnClick = String($("#txt_onclick").val());
|
||||
model.InstalledAppId = isNaN(Number($("#InstalledApp_AutoComplete option:selected").val())) == true ? 0 : Number($("#InstalledApp_AutoComplete option:selected").val());
|
||||
model.IsNotification = instance.IsNotification;
|
||||
model.TableTypeId = Number($("#tableTypeSelect").val());
|
||||
model.DisplayName = String($("#txt_displayname").val());
|
||||
model.IsLegend = instance._chartBuilder.displayLegend;
|
||||
model.LegendTypeId = isNaN(Number($("#legend-select").val())) == true ? 0 : Number($("#legend-select").val());
|
||||
model.IsInternalReport = instance.IsInternalReport;
|
||||
model.IsPivotTree = instance.IsPivotTree;
|
||||
model.PivotValue = (instance.pivot.PivotValue_Selected) ? Number(instance.pivot.PivotValue_Selected) : 0;
|
||||
model.IsEnableCount = instance.enableCount;
|
||||
model.IsEnableGlobalDatepicker = instance.enableGlobalDatepicker;
|
||||
model.PaletteId = instance.paletteId;
|
||||
model.ColorAppliedTypeId = instance._chartBuilder.colorAppliedOn;
|
||||
model.PivotTypeId = instance._pivot.pivotTypeId;
|
||||
model.TimeInterval = instance.Interval;
|
||||
model.ConnectedApps = connectedApps;
|
||||
model.LinkReportId = instance.linkReportId;
|
||||
model.IsTreeExpand = instance._pivot.isDataTreeExpand;
|
||||
model.ReportIndex = 0;
|
||||
model.ViewAll = instance.viewAll;
|
||||
model.ConnectedReports = connectedReports;
|
||||
model.LegendTitleTypeId = instance._chartBuilder.legendTitleTypeId;
|
||||
model.ChartBaseValue = baseValue === undefined ? 0 : Number(baseValue);
|
||||
model.FromDate = fromDate;
|
||||
model.ToDate = toDate;
|
||||
model.EnablePivotTableConfig = instance.enablePivotTableConfig;
|
||||
model.Js = String($("#txt_js").val());
|
||||
model.PinDynamicFilters = $('#pindynamicfilters_checkbox').is(":checked");
|
||||
model.IsDataLabel = $("#isdatalabel").prop("checked");
|
||||
model.IsTooltipHeader = $("#showtooltipheader_checkbox").prop("checked");
|
||||
model.ShowDataListColsOnDynFil = instance.showDynamicFilters;
|
||||
model.TickLabelLength = instance._chartBuilder.tickLabelLength;
|
||||
instance.reportManager.saveReport(model).then(function (response) {
|
||||
instance.navigationHelper.hideLoading();
|
||||
if (response.status == Unibase.Data.Status.Error) {
|
||||
MessageHelper.Instance().showError(response.message, 'divReport_ErrorMessage');
|
||||
$('#save_as_modal #divReport_ErrorMessage #Bizgaze-messageInfo').addClass('btn mx-4 my-3');
|
||||
$('#save_as_modal #divReport_ErrorMessage #Bizgaze-messageInfo').css('border-radius', '.25rem');
|
||||
}
|
||||
else {
|
||||
MessageHelper.Instance().showSuccess(response.message, '');
|
||||
$('#' + containerid).modal('hide');
|
||||
$('#' + containerid).remove();
|
||||
instance._chartBuilder.clearSelectedChartFields();
|
||||
instance.clearSelectedTableFields();
|
||||
instance.querybuilderCheckboxes = [];
|
||||
var res = JSON.parse(response.result);
|
||||
if (reportid != 0 && !instance.isReportWidget) {
|
||||
const lastContainerId = instance.lastContainerId;
|
||||
$(`#${lastContainerId}`).modal("hide");
|
||||
$(`#${lastContainerId}`).remove();
|
||||
if (lastContainerId.includes('_viewall') || lastContainerId.includes('_ViewAllByUniqueId_') || lastContainerId.includes('fullscreen') || lastContainerId.includes('_linkedreport_')) {
|
||||
Unibase.Platform.Helpers.NavigationHelper.reportViewerInstance = Unibase.Platform.Helpers.NavigationHelper.reportViewerInstance.filter(instance => instance.childcontainerid !== lastContainerId);
|
||||
instance._reportViewer.report_ViewAll(reportid, 0, lastContainerId, null);
|
||||
if (lastContainerId.includes('fullscreen') && lastContainerId.includes('div_dashboardportletwidget')) {
|
||||
const widgetContainerId = lastContainerId.replace('fullscreen_', '');
|
||||
instance.reloadDashboardPortletWidget(widgetContainerId);
|
||||
}
|
||||
}
|
||||
else {
|
||||
instance._reportViewer.InstalledAppId = res.InstalledAppId;
|
||||
instance.navigationHelper.popin(res.ReportId, "", instance._reportViewer, null);
|
||||
}
|
||||
}
|
||||
else {
|
||||
instance._reportViewer.InstalledAppId = res.InstalledAppId;
|
||||
instance.navigationHelper.popin(res.ReportId, "", instance._reportViewer, null);
|
||||
else if (instance.isReportWidget) {
|
||||
instance.reloadReportWidget(instance.reportWidgetType);
|
||||
if (instance.reportWidgetType == 'portlet' && instance.lastContainerId) {
|
||||
$("#" + instance.lastContainerId).modal("hide");
|
||||
$("#" + instance.lastContainerId).remove();
|
||||
instance._reportViewer.report_ViewAll(0, 0, 0, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (instance.isReportWidget) {
|
||||
instance.reloadReportWidget(instance.reportWidgetType);
|
||||
if (instance.reportWidgetType == 'portlet' && instance.lastContainerId) {
|
||||
$("#" + instance.lastContainerId).modal("hide");
|
||||
$("#" + instance.lastContainerId).remove();
|
||||
instance._reportViewer.report_ViewAll(0, 0, 0, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
reloadDashboardPortletWidget(widgetContainerId) {
|
||||
@@ -16254,6 +16298,7 @@ var Unibase;
|
||||
instance.isEdit = false;
|
||||
instance._pivot.pivotTypeId = 0;
|
||||
instance.IsInternalReport = true;
|
||||
instance.isCharttoTable = false;
|
||||
}
|
||||
defaultReportGroup() {
|
||||
var instance = this;
|
||||
|
||||
+9
-9
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user