123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- 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 TM;
- (function (TM) {
- let Targets;
- (function (Targets) {
- let Managers;
- (function (Managers) {
- class TargetManager extends Unibase.Platform.Core.BaseManager {
- getBreakupTenureDates(fromdate, todate, targetdefid, breakuptenureid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/getbreakupdates/fromdate/' + fromdate + '/todate/' + todate + '/targetdefinitionid/' + targetdefid + '/breakuptenureid/' + breakuptenureid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- exportEmployeeTarget(targetdefinitionid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/exportemployeetargets/targetdefinitionid/' + targetdefinitionid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- exportCustomerTarget(targetdefinitionid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/exportcustomertargets/targetdefinitionid/' + targetdefinitionid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshTenureTypes() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targetgroups/refreshtenuretypes/np';
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response);
- return response;
- });
- });
- }
- employeeWiseTarget(authtoken, targetdefinitionid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/createempwisetarget/authToken/' + authtoken + '/TargetDefinitionId/' + targetdefinitionid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- customerWiseTarget(authtoken, targetdefinitionid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/createcustomerwisetarget/authToken/' + authtoken + '/TargetDefinitionId/' + targetdefinitionid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- LoadTargetDetails(TargetDefinitionId, ContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/getemptargetdetails/targetdefinitionid/' + TargetDefinitionId + '/Contactid/' + ContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- LoadTagWiseTargetDetails(TargetDefinitionId, ContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/gettagwisetargetdetails/targetdefinitionid/' + TargetDefinitionId + '/Contactid/' + ContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- savecontacttargets(itemlist) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/savecontacttargets/List';
- return yield this.dataHelper().postAsync(url, itemlist).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- loadCustomerTargetvsAchive(authtoken, TargetDefinitionId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/getcustomertargetvsachive/authToken/' + authtoken + '/targetdefinitionid/' + TargetDefinitionId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- loadEmployeeTargetvsAchive(authtoken, TargetDefinitionId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/getemployeetargetvsachive/authToken/' + authtoken + '/targetdefinitionid/' + TargetDefinitionId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetDBPTargetPlanning(stateid, districtid, segmentid, productlinetagid, distributorid, targetdefinitionid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/mobil/targets/getdbpplanning/StateId/' + stateid + '/DistrictId/' + districtid + '/SegmentId/' + segmentid + '/ProductLinetagId/' + productlinetagid + '/DistributorId/' + distributorid + '/TargetdefinitionId/' + targetdefinitionid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetDBPTargetPlannings(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/mobil/targets/getdbpplannings';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveTargetPlan(targetList) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/mobil/targets/savedbpplanningsasync/List';
- return yield this.dataHelper().postAsync(url, targetList).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveApprove(targetdefinitionid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/mobil/targets/changedbptargetdefinitionstatus/targetdefinitionid/' + targetdefinitionid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getTargetDefinitionDetails(TargetDefinitionId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/gettargetdefinitiondetails/targetdefinitionid/' + TargetDefinitionId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- ApplyDBPDistricts() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/mobil/targets/getpreviousperformancestates';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getContactWiseTargetDetails(ContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/tm/targets/getcontactwisetargetdetails/Contactid/' + ContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new TargetManager();
- return this._instance;
- }
- }
- Managers.TargetManager = TargetManager;
- })(Managers = Targets.Managers || (Targets.Managers = {}));
- })(Targets = TM.Targets || (TM.Targets = {}));
- })(TM = Apps.TM || (Apps.TM = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|