PageSourceSearch

https://mytracksoftware.com/chunk-2QEZHR3Q.js

js mytracksoftware.com collected 2026-10-08 17:09:39 UTC 3,708 bytes, 1 lines download raw bytes

1import{a as d}from"./chunk-SM5FSVVY.js";import{m as c,q as u}from"./chunk-IJOWPJZI.js";import{ca as h,ha as l,q as p}from"./chunk-FCFRADKE.js";var y=(()=>{class o{constructor(){this.httpClient=l(u),this.baseUrl=d.api,this.contentType="application/json"}getReasons(){return this.httpClient.get(`${this.baseUrl}/reasons`)}getReasonsByClass(t){return this.httpClient.get(`${this.baseUrl}/reasons/classification/id/${t}`)}getReason(t){return this.httpClient.get(`${this.baseUrl}/reason/id/${t}`)}activateReason(t,e,s="reason"){let a=[];return t.forEach(i=>{a.push({id:i,isactive:e,type:s})}),this.httpClient.put(`${this.baseUrl}/reasons/status`,a)}upsertReason(t){return this.httpClient.put(`${this.baseUrl}/reason`,t)}deleteReason(t){let e=[];t.forEach(a=>{e.push({id:a})});let s={headers:new c({"Content-Type":this.contentType}),body:e};return this.httpClient.delete(`${this.baseUrl}/reasons/`,s)}validateReason(t){return this.httpClient.post(`${this.baseUrl}/reason/validate/name`,{name:t})}setOverrideStatus(t,e){let s=[];return t.forEach(a=>{s.push({id:a,isactive:e})}),this.httpClient.put(`${this.baseUrl}/reasons/overridestatus`,s)}setApprovalStatus(t,e){let s=[];return t.forEach(a=>{s.push({id:a,isactive:e})}),this.httpClient.put(`${this.baseUrl}/reasons/approvalstatus`,s)}getLocationsReasons(){return this.httpClient.get(`${this.baseUrl}/reasons/location`)}getFilterReasons(t,e=!1){let s=e?`?timestamp=${Date.now()}`:"";return this.httpClient.post(`${this.baseUrl}/reason/filter${s}`,t)}assignLocationToReason(t){return this.httpClient.put(`${this.baseUrl}/reasons/assign`,t)}deleteLocationsReasons(t){let e=[];return t.forEach(s=>{e.push({id:s})}),this.httpClient.put(`${this.baseUrl}/reasons/location/unassign`,e)}setLocationsReasonsOverrideStatus(t,e){let s=[];return t.forEach(a=>{s.push({id:a,isactive:e})}),this.httpClient.put(`${this.baseUrl}/reasons/location/overridestatus`,s)}setLocationsReasonsApprovalStatus(t,e){let s=[];return t.forEach(a=>{s.push({id:a,isactive:e})}),this.httpClient.put(`${this.baseUrl}/reasons/location/approvalstatus`,s)}getOrganizationsReasons(){return this.httpClient.get(`${this.baseUrl}/reasons/organization`)}setCostObjectMandatoryStatus(t,e,s){let a=[];return t.forEach(i=>{let n=e.find(b=>b.assignmentid===i),r=s==="attachment"?!n.attachmentrequired:n.attachmentrequired,g=s==="costobject"?!n.costobjectrequired:n.costobjectrequired,v=s==="preapproval"?!n.preapprovalrequired:n.preapprovalrequired;a.push({id:i,isattachment:r,iscostobject:g,ispreapproval:v})}),this.httpClient.put(`${this.baseUrl}/reasons/organization/costobjectstatus`,a)}setOrganizationsReasonsOverrideStatus(t,e){let s=[];return t.forEach(a=>{s.push({id:a,isactive:e})}),this.httpClient.put(`${this.baseUrl}/reasons/organization/overridestatus`,s)}setOrganizationsReasonsApprovalStatus(t,e){let s=[];return t.forEach(a=>{s.push({id:a,isactive:e})}),this.httpClient.put(`${this.baseUrl}/reasons/organization/approvalstatus`,s)}deleteOrganizationsReasons(t){return this.httpClient.put(`${this.baseUrl}/reasons/organization/unassign`,t)}getFilteredReasonsList(t){let e=t?.locationids??[],s=t?.organizationids??[];if(!e.length&&!s.length)return this.getReasons().pipe(p(i=>i[0]?.success&&i[0].data?i[0].data:[]));let a={locationids:e,reasonids:[],status:"-1",overrideflag:!0,approvalflag:!0};return s.length&&(a.organizationids=s),this.getFilterReasons(a).pipe(p(i=>{if(i&&i[0]?.data){let n=new Map;return i[0].data.forEach(r=>{r.reasonid&&!n.has(r.reasonid)&&n.set(r.reasonid,{id:r.reasonid,name:r.name})}),[...n.values()]}return[]}))}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=h({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{y as a};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.