change
This commit is contained in:
@@ -48,115 +48,123 @@ var Bizgaze;
|
||||
}
|
||||
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 () {
|
||||
var RefStatusid = (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.filter(function (o) {
|
||||
return o.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_refstatusid";
|
||||
})[0].Value);
|
||||
if (RefStatusid == 1 || RefStatusid == 2 || RefStatusid == 9) {
|
||||
MessageHelper.Instance().showError('Cannot Move Non-Prospect Stage Leads To Confirm Stage', 'div_message');
|
||||
}
|
||||
else {
|
||||
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 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, "");
|
||||
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);
|
||||
});
|
||||
},
|
||||
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() {
|
||||
|
||||
@@ -711,7 +711,7 @@ var Bizgaze;
|
||||
let date_end = `${date.getDate()} ${months[get_month]} ${date.getFullYear()}`;
|
||||
let User_endTime = `${date_end} ${instance.Start_time}`;
|
||||
let User_name = Unibase.Platform.Membership.Infos.Identity.currentUser.name;
|
||||
let User_img = Unibase.Platform.Membership.Infos.Identity.currentUser.photoUrl;
|
||||
let User_img = $("#bizgaze_body").find(".profile-Img-Update").find("img").attr("src");
|
||||
MessageHelper.Instance().ShowAttendenceSuccess(User_name, User_img, response.message, User_endTime, instance.address);
|
||||
$("#bizgaze_body").parent().find('.jq-toast-wrap').find('.d-flex.list-inline .mr-4').addClass("d-none");
|
||||
$("#bizgaze_body").parent().find('.jq-toast-wrap').find('.d-flex.list-inline h3.font-14.font-weight-400').addClass("d-none");
|
||||
@@ -774,7 +774,7 @@ var Bizgaze;
|
||||
let date_end = `${Current_Time.getDate()} ${months[get_month]} ${Current_Time.getFullYear()}`;
|
||||
let User_startTime = `${date_end} ${instance.End_time}`;
|
||||
let User_name = Unibase.Platform.Membership.Infos.Identity.currentUser.name;
|
||||
let User_img = Unibase.Platform.Membership.Infos.Identity.currentUser.photoUrl;
|
||||
let User_img = $("#bizgaze_body").find(".profile-Img-Update").find("img").attr("src");
|
||||
MessageHelper.Instance().ShowAttendenceSuccess(User_name, User_img, response.message, User_startTime, instance.address);
|
||||
$("#bizgaze_body").parent().find('.jq-toast-wrap').find('.d-flex.list-inline .mr-4').addClass("d-none");
|
||||
$("#bizgaze_body").parent().find('.jq-toast-wrap').find('.d-flex.list-inline h3.font-14.font-weight-400').addClass("d-none");
|
||||
|
||||
@@ -73,16 +73,30 @@ var Bizgaze;
|
||||
var leavefromdate = moment(fromdate).format("YYYY-MM-DD");
|
||||
var leavetodate = moment(todate).format("YYYY-MM-DD");
|
||||
var diffInDays = Math.abs(firstDate.diff(secondDate, 'days'));
|
||||
var durationtype = Number($(".dropdown_durationtype").val());
|
||||
instance.fileCacheHelper.loadJsFile("apps/hrms/managers/holidaymanager.js", function () {
|
||||
Bizgaze.Apps.Hrms.Managers.HolidayManager.Instance().getHolidayDates(leavefromdate, leavetodate, instance.leavepolicyid).then(function (response) {
|
||||
var data = response.result;
|
||||
instance.currentlybooked = data + "(days)";
|
||||
instance.currentlybookedcount = data;
|
||||
if (durationtype == 1) {
|
||||
var data = response.result;
|
||||
instance.currentlybooked = data + "(days)";
|
||||
instance.currentlybookedcount = data;
|
||||
}
|
||||
else {
|
||||
instance.currentlybooked = 0.5 + "(days)";
|
||||
instance.currentlybookedcount = 0.5;
|
||||
}
|
||||
instance.balanceleaves = instance.availablebalance - instance.currentlybookedcount;
|
||||
instance.loadControl(instance.containerid, null);
|
||||
});
|
||||
});
|
||||
}
|
||||
durationtype() {
|
||||
var EmployeeId = Number($(".txtAutoComplete_employeeid").val());
|
||||
var LeaveTypeId = Number($(".ddl_cascading_leavetypeid").val());
|
||||
if (EmployeeId != 0 && LeaveTypeId != 0) {
|
||||
Bizgaze.Apps.Hrms.Controls.EmployeeLeaves.Instance().getEmployeeAvailableLeaves(EmployeeId, LeaveTypeId);
|
||||
}
|
||||
}
|
||||
employeeleavesControlObj() {
|
||||
let instance = this;
|
||||
var EmployeeId = Number($(".txtAutoComplete_employeeid").val());
|
||||
|
||||
@@ -60,10 +60,16 @@ var Bizgaze;
|
||||
let elem = a[a.length - 1];
|
||||
let itemlength = ItemRecDetails.instance.ItemIds.findIndex(x => x == Number($(elem).find(".txtAutoComplete_itemid").val()));
|
||||
ItemRecDetails.instance.getitem($(elem).find(".txtAutoComplete_itemid").val(), elem);
|
||||
$('.txtAutoComplete_lobid').prop('disabled', "true");
|
||||
$('.txtAutoComplete_branchid').prop('disabled', "true");
|
||||
if (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.length != 0) {
|
||||
ItemRecDetails.instance.bindRecDetails();
|
||||
}
|
||||
});
|
||||
$(".txtAutoComplete_lobid").change(function () {
|
||||
var Parameters = [{ "ColumnName": "lobid", "Value": Number($(".txtAutoComplete_lobid").val()), }];
|
||||
Unibase.Forms.Controls.AutoComplete.Instance().LoadAutoComplete($(".txtAutoComplete_itemid"), Parameters);
|
||||
});
|
||||
$(".number_phylqty").keyup(function () {
|
||||
let elem1 = $(this);
|
||||
let a = $(elem1).parentsUntil(".subformcls");
|
||||
|
||||
Reference in New Issue
Block a user