123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- var Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Transact;
- (function (Transact) {
- let Controls;
- (function (Controls) {
- class Wallet_Settings {
- loadSettingHtml(container) {
- return ``;
- }
- bindControlData(controldatajson) {
- return ``;
- }
- SaveControlData(controldatajson) {
- return ``;
- }
- loadControlPropertiesHtml(Container) {
- var html = `<section class="">` +
- `<div class="card PropertySettings">` +
- `<div class="card-header"><h6><b>Property Settings</b></h6></div>` +
- `<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>` +
- `</div></section>`;
- $(Container).html(html);
- $("#divPropSetting").removeClass('hidden');
- }
- bindPropertySettings(prop) {
- var propertySettings = prop.PropertySettings;
- if (propertySettings.length > 0 && propertySettings != null && propertySettings != undefined) {
- var i = 0;
- $(".Controlproperties-Element").each(function () {
- if (propertySettings[i].ControlPropertyName == "ControlType") {
- $(this).attr("data-controlpropertyid", propertySettings[i].ControlPropertyId);
- $(this).attr("data-controlpropertyname", propertySettings[i].ControlPropertyName);
- $(this).attr("data-propertysettingid", propertySettings[i].PropertySettingId);
- $("#ControlType").val(propertySettings[i].ControlPropertyValue).trigger("change");
- }
- i += 1;
- });
- }
- }
- savePropertySettings(prop) {
- var propertySettings = prop.PropertySettings;
- var propSettingReq = [];
- $(".Controlproperties-Element").each(function () {
- if ($(this).children().closest("select").val().toString()) {
- var data = {
- FormPropertyId: 0,
- ControlPropertyId: Number($(this).attr('data-controlpropertyid')),
- ControlPropertyValue: $(this).children().closest("select").val().toString(),
- ControlPropertyName: $(this).attr('data-controlpropertyname'),
- ControlId: Number(prop.ControlVariable.split('|')[0]),
- PropertySettingId: Number($(this).attr("data-propertysettingid")),
- };
- propSettingReq.push(data);
- }
- });
- return propSettingReq;
- }
- static Instance() {
- if (this.instance === undefined) {
- this.instance = new Wallet_Settings();
- }
- return this.instance;
- }
- }
- Controls.Wallet_Settings = Wallet_Settings;
- })(Controls = Transact.Controls || (Transact.Controls = {}));
- })(Transact = Apps.Transact || (Apps.Transact = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|