123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- 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 Crm;
- (function (Crm) {
- let Employees;
- (function (Employees) {
- let Managers;
- (function (Managers) {
- class GpsLocationmanager extends Unibase.Platform.Core.BaseManager {
- getLocations(url) {
- return __awaiter(this, void 0, void 0, function* () {
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetGPSTrackingCount(fromdate) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/employees/getgpsusertrackingcount/fromdate/' + fromdate;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- SaveGpsUser(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/GPS/savegpsuser';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetGpsUser(id) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/GPS/getgpsuser/employeeid/' + id;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetEmployees(branchid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/employees/getemployeelist/branchid/' + branchid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetGPSUSerDetails(detailstype, serverdate) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/GPS/getgpsuserdetails/detailstype/' + detailstype + '/fromdate/' + serverdate;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetCustomerDetailsByRouteId(RouteId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/contacts/getcustomerdetailsbyrouteid/routeid/' + RouteId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- SaveTrip(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/GPS/savetrip';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- return response;
- });
- });
- }
- SaveTripTrack(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/GPS/savetriptrack';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- return response;
- });
- });
- }
- GetRouteById(RouteId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/GPS/getroutebyid/routeid/' + RouteId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- GetMyMeterReading() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/GPS/getmymeterreading';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- GetMeterReading(meterReadingId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/GPS/MeterReading/meterid/' + meterReadingId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- saveTripMeterReading(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/GPS/savetripmeterreading';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- return response;
- });
- });
- }
- GetCustomerLocationsByTripGroupId(TripGroupId) {
- return __awaiter(this, void 0, void 0, function* () {
- debugger;
- const url = 'apis/v4/bizgaze/crm/contacts/getcustomerlocationsbytripgroupid/tripgroupid/' + TripGroupId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getuserlocationsbyuseridanddatetime(userid, tracktime) {
- return __awaiter(this, void 0, void 0, function* () {
- debugger;
- const url = 'apis/v4/bizgaze/crm/gpslocation/getuserlocationsbyuseridanddatetime/userid/' + userid + '/tracktime/' + tracktime;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new GpsLocationmanager();
- return this._instance;
- }
- }
- Managers.GpsLocationmanager = GpsLocationmanager;
- })(Managers = Employees.Managers || (Employees.Managers = {}));
- })(Employees = Crm.Employees || (Crm.Employees = {}));
- })(Crm = Apps.Crm || (Apps.Crm = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|