shared-ritm 1.2.30 → 1.2.31
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
|
@@ -12368,6 +12368,12 @@ class Lv extends ln {
|
|
|
12368
12368
|
configs() {
|
|
12369
12369
|
return this.get("/configs");
|
|
12370
12370
|
}
|
|
12371
|
+
changePassword(t, n, o) {
|
|
12372
|
+
return this.put(`/users/${t}/password`, {
|
|
12373
|
+
password: n,
|
|
12374
|
+
password_confirmation: o
|
|
12375
|
+
});
|
|
12376
|
+
}
|
|
12371
12377
|
}
|
|
12372
12378
|
let wr;
|
|
12373
12379
|
function Xv() {
|
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[qE]=this[qE]={accessors:{}}).accessors,w=this.prototype;function E(I){const D=tg(I);C[D]||(IF(w,I),C[D]=!0)}return f.isArray(B)?B.forEach(E):E(B),this}}xA.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),f.reduceDescriptors(xA.prototype,({value:A},B)=>{let Q=B[0].toUpperCase()+B.slice(1);return{get:()=>A,set(C){this[Q]=C}}}),f.freezeMethods(xA);function nC(A,B){const Q=this||Fg,C=B||Q,w=xA.from(C.headers);let E=C.data;return f.forEach(A,function(D){E=D.call(Q,E,w.normalize(),B?B.status:void 0)}),w.normalize(),E}function _E(A){return!!(A&&A.__CANCEL__)}function qB(A,B,Q){EA.call(this,A??"canceled",EA.ERR_CANCELED,B,Q),this.name="CanceledError"}f.inherits(qB,EA,{__CANCEL__:!0});function $E(A,B,Q){const C=Q.config.validateStatus;!Q.status||!C||C(Q.status)?A(Q):B(new EA("Request failed with status code "+Q.status,[EA.ERR_BAD_REQUEST,EA.ERR_BAD_RESPONSE][Math.floor(Q.status/100)-4],Q.config,Q.request,Q))}function DF(A){const B=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return B&&B[1]||""}function MF(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,i=0;for(;o!==w;)i+=Q[o++],o=o%A;if(w=(w+1)%A,w===E&&(E=(E+1)%A),e-I<B)return;const t=M&&e-M;return t?Math.round(i*1e3/t):void 0}}function YF(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 wQ=(A,B,Q=3)=>{let C=0;const w=MF(50,250);return YF(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)},AI=(A,B)=>{const Q=A!=null;return[C=>B[0]({lengthComputable:Q,total:A,loaded:C}),B[1]]},BI=A=>(...B)=>f.asap(()=>A(...B)),eF=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=f.isString(I)?w(I):I;return D.protocol===C.protocol&&D.host===C.host}}():function(){return function(){return!0}}(),oF=SA.hasStandardBrowserEnv?{write(A,B,Q,C,w,E){const I=[A+"="+encodeURIComponent(B)];f.isNumber(Q)&&I.push("expires="+new Date(Q).toGMTString()),f.isString(C)&&I.push("path="+C),f.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 cF(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function FF(A,B){return B?A.replace(/\/?\/$/,"")+"/"+B.replace(/^\/+/,""):A}function gI(A,B){return A&&!cF(B)?FF(A,B):B}const QI=A=>A instanceof xA?{...A}:A;function kB(A,B){B=B||{};const Q={};function C(e,M,o){return f.isPlainObject(e)&&f.isPlainObject(M)?f.merge.call({caseless:o},e,M):f.isPlainObject(M)?f.merge({},M):f.isArray(M)?M.slice():M}function w(e,M,o){if(f.isUndefined(M)){if(!f.isUndefined(e))return C(void 0,e,o)}else return C(e,M,o)}function E(e,M){if(!f.isUndefined(M))return C(void 0,M)}function I(e,M){if(f.isUndefined(M)){if(!f.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(QI(e),QI(M),!0)};return f.forEach(Object.keys(Object.assign({},A,B)),function(M){const o=Y[M]||w,i=o(A[M],B[M],M);f.isUndefined(i)&&o!==D||(Q[M]=i)}),Q}const CI=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=OE(gI(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(f.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&&f.isFunction(C)&&(C=C(B)),C||C!==!1&&eF(B.url))){const e=w&&E&&oF.read(E);e&&I.set(w,e)}return B},tF=typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(Q,C){const w=CI(A);let E=w.data;const I=xA.from(w.headers).normalize();let{responseType:D,onUploadProgress:Y,onDownloadProgress:e}=w,M,o,i,t,c;function U(){t&&t(),c&&c(),w.cancelToken&&w.cancelToken.unsubscribe(M),w.signal&&w.signal.removeEventListener("abort",M)}let n=new XMLHttpRequest;n.open(w.method.toUpperCase(),w.url,!0),n.timeout=w.timeout;function d(){if(!n)return;const J=xA.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),r={data:!D||D==="text"||D==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:J,config:A,request:n};$E(function(R){Q(R),U()},function(R){C(R),U()},r),n=null}"onloadend"in n?n.onloadend=d:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(d)},n.onabort=function(){n&&(C(new EA("Request aborted",EA.ECONNABORTED,A,n)),n=null)},n.onerror=function(){C(new EA("Network Error",EA.ERR_NETWORK,A,n)),n=null},n.ontimeout=function(){let a=w.timeout?"timeout of "+w.timeout+"ms exceeded":"timeout exceeded";const r=w.transitional||XE;w.timeoutErrorMessage&&(a=w.timeoutErrorMessage),C(new EA(a,r.clarifyTimeoutError?EA.ETIMEDOUT:EA.ECONNABORTED,A,n)),n=null},E===void 0&&I.setContentType(null),"setRequestHeader"in n&&f.forEach(I.toJSON(),function(a,r){n.setRequestHeader(r,a)}),f.isUndefined(w.withCredentials)||(n.withCredentials=!!w.withCredentials),D&&D!=="json"&&(n.responseType=w.responseType),e&&([i,c]=wQ(e,!0),n.addEventListener("progress",i)),Y&&n.upload&&([o,t]=wQ(Y),n.upload.addEventListener("progress",o),n.upload.addEventListener("loadend",t)),(w.cancelToken||w.signal)&&(M=J=>{n&&(C(!J||J.type?new qB(null,A,n):J),n.abort(),n=null)},w.cancelToken&&w.cancelToken.subscribe(M),w.signal&&(w.signal.aborted?M():w.signal.addEventListener("abort",M)));const P=DF(w.url);if(P&&SA.protocols.indexOf(P)===-1){C(new EA("Unsupported protocol "+P+":",EA.ERR_BAD_REQUEST,A));return}n.send(E||null)})},iF=(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 EA?M:new qB(M instanceof Error?M.message:M))}};let I=B&&setTimeout(()=>{I=null,E(new EA(`timeout ${B} of ms exceeded`,EA.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=()=>f.asap(D),Y}},nF=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},sF=async function*(A,B){for await(const Q of UF(A))yield*nF(Q,B)},UF=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()}},wI=(A,B,Q,C)=>{const w=sF(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 i=E+=o;Q(i)}Y.enqueue(new Uint8Array(M))}catch(e){throw D(e),e}},cancel(Y){return D(Y),w.return()}},{highWaterMark:2})},EQ=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",EI=EQ&&typeof ReadableStream=="function",GF=EQ&&(typeof TextEncoder=="function"?(A=>B=>A.encode(B))(new TextEncoder):async A=>new Uint8Array(await new Response(A).arrayBuffer())),II=(A,...B)=>{try{return!!A(...B)}catch{return!1}},aF=EI&&II(()=>{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}),DI=64*1024,sC=EI&&II(()=>f.isReadableStream(new Response("").body)),IQ={stream:sC&&(A=>A.body)};EQ&&(A=>{["text","arrayBuffer","blob","formData","stream"].forEach(B=>{!IQ[B]&&(IQ[B]=f.isFunction(A[B])?Q=>Q[B]():(Q,C)=>{throw new EA(`Response type '${B}' is not supported`,EA.ERR_NOT_SUPPORT,C)})})})(new Response);const hF=async A=>{if(A==null)return 0;if(f.isBlob(A))return A.size;if(f.isSpecCompliantForm(A))return(await new Request(SA.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(f.isArrayBufferView(A)||f.isArrayBuffer(A))return A.byteLength;if(f.isURLSearchParams(A)&&(A=A+""),f.isString(A))return(await GF(A)).byteLength},PF=async(A,B)=>{const Q=f.toFiniteNumber(A.getContentLength());return Q??hF(B)},UC={http:xc,xhr:tF,fetch:EQ&&(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:i}=CI(A);e=e?(e+"").toLowerCase():"text";let t=iF([w,E&&E.toAbortSignal()],I),c;const U=t&&t.unsubscribe&&(()=>{t.unsubscribe()});let n;try{if(Y&&aF&&Q!=="get"&&Q!=="head"&&(n=await PF(M,C))!==0){let r=new Request(B,{method:"POST",body:C,duplex:"half"}),T;if(f.isFormData(C)&&(T=r.headers.get("content-type"))&&M.setContentType(T),r.body){const[R,p]=AI(n,wQ(BI(Y)));C=wI(r.body,DI,R,p)}}f.isString(o)||(o=o?"include":"omit");const d="credentials"in Request.prototype;c=new Request(B,{...i,signal:t,method:Q.toUpperCase(),headers:M.normalize().toJSON(),body:C,duplex:"half",credentials:d?o:void 0});let P=await fetch(c);const J=sC&&(e==="stream"||e==="response");if(sC&&(D||J&&U)){const r={};["status","statusText","headers"].forEach(N=>{r[N]=P[N]});const T=f.toFiniteNumber(P.headers.get("content-length")),[R,p]=D&&AI(T,wQ(BI(D),!0))||[];P=new Response(wI(P.body,DI,R,()=>{p&&p(),U&&U()}),r)}e=e||"text";let a=await IQ[f.findKey(IQ,e)||"text"](P,A);return!J&&U&&U(),await new Promise((r,T)=>{$E(r,T,{data:a,headers:xA.from(P.headers),status:P.status,statusText:P.statusText,config:A,request:c})})}catch(d){throw U&&U(),d&&d.name==="TypeError"&&/fetch/i.test(d.message)?Object.assign(new EA("Network Error",EA.ERR_NETWORK,A,c),{cause:d.cause||d}):EA.from(d,d&&d.code,A,c)}})};f.forEach(UC,(A,B)=>{if(A){try{Object.defineProperty(A,"name",{value:B})}catch{}Object.defineProperty(A,"adapterName",{value:B})}});const MI=A=>`- ${A}`,HF=A=>f.isFunction(A)||A===null||A===!1,YI={getAdapter:A=>{A=f.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,!HF(Q)&&(C=UC[(I=String(Q)).toLowerCase()],C===void 0))throw new EA(`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(MI).join(`
|
|
6
6
|
`):" "+MI(E[0]):"as no adapter specified";throw new EA("There is no suitable adapter to dispatch the request "+I,"ERR_NOT_SUPPORT")}return C},adapters:UC};function GC(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new qB(null,A)}function eI(A){return GC(A),A.headers=xA.from(A.headers),A.data=nC.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),YI.getAdapter(A.adapter||Fg.adapter)(A).then(function(C){return GC(A),C.data=nC.call(A,A.transformResponse,C),C.headers=xA.from(C.headers),C},function(C){return _E(C)||(GC(A),C&&C.response&&(C.response.data=nC.call(A,A.transformResponse,C.response),C.response.headers=xA.from(C.response.headers))),Promise.reject(C)})}const oI="1.7.7",aC={};["object","boolean","number","function","string","symbol"].forEach((A,B)=>{aC[A]=function(C){return typeof C===A||"a"+(B<1?"n ":" ")+A}});const cI={};aC.transitional=function(B,Q,C){function w(E,I){return"[Axios v"+oI+"] Transitional option '"+E+"'"+I+(C?". "+C:"")}return(E,I,D)=>{if(B===!1)throw new EA(w(I," has been removed"+(Q?" in "+Q:"")),EA.ERR_DEPRECATED);return Q&&!cI[I]&&(cI[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 lF(A,B,Q){if(typeof A!="object")throw new EA("options must be an object",EA.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 EA("option "+E+" must be "+Y,EA.ERR_BAD_OPTION_VALUE);continue}if(Q!==!0)throw new EA("Unknown option "+E,EA.ERR_BAD_OPTION)}}const hC={assertOptions:lF,validators:aC},GB=hC.validators;class vB{constructor(B){this.defaults=B,this.interceptors={request:new pE,response:new pE}}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&&hC.assertOptions(C,{silentJSONParsing:GB.transitional(GB.boolean),forcedJSONParsing:GB.transitional(GB.boolean),clarifyTimeoutError:GB.transitional(GB.boolean)},!1),w!=null&&(f.isFunction(w)?Q.paramsSerializer={serialize:w}:hC.assertOptions(w,{encode:GB.function,serialize:GB.function},!0)),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&f.merge(E.common,E[Q.method]);E&&f.forEach(["delete","get","head","post","put","patch","common"],c=>{delete E[c]}),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,i;if(!Y){const c=[eI.bind(this),void 0];for(c.unshift.apply(c,D),c.push.apply(c,e),i=c.length,M=Promise.resolve(Q);o<i;)M=M.then(c[o++],c[o++]);return M}i=D.length;let t=Q;for(o=0;o<i;){const c=D[o++],U=D[o++];try{t=c(t)}catch(n){U.call(this,n);break}}try{M=eI.call(this,t)}catch(c){return Promise.reject(c)}for(o=0,i=e.length;o<i;)M=M.then(e[o++],e[o++]);return M}getUri(B){B=kB(this.defaults,B);const Q=gI(B.baseURL,B.url);return OE(Q,B.params,B.paramsSerializer)}}f.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}))}}),f.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 PC{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 qB(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 PC(function(w){B=w}),cancel:B}}}function rF(A){return function(Q){return A.apply(null,Q)}}function fF(A){return f.isObject(A)&&A.isAxiosError===!0}const HC={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(HC).forEach(([A,B])=>{HC[B]=A});function FI(A){const B=new vB(A),Q=dE(vB.prototype.request,B);return f.extend(Q,vB.prototype,B,{allOwnKeys:!0}),f.extend(Q,B,null,{allOwnKeys:!0}),Q.create=function(w){return FI(kB(A,w))},Q}const rA=FI(Fg);rA.Axios=vB,rA.CanceledError=qB,rA.CancelToken=PC,rA.isCancel=_E,rA.VERSION=oI,rA.toFormData=QQ,rA.AxiosError=EA,rA.Cancel=rA.CanceledError,rA.all=function(B){return Promise.all(B)},rA.spread=rF,rA.isAxiosError=fF,rA.mergeConfig=kB,rA.AxiosHeaders=xA,rA.formToJSON=A=>ZE(f.isHTMLForm(A)?new FormData(A):A),rA.getAdapter=YI.getAdapter,rA.HttpStatusCode=HC,rA.default=rA;class aB{constructor(){UI(this,"axiosInstance");this.axiosInstance=rA.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 uF extends aB{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 lC;function JF(){return lC||(lC=new uF),lC}class NF extends aB{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 rC;function dF(){return rC||(rC=new NF),rC}class zF extends aB{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("/search/projects",{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)}importKtd(B){return this.post("/parse_ktd",B,{headers:{"Content-Type":"multipart/form-data"}})}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}}let fC;function kF(){return fC||(fC=new zF),fC}class vF extends aB{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 uC;function LF(){return uC||(uC=new vF),uC}class RF extends aB{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 JC;function mF(){return JC||(JC=new RF),JC}class TF extends aB{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 NC;function jF(){return NC||(NC=new TF),NC}class yF extends aB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let dC;function WF(){return dC||(dC=new yF),dC}const KF=(A,B)=>({message:B,color:A==="danger"?"red":A==="success"?"green":A==="warning"?"orange":"white",position:"top-right"});DA.ApiService=aB,DA.AppButton=Lg,DA.AppCheckbox=GD,DA.AppConfirmDialog=$o,DA.AppDatePicker=XD,DA.AppDropdown=Cc,DA.AppInput=cM,DA.AppInputSearch=FM,DA.AppLayout=GM,DA.AppLayoutHeader=Qo,DA.AppLayoutPage=Io,DA.AppLoader=oE,DA.AppSelect=io,DA.AppSheet=Ho,DA.AppSidebar=Ro,DA.AppToggle=To,DA.AppWrapper=Ko,DA.notificationSettings=KF,DA.useAuthService=jF,DA.useFileService=WF,DA.useGanttService=JF,DA.useMetricsService=dF,DA.useProjectsService=kF,DA.useRepairsService=LF,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&&hC.assertOptions(C,{silentJSONParsing:GB.transitional(GB.boolean),forcedJSONParsing:GB.transitional(GB.boolean),clarifyTimeoutError:GB.transitional(GB.boolean)},!1),w!=null&&(f.isFunction(w)?Q.paramsSerializer={serialize:w}:hC.assertOptions(w,{encode:GB.function,serialize:GB.function},!0)),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&f.merge(E.common,E[Q.method]);E&&f.forEach(["delete","get","head","post","put","patch","common"],c=>{delete E[c]}),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,i;if(!Y){const c=[eI.bind(this),void 0];for(c.unshift.apply(c,D),c.push.apply(c,e),i=c.length,M=Promise.resolve(Q);o<i;)M=M.then(c[o++],c[o++]);return M}i=D.length;let t=Q;for(o=0;o<i;){const c=D[o++],U=D[o++];try{t=c(t)}catch(n){U.call(this,n);break}}try{M=eI.call(this,t)}catch(c){return Promise.reject(c)}for(o=0,i=e.length;o<i;)M=M.then(e[o++],e[o++]);return M}getUri(B){B=kB(this.defaults,B);const Q=gI(B.baseURL,B.url);return OE(Q,B.params,B.paramsSerializer)}}f.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}))}}),f.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 PC{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 qB(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 PC(function(w){B=w}),cancel:B}}}function rF(A){return function(Q){return A.apply(null,Q)}}function fF(A){return f.isObject(A)&&A.isAxiosError===!0}const HC={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(HC).forEach(([A,B])=>{HC[B]=A});function FI(A){const B=new vB(A),Q=dE(vB.prototype.request,B);return f.extend(Q,vB.prototype,B,{allOwnKeys:!0}),f.extend(Q,B,null,{allOwnKeys:!0}),Q.create=function(w){return FI(kB(A,w))},Q}const rA=FI(Fg);rA.Axios=vB,rA.CanceledError=qB,rA.CancelToken=PC,rA.isCancel=_E,rA.VERSION=oI,rA.toFormData=QQ,rA.AxiosError=EA,rA.Cancel=rA.CanceledError,rA.all=function(B){return Promise.all(B)},rA.spread=rF,rA.isAxiosError=fF,rA.mergeConfig=kB,rA.AxiosHeaders=xA,rA.formToJSON=A=>ZE(f.isHTMLForm(A)?new FormData(A):A),rA.getAdapter=YI.getAdapter,rA.HttpStatusCode=HC,rA.default=rA;class aB{constructor(){UI(this,"axiosInstance");this.axiosInstance=rA.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 uF extends aB{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 lC;function JF(){return lC||(lC=new uF),lC}class NF extends aB{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 rC;function dF(){return rC||(rC=new NF),rC}class zF extends aB{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("/search/projects",{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)}importKtd(B){return this.post("/parse_ktd",B,{headers:{"Content-Type":"multipart/form-data"}})}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}}let fC;function kF(){return fC||(fC=new zF),fC}class vF extends aB{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 uC;function LF(){return uC||(uC=new vF),uC}class RF extends aB{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 JC;function mF(){return JC||(JC=new RF),JC}class TF extends aB{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")}changePassword(B,Q,C){return this.put(`/users/${B}/password`,{password:Q,password_confirmation:C})}}let NC;function jF(){return NC||(NC=new TF),NC}class yF extends aB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let dC;function WF(){return dC||(dC=new yF),dC}const KF=(A,B)=>({message:B,color:A==="danger"?"red":A==="success"?"green":A==="warning"?"orange":"white",position:"top-right"});DA.ApiService=aB,DA.AppButton=Lg,DA.AppCheckbox=GD,DA.AppConfirmDialog=$o,DA.AppDatePicker=XD,DA.AppDropdown=Cc,DA.AppInput=cM,DA.AppInputSearch=FM,DA.AppLayout=GM,DA.AppLayoutHeader=Qo,DA.AppLayoutPage=Io,DA.AppLoader=oE,DA.AppSelect=io,DA.AppSheet=Ho,DA.AppSidebar=Ro,DA.AppToggle=To,DA.AppWrapper=Ko,DA.notificationSettings=KF,DA.useAuthService=jF,DA.useFileService=WF,DA.useGanttService=JF,DA.useMetricsService=dF,DA.useProjectsService=kF,DA.useRepairsService=LF,DA.useTasksService=mF,Object.defineProperty(DA,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import ApiService from '@/api/settings/ApiService';
|
|
2
|
-
type
|
|
2
|
+
export type LoginPayload = {
|
|
3
|
+
email: string;
|
|
4
|
+
password: string;
|
|
5
|
+
};
|
|
6
|
+
export type LoginResponse = {
|
|
3
7
|
token: string;
|
|
4
8
|
user: any;
|
|
5
9
|
};
|
|
10
|
+
export type ChangePasswordPayload = {
|
|
11
|
+
password: string;
|
|
12
|
+
password_confirmation: string;
|
|
13
|
+
};
|
|
14
|
+
export type ChangePasswordResponse = any;
|
|
15
|
+
export type ConfigResponse = any;
|
|
6
16
|
declare class AuthService extends ApiService {
|
|
7
17
|
login(email: string, password: string): Promise<LoginResponse>;
|
|
8
18
|
logout(): Promise<LoginResponse>;
|
|
9
19
|
userInfo(): Promise<any>;
|
|
10
20
|
configs(): Promise<any>;
|
|
21
|
+
changePassword(id: string, password: string, password_confirmation: string): Promise<any>;
|
|
11
22
|
}
|
|
12
23
|
export default function useAuthService(): AuthService;
|
|
13
24
|
export {};
|
package/package.json
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import ApiService from '@/api/settings/ApiService'
|
|
2
2
|
|
|
3
|
-
type LoginPayload = {
|
|
3
|
+
export type LoginPayload = {
|
|
4
4
|
email: string
|
|
5
5
|
password: string
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
type LoginResponse = {
|
|
8
|
+
export type LoginResponse = {
|
|
9
9
|
token: string
|
|
10
10
|
user: any
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
type
|
|
13
|
+
export type ChangePasswordPayload = {
|
|
14
|
+
password: string
|
|
15
|
+
password_confirmation: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type ChangePasswordResponse = any
|
|
19
|
+
export type ConfigResponse = any
|
|
14
20
|
|
|
15
21
|
class AuthService extends ApiService {
|
|
16
22
|
public login(email: string, password: string) {
|
|
@@ -31,6 +37,13 @@ class AuthService extends ApiService {
|
|
|
31
37
|
public configs() {
|
|
32
38
|
return this.get<ConfigResponse>(`/configs`)
|
|
33
39
|
}
|
|
40
|
+
|
|
41
|
+
public changePassword(id: string, password: string, password_confirmation: string) {
|
|
42
|
+
return this.put<ChangePasswordPayload, ChangePasswordResponse>(`/users/${id}/password`, {
|
|
43
|
+
password,
|
|
44
|
+
password_confirmation,
|
|
45
|
+
})
|
|
46
|
+
}
|
|
34
47
|
}
|
|
35
48
|
|
|
36
49
|
let api: AuthService
|