shared-ritm 1.1.82 → 1.1.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shared-ritm.es.js
CHANGED
|
@@ -11728,7 +11728,8 @@ class on {
|
|
|
11728
11728
|
this.axiosInstance = De.create({
|
|
11729
11729
|
baseURL: process.env.VUE_APP_BACKEND,
|
|
11730
11730
|
headers: {
|
|
11731
|
-
"Content-Type": "application/json"
|
|
11731
|
+
"Content-Type": "application/json",
|
|
11732
|
+
Accept: "application/json"
|
|
11732
11733
|
}
|
|
11733
11734
|
}), this.axiosInstance.interceptors.request.use(
|
|
11734
11735
|
(t) => {
|
|
@@ -12022,6 +12023,9 @@ class Yh extends on {
|
|
|
12022
12023
|
async fetchTaskUsagePersonal(t) {
|
|
12023
12024
|
return await this.get(`tasks/${t.taskId}/usage/users`, { params: t });
|
|
12024
12025
|
}
|
|
12026
|
+
async fetchTaskUsageInstrument(t) {
|
|
12027
|
+
return await this.get(`tasks/${t.taskId}/usage/instruments`, { params: t });
|
|
12028
|
+
}
|
|
12025
12029
|
fetchEquipment(t) {
|
|
12026
12030
|
return this.get("repairs/equipment/list", { params: t });
|
|
12027
12031
|
}
|
package/dist/shared-ritm.umd.js
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(B){return B instanceof this?B:new this(B)}static concat(B,...Q){const C=new this(B);return Q.forEach(w=>C.set(w)),C}static accessor(B){const C=(this[SE]=this[SE]={accessors:{}}).accessors,w=this.prototype;function E(I){const D=Fg(I);C[D]||(kc(w,I),C[D]=!0)}return r.isArray(B)?B.forEach(E):E(B),this}}xA.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),r.reduceDescriptors(xA.prototype,({value:A},B)=>{let Q=B[0].toUpperCase()+B.slice(1);return{get:()=>A,set(C){this[Q]=C}}}),r.freezeMethods(xA);function cC(A,B){const Q=this||cg,C=B||Q,w=xA.from(C.headers);let E=C.data;return r.forEach(A,function(D){E=D.call(Q,E,w.normalize(),B?B.status:void 0)}),w.normalize(),E}function xE(A){return!!(A&&A.__CANCEL__)}function pB(A,B,Q){wA.call(this,A??"canceled",wA.ERR_CANCELED,B,Q),this.name="CanceledError"}r.inherits(pB,wA,{__CANCEL__:!0});function VE(A,B,Q){const C=Q.config.validateStatus;!Q.status||!C||C(Q.status)?A(Q):B(new wA("Request failed with status code "+Q.status,[wA.ERR_BAD_REQUEST,wA.ERR_BAD_RESPONSE][Math.floor(Q.status/100)-4],Q.config,Q.request,Q))}function vc(A){const B=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return B&&B[1]||""}function Lc(A,B){A=A||10;const Q=new Array(A),C=new Array(A);let w=0,E=0,I;return B=B!==void 0?B:1e3,function(Y){const e=Date.now(),M=C[E];I||(I=e),Q[w]=Y,C[w]=e;let o=E,s=0;for(;o!==w;)s+=Q[o++],o=o%A;if(w=(w+1)%A,w===E&&(E=(E+1)%A),e-I<B)return;const i=M&&e-M;return i?Math.round(s*1e3/i):void 0}}function Rc(A,B){let Q=0,C=1e3/B,w,E;const I=(e,M=Date.now())=>{Q=M,w=null,E&&(clearTimeout(E),E=null),A.apply(null,e)};return[(...e)=>{const M=Date.now(),o=M-Q;o>=C?I(e,M):(w=e,E||(E=setTimeout(()=>{E=null,I(w)},C-o)))},()=>w&&I(w)]}const CQ=(A,B,Q=3)=>{let C=0;const w=Lc(50,250);return Rc(E=>{const I=E.loaded,D=E.lengthComputable?E.total:void 0,Y=I-C,e=w(Y),M=I<=D;C=I;const o={loaded:I,total:D,progress:D?I/D:void 0,bytes:Y,rate:e||void 0,estimated:e&&D&&M?(D-I)/e:void 0,event:E,lengthComputable:D!=null,[B?"download":"upload"]:!0};A(o)},Q)},bE=(A,B)=>{const Q=A!=null;return[C=>B[0]({lengthComputable:Q,total:A,loaded:C}),B[1]]},OE=A=>(...B)=>r.asap(()=>A(...B)),mc=SA.hasStandardBrowserEnv?function(){const B=SA.navigator&&/(msie|trident)/i.test(SA.navigator.userAgent),Q=document.createElement("a");let C;function w(E){let I=E;return B&&(Q.setAttribute("href",I),I=Q.href),Q.setAttribute("href",I),{href:Q.href,protocol:Q.protocol?Q.protocol.replace(/:$/,""):"",host:Q.host,search:Q.search?Q.search.replace(/^\?/,""):"",hash:Q.hash?Q.hash.replace(/^#/,""):"",hostname:Q.hostname,port:Q.port,pathname:Q.pathname.charAt(0)==="/"?Q.pathname:"/"+Q.pathname}}return C=w(window.location.href),function(I){const D=r.isString(I)?w(I):I;return D.protocol===C.protocol&&D.host===C.host}}():function(){return function(){return!0}}(),Tc=SA.hasStandardBrowserEnv?{write(A,B,Q,C,w,E){const I=[A+"="+encodeURIComponent(B)];r.isNumber(Q)&&I.push("expires="+new Date(Q).toGMTString()),r.isString(C)&&I.push("path="+C),r.isString(w)&&I.push("domain="+w),E===!0&&I.push("secure"),document.cookie=I.join("; ")},read(A){const B=document.cookie.match(new RegExp("(^|;\\s*)("+A+")=([^;]*)"));return B?decodeURIComponent(B[3]):null},remove(A){this.write(A,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function jc(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function yc(A,B){return B?A.replace(/\/?\/$/,"")+"/"+B.replace(/^\/+/,""):A}function pE(A,B){return A&&!jc(B)?yc(A,B):B}const XE=A=>A instanceof xA?{...A}:A;function kB(A,B){B=B||{};const Q={};function C(e,M,o){return r.isPlainObject(e)&&r.isPlainObject(M)?r.merge.call({caseless:o},e,M):r.isPlainObject(M)?r.merge({},M):r.isArray(M)?M.slice():M}function w(e,M,o){if(r.isUndefined(M)){if(!r.isUndefined(e))return C(void 0,e,o)}else return C(e,M,o)}function E(e,M){if(!r.isUndefined(M))return C(void 0,M)}function I(e,M){if(r.isUndefined(M)){if(!r.isUndefined(e))return C(void 0,e)}else return C(void 0,M)}function D(e,M,o){if(o in B)return C(e,M);if(o in A)return C(void 0,e)}const Y={url:E,method:E,data:E,baseURL:I,transformRequest:I,transformResponse:I,paramsSerializer:I,timeout:I,timeoutMessage:I,withCredentials:I,withXSRFToken:I,adapter:I,responseType:I,xsrfCookieName:I,xsrfHeaderName:I,onUploadProgress:I,onDownloadProgress:I,decompress:I,maxContentLength:I,maxBodyLength:I,beforeRedirect:I,transport:I,httpAgent:I,httpsAgent:I,cancelToken:I,socketPath:I,responseEncoding:I,validateStatus:D,headers:(e,M)=>w(XE(e),XE(M),!0)};return r.forEach(Object.keys(Object.assign({},A,B)),function(M){const o=Y[M]||w,s=o(A[M],B[M],M);r.isUndefined(s)&&o!==D||(Q[M]=s)}),Q}const ZE=A=>{const B=kB({},A);let{data:Q,withXSRFToken:C,xsrfHeaderName:w,xsrfCookieName:E,headers:I,auth:D}=B;B.headers=I=xA.from(I),B.url=jE(pE(B.baseURL,B.url),A.params,A.paramsSerializer),D&&I.set("Authorization","Basic "+btoa((D.username||"")+":"+(D.password?unescape(encodeURIComponent(D.password)):"")));let Y;if(r.isFormData(Q)){if(SA.hasStandardBrowserEnv||SA.hasStandardBrowserWebWorkerEnv)I.setContentType(void 0);else if((Y=I.getContentType())!==!1){const[e,...M]=Y?Y.split(";").map(o=>o.trim()).filter(Boolean):[];I.setContentType([e||"multipart/form-data",...M].join("; "))}}if(SA.hasStandardBrowserEnv&&(C&&r.isFunction(C)&&(C=C(B)),C||C!==!1&&mc(B.url))){const e=w&&E&&Tc.read(E);e&&I.set(w,e)}return B},Wc=typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(Q,C){const w=ZE(A);let E=w.data;const I=xA.from(w.headers).normalize();let{responseType:D,onUploadProgress:Y,onDownloadProgress:e}=w,M,o,s,i,F;function U(){i&&i(),F&&F(),w.cancelToken&&w.cancelToken.unsubscribe(M),w.signal&&w.signal.removeEventListener("abort",M)}let t=new XMLHttpRequest;t.open(w.method.toUpperCase(),w.url,!0),t.timeout=w.timeout;function d(){if(!t)return;const f=xA.from("getAllResponseHeaders"in t&&t.getAllResponseHeaders()),J={data:!D||D==="text"||D==="json"?t.responseText:t.response,status:t.status,statusText:t.statusText,headers:f,config:A,request:t};VE(function(R){Q(R),U()},function(R){C(R),U()},J),t=null}"onloadend"in t?t.onloadend=d:t.onreadystatechange=function(){!t||t.readyState!==4||t.status===0&&!(t.responseURL&&t.responseURL.indexOf("file:")===0)||setTimeout(d)},t.onabort=function(){t&&(C(new wA("Request aborted",wA.ECONNABORTED,A,t)),t=null)},t.onerror=function(){C(new wA("Network Error",wA.ERR_NETWORK,A,t)),t=null},t.ontimeout=function(){let h=w.timeout?"timeout of "+w.timeout+"ms exceeded":"timeout exceeded";const J=w.transitional||WE;w.timeoutErrorMessage&&(h=w.timeoutErrorMessage),C(new wA(h,J.clarifyTimeoutError?wA.ETIMEDOUT:wA.ECONNABORTED,A,t)),t=null},E===void 0&&I.setContentType(null),"setRequestHeader"in t&&r.forEach(I.toJSON(),function(h,J){t.setRequestHeader(J,h)}),r.isUndefined(w.withCredentials)||(t.withCredentials=!!w.withCredentials),D&&D!=="json"&&(t.responseType=w.responseType),e&&([s,F]=CQ(e,!0),t.addEventListener("progress",s)),Y&&t.upload&&([o,i]=CQ(Y),t.upload.addEventListener("progress",o),t.upload.addEventListener("loadend",i)),(w.cancelToken||w.signal)&&(M=f=>{t&&(C(!f||f.type?new pB(null,A,t):f),t.abort(),t=null)},w.cancelToken&&w.cancelToken.subscribe(M),w.signal&&(w.signal.aborted?M():w.signal.addEventListener("abort",M)));const P=vc(w.url);if(P&&SA.protocols.indexOf(P)===-1){C(new wA("Unsupported protocol "+P+":",wA.ERR_BAD_REQUEST,A));return}t.send(E||null)})},Kc=(A,B)=>{const{length:Q}=A=A?A.filter(Boolean):[];if(B||Q){let C=new AbortController,w;const E=function(e){if(!w){w=!0,D();const M=e instanceof Error?e:this.reason;C.abort(M instanceof wA?M:new pB(M instanceof Error?M.message:M))}};let I=B&&setTimeout(()=>{I=null,E(new wA(`timeout ${B} of ms exceeded`,wA.ETIMEDOUT))},B);const D=()=>{A&&(I&&clearTimeout(I),I=null,A.forEach(e=>{e.unsubscribe?e.unsubscribe(E):e.removeEventListener("abort",E)}),A=null)};A.forEach(e=>e.addEventListener("abort",E));const{signal:Y}=C;return Y.unsubscribe=()=>r.asap(D),Y}},Sc=function*(A,B){let Q=A.byteLength;if(Q<B){yield A;return}let C=0,w;for(;C<Q;)w=C+B,yield A.slice(C,w),C=w},xc=async function*(A,B){for await(const Q of Vc(A))yield*Sc(Q,B)},Vc=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}const B=A.getReader();try{for(;;){const{done:Q,value:C}=await B.read();if(Q)break;yield C}}finally{await B.cancel()}},qE=(A,B,Q,C)=>{const w=xc(A,B);let E=0,I,D=Y=>{I||(I=!0,C&&C(Y))};return new ReadableStream({async pull(Y){try{const{done:e,value:M}=await w.next();if(e){D(),Y.close();return}let o=M.byteLength;if(Q){let s=E+=o;Q(s)}Y.enqueue(new Uint8Array(M))}catch(e){throw D(e),e}},cancel(Y){return D(Y),w.return()}},{highWaterMark:2})},wQ=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",_E=wQ&&typeof ReadableStream=="function",bc=wQ&&(typeof TextEncoder=="function"?(A=>B=>A.encode(B))(new TextEncoder):async A=>new Uint8Array(await new Response(A).arrayBuffer())),$E=(A,...B)=>{try{return!!A(...B)}catch{return!1}},Oc=_E&&$E(()=>{let A=!1;const B=new Request(SA.origin,{body:new ReadableStream,method:"POST",get duplex(){return A=!0,"half"}}).headers.has("Content-Type");return A&&!B}),AI=64*1024,FC=_E&&$E(()=>r.isReadableStream(new Response("").body)),EQ={stream:FC&&(A=>A.body)};wQ&&(A=>{["text","arrayBuffer","blob","formData","stream"].forEach(B=>{!EQ[B]&&(EQ[B]=r.isFunction(A[B])?Q=>Q[B]():(Q,C)=>{throw new wA(`Response type '${B}' is not supported`,wA.ERR_NOT_SUPPORT,C)})})})(new Response);const pc=async A=>{if(A==null)return 0;if(r.isBlob(A))return A.size;if(r.isSpecCompliantForm(A))return(await new Request(SA.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(r.isArrayBufferView(A)||r.isArrayBuffer(A))return A.byteLength;if(r.isURLSearchParams(A)&&(A=A+""),r.isString(A))return(await bc(A)).byteLength},Xc=async(A,B)=>{const Q=r.toFiniteNumber(A.getContentLength());return Q??pc(B)},tC={http:ic,xhr:Wc,fetch:wQ&&(async A=>{let{url:B,method:Q,data:C,signal:w,cancelToken:E,timeout:I,onDownloadProgress:D,onUploadProgress:Y,responseType:e,headers:M,withCredentials:o="same-origin",fetchOptions:s}=ZE(A);e=e?(e+"").toLowerCase():"text";let i=Kc([w,E&&E.toAbortSignal()],I),F;const U=i&&i.unsubscribe&&(()=>{i.unsubscribe()});let t;try{if(Y&&Oc&&Q!=="get"&&Q!=="head"&&(t=await Xc(M,C))!==0){let J=new Request(B,{method:"POST",body:C,duplex:"half"}),L;if(r.isFormData(C)&&(L=J.headers.get("content-type"))&&M.setContentType(L),J.body){const[R,b]=bE(t,CQ(OE(Y)));C=qE(J.body,AI,R,b)}}r.isString(o)||(o=o?"include":"omit");const d="credentials"in Request.prototype;F=new Request(B,{...s,signal:i,method:Q.toUpperCase(),headers:M.normalize().toJSON(),body:C,duplex:"half",credentials:d?o:void 0});let P=await fetch(F);const f=FC&&(e==="stream"||e==="response");if(FC&&(D||f&&U)){const J={};["status","statusText","headers"].forEach(N=>{J[N]=P[N]});const L=r.toFiniteNumber(P.headers.get("content-length")),[R,b]=D&&bE(L,CQ(OE(D),!0))||[];P=new Response(qE(P.body,AI,R,()=>{b&&b(),U&&U()}),J)}e=e||"text";let h=await EQ[r.findKey(EQ,e)||"text"](P,A);return!f&&U&&U(),await new Promise((J,L)=>{VE(J,L,{data:h,headers:xA.from(P.headers),status:P.status,statusText:P.statusText,config:A,request:F})})}catch(d){throw U&&U(),d&&d.name==="TypeError"&&/fetch/i.test(d.message)?Object.assign(new wA("Network Error",wA.ERR_NETWORK,A,F),{cause:d.cause||d}):wA.from(d,d&&d.code,A,F)}})};r.forEach(tC,(A,B)=>{if(A){try{Object.defineProperty(A,"name",{value:B})}catch{}Object.defineProperty(A,"adapterName",{value:B})}});const BI=A=>`- ${A}`,Zc=A=>r.isFunction(A)||A===null||A===!1,gI={getAdapter:A=>{A=r.isArray(A)?A:[A];const{length:B}=A;let Q,C;const w={};for(let E=0;E<B;E++){Q=A[E];let I;if(C=Q,!Zc(Q)&&(C=tC[(I=String(Q)).toLowerCase()],C===void 0))throw new wA(`Unknown adapter '${I}'`);if(C)break;w[I||"#"+E]=C}if(!C){const E=Object.entries(w).map(([D,Y])=>`adapter ${D} `+(Y===!1?"is not supported by the environment":"is not available in the build"));let I=B?E.length>1?`since :
|
|
5
5
|
`+E.map(BI).join(`
|
|
6
6
|
`):" "+BI(E[0]):"as no adapter specified";throw new wA("There is no suitable adapter to dispatch the request "+I,"ERR_NOT_SUPPORT")}return C},adapters:tC};function iC(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new pB(null,A)}function QI(A){return iC(A),A.headers=xA.from(A.headers),A.data=cC.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),gI.getAdapter(A.adapter||cg.adapter)(A).then(function(C){return iC(A),C.data=cC.call(A,A.transformResponse,C),C.headers=xA.from(C.headers),C},function(C){return xE(C)||(iC(A),C&&C.response&&(C.response.data=cC.call(A,A.transformResponse,C.response),C.response.headers=xA.from(C.response.headers))),Promise.reject(C)})}const CI="1.7.7",nC={};["object","boolean","number","function","string","symbol"].forEach((A,B)=>{nC[A]=function(C){return typeof C===A||"a"+(B<1?"n ":" ")+A}});const wI={};nC.transitional=function(B,Q,C){function w(E,I){return"[Axios v"+CI+"] Transitional option '"+E+"'"+I+(C?". "+C:"")}return(E,I,D)=>{if(B===!1)throw new wA(w(I," has been removed"+(Q?" in "+Q:"")),wA.ERR_DEPRECATED);return Q&&!wI[I]&&(wI[I]=!0,console.warn(w(I," has been deprecated since v"+Q+" and will be removed in the near future"))),B?B(E,I,D):!0}};function qc(A,B,Q){if(typeof A!="object")throw new wA("options must be an object",wA.ERR_BAD_OPTION_VALUE);const C=Object.keys(A);let w=C.length;for(;w-- >0;){const E=C[w],I=B[E];if(I){const D=A[E],Y=D===void 0||I(D,E,A);if(Y!==!0)throw new wA("option "+E+" must be "+Y,wA.ERR_BAD_OPTION_VALUE);continue}if(Q!==!0)throw new wA("Unknown option "+E,wA.ERR_BAD_OPTION)}}const sC={assertOptions:qc,validators:nC},sB=sC.validators;class vB{constructor(B){this.defaults=B,this.interceptors={request:new yE,response:new yE}}async request(B,Q){try{return await this._request(B,Q)}catch(C){if(C instanceof Error){let w;Error.captureStackTrace?Error.captureStackTrace(w={}):w=new Error;const E=w.stack?w.stack.replace(/^.+\n/,""):"";try{C.stack?E&&!String(C.stack).endsWith(E.replace(/^.+\n.+\n/,""))&&(C.stack+=`
|
|
7
|
-
`+E):C.stack=E}catch{}}throw C}}_request(B,Q){typeof B=="string"?(Q=Q||{},Q.url=B):Q=B||{},Q=kB(this.defaults,Q);const{transitional:C,paramsSerializer:w,headers:E}=Q;C!==void 0&&sC.assertOptions(C,{silentJSONParsing:sB.transitional(sB.boolean),forcedJSONParsing:sB.transitional(sB.boolean),clarifyTimeoutError:sB.transitional(sB.boolean)},!1),w!=null&&(r.isFunction(w)?Q.paramsSerializer={serialize:w}:sC.assertOptions(w,{encode:sB.function,serialize:sB.function},!0)),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&r.merge(E.common,E[Q.method]);E&&r.forEach(["delete","get","head","post","put","patch","common"],F=>{delete E[F]}),Q.headers=xA.concat(I,E);const D=[];let Y=!0;this.interceptors.request.forEach(function(U){typeof U.runWhen=="function"&&U.runWhen(Q)===!1||(Y=Y&&U.synchronous,D.unshift(U.fulfilled,U.rejected))});const e=[];this.interceptors.response.forEach(function(U){e.push(U.fulfilled,U.rejected)});let M,o=0,s;if(!Y){const F=[QI.bind(this),void 0];for(F.unshift.apply(F,D),F.push.apply(F,e),s=F.length,M=Promise.resolve(Q);o<s;)M=M.then(F[o++],F[o++]);return M}s=D.length;let i=Q;for(o=0;o<s;){const F=D[o++],U=D[o++];try{i=F(i)}catch(t){U.call(this,t);break}}try{M=QI.call(this,i)}catch(F){return Promise.reject(F)}for(o=0,s=e.length;o<s;)M=M.then(e[o++],e[o++]);return M}getUri(B){B=kB(this.defaults,B);const Q=pE(B.baseURL,B.url);return jE(Q,B.params,B.paramsSerializer)}}r.forEach(["delete","get","head","options"],function(B){vB.prototype[B]=function(Q,C){return this.request(kB(C||{},{method:B,url:Q,data:(C||{}).data}))}}),r.forEach(["post","put","patch"],function(B){function Q(C){return function(E,I,D){return this.request(kB(D||{},{method:B,headers:C?{"Content-Type":"multipart/form-data"}:{},url:E,data:I}))}}vB.prototype[B]=Q(),vB.prototype[B+"Form"]=Q(!0)});class UC{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let Q;this.promise=new Promise(function(E){Q=E});const C=this;this.promise.then(w=>{if(!C._listeners)return;let E=C._listeners.length;for(;E-- >0;)C._listeners[E](w);C._listeners=null}),this.promise.then=w=>{let E;const I=new Promise(D=>{C.subscribe(D),E=D}).then(w);return I.cancel=function(){C.unsubscribe(E)},I},B(function(E,I,D){C.reason||(C.reason=new pB(E,I,D),Q(C.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(B){if(this.reason){B(this.reason);return}this._listeners?this._listeners.push(B):this._listeners=[B]}unsubscribe(B){if(!this._listeners)return;const Q=this._listeners.indexOf(B);Q!==-1&&this._listeners.splice(Q,1)}toAbortSignal(){const B=new AbortController,Q=C=>{B.abort(C)};return this.subscribe(Q),B.signal.unsubscribe=()=>this.unsubscribe(Q),B.signal}static source(){let B;return{token:new UC(function(w){B=w}),cancel:B}}}function _c(A){return function(Q){return A.apply(null,Q)}}function $c(A){return r.isObject(A)&&A.isAxiosError===!0}const GC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(GC).forEach(([A,B])=>{GC[B]=A});function EI(A){const B=new vB(A),Q=PE(vB.prototype.request,B);return r.extend(Q,vB.prototype,B,{allOwnKeys:!0}),r.extend(Q,B,null,{allOwnKeys:!0}),Q.create=function(w){return EI(kB(A,w))},Q}const lA=EI(cg);lA.Axios=vB,lA.CanceledError=pB,lA.CancelToken=UC,lA.isCancel=xE,lA.VERSION=CI,lA.toFormData=gQ,lA.AxiosError=wA,lA.Cancel=lA.CanceledError,lA.all=function(B){return Promise.all(B)},lA.spread=_c,lA.isAxiosError=$c,lA.mergeConfig=kB,lA.AxiosHeaders=xA,lA.formToJSON=A=>KE(r.isHTMLForm(A)?new FormData(A):A),lA.getAdapter=gI.getAdapter,lA.HttpStatusCode=GC,lA.default=lA;class UB{constructor(){eI(this,"axiosInstance");this.axiosInstance=lA.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json"}}),this.axiosInstance.interceptors.request.use(B=>{const Q=this.getToken();return Q&&B.headers&&(B.headers.Authorization=`Bearer ${Q}`),B},B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,B=>{var Q,C;return(((Q=B.response)==null?void 0:Q.status)===401||((C=B.response)==null?void 0:C.status)===403)&&this.logout(),Promise.reject(B)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){this.removeToken(),window.location.href="/sign-in"}handleError(B){B.response?console.error("API Error:",B.response.status,B.response.data):B.request?console.error("No response received:",B.request):console.error("Error during request setup:",B.message)}async get(B,Q){try{const C=await this.axiosInstance.get(B,Q);return(C==null?void 0:C.data)??C}catch(C){const w=C;throw this.handleError(w),C}}async delete(B,Q){try{return await this.axiosInstance.delete(B,Q)}catch(C){const w=C;throw this.handleError(w),C}}async post(B,Q,C){try{return(await this.axiosInstance.post(B,Q,C)).data}catch(w){const E=w;throw this.handleError(E),w}}async put(B,Q,C){try{return(await this.axiosInstance.put(B,Q,C)).data}catch(w){const E=w;throw this.handleError(E),w}}}class AF extends UB{async fetchCriticalPathTasks(B){return await this.get(`gantt/get_list_task_on_critical_path?${B}`)}async fetchGanttList(B){return await this.get(`/list/tasks/search?${B}&gantt=1`)}}let hC;function BF(){return hC||(hC=new AF),hC}class gF extends UB{async fetchPieProjects(B){return await this.get("repairs/pie/projects?"+B)}async fetchPieTasks(B){return await this.get("repairs/pie/tasks?"+B)}async fetchPiePersonnel(B){return await this.get("repairs/metrics/get_list_position?"+B)}async fetchPersonnelData(B){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfo(B){return await this.get(`repairs/metrics/list_position_intersection_details?${B}`)}async fetchPiePersonnelInfo(B){return await this.get(`repairs/metrics/get_list_user_by_position?${B}`)}async fetchPieCriticalPath(B){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+B)}async fetchPieCriticalPathInfo(B){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${B}`)}async fetchPieTmc(B){return await this.get("repairs/metrics/get_list_instrument_type?"+B)}async fetchPieTmcInfo(B){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${B}`)}async fetchPieUntimelyClosedTask(B){return await this.get("repairs/metrics/get_list_comment_type?"+B)}async fetchPieUntimelyClosedTaskInfo(B){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${B}`)}async fetchPieAdditionalTasks(B){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+B)}async fetchPieAdditionalTasksInfo(B){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${B}`)}async fetchPersonnel(B){return await this.get("repairs/statistic/personnel?"+B)}async fetchPieExpired(B){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+B)}async fetchPieExpiredInfo(B){return await this.get(`repairs/metrics/get_list_task_expired?${B}`)}async fetchEconomicsPerformance(B){return await this.get(`repairs/metrics/get_economic_performance?${B}`)}async fetchEconomicsInfo(B){return await this.get(`repairs/metrics/get_list_task_economic_performance?${B}`)}async fetchQualityMetrics(B){return await this.get(`repairs/metrics/get_quality_metrics?${B}`)}async fetchQualityInfo(B){return await this.get(`repairs/metrics/get_list_task_by_quality?${B}`)}async fetchPieWorkZone(B){return await this.get("repairs/metrics/get_list_work_zone_instrument?"+B)}async fetchWorkZoneInfo(B){return await this.get("repairs/metrics/get_list_work_zone_instrument_by_status?"+B)}}let aC;function QF(){return aC||(aC=new gF),aC}class CF extends UB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,Q){return this.put(`/projects/${B}`,Q)}fetchProjects(B){return this.get("/get_list_project",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,Q){return this.put(`/projects/${B}`,Q)}unArchiveProject(B,Q){return this.put(`/projects/${B}`,Q)}moveAprProject(B){return this.post("repairs/move_plan_to_real",{repairs:[B]})}restoreProject(B){return this.post("/restore_project",{projects_ids:[B]})}importTasks(B){return this.post("tasks/import",B)}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}}let PC;function wF(){return PC||(PC=new CF),PC}class EF extends UB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,Q,C,w,E){return this.get("get_list_repair"+(B?`${Q}&per_page=100000${E?"&"+E:""}&${C?"":w}`:`?per_page=100000${E?"&"+E:""}&${w}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(B){return this.post("/repairs/equipments",B)}startRepair(B){return this.post(`/repairs/${B}/start`,null)}finishRepair(B){return this.post(`/repairs/${B}/finish`,null)}finishPreparationProject(B){return this.post(`/repairs/${B}/finish_preparation`,null)}moveRepairToCurrent(B){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[B]})}moveArchiveToCurrent(B){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[B]})}moveRepairToApr(B){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[B]})}moveRepairToArchive(B){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[B]})}restoreRepair(B){return this.post("/restore_repair",{repairs_ids:[B]})}updateRepair(B,Q){return this.put(`/repairs/${Q}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}}let HC;function IF(){return HC||(HC=new EF),HC}class DF extends UB{async fetchTaskById(B){return await this.get(`/tasks/${B}`)}async fetchTasksList(B){return await this.get("/list/tasks/search",{params:B})}async fetchSubtasksList(B){return await this.get(`/task/${B}/subtasks/list`)}async fetchTaskBranch(B){return await this.get(`/get_list_task_branch?task_id=${B}`)}async fetchInstrumentsList(B){return await this.get("admin/instruments",{params:B})}async fetchInstrumentTypeListWithPreparedWarehouse(B){return await this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}async fetchInstrumentsEquivalentList(B){return await this.get("tasks/instrument/list",{params:B})}async fetchDiffInstruments(B){return await this.get(`tasks/${B.taskId}/fill/module`,{params:B})}async replaceInstruments(B){return await this.post("/instruments/equivalent/attach",B)}async fetchTaskUsagePersonal(B){return await this.get(`tasks/${B.taskId}/usage/users`,{params:B})}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchTaskVideoSources(B){return this.get("work_zone/get_list_video_source",{params:B})}fetchTaskVideoSourcesStream(B){return this.get("horizon/video-source",{params:B})}createWorkZone(B){return this.post("admin/work-zones",B)}async createTask(B){return await this.post("tasks",B)}async editTask(B){return await this.put(`tasks/${B.taskId}`,B.data)}async mergeTask(B){return await this.post("tasks/merge",B)}async deleteTask(B){return await this.delete(`tasks/${B}`)}async changeStatus(B){const{taskId:Q,data:C}=B;return await this.put(`task/${Q}/change-status`,C)}async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B){const{commentId:Q,data:C}=B;return await this.put(`comments/${Q}`,C)}async saveMetrics(B){return await this.put("/update_quality_metrics",B)}async checkReasonForStatus(B){return await this.post("/tasks/check_reason_for_task",B)}async verifyTaskStatus(B){const{task_id:Q,data:C}=B;return await this.get(`/task/${Q}/change-status/verification`,{params:C})}async checkBranchBeforeCloseTask(B){return await this.post("/check_branch_before_close_task",B)}}let lC;function MF(){return lC||(lC=new DF),lC}class YF extends UB{login(B,Q){return this.post("/login",{email:B,password:Q})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}}let rC;function eF(){return rC||(rC=new YF),rC}class oF extends UB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let fC;function cF(){return fC||(fC=new oF),fC}const FF=(A,B)=>({message:B,color:A==="danger"?"red":A==="success"?"green":A==="warning"?"orange":"white",position:"top-right"});DA.ApiService=UB,DA.AppButton=wg,DA.AppCheckbox=oD,DA.AppConfirmDialog=Ho,DA.AppDatePicker=WD,DA.AppDropdown=Jo,DA.AppInput=wM,DA.AppInputSearch=EM,DA.AppLayout=cM,DA.AppLayoutHeader=iM,DA.AppLoader=DE,DA.AppSelect=lM,DA.AppSheet=vM,DA.AppSidebar=Io,DA.AppToggle=Mo,DA.AppWrapper=co,DA.notificationSettings=FF,DA.useAuthService=eF,DA.useFileService=cF,DA.useGanttService=BF,DA.useMetricsService=QF,DA.useProjectsService=wF,DA.useRepairsService=IF,DA.useTasksService=MF,Object.defineProperty(DA,Symbol.toStringTag,{value:"Module"})});
|
|
7
|
+
`+E):C.stack=E}catch{}}throw C}}_request(B,Q){typeof B=="string"?(Q=Q||{},Q.url=B):Q=B||{},Q=kB(this.defaults,Q);const{transitional:C,paramsSerializer:w,headers:E}=Q;C!==void 0&&sC.assertOptions(C,{silentJSONParsing:sB.transitional(sB.boolean),forcedJSONParsing:sB.transitional(sB.boolean),clarifyTimeoutError:sB.transitional(sB.boolean)},!1),w!=null&&(r.isFunction(w)?Q.paramsSerializer={serialize:w}:sC.assertOptions(w,{encode:sB.function,serialize:sB.function},!0)),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&r.merge(E.common,E[Q.method]);E&&r.forEach(["delete","get","head","post","put","patch","common"],F=>{delete E[F]}),Q.headers=xA.concat(I,E);const D=[];let Y=!0;this.interceptors.request.forEach(function(U){typeof U.runWhen=="function"&&U.runWhen(Q)===!1||(Y=Y&&U.synchronous,D.unshift(U.fulfilled,U.rejected))});const e=[];this.interceptors.response.forEach(function(U){e.push(U.fulfilled,U.rejected)});let M,o=0,s;if(!Y){const F=[QI.bind(this),void 0];for(F.unshift.apply(F,D),F.push.apply(F,e),s=F.length,M=Promise.resolve(Q);o<s;)M=M.then(F[o++],F[o++]);return M}s=D.length;let i=Q;for(o=0;o<s;){const F=D[o++],U=D[o++];try{i=F(i)}catch(t){U.call(this,t);break}}try{M=QI.call(this,i)}catch(F){return Promise.reject(F)}for(o=0,s=e.length;o<s;)M=M.then(e[o++],e[o++]);return M}getUri(B){B=kB(this.defaults,B);const Q=pE(B.baseURL,B.url);return jE(Q,B.params,B.paramsSerializer)}}r.forEach(["delete","get","head","options"],function(B){vB.prototype[B]=function(Q,C){return this.request(kB(C||{},{method:B,url:Q,data:(C||{}).data}))}}),r.forEach(["post","put","patch"],function(B){function Q(C){return function(E,I,D){return this.request(kB(D||{},{method:B,headers:C?{"Content-Type":"multipart/form-data"}:{},url:E,data:I}))}}vB.prototype[B]=Q(),vB.prototype[B+"Form"]=Q(!0)});class UC{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let Q;this.promise=new Promise(function(E){Q=E});const C=this;this.promise.then(w=>{if(!C._listeners)return;let E=C._listeners.length;for(;E-- >0;)C._listeners[E](w);C._listeners=null}),this.promise.then=w=>{let E;const I=new Promise(D=>{C.subscribe(D),E=D}).then(w);return I.cancel=function(){C.unsubscribe(E)},I},B(function(E,I,D){C.reason||(C.reason=new pB(E,I,D),Q(C.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(B){if(this.reason){B(this.reason);return}this._listeners?this._listeners.push(B):this._listeners=[B]}unsubscribe(B){if(!this._listeners)return;const Q=this._listeners.indexOf(B);Q!==-1&&this._listeners.splice(Q,1)}toAbortSignal(){const B=new AbortController,Q=C=>{B.abort(C)};return this.subscribe(Q),B.signal.unsubscribe=()=>this.unsubscribe(Q),B.signal}static source(){let B;return{token:new UC(function(w){B=w}),cancel:B}}}function _c(A){return function(Q){return A.apply(null,Q)}}function $c(A){return r.isObject(A)&&A.isAxiosError===!0}const GC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(GC).forEach(([A,B])=>{GC[B]=A});function EI(A){const B=new vB(A),Q=PE(vB.prototype.request,B);return r.extend(Q,vB.prototype,B,{allOwnKeys:!0}),r.extend(Q,B,null,{allOwnKeys:!0}),Q.create=function(w){return EI(kB(A,w))},Q}const lA=EI(cg);lA.Axios=vB,lA.CanceledError=pB,lA.CancelToken=UC,lA.isCancel=xE,lA.VERSION=CI,lA.toFormData=gQ,lA.AxiosError=wA,lA.Cancel=lA.CanceledError,lA.all=function(B){return Promise.all(B)},lA.spread=_c,lA.isAxiosError=$c,lA.mergeConfig=kB,lA.AxiosHeaders=xA,lA.formToJSON=A=>KE(r.isHTMLForm(A)?new FormData(A):A),lA.getAdapter=gI.getAdapter,lA.HttpStatusCode=GC,lA.default=lA;class UB{constructor(){eI(this,"axiosInstance");this.axiosInstance=lA.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"}}),this.axiosInstance.interceptors.request.use(B=>{const Q=this.getToken();return Q&&B.headers&&(B.headers.Authorization=`Bearer ${Q}`),B},B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,B=>{var Q,C;return(((Q=B.response)==null?void 0:Q.status)===401||((C=B.response)==null?void 0:C.status)===403)&&this.logout(),Promise.reject(B)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){this.removeToken(),window.location.href="/sign-in"}handleError(B){B.response?console.error("API Error:",B.response.status,B.response.data):B.request?console.error("No response received:",B.request):console.error("Error during request setup:",B.message)}async get(B,Q){try{const C=await this.axiosInstance.get(B,Q);return(C==null?void 0:C.data)??C}catch(C){const w=C;throw this.handleError(w),C}}async delete(B,Q){try{return await this.axiosInstance.delete(B,Q)}catch(C){const w=C;throw this.handleError(w),C}}async post(B,Q,C){try{return(await this.axiosInstance.post(B,Q,C)).data}catch(w){const E=w;throw this.handleError(E),w}}async put(B,Q,C){try{return(await this.axiosInstance.put(B,Q,C)).data}catch(w){const E=w;throw this.handleError(E),w}}}class AF extends UB{async fetchCriticalPathTasks(B){return await this.get(`gantt/get_list_task_on_critical_path?${B}`)}async fetchGanttList(B){return await this.get(`/list/tasks/search?${B}&gantt=1`)}}let hC;function BF(){return hC||(hC=new AF),hC}class gF extends UB{async fetchPieProjects(B){return await this.get("repairs/pie/projects?"+B)}async fetchPieTasks(B){return await this.get("repairs/pie/tasks?"+B)}async fetchPiePersonnel(B){return await this.get("repairs/metrics/get_list_position?"+B)}async fetchPersonnelData(B){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfo(B){return await this.get(`repairs/metrics/list_position_intersection_details?${B}`)}async fetchPiePersonnelInfo(B){return await this.get(`repairs/metrics/get_list_user_by_position?${B}`)}async fetchPieCriticalPath(B){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+B)}async fetchPieCriticalPathInfo(B){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${B}`)}async fetchPieTmc(B){return await this.get("repairs/metrics/get_list_instrument_type?"+B)}async fetchPieTmcInfo(B){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${B}`)}async fetchPieUntimelyClosedTask(B){return await this.get("repairs/metrics/get_list_comment_type?"+B)}async fetchPieUntimelyClosedTaskInfo(B){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${B}`)}async fetchPieAdditionalTasks(B){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+B)}async fetchPieAdditionalTasksInfo(B){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${B}`)}async fetchPersonnel(B){return await this.get("repairs/statistic/personnel?"+B)}async fetchPieExpired(B){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+B)}async fetchPieExpiredInfo(B){return await this.get(`repairs/metrics/get_list_task_expired?${B}`)}async fetchEconomicsPerformance(B){return await this.get(`repairs/metrics/get_economic_performance?${B}`)}async fetchEconomicsInfo(B){return await this.get(`repairs/metrics/get_list_task_economic_performance?${B}`)}async fetchQualityMetrics(B){return await this.get(`repairs/metrics/get_quality_metrics?${B}`)}async fetchQualityInfo(B){return await this.get(`repairs/metrics/get_list_task_by_quality?${B}`)}async fetchPieWorkZone(B){return await this.get("repairs/metrics/get_list_work_zone_instrument?"+B)}async fetchWorkZoneInfo(B){return await this.get("repairs/metrics/get_list_work_zone_instrument_by_status?"+B)}}let aC;function QF(){return aC||(aC=new gF),aC}class CF extends UB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,Q){return this.put(`/projects/${B}`,Q)}fetchProjects(B){return this.get("/get_list_project",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,Q){return this.put(`/projects/${B}`,Q)}unArchiveProject(B,Q){return this.put(`/projects/${B}`,Q)}moveAprProject(B){return this.post("repairs/move_plan_to_real",{repairs:[B]})}restoreProject(B){return this.post("/restore_project",{projects_ids:[B]})}importTasks(B){return this.post("tasks/import",B)}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}}let PC;function wF(){return PC||(PC=new CF),PC}class EF extends UB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,Q,C,w,E){return this.get("get_list_repair"+(B?`${Q}&per_page=100000${E?"&"+E:""}&${C?"":w}`:`?per_page=100000${E?"&"+E:""}&${w}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(B){return this.post("/repairs/equipments",B)}startRepair(B){return this.post(`/repairs/${B}/start`,null)}finishRepair(B){return this.post(`/repairs/${B}/finish`,null)}finishPreparationProject(B){return this.post(`/repairs/${B}/finish_preparation`,null)}moveRepairToCurrent(B){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[B]})}moveArchiveToCurrent(B){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[B]})}moveRepairToApr(B){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[B]})}moveRepairToArchive(B){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[B]})}restoreRepair(B){return this.post("/restore_repair",{repairs_ids:[B]})}updateRepair(B,Q){return this.put(`/repairs/${Q}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}}let HC;function IF(){return HC||(HC=new EF),HC}class DF extends UB{async fetchTaskById(B){return await this.get(`/tasks/${B}`)}async fetchTasksList(B){return await this.get("/list/tasks/search",{params:B})}async fetchSubtasksList(B){return await this.get(`/task/${B}/subtasks/list`)}async fetchTaskBranch(B){return await this.get(`/get_list_task_branch?task_id=${B}`)}async fetchInstrumentsList(B){return await this.get("admin/instruments",{params:B})}async fetchInstrumentTypeListWithPreparedWarehouse(B){return await this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}async fetchInstrumentsEquivalentList(B){return await this.get("tasks/instrument/list",{params:B})}async fetchDiffInstruments(B){return await this.get(`tasks/${B.taskId}/fill/module`,{params:B})}async replaceInstruments(B){return await this.post("/instruments/equivalent/attach",B)}async fetchTaskUsagePersonal(B){return await this.get(`tasks/${B.taskId}/usage/users`,{params:B})}async fetchTaskUsageInstrument(B){return await this.get(`tasks/${B.taskId}/usage/instruments`,{params:B})}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchTaskVideoSources(B){return this.get("work_zone/get_list_video_source",{params:B})}fetchTaskVideoSourcesStream(B){return this.get("horizon/video-source",{params:B})}createWorkZone(B){return this.post("admin/work-zones",B)}async createTask(B){return await this.post("tasks",B)}async editTask(B){return await this.put(`tasks/${B.taskId}`,B.data)}async mergeTask(B){return await this.post("tasks/merge",B)}async deleteTask(B){return await this.delete(`tasks/${B}`)}async changeStatus(B){const{taskId:Q,data:C}=B;return await this.put(`task/${Q}/change-status`,C)}async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B){const{commentId:Q,data:C}=B;return await this.put(`comments/${Q}`,C)}async saveMetrics(B){return await this.put("/update_quality_metrics",B)}async checkReasonForStatus(B){return await this.post("/tasks/check_reason_for_task",B)}async verifyTaskStatus(B){const{task_id:Q,data:C}=B;return await this.get(`/task/${Q}/change-status/verification`,{params:C})}async checkBranchBeforeCloseTask(B){return await this.post("/check_branch_before_close_task",B)}}let lC;function MF(){return lC||(lC=new DF),lC}class YF extends UB{login(B,Q){return this.post("/login",{email:B,password:Q})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}}let rC;function eF(){return rC||(rC=new YF),rC}class oF extends UB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let fC;function cF(){return fC||(fC=new oF),fC}const FF=(A,B)=>({message:B,color:A==="danger"?"red":A==="success"?"green":A==="warning"?"orange":"white",position:"top-right"});DA.ApiService=UB,DA.AppButton=wg,DA.AppCheckbox=oD,DA.AppConfirmDialog=Ho,DA.AppDatePicker=WD,DA.AppDropdown=Jo,DA.AppInput=wM,DA.AppInputSearch=EM,DA.AppLayout=cM,DA.AppLayoutHeader=iM,DA.AppLoader=DE,DA.AppSelect=lM,DA.AppSheet=vM,DA.AppSidebar=Io,DA.AppToggle=Mo,DA.AppWrapper=co,DA.notificationSettings=FF,DA.useAuthService=eF,DA.useFileService=cF,DA.useGanttService=BF,DA.useMetricsService=QF,DA.useProjectsService=wF,DA.useRepairsService=IF,DA.useTasksService=MF,Object.defineProperty(DA,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -17,6 +17,7 @@ declare class TasksService extends ApiService {
|
|
|
17
17
|
fetchDiffInstruments(params: any): Promise<ResponseApi<Api_Task_Module_Instrument_Condition>>;
|
|
18
18
|
replaceInstruments(payload: any): Promise<ResponseApi<any>>;
|
|
19
19
|
fetchTaskUsagePersonal(params: any): Promise<ResponseApi<unknown[]>>;
|
|
20
|
+
fetchTaskUsageInstrument(params: any): Promise<ResponseApi<unknown[]>>;
|
|
20
21
|
fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>>;
|
|
21
22
|
fetchTaskVideoSources(params: any): Promise<ResponseApi<Api_Task_Video_Source[]>>;
|
|
22
23
|
fetchTaskVideoSourcesStream(params: any): Promise<ResponseApi<Api_Task_Video_Source_Stream[]>>;
|
package/package.json
CHANGED
|
@@ -50,10 +50,15 @@ class TasksService extends ApiService {
|
|
|
50
50
|
public async replaceInstruments(payload: any): Promise<ResponseApi<any>> {
|
|
51
51
|
return await this.post(`/instruments/equivalent/attach`, payload)
|
|
52
52
|
}
|
|
53
|
+
|
|
53
54
|
public async fetchTaskUsagePersonal(params: any): Promise<ResponseApi<unknown[]>> {
|
|
54
55
|
return await this.get(`tasks/${params.taskId}/usage/users`, { params })
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
public async fetchTaskUsageInstrument(params: any): Promise<ResponseApi<unknown[]>> {
|
|
59
|
+
return await this.get(`tasks/${params.taskId}/usage/instruments`, { params })
|
|
60
|
+
}
|
|
61
|
+
|
|
57
62
|
public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
58
63
|
return this.get('repairs/equipment/list', { params })
|
|
59
64
|
}
|