123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- var Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Transact;
- (function (Transact) {
- let Controls;
- (function (Controls) {
- let Offers;
- (function (Offers) {
- class ContactBinding extends Unibase.Platform.Core.BaseComponent {
- constructor() {
- super();
- }
- cssFiles() {
- return [];
- }
- jsFiles() {
- return [];
- }
- html(id, containerid) {
- var html = "";
- return html;
- }
- load(id, containerid, callback) {
- }
- bindContact(containerid, textcontainerid, redeemcontainerid) {
- var instance = this;
- var isCustomer = Unibase.Platform.Membership.Infos.Identity.getCurrentUser().isRestrictedUser;
- var UserId = Unibase.Platform.Membership.Infos.Identity.getCurrentUser().userId;
- if (isCustomer) {
- instance.fileCacheHelper.loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
- Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getContactByUserId(UserId).then(function (response) {
- var contactId = response.result.ContactId;
- var orgContactName = response.result.OrgContactName;
- var organizationName = response.result.OrganizationName;
- var contactName = organizationName + ' - ' + orgContactName;
- $(containerid).attr("disabled", 1);
- instance.fileCacheHelper.loadJsFile('apps/transact/managers/offers/offermanager.js', function () {
- Bizgaze.Apps.Transact.Managers.OfferManager.Instance().getwalletamount(contactId).then(function (response) {
- var data = response.result;
- if (data != null) {
- var walletid = data.WalletId;
- var walletvalue = data.WalletValue;
- $(textcontainerid).val(walletvalue);
- $(redeemcontainerid).val(walletvalue);
- var contact = new Option(contactName, walletid.toString(), true);
- $(containerid).append(contact);
- }
- $(textcontainerid).attr("disabled", 1);
- });
- });
- });
- });
- }
- }
- static Instance() {
- if (this.instance === undefined) {
- this.instance = new ContactBinding();
- }
- return this.instance;
- }
- }
- Offers.ContactBinding = ContactBinding;
- })(Offers = Controls.Offers || (Controls.Offers = {}));
- })(Controls = Transact.Controls || (Transact.Controls = {}));
- })(Transact = Apps.Transact || (Apps.Transact = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|