AoS.Health Nepal Production Dashboard
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2 lines
2.5 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41d7ada6"],{"132b":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"card",class:t.item.class},[s("a",{attrs:{href:t.item.url,target:t.item.target,rel:"noreferrer"}},[s("div",{staticClass:"card-content"},[s("div",{staticClass:"media"},[t.item.logo?s("div",{staticClass:"media-left"},[s("figure",{staticClass:"image is-48x48"},[s("img",{attrs:{src:t.item.logo,alt:t.item.name+" logo"}})])]):t._e(),t.item.icon?s("div",{staticClass:"media-left"},[s("figure",{staticClass:"image is-48x48"},[s("i",{class:["fa-fw",t.item.icon],staticStyle:{"font-size":"35px"}})])]):t._e(),s("div",{staticClass:"media-content"},[s("p",{staticClass:"title is-4"},[t._v(t._s(t.item.name))]),s("p",{staticClass:"subtitle is-6"},[t.item.subtitle?[t._v(" "+t._s(t.item.subtitle)+" ")]:t.meal?[t._v(" Today: "+t._s(t.meal.name)+" ")]:t.stats?[t._v(" happily keeping "+t._s(t.stats.totalRecipes)+" recipes organized ")]:t._e()],2)])]),t.item.tag?s("div",{staticClass:"tag",class:t.item.tagstyle},[s("strong",{staticClass:"tag-text"},[t._v("#"+t._s(t.item.tag))])]):t._e()])])])])},a=[],n=s("1da1"),r=(s("96cf"),s("d3b7"),{name:"Mealie",props:{item:Object},data:function(){return{stats:null,meal:null}},created:function(){this.fetchStatus()},methods:{fetchStatus:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(null==this.item.subtitle){t.next=2;break}return t.abrupt("return");case 2:return this.item.apikey,t.next=5,fetch("".concat(this.item.url,"/api/meal-plans/today/"),{headers:{Authorization:"Bearer "+this.item.apikey,Accept:"application/json"}}).then((function(t){if(!t.ok)throw new Error("Not 2xx response");if(null!=t)return t.json()})).catch((function(t){return console.log(t)}));case 5:return this.meal=t.sent,t.next=8,fetch("".concat(this.item.url,"/api/debug/statistics/"),{headers:{Authorization:"Bearer "+this.item.apikey,Accept:"application/json"}}).then((function(t){if(t.ok)return t.json();throw new Error("Not 2xx response")})).catch((function(t){return console.log(t)}));case 8:this.stats=t.sent;case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}}),c=r,o=(s("48f9"),s("2877")),l=Object(o["a"])(c,i,a,!1,null,"7e87e2dc",null);e["default"]=l.exports},"3ff9":function(t,e,s){},"48f9":function(t,e,s){"use strict";s("3ff9")}}]);
//# sourceMappingURL=chunk-41d7ada6.fa3bb949.js.map