Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dues.settings.js 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Transact;
  6. (function (Transact) {
  7. let Controls;
  8. (function (Controls) {
  9. class Dues_Settings {
  10. loadSettingHtml(container) {
  11. return ``;
  12. }
  13. bindControlData(controldatajson) {
  14. return ``;
  15. }
  16. SaveControlData(controldatajson) {
  17. return ``;
  18. }
  19. loadControlPropertiesHtml(Container) {
  20. var html = `<section class="">` +
  21. `<div class="card PropertySettings">` +
  22. `<div class="card-header"><h6><b>Property Settings</b></h6></div>` +
  23. `<div class="card-body" id="divPropSetting"><div class="row"><div class="col-sm-6 Controlproperties-Element" data-propertysettingid="0" data-controlpropertyid="0" data-controlpropertyname="ControlType"><label id="lbl_ControlType">Control Type<span class="text-danger" id="spnIsRequired_ControlType"> *</span></label><select class="form-control required" placeholder="form group" id="ControlType"><option selected value="">Select ControlType</option><option value="1">Payments</option><option value="2">Receipts</option><option value="3">Invoices</option></select></div></div></div>` +
  24. `</div></section>`;
  25. $(Container).html(html);
  26. $("#divPropSetting").removeClass('hidden');
  27. }
  28. bindPropertySettings(prop) {
  29. var propertySettings = prop.PropertySettings;
  30. if (propertySettings.length > 0 && propertySettings != null && propertySettings != undefined) {
  31. var i = 0;
  32. $(".Controlproperties-Element").each(function () {
  33. if (propertySettings[i].ControlPropertyName == "ControlType") {
  34. $(this).attr("data-controlpropertyid", propertySettings[i].ControlPropertyId);
  35. $(this).attr("data-controlpropertyname", propertySettings[i].ControlPropertyName);
  36. $(this).attr("data-propertysettingid", propertySettings[i].PropertySettingId);
  37. $("#ControlType").val(propertySettings[i].ControlPropertyValue).trigger("change");
  38. }
  39. i += 1;
  40. });
  41. }
  42. }
  43. savePropertySettings(prop) {
  44. var propertySettings = prop.PropertySettings;
  45. var propSettingReq = [];
  46. $(".Controlproperties-Element").each(function () {
  47. if ($(this).children().closest("select").val().toString()) {
  48. var data = {
  49. FormPropertyId: 0,
  50. ControlPropertyId: Number($(this).attr('data-controlpropertyid')),
  51. ControlPropertyValue: $(this).children().closest("select").val().toString(),
  52. ControlPropertyName: $(this).attr('data-controlpropertyname'),
  53. ControlId: Number(prop.ControlVariable.split('|')[0]),
  54. PropertySettingId: Number($(this).attr("data-propertysettingid")),
  55. };
  56. propSettingReq.push(data);
  57. }
  58. });
  59. return propSettingReq;
  60. }
  61. static Instance() {
  62. if (this.instance === undefined) {
  63. this.instance = new Dues_Settings();
  64. }
  65. return this.instance;
  66. }
  67. }
  68. Controls.Dues_Settings = Dues_Settings;
  69. })(Controls = Transact.Controls || (Transact.Controls = {}));
  70. })(Transact = Apps.Transact || (Apps.Transact = {}));
  71. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  72. })(Bizgaze || (Bizgaze = {}));