shared-ritm 1.0.59 → 1.0.60
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 +9 -0
- package/dist/shared-ritm.umd.js +1 -1
- package/dist/types/api/services/ProjectsService.d.ts +2 -1
- package/dist/types/api/services/TasksService.d.ts +4 -1
- package/dist/types/api/types/Api_Projects.d.ts +31 -0
- package/dist/types/api/types/Api_Tasks.d.ts +23 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/api/services/ProjectsService.ts +2 -1
- package/src/api/services/TasksService.ts +13 -1
- package/src/api/types/Api_Projects.ts +33 -0
- package/src/api/types/Api_Tasks.ts +25 -0
- package/src/index.ts +2 -0
package/dist/shared-ritm.es.js
CHANGED
|
@@ -9613,6 +9613,15 @@ class K1 extends sn {
|
|
|
9613
9613
|
async fetchTaskById(t) {
|
|
9614
9614
|
return await this.get(`/tasks/${t}`);
|
|
9615
9615
|
}
|
|
9616
|
+
async fetchTasksList(t) {
|
|
9617
|
+
return await this.get("/list/tasks/search", { params: t });
|
|
9618
|
+
}
|
|
9619
|
+
async fetchSubtasksList(t) {
|
|
9620
|
+
return await this.get(`/task/${t}/subtasks/list`);
|
|
9621
|
+
}
|
|
9622
|
+
async fetchTaskBranch(t) {
|
|
9623
|
+
return await this.get(`/get_list_task_branch?task_id=${t}`);
|
|
9624
|
+
}
|
|
9616
9625
|
}
|
|
9617
9626
|
let Co;
|
|
9618
9627
|
function s0() {
|
package/dist/shared-ritm.umd.js
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const r=new this(t);return o.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Si]=this[Si]={accessors:{}}).accessors,i=this.prototype;function l(a){const s=Pt(a);r[s]||($d(i,a),r[s]=!0)}return C.isArray(t)?t.forEach(l):l(t),this}}Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(Ce.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[o]=r}}}),C.freezeMethods(Ce);function ko(e,t){const o=this||Ot,r=t||o,i=Ce.from(r.headers);let l=r.data;return C.forEach(e,function(s){l=s.call(o,l,i.normalize(),t?t.status:void 0)}),i.normalize(),l}function xi(e){return!!(e&&e.__CANCEL__)}function ht(e,t,o){Y.call(this,e??"canceled",Y.ERR_CANCELED,t,o),this.name="CanceledError"}C.inherits(ht,Y,{__CANCEL__:!0});function Bi(e,t,o){const r=o.config.validateStatus;!o.status||!r||r(o.status)?e(o):t(new Y("Request failed with status code "+o.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function Ld(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Rd(e,t){e=e||10;const o=new Array(e),r=new Array(e);let i=0,l=0,a;return t=t!==void 0?t:1e3,function(d){const c=Date.now(),u=r[l];a||(a=c),o[i]=d,r[i]=c;let f=l,v=0;for(;f!==i;)v+=o[f++],f=f%e;if(i=(i+1)%e,i===l&&(l=(l+1)%e),c-a<t)return;const g=u&&c-u;return g?Math.round(v*1e3/g):void 0}}function Ad(e,t){let o=0,r=1e3/t,i,l;const a=(c,u=Date.now())=>{o=u,i=null,l&&(clearTimeout(l),l=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-o;f>=r?a(c,u):(i=c,l||(l=setTimeout(()=>{l=null,a(i)},r-f)))},()=>i&&a(i)]}const yn=(e,t,o=3)=>{let r=0;const i=Rd(50,250);return Ad(l=>{const a=l.loaded,s=l.lengthComputable?l.total:void 0,d=a-r,c=i(d),u=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:d,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:l,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},o)},Ei=(e,t)=>{const o=e!=null;return[r=>t[0]({lengthComputable:o,total:e,loaded:r}),t[1]]},qi=e=>(...t)=>C.asap(()=>e(...t)),Od=_e.hasStandardBrowserEnv?function(){const t=_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent),o=document.createElement("a");let r;function i(l){let a=l;return t&&(o.setAttribute("href",a),a=o.href),o.setAttribute("href",a),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return r=i(window.location.href),function(a){const s=C.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),Pd=_e.hasStandardBrowserEnv?{write(e,t,o,r,i,l){const a=[e+"="+encodeURIComponent(t)];C.isNumber(o)&&a.push("expires="+new Date(o).toGMTString()),C.isString(r)&&a.push("path="+r),C.isString(i)&&a.push("domain="+i),l===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function jd(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Id(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ti(e,t){return e&&!jd(t)?Id(e,t):t}const Vi=e=>e instanceof Ce?{...e}:e;function nt(e,t){t=t||{};const o={};function r(c,u,f){return C.isPlainObject(c)&&C.isPlainObject(u)?C.merge.call({caseless:f},c,u):C.isPlainObject(u)?C.merge({},u):C.isArray(u)?u.slice():u}function i(c,u,f){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function l(c,u){if(!C.isUndefined(u))return r(void 0,u)}function a(c,u){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const d={url:l,method:l,data:l,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u)=>i(Vi(c),Vi(u),!0)};return C.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=d[u]||i,v=f(e[u],t[u],u);C.isUndefined(v)&&f!==s||(o[u]=v)}),o}const Mi=e=>{const t=nt({},e);let{data:o,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:l,headers:a,auth:s}=t;t.headers=a=Ce.from(a),t.url=yi(Ti(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let d;if(C.isFormData(o)){if(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((d=a.getContentType())!==!1){const[c,...u]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(_e.hasStandardBrowserEnv&&(r&&C.isFunction(r)&&(r=r(t)),r||r!==!1&&Od(t.url))){const c=i&&l&&Pd.read(l);c&&a.set(i,c)}return t},Nd=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,r){const i=Mi(e);let l=i.data;const a=Ce.from(i.headers).normalize();let{responseType:s,onUploadProgress:d,onDownloadProgress:c}=i,u,f,v,g,m;function w(){g&&g(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(i.method.toUpperCase(),i.url,!0),p.timeout=i.timeout;function x(){if(!p)return;const B=Ce.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),q={data:!s||s==="text"||s==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:B,config:e,request:p};Bi(function($){o($),w()},function($){r($),w()},q),p=null}"onloadend"in p?p.onloadend=x:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(x)},p.onabort=function(){p&&(r(new Y("Request aborted",Y.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new Y("Network Error",Y.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let V=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const q=i.transitional||_i;i.timeoutErrorMessage&&(V=i.timeoutErrorMessage),r(new Y(V,q.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,p)),p=null},l===void 0&&a.setContentType(null),"setRequestHeader"in p&&C.forEach(a.toJSON(),function(V,q){p.setRequestHeader(q,V)}),C.isUndefined(i.withCredentials)||(p.withCredentials=!!i.withCredentials),s&&s!=="json"&&(p.responseType=i.responseType),c&&([v,m]=yn(c,!0),p.addEventListener("progress",v)),d&&p.upload&&([f,g]=yn(d),p.upload.addEventListener("progress",f),p.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(u=B=>{p&&(r(!B||B.type?new ht(null,e,p):B),p.abort(),p=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const y=Ld(i.url);if(y&&_e.protocols.indexOf(y)===-1){r(new Y("Unsupported protocol "+y+":",Y.ERR_BAD_REQUEST,e));return}p.send(l||null)})},zd=(e,t)=>{const{length:o}=e=e?e.filter(Boolean):[];if(t||o){let r=new AbortController,i;const l=function(c){if(!i){i=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Y?u:new ht(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,l(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(l):c.removeEventListener("abort",l)}),e=null)};e.forEach(c=>c.addEventListener("abort",l));const{signal:d}=r;return d.unsubscribe=()=>C.asap(s),d}},Fd=function*(e,t){let o=e.byteLength;if(o<t){yield e;return}let r=0,i;for(;r<o;)i=r+t,yield e.slice(r,i),r=i},Hd=async function*(e,t){for await(const o of Dd(e))yield*Fd(o,t)},Dd=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:o,value:r}=await t.read();if(o)break;yield r}}finally{await t.cancel()}},$i=(e,t,o,r)=>{const i=Hd(e,t);let l=0,a,s=d=>{a||(a=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:c,value:u}=await i.next();if(c){s(),d.close();return}let f=u.byteLength;if(o){let v=l+=f;o(v)}d.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(d){return s(d),i.return()}},{highWaterMark:2})},bn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Li=bn&&typeof ReadableStream=="function",Ud=bn&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ri=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Wd=Li&&Ri(()=>{let e=!1;const t=new Request(_e.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ai=64*1024,yo=Li&&Ri(()=>C.isReadableStream(new Response("").body)),_n={stream:yo&&(e=>e.body)};bn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_n[t]&&(_n[t]=C.isFunction(e[t])?o=>o[t]():(o,r)=>{throw new Y(`Response type '${t}' is not supported`,Y.ERR_NOT_SUPPORT,r)})})})(new Response);const Kd=async e=>{if(e==null)return 0;if(C.isBlob(e))return e.size;if(C.isSpecCompliantForm(e))return(await new Request(_e.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(C.isArrayBufferView(e)||C.isArrayBuffer(e))return e.byteLength;if(C.isURLSearchParams(e)&&(e=e+""),C.isString(e))return(await Ud(e)).byteLength},Qd=async(e,t)=>{const o=C.toFiniteNumber(e.getContentLength());return o??Kd(t)},bo={http:pd,xhr:Nd,fetch:bn&&(async e=>{let{url:t,method:o,data:r,signal:i,cancelToken:l,timeout:a,onDownloadProgress:s,onUploadProgress:d,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:v}=Mi(e);c=c?(c+"").toLowerCase():"text";let g=zd([i,l&&l.toAbortSignal()],a),m;const w=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let p;try{if(d&&Wd&&o!=="get"&&o!=="head"&&(p=await Qd(u,r))!==0){let q=new Request(t,{method:"POST",body:r,duplex:"half"}),M;if(C.isFormData(r)&&(M=q.headers.get("content-type"))&&u.setContentType(M),q.body){const[$,z]=Ei(p,yn(qi(d)));r=$i(q.body,Ai,$,z)}}C.isString(f)||(f=f?"include":"omit");const x="credentials"in Request.prototype;m=new Request(t,{...v,signal:g,method:o.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:x?f:void 0});let y=await fetch(m);const B=yo&&(c==="stream"||c==="response");if(yo&&(s||B&&w)){const q={};["status","statusText","headers"].forEach(S=>{q[S]=y[S]});const M=C.toFiniteNumber(y.headers.get("content-length")),[$,z]=s&&Ei(M,yn(qi(s),!0))||[];y=new Response($i(y.body,Ai,$,()=>{z&&z(),w&&w()}),q)}c=c||"text";let V=await _n[C.findKey(_n,c)||"text"](y,e);return!B&&w&&w(),await new Promise((q,M)=>{Bi(q,M,{data:V,headers:Ce.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:m})})}catch(x){throw w&&w(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,m),{cause:x.cause||x}):Y.from(x,x&&x.code,e,m)}})};C.forEach(bo,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Oi=e=>`- ${e}`,Zd=e=>C.isFunction(e)||e===null||e===!1,Pi={getAdapter:e=>{e=C.isArray(e)?e:[e];const{length:t}=e;let o,r;const i={};for(let l=0;l<t;l++){o=e[l];let a;if(r=o,!Zd(o)&&(r=bo[(a=String(o)).toLowerCase()],r===void 0))throw new Y(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+l]=r}if(!r){const l=Object.entries(i).map(([s,d])=>`adapter ${s} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=t?l.length>1?`since :
|
|
5
5
|
`+l.map(Oi).join(`
|
|
6
6
|
`):" "+Oi(l[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:bo};function _o(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ht(null,e)}function ji(e){return _o(e),e.headers=Ce.from(e.headers),e.data=ko.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pi.getAdapter(e.adapter||Ot.adapter)(e).then(function(r){return _o(e),r.data=ko.call(e,e.transformResponse,r),r.headers=Ce.from(r.headers),r},function(r){return xi(r)||(_o(e),r&&r.response&&(r.response.data=ko.call(e,e.transformResponse,r.response),r.response.headers=Ce.from(r.response.headers))),Promise.reject(r)})}const Ii="1.7.7",Co={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Co[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ni={};Co.transitional=function(t,o,r){function i(l,a){return"[Axios v"+Ii+"] Transitional option '"+l+"'"+a+(r?". "+r:"")}return(l,a,s)=>{if(t===!1)throw new Y(i(a," has been removed"+(o?" in "+o:"")),Y.ERR_DEPRECATED);return o&&!Ni[a]&&(Ni[a]=!0,console.warn(i(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(l,a,s):!0}};function Xd(e,t,o){if(typeof e!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const l=r[i],a=t[l];if(a){const s=e[l],d=s===void 0||a(s,l,e);if(d!==!0)throw new Y("option "+l+" must be "+d,Y.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Y("Unknown option "+l,Y.ERR_BAD_OPTION)}}const So={assertOptions:Xd,validators:Co},He=So.validators;class ot{constructor(t){this.defaults=t,this.interceptors={request:new bi,response:new bi}}async request(t,o){try{return await this._request(t,o)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const l=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?l&&!String(r.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
7
|
-
`+l):r.stack=l}catch{}}throw r}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=nt(this.defaults,o);const{transitional:r,paramsSerializer:i,headers:l}=o;r!==void 0&&So.assertOptions(r,{silentJSONParsing:He.transitional(He.boolean),forcedJSONParsing:He.transitional(He.boolean),clarifyTimeoutError:He.transitional(He.boolean)},!1),i!=null&&(C.isFunction(i)?o.paramsSerializer={serialize:i}:So.assertOptions(i,{encode:He.function,serialize:He.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=l&&C.merge(l.common,l[o.method]);l&&C.forEach(["delete","get","head","post","put","patch","common"],m=>{delete l[m]}),o.headers=Ce.concat(a,l);const s=[];let d=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(o)===!1||(d=d&&w.synchronous,s.unshift(w.fulfilled,w.rejected))});const c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected)});let u,f=0,v;if(!d){const m=[ji.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),v=m.length,u=Promise.resolve(o);f<v;)u=u.then(m[f++],m[f++]);return u}v=s.length;let g=o;for(f=0;f<v;){const m=s[f++],w=s[f++];try{g=m(g)}catch(p){w.call(this,p);break}}try{u=ji.call(this,g)}catch(m){return Promise.reject(m)}for(f=0,v=c.length;f<v;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=nt(this.defaults,t);const o=Ti(t.baseURL,t.url);return yi(o,t.params,t.paramsSerializer)}}C.forEach(["delete","get","head","options"],function(t){ot.prototype[t]=function(o,r){return this.request(nt(r||{},{method:t,url:o,data:(r||{}).data}))}}),C.forEach(["post","put","patch"],function(t){function o(r){return function(l,a,s){return this.request(nt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:a}))}}ot.prototype[t]=o(),ot.prototype[t+"Form"]=o(!0)});class xo{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(l){o=l});const r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l;const a=new Promise(s=>{r.subscribe(s),l=s}).then(i);return a.cancel=function(){r.unsubscribe(l)},a},t(function(l,a,s){r.reason||(r.reason=new ht(l,a,s),o(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const t=new AbortController,o=r=>{t.abort(r)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new xo(function(i){t=i}),cancel:t}}}function Gd(e){return function(o){return e.apply(null,o)}}function Yd(e){return C.isObject(e)&&e.isAxiosError===!0}const Bo={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(Bo).forEach(([e,t])=>{Bo[t]=e});function zi(e){const t=new ot(e),o=ri(ot.prototype.request,t);return C.extend(o,ot.prototype,t,{allOwnKeys:!0}),C.extend(o,t,null,{allOwnKeys:!0}),o.create=function(i){return zi(nt(e,i))},o}const de=zi(Ot);de.Axios=ot,de.CanceledError=ht,de.CancelToken=xo,de.isCancel=xi,de.VERSION=Ii,de.toFormData=wn,de.AxiosError=Y,de.Cancel=de.CanceledError,de.all=function(t){return Promise.all(t)},de.spread=Gd,de.isAxiosError=Yd,de.mergeConfig=nt,de.AxiosHeaders=Ce,de.formToJSON=e=>Ci(C.isHTMLForm(e)?new FormData(e):e),de.getAdapter=Pi.getAdapter,de.HttpStatusCode=Bo,de.default=de;class pt{constructor(){tl(this,"axiosInstance");this.axiosInstance=de.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json"}}),this.axiosInstance.interceptors.request.use(t=>{const o=this.getToken();return o&&t.headers&&(t.headers.Authorization=`Bearer ${o}`),t},t=>Promise.reject(t)),this.axiosInstance.interceptors.response.use(t=>t.data,t=>{var o,r;return(((o=t.response)==null?void 0:o.status)===401||((r=t.response)==null?void 0:r.status)===403)&&this.logout(),Promise.reject(t)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){this.removeToken(),window.location.href="/sign-in"}handleError(t){t.response?console.error("API Error:",t.response.status,t.response.data):t.request?console.error("No response received:",t.request):console.error("Error during request setup:",t.message)}async get(t,o){try{const r=await this.axiosInstance.get(t,o);return(r==null?void 0:r.data)??r}catch(r){const i=r;throw this.handleError(i),r}}async delete(t,o){try{return await this.axiosInstance.delete(t,o)}catch(r){const i=r;throw this.handleError(i),r}}async post(t,o,r){try{return(await this.axiosInstance.post(t,o,r)).data}catch(i){const l=i;throw this.handleError(l),i}}async put(t,o,r){try{return(await this.axiosInstance.put(t,o,r)).data}catch(i){const l=i;throw this.handleError(l),i}}}class Jd extends pt{async fetchCriticalPathTasks(t){return await this.get(`gantt/get_list_task_on_critical_path?${t}`)}async fetchGanttList(t){return await this.get(`/gantt/tasks?${t}`)}}let Eo;function ef(){return Eo||(Eo=new Jd),Eo}class tf extends pt{async fetchPieProjects(t){return await this.get("repairs/pie/projects?"+t)}async fetchPieTasks(t){return await this.get("repairs/pie/tasks?"+t)}async fetchPiePersonnel(t){return await this.get("repairs/metrics/get_list_position?"+t)}async fetchPiePersonnelInfo(t){return await this.get(`repairs/metrics/get_list_user_by_position?${t}`)}async fetchPieWorkZone(t){return await this.get("repairs/metrics/get_list_work_zone_instrument?"+t)}async fetchPieCriticalPath(t){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+t)}async fetchPieCriticalPathInfo(t){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${t}`)}async fetchPieTmc(t){return await this.get("repairs/metrics/get_list_instrument_type?"+t)}async fetchPieTmcInfo(t){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${t}`)}async fetchPieUntimelyClosedTask(t){return await this.get("repairs/metrics/get_list_comment_type?"+t)}async fetchPieUntimelyClosedTaskInfo(t){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${t}`)}async fetchPieAdditionalTasks(t){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+t)}async fetchPieAdditionalTasksInfo(t){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${t}`)}async fetchPersonnel(t){return await this.get("repairs/statistic/personnel?"+t)}async fetchPieExpired(t){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+t)}async fetchPieExpiredInfo(t){return await this.get(`repairs/metrics/get_list_task_expired?${t}`)}}let qo;function nf(){return qo||(qo=new tf),qo}class of extends pt{async fetchProjectById(t){return this.get(`/projects/${t}`)}createProject(t){return this.post("/projects",t)}editProject(t,o){return this.put(`/projects/${t}`,o)}fetchProjects(t){return this.get("/get_list_project",{params:t})}cloneProject(t){return this.post(`projects/${t.id}/clone`,t)}archiveProject(t,o){return this.put(`/projects/${t}`,o)}unArchiveProject(t,o){return this.put(`/projects/${t}`,o)}moveAprProject(t){return this.post("repairs/move_plan_to_real",{repairs:[t]})}restoreProject(t){return this.post("/restore_project",{projects_ids:[t]})}importTasks(t){return this.post("tasks/import",t)}fetchProjectTeamList(t){return this.put(`/projects/${t}`,null)}}let To;function rf(){return To||(To=new of),To}class lf extends pt{fetchFilters(t){return this.get(`get_list_repair?smart=1&${t}`)}fetchRepairs(t,o,r,i,l){return this.get("get_list_repair"+(t?`${o}&per_page=100000${l?"&"+l:""}&${r?"":i}`:`?per_page=100000${l?"&"+l:""}&${i}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(t){return this.post("/repairs/equipments",t)}startRepair(t){return this.post(`/repairs/${t}/start`,null)}finishRepair(t){return this.post(`/repairs/${t}/finish`,null)}finishPreparationProject(t){return this.post(`/repairs/${t}/finish_preparation`,null)}moveRepairToCurrent(t){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[t]})}moveArchiveToCurrent(t){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[t]})}moveRepairToApr(t){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[t]})}moveRepairToArchive(t){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[t]})}restoreRepair(t){return this.post("/restore_repair",{repairs_ids:[t]})}updateRepair(t,o){return this.put(`/repairs/${o}`,t)}deleteRepair(t){return this.delete(`/repairs/${t}`)}}let Vo;function af(){return Vo||(Vo=new lf),Vo}class sf extends pt{async fetchTaskById(t){return await this.get(`/tasks/${t}`)}}let Mo;function uf(){return Mo||(Mo=new sf),Mo}ne.ApiService=pt,ne.AppButton=gr,ne.AppInput=va,ne.AppInputSearch=ga,ne.AppLayout=Ma,ne.AppLayoutHeader=Tc,ne.AppLoader=Ar,ne.AppSelect=Za,ne.AppSidebar=Bc,ne.AppToggle=Sa,ne.AppWrapper=Ja,ne.useGanttService=ef,ne.useMetricsService=nf,ne.useProjectsService=rf,ne.useRepairsService=af,ne.useTasksService=uf,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|
|
7
|
+
`+l):r.stack=l}catch{}}throw r}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=nt(this.defaults,o);const{transitional:r,paramsSerializer:i,headers:l}=o;r!==void 0&&So.assertOptions(r,{silentJSONParsing:He.transitional(He.boolean),forcedJSONParsing:He.transitional(He.boolean),clarifyTimeoutError:He.transitional(He.boolean)},!1),i!=null&&(C.isFunction(i)?o.paramsSerializer={serialize:i}:So.assertOptions(i,{encode:He.function,serialize:He.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=l&&C.merge(l.common,l[o.method]);l&&C.forEach(["delete","get","head","post","put","patch","common"],m=>{delete l[m]}),o.headers=Ce.concat(a,l);const s=[];let d=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(o)===!1||(d=d&&w.synchronous,s.unshift(w.fulfilled,w.rejected))});const c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected)});let u,f=0,v;if(!d){const m=[ji.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),v=m.length,u=Promise.resolve(o);f<v;)u=u.then(m[f++],m[f++]);return u}v=s.length;let g=o;for(f=0;f<v;){const m=s[f++],w=s[f++];try{g=m(g)}catch(p){w.call(this,p);break}}try{u=ji.call(this,g)}catch(m){return Promise.reject(m)}for(f=0,v=c.length;f<v;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=nt(this.defaults,t);const o=Ti(t.baseURL,t.url);return yi(o,t.params,t.paramsSerializer)}}C.forEach(["delete","get","head","options"],function(t){ot.prototype[t]=function(o,r){return this.request(nt(r||{},{method:t,url:o,data:(r||{}).data}))}}),C.forEach(["post","put","patch"],function(t){function o(r){return function(l,a,s){return this.request(nt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:a}))}}ot.prototype[t]=o(),ot.prototype[t+"Form"]=o(!0)});class xo{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(l){o=l});const r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l;const a=new Promise(s=>{r.subscribe(s),l=s}).then(i);return a.cancel=function(){r.unsubscribe(l)},a},t(function(l,a,s){r.reason||(r.reason=new ht(l,a,s),o(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const t=new AbortController,o=r=>{t.abort(r)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new xo(function(i){t=i}),cancel:t}}}function Gd(e){return function(o){return e.apply(null,o)}}function Yd(e){return C.isObject(e)&&e.isAxiosError===!0}const Bo={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(Bo).forEach(([e,t])=>{Bo[t]=e});function zi(e){const t=new ot(e),o=ri(ot.prototype.request,t);return C.extend(o,ot.prototype,t,{allOwnKeys:!0}),C.extend(o,t,null,{allOwnKeys:!0}),o.create=function(i){return zi(nt(e,i))},o}const de=zi(Ot);de.Axios=ot,de.CanceledError=ht,de.CancelToken=xo,de.isCancel=xi,de.VERSION=Ii,de.toFormData=wn,de.AxiosError=Y,de.Cancel=de.CanceledError,de.all=function(t){return Promise.all(t)},de.spread=Gd,de.isAxiosError=Yd,de.mergeConfig=nt,de.AxiosHeaders=Ce,de.formToJSON=e=>Ci(C.isHTMLForm(e)?new FormData(e):e),de.getAdapter=Pi.getAdapter,de.HttpStatusCode=Bo,de.default=de;class pt{constructor(){tl(this,"axiosInstance");this.axiosInstance=de.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json"}}),this.axiosInstance.interceptors.request.use(t=>{const o=this.getToken();return o&&t.headers&&(t.headers.Authorization=`Bearer ${o}`),t},t=>Promise.reject(t)),this.axiosInstance.interceptors.response.use(t=>t.data,t=>{var o,r;return(((o=t.response)==null?void 0:o.status)===401||((r=t.response)==null?void 0:r.status)===403)&&this.logout(),Promise.reject(t)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){this.removeToken(),window.location.href="/sign-in"}handleError(t){t.response?console.error("API Error:",t.response.status,t.response.data):t.request?console.error("No response received:",t.request):console.error("Error during request setup:",t.message)}async get(t,o){try{const r=await this.axiosInstance.get(t,o);return(r==null?void 0:r.data)??r}catch(r){const i=r;throw this.handleError(i),r}}async delete(t,o){try{return await this.axiosInstance.delete(t,o)}catch(r){const i=r;throw this.handleError(i),r}}async post(t,o,r){try{return(await this.axiosInstance.post(t,o,r)).data}catch(i){const l=i;throw this.handleError(l),i}}async put(t,o,r){try{return(await this.axiosInstance.put(t,o,r)).data}catch(i){const l=i;throw this.handleError(l),i}}}class Jd extends pt{async fetchCriticalPathTasks(t){return await this.get(`gantt/get_list_task_on_critical_path?${t}`)}async fetchGanttList(t){return await this.get(`/gantt/tasks?${t}`)}}let Eo;function ef(){return Eo||(Eo=new Jd),Eo}class tf extends pt{async fetchPieProjects(t){return await this.get("repairs/pie/projects?"+t)}async fetchPieTasks(t){return await this.get("repairs/pie/tasks?"+t)}async fetchPiePersonnel(t){return await this.get("repairs/metrics/get_list_position?"+t)}async fetchPiePersonnelInfo(t){return await this.get(`repairs/metrics/get_list_user_by_position?${t}`)}async fetchPieWorkZone(t){return await this.get("repairs/metrics/get_list_work_zone_instrument?"+t)}async fetchPieCriticalPath(t){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+t)}async fetchPieCriticalPathInfo(t){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${t}`)}async fetchPieTmc(t){return await this.get("repairs/metrics/get_list_instrument_type?"+t)}async fetchPieTmcInfo(t){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${t}`)}async fetchPieUntimelyClosedTask(t){return await this.get("repairs/metrics/get_list_comment_type?"+t)}async fetchPieUntimelyClosedTaskInfo(t){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${t}`)}async fetchPieAdditionalTasks(t){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+t)}async fetchPieAdditionalTasksInfo(t){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${t}`)}async fetchPersonnel(t){return await this.get("repairs/statistic/personnel?"+t)}async fetchPieExpired(t){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+t)}async fetchPieExpiredInfo(t){return await this.get(`repairs/metrics/get_list_task_expired?${t}`)}}let qo;function nf(){return qo||(qo=new tf),qo}class of extends pt{async fetchProjectById(t){return this.get(`/projects/${t}`)}createProject(t){return this.post("/projects",t)}editProject(t,o){return this.put(`/projects/${t}`,o)}fetchProjects(t){return this.get("/get_list_project",{params:t})}cloneProject(t){return this.post(`projects/${t.id}/clone`,t)}archiveProject(t,o){return this.put(`/projects/${t}`,o)}unArchiveProject(t,o){return this.put(`/projects/${t}`,o)}moveAprProject(t){return this.post("repairs/move_plan_to_real",{repairs:[t]})}restoreProject(t){return this.post("/restore_project",{projects_ids:[t]})}importTasks(t){return this.post("tasks/import",t)}fetchProjectTeamList(t){return this.put(`/projects/${t}`,null)}}let To;function rf(){return To||(To=new of),To}class lf extends pt{fetchFilters(t){return this.get(`get_list_repair?smart=1&${t}`)}fetchRepairs(t,o,r,i,l){return this.get("get_list_repair"+(t?`${o}&per_page=100000${l?"&"+l:""}&${r?"":i}`:`?per_page=100000${l?"&"+l:""}&${i}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(t){return this.post("/repairs/equipments",t)}startRepair(t){return this.post(`/repairs/${t}/start`,null)}finishRepair(t){return this.post(`/repairs/${t}/finish`,null)}finishPreparationProject(t){return this.post(`/repairs/${t}/finish_preparation`,null)}moveRepairToCurrent(t){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[t]})}moveArchiveToCurrent(t){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[t]})}moveRepairToApr(t){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[t]})}moveRepairToArchive(t){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[t]})}restoreRepair(t){return this.post("/restore_repair",{repairs_ids:[t]})}updateRepair(t,o){return this.put(`/repairs/${o}`,t)}deleteRepair(t){return this.delete(`/repairs/${t}`)}}let Vo;function af(){return Vo||(Vo=new lf),Vo}class sf extends pt{async fetchTaskById(t){return await this.get(`/tasks/${t}`)}async fetchTasksList(t){return await this.get("/list/tasks/search",{params:t})}async fetchSubtasksList(t){return await this.get(`/task/${t}/subtasks/list`)}async fetchTaskBranch(t){return await this.get(`/get_list_task_branch?task_id=${t}`)}}let Mo;function uf(){return Mo||(Mo=new sf),Mo}ne.ApiService=pt,ne.AppButton=gr,ne.AppInput=va,ne.AppInputSearch=ga,ne.AppLayout=Ma,ne.AppLayoutHeader=Tc,ne.AppLoader=Ar,ne.AppSelect=Za,ne.AppSidebar=Bc,ne.AppToggle=Sa,ne.AppWrapper=Ja,ne.useGanttService=ef,ne.useMetricsService=nf,ne.useProjectsService=rf,ne.useRepairsService=af,ne.useTasksService=uf,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import ApiService, { ResponseApi } from '@/api/settings/ApiService';
|
|
2
2
|
import { Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks';
|
|
3
|
+
import { Api_Project_Dto } from '@/api/types/Api_Projects';
|
|
3
4
|
declare class ProjectsService extends ApiService {
|
|
4
5
|
fetchProjectById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>>;
|
|
5
6
|
createProject(params: any): Promise<ResponseApi<any>>;
|
|
6
7
|
editProject(id: string, params: any): Promise<ResponseApi<any>>;
|
|
7
|
-
fetchProjects(params: any): Promise<ResponseApi<
|
|
8
|
+
fetchProjects(params: any): Promise<ResponseApi<Api_Project_Dto[]>>;
|
|
8
9
|
cloneProject(project: any): Promise<ResponseApi<any>>;
|
|
9
10
|
archiveProject(id: string, data: any): Promise<ResponseApi<any>>;
|
|
10
11
|
unArchiveProject(id: string, data: any): Promise<ResponseApi<any>>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import ApiService, { ResponseApi } from '@/api/settings/ApiService';
|
|
2
|
-
import { Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks';
|
|
2
|
+
import { Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks';
|
|
3
3
|
declare class TasksService extends ApiService {
|
|
4
4
|
fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>>;
|
|
5
|
+
fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>>;
|
|
6
|
+
fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>>;
|
|
7
|
+
fetchTaskBranch(id: string): Promise<ResponseApi<any>>;
|
|
5
8
|
}
|
|
6
9
|
export default function useTasksService(): TasksService;
|
|
7
10
|
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type Api_Project_Repair = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
start_date: null | string;
|
|
5
|
+
end_date: null | string;
|
|
6
|
+
};
|
|
7
|
+
export type Api_Project_Team = {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
display_name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
updated_at: string;
|
|
14
|
+
pivot: {
|
|
15
|
+
project_id: string;
|
|
16
|
+
team_id: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type Api_Project_Dto = {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
description: null;
|
|
23
|
+
image: null;
|
|
24
|
+
start_date: string;
|
|
25
|
+
end_date: string;
|
|
26
|
+
is_archive: false;
|
|
27
|
+
teams: Api_Project_Team[];
|
|
28
|
+
category: number;
|
|
29
|
+
deleted_at: null;
|
|
30
|
+
repair: Api_Project_Repair;
|
|
31
|
+
};
|
|
@@ -91,3 +91,26 @@ export type Api_Tasks_Task_Dto = {
|
|
|
91
91
|
isPause: boolean;
|
|
92
92
|
equipment: Api_Tasks_Equipment_Dto[];
|
|
93
93
|
};
|
|
94
|
+
export type Api_Tasks_Simple_Responsible_Dto = {
|
|
95
|
+
id: string;
|
|
96
|
+
full_name: string;
|
|
97
|
+
};
|
|
98
|
+
export type Api_Tasks_Dto = {
|
|
99
|
+
id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
plan_date: null | string;
|
|
102
|
+
deadline: null | string;
|
|
103
|
+
priority: number;
|
|
104
|
+
subtasks_count: number;
|
|
105
|
+
responsible: Api_Tasks_Simple_Responsible_Dto[];
|
|
106
|
+
assigned: any[];
|
|
107
|
+
status: Api_Tasks_Status_Dto;
|
|
108
|
+
expired: boolean;
|
|
109
|
+
teams: Api_Tasks_Teams_Dto[];
|
|
110
|
+
is_critical_path: boolean;
|
|
111
|
+
isPause: boolean;
|
|
112
|
+
fact_start_date: null | string;
|
|
113
|
+
fact_end_date: null | string;
|
|
114
|
+
pause_sec: number;
|
|
115
|
+
work_sec: number;
|
|
116
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -18,3 +18,4 @@ export { AppButton, AppInput, AppToggle, AppInputSearch, AppLayout, AppSelect, A
|
|
|
18
18
|
export { ApiService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService };
|
|
19
19
|
export * from '@/api/types/Api_Tasks';
|
|
20
20
|
export * from '@/api/types/Api_Repairs';
|
|
21
|
+
export * from '@/api/types/Api_Projects';
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
2
|
import { Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
|
|
3
|
+
import { Api_Project_Dto } from '@/api/types/Api_Projects'
|
|
3
4
|
|
|
4
5
|
class ProjectsService extends ApiService {
|
|
5
6
|
public async fetchProjectById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
|
|
@@ -14,7 +15,7 @@ class ProjectsService extends ApiService {
|
|
|
14
15
|
return this.put<any, ResponseApi<any>>(`/projects/${id}`, params)
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
public fetchProjects(params: any): Promise<ResponseApi<
|
|
18
|
+
public fetchProjects(params: any): Promise<ResponseApi<Api_Project_Dto[]>> {
|
|
18
19
|
return this.get(`/get_list_project`, { params })
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
-
import { Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
|
|
2
|
+
import { Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
|
|
3
3
|
|
|
4
4
|
class TasksService extends ApiService {
|
|
5
5
|
public async fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
|
|
6
6
|
return await this.get(`/tasks/${id}`)
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
public async fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
10
|
+
return await this.get('/list/tasks/search', { params })
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public async fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
14
|
+
return await this.get(`/task/${id}/subtasks/list`)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public async fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
|
|
18
|
+
return await this.get(`/get_list_task_branch?task_id=${id}`)
|
|
19
|
+
}
|
|
8
20
|
}
|
|
9
21
|
|
|
10
22
|
let api: TasksService
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type Api_Project_Repair = {
|
|
2
|
+
id: string
|
|
3
|
+
name: string
|
|
4
|
+
start_date: null | string
|
|
5
|
+
end_date: null | string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type Api_Project_Team = {
|
|
9
|
+
id: string
|
|
10
|
+
name: string
|
|
11
|
+
display_name: string
|
|
12
|
+
description: string
|
|
13
|
+
created_at: string
|
|
14
|
+
updated_at: string
|
|
15
|
+
pivot: {
|
|
16
|
+
project_id: string
|
|
17
|
+
team_id: string
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type Api_Project_Dto = {
|
|
22
|
+
id: string
|
|
23
|
+
name: string
|
|
24
|
+
description: null
|
|
25
|
+
image: null
|
|
26
|
+
start_date: string
|
|
27
|
+
end_date: string
|
|
28
|
+
is_archive: false
|
|
29
|
+
teams: Api_Project_Team[]
|
|
30
|
+
category: number
|
|
31
|
+
deleted_at: null
|
|
32
|
+
repair: Api_Project_Repair
|
|
33
|
+
}
|
|
@@ -97,3 +97,28 @@ export type Api_Tasks_Task_Dto = {
|
|
|
97
97
|
isPause: boolean
|
|
98
98
|
equipment: Api_Tasks_Equipment_Dto[]
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
export type Api_Tasks_Simple_Responsible_Dto = {
|
|
102
|
+
id: string
|
|
103
|
+
full_name: string
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type Api_Tasks_Dto = {
|
|
107
|
+
id: string
|
|
108
|
+
name: string
|
|
109
|
+
plan_date: null | string
|
|
110
|
+
deadline: null | string
|
|
111
|
+
priority: number
|
|
112
|
+
subtasks_count: number
|
|
113
|
+
responsible: Api_Tasks_Simple_Responsible_Dto[]
|
|
114
|
+
assigned: any[]
|
|
115
|
+
status: Api_Tasks_Status_Dto
|
|
116
|
+
expired: boolean
|
|
117
|
+
teams: Api_Tasks_Teams_Dto[]
|
|
118
|
+
is_critical_path: boolean
|
|
119
|
+
isPause: boolean
|
|
120
|
+
fact_start_date: null | string
|
|
121
|
+
fact_end_date: null | string
|
|
122
|
+
pause_sec: number
|
|
123
|
+
work_sec: number
|
|
124
|
+
}
|
package/src/index.ts
CHANGED