Iniit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"itargetmanager.js","sourceRoot":"","sources":["itargetmanager.ts"],"names":[],"mappings":""}
|
||||
@@ -0,0 +1,212 @@
|
||||
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 = {}));
|
||||
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user