This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
@@ -0,0 +1,350 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Components;
(function (Components) {
class Address extends Unibase.Platform.Core.BaseComponent {
constructor() {
super(...arguments);
this.oldcontactaddressid = 0;
this.contactaddressid = 0;
this.latd = 0;
this.lngd = 0;
this.isEmployeeDashboardRoute = false;
}
cssFiles() {
return [];
}
jsFiles() {
return ['apps/crm/contacts/managers/contactmanager.js', 'tenants/themes/compact/components/details/details.js'];
}
html(id, containerid) {
return "";
}
init(containerid) {
var instance = this;
}
load(id, containerid, callback) {
var instance = this;
}
changeDefaultAddress(addressid) {
var instance = this;
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid").Value);
var postdata = {
ContactAddressId: addressid,
ContactId: _recordId
};
instance.fileCacheHelper.loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().ChangeDefaultAddress(postdata).then(function (response) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
});
});
}
changeDefaultAddress_phonebook(addressid) {
var instance = this;
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_organizationid").Value);
var postdata = {
ContactAddressId: addressid,
ContactId: _recordId
};
instance.fileCacheHelper.loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().ChangeDefaultAddress(postdata).then(function (response) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
});
});
}
changeAddressStatus(addressid, status) {
var instance = this;
if (status == 2)
var msg = "Are you sure you want to De-Activate ?";
else
var msg = "Are you sure you want to Activate ?";
bootbox.confirm({
message: msg,
closeButton: false,
buttons: {
confirm: {
label: 'Yes',
className: 'btn-success'
},
cancel: {
label: 'No',
className: 'btn-danger'
}
},
callback: function (result) {
if (result) {
var Status = "";
var Statusid;
if (status == 2) {
Status = "Activate";
Statusid = 2;
$("#Id_" + addressid + "").removeClass('text-danger');
$("#Id_" + addressid + "").addClass('text-success');
}
else {
Status = "activate";
Statusid = 1;
$("#Id_" + addressid + "").removeClass('text-success');
$("#Id_" + addressid + "").addClass('text-danger');
}
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid").Value);
var postdata = {
ContactAddressId: addressid,
Status: Statusid,
ContactId: _recordId
};
instance.fileCacheHelper.loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().ChangeAddressStatus(postdata).then(function (response) {
if (response.errors == null) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
}
else {
alert("You Can't De-Active Default Address");
}
});
});
if (status == "De-activate") { }
}
else { }
}
});
}
editmap_1(contactAddressId) {
let instance = this;
Bizgaze.Apps.Crm.Components.Address.Instance().contactaddressid = contactAddressId;
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/crm/address/components/w_address.js", function () {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("platform/core/helpers/mobile/interfaces/imobilehelper.js", function () {
if (isMobileApp()) {
Unibase.Platform.Helpers.MobileHelper.Instance().grantPermission(Unibase.Platform.Helpers.Enums.MobilePermissionType.Location, Bizgaze.Apps.Crm.Components.Address.Instance().edidmap_mobile);
}
else {
Bizgaze.Apps.Crm.Components.Address.Instance().navigationHelper.popup(0, "", Bizgaze.Apps.Crm.Components.Address.Instance(), function () {
Bizgaze.Apps.Crm.Components.Address.Instance().editmap(contactAddressId);
}, Unibase.Platform.Helpers.Size.Auto);
}
});
});
}
edidmap_mobile() {
Bizgaze.Apps.Crm.Components.Address.Instance().navigationHelper.popup(0, "", Bizgaze.Apps.Crm.Components.Address.Instance(), function () {
Bizgaze.Apps.Crm.Components.Address.Instance().editmap(Bizgaze.Apps.Crm.Components.Address.Instance().contactaddressid);
}, Unibase.Platform.Helpers.Size.Auto);
}
editmap(contactAddressId) {
var instance = this;
instance.fileCacheHelper.loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getAddressById(contactAddressId).then(function (response) {
let now = new Date();
if ((response.result.AddrLatd != null) && (response.result.AddrLgtd != null) && (response.result.AddrLatd != "0") && (response.result.AddrLgtd != "0")) {
instance.latd = response.result.AddrLatd;
instance.lngd = response.result.AddrLgtd;
instance.geotaggeddate = response.result.GeoTaggeddate;
instance.editmap1(contactAddressId);
}
else {
navigator.geolocation.getCurrentPosition(function (position) {
instance.latd = position.coords.latitude;
instance.lngd = position.coords.longitude;
instance.editmap1(contactAddressId);
});
}
});
});
}
currentCoordinates() {
navigator.geolocation.getCurrentPosition(function (position) {
$(".txt_addrlatd").val(position.coords.latitude);
$(".txt_addrlgtd").val(position.coords.longitude);
});
}
editmap1(contactAddressId) {
var instance = this;
const containerId = this.navigationHelper.getLastContainerId();
if ($('#meetingAddressMap-' + contactAddressId).length > 0) {
if ($('#meetingAddressMap-' + contactAddressId).is(':hidden') != true) {
return false;
}
}
;
$(`#${containerId}`).append("<form id='FormIds'><style type='text/css'>.pac-container{z-index:9999 !important;}</style><div id='mapaddress" + contactAddressId + "' class='floating-label-form-group pl-0 bg-white d-flex align-items-center justify-content-between ' style='border-top:1px solid #ccc;border-right: 1px solid #ccc;'><div class='input-group'><input type='hidden' data-geo='lat1 value='' id='latitude' name='latitude'><input type='hidden' data-geo='lng' value='' id='longitude' name='setting_longitude'><input type='text' id='mapaddress-" + contactAddressId + "' class='form-control value-control floating-label-control px-2' data-isdefault='true' data-placeholder='Select Address' data-label='Address'><input type='hidden' id='myfieldname' value=" + contactAddressId + " /></div><div class=''><button class='btn btn-outline-primary btn-xs d-sm-none capture-btn'><span class='fa-solid fa-location-dot'></span><span>Current Location</span></button></div></div><div id='meetingAddressMap-" + contactAddressId + "' class='text-center modal-body pa-0' style='height:100%;'></div></div></form>");
$(`#${containerId}`).find('#FormIds').after(`<div class="bg-white modal-footer find-match-footer pa-10"><a class="btn btn-light btn-sm btn-center mr-auto" href="javascript:;" id="btnClose">Close</a><a href="javascript:;" id='btn_map' class='btn btn-primary btn-sm' onclick='Bizgaze.Apps.Crm.Components.Address.Instance().getMobileLocation(${contactAddressId})'>Save</a></div>`);
$(`#${containerId}`).find(".capture-btn").click(function () {
instance.navigationHelper.showLoading();
if (isMobileApp()) {
Unibase.Platform.Helpers.MobileHelper.Instance().getCurrentLocation(contactAddressId, 2);
}
else {
navigator.geolocation.getCurrentPosition(function (position) {
instance.latd = position.coords.latitude;
instance.lngd = position.coords.longitude;
instance.getselectedcity(contactAddressId);
});
}
});
$(`#${containerId}`).find("#btnClose").click(function () {
instance.navigationHelper.closePopUp();
});
var id = $(`#${containerId}`).find("#mapaddress-" + contactAddressId);
id.geocomplete({ details: "form#FormIds" }).bind("geocode:result", function (event, result) {
$(`#${containerId}`).find($("#latitude").val(result.geometry.location.lat()));
$(`#${containerId}`).find($("#longitude").val(result.geometry.location.lng()));
instance.latd = result.geometry.location.lat();
instance.lngd = result.geometry.location.lng();
instance.getselectedcity(contactAddressId);
});
if (contactAddressId != instance.oldcontactaddressid) {
$(`#${containerId}`).find("#meetingAddressMap-" + instance.oldcontactaddressid).addClass('hidden');
$(`#${containerId}`).find("#mapaddress" + instance.oldcontactaddressid).addClass('hidden');
$(`#${containerId}`).find("#mapaddress-" + instance.oldcontactaddressid).addClass('hidden');
}
$(`#${containerId}`).find("#meetingAddressMap-" + contactAddressId).html('');
$(`#${containerId}`).find("#mapaddress-" + contactAddressId).html('');
instance.getselectedcity(contactAddressId);
instance.oldcontactaddressid = contactAddressId;
let deductHeight = 0;
deductHeight += $(`#${containerId}`).find(`#mapaddress${contactAddressId}`).outerHeight(true);
deductHeight += $(`#${containerId}`).find('.find-match-footer').outerHeight(true);
$(`#${containerId}`).find('#meetingAddressMap-' + contactAddressId).css("height", `${$(window).innerHeight() - deductHeight}px`).attr('data-deductheight', deductHeight);
}
getselectedcity(contactAddressId) {
let instance = this;
const containerId = this.navigationHelper.getLastContainerId();
$(`#${containerId}`).find($("#meetingAddressMap").html(''));
$(`#${containerId}`).find($("#mapaddress-").html(''));
var myLatlng = new google.maps.LatLng(instance.latd, instance.lngd);
var mapOptions = {
zoom: 8,
center: myLatlng,
};
var map = new google.maps.Map($(`#${containerId}`).find("#meetingAddressMap-" + contactAddressId)[0], mapOptions);
var marker = new google.maps.Marker({
position: myLatlng,
title: "Hello World!",
draggable: true
});
google.maps.event.addListener(marker, 'dragend', function () {
instance.latd = marker.getPosition().lat();
instance.lngd = marker.getPosition().lng();
instance.getselectedcity(contactAddressId);
});
marker.setMap(map);
var url = "https://maps.googleapis.com/maps/api/geocode/json?latlng=" + instance.latd + "," + instance.lngd + "&key=" + _mapsettings.key() + "&sensor=false";
var xhr = instance.createCORSRequest1('Get', url);
if (!xhr) {
bootbox.alert('CORS not supported');
return;
}
xhr.onload = function () {
var text = xhr.responseText;
var json = JSON.parse(text);
$(`#${containerId}`).find("#mapaddress-" + contactAddressId).val(json.results[0].formatted_address);
instance.navigationHelper.hideLoading();
};
xhr.onerror = function () {
bootbox.alert('Woops, there was an error making the request.');
instance.navigationHelper.hideLoading();
};
xhr.send();
}
createCORSRequest1(method, url) {
var xhr = new XMLHttpRequest();
if ("withCredentials" in xhr) {
xhr.open(method, url, true);
}
else {
xhr = null;
}
return xhr;
}
getMobileLocation(contactAddressId) {
var instance = this;
const containerId = this.navigationHelper.getLastContainerId();
var geocoder = new google.maps.Geocoder();
setTimeout(function () {
var address = $(`#${containerId}`).find('#mapaddress-' + contactAddressId);
geocoder.geocode({ 'address': address.val() }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var latitude = results[0].geometry.location.lat();
var longitude = results[0].geometry.location.lng();
var postdata = {
ContactAddressId: contactAddressId,
Latd: parseFloat(instance.latd),
Lgtd: parseFloat(instance.lngd),
GeoTaggedDate: instance.geotaggeddate
};
instance.fileCacheHelper.loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().saveAddressCoordinates(postdata).then(function (response) {
instance.navigationHelper.closePopUp();
MessageHelper.Instance().showSuccess(response.message, 'div_ValidationSummary');
var detailobj = Unibase.Themes.Compact.Components.Details.Instance();
if (instance.isEmployeeDashboardRoute) {
const portletid = +$("#hf_DashboardPortletId").val();
Unibase.Themes.Compact.Components.Nav.Instance().loadDashboard(portletid, '');
instance.isEmployeeDashboardRoute = false;
}
else {
detailobj._recordId = Unibase.Themes.Providers.DetailHelper.recordId;
detailobj._installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
detailobj._containerId = instance.navigationHelper.getLastContainerId();
var idetailObj = detailobj;
detailobj.loadPortlets(idetailObj);
if ($('#hf_tripgroupid').length) {
Unibase.Platform.Helpers.NavigationHelper.IsListRefresh = true;
}
}
}, null);
});
}
else {
instance.fileCacheHelper.loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getLatLongByAddress(address).then(function (response) {
if (response.result != "") {
var lat = JSON.parse(response.result).results[0].geometry.location.lat;
$('#hfLattitude').val(lat);
alert(lat);
var lng = JSON.parse(response.result).results[0].geometry.location.lng;
$('#hfLongitude').val(lng);
}
});
});
alert('Please Select Address');
}
});
});
}
LoadMapInMobile(contactAddressId, latid, lngid) {
var instance = this;
instance.latd = latid;
instance.lngd = lngid;
instance.getselectedcity(contactAddressId);
}
static Instance() {
if (this._instance === undefined)
this._instance = new Address();
return this._instance;
}
}
Components.Address = Address;
})(Components = Crm.Components || (Crm.Components = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,100 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let CRM;
(function (CRM) {
let Components;
(function (Components) {
class ChangeManager extends Unibase.Platform.Core.BaseComponent {
Confirm(isConfirm) {
var instance = this;
let detailContainer = "#" + Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var StageId = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_stageid").Value;
var stage = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_shortcode").Value);
if (stage == "CON") {
debugger;
$(detailContainer).find('.DetailSetting_' + '' + InstalledAppId + '' + '_Reject').parent('li').addClass('hidden');
$(detailContainer).find('.DetailSetting_' + '' + InstalledAppId + '' + '_Confirm').parent('li').addClass('hidden');
$(detailContainer).find('.layout-details-stages').addClass('d-none');
}
$(detailContainer).find('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_Confirm').click(function () {
bootbox.confirm("Are You Sure You want to Continue", function (result) {
if (result) {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/transact/managers/invoicemanager.js", function () {
var postdata = {
ChangeManagerId: Unibase.Themes.Providers.DetailHelper.recordId,
IsConfirm: isConfirm,
};
Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().changeManager(postdata).then(function (response) {
if (response.errors == null) {
Unibase.Themes.Compact.Components.Details.Instance().loadPortlets(Unibase.Themes.Compact.Components.Details.Instance());
MessageHelper.Instance().showSuccess("Manager Updated Successfully", "");
}
else {
MessageHelper.Instance().showError(response.message, 'div_message');
}
});
});
}
});
});
}
Reject(isConfirm) {
var instance = this;
var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
let detailContainer = $("._bizgaze_detail_container:visible");
var StageId = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_stageid").Value;
var stage = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_shortcode").Value);
if (stage == "REJ") {
debugger;
$(detailContainer).find('.DetailSetting_' + '' + InstalledAppId + '' + '_Reject').parent('li').addClass('hidden');
$(detailContainer).find('.DetailSetting_' + '' + InstalledAppId + '' + '_Confirm').parent('li').addClass('hidden');
$(detailContainer).find('.layout-details-stages').addClass('d-none');
}
$(detailContainer).find('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_Reject').click(function () {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/transact/managers/invoicemanager.js", function () {
var postdata = {
ChangeManagerId: Unibase.Themes.Providers.DetailHelper.recordId,
IsConfirm: isConfirm,
};
Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().changeManager(postdata).then(function (response) {
debugger;
if (response.errors == null) {
Unibase.Themes.Compact.Components.Details.Instance().loadPortlets(Unibase.Themes.Compact.Components.Details.Instance());
MessageHelper.Instance().showError("Manager Rejected Successfully", "");
}
else {
MessageHelper.Instance().showSuccess(response.message, 'div_message');
}
});
});
});
}
EditHideAndShow() {
var instance = this;
var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
let detailContainer = $("._bizgaze_detail_container:visible");
var stage = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_shortcode").Value);
if (stage == "CON") {
$(detailContainer).find('#btn_EditChangeManagers').addClass('hidden');
$(detailContainer).find('#btn_EditChangeManagers').removeClass('d-flex');
}
else {
$(detailContainer).find('#btn_EditChangeManagers').removeClass('hidden');
$(detailContainer).find('#btn_EditChangeManagers').addClass('d-flex');
}
}
static Instance() {
if (this.instance === undefined) {
this.instance = new ChangeManager();
}
return this.instance;
}
}
Components.ChangeManager = ChangeManager;
})(Components = CRM.Components || (CRM.Components = {}));
})(CRM = Apps.CRM || (Apps.CRM = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,70 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Components;
(function (Components) {
class CityAuto {
init(formpropertyid, prop, callback) {
var instance = this;
var url = _appsettings.server_url() + '/apis/v4/bizgaze/crm/cities/citiesautotext';
AutoCompleteHelper.getHelper().Create("#autocomplete_cities", "#hfAutoComplete_CityId", url, function (response) {
var data = response;
if (data.id != 0 && data.selected != true) {
$("#autocomplete_districts").empty();
var addData = data.addlData;
var sp = addData.split('|');
var citycode = sp[0];
var districtname = sp[1];
var districtid = sp[2];
$(".txt_citycode").val(citycode);
$(".txt_citycode").attr("disabled", "disabled");
$(".div_citycode ").addClass("floating-label-form-group-with-value");
var option = new Option(districtname, districtid, true);
$("#autocomplete_districts").append(option);
$("#autocomplete_districts").attr("disabled", "disabled");
}
});
if (callback != null)
callback();
}
loadControl(containerid, prop) {
var html = '<div id="div_cityautotext">' +
'<label for= "lblCity" class= "font-bold">Cities</label><span class="text-danger" id="spnIsRequired_cityautotext"> *</span>' +
'<select id ="autocomplete_cities" class="form-control text-control" style ="width:100%" placeholder=" Select City" data-placeholder="Select City"></select>' +
'<input type ="hidden" id ="hfAutoComplete_CityId" class="hfAutoComplete_CityId form-control value-control" data-isdynamic="true"></div>';
$("#" + containerid).html(html);
}
loadControlSettings(controlsettingjson, formpropertyid) {
return [];
}
loadPropertySettings(propertysettings, formpropertyid, DocPropertyName) {
return [];
}
bindEditFormDetails(formpropertyid, propval, DocPropertyName) {
if (propval != "null") {
var instance = this;
var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var IdValue = propval;
var TextValue = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_cityname").Value;
var selectedOptions = new Option(TextValue, IdValue, true);
if (IdValue != "0") {
$("#autocomplete_cities").append(selectedOptions);
jQuery("#autocomplete_cities").val(IdValue).trigger("change");
}
}
}
static Instance() {
if (this.instance === undefined) {
this.instance = new CityAuto();
}
return this.instance;
}
}
Components.CityAuto = CityAuto;
})(Components = Crm.Components || (Crm.Components = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"cityauto.js","sourceRoot":"","sources":["cityauto.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAwDhB;AAxDD,WAAU,OAAO;IACb,IAAiB,IAAI,CAsDpB;IAtDD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAoDnB;QApDD,WAAiB,GAAG;YAChB,IA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ACL,CAAC,CAAC,CAAC;oBACP,CAAC;oBACD,WAAW,CAAC,WAAgB,EAAE,IAAgB;wBAC1C,IAAI,IAAI,GAAG,6BAA6B;4BACpC,4HAA4H;4BAC5H,8JAA8J;4BAC9J,yIAAyI,CAAC;wBAC9I,CAAC,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACpC,CAAC;oBACD,mBAAmB,CAAC,kBAA0B,EAAE,cAAsB;wBAClE,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,oBAAoB,CAAC,gBAA0C,EAAE,cAAsB,EAAE,eAAuB;wBAC5G,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,mBAAmB,CAAC,cAAsB,EAAE,OAAY,EAAE,eAAuB;wBAC7E,OAAO,EAAE,CAAC;oBACd,CAAC;oBAGD,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;4BAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;yBAClC;wBACD,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBAhDY,mBAAQ,WAgDpB,CAAA;YACL,CAAC,EAlDgB,UAAU,GAAV,cAAU,KAAV,cAAU,QAkD1B;QACL,CAAC,EApDgB,GAAG,GAAH,QAAG,KAAH,QAAG,QAoDnB;IACL,CAAC,EAtDgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAsDpB;AACL,CAAC,EAxDS,OAAO,KAAP,OAAO,QAwDhB"}
@@ -0,0 +1,40 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Controls;
(function (Controls) {
class CityAuto_Settings {
loadControlPropertiesHtml(controlpropList, container) {
return ``;
}
bindPropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
savePropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
loadSettingHtml() {
return null;
}
bindControlData(controldatajson) {
return null;
}
SaveControlData(controldatajson) {
return controldatajson;
}
static Instance() {
if (this._instance === undefined)
this._instance = new CityAuto_Settings();
return this._instance;
}
}
Controls.CityAuto_Settings = CityAuto_Settings;
})(Controls = Crm.Controls || (Crm.Controls = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"cityauto.settings.js","sourceRoot":"","sources":["cityauto.settings.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAoChB;AApCD,WAAU,OAAO;IACb,IAAiB,IAAI,CAkCpB;IAlCD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAgCnB;QAhCD,WAAiB,GAAG;YAChB,IAAiB,QAAQ,CA8BxB;YA9BD,WAAiB,QAAQ;gBACrB,MAAa,iBAAiB;oBAC1B,yBAAyB,CAAC,eAAsC,EAAE,SAAS;wBACvE,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,oBAAoB,CAAC,IAAgB;wBACjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;wBACvE,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,oBAAoB,CAAC,IAAgB;wBACjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;wBACvE,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,eAAe;wBACX,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,eAAe,CAAC,eAAoB;wBAChC,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,eAAe,CAAC,eAAoB;wBAChC,OAAO,eAAe,CAAC;oBAC3B,CAAC;oBAGD,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;4BAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,iBAAiB,EAAE,CAAC;wBAC7C,OAAO,IAAI,CAAC,SAAS,CAAC;oBAC1B,CAAC;iBACJ;gBA5BY,0BAAiB,oBA4B7B,CAAA;YACL,CAAC,EA9BgB,QAAQ,GAAR,YAAQ,KAAR,YAAQ,QA8BxB;QACL,CAAC,EAhCgB,GAAG,GAAH,QAAG,KAAH,QAAG,QAgCnB;IACL,CAAC,EAlCgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAkCpB;AACL,CAAC,EApCS,OAAO,KAAP,OAAO,QAoChB"}
@@ -0,0 +1,55 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Components;
(function (Components) {
class DistrictAuto {
init(formpropertyid, prop, callback) {
var instance = this;
var url = _appsettings.server_url() + '/apis/v4/bizgaze/crm/cities/districtsautotext';
AutoCompleteHelper.getHelper().Create("#autocomplete_districts", "#hfAutoComplete_DistrictId", url, function (response) {
});
if (callback != null)
callback();
}
loadControl(containerid, prop) {
var html = '<div id="div_districtautotext">' +
'<label for= "lblDistrict" class= "font-bold">Districts</label><span class="text-danger" id="spnIsRequired_districtautotext"> *</span>' +
'<select id ="autocomplete_districts" class="form-control text-control" style ="width:100%" placeholder=" Select District" data-placeholder="Select District"></select>' +
'<input type ="hidden" id ="hfAutoComplete_DistrictId" class="hfAutoComplete_DistrictId form-control value-control" data-isdynamic="true"></div>';
$("#" + containerid).html(html);
}
loadControlSettings(controlsettingjson, formpropertyid) {
return [];
}
loadPropertySettings(propertysettings, formpropertyid, DocPropertyName) {
return [];
}
bindEditFormDetails(formpropertyid, propval, DocPropertyName) {
if (propval != "null") {
var instance = this;
var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var IdValue = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_districtid").Value;
var TextValue = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_districtname").Value;
var selectedOptions = new Option(TextValue, IdValue, true);
if (IdValue != "0") {
$("#autocomplete_districts").append(selectedOptions);
jQuery("#autocomplete_districts").val(IdValue).trigger("change");
}
}
}
static Instance() {
if (this.instance === undefined) {
this.instance = new DistrictAuto();
}
return this.instance;
}
}
Components.DistrictAuto = DistrictAuto;
})(Components = Crm.Components || (Crm.Components = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"districtauto.js","sourceRoot":"","sources":["districtauto.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAuChB;AAvCD,WAAU,OAAO;IACb,IAAiB,IAAI,CAqCpB;IArCD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAmCnB;QAnCD,WAAiB,GAAG;YAChB,IAAiB,UAAU,CAiC1B;YAjCD,WAAiB,UAAU;gBACvB,MAAa,YAAY;oBACrB,IAAI,CAAC,cAAsB,EAAE,IAAgB,EAAE,QAAkB;wBAC7D,IAAI,QAAQ,GAAG,IAAI,CAAC;wBACpB,IAAI,GAAG,GAAG,YAAY,CAAC,UAAU,EAAE,GAAG,+CAA+C,CAAC;wBACtF,kBAAkB,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,yBAAyB,EAAE,4BAA4B,EAAE,GAAG,EAAE,UAAU,QAAQ;wBACtH,CAAC,CAAC,CAAC;oBACP,CAAC;oBACD,WAAW,CAAC,WAAgB,EAAE,IAAgB;wBAC1C,IAAI,IAAI,GAAG,iCAAiC;4BACxC,uIAAuI;4BACvI,yKAAyK;4BACzK,iJAAiJ,CAAC;wBACtJ,CAAC,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACpC,CAAC;oBACD,mBAAmB,CAAC,kBAA0B,EAAE,cAAsB;wBAClE,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,oBAAoB,CAAC,gBAA0C,EAAE,cAAsB,EAAE,eAAuB;wBAC5G,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,mBAAmB,CAAC,cAAsB,EAAE,OAAY,EAAE,eAAuB;wBAC7E,OAAO,EAAE,CAAC;oBACd,CAAC;oBAGD,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;4BAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;yBACtC;wBACD,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBA/BY,uBAAY,eA+BxB,CAAA;YACL,CAAC,EAjCgB,UAAU,GAAV,cAAU,KAAV,cAAU,QAiC1B;QACL,CAAC,EAnCgB,GAAG,GAAH,QAAG,KAAH,QAAG,QAmCnB;IACL,CAAC,EArCgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAqCpB;AACL,CAAC,EAvCS,OAAO,KAAP,OAAO,QAuChB"}
@@ -0,0 +1,40 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Controls;
(function (Controls) {
class DistrictAuto_Settings {
loadControlPropertiesHtml(controlpropList, container) {
return ``;
}
bindPropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
savePropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
loadSettingHtml() {
return null;
}
bindControlData(controldatajson) {
return null;
}
SaveControlData(controldatajson) {
return controldatajson;
}
static Instance() {
if (this._instance === undefined)
this._instance = new DistrictAuto_Settings();
return this._instance;
}
}
Controls.DistrictAuto_Settings = DistrictAuto_Settings;
})(Controls = Crm.Controls || (Crm.Controls = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"districtauto.settings.js","sourceRoot":"","sources":["districtauto.settings.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAoChB;AApCD,WAAU,OAAO;IACb,IAAiB,IAAI,CAkCpB;IAlCD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAgCnB;QAhCD,WAAiB,GAAG;YAChB,IAAiB,QAAQ,CA8BxB;YA9BD,WAAiB,QAAQ;gBACrB,MAAa,qBAAqB;oBAC9B,yBAAyB,CAAC,eAAsC,EAAE,SAAS;wBACvE,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,oBAAoB,CAAC,IAAgB;wBACjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;wBACvE,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,oBAAoB,CAAC,IAAgB;wBACjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;wBACvE,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,eAAe;wBACX,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,eAAe,CAAC,eAAoB;wBAChC,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,eAAe,CAAC,eAAoB;wBAChC,OAAO,eAAe,CAAC;oBAC3B,CAAC;oBAGD,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;4BAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAqB,EAAE,CAAC;wBACjD,OAAO,IAAI,CAAC,SAAS,CAAC;oBAC1B,CAAC;iBACJ;gBA5BY,8BAAqB,wBA4BjC,CAAA;YACL,CAAC,EA9BgB,QAAQ,GAAR,YAAQ,KAAR,YAAQ,QA8BxB;QACL,CAAC,EAhCgB,GAAG,GAAH,QAAG,KAAH,QAAG,QAgCnB;IACL,CAAC,EAlCgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAkCpB;AACL,CAAC,EApCS,OAAO,KAAP,OAAO,QAoChB"}
@@ -0,0 +1,31 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let CRM;
(function (CRM) {
let Companies;
(function (Companies) {
let Components;
(function (Components) {
class RefreshBranchTypes extends Unibase.Platform.Core.BaseComponent {
init() {
var instance = this;
instance.fileCacheHelper.loadJsFile('apps/crm/companies/managers/companymanager.js', function () {
Bizgaze.Apps.CRM.Companies.Managers.CompanyManager.Instance().refreshBranchTypes().then(function (response) {
MessageHelper.Instance().showSuccess(response, '');
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new RefreshBranchTypes();
return this._instance;
}
}
Components.RefreshBranchTypes = RefreshBranchTypes;
})(Components = Companies.Components || (Companies.Components = {}));
})(Companies = CRM.Companies || (CRM.Companies = {}));
})(CRM = Apps.CRM || (Apps.CRM = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"refreshbranchtypes.js","sourceRoot":"","sources":["refreshbranchtypes.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CA2BhB;AA3BD,WAAU,OAAO;IACb,IAAiB,IAAI,CAyBpB;IAzBD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAuBnB;QAvBD,WAAiB,GAAG;YAChB,IAAiB,SAAS,CAqBzB;YArBD,WAAiB,SAAS;gBACtB,IAAiB,UAAU,CAmB1B;gBAnBD,WAAiB,UAAU;oBACvB,MAAa,kBAAmB,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;wBAEvE,IAAI;4BACA,IAAI,QAAQ,GAAG,IAAI,CAAC;4BACpB,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,+CAA+C,EAAE;gCACjF,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,UAAU,QAAQ;oCACtG,aAAa,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;gCACvD,CAAC,CAAC,CAAC;4BACP,CAAC,CAAC,CAAC;wBACP,CAAC;wBAGD,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;gCAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,kBAAkB,EAAE,CAAC;4BAC9C,OAAO,IAAI,CAAC,SAAS,CAAC;wBAC1B,CAAC;qBACJ;oBAjBY,6BAAkB,qBAiB9B,CAAA;gBACL,CAAC,EAnBgB,UAAU,GAAV,oBAAU,KAAV,oBAAU,QAmB1B;YACL,CAAC,EArBgB,SAAS,GAAT,aAAS,KAAT,aAAS,QAqBzB;QACL,CAAC,EAvBgB,GAAG,GAAH,QAAG,KAAH,QAAG,QAuBnB;IACL,CAAC,EAzBgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAyBpB;AACL,CAAC,EA3BS,OAAO,KAAP,OAAO,QA2BhB"}
+1
View File
@@ -0,0 +1 @@
var Bizgaze;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){let i;(function(t){class i extends Unibase.Platform.Core.BaseComponent{init(){var t=this;t.fileCacheHelper.loadJsFile("apps/crm/companies/managers/companymanager.js",function(){n.Apps.CRM.Companies.Managers.CompanyManager.Instance().refreshBranchTypes().then(function(n){MessageHelper.Instance().showSuccess(n,"")})})}static Instance(){return this._instance===undefined&&(this._instance=new i),this._instance}}t.RefreshBranchTypes=i})(i=t.Components||(t.Components={}))})(i=t.Companies||(t.Companies={}))})(i=t.CRM||(t.CRM={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1,18 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let CRM;
(function (CRM) {
let Companies;
(function (Companies) {
let Infos;
(function (Infos) {
class Branch {
}
Infos.Branch = Branch;
})(Infos = Companies.Infos || (Companies.Infos = {}));
})(Companies = CRM.Companies || (CRM.Companies = {}));
})(CRM = Apps.CRM || (Apps.CRM = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"branch.js","sourceRoot":"","sources":["branch.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAahB;AAbD,WAAU,OAAO;IACb,IAAiB,IAAI,CAWpB;IAXD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CASnB;QATD,WAAiB,GAAG;YAChB,IAAiB,SAAS,CAOzB;YAPD,WAAiB,SAAS;gBACtB,IAAiB,KAAK,CAKrB;gBALD,WAAiB,KAAK;oBAClB,MAAa,MAAM;qBAGlB;oBAHY,YAAM,SAGlB,CAAA;gBACL,CAAC,EALgB,KAAK,GAAL,eAAK,KAAL,eAAK,QAKrB;YACL,CAAC,EAPgB,SAAS,GAAT,aAAS,KAAT,aAAS,QAOzB;QACL,CAAC,EATgB,GAAG,GAAH,QAAG,KAAH,QAAG,QASnB;IACL,CAAC,EAXgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAWpB;AACL,CAAC,EAbS,OAAO,KAAP,OAAO,QAahB"}
+1
View File
@@ -0,0 +1 @@
var Bizgaze;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t{}n.Branch=t})(t=n.Infos||(n.Infos={}))})(t=n.Companies||(n.Companies={}))})(t=n.CRM||(n.CRM={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1,18 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let CRM;
(function (CRM) {
let Companies;
(function (Companies) {
let Infos;
(function (Infos) {
class Company {
}
Infos.Company = Company;
})(Infos = Companies.Infos || (Companies.Infos = {}));
})(Companies = CRM.Companies || (CRM.Companies = {}));
})(CRM = Apps.CRM || (Apps.CRM = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"company.js","sourceRoot":"","sources":["company.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAmBhB;AAnBD,WAAU,OAAO;IACb,IAAiB,IAAI,CAiBpB;IAjBD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAenB;QAfD,WAAiB,GAAG;YAChB,IAAiB,SAAS,CAazB;YAbD,WAAiB,SAAS;gBACtB,IAAiB,KAAK,CAWrB;gBAXD,WAAiB,KAAK;oBAClB,MAAa,OAAO;qBASnB;oBATY,aAAO,UASnB,CAAA;gBACL,CAAC,EAXgB,KAAK,GAAL,eAAK,KAAL,eAAK,QAWrB;YACL,CAAC,EAbgB,SAAS,GAAT,aAAS,KAAT,aAAS,QAazB;QACL,CAAC,EAfgB,GAAG,GAAH,QAAG,KAAH,QAAG,QAenB;IACL,CAAC,EAjBgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAiBpB;AACL,CAAC,EAnBS,OAAO,KAAP,OAAO,QAmBhB"}
+1
View File
@@ -0,0 +1 @@
var Bizgaze;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t{}n.Company=t})(t=n.Infos||(n.Infos={}))})(t=n.Companies||(n.Companies={}))})(t=n.CRM||(n.CRM={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1,126 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let CRM;
(function (CRM) {
let Companies;
(function (Companies) {
let Managers;
(function (Managers) {
class CompanyManager extends Unibase.Platform.Core.BaseManager {
getAssignedCompanies(Ids) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/companies/assignedcompanies/selectedcompanyids/' + Ids;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getAssignedBranches(BranchIds, UserId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/companies/getbranchesbyids/selectedbranchids/' + BranchIds + '/userid/' + UserId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getWarehousesbyCompanyid(CompanyId, BranchId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/unibase/platform/companies/getwarehousesbycompanyid/companyid/' + CompanyId + '/branchid/' + BranchId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
refreshBranchTypes() {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/companies/refreshbranchtypes/np';
return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
return response.message;
});
});
}
getBankBranchDetails(id) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/companies/getbankbranches/bankbranchid/' + id;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getUserBranches(id) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/companies/getuserbranches/contactid/' + id;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
changeBranch(branchid, partitionid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/companies/changebranch/branchid/' + branchid + '/partitionid/' + partitionid;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
var identity = JSON.parse(response.result);
identity = Object.keys(identity).reduce((c, k) => (c[k.charAt(0).toLowerCase() + k.slice(1)] = identity[k], c), {});
for (var s = 0; s < identity.settings.length; s++) {
identity.settings[s] = Object.keys(identity.settings[s]).reduce((c, k) => (c[k.charAt(0).toLowerCase() + k.slice(1)] = identity.settings[s][k], c), {});
}
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
response.result = JSON.parse(response.result);
return response;
});
});
}
getBranch(branchid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/companies/getbranchbybranchid/branchid/' + branchid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getBranches(CompanyId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/companies/getallbranchesbycompanyid/companyid/' + CompanyId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new CompanyManager();
return this._instance;
}
}
Managers.CompanyManager = CompanyManager;
})(Managers = Companies.Managers || (Companies.Managers = {}));
})(Companies = CRM.Companies || (CRM.Companies = {}));
})(CRM = Apps.CRM || (Apps.CRM = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"companymanager.js","sourceRoot":"","sources":["companymanager.ts"],"names":[],"mappings":";;;;;;;;;AAMA,IAAU,OAAO,CAuGhB;AAvGD,WAAU,OAAO;IACb,IAAiB,IAAI,CAqGpB;IArGD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAmGnB;QAnGD,WAAiB,GAAG;YAChB,IAAiB,SAAS,CAiGzB;YAjGD,WAAiB,SAAS;gBACtB,IAAiB,QAAQ,CA+FxB;gBA/FD,WAAiB,QAAQ;oBACrB,MAAa,cAAe,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW;wBAG3D,oBAAoB,CAAC,GAAW;;gCAClC,MAAM,GAAG,GAAG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CAAC,EAvGS,OAAO,KAAP,OAAO,QAuGhB"}
+1
View File
@@ -0,0 +1 @@
var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Bizgaze;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t extends Unibase.Platform.Core.BaseManager{getAssignedCompanies(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/companies/assignedcompanies/selectedcompanyids/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}getAssignedBranches(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/bizgaze/crm/companies/getbranchesbyids/selectedbranchids/"+n+"/userid/"+t;return yield this.dataHelper().getAsync(i).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}getWarehousesbyCompanyid(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/unibase/platform/companies/getwarehousesbycompanyid/companyid/"+n+"/branchid/"+t;return yield this.dataHelper().getAsync(i).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}refreshBranchTypes(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/crm/companies/refreshbranchtypes/np","{}").then(function(n){return n.message})})}getBankBranchDetails(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/companies/getbankbranches/bankbranchid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}getUserBranches(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/companies/getuserbranches/contactid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}changeBranch(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/bizgaze/crm/companies/changebranch/branchid/"+n+"/partitionid/"+t;return yield this.dataHelper().postAsync(i,null).then(function(n){var t,i;for(n.result!==null&&(t=JSON.parse(n.result)),t=Object.keys(t).reduce((n,i)=>(n[i.charAt(0).toLowerCase()+i.slice(1)]=t[i],n),{}),i=0;i<t.settings.length;i++)t.settings[i]=Object.keys(t.settings[i]).reduce((n,r)=>(n[r.charAt(0).toLowerCase()+r.slice(1)]=t.settings[i][r],n),{});return Unibase.Platform.Membership.Infos.Identity.setCurrentUser(t),n.result=JSON.parse(n.result),n})})}getBranch(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/companies/getbranchbybranchid/branchid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}getBranches(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/companies/getallbranchesbycompanyid/companyid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}static Instance(){return this._instance===undefined&&(this._instance=new t),this._instance}}n.CompanyManager=t})(t=n.Managers||(n.Managers={}))})(t=n.Companies||(n.Companies={}))})(t=n.CRM||(n.CRM={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1 @@
{"version":3,"file":"icompanymanager.js","sourceRoot":"","sources":["icompanymanager.ts"],"names":[],"mappings":""}
@@ -0,0 +1,136 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Components;
(function (Components) {
class SelfDeclaration extends Unibase.Platform.Core.BaseComponent {
constructor() {
super(...arguments);
this._dateTimeHelper = Unibase.Platform.Helpers.DateTimeHelper.Instance();
}
jsFiles() {
return ["platform/forms/components/formviewer/formviewer.js", 'libs/parsley/parsley.min.js'];
}
cssFiles() {
return [];
}
html() {
var html = '';
return html;
}
loadhtml(Containerid) {
var html = '<form data-validate="parsley" data-isdynamic="false"><div class="card"><div class="card-header"><h3 class="text-center" style ="color:deepskyblue"><u>Self - Declaration</u></h3 ></div><div style="overflow-x:hidden;" class="d modal-body bg-light"><div class="bg-white mb-10"><div id="bizgaze_CreateErrorMessages" class="clear"></div><div class="col-md-12" style ="height:300px; border:1px solid pink"><h4><p>I, <b><span id="userName1"></span></b> on behalf of <b><span id="lblDistributorName1"></span></b> hereby, declare that <b><span id="lblDistributorName2"></span></b> has utilized DMS system to conduct all Mobil related business transactions accurately, completely and in a timely manner for the month of <b><span id="MonthAndYear1"></span></b>, and the transactional data pertaining to purchase, inventory, sales and market collections (payments received from customers) for the month of <b><span id="MonthAndYear2"></span></b> is accurate as per my knowledge.<br/><br/><br/> Name: <b><span id="userName2"></span></b><br/> Date: <b><span id="CurrentDate"></span></b><br/><br/></p></h4><span><b><input type="checkbox" style ="width:30px;height:14px;" id="isSelfDeclared"> <span></span> Yes, I declare <span id="DeclarationMonthI_e_PreviousMonth" class="hidden"></span> <br/><br/></span><div class="text-center"><input type="button" class="btn btn-primary btn-md" id="btnSubmit" value="Submit" disabled /></div></div></div></div></form>';
$("." + Containerid).html(html);
}
load(Containerid) {
}
init(Containerid) {
let instance = this;
var jsfiles = ["platform/forms/components/formviewer/formviewer.js", 'libs/parsley/parsley.min.js'];
SelfDeclaration.Instance().fileCacheHelper.loadJsFiles(jsfiles, function () {
SelfDeclaration.Instance().loadhtml(Containerid);
$("#btn_Close").click(function () {
SelfDeclaration.Instance().navigationHelper.closePopUp();
});
var tenantname = "";
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().GetTenants(Number(Unibase.Platform.Membership.Infos.Identity.getCurrentUser().tenantId)).then(function (res) {
if (res.result != null) {
tenantname = res.result.TenantName;
$("#lblDistributorName1").text(tenantname.toString());
$("#lblDistributorName2").text(tenantname.toString());
}
});
});
$("#userName1").text(Unibase.Platform.Membership.Infos.Identity.getCurrentUser().name);
$("#lblDistributorName1").text(tenantname.toString());
$("#lblDistributorName2").text(tenantname.toString());
$("#userName2").text(Unibase.Platform.Membership.Infos.Identity.getCurrentUser().name);
var TotalDate = new Date();
var months = ["JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER"];
var date = TotalDate.getDate();
var month = TotalDate.getMonth() + 1;
var year = TotalDate.getFullYear();
if (months[TotalDate.getMonth()] == "DECEMBER") {
year = year - 1;
}
$('#MonthAndYear1').text(months[TotalDate.getMonth()] + "-" + year);
$('#MonthAndYear2').text(months[TotalDate.getMonth()] + "-" + year);
$('#CurrentDate').text(date + "/" + month + "/" + year);
$('#DeclarationMonthI_e_PreviousMonth').text(months[TotalDate.getMonth()]);
var todayDate = new Date($.now());
var serverdate = instance._dateTimeHelper.formatServerDate(todayDate);
var OnlyDate = serverdate.split("/");
if (Number(OnlyDate[2]) >= 1 && Number(OnlyDate[2]) <= 10) {
$("#btnSubmit").prop('disabled', false);
}
else {
$("#btnSubmit").prop('disabled', true);
}
if (Number(OnlyDate[2]) > 10) {
$("#btnSubmit").hide();
$("#isSelfDeclared").hide();
$("#description").hide();
}
SelfDeclaration.Instance().Enable();
$('#btnSubmit').click(function () {
SelfDeclaration.Instance().save();
});
});
}
Enable() {
let instance = this;
var da = new Date($.now());
var date = instance._dateTimeHelper.formatServerDate(da);
date = date.replace('/', '-').replace('/', '-');
var month = $('#DeclarationMonthI_e_PreviousMonth').text();
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getSelfDeclarationByDate(date, month).then(function (response) {
if (response.result == "Record not Found") {
$("#btnSubmit").prop("disabled", false);
}
else {
$("#btnSubmit").prop("disabled", true);
$('#btnSubmit').prop('value', 'Submitted');
$("#isSelfDeclared").prop('checked', true);
$("#isSelfDeclared").prop("disabled", true);
}
});
});
}
save() {
var date = Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate();
var IsDeclared = $("#isSelfDeclared").prop('checked');
if (IsDeclared == false) {
MessageHelper.Instance().showError('Please Check Declaration', 'bizgaze_CreateErrorMessages');
return false;
}
var data = {
PciDeclared: IsDeclared,
UserId: Unibase.Platform.Membership.Infos.Identity.getCurrentUser().userId,
DeclarationDate: new Date(),
MonthOfDeclaration: $('#DeclarationMonthI_e_PreviousMonth').text(),
PartitionId: Unibase.Platform.Membership.Infos.Identity.getCurrentUser().partitionId
};
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().saveSelfDeclaration(data).then(function (response) {
MessageHelper.Instance().showSuccess(response.message, '');
$("#isSelfDeclared").prop('checked', true);
$("#isSelfDeclared").prop("disabled", true);
$('#btnSubmit').prop('value', 'Submitted');
});
}
static Instance() {
if (this.instance === undefined) {
this.instance = new SelfDeclaration();
}
return this.instance;
}
}
Components.SelfDeclaration = SelfDeclaration;
})(Components = Crm.Components || (Crm.Components = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,73 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Contacts;
(function (Contacts) {
let Components;
(function (Components) {
class ContactEmail extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
}
cssFiles() {
return [];
}
jsFiles() {
return [''];
}
html(id, containerid) {
return "";
}
init(containerid) {
var instance = this;
}
load(id, containerid, callback) {
}
changeDefaultEmail(id) {
var instance = this;
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid").Value);
instance.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
instance.fileCacheHelper.loadJsFile("tenants/themes/compact/components/details/details.js", function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().changedefaultemail(_recordId, id).then(function (response) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
});
});
});
}
SetAsLoginEmail(id) {
var instance = this;
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid").Value);
var userName = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_unibaseid").Value;
instance.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
instance.fileCacheHelper.loadJsFile("tenants/themes/compact/components/details/details.js", function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().changedefaultloginemail(_recordId, id, userName).then(function (response) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
});
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new ContactEmail();
return this._instance;
}
}
Components.ContactEmail = ContactEmail;
})(Components = Contacts.Components || (Contacts.Components = {}));
})(Contacts = Crm.Contacts || (Crm.Contacts = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"w_contactemail.js","sourceRoot":"","sources":["w_contactemail.ts"],"names":[],"mappings":"AACA,IAAU,OAAO,CAkFhB;AAlFD,WAAU,OAAO;IACb,IAAiB,IAAI,CAgFpB;IAhFD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CA8EnB;QA9ED,WAAiB,GAAG;YAChB,IAAiB,QAAQ,CA4ExB;YA5ED,WAAiB,QAAQ;gBACrB,IAAiB,UAAU,CA0E1B;gBA1ED,WAAiB,UAAU;oBACvB,MAAa,YAAa,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;wBACjE;4BACI,KAAK,EAAE,CAAC;wBACZ,CAAC;wBACD,QAAQ;4BACJ,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,OAAO;4BACH,OAAO,CAAC,EAAE,CAAC,CAAC;wBAChB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB;4BAC7B,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,IAAI,CAAC,WAAW;4BACZ,IAAI,QAAQ,GAAG,IAAI,CAAC;wBAExB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB,EAAE,QAAkB;wBAErD,CAAC;wBAED,kBAAkB,CAAC,EAAE;4BAEjB,IAAI,QAAQ,GAAG,IAAI,CAAC;4BACpB,IAAI,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,cAAc,GAAG,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC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C;wBAKD,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;gCAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,YAAY,EAAE,CAAC;4BACxC,OAAO,IAAI,CAAC,SAAS,CAAC;wBAC1B,CAAC;qBACJ;oBAvEY,uBAAY,eAuExB,CAAA;gBAEL,CAAC,EA1EgB,UAAU,GAAV,mBAAU,KAAV,mBAAU,QA0E1B;YACL,CAAC,EA5EgB,QAAQ,GAAR,YAAQ,KAAR,YAAQ,QA4ExB;QACL,CAAC,EA9EgB,GAAG,GAAH,QAAG,KAAH,QAAG,QA8EnB;IACL,CAAC,EAhFgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAgFpB;AACL,CAAC,EAlFS,OAAO,KAAP,OAAO,QAkFhB"}
+1
View File
@@ -0,0 +1 @@
var Bizgaze;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){let i;(function(t){class i extends Unibase.Platform.Core.BaseComponent{constructor(){super()}cssFiles(){return[]}jsFiles(){return[""]}html(){return""}init(){var n=this}load(){}changeDefaultEmail(t){var i=this,r=Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+Unibase.Themes.Providers.DetailHelper.installedAppId+"_recordid").Value);i.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js",function(){i.fileCacheHelper.loadJsFile("tenants/themes/compact/components/details/details.js",function(){n.Apps.Crm.Contacts.Managers.ContactManager.Instance().changedefaultemail(r,t).then(function(n){var t=Unibase.Themes.Compact.Components.Details.Instance(),i=Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId(),r=Unibase.Themes.Providers.DetailHelper.installedAppId,u=t.unibase_core_activeportletid;t.loadWidgets(r,u,"#"+i+"");MessageHelper.Instance().showSuccess(n.message,"")})})})}SetAsLoginEmail(t){var i=this,r=Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+Unibase.Themes.Providers.DetailHelper.installedAppId+"_recordid").Value),u=Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+Unibase.Themes.Providers.DetailHelper.installedAppId+"_unibaseid").Value;i.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js",function(){i.fileCacheHelper.loadJsFile("tenants/themes/compact/components/details/details.js",function(){n.Apps.Crm.Contacts.Managers.ContactManager.Instance().changedefaultloginemail(r,t,u).then(function(n){var t=Unibase.Themes.Compact.Components.Details.Instance(),i=Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId(),r=Unibase.Themes.Providers.DetailHelper.installedAppId,u=t.unibase_core_activeportletid;t.loadWidgets(r,u,"#"+i+"");MessageHelper.Instance().showSuccess(n.message,"")})})})}static Instance(){return this._instance===undefined&&(this._instance=new i),this._instance}}t.ContactEmail=i})(i=t.Components||(t.Components={}))})(i=t.Contacts||(t.Contacts={}))})(i=t.Crm||(t.Crm={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1,142 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Contacts;
(function (Contacts) {
let Components;
(function (Components) {
class ContactPhone extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
}
cssFiles() {
return [];
}
jsFiles() {
return [''];
}
html(id, containerid) {
return "";
}
init(containerid) {
var instance = this;
}
load(id, containerid, callback) {
}
changeDefaultPhone(id) {
var instance = this;
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid").Value);
instance.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
instance.fileCacheHelper.loadJsFile("tenants/themes/compact/components/details/details.js", function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().changedefaultphone(_recordId, id).then(function (response) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
});
});
});
}
changeDefaultPhoneLogin(id) {
var instance = this;
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid").Value);
var userName = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_unibaseid").Value;
instance.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
instance.fileCacheHelper.loadJsFile("tenants/themes/compact/components/details/details.js", function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().changedefaultloginphone(_recordId, id, userName).then(function (response) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
});
});
});
}
editplcaeholders(phonetype) {
if (phonetype == 2) {
$("#a_Verify_phonenumber").addClass("hidden");
$(".div_Otp_phonenumber").addClass("hidden");
$(".div_PhoneNumber").removeClass("floating-label-form-group-with-value");
$("#lbl_phno").empty();
$("#lbl_phno").append('Landline Number<span class="text-danger"> *</span>');
$("#txtPhn_phonenumber").data({ placeholder: "Enter Landline Number", label: "Landline Number" }).attr("placeholder", "Landline Number *");
$("#txtPhn_phonenumber").attr("maxlength", "20");
}
else {
$("#a_Verify_phonenumber").removeClass("hidden");
$(".div_PhoneNumber").removeClass('floating-label-form-group-with-value');
$("#lbl_phno").empty();
$("#lbl_phno").append('Mobile Number<span class="text-danger"> *</span>');
$("#txtPhn_phonenumber").data({ placeholder: 'Enter Mobile Number', label: 'Mobile Number' }).attr('placeholder', 'Mobile Number *');
$("#txtPhn_phonenumber").attr('maxlength', '10');
}
}
changePlaceholder(phonetype) {
if (phonetype == 2) {
$("#txtPhn_phonenumber").removeAttr("disabled");
$("#a_Verify_phonenumber").addClass("hidden");
$(".div_Otp_phonenumber").addClass("hidden");
$("#txtPhn_phonenumber").val("");
$(".div_PhoneNumber").removeClass('floating-label-form-group-with-value');
$("#lbl_phno").empty();
$("#lbl_phno").append('Landline Number<span class="text-danger"> *</span>');
$("#txtPhn_phonenumber").data({ placeholder: 'Enter Landline Number', label: 'Landline Number' }).attr('placeholder', 'Landline Number *');
$("#txtPhn_phonenumber").attr('maxlength', '20');
$(".divCustomProperties_phonenumber").data("validatename", "Landline Number");
}
else {
$("#a_Verify_phonenumber").removeClass("hidden");
$("#txtPhn_phonenumber").val("");
$(".divCustomProperties_phonenumber").data("validatename", "Mobile Number");
$(".div_PhoneNumber").removeClass('floating-label-form-group-with-value');
$("#lbl_phno").empty();
$("#lbl_phno").append('Mobile Number<span class="text-danger"> *</span>');
$("#txtPhn_phonenumber").data({ placeholder: 'Enter Mobile Number', label: 'Mobile Number' }).attr('placeholder', 'Mobile Number *');
$("#txtPhn_phonenumber").attr('maxlength', '10');
}
}
changeLables() {
$(".div_PhoneNumber").addClass('floating-label-form-group-with-value');
}
changePlaceholderforcustomer(phonetype, id) {
if (phonetype == 2) {
$('.txt_defaultnumberid').val("");
$(".div_defaultnumberid").removeClass('floating-label-form-group-with-value');
var id12 = $(".divCustomProperties_defaultnumberid").find("label").attr("id");
$("#" + id12).empty();
$("#" + id12).append('Landline Number<span class="text-danger hidden"> *</span>');
$(".txt_defaultnumberid").data({ placeholder: 'Enter Landline Number', label: 'Landline Number' }).attr('placeholder', 'Landline Number');
$(".txt_defaultnumberid").attr('maxlength', '20');
}
else {
$(".txt_defaultnumberid").val("");
$(".div_defaultnumberid").removeClass('floating-label-form-group-with-value');
var id12 = $(".divCustomProperties_defaultnumberid").find("label").attr("id");
$("#" + id12).empty();
$("#" + id12).append('Mobile Number<span class="text-danger"> *</span>');
$(".txt_defaultnumberid").data({ placeholder: 'Enter Mobile Number', label: 'Mobile Number' }).attr('placeholder', 'Mobile Number *');
$(".txt_defaultnumberid").attr('maxlength', '10');
}
}
changeLable() {
$(".txt_defaultnumberid").addClass('floating-label-form-group-with-value');
}
static Instance() {
if (this._instance === undefined)
this._instance = new ContactPhone();
return this._instance;
}
}
Components.ContactPhone = ContactPhone;
})(Components = Contacts.Components || (Contacts.Components = {}));
})(Contacts = Crm.Contacts || (Crm.Contacts = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,56 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Contacts;
(function (Contacts) {
let Components;
(function (Components) {
class ContactUrl extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
}
cssFiles() {
return [];
}
jsFiles() {
return [''];
}
html(id, containerid) {
return "";
}
init(containerid) {
var instance = this;
}
load(id, containerid, callback) {
}
changeDefaultUrl(id) {
var instance = this;
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid").Value);
instance.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
instance.fileCacheHelper.loadJsFile("tenants/themes/compact/components/details/details.js", function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().changedefaulturl(_recordId, id).then(function (response) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = $("._bizgaze_detail_container:visible").attr("id");
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
});
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new ContactUrl();
return this._instance;
}
}
Components.ContactUrl = ContactUrl;
})(Components = Contacts.Components || (Contacts.Components = {}));
})(Contacts = Crm.Contacts || (Crm.Contacts = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"w_contacturl.js","sourceRoot":"","sources":["w_contacturl.ts"],"names":[],"mappings":"AACA,IAAU,OAAO,CA0DhB;AA1DD,WAAU,OAAO;IACb,IAAiB,IAAI,CAwDpB;IAxDD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAsDnB;QAtDD,WAAiB,GAAG;YAChB,IAAiB,QAAQ,CAoDxB;YApDD,WAAiB,QAAQ;gBACrB,IAAiB,UAAU,CAkD1B;gBAlDD,WAAiB,UAAU;oBACvB,MAAa,UAAW,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;wBAC/D;4BACI,KAAK,EAAE,CAAC;wBACZ,CAAC;wBACD,QAAQ;4BACJ,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,OAAO;4BACH,OAAO,CAAC,EAAE,CAAC,CAAC;wBAChB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB;4BAC7B,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,IAAI,CAAC,WAAW;4BACZ,IAAI,QAAQ,GAAG,IAAI,CAAC;wBAExB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB,EAAE,QAAkB;wBAErD,CAAC;wBAED,gBAAgB,CAAC,EAAE;4BACf,IAAI,QAAQ,GAAG,IAAI,CAAC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CAAC,SAAS,KAAK,SAAS;gCAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,UAAU,EAAE,CAAC;4BACtC,OAAO,IAAI,CAAC,SAAS,CAAC;wBAC1B,CAAC;qBACJ;oBA/CY,qBAAU,aA+CtB,CAAA;gBAEL,CAAC,EAlDgB,UAAU,GAAV,mBAAU,KAAV,mBAAU,QAkD1B;YACL,CAAC,EApDgB,QAAQ,GAAR,YAAQ,KAAR,YAAQ,QAoDxB;QACL,CAAC,EAtDgB,GAAG,GAAH,QAAG,KAAH,QAAG,QAsDnB;IACL,CAAC,EAxDgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAwDpB;AACL,CAAC,EA1DS,OAAO,KAAP,OAAO,QA0DhB"}
+1
View File
@@ -0,0 +1 @@
var Bizgaze;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){let i;(function(t){class i extends Unibase.Platform.Core.BaseComponent{constructor(){super()}cssFiles(){return[]}jsFiles(){return[""]}html(){return""}init(){var n=this}load(){}changeDefaultUrl(t){var i=this,r=Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+Unibase.Themes.Providers.DetailHelper.installedAppId+"_recordid").Value);i.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js",function(){i.fileCacheHelper.loadJsFile("tenants/themes/compact/components/details/details.js",function(){n.Apps.Crm.Contacts.Managers.ContactManager.Instance().changedefaulturl(r,t).then(function(n){var t=Unibase.Themes.Compact.Components.Details.Instance(),i=$("._bizgaze_detail_container:visible").attr("id"),r=Unibase.Themes.Providers.DetailHelper.installedAppId,u=t.unibase_core_activeportletid;t.loadWidgets(r,u,"#"+i+"");MessageHelper.Instance().showSuccess(n.message,"")})})})}static Instance(){return this._instance===undefined&&(this._instance=new i),this._instance}}t.ContactUrl=i})(i=t.Components||(t.Components={}))})(i=t.Contacts||(t.Contacts={}))})(i=t.Crm||(t.Crm={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1,46 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let CRM;
(function (CRM) {
let knowledge;
(function (knowledge) {
class Knowledgereport extends Unibase.Platform.Core.BaseComponent {
constructor() {
super(...arguments);
this.InstalledAppId = 0;
}
cssFiles() {
return [];
}
jsFiles() {
return ['apps/crm/knowledge/Knowledgereport.js'];
}
html(id, containerid) {
return ``;
}
load() {
var instance = this;
var installedappid = Unibase.Themes.Compact.Components.Nav.Instance().installedAppId;
var instance = this;
var appid = Unibase.Themes.Compact.Components.Nav.Instance().installedAppId;
var filter = [];
filter.push({ "Key": "appnames", "Value": installedappid.toString(), ExpOp: 1 });
Unibase.Platform.Analytics.Components.ReportViewer.Instance().report_ViewAllByUniqueId("Bizgaze_Platform_Analytics_Reports_KnowledgeDocumentfiles", null, filter, null);
}
init() {
var instance = this;
}
static Instance() {
if (this.instance === undefined) {
this.instance = new Knowledgereport();
}
return this.instance;
}
}
knowledge.Knowledgereport = Knowledgereport;
})(knowledge = CRM.knowledge || (CRM.knowledge = {}));
})(CRM = Apps.CRM || (Apps.CRM = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"knowledgereport.js","sourceRoot":"","sources":["knowledgereport.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CA2ChB;AA3CD,WAAU,OAAO;IACb,IAAiB,IAAI,CAyCpB;IAzCD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAuCnB;QAvCD,WAAiB,GAAG;YAChB,IAAiB,SAAS,CAqCzB;YArCD,WAAiB,SAAS;gBAEtB,MAAa,eAAgB,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAAxE;;wBACI,mBAAc,GAAW,CAAC,CAAC;oBAiC/B,CAAC;oBA/BG,QAAQ;wBACJ,OAAO,EAAE,CAAC;oBACd,CAAC;oBACD,OAAO;wBACH,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AAI,KAAJ,YAAI,QAyCpB;AACL,CAAC,EA3CS,OAAO,KAAP,OAAO,QA2ChB"}
@@ -0,0 +1,501 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Contacts;
(function (Contacts) {
let Managers;
(function (Managers) {
class ContactManager extends Unibase.Platform.Core.BaseManager {
changedefaultemail(contactId, contactEmailId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/changedefaultemail/contactid/' + contactId + '/contactemailid/' + contactEmailId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
changedefaultbranch(ContactId, DefaultBranchId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/changedefaultbranch/contactid/' + ContactId + '/defaultbranchid/' + DefaultBranchId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
deletedefaultbranch(UserBranchId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/deletedefaultbranch/userbranchid/' + UserBranchId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getleadbyleadid(contactId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/leads/getleadbyleadid/leadid/' + contactId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getleadtagsbyleadid(contactId, formid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/unibase/platform/forms/bindtagcontroldata/refid/' + contactId + '/formid/' + formid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = response.result;
return response;
});
});
}
changedefaulturl(contactId, contactUrlId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/changedefaulturl/contactid/' + contactId + '/contacturlid/' + contactUrlId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
changedefaultloginemail(contactId, contactEmailId, userName) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/changedefaultloginemail/contactid/' + contactId + '/contactemailid/' + contactEmailId + '/username/' + userName;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
changedefaultphone(contactId, contactPhoneId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/changedefaultphone/contactid/' + contactId + '/contactnumberid/' + contactPhoneId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
changedefaultloginphone(contactId, contactPhoneId, userName) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/changedefaultloginphonenumber/contactid/' + contactId + '/contactnumberid/' + contactPhoneId + '/username/' + userName;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
deleteMappingContact(MappingContactId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/organization/deletemappingcontact/mappingcontactid/' + MappingContactId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getManagerDetails(LobId, AddressId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/getmanagerdetails/lobid/' + LobId + '/addressid/' + AddressId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getContactByUserId(UserId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/getcontactbyuserid/userid/' + UserId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getContactnumuberdetails(phonenumner) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/getcontactnumberbynumber/' + phonenumner;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getContactDetails(email, phone) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/getcontactdetailsemailphone/email/' + email + '/phone/' + phone;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null) {
response.result = JSON.parse(response.result);
}
return response;
});
});
}
getAddressByContactId(ContactId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/address/getdefaultaddressbycontactid/contactid/' + ContactId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
ChangeDefaultAddress(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/address/changedefaultaddress';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getContactDetailsBycontactid(ContactId) {
return __awaiter(this, void 0, void 0, function* () {
debugger;
const url = 'apis/v4/bizgaze/crm/organization/getorganizationdetails/organizationid/' + ContactId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
ChangeAddressStatus(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/address/changeaddressstatus';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
saveAddressCoordinates(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/address/saveaddresscoordinates';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrgContact(OrgContactId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/orgcontacts/getorgcontact/orgcontactid/' + OrgContactId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getsprlOrgContact(OrgContactId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/sprl/contacts/getorgcontacts/orgcontactid/' + OrgContactId;
return yield this.dataHelper().getAsync(url).then(function (response) {
debugger;
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getLatLongByAddress(address) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/orgcontacts/getlatlongbyaddress/address/' + address;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getAddressById(ContactAddressId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/address/getaddressbycontactaddressid/contactaddressid/' + ContactAddressId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getGridForManagers(LobId, ContactId, empId, page, rows) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/getmanagersbylobandemp/lobid/' + LobId + '/contactid/' + ContactId + '/empid/' + empId + '/page/' + page + '/rows/' + rows;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
saveManager(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/organization/changeorganizationmanager';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrganizationDetails(OrganizationId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/organization/getorganization/organizationid/' + OrganizationId + '';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
}).fail(function () {
});
});
}
getOrganizationById(OrganizationId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/organization/getorganizationbyorgid/organizationid/' + OrganizationId + '';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
}).fail(function () {
});
});
}
getEmployeeManager(employeeid) {
return __awaiter(this, void 0, void 0, function* () {
debugger;
const url = 'apis/v4/bizgaze/crm/contacts/getemployeemanager/employeeid/' + employeeid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getEmployeesByManagerId(employeeId, managerId) {
return __awaiter(this, void 0, void 0, function* () {
debugger;
const url = 'apis/v4/bizgaze/crm/contacts/getemployeesbymanagerid/employeeid/' + employeeId + '/managerid/' + managerId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
deletetcscontactcompanies(tcscontactcompanyid) {
return __awaiter(this, void 0, void 0, function* () {
const url = "apis/v4/bizgaze/crm/contacts/deletetcscontactcompanies/id/" + tcscontactcompanyid + "";
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrganizationByLeadId(LeadId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/organization/getorganizationbylead/leadid/' + LeadId + '';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
}).fail(function () {
});
});
}
GetTenants(tenantid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/gettenant/tenantid/' + tenantid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null) {
response.result = JSON.parse(response.result);
}
return response;
});
});
}
saveSelfDeclaration(obj) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/saveselfdeclaration';
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
if (response.result !== null) {
response.result = JSON.parse(response.result);
}
return response;
});
});
}
getSelfDeclarationByDate(declarationdate, month) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/getselfdeclarationbydate/declarationdate/' + declarationdate + '/month/' + month;
return yield this.dataHelper().getAsync(url).then(function (response) {
return response;
});
});
}
getOrganizationDetailsByspocid(orgContactId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/organization/getorganizationbyspocid/orgcontactid/' + orgContactId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getCustomerLocations() {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/getcustomerlocations';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
changeManager(obj) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/changemanagers/updatemanagerdetails';
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
return response;
});
});
}
GetCustomersubtypeDetails(Customertypeid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/leads/getcustomersubtypes/customertypeid/' + Customertypeid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
GetCustomerQualificationDetails(Customerqualificationid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/leads/getcustomerqualificationdetails/customerqualificationmatrixid/' + Customerqualificationid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
GetCustomerSubType(customersubtypeid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/leads/getcustomersubtypebyid/customersubtypeid/' + customersubtypeid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getEmployeeBrekUp(tagids, fromdate, todate, ownerid, employeeid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/employees/breakupbyemployeecount/tagids/' + tagids + '/fromdate/' + fromdate + '/todate/' + todate + '/ownerid/' + ownerid + '/employeeid/' + employeeid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null) {
response.result = JSON.parse(response.result);
}
return response;
});
});
}
getEmployeeBrekUpDesignation(tagids, fromdate, todate, ownerid, employeeid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/employees/breakupemployeecountbydesignation/tagids/' + tagids + '/fromdate/' + fromdate + '/todate/' + todate + '/ownerid/' + ownerid + '/employeeid/' + employeeid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null) {
response.result = JSON.parse(response.result);
}
return response;
});
});
}
getEmployee(employeeid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/employees/getemployeebyid/employeeid/' + employeeid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
updateCheckList(workflowchecklistid, leadid, checkliststatus) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/leads/updatechecklist/workflowchecklistid/' + workflowchecklistid + '/leadid/' + leadid + '/checkliststatus/' + checkliststatus;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getChecklist(Leadid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/leads/getleadchecklists/leadid/' + Leadid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getalldistributornames() {
return __awaiter(this, void 0, void 0, function* () {
debugger;
const url = 'apis/v4/bizgaze/crm/employees/getalldistributornames';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new ContactManager();
return this._instance;
}
}
Managers.ContactManager = ContactManager;
})(Managers = Contacts.Managers || (Contacts.Managers = {}));
})(Contacts = Crm.Contacts || (Crm.Contacts = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":3,"file":"icontactmanager.js","sourceRoot":"","sources":["icontactmanager.ts"],"names":[],"mappings":""}
@@ -0,0 +1,87 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Designations;
(function (Designations) {
class DesigApplyTypes extends Unibase.Platform.Core.BaseComponent {
init() {
var instance = this;
instance.fileCacheHelper.loadJsFile('apps/crm/designations/managers/designationmanager.js', function () {
Bizgaze.Apps.Crm.Managers.DesignationManager.Instance().refreshDesigApplyTypes().then(function (response) {
MessageHelper.Instance().showSuccess(response, '');
});
});
}
ChangeDesignationStatus(designationid, statusid) {
var instance = this;
if (statusid == 2)
var msg = "Are you sure you want to De-Activate ?";
else
var msg = "Are you sure you want to Activate ?";
bootbox.confirm({
message: msg,
closeButton: false,
buttons: {
confirm: {
label: 'Yes',
className: 'btn-success'
},
cancel: {
label: 'No',
className: 'btn-danger'
}
},
callback: function (result) {
if (result) {
var Status = "";
var Statusid;
if (statusid == 2) {
Status = "Activate";
Statusid = 2;
$("#Id_" + designationid + "").removeClass('text-danger');
$("#Id_" + designationid + "").addClass('text-success');
}
else {
Status = "activate";
Statusid = 1;
$("#Id_" + designationid + "").removeClass('text-success');
$("#Id_" + designationid + "").addClass('text-danger');
}
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid").Value);
var postdata = {
designationid,
Statusid,
};
instance.fileCacheHelper.loadJsFile('apps/crm/designations/managers/designationmanager.js', function () {
Bizgaze.Apps.Crm.Managers.DesignationManager.Instance().ChangeDesignationStatus(postdata).then(function (response) {
if (response.status == Unibase.Data.Status.Success) {
var obj = Unibase.Themes.Compact.Components.Details.Instance();
obj._recordId = _recordId;
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var containerid = $("._bizgaze_detail_container:visible").attr("id");
Unibase.Platform.Helpers.NavigationHelper.Instance().close(containerid, null);
instance.navigationHelper.loadDetail(_recordId, _installedAppId, null);
MessageHelper.Instance().showSuccess(response.message, "");
}
else {
}
});
});
}
}
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new DesigApplyTypes();
return this._instance;
}
}
Designations.DesigApplyTypes = DesigApplyTypes;
})(Designations = Crm.Designations || (Crm.Designations = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));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FS,OAAO,KAAP,OAAO,QA8FhB"}
+1
View File
@@ -0,0 +1 @@
var Bizgaze;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends Unibase.Platform.Core.BaseComponent{init(){var t=this;t.fileCacheHelper.loadJsFile("apps/crm/designations/managers/designationmanager.js",function(){n.Apps.Crm.Managers.DesignationManager.Instance().refreshDesigApplyTypes().then(function(n){MessageHelper.Instance().showSuccess(n,"")})})}ChangeDesignationStatus(t,i){var r=this,u;u=i==2?"Are you sure you want to De-Activate ?":"Are you sure you want to Activate ?";bootbox.confirm({message:u,closeButton:!1,buttons:{confirm:{label:"Yes",className:"btn-success"},cancel:{label:"No",className:"btn-danger"}},callback:function(u){var f,e,o,s;u&&(f="",i==2?(f="Activate",e=2,$("#Id_"+t+"").removeClass("text-danger"),$("#Id_"+t+"").addClass("text-success")):(f="activate",e=1,$("#Id_"+t+"").removeClass("text-success"),$("#Id_"+t+"").addClass("text-danger")),o=Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+Unibase.Themes.Providers.DetailHelper.installedAppId+"_recordid").Value),s={designationid:t,Statusid:e},r.fileCacheHelper.loadJsFile("apps/crm/designations/managers/designationmanager.js",function(){n.Apps.Crm.Managers.DesignationManager.Instance().ChangeDesignationStatus(s).then(function(n){var t,i,u;n.status==Unibase.Data.Status.Success&&(t=Unibase.Themes.Compact.Components.Details.Instance(),t._recordId=o,i=Unibase.Themes.Providers.DetailHelper.installedAppId,u=$("._bizgaze_detail_container:visible").attr("id"),Unibase.Platform.Helpers.NavigationHelper.Instance().close(u,null),r.navigationHelper.loadDetail(o,i,null),MessageHelper.Instance().showSuccess(n.message,""))})}))}})}static Instance(){return this._instance===undefined&&(this._instance=new i),this._instance}}t.DesigApplyTypes=i})(i=t.Designations||(t.Designations={}))})(i=t.Crm||(t.Crm={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1,47 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Managers;
(function (Managers) {
class DesignationManager extends Unibase.Platform.Core.BaseManager {
refreshDesigApplyTypes() {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/designations/refreshdesigapplytypes/np';
return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
return response.message;
});
});
}
ChangeDesignationStatus(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/designation/changedesignationstatus';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new DesignationManager();
return this._instance;
}
}
Managers.DesignationManager = DesignationManager;
})(Managers = Crm.Managers || (Crm.Managers = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"designationmanager.js","sourceRoot":"","sources":["designationmanager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAU,OAAO,CAuChB;AAvCD,WAAU,OAAO;IACb,IAAiB,IAAI,CAqCpB;IArCD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAmCnB;QAnCD,WAAiB,GAAG;YAChB,IAAiB,QAAQ,CAiCxB;YAjCD,WAAiB,QAAQ;gBACrB,MAAa,kBAAmB,SAAQ,OAAO,CAAC,QAA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(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Bizgaze;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t extends Unibase.Platform.Core.BaseManager{refreshDesigApplyTypes(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/crm/designations/refreshdesigapplytypes/np","{}").then(function(n){return n.message})})}ChangeDesignationStatus(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/crm/designation/changedesignationstatus",n).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}static Instance(){return this._instance===undefined&&(this._instance=new t),this._instance}}n.DesignationManager=t})(t=n.Managers||(n.Managers={}))})(t=n.Crm||(n.Crm={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1 @@
{"version":3,"file":"idesignationmanager.js","sourceRoot":"","sources":["idesignationmanager.ts"],"names":[],"mappings":""}
@@ -0,0 +1,361 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Employees;
(function (Employees) {
let Components;
(function (Components) {
class EmployeeBreakUp extends Unibase.Platform.Core.BaseComponent {
constructor() {
super(...arguments);
this.dataXValue = '';
this.tableHtmlEmp = '';
this.isTrackingTable = '';
this.palettecolors = [];
this.onEditPalettes = '';
this.ownerid = 0;
this.ownername = '';
}
cssFiles() {
return ["libs/chartjs/chart.min.css"];
}
jsFiles() {
return ['apps/crm/employees/components/employee_breakup_table.js', 'libs/chartjs/chart.min.js', 'apps/crm/contacts/managers/contactmanager.js'];
}
html(id, containerid) {
let html = ``;
return html;
}
load(id, containerid, callback) {
}
init(containerid) {
var instance = this;
instance.loadMenu(containerid);
}
loadMenu(containerid) {
var instance = this;
$(`.${containerid}`).append(`<div class="card mb-0 border-0 BindData_` + containerid + ` findcontainer h-100" style="background:0 0">
<div class="card-header d-flex justify-content-between align-items-center py-2 px-3 search-bar-main-wrapper position-sticky t-0 bg-white z-index-2 border-0 viewer-header" id="ViewerHeader_` + containerid + `">
<span class="biz-highlight-bg-color text-left">Employee BreakUp Tenure</span>
<div class="text-right d-flex">
<div class="biz-select2-wrap"><select class="distributor_val form-control"><option></option></select></div>
<div id="select_new_Palette_Section" class="d-none floating-label-form-group-with-value select_new_Palette_Section">
<select id="select_new_Palette" class="form-control type-control required value-control dropdown_phonetype select_new_Palette" placeholder="Select" data-placeholder="Select" data-label="Palette" data-isparent="false">
</select>
</div>
<div class="popuptable btn-flush-biz-theme btn btn-icon btn-rounded flush-soft-hover h-30p w-30p ">
<span class="btn-icon-wrap"> <i class="las la-table font-18 text-grey text-dark tableiconempchart"> </i></span>
</div>
</div>
</div>
<div class="card-body p-2 userDesignWidgetCardBody ">
<ul class="lob_summary row px-3" id="lob_summary"></ul>
<div class="text-danger d-none w-100 font-12">* The Outstanding data will be auto-refreshed for every 24 hours.</div>
</div>
</div>`);
$(".designsPreviewAppend").find(".select_new_Palette_Section").removeClass("d-none");
let height = $(`#${containerid}`).siblings('#hf_portletwidgetheight').val();
if (height != '0px') {
$('.userDesignWidgetCardBody').css({ "height": `` + height + ``, "overflow-x": "hidden" }).addClass("added biz-custom-scrollbar");
}
instance.fileCacheHelper.loadJsFiles(['apps/crm/palettes/managers/palettemanager.js', "libs/chartjs/chart.min.js"], () => {
Bizgaze.Apps.Crm.Palettes.Managers.PaletteManager.Instance().getPallettes().then((res) => {
var instance = this;
if (res.length != 0) {
let data = Array();
for (let p = 0; p < res.result.length; p++) {
data.push(res.result[p]);
}
data.sort(function (a, b) {
var a1 = a.palletteid, b1 = b.palletteid;
if (a1 == b1)
return 0;
return a1 > b1 ? 1 : -1;
});
for (let z = 0; z < data.length; z++) {
let palletId = data[z].palletteid;
let palletName = data[z].pallettename;
let html = '';
if (z == 0) {
html = `<option value='` + palletId + `' selected >` + palletName + `</option>`;
}
else {
html = `<option value='` + palletId + `' >` + palletName + `</option>`;
}
$('.select_new_Palette').append(html);
}
let palettid = '';
$('.designsPreviewAppend').find(".select_new_Palette").change(function () {
instance.onEditPalettes = $(this).find(":checked").val().toString();
});
$(`.BindData_` + containerid + ``).find(".select_new_Palette option").each(function () {
var val = $(this).val();
if (val == instance.onEditPalettes) {
$(`.BindData_` + containerid + ``).find(".select_new_Palette option").removeAttr("checked");
$(this).attr('selected', 'selected');
}
});
palettid = instance.onEditPalettes;
$(`.BindData_` + containerid + ``).find(".select_new_Palette").change(function () {
$(".lob_summary").html('');
palettid = $(this).find(":checked").val().toString();
instance.loadPaletts(palettid, containerid);
});
if (palettid.length == 0) {
palettid = $(`.BindData_` + containerid + ``).find(".select_new_Palette").find(":checked").val().toString();
instance.loadPaletts(palettid, containerid);
}
else {
instance.loadPaletts(palettid, containerid);
}
}
});
});
instance.distributeVal();
}
loadPaletts(palettid, containerid) {
let instance = this;
Bizgaze.Apps.Crm.Palettes.Managers.PaletteManager.Instance().getPalletteColors(palettid).then((response) => {
var data = Array();
for (let i = 0; i < response.result.length; i++) {
data.push(response.result[i]);
}
data.sort(function (a, b) {
var a1 = a.palletteindex, b1 = b.palletteindex;
if (a1 == b1)
return 0;
return a1 > b1 ? 1 : -1;
});
this.palettecolors = [];
for (let i = 0; i < data.length; i++) {
if (i < 2) {
let getcolor = data[i].colorcode;
this.palettecolors.push(getcolor);
}
}
var fromDate = "";
var toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
fromDate = fromDate.replace('/', '-').replace('/', '-');
toDate = toDate.replace('/', '-').replace('/', '-');
instance.fileCacheHelper.loadJsFiles(['apps/crm/contacts/managers/contactmanager.js', "apps/crm/employees/components/employee_breakup_table.js", "libs/chartjs/chart.min.js"], () => {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getEmployeeBrekUp("0", fromDate, toDate, instance.ownerid, 0).then(function (response) {
var _a;
var data = response.result;
if (((_a = response.result) === null || _a === void 0 ? void 0 : _a.length) > 0) {
instance.dataXValue = response.result;
instance.createChart(containerid);
instance.createTable(containerid);
}
});
});
});
$('.distributor_val').off().on("change", function () {
return __awaiter(this, void 0, void 0, function* () {
instance.ownerid = +$(this).find(":checked").val();
instance.ownername = $(this).find(":checked").text();
$("#lob_summary").html('');
instance.loadPaletts(palettid, containerid);
$('.distributor_val').select2({
placeholder: 'please Select Distributor',
allowClear: true,
data: instance.ownername
});
});
});
}
createChart(containerid) {
var instance = this;
var fromDate = "";
var toDate = "";
var cf_fromDate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_FromDate;
var cf_toDate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_ToDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
fromDate = fromDate.replace('/', '-').replace('/', '-');
toDate = toDate.replace('/', '-').replace('/', '-');
var OwnerId = $('#hfContactId').val();
if (OwnerId == undefined)
OwnerId = 0;
var employeeId = $('#hfSalesPersonId').val();
if (employeeId == undefined)
employeeId = 0;
instance.fileCacheHelper.loadJsFiles(['apps/crm/contacts/managers/contactmanager.js', "libs/chartjs/chart.min.js"], () => {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getEmployeeBrekUpDesignation("0", fromDate, toDate, instance.ownerid, 0).then(function (response) {
if (response.result.length > 0) {
let chartHtml = `<li class="col-sm-12"><div><canvas id="employeeBreakupChart" style="max-height:450px"></canvas></div></li>`;
$(`#${containerid}`).find('.lob_summary').html(chartHtml);
$('.popuptable').off().click(function (e) {
var instanceTableObj = Bizgaze.Apps.Crm.Employees.Components.EmployeeBreakUpTable.Instance();
Unibase.Platform.Helpers.NavigationHelper.Instance().popup(0, '', instanceTableObj, null, Unibase.Platform.Helpers.Size.DockLeft);
});
let labelsPreProcess = instance.dataXValue;
let xValues = [];
let active = [];
let inActive = [];
for (let i = 0; i < labelsPreProcess.length; i++) {
xValues.push(labelsPreProcess[i].Month);
active.push(labelsPreProcess[i].Active);
inActive.push(labelsPreProcess[i].DeActive);
}
inActive.push(0);
let barOneColor, barTwoColor;
let pal = instance.palettecolors;
if (pal.length != 0) {
for (let i = 0; i < pal.length; i++) {
if (i == 0) {
barOneColor = pal[i];
}
if (i == 1) {
barTwoColor = pal[i];
}
}
}
else {
barOneColor = '#117899';
barTwoColor = '#f16c20';
}
let chartElement = document.getElementById("employeeBreakupChart").getContext('2d');
let myChart = new Chart(chartElement, {
type: 'bar',
data: {
labels: xValues,
datasets: [{
label: 'Active',
data: active,
backgroundColor: barOneColor
}, {
label: 'InActive',
data: inActive,
backgroundColor: barTwoColor
}]
},
options: {
plugins: {
legend: {
position: "bottom",
align: "middle"
}
}
}
});
}
});
});
}
createTable(tagIds) {
var instance = this;
var fromDate = "";
var toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
fromDate = fromDate.replace('/', '-').replace('/', '-');
toDate = toDate.replace('/', '-').replace('/', '-');
var OwnerId = $('#hfContactId').val();
if (OwnerId == undefined)
OwnerId = 0;
var employeeId = $('#hfSalesPersonId').val();
if (employeeId == undefined)
employeeId = 0;
instance.fileCacheHelper.loadJsFiles(['apps/crm/contacts/managers/contactmanager.js', "libs/chartjs/chart.min.js"], () => {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getEmployeeBrekUpDesignation("0", fromDate, toDate, instance.ownerid, 0).then(function (response) {
if (response.result.length > 0) {
var data = response.result;
var total = 0;
$('.dist-active').empty();
let html = '';
for (var i = 0; i < data.length; i++) {
html = html + `
<li style="border-bottom: 0;" class="list-group-item data-list-item biz-transparent-text-color remove-bb no-background list-border-color">
<div class="row d-flex align-items-center">
<div class="col-8 list-item-main-title" > ${data[i].Designation} </div>
<div class="col-4 text-center" > ${data[i].Active} </div>
</div>
</li>
`;
total += Number(data[i].Active);
}
html = html + `<li style="border-bottom: 0!important;" class="list-group-item data-list-item biz-transparent-text-color no-background list-border-color">
<div class="row d-flex align-items-center" >
<div class="col-8 list-item-main-title" > Total </div>
<div class="col-4 text-center list-item-main-title" > ${total} </div>
</div>
</li>`;
instance.tableHtmlEmp = html;
}
});
});
}
distributeVal() {
this.fileCacheHelper.loadJsFiles(['apps/crm/contacts/managers/contactmanager.js'], function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getalldistributornames().then(function (res) {
debugger;
if (res != null) {
let data = [];
for (let i = 0; i < res.result.length; i++) {
let TenantId = res.result[i].tenantid;
let TenantName = res.result[i].tenantname;
data.push({ id: TenantId, text: TenantName });
}
$('.distributor_val').select2({
placeholder: 'please Select Distributor',
allowClear: true,
data: data
});
}
});
});
$('.distributor_val').parents(".text-right.d-flex").find("[role=textbox]").html("");
}
static Instance() {
if (this.instance === undefined) {
this.instance = new EmployeeBreakUp();
}
return this.instance;
}
}
Components.EmployeeBreakUp = EmployeeBreakUp;
})(Components = Employees.Components || (Employees.Components = {}));
})(Employees = Crm.Employees || (Crm.Employees = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,95 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Employees;
(function (Employees) {
let Components;
(function (Components) {
class EmployeeBreakUpTable extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
this.navigationhelper = Unibase.Platform.Helpers.NavigationHelper.Instance();
}
cssFiles() {
return [];
}
jsFiles() {
return ["apps/communications/events/managers/gallerymanager.js", "apps/communications/events/components/shareimage.js"];
}
load(id, containerid, callback) {
let Instance = this;
$('.closeBtnEmp').click(function (e) {
Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp();
});
let tableHTML = '';
let headers = '';
tableHTML = Bizgaze.Apps.Crm.Employees.Components.EmployeeBreakUp.Instance().tableHtmlEmp;
headers = `
<div class="col-8">Designation</div>
<div class="col-4 text-center">Active</div>
`;
if (tableHTML == '') {
$('.listEmpContainer').addClass('d-none');
$('.nodataemp').removeClass('d-none');
return;
}
$('.empContainerInner').find('.appendEmpList').html(tableHTML);
$('.empContainerInner').find('.headerempsloc').html(headers);
}
init(containerid) {
}
html(id, containerid) {
let html = `
<div class="empContainer p-2">
<div class="empContainerInner">
<div class="listEmpContainer card border-0" >
<div class="card-header Templateheader">
<div id="layout_list_header" class="biz-list-header biz-transparent-text-color no-background list-border-color">
<div class="row biz-list-header d-flex align-items-center headerempsloc">
</div>
</div>
</div>
<div data-simplebar="init" class="bg-white-s bg-white-removed simple-scroll-bar templateviewer-body pb-15">
<ul style="height: 82vh;overflow-y: auto;" class="list-group layout_list_container appendEmpList font-14 ">
</ul>
</div>
</div>
<div class="nodataemp d-none text-center">
<div class="alert alert-primary text-center mb-0 border-0 rounded-0 w-100 font-14">No data available</div>
</div>
</div>
<footer class="p-2" style="position: fixed;bottom: 0;">
<button class="closeBtnEmp btn bg-danger text-white">Close</button>
</footer>
</div>
`;
return html;
}
loadEmpTable() {
console.log('.loadEmpTable');
}
static Instance() {
if (this.instance === undefined) {
this.instance = new EmployeeBreakUpTable();
}
return this.instance;
}
}
Components.EmployeeBreakUpTable = EmployeeBreakUpTable;
})(Components = Employees.Components || (Employees.Components = {}));
})(Employees = Crm.Employees || (Crm.Employees = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"employee_breakup_table.js","sourceRoot":"","sources":["employee_breakup_table.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CA8HhB;AA9HD,WAAU,OAAO;IACb,IAAiB,IAAI,CA4HpB;IA5HD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CA0HnB;QA1HD,WAAiB,GAAG;YAChB,IAAiB,SAAS,CAwHzB;YAxHD,WAAiB,SAAS;gBACtB,IAAiB,UA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,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;wBAGjE,CAAC;wBAID,IAAI,CAAC,WAAW;wBAChB,CAAC;wBAED,IAAI,CAAC,EAAE,EAAE,WAAW;4BAIhB,IAAI,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BtC,CAAC;4BAC0B,OAAO,IAAI,CAAC;wBAChB,CAAC;wBAGD,YAAY;4BACR,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;wBAChC,CAAC;wBAOD,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;gCAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAoB,EAAE,CAAC;6BAC9C;4BACD,OAAO,IAAI,CAAC,QAAQ,CAAC;wBACzB,CAAC;qBACJ;oBApHY,+BAAoB,uBAoHhC,CAAA;gBACL,CAAC,EAtHgB,UAAU,GAAV,oBAAU,KAAV,oBAAU,QAsH1B;YACL,CAAC,EAxHgB,SAAS,GAAT,aAAS,KAAT,aAAS,QAwHzB;QACL,CAAC,EA1HgB,GAAG,GAAH,QAAG,KAAH,QAAG,QA0HnB;IACL,CAAC,EA5HgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QA4HpB;AACL,CAAC,EA9HS,OAAO,KAAP,OAAO,QA8HhB"}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,122 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Employees;
(function (Employees) {
let Components;
(function (Components) {
class EmployeeLocationTable extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
this.navigationhelper = Unibase.Platform.Helpers.NavigationHelper.Instance();
}
cssFiles() {
return [];
}
jsFiles() {
return ["apps/communications/events/managers/gallerymanager.js", "apps/communications/events/components/shareimage.js"];
}
load(id, containerid, callback) {
let Instance = this;
$('.closeBtnEmp').click(function (e) {
Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp();
});
let isTrackingTable = Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().isTrackingTable;
let tableHTML = '';
let headers = '';
debugger;
if (isTrackingTable) {
tableHTML = Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().trackingTodayHTML;
Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().isTrackingTable = false;
headers = `<div class="col-sm-4">Accuracy</div>
<div class="col-sm-4">Time</div>
<div class="col-sm-4">Address</div>`;
}
else {
tableHTML = Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().tableHtmlEmp;
headers = `
<div class="col-sm-2">Time</div>
<div class="col-sm-5">Address</div>
<div class="col-sm-2">Distance(K.M)</div>
<div class="col-sm-2">Duration</div>
<div class="col-sm-1 text-center"><i class="fa fa-battery-full"></i></div>`;
}
if (tableHTML == '') {
$('.listEmpContainer').addClass('d-none');
$('.nodataemp').removeClass('d-none');
return;
}
$('.empContainerInner').find('.appendEmpList').parent().addClass('p-0');
$('.empContainerInner').find('.appendEmpList').html(tableHTML);
$('.empContainerInner').find('.headerempsloc').html(headers);
}
init(containerid) {
}
html(id, containerid) {
let htmlw = ` <div class="empContainer p-3">
<div class="empContainerInner">
<table id='table-data' class='w-100 table'>
<thead>
<tr>
<th class="mnw-225p d-none">Name</th>
<th class="mnw-225p d-none">Time</th>
<th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Name</th>
<th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Time</th>
<th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Address</th>
<th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Distance(K.M)</th>
<th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Duration</th>
</tr>
</thead>
<tbody></tbody>
</table>
<div class="nodataemp d-none text-center"></div>
</div>
<footer class="p-2" style="position: fixed;bottom: 0;">
<button class="closeBtnEmp btn bg-danger text-white">Close</button>
</footer>
</div>`;
let html = `<div class="empContainer p-2">
<div class="empContainerInner">
<div class="listEmpContainer card border-0" >
<div class="card-header d-md-block d-sm-none Templateheader">
<div id="layout_list_header" class="biz-transparent-text-color no-background list-border-color">
<div class="row biz-list-header d-flex align-items-center headerempsloc">
</div>
</div>
</div>
<div data-simplebar class="bg-white-s bg-white-removed simple-scroll-bar templateviewer-body pb-15 scrollable">
<ul class="list-group layout_list_container appendEmpList font-14 ">
</ul>
</div>
</div>
<div class="nodataemp d-none text-center">
<div class="alert alert-primary text-center mb-0 border-0 rounded-0 w-100 font-14">No data available</div>
</div>
</div>
<footer class="p-2" style="position: fixed;bottom: 0;">
<button class="closeBtnEmp btn bg-danger text-white">Close</button>
</footer>
</div>`;
return html;
}
loadEmpTable() {
console.log('.loadEmpTable');
}
static Instance() {
if (this.instance === undefined) {
this.instance = new EmployeeLocationTable();
}
return this.instance;
}
}
Components.EmployeeLocationTable = EmployeeLocationTable;
})(Components = Employees.Components || (Employees.Components = {}));
})(Employees = Crm.Employees || (Crm.Employees = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"employee_locations_table.js","sourceRoot":"","sources":["employee_locations_table.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAkKhB;AAlKD,WAAU,OAAO;IACb,IAAiB,IAAI,CAgKpB;IAhKD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CA8JnB;QA9JD,WAAiB,GAAG;YAChB,IAAiB,SAAS,CA4JzB;YA5JD,WAAiB,SAAS;gBACtB,IAAiB,UAAU,CA0J1B;gBA1JD,WAAiB,UAAU;oBACvB,MAAa,qBAAsB,SA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AAG,QA8JnB;IACL,CAAC,EAhKgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAgKpB;AACL,CAAC,EAlKS,OAAO,KAAP,OAAO,QAkKhB"}
@@ -0,0 +1,233 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Employees;
(function (Employees) {
let Components;
(function (Components) {
class MeterReading extends Unibase.Platform.Core.BaseComponent {
constructor() {
super(...arguments);
this._bizgazegps_widget_gpsverification_Index = 0;
this._bizgazegps_widget_CallBack = 0;
this._meterTripId = 0;
}
cssFiles() {
return [];
}
jsFiles() {
return ['apps/transact/managers/expenses/expensemanager.js', 'apps/crm/employees/managers/gpslocationmanager.js', 'apps/crm/employees/components/w_employeeroute.js'];
}
html(id, containerid) {
var html = `<input type="hidden" value="0" id="hfMeterStatus" />
<input type="hidden" id="hfMeterReadingId" value="0" />
<input type="hidden" id="hfStartDate" value="0" />
<input type="hidden" id="hfStartReading" value="0" /><input type="hidden" id="hfVehicleId" value="0" />
<header class="header b-b bg-green-lt">
<p class="h4">
Meter Reading
</p>
<div class="pull-right btn-group">
<a class="btn btn-sm mr-auto btn-close" href="javascript:;" title="close" id="BtnMeterClose"><i class="fa fa-times"></i></a>
</div>
</header>
<section class="scrollable">
<div class="wrapper clear">
<div class="loadVehicleType hidden">
<div class="row1">
<div class="col-sm-12">
<div class="form-group floating-label-form-group floating-label-form-group-with-value">
<label for="cmdVehicleType">Vehicle Type<span class="text-danger"> *</span></label>
<select id="cmdVehicleType" data-required="true" class="form-control"></select>
</div>
</div>
</div>
<div class="row1">
<div class="col-sm-12">
<div class="form-group floating-label-form-group">
<label for="lblStartReading">Start Reading<span class="text-danger"> *</span></label>
<input type="text" class="form-control required" id="txtStartReading" maxlength="50" placeholder="Start reading..." />
</div>
</div>
</div>
</div>
<div class="loadCalim1 hidden">
<div class="row1">
<div class="col-sm-12">
<div class="form-group floating-label-form-group floating-label-form-group-with-value">
<label for="cmdCalimType">Expense Type<span class="text-danger"> *</span></label>
<select id="cmdCalimType" data-required="true" class="form-control"></select>
</div>
</div>
</div>
<div class="row1">
<div class="col-sm-12">
<div class="form-group floating-label-form-group">
<label for="lblEndReading">End Reading<span class="text-danger"> *</span></label>
<input type="text" class="form-control required" id="txtEndReading" maxlength="50" placeholder="End reading..." />
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="footer">
<a href="javascript:;" id="btnSaveMeterReading" class="btn btn-primary btn-lg btn-block"> Save Changes </a>
</footer>`;
return html;
}
load(id, containerid, callback) {
var instance = this;
$("#hfMeterStatus").val(instance.meterStatus);
if ($("#hfMeterStatus").val() == "1") {
$(".loadVehicleType").removeClass("hidden");
instance.loadVehicleType();
}
else {
$(".loadCalim1").removeClass("hidden");
instance.loadCalim1();
}
$("#btnSaveMeterReading").click(function () {
instance.saveTripMeterReading();
});
$("#BtnMeterClose").click(function () {
$('#' + containerid).modal('hide');
$('#' + containerid).remove();
});
}
loadPop(meterStatus, meterReadingId, meterTripId, callback) {
var instance = this;
instance.navigationHelper.popup(0, '', Bizgaze.Apps.Crm.Employees.Components.MeterReading.Instance(), null, Unibase.Platform.Helpers.Size.DockLeft);
instance._bizgazegps_widget_CallBack = callback;
instance._meterTripId = meterTripId;
instance.meterStatus = meterStatus;
}
GetMeterReading(meterReadingId) {
Bizgaze.Apps.Crm.Employees.Managers.GpsLocationmanager.Instance().GetMeterReading(meterReadingId).then(function (response) {
if (response.result != null) {
var data = response.result;
$("#hfMeterReadingId").val(data.meterReadingId);
$("#hfStartDate").val(data.startDate);
$("#hfStartReading").val(data.startReading);
$("#hfVehicleId").val(data.vehicleId);
}
});
}
loadVehicleType() {
Bizgaze.Apps.Transact.Managers.Expenses.ExpenseManager.Instance().getVehicleType().then(function (response) {
var cmdVehicleTypes = document.getElementById('cmdVehicleType');
$('#cmdVehicleType').empty();
var defaultOpt = document.createElement("option");
defaultOpt.text = "--Select--";
defaultOpt.value = "";
cmdVehicleTypes.append(defaultOpt);
for (var i = 0; i < response.result.length; i++) {
var opt = document.createElement("option");
opt.text = response.result[i].vehiclename;
opt.value = response.result[i].vehicleid;
cmdVehicleTypes.append(opt);
}
});
}
loadCalim1() {
Bizgaze.Apps.Transact.Managers.Expenses.ExpenseManager.Instance().getDraftExpenseByContact().then(function (response) {
var cmdCalimType = document.getElementById('cmdCalimType');
$('#cmdCalimType').empty();
var defaultOpt = document.createElement("option");
defaultOpt.text = "--Select--";
defaultOpt.value = "";
cmdCalimType.append(defaultOpt);
for (var i = 0; i < response.result.length; i++) {
var opt = document.createElement("option");
opt.text = response.result[i].expensename;
opt.value = response.result[i].expenseid;
cmdCalimType.append(opt);
}
});
}
saveTripMeterReading() {
let instance = this;
let StartDate;
var StartReading = $("#txtStartReading").val();
var vehicleTypeId = Number($("#cmdVehicleType").val());
if ($("#hfMeterReadingId").val() != 0) {
StartReading = $("#hfStartReading").val();
StartDate = $("#hfStartDate").val();
vehicleTypeId = Number($("#hfVehicleId").val());
}
var tripGroupStatus = "";
if ($("#hfMeterReadingId").val() == 0)
tripGroupStatus = 'Started';
else if ($("#hfTripGroupStatus").val() == "Started") {
tripGroupStatus = 'Completed';
}
var tripStatus = 'Started';
if (instance._meterTripId != 0)
tripStatus = 'Completed';
if ($('#hfSeletedRouteId').val() == 0) {
MessageHelper.Instance().showError("RouteId is going to 0,please select one route", "");
return null;
}
var postData = {
RouteId: Number($('#hfSeletedRouteId').val()),
TripGroupId: Number($("#hfTripGroupId").val()),
TripGroupName: $("#hfBizgaze_GpsTripGroupName").val(),
TripGroupStatus: 1,
TripId: instance._meterTripId,
ToAddressId: 0,
RefGuid: null,
TripStatus: 1,
MeterReadingId: Number($("#hfMeterReadingId").val()),
VehicleTypeId: vehicleTypeId,
StartDate: (StartDate == undefined || StartDate == "0") ? new Date() : StartDate,
EndDate: null,
StartReading: parseFloat(StartReading.toString()),
EndReading: $("#txtEndReading").val() == '' ? 0 : parseFloat($("#txtEndReading").val().toString()),
};
Bizgaze.Apps.Crm.Employees.Managers.GpsLocationmanager.Instance().saveTripMeterReading(postData).then(function (response) {
var Id = response.result.MeterReadingId;
var tripGroupId = response.result.TripGroupId;
$("#hfTripGroupId").val(tripGroupId);
var tripGroupStatus = response.result.TripGroupStatus;
$("#hfTripGroupStatus").val(tripGroupStatus);
$("#hfMeterReadingId").val(Id);
var tripId = response.result.MeterTripId;
instance._bizgazegps_widget_CallBack = tripId;
if (instance._meterTripId == 0) {
$(".btnStopTrip").removeClass('hidden');
$(".btnStartTrip").addClass('hidden');
Bizgaze.Apps.Crm.Employees.Components.EmployeeRoute.Instance().loadRouteMap($('#hfSeletedRouteId').val());
}
else {
$(".btnStopTrip").addClass('hidden');
$(".btnStartTrip").removeClass('hidden');
}
instance._meterTripId = tripId;
$("#modal_divGpsMeterReading").modal('hide');
});
}
static Instance() {
if (this.instance === undefined) {
this.instance = new MeterReading();
}
return this.instance;
}
}
Components.MeterReading = MeterReading;
})(Components = Employees.Components || (Employees.Components = {}));
})(Employees = Crm.Employees || (Crm.Employees = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,105 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Employees;
(function (Employees) {
let Components;
(function (Components) {
class Termination extends Unibase.Platform.Core.BaseComponent {
cssFiles() {
return [];
}
jsFiles() {
return [''];
}
html(id, containerid) {
return "";
}
init(containerid) {
}
load(id, containerid, callback) {
}
Termination() {
let detailContainer = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
let refstatusId = (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.filter(function (o) {
return o.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_refstatusid";
})[0].Value);
let stageName = (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.filter(function (o) {
return o.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_stagename";
})[0].Value);
var instance = this;
$("#" + detailContainer).find('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_Termination').click(function () {
let uniqueid = 'bizgazecrm_contacts_terminate';
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(['platform/forms/managers/formmanager.js', 'platform/forms/components/formviewer/formviewer.js', 'platform/forms/requests/forms.js'], function () {
Unibase.Platform.Forms.Managers.FormManager.Instance().getFormbyUniqueId(uniqueid).then(function (res) {
var formid = res.result.FormId;
var successobj = {
CallBack: function () {
var employeeid = (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.filter(function (o) {
return o.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_employeeid";
})[0].Value);
debugger;
instance.TerminationStage(employeeid);
},
Parameters: null,
};
var formviewerObj = {
FormId: formid,
AppConfigurationId: 0,
Pk_Value: 0,
PortletWidgetId: 0,
OnSuccess: successobj,
OnFail: null,
OnLoad: null,
};
Unibase.Platform.Forms.Components.FormViewer.Instance().init(formviewerObj);
});
});
});
}
TerminationStage(employeeid) {
var instance = this;
var jsfiles = ['apps/crm/employees/components/termination.js', 'apps/crm/employees/managers/employeemanager.js'];
instance.fileCacheHelper.loadJsFiles(jsfiles, function (response) {
Bizgaze.Apps.Crm.Employees.Managers.EmployeeManager.Instance().TerminationStage(employeeid).then(function (response) {
MessageHelper.Instance().showSuccess(response.message, '');
var detailobj = Unibase.Themes.Compact.Components.Details.Instance();
detailobj._recordId = Unibase.Themes.Providers.DetailHelper.recordId;
detailobj._installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
detailobj._containerId = instance.navigationHelper.getLastContainerId();
var IdetailObj = detailobj;
detailobj.loadPortlets(IdetailObj);
instance.Termination();
});
});
}
calendar() {
const dateFormat = moment().format("DD/MM/YYYY");
$(".date_finalsettlementdate").daterangepicker({
startDate: dateFormat,
autoUpdateInput: false,
singleDatePicker: true,
showDropdowns: true,
minYear: 1901,
minDate: dateFormat,
locale: {
format: 'DD/MM/YYYY',
firstDay: 1,
},
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new Termination();
return this._instance;
}
}
Components.Termination = Termination;
})(Components = Employees.Components || (Employees.Components = {}));
})(Employees = Crm.Employees || (Crm.Employees = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"termination.js","sourceRoot":"","sources":["termination.ts"],"names":[],"mappings":"AAEA,IAAU,OAAO,CAkGhB;AAlGD,WAAU,OAAO;IACb,IAAiB,IAAI,CAgGpB;IAhGD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CA8FnB;QA9FD,WAAiB,GAAG;YAChB,IAAiB,SAAS,CA4FzB;YA5FD,WAAiB,SAAS;gBACtB,IAAiB,UAAU,CA0F1B;gBA1FD,WAAiB,UAAU;oBACvB,MAAa,WAAY,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;wBAChE,QAAQ;4BACJ,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,OAAO;4BACH,OAAO,CAAC,EAAE,CAAC,CAAC;wBAChB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB;4BAC7B,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,IAAI,CAAC,WAAW;wBAEhB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB,EAAE,QAAkB;wBAErD,CAAC;wBAED,WAAW;4BACP,IAAI,eAAe,GAAG,CAAC,CAAC,oCAAoC,CAAC,CAAC;4BAC9D,IAAI,WAAW,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC;gCACrG,OAAO,CAAC,CAAC,GAAG,KAAK,KAAK,GAAG,OAAO,CAAC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S,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;oCACrE,SAAS,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,QAAQ,CAAC;oCACrE,SAAS,CAAC,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,cAAc,CAAC;oCACjF,SAAS,CAAC,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oCAClG,IAAI,UAAU,GAAG,SAA6C,CAAC;oCAC/D,SAAS,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;oCACnC,QAAQ,CAAC,WAAW,EAAE,CAAC;gCAE3B,CAAC,CAAC,CAAC;4BACP,CAAC,CAAC,CAAC;wBACP,CAAC;wBAED,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;gCAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,WAAW,EAAE,CAAC;4BACvC,OAAO,IAAI,CAAC,SAAS,CAAC;wBAC1B,CAAC;qBACJ;oBAvFY,sBAAW,cAuFvB,CAAA;gBAEL,CAAC,EA1FgB,UAAU,GAAV,oBAAU,KAAV,oBAAU,QA0F1B;YACL,CAAC,EA5FgB,SAAS,GAAT,aAAS,KAAT,aAAS,QA4FzB;QACL,CAAC,EA9FgB,GAAG,GAAH,QAAG,KAAH,QAAG,QA8FnB;IACL,CAAC,EAhGgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAgGpB;AACL,CAAC,EAlGS,OAAO,KAAP,OAAO,QAkGhB"}
@@ -0,0 +1,72 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Employees;
(function (Employees) {
let Components;
(function (Components) {
class ChangeBranch extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
}
cssFiles() {
return [];
}
jsFiles() {
return [''];
}
html(id, containerid) {
return "";
}
init(containerid) {
var instance = this;
}
load(id, containerid, callback) {
}
changeDefaultBranch(id) {
var instance = this;
var _recordId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid").Value);
instance.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
instance.fileCacheHelper.loadJsFile("tenants/themes/compact/components/details/details.js", function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().changedefaultbranch(_recordId, id).then(function (response) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
});
});
});
}
DeleteDefaultBranch(id) {
bootbox.confirm("Are You Sure You Want to Delete this Branch ?", function (result) {
if (result == true) {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().deletedefaultbranch(id).then(function (response) {
var detail_instance = Unibase.Themes.Compact.Components.Details.Instance();
var containerid = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
var _installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var portletid = detail_instance.unibase_core_activeportletid;
detail_instance.loadWidgets(_installedAppId, portletid, "#" + containerid + "");
MessageHelper.Instance().showSuccess(response.message, '');
});
});
}
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new ChangeBranch();
return this._instance;
}
}
Components.ChangeBranch = ChangeBranch;
})(Components = Employees.Components || (Employees.Components = {}));
})(Employees = Crm.Employees || (Crm.Employees = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"w_changebranch.js","sourceRoot":"","sources":["w_changebranch.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAwDhB;AAxDD,WAAU,OAAO;IACb,IAAiB,IAAI,CAsDpB;IAtDD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAoDnB;QApDD,WAAiB,GAAG;YAChB,IAAiB,SAAS,CAkDzB;YAlDD,WAAiB,SAAS;gBACtB,IAAiB,UAAU,CAgD1B;gBAhDD,WAAiB,UAAU;oBACvB,MAAa,YAAa,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;wBACjE;4BACI,KAAK,EAAE,CAAC;wBACZ,CAAC;wBACD,QAAQ;4BACJ,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,OAAO;4BACH,OAAO,CAAC,EAAE,CAAC,CAAC;wBAChB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB;4BAC7B,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,IAAI,CAAC,WAAW;4BACZ,IAAI,QAAQ,GAAG,IAAI,CAAC;wBAExB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB,EAAE,QAAkB;wBAErD,CAAC;wBACD,mBAAmB,CAAC,EAAE;4BAClB,QAAQ,CAAC;4BACT,IAAI,QAAQ,GAAG,IAAI,CAAC;4BACpB,IAAI,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,cAAc,GAAG,WAAW,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gD1B;YACL,CAAC,EAlDgB,SAAS,GAAT,aAAS,KAAT,aAAS,QAkDzB;QACL,CAAC,EApDgB,GAAG,GAAH,QAAG,KAAH,QAAG,QAoDnB;IACL,CAAC,EAtDgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAsDpB;AACL,CAAC,EAxDS,OAAO,KAAP,OAAO,QAwDhB"}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,42 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Employees;
(function (Employees) {
let Managers;
(function (Managers) {
class EmployeeManager extends Unibase.Platform.Core.BaseManager {
TerminationStage(employeeid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/employees/terminationstage/employeeid/' + employeeid;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new EmployeeManager();
return this._instance;
}
}
Managers.EmployeeManager = EmployeeManager;
})(Managers = Employees.Managers || (Employees.Managers = {}));
})(Employees = Crm.Employees || (Crm.Employees = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"employeemanager.js","sourceRoot":"","sources":["employeemanager.ts"],"names":[],"mappings":";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-0,0 +1,174 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Employees;
(function (Employees) {
let Managers;
(function (Managers) {
class GpsLocationmanager extends Unibase.Platform.Core.BaseManager {
getLocations(url) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
GetGPSTrackingCount(fromdate) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/employees/getgpsusertrackingcount/fromdate/' + fromdate;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
SaveGpsUser(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/GPS/savegpsuser';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
GetGpsUser(id) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/GPS/getgpsuser/employeeid/' + id;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
GetEmployees(branchid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/employees/getemployeelist/branchid/' + branchid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
GetGPSUSerDetails(detailstype, serverdate) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/GPS/getgpsuserdetails/detailstype/' + detailstype + '/fromdate/' + serverdate;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
GetCustomerDetailsByRouteId(RouteId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/contacts/getcustomerdetailsbyrouteid/routeid/' + RouteId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
SaveTrip(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/GPS/savetrip';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null)
return response;
});
});
}
SaveTripTrack(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/GPS/savetriptrack';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null)
return response;
});
});
}
GetRouteById(RouteId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/GPS/getroutebyid/routeid/' + RouteId;
return yield this.dataHelper().getAsync(url).then(function (response) {
return response;
});
});
}
GetMyMeterReading() {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/GPS/getmymeterreading';
return yield this.dataHelper().getAsync(url).then(function (response) {
return response;
});
});
}
GetMeterReading(meterReadingId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/GPS/MeterReading/meterid/' + meterReadingId;
return yield this.dataHelper().getAsync(url).then(function (response) {
return response;
});
});
}
saveTripMeterReading(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/GPS/savetripmeterreading';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null)
return response;
});
});
}
GetCustomerLocationsByTripGroupId(TripGroupId) {
return __awaiter(this, void 0, void 0, function* () {
debugger;
const url = 'apis/v4/bizgaze/crm/contacts/getcustomerlocationsbytripgroupid/tripgroupid/' + TripGroupId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getuserlocationsbyuseridanddatetime(userid, tracktime) {
return __awaiter(this, void 0, void 0, function* () {
debugger;
const url = 'apis/v4/bizgaze/crm/gpslocation/getuserlocationsbyuseridanddatetime/userid/' + userid + '/tracktime/' + tracktime;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new GpsLocationmanager();
return this._instance;
}
}
Managers.GpsLocationmanager = GpsLocationmanager;
})(Managers = Employees.Managers || (Employees.Managers = {}));
})(Employees = Crm.Employees || (Crm.Employees = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Bizgaze;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t extends Unibase.Platform.Core.BaseManager{getLocations(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().getAsync(n).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}GetGPSTrackingCount(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/employees/getgpsusertrackingcount/fromdate/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}SaveGpsUser(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/GPS/savegpsuser",n).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}GetGpsUser(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/GPS/getgpsuser/employeeid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}GetEmployees(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/employees/getemployeelist/branchid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}GetGPSUSerDetails(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/GPS/getgpsuserdetails/detailstype/"+n+"/fromdate/"+t;return yield this.dataHelper().getAsync(i).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}GetCustomerDetailsByRouteId(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/contacts/getcustomerdetailsbyrouteid/routeid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}SaveTrip(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/GPS/savetrip",n).then(function(n){if(n.result!==null)return n})})}SaveTripTrack(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/GPS/savetriptrack",n).then(function(n){if(n.result!==null)return n})})}GetRouteById(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/GPS/getroutebyid/routeid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n})})}GetMyMeterReading(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().getAsync("apis/v4/GPS/getmymeterreading").then(function(n){return n})})}GetMeterReading(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/GPS/MeterReading/meterid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n})})}saveTripMeterReading(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/GPS/savetripmeterreading",n).then(function(n){if(n.result!==null)return n})})}GetCustomerLocationsByTripGroupId(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/contacts/getcustomerlocationsbytripgroupid/tripgroupid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}getuserlocationsbyuseridanddatetime(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/bizgaze/crm/gpslocation/getuserlocationsbyuseridanddatetime/userid/"+n+"/tracktime/"+t;return yield this.dataHelper().getAsync(i).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}static Instance(){return this._instance===undefined&&(this._instance=new t),this._instance}}n.GpsLocationmanager=t})(t=n.Managers||(n.Managers={}))})(t=n.Employees||(n.Employees={}))})(t=n.Crm||(n.Crm={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1 @@
{"version":3,"file":"iemployeemanager.js","sourceRoot":"","sources":["iemployeemanager.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"version":3,"file":"igpslocationmanager.js","sourceRoot":"","sources":["igpslocationmanager.ts"],"names":[],"mappings":""}
+15
View File
@@ -0,0 +1,15 @@
var Unibase;
(function (Unibase) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Infos;
(function (Infos) {
class Designation {
}
Infos.Designation = Designation;
})(Infos = Crm.Infos || (Crm.Infos = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Unibase.Apps || (Unibase.Apps = {}));
})(Unibase || (Unibase = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"designation.js","sourceRoot":"","sources":["designation.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAgBhB;AAhBD,WAAU,OAAO;IACb,IAAiB,IAAI,CAcpB;IAdD,WAAiB,IAAI;QACjB,IAAkB,GAAG,CAYpB;QAZD,WAAkB,GAAG;YACjB,IAAiB,KAAK,CAUrB;YAVD,WAAiB,KAAK;gBAGlB,MAAa,WAAW;iBAKvB;gBALY,iBAAW,cAKvB,CAAA;YAEL,CAAC,EAVgB,KAAK,GAAL,SAAK,KAAL,SAAK,QAUrB;QACL,CAAC,EAZiB,GAAG,GAAH,QAAG,KAAH,QAAG,QAYpB;IACL,CAAC,EAdgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAcpB;AACL,CAAC,EAhBS,OAAO,KAAP,OAAO,QAgBhB"}
+1
View File
@@ -0,0 +1 @@
var Unibase;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t{}n.Designation=t})(t=n.Infos||(n.Infos={}))})(t=n.Crm||(n.Crm={}))})(t=n.Apps||(n.Apps={}))})(Unibase||(Unibase={}));
@@ -0,0 +1,173 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Contacts;
(function (Contacts) {
let Components;
(function (Components) {
class CreateLead extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
}
cssFiles() {
return [];
}
jsFiles() {
return [''];
}
html(id, containerid) {
return "";
}
init(containerid) {
var instance = this;
}
load(id, containerid, callback) {
}
createcustomer() {
let detailContainer = $("._bizgaze_detail_container:visible");
var isconverttocustomer = (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.filter(function (o) {
return o.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_isconvertedtocustomer";
})[0].Value);
if (Boolean(isconverttocustomer) == true) {
$(detailContainer).find('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_Confirm').addClass('hidden');
}
else {
$(detailContainer).find('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_Confirm').removeClass('hidden');
}
var instance = this;
$(detailContainer).find('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_Confirm').click(function () {
Unibase.Platform.Forms.Managers.FormManager.Instance().getFormbyUniqueId("Bizgaze_Platform_Crm_CreateCustomer").then(function (res) {
var formid = res.result.FormId;
var loadobj = {
CallBack: function () {
$(".div_SubFormdetails").find(".btn-success").click();
var tagpropertyid = $(".hdn_tagcontrol").parents(".divCustomProperties").data("uniqueid");
var tagJson = "";
instance.fileCacheHelper.loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
$(".div_SubFormdetails").find(".btn-success").click();
var leadid = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.filter(function (o) { return o.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_recordid"; })[0].Value;
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getleadbyleadid(Number(leadid)).then(function (leadres) {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getleadtagsbyleadid(Number(leadid), formid).then(function (res) {
return __awaiter(this, void 0, void 0, function* () {
if (leadres.result.LeadType == 2) {
var drdbid = $("#rdb_organizationtypeid_2");
$("#hdnRdb_organizationtypeid").val(2);
drdbid.attr("checked", true).trigger('change');
}
$(".hdn_refid").val(Number(leadid));
$(".txt_organizationid").val(leadres.result.OrganizationName);
if (leadres.result.OrganizationName != "")
$(".div_organizationid").addClass("floating-label-form-group-with-value");
$(".txt_defaultemailid").val(leadres.result.OrganizationEmail);
if (leadres.result.OrganizationEmail != "")
$(".div_defaultemailid").addClass("floating-label-form-group-with-value");
$(".txt_defaultnumberid").val(leadres.result.PhoneNumber);
if (leadres.result.PhoneNumber != "")
$(".div_defaultnumberid").addClass("floating-label-form-group-with-value");
$(".txt_contactname").val(leadres.result.ContactPersonName);
if (leadres.result.ContactPersonName != "")
$(".div_contactname ").addClass("floating-label-form-group-with-value");
$("#txtPhn_phonenumber").val(leadres.result.ContactNumbers);
if (leadres.result.ContactNumbers != "")
$(".div_phonenumber ").addClass("floating-label-form-group-with-value");
$(".txt_emailaddress").val(leadres.result.Email);
if (leadres.result.Email != "")
$(".div_emailaddress").addClass("floating-label-form-group-with-value");
$(".txtAutoComplete_branchid").append($("<option></option>")
.attr("value", leadres.result.BranchId)
.text(leadres.result.AliasName));
$(".txtAutoComplete_designationid")
.append($("<option></option>")
.attr("value", leadres.result.DesignationId)
.text(leadres.result.DesignationName));
if ((leadres.result.AddressName1 != "" && leadres.result.AddressName1 != undefined) || (leadres.result.CityId1 != 0 && leadres.result.CityId1 != undefined)) {
yield $.when().then(function (x) {
$(".subform_container_1").find(".txt_addressname").val(leadres.result.AddressName1);
if (leadres.result.AddressName1 != "")
$(".subform_container_1").find(".div_addressname").addClass("floating-label-form-group-with-value");
$(".subform_container_1").find(".txt_addressline1").val(leadres.result.AddressLine11);
if (leadres.result.AddressLine11 != "")
$(".subform_container_1").find(".div_addressline1").addClass("floating-label-form-group-with-value");
$(".subform_container_1").find(".txt_addressline2").val(leadres.result.AddressLine12);
if (leadres.result.AddressLine12 != "")
$(".subform_container_1").find(".div_addressline2").addClass("floating-label-form-group-with-value");
$(".subform_container_1").find(".txtAutoComplete_cityid").append($("<option></option>").attr("value", leadres.result.CityId1)
.text(leadres.result.Address_CityName1)).trigger("change");
$(".subform_container_1").find(".txt_zipcode").val(leadres.result.PinCode1);
if (leadres.result.PinCode1 != "")
$(".subform_container_1").find(".div_zipcode").addClass("floating-label-form-group-with-value");
$(".subform_container_1").find(".txt_landmark").val(leadres.result.LandMark1);
if (leadres.result.LandMark1 != "")
$(".subform_container_1").find(".div_landmark").addClass("floating-label-form-group-with-value");
});
}
else {
$(".subform_1").find(".btn-icon-circle").click();
}
if ((leadres.result.AddressName2 != "" && leadres.result.AddressName2 != undefined) || (leadres.result.CityId2 != 0 && leadres.result.CityId2 != undefined)) {
$(".subform_container_2").find(".txt_addressname").val(leadres.result.AddressName2);
if (leadres.result.AddressName2 != "")
$(".subform_container_2").find(".div_addressname").addClass("floating-label-form-group-with-value");
$(".subform_container_2").find(".txt_addressline1").val(leadres.result.AddressLine21);
if (leadres.result.AddressLine21 != "")
$(".subform_container_2").find(".div_addressline1").addClass("floating-label-form-group-with-value");
$(".subform_container_2").find(".txt_addressline2").val(leadres.result.AddressLine22);
if (leadres.result.AddressLine22 != "")
$(".subform_container_2").find(".div_addressline2").addClass("floating-label-form-group-with-value");
$(".subform_container_2").find(".txtAutoComplete_cityid").append($("<option></option>").attr("value", leadres.result.CityId2)
.text(leadres.result.Address_CityName2)).trigger("change");
$(".subform_container_2").find(".txt_zipcode").val(leadres.result.PinCode2);
if (leadres.result.PinCode2 != "")
$(".subform_container_2").find(".div_zipcode ").addClass("floating-label-form-group-with-value");
$(".subform_container_2").find(".txt_landmark").val(leadres.result.LandMark2);
if (leadres.result.LandMark2 != "")
$(".subform_container_2").find(".div_landmark").addClass("floating-label-form-group-with-value");
}
else {
$(".subform_2").find(".btn-icon-circle").click();
}
Unibase.Forms.Controls.Tag.Instance().bindEditFormDetails(tagpropertyid, res.result, "");
});
});
});
});
},
Parameters: null,
};
var formviewerObj = {
FormId: formid,
AppConfigurationId: 0,
Pk_Value: 0,
PortletWidgetId: 0,
OnSuccess: null,
OnFail: null,
OnLoad: loadobj,
};
Unibase.Platform.Forms.Components.FormViewer.Instance().init(formviewerObj);
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new CreateLead();
return this._instance;
}
}
Components.CreateLead = CreateLead;
})(Components = Contacts.Components || (Contacts.Components = {}));
})(Contacts = Crm.Contacts || (Crm.Contacts = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,73 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Contacts;
(function (Contacts) {
let Components;
(function (Components) {
class LeadChecklist extends Unibase.Platform.Core.BaseComponent {
cssFiles() {
return [];
}
jsFiles() {
return [''];
}
html(id, containerid) {
return "";
}
init(containerid) {
var instance = this;
}
load(id, containerid, callback) {
}
strikeThrough(workflowchecklistid) {
var LeadId = Unibase.Themes.Providers.DetailHelper.recordId;
var cheked = $("#checkBox-no-" + workflowchecklistid).prop('checked');
if (cheked == true) {
$(".Dependentcheckbox").css('background-color', '#2196F3');
$('#note-text-' + workflowchecklistid).css('text-decoration', 'line-through');
$('#note-text-' + workflowchecklistid).css('color', 'red');
}
else {
$(".Dependentcheckbox").css('background-color', '');
$('#note-text-' + workflowchecklistid).css('text-decoration', '');
$('#note-text-' + workflowchecklistid).css('color', '');
}
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().updateCheckList(workflowchecklistid, LeadId, cheked).then(function (response) {
MessageHelper.Instance().showSuccess(response.message, 'bizgaze_ErrorMessages');
});
});
}
Completed() {
var Leadid = Unibase.Themes.Providers.DetailHelper.recordId;
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getChecklist(Leadid).then(function (response) {
if (response.result.length > 0) {
for (var i = 0; i < response.result.length; i++) {
var data = (response.result)[i];
if (data.ischecked == true) {
$('#note-text-' + data.workflowchecklistid).css('text-decoration', 'line-through');
$('#note-text-' + data.workflowchecklistid).css('color', 'red');
$('#checkBox-no-' + data.workflowchecklistid).prop('checked', true);
}
}
}
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new LeadChecklist();
return this._instance;
}
}
Components.LeadChecklist = LeadChecklist;
})(Components = Contacts.Components || (Contacts.Components = {}));
})(Contacts = Crm.Contacts || (Crm.Contacts = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"leadchecklist.js","sourceRoot":"","sources":["leadchecklist.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CA6EhB;AA7ED,WAAU,OAAO;IACb,IAAiB,IAAI,CA2EpB;IA3ED,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAyEnB;QAzED,WAAiB,GAAG;YAChB,IAAiB,QAAQ,CAuExB;YAvED,WAAiB,QAAQ;gBACrB,IAAiB,UAAU,CAqE1B;gBArED,WAAiB,UAAU;oBACvB,MAAa,aACT,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;wBAC3C,QAAQ;4BACJ,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,OAAO;4BACH,OAAO,CAAC,EAAE,CAAC,CAAC;wBAChB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB;4BAE7B,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,IAAI,CAAC,WAAW;4BACZ,IAAI,QAAQ,GAAG,IAAI,CAAC;wBAExB,CAAC;wBACD,IAAI,CAAC,EAAO,EAAE,WAAmB,EAAE,QAAkB;wBAErD,CAAC;wBACD,aAAa,CAAC,mBAAmB;4BAE7B,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,QAAQ,CAAC;4BAC5D,IAAI,MAAM,GAAG,CAAC,CAAC,eAAe,GAAG,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;4BACtE,IAAI,MAAM,IAAI,IAAI,EAAE;gCAChB,CAAC,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,S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2EpB;AACL,CAAC,EA7ES,OAAO,KAAP,OAAO,QA6EhB"}
@@ -0,0 +1,110 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Leads;
(function (Leads) {
let Controls;
(function (Controls) {
class CustomerSubType extends Unibase.Platform.Core.BaseComponent {
init(formpropertyid, prop, callback) {
var instance = this;
$(".txtAutoComplete_customertypeid").change(function () {
var customertypeid = $(".txtAutoComplete_customertypeid").val();
instance.getCustomerSubTypes(customertypeid);
});
if (callback != null) {
callback();
}
}
loadControl(containerid, prop) {
var html = '<ul>' +
'<li class="length-row" id="li_CustomerSubType_Details">' +
'</li>' +
'<input type="hidden" id="hdn_customersubtypecontrol" class="value-control" value="Bizgaze.Apps.Crm.Leads.Controls.CustomerSubType.Instance().customersubtypeControlObj();">' +
'</ul>';
$("#" + containerid).html(html);
}
loadControlSettings(controlsettingjson, formpropertyid) {
return null;
}
loadPropertySettings(propertysettings, formpropertyid) {
return null;
}
bindEditFormDetails(formpropertyid, propval, DocPropertyName) {
var customerqualificationid = Number(propval);
var instance = this;
var jsfiles = ['apps/crm/contacts/managers/contactmanager.js'];
instance.fileCacheHelper.loadJsFiles(jsfiles, function (response) {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().GetCustomerQualificationDetails(customerqualificationid).then(function (response) {
var data = response.result[0];
instance.CustomerSubType(data);
});
});
}
CustomerSubType(data) {
let customersubtypeid = data.customersubtypeid;
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().GetCustomerSubType(Number(customersubtypeid)).then(function (response) {
var data1 = response.result[0];
var html = '<li class="list-group-item CustomerSubTypes_Items" id="li_CustomerSubTpes_">' +
'<div class="row">' +
'<input type ="hidden" class="hf_customersubtypeid" value = "' + data1.customersubtypeid + '" id = "customersubtypeid" />' +
'<input type ="hidden" class="hf_customertypeid" value = "' + data.customertypeid + '" id = "customertypeid" /> ' +
'<div class="col-sm-6" > ' + data1.customersubtypename + ' </div>' +
'<div class="col-sm-6" ><input type ="text" class="form-control floating-label-control txt_Description" id="txt_Description" data-isdynamic="false" placeholder="Description" data-placeholder="Description" data-label="Description" ></div >' +
'</div></li> ';
$("#li_CustomerSubType_Details").after(html);
$(".txt_Description").val(data.description);
});
}
getCustomerSubTypes(customertypeid) {
var instance = this;
var jsfiles = ['apps/crm/contacts/managers/contactmanager.js'];
$(".CustomerSubTypes_Items").remove();
instance.fileCacheHelper.loadJsFiles(jsfiles, function (response) {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().GetCustomersubtypeDetails(customertypeid).then(function (response) {
var dt = response.result;
if (dt.length > 0) {
for (var i = 0; i < dt.length; i++) {
var data = dt[i];
var html = '<li class="list-group-item CustomerSubTypes_Items" id="li_CustomerSubTpes_' + i + '">' +
'<div class="row">' +
'<input type ="hidden" class="hf_customersubtypeid" value = "' + data.customersubtypeid + '" id = "customersubtypeid" />' +
'<input type ="hidden" class="hf_customertypeid" value = "' + data.customertypeid + '" id = "customertypeid" /> ' +
'<div class="col-sm-6" > ' + data.customersubtypename + ' </div>' +
'<div class="col-sm-6" ><input type ="text" class="form-control floating-label-control txt_Description" id="txt_Description" data-isdynamic="false" placeholder="Description" data-placeholder="Description" data-label="Description" ></div >' +
'</div></li> ';
$("#li_CustomerSubType_Details").after(html);
}
}
});
});
}
customersubtypeControlObj() {
var customerSubTypesEntries = new Array();
let leadid = Unibase.Themes.Providers.DetailHelper.recordId;
$('.CustomerSubTypes_Items').each(function (index) {
var element = $(this);
customerSubTypesEntries.push({
CustomerSubTypeId: Number(element.find('.hf_customersubtypeid').val()),
LeadId: Number(leadid),
CustomerTypeId: Number(element.find('.hf_customertypeid').val()),
Description: element.find('.txt_Description ').val()
});
});
return customerSubTypesEntries;
}
static Instance() {
if (this.instance === undefined)
this.instance = new CustomerSubType();
return this.instance;
}
}
Controls.CustomerSubType = CustomerSubType;
})(Controls = Leads.Controls || (Leads.Controls = {}));
})(Leads = Crm.Leads || (Crm.Leads = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"customersubtype.component.js","sourceRoot":"","sources":["customersubtype.component.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAoHhB;AApHD,WAAU,OAAO;IACb,IAAiB,IAAI,CAkHpB;IAlHD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAgHnB;QAhHD,WAAiB,GAAG;YAChB,IAAiB,KAAK,CA8GrB;YA9GD,WAAiB,KAAK;gBAClB,IAAiB,QAAQ,CA4GxB;gBA5GD,WAAiB,QAAQ;oBACrB,MAAa,eAAgB,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;wBACpE,IAAI,CAAC,cAAsB,EAAE,IAAgB,EAAE,QAAa;4BACxD,IAAI,QAAQ,GAAG,IAAI,CAAC;4BACpB,CAAC,CAAC,iCAAiC,CAAC,CAAC,MAAM,CAAC;gCACxC,IAAI,cAAc,GAAG,CAAC,CAAC,iCAAiC,CAAC,CAAC,GAAG,EAAE,CAAC;gCAChE,QAAQ,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;4BAEjD,CAAC,CAAC,CAAC;4BACH,IAAI,QAAQ,IAAI,IAAI,EAAE;gCAClB,QAAQ,EAAE,CAAC;6BACd;wBACL,CAAC;wBACD,WAAW,CAAC,WAAgB,EAAE,IAAgB;4BAC1C,IAAI,IAAI,GAAG,MAAM;gCACb,yDAAyD;gCACzD,OAAO;gCACP,6KAA6K;gCAC7K,OAAO,CAAC;4BACZ,CAAC,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;wBACpC,CAAC;wBAED,mBAAmB,CAAC,kBAA0B,EAAE,cAAsB;4BAClE,OAAO,IAAI,CAAC;wBAChB,CAAC;wBAED,oBAAoB,CAAC,gBAA0C,EAAE,cAAsB;4BACnF,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oHhB"}
@@ -0,0 +1,43 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Leads;
(function (Leads) {
let Controls;
(function (Controls) {
class CustomerSubType_Settings {
loadControlPropertiesHtml(controlpropList, container) {
return ``;
}
bindPropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
savePropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
loadSettingHtml() {
return null;
}
bindControlData(controldatajson) {
return null;
}
SaveControlData(controldatajson) {
return controldatajson;
}
static Instance() {
if (this._instance === undefined)
this._instance = new CustomerSubType_Settings();
return this._instance;
}
}
Controls.CustomerSubType_Settings = CustomerSubType_Settings;
})(Controls = Leads.Controls || (Leads.Controls = {}));
})(Leads = Crm.Leads || (Crm.Leads = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"customersubtype.settings.js","sourceRoot":"","sources":["customersubtype.settings.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAsChB;AAtCD,WAAU,OAAO;IACb,IAAiB,IAAI,CAoCpB;IApCD,WAAiB,IAAI;QACjB,IAAiB,GAAG,CAkCnB;QAlCD,WAAiB,GAAG;YAChB,IAAiB,KAAK,CAgCrB;YAhCD,WAAiB,KAAK;gBAClB,IAAiB,QAAQ,CA8BxB;gBA9BD,WAAiB,QAAQ;oBACrB,MAAa,wBAAwB;wBACjC,yBAAyB,CAAC,eAAsC,EAAE,SAAS;4BACvE,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,oBAAoB,CAAC,IAAgB;4BACjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;4BACvE,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,oBAAoB,CAAC,IAAgB;4BACjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;4BACvE,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,eAAe;4BACX,OAAO,IAAI,CAAC;wBAChB,CAAC;wBACD,eAAe,CAAC,eAAoB;4BAChC,OAAO,IAAI,CAAC;wBAChB,CAAC;wBACD,eAAe,CAAC,eAAoB;4BAChC,OAAO,eAAe,CAAC;wBAC3B,CAAC;wBAGD,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;gCAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,wBAAwB,EAAE,CAAC;4BACpD,OAAO,IAAI,CAAC,SAAS,CAAC;wBAC1B,CAAC;qBACJ;oBA5BY,iCAAwB,2BA4BpC,CAAA;gBACL,CAAC,EA9BgB,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QA8BxB;YACL,CAAC,EAhCgB,KAAK,GAAL,SAAK,KAAL,SAAK,QAgCrB;QACL,CAAC,EAlCgB,GAAG,GAAH,QAAG,KAAH,QAAG,QAkCnB;IACL,CAAC,EApCgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAoCpB;AACL,CAAC,EAtCS,OAAO,KAAP,OAAO,QAsChB"}
@@ -0,0 +1 @@
{"version":3,"file":"ilobmanager.js","sourceRoot":"","sources":["ilobmanager.ts"],"names":[],"mappings":""}
@@ -0,0 +1,82 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let CRM;
(function (CRM) {
let Lobs;
(function (Lobs) {
let Managers;
(function (Managers) {
class LobManager extends Unibase.Platform.Core.BaseManager {
getLobsByAddressId(AddressId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/lobs/getlobsbyaddressid/addressid/' + AddressId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getLobs() {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/lobs/getlobs';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getLobByTagGroupId(TagGroupId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/lobs/getlobtaggroups/taggroupid/' + TagGroupId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getLobByLobId(LoBId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/lobs/getlobbylobid/lobid/' + LoBId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getTagLobs() {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/lobs/gettaglobs';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new LobManager();
return this._instance;
}
}
Managers.LobManager = LobManager;
})(Managers = Lobs.Managers || (Lobs.Managers = {}));
})(Lobs = CRM.Lobs || (CRM.Lobs = {}));
})(CRM = Apps.CRM || (Apps.CRM = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"lobmanager.js","sourceRoot":"","sources":["lobmanager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAU,OAAO,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AoDhB"}
+1
View File
@@ -0,0 +1 @@
var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Bizgaze;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t extends Unibase.Platform.Core.BaseManager{getLobsByAddressId(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/lobs/getlobsbyaddressid/addressid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}getLobs(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().getAsync("apis/v4/bizgaze/crm/lobs/getlobs").then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}getLobByTagGroupId(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/lobs/getlobtaggroups/taggroupid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}getLobByLobId(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/crm/lobs/getlobbylobid/lobid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}getTagLobs(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().getAsync("apis/v4/bizgaze/crm/lobs/gettaglobs").then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}static Instance(){return this._instance===undefined&&(this._instance=new t),this._instance}}n.LobManager=t})(t=n.Managers||(n.Managers={}))})(t=n.Lobs||(n.Lobs={}))})(t=n.CRM||(n.CRM={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1,376 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Crm;
(function (Crm) {
let Organizations;
(function (Organizations) {
let Components;
(function (Components) {
class ManagerChange extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
this.pageindex = 0;
this.pagesize = 20;
this.TotalRecords = 0;
this._bizgaze_notifications_managerChange_ApplyFor = 'multiple';
this._bizgaze_notifications_managerChange_selectedElement = '';
}
cssFiles() {
return [];
}
jsFiles() {
return ['apps/crm/organizations/components/w_managerchange.js', 'apps/crm/lobs/managers/lobmanager.js', 'apps/crm/contacts/managers/contactmanager.js', 'libs/daterangepicker/daterangepicker.js', 'apps/transact/managers/invoicemanager.js'];
}
html(id, containerid) {
let html = `<section>
<div class="panel panel-success">
<div class="panel-heading">
<strong>Change Manager</strong>
</div>
<div id="bizgaze_CreateProjectErrorMessages" class="clear"></div>
<div class="section_Details card">
<div class="card-body">
<div class="row div_SName">
<div class="col-sm-3 div_SeriesType">
<div class="form-group floating-label focus" id="divLobs">
<label for="frm_chk_LOB" id="lbl_IsRandom">LOB</label>
<select id="ddl_Lobs" class="form-control type-control value-control " placeholder = "Select Lob" data-placeholder="select Lob"></select>
</div>
</div>
<div class="col-sm-3" id="div_OldSalesPerson">
<label for="lbl_OldSalesPerson" id="lbl_OldSalesPerson">Old Manager</label>
<select style="width:100%" id="txt_OldSalesPerson" class="form-control txt_OldSalesPerson value-control floating-label-control" data-isdynamic="false" placeholder="Select Old Manager" data-placeholder=" Select Old Manager" data-label="Old Manager">
</select>
<input type="hidden" id="hf_OldSalesPersonId" class="hf_OldSalesPersonId" value="0" />
</div>
<div class="col-sm-3" id="div_NewSalesPerson">
<label for="lbl_NewSalesPerson" id="lbl_NewSalesPerson"> New Manager</label>
<select style="width:100%" id="txt_NewSalesPerson" class="form-control txt_NewSalesPerson value-control floating-label-control" data-isdynamic="false" placeholder="Select New Manager" data-placeholder="Select New Manager" data-label="New Manager">
</select>
<input type="hidden" id="hf_NewSalesPersonId" class="hf_ChangeSalesPersonId" value="0" />
</div>
<div class="col-sm-2">
<a class="btn btn-primary" id="btnShowChangeManager">Change</a>
</div>
<div class="col-sm-1">
<div class="form-group">
<label class="col-xs-5 control-label">ShowAll</label>
<div class="col-xs-7">
<label class="switch">
<input type="checkbox" id="chkShowAll">
<span></span>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="section_Description card">
<div class="div_ManagersLists">
<ul class="list-group no-radius clear m-b-none m-t-sm list-group-lg no-border salesmanager-list"></ul>
</div>
</div>
</div>
</section><footer class="footer lt b-t b-light">
<div class="Div_pagination row m-t-sm">
<div class="col-sm-4 m-b-xs">
<div class="btn-group">
Total Records : <span id="lbltotRecords">0</span>
</div>
</div>
<div class="col-sm-8 m-b-xs">
<div id="divpagination" class="pagination custom-pagination pagination-rounded pull-right"></div>
</div>
</div>
</footer>
<form id="frm_divChoosedateForManager" method="post" data-validate="parsley" class="hidden">
<header class="b-b bg-white modal-header">
<strong class="text-dark titlename">Choose Date</strong>
<div class="btn-group ml-auto"> <button type="button" class="close" hidden data-dismiss="modal" aria-hidden="true">
&times;</button></div>
</header>
<div style="overflow-x:hidden;" class="scrollable">
<div id="divBizgazeTransact_ChooseDate_mph" class="clear"></div>
<div class="card">
<div class="card-body">
<div class="row" style="overflow-x:hidden;">
<div class="row col-xs-12">
<div class="col-sm-6">
<label> From Date (optional)</label>
<div class="input-group">
<input type="text" class="form-control value-control datepicker-input hasDatepicker txt_FromInvoiceDate" id="txt_FromInvoiceDate" data_required="true" placeholder="dd/mm/yyyy" />
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
<span class="help-block m-b-none">from this date all related invoices will come under this new manager.</span>
</div>
<div class="col-sm-6">
<label> To Date</label>
<div class="input-group">
<input type="text" class="form-control value-control datepicker-input hasDatepicker txt_ToInvoiceDate" id="txt_ToInvoiceDate" data_required="true" placeholder="dd/mm/yyyy" />
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="bg-white modal-footer" style="position:absolute; bottom:0px;width:100%;">
<a href="javascript:;" id="btn_ChangeManagerClose" class="btn btn-light btn-sm mr-auto "> Close</a>
<a href="javascript:;" id="btnChangeManager" class="btn btn-primary btn-sm">Confirm</a>
</footer>
</form>`;
return html;
}
load(id, containerid, callback) {
var instance = this;
instance.loadLobs();
var url = _appsettings.server_url() + '/apis/v4/bizgaze/crm/contacts/getallemployeesauto';
AutoCompleteHelper.getHelper().Create("#txt_OldSalesPerson", "#hf_OldSalesPersonId", url, function (response) {
var data = response;
});
var url = _appsettings.server_url() + '/apis/v4/bizgaze/crm/contacts/getautotextemp';
AutoCompleteHelper.getHelper().Create("#txt_NewSalesPerson", "#hf_NewSalesPersonId", url, function (response) {
var data = response;
});
$('#chkShowAll').change(function () {
Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance().search();
});
$('#ddl_Lobs').change(function () {
Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance().search();
});
$("#txt_OldSalesPerson").change(function () {
Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance().search();
});
$(document).on('click', '#btn_ChangeManagerClose', function () {
Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp();
});
$(document).on('click', '#btnChangeManager', function () {
var instance = Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance();
var _dateTimeHelper = Unibase.Platform.Helpers.DateTimeHelper.Instance();
var invfromdate = _dateTimeHelper.formatServerDate($("#txt_FromInvoiceDate").val());
var invtodate = _dateTimeHelper.formatServerDate($("#txt_ToInvoiceDate").val());
if (invfromdate > invtodate) {
MessageHelper.Instance().showError("Please Select ToDate is Higher than FromDate", "divBizgazeTransact_ChooseDate_mph");
return false;
}
if (instance._bizgaze_notifications_managerChange_ApplyFor == 'multiple') {
instance.changeManagerTotally();
}
else {
if (instance._bizgaze_notifications_managerChange_ApplyFor != '' && instance._bizgaze_notifications_managerChange_selectedElement != undefined)
instance.saveManager(instance._bizgaze_notifications_managerChange_selectedElement);
}
});
$("#btnShowChangeManager").click(function () {
var instance = Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance();
var _dateTimeHelper = Unibase.Platform.Helpers.DateTimeHelper.Instance();
var invoiceDate = instance.getLastInvoiceDate();
if (invoiceDate != "") {
$("#txt_FromInvoiceDate").val(_dateTimeHelper.formatServerDate(invoiceDate));
$("#txt_ToInvoiceDate").val(_dateTimeHelper.formatServerDate(invoiceDate));
}
else {
$("#txt_FromInvoiceDate").val(_dateTimeHelper.currentDate());
$("#txt_ToInvoiceDate").val(_dateTimeHelper.currentDate());
}
instance.showChooseDate('multiple', '');
});
}
init(containerid) {
var instance = this;
instance.fileCacheHelper.loadJsFiles(["apps/crm/organizations/components/w_managerchange.js"], function () {
instance.navigationHelper.loadSection(0, containerid, Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance(), null, null);
});
}
loadLobs() {
Bizgaze.Apps.CRM.Lobs.Managers.LobManager.Instance().getTagLobs().then(function (response) {
$("#ddl_Lobs").empty();
if (response.result != null) {
let html = "<option value='0'>All</option>";
for (let i = 0; i < response.result.length; i++) {
var data = response.result[i];
html += "<option value=" + data.LobId + " data-table=" + data.LobName + ">" + data.LobName + "</option>";
}
jQuery("#ddl_Lobs").append(html);
}
});
}
search() {
var instance = this;
var lobid = Number($("#ddl_Lobs").val());
let empid = Number($('#hf_OldSalesPersonId').val());
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getGridForManagers(lobid, 0, empid, instance.pageindex, instance.pagesize).then(function (response) {
Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance().TotalRecords = response.totalRecords;
$(".salesmanager-list").html('<li class="salesmanager-item hidden"></li>');
for (var i = 0; i < response.result.length; i++) {
var data = response.result[i];
var len = $('.length-row').length;
var html = '<li class="list-group-item salesmanager-item length-row clear" id="Managers_' + len + '">' +
'<div class="row">' +
'<div class="col-sm-6" >' +
'<input type="hidden" class="hfsalesmanagerid" value="' + data.ManagerId + '" />' +
'<input type="hidden" class="hfaddressid" value="' + data.ContactAddressId + '" />' +
data.ContactName + ' - ' + data.AddressName +
'</div>' +
'<div class="col-sm-6 li_div">' +
'<select style="width:100%" id="txtmanager_' + len + '" class="form-control manager value-control floating-label-control" value="' + data.ManagerName + '" ></select>' +
'<input type="hidden" id="hfmanagerid_' + len + '" class="hfmanagerid" value="' + data.ManagerId + '" />' +
'</div>' +
'</div>' +
'</li>';
$(".salesmanager-item:last").after(html);
var element = $(".salesmanager-item");
Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance().autoCompleteManager(element, data, len);
$("#txtmanager_" + len + "").change(function () {
element = $(this).parents(".salesmanager-item");
Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance().showChooseDate('single', element);
});
}
$("#lbltotRecords").text(response.result.length);
if (Number($('#hf_OldSalesPersonId').val()) == 0) {
if (instance.TotalRecords <= 20) {
$('#divpagination').hide();
}
else {
$('#divpagination').show();
}
instance.fileCacheHelper.loadJsFile('libs/jquery/pagination/jquery.pagination.js', function () {
var ele;
ele = $(".Div_pagination").find('#divpagination');
ele.pagination(instance.TotalRecords, 20, {
current_page: (instance.pageindex),
callback: function (page, component) {
instance.pageindex = page;
instance.search();
}
});
});
}
else {
$('#divpagination').hide();
}
});
}
autoCompleteManager(element, data, len) {
var url = _appsettings.server_url() + '/apis/v4/bizgaze/crm/contacts/getautotextemp';
AutoCompleteHelper.getHelper().Create("#txtmanager_" + len + "", "#hfmanagerid_" + len + "", url, function (response) {
var selectedmanager = new Option(data.ManagerName, data.ManagerId);
$("#txtmanager_" + len).append(selectedmanager);
});
}
showChooseDate(applyFor, element) {
var instance = this;
instance._bizgaze_notifications_managerChange_ApplyFor = applyFor;
instance._bizgaze_notifications_managerChange_selectedElement = element;
if (instance._bizgaze_notifications_managerChange_ApplyFor == 'multiple') {
if ($("#ddl_Lobs").val() == 0 || $("#ddl_Lobs").val() == '' || $("#ddl_Lobs").val() == undefined) {
MessageHelper.Instance().showError("Select Lob.", "divBizgazeTransact_ChooseDate_mph");
return false;
}
if ($("#hf_OldSalesPersonId").val() == 0 || $("#hf_OldSalesPersonId").val() == '' || $("#hf_OldSalesPersonId").val() == undefined) {
MessageHelper.Instance().showError("Select Old SalesManager.", "bizgaze_CreateProjectErrorMessages");
return false;
}
if ($("#hf_NewSalesPersonId").val() == 0 || $("#hf_NewSalesPersonId").val() == '' || $("#hf_NewSalesPersonId").val() == undefined) {
MessageHelper.Instance().showError("Select New SalesManager.", "divBizgazeTransact_ChooseDate_mph");
return false;
}
}
var theHtml = $("#frm_divChoosedateForManager").html();
Unibase.Platform.Helpers.NavigationHelper.Instance().popupHtml(theHtml, Unibase.Platform.Helpers.Size.Medium, function () {
var currentdate = new Date();
$('.txt_FromInvoiceDate').daterangepicker({
locale: {
format: 'DD/MM/YYYY',
},
singleDatePicker: true,
showDropdowns: true,
minYear: 1901,
maxDate: new Date(2050, 11, 31)
});
$('.txt_ToInvoiceDate').daterangepicker({
locale: {
format: 'DD/MM/YYYY',
},
singleDatePicker: true,
showDropdowns: true,
minYear: 1901,
maxDate: new Date(2050, 11, 31)
});
});
}
changeManagerTotally() {
var fromdatestring = moment($(document.getElementsByClassName("txt_FromInvoiceDate")[document.getElementsByClassName("txt_FromInvoiceDate").length - 1]).val(), "DD/MM/YYYY").add(1, 'days').format("YYYY/MM/DD");
let todatestring = moment($(document.getElementsByClassName("txt_ToInvoiceDate")[document.getElementsByClassName("txt_ToInvoiceDate").length - 1]).val(), "DD/MM/YYYY").add(1, 'days').format("YYYY/MM/DD");
var InvoiceToDate = new Date(todatestring);
var InvoiceDate = new Date(fromdatestring);
var postData = {
LobId: Number($("#ddl_Lobs").val()),
OldEmployeeId: Number($("#hf_OldSalesPersonId").val()),
EmployeeId: Number($("#hf_NewSalesPersonId").val()),
InvoiceDate: InvoiceDate,
InvoiceToDate: InvoiceToDate,
};
Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().changeManagers(postData).then(function (response) {
if (response.status == Unibase.Data.Status.Error) {
MessageHelper.Instance().showError(response.message, '');
}
else {
MessageHelper.Instance().showSuccess(response.message, '');
Bizgaze.Apps.Crm.Organizations.Components.ManagerChange.Instance().search();
Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp();
}
});
}
saveManager(element) {
var fromdatestring = moment($(document.getElementsByClassName("txt_FromInvoiceDate")[document.getElementsByClassName("txt_FromInvoiceDate").length - 1]).val(), "DD/MM/YYYY").add(1, 'days').format("YYYY/MM/DD");
let todatestring = moment($(document.getElementsByClassName("txt_ToInvoiceDate")[document.getElementsByClassName("txt_ToInvoiceDate").length - 1]).val(), "DD/MM/YYYY").add(1, 'days').format("YYYY/MM/DD");
var InvoiceToDate = new Date(todatestring);
var InvoiceDate = new Date(fromdatestring);
var postData = {
ManagerId: Number(element.find(".hfsalesmanagerid").val()),
LobId: Number($("#ddl_Lobs").val()),
EmployeeId: Number(element.find(".hfmanagerid").val()),
OrganizationAddressId: Number(element.find(".hfaddressid").val()),
InvoiceDate: InvoiceDate,
InvoiceToDate: InvoiceToDate,
};
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().saveManager(postData).then(function (response) {
if (response.status == Unibase.Data.Status.Error) {
MessageHelper.Instance().showError(response.message, '');
}
else {
MessageHelper.Instance().showSuccess(response.message, '');
Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp();
}
});
}
getLastInvoiceDate() {
var date = '';
var oldSalesPersonId = Number($("#hf_OldSalesPersonId").val());
Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().GetFirstPendingInvoicesBySalesPerson(oldSalesPersonId).then(function (response) {
if (response.result != null)
date = response.result.invoiceDate;
}).then(function () {
});
return date;
}
static Instance() {
if (this.instance === undefined) {
this.instance = new ManagerChange();
}
return this.instance;
}
}
Components.ManagerChange = ManagerChange;
})(Components = Organizations.Components || (Organizations.Components = {}));
})(Organizations = Crm.Organizations || (Crm.Organizations = {}));
})(Crm = Apps.Crm || (Apps.Crm = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More