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 = {}));