This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
@@ -0,0 +1,137 @@
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 Transact;
(function (Transact) {
let Managers;
(function (Managers) {
class EstimateManager extends Unibase.Platform.Core.BaseManager {
getEstimateItems(EstimateId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimates/getestimateitembyid/estimateid/' + EstimateId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getEstimateItem(EstimateItemId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimates/getestimateitem/estimateitemid/' + EstimateItemId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
managePrice(obj) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimates/manageprice';
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
return response;
});
});
}
getEstimate(EstimateId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimates/getestimate/id/' + EstimateId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
estimatePrint(EstimateId, TemplateId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimate/getestimatehtml/estimateid/' + EstimateId + '/templateid/' + TemplateId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result !== "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getEstimatePermissions() {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimates/getsalesestimatepermissions';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
adjustEstimateItem(EstimateItemId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimates/adjustestimateitem/estimateitemid/' + EstimateItemId;
return yield this.dataHelper().postAsync(url, EstimateItemId).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
voidEstimate(EstimateId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimates/voidestimate/estimateid/' + EstimateId;
return yield this.dataHelper().postAsync(url, EstimateId).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
confirmEstimate(EstimateId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimates/confirmestimate/estimateid/' + EstimateId;
return yield this.dataHelper().postAsync(url, EstimateId).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getLeadDetails(LeadId, LobId, OrderTypeId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/estimates/getleaddetails/leadid/' + LeadId + '/lobid/' + LobId + '/ordertypeid/' + OrderTypeId + '/branchid/0';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getLeadByLeadId(LeadId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/crm/leads/getleadbyleadid/leadid/' + LeadId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new EstimateManager();
return this._instance;
}
}
Managers.EstimateManager = EstimateManager;
})(Managers = Transact.Managers || (Transact.Managers = {}));
})(Transact = Apps.Transact || (Apps.Transact = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"estimatemanager.js","sourceRoot":"","sources":["estimatemanager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAU,OAAO,CA4GhB;AA5GD,WAAU,OAAO;IACb,IAAiB,IAAI,CA0GpB;IA1GD,WAAiB,IAAI;QACjB,IAAiB,QAAQ,CAwGxB;QAxGD,WAAiB,QAAQ;YACrB,IAAiB,QAAQ,CAsGxB;YAtGD,WAAiB,QAAQ;gBACrB,MAAa,eAAgB,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW;oBAC5D,gBAAgB,CAAC,UAAU;;4BAC7B,MAAM,GAAG,GAAG,oEAAoE,GAAG,UAAU,CAAC;4BAC9F,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;gCAChE,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI;oCACxB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gCAClD,OAAO,QAAQ,CAAC;4BACpB,CAAC,CAAC,CAAC;wBACP,CAAC;qBAAA;oBAEK,eAAe,CAAC,cAAc;;4BAChC,MAAM,GAAG,GAAG,oEAAoE,GAAG,cAAc,CAAC;4BAClG,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;gCAChE,IAAI,QAAQ,CAAC,MAAM,KA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GgB,QAAQ,GAAR,iBAAQ,KAAR,iBAAQ,QAsGxB;QACL,CAAC,EAxGgB,QAAQ,GAAR,aAAQ,KAAR,aAAQ,QAwGxB;IACL,CAAC,EA1GgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QA0GpB;AACL,CAAC,EA5GS,OAAO,KAAP,OAAO,QA4GhB"}
+1
View File
@@ -0,0 +1 @@
var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Bizgaze;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t extends Unibase.Platform.Core.BaseManager{getEstimateItems(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/estimates/getestimateitembyid/estimateid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}getEstimateItem(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/estimates/getestimateitem/estimateitemid/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}managePrice(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/transact/estimates/manageprice",n).then(function(n){return n})})}getEstimate(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/estimates/getestimate/id/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!=""&&n.result!==null&&(n.result=JSON.parse(n.result)),n})})}estimatePrint(n,t){return __awaiter(this,void 0,void 0,function*(){const i="apis/v4/bizgaze/transact/estimate/getestimatehtml/estimateid/"+n+"/templateid/"+t;return yield this.dataHelper().getAsync(i).then(function(n){return n.result!==null&&n.result!==""&&(n.result=JSON.parse(n.result)),n})})}getEstimatePermissions(){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().getAsync("apis/v4/bizgaze/transact/estimates/getsalesestimatepermissions").then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}adjustEstimateItem(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/estimates/adjustestimateitem/estimateitemid/"+n;return yield this.dataHelper().postAsync(t,n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}voidEstimate(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/estimates/voidestimate/estimateid/"+n;return yield this.dataHelper().postAsync(t,n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}confirmEstimate(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/estimates/confirmestimate/estimateid/"+n;return yield this.dataHelper().postAsync(t,n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}getLeadDetails(n,t,i){return __awaiter(this,void 0,void 0,function*(){const r="apis/v4/bizgaze/transact/estimates/getleaddetails/leadid/"+n+"/lobid/"+t+"/ordertypeid/"+i+"/branchid/0";return yield this.dataHelper().getAsync(r).then(function(n){return n.result!=null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}static Instance(){return this._instance===undefined&&(this._instance=new t),this._instance}}n.EstimateManager=t})(t=n.Managers||(n.Managers={}))})(t=n.Transact||(n.Transact={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));