"dist/js/dist/js/chunk-310a7939.e62d5f04.js" did not exist on "e924781a1c46ed80374d43a42f7ec0df8bff08e9"
chunk-310a7939.e62d5f04.js 15.4 KB
Newer Older
1 2
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-310a7939"],{"1a98":function(t,e,r){"use strict";r("9a19")},"1c89":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-7"},[r("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.patients,"single-select":t.singleSelect,"item-key":"id_paciente","show-select":""},scopedSlots:t._u([{key:"top",fn:function(){return[r("v-switch",{staticClass:"pa-3",attrs:{label:"Selección Única"},model:{value:t.singleSelect,callback:function(e){t.singleSelect=e},expression:"singleSelect"}})]},proxy:!0}]),model:{value:t.selected,callback:function(e){t.selected=e},expression:"selected"}})],1),r("div",{staticClass:"col-md-5",attrs:{id:"centers-table"}},[r("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers_cat,"single-select":t.singleSelectCenters,items:t.centers,"item-key":"nombre_centro","show-select":"",search:t.search,"custom-filter":t.customFilter},scopedSlots:t._u([{key:"top",fn:function(){return[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-5",attrs:{id:"filter-organism"}},[r("v-autocomplete",{attrs:{label:"Organismo",items:t.items,chips:"","small-chips":"",multiple:""}})],1),r("div",{staticClass:"col-md-5",attrs:{id:"filter-categorie"}},[r("v-select",{attrs:{label:"Categoria",items:t.categorias_name,chips:"","small-chips":"",multiple:""},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1)])]},proxy:!0}]),model:{value:t.selectedCenters,callback:function(e){t.selectedCenters=e},expression:"selectedCenters"}})],1)])])},a=[],o=r("1da1"),i=(r("96cf"),r("d3b7"),r("25f0"),r("4de4"),r("3ca3"),r("ddb0"),r("159b"),r("39f4")),c=r("db53"),s=r("0364"),u=(r("2ef0"),{data:function(){return{singleSelect:!1,selected:[],headers:[{text:"Nombre",align:"start",sortable:!0,value:"nombre"},{text:"Apellidos",value:"apellidos"},{text:"Edad",value:"edad"},{text:"Sexo",value:"sexo"},{text:"Categoría",value:"categoria"},{text:"Clasificación",value:"clasificacion"}],patients:[],singleSelectCenters:!0,selectedCenters:[],headers_cat:[{text:"Nombre",align:"start",sortable:!0,value:"nombre_centro"},{text:"Municipio",value:"municipio"},{text:"Organismo",value:"organismo"}],search:"",centers:[],categorias:[],categorias_name:[]}},created:function(){this.getPatientsData(),this.getCentersData()},methods:{customFilter:function(t,e,r){return console.log("bdkwbdkjwkjwjwjjjjjjjjjjjjjjjjjjjjjjjjj"),e=e.toString().toLowerCase(),t.filter((function(t){return r(t["type"],e)}))},printValue:function(t){return Object(o["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:console.log("VALUE: ",t);case 1:case"end":return e.stop()}}),e)})))()},getPatientsData:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(i["d"])();case 3:return r=e.sent,e.next=6,r.data.pacientes;case 6:n=e.sent,t.getCategoriesData(n),t.patients=n,console.log("Patientsss",n),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](0),t.$toast.error(e.t0.toString(),{position:"bottom-center",timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:"button",icon:!0,rtl:!1});case 15:case"end":return e.stop()}}),e,null,[[0,12]])})))()},getCategoriesData:function(t){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,r.delegateYield(regeneratorRuntime.mark((function r(){var n,a,o,i,s,u;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(c["c"])();case 2:return n=r.sent,r.next=5,n.data;case 5:for(u in a=r.sent,o=0,console.log("MOCK CAT ",a),i=!1,s=function(r){r=t[o];a.forEach((function(t){i||e.categorias_name.push(t.nombre),t.id==r.categoria&&(r.categoria=t.nombre)})),i=!0,t[o]=r,o+=1},t)s(u);console.log("Fix patients categorie",t),console.log("categorias_name",e.categorias_name),console.log("categorias",e.categorias);case 14:case"end":return r.stop()}}),r)}))(),"t0",2);case 2:r.next=7;break;case 4:r.prev=4,r.t1=r["catch"](0),e.$toast.error(r.t1.toString(),{position:"bottom-center",timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:"button",icon:!0,rtl:!1});case 7:case"end":return r.stop()}}),r,null,[[0,4]])})))()},getCentersData:function(t){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(s["b"])();case 3:return r=t.sent,t.next=6,r.data.centros;case 6:n=t.sent,0,e.centers=n,console.log("Centers",n),t.next=15;break;case 12:t.prev=12,t.t0=t["catch"](0),e.$toast.error(t.t0.toString(),{position:"bottom-center",timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:"button",icon:!0,rtl:!1});case 15:case"end":return t.stop()}}),t,null,[[0,12]])})))()}}}),l=u,p=(r("1a98"),r("2877")),h=r("6544"),f=r.n(h),d=r("c6a6"),g=r("8fea"),v=r("b974"),m=r("b73d"),y=Object(p["a"])(l,n,a,!1,null,null,null);e["default"]=y.exports;f()(y,{VAutocomplete:d["a"],VDataTable:g["a"],VSelect:v["a"],VSwitch:m["a"]})},"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));r("d3b7");function n(t,e,r,n,a,o,i){try{var c=t[o](i),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,a)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(a,o){var i=t.apply(e,r);function c(t){n(i,a,o,c,s,"next",t)}function s(t){n(i,a,o,c,s,"throw",t)}c(void 0)}))}}},"39f4":function(t,e,r){"use strict";r.d(e,"d",(function(){return s})),r.d(e,"c",(function(){return l})),r.d(e,"e",(function(){return h})),r.d(e,"b",(function(){return d})),r.d(e,"f",(function(){return v})),r.d(e,"a",(function(){return y}));var n=r("1da1"),a=(r("99af"),r("96cf"),r("bc3a")),o=r.n(a),i=r("c9d9"),c=r("4e40");function s(t){return u.apply(this,arguments)}function u(){return u=Object(n["a"])(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r="".concat(i["d"],"pacientes"),t.next=3,o.a.get(r,Object(c["b"])(e));case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),u.apply(this,arguments)}function l(t){return p.apply(this,arguments)}function p(){return p=Object(n["a"])(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r="".concat(i["d"],"pacientes/").concat(e),t.next=3,o.a.get(r,Object(c["b"])());case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),p.apply(this,arguments)}function h(t){return f.apply(this,arguments)}function f(){return f=Object(n["a"])(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r="".concat(i["d"],"pacientes"),t.next=3,o.a.post(r,e,Object(c["b"])());case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),f.apply(this,arguments)}function d(t){return g.apply(this,arguments)}function g(){return g=Object(n["a"])(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r="".concat(i["d"],"pacientes/").concat(e),t.next=3,o.a.delete(r,Object(c["b"])());case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),g.apply(this,arguments)}function v(t){return m.apply(this,arguments)}function m(){return m=Object(n["a"])(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r="".concat(i["d"],"pacientes/").concat(e.id_paciente),t.next=3,o.a.put(r,e,Object(c["b"])());case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),m.apply(this,arguments)}function y(t){return b.apply(this,arguments)}function b(){return b=Object(n["a"])(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.estado_sistema=3,r="".concat(i["d"],"pacientes/").concat(e.id_paciente),t.next=4,o.a.put(r,e,Object(c["b"])());case 4:return n=t.sent,t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)}))),b.apply(this,arguments)}},"4e40":function(t,e,r){"use strict";r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return o}));var n=r("c9d9");function a(t){return{params:t,headers:{"Content-Type":"application/json",Accept:"application/json"},httpsAgent:{AGENT:n["a"]}}}function o(t){return{params:t,headers:{Authorization:"Bearer "+localStorage.getItem("tkn"),"Content-Type":"application/json",Accept:"application/json"},httpsAgent:{AGENT:n["a"]}}}},"96cf":function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(A){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,o=Object.create(a.prototype),i=new R(n||[]);return o._invoke=C(t,r,i),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(A){return{type:"throw",arg:A}}}t.wrap=u;var p="suspendedStart",h="suspendedYield",f="executing",d="completed",g={};function v(){}function m(){}function y(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,x=w&&w(w(S([])));x&&x!==r&&n.call(x,o)&&(b=x);var j=y.prototype=v.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(a,o,i,c){var s=l(t[a],t,o);if("throw"!==s.type){var u=s.arg,p=u.value;return p&&"object"===typeof p&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(p).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(s.arg)}var a;function o(t,n){function o(){return new e((function(e,a){r(t,n,e,a)}))}return a=a?a.then(o,o):o()}this._invoke=o}function C(t,e,r){var n=p;return function(a,o){if(n===f)throw new Error("Generator is already running");if(n===d){if("throw"===a)throw o;return P()}r.method=a,r.arg=o;while(1){var i=r.delegate;if(i){var c=L(i,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===p)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?d:h,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}function L(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var a=l(n,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function S(t){if(t){var r=t[o];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){while(++a<t.length)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:P}}function P(){return{value:e,done:!0}}return m.prototype=j.constructor=y,y.constructor=m,m.displayName=s(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,s(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(k.prototype),k.prototype[i]=function(){return this},t.AsyncIterator=k,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new k(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(j),s(j,c,"Generator"),j[o]=function(){return this},j.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:S(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(a){Function("r","regeneratorRuntime = r")(n)}},"9a19":function(t,e,r){}}]);
//# sourceMappingURL=chunk-310a7939.e62d5f04.js.map