@openmrs/esm-dispensing-app 1.0.0-pre.21 → 1.0.0-pre.24
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/181.js +1 -0
- package/dist/24.js +1 -2
- package/dist/294.js +1 -2
- package/dist/296.js +1 -0
- package/dist/298.js +2 -0
- package/dist/{680.js.LICENSE.txt → 298.js.LICENSE.txt} +0 -0
- package/dist/299.js +1 -0
- package/dist/595.js +1 -2
- package/dist/595.js.LICENSE.txt +2 -0
- package/dist/781.js +1 -0
- package/dist/906.js +1 -2
- package/dist/978.js +1 -0
- package/dist/openmrs-esm-dispensing-app.js +1 -1
- package/dist/openmrs-esm-dispensing-app.js.buildmanifest.json +111 -67
- package/dist/openmrs-esm-dispensing-app.old +1 -2
- package/package.json +7 -3
- package/src/constants.ts +3 -0
- package/src/dispensing-link.tsx +13 -0
- package/src/dispensing-tiles/dispensing-tile.component.tsx +45 -0
- package/src/dispensing-tiles/dispensing-tile.scss +39 -0
- package/src/dispensing-tiles/dispensing-tiles.component.tsx +42 -0
- package/src/dispensing-tiles/dispensing-tiles.resource.tsx +33 -0
- package/src/dispensing-tiles/dispensing-tiles.scss +12 -0
- package/src/dispensing.component.tsx +15 -0
- package/src/dispensing.scss +2 -2
- package/src/dispensing.test.tsx +1 -1
- package/src/index.ts +15 -32
- package/src/{medicationrequest/medicationrequest.resource.tsx → medication-request/medication-request.resource.tsx} +0 -0
- package/src/pharmacy-header/pharmacy-header.scss +2 -0
- package/src/pharmacy-header/pharmacy-illustration.component.tsx +22 -14
- package/src/prescriptions/prescription-tab-lists.component.tsx +106 -0
- package/src/prescriptions/prescriptions.scss +131 -0
- package/src/root.scss +51 -0
- package/src/types.ts +7 -0
- package/dist/132.js +0 -2
- package/dist/132.js.map +0 -1
- package/dist/24.js.map +0 -1
- package/dist/294.js.map +0 -1
- package/dist/595.js.map +0 -1
- package/dist/613.js +0 -2
- package/dist/613.js.map +0 -1
- package/dist/680.js +0 -3
- package/dist/680.js.map +0 -1
- package/dist/70.js +0 -2
- package/dist/70.js.map +0 -1
- package/dist/906.js.map +0 -1
- package/dist/openmrs-esm-dispensing-app.js.map +0 -1
- package/src/dispensing.tsx +0 -64
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register("@openmrs/esm-dispensing-app",[],function(a,b){var c=void 0;return{execute:function(){a((()=>{function j(a){var b=m[a];if(void 0!==b)return b.exports;var c=m[a]={id:a,loaded:!1,exports:{}};return G[a].call(c.exports,c,c.exports,j),c.loaded=!0,c.exports}var g,k,q,w,x,y,z,A,B,C,r,D,E,F,G={1858:(a,b,c)=>{(0,c(2722).s)(1)},2722:(a,b,c)=>{const d=c(3905).R;b.s=function(a){if(a||(a=1),!c.y.meta||!c.y.meta.url)throw console.error("__system_context__",c.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");c.p=d(c.y.meta.url,a)}},5356:(a,b,c)=>{c(1858)},3905:(a,b)=>{b.R=function(b,c){var d=document.createElement("a");d.href=b;for(var e="/"===d.pathname[0]?d.pathname:"/"+d.pathname,f=0,g=e.length;f!==c&&0<=g;)"/"===e[--g]&&f++;if(f!==c)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+c+") is greater than the number of directories ("+f+") in the URL path "+b);var h=e.slice(0,g+1);return d.protocol+"//"+d.host+h},Number.isInteger},8426:(b,d,f)=>{var g={app:()=>(c||((self.webpackChunk_openmrs_esm_dispensing_app=self.webpackChunk_openmrs_esm_dispensing_app||[]).push([[
|
|
1
|
+
System.register("@openmrs/esm-dispensing-app",[],function(a,b){var c=void 0;return{execute:function(){a((()=>{function j(a){var b=m[a];if(void 0!==b)return b.exports;var c=m[a]={id:a,loaded:!1,exports:{}};return G[a].call(c.exports,c,c.exports,j),c.loaded=!0,c.exports}var g,k,q,w,x,y,z,A,B,C,r,D,E,F,G={1858:(a,b,c)=>{(0,c(2722).s)(1)},2722:(a,b,c)=>{const d=c(3905).R;b.s=function(a){if(a||(a=1),!c.y.meta||!c.y.meta.url)throw console.error("__system_context__",c.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");c.p=d(c.y.meta.url,a)}},5356:(a,b,c)=>{c(1858)},3905:(a,b)=>{b.R=function(b,c){var d=document.createElement("a");d.href=b;for(var e="/"===d.pathname[0]?d.pathname:"/"+d.pathname,f=0,g=e.length;f!==c&&0<=g;)"/"===e[--g]&&f++;if(f!==c)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+c+") is greater than the number of directories ("+f+") in the URL path "+b);var h=e.slice(0,g+1);return d.protocol+"//"+d.host+h},Number.isInteger},8426:(b,d,f)=>{var g={app:()=>(c||((self.webpackChunk_openmrs_esm_dispensing_app=self.webpackChunk_openmrs_esm_dispensing_app||[]).push([[299],{9299:(a,b,c)=>{function d(){var a={featureName:"dispensing",moduleName:"@openmrs/esm-dispensing-app"};return(0,e.defineConfigSchema)("@openmrs/esm-dispensing-app",f),{pages:[{route:"dispensing",load:(0,e.getAsyncLifecycle)(function(){return Promise.all([c.e(298),c.e(365),c.e(397),c.e(181)]).then(c.bind(c,5994))},a),online:!0,offline:!0}],extensions:[{id:"appointments-link",slot:"app-menu-slot",load:(0,e.getAsyncLifecycle)(function(){return Promise.all([c.e(365),c.e(397),c.e(781)]).then(c.bind(c,3781))},a),online:!0,offline:!1}]}}c.r(b),c.d(b,{backendDependencies:()=>h,importTranslation:()=>g,setupOpenMRS:()=>d,assets:()=>["24.js","181.js","294.js","296.js","298.js","574.js","595.js","781.js","906.js","978.js","openmrs-esm-dispensing-app.js"]});var e=c(9075),f={appName:{_type:e.Type.String,_default:"Pharmacy"}},g=c(3979),h={fhir2:"^1.2.0","webservices.rest":"^2.2.0"}},3979:(a,b,c)=>{function d(a){if(!c.o(f,a))return Promise.resolve().then(()=>{var b=new Error("Cannot find module '"+a+"'");throw b.code="MODULE_NOT_FOUND",b});var b=f[a],d=b[0];return c.e(b[1]).then(()=>c(d))}var f={"./en.json":[3574,574]};d.keys=()=>Object.keys(f),d.id=3979,a.exports=d}}]),c=f.e(299).then(()=>()=>f(9299))),c)},e=(a,b)=>(f.R=b,b=f.o(g,a)?g[a]():Promise.resolve().then(()=>{throw new Error("Module \""+a+"\" does not exist in container.")}),f.R=void 0,b),h=(a,b)=>{if(f.S){var c=f.S["default"];if(c&&c!==a)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return f.S["default"]=a,f.I("default",b)}};f.d(d,{get:()=>e,init:()=>h})}},m={};return j.m=G,j.c=m,j.y=b,j.n=a=>{var b=a&&a.__esModule?()=>a.default:()=>a;return j.d(b,{a:b}),b},j.d=(a,b)=>{for(var c in b)j.o(b,c)&&!j.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:b[c]})},j.f={},j.e=a=>Promise.all(Object.keys(j.f).reduce((b,c)=>(j.f[c](a,b),b),[])),j.u=a=>a+".js",j.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(a){if("object"==typeof window)return window}}(),j.o=(a,b)=>Object.prototype.hasOwnProperty.call(a,b),g={},k="@openmrs/esm-dispensing-app:",j.l=(a,b,c)=>{if(g[a])g[a].push(b);else{var e,h;if(void 0!==c)for(var m,n=document.getElementsByTagName("script"),o=0;o<n.length;o++)if(m=n[o],m.getAttribute("src")==a||m.getAttribute("data-webpack")==k+c){e=m;break}e||(h=!0,(e=document.createElement("script")).charset="utf-8",e.timeout=120,j.nc&&e.setAttribute("nonce",j.nc),e.setAttribute("data-webpack",k+c),e.src=a),g[a]=[b];var q=(b,c)=>{e.onerror=e.onload=null,clearTimeout(f);var d=g[a];if(delete g[a],e.parentNode&&e.parentNode.removeChild(e),d&&d.forEach(a=>a(c)),b)return b(c)},f=setTimeout(q.bind(null,void 0,{type:"timeout",target:e}),12e4);e.onerror=q.bind(null,e.onerror),e.onload=q.bind(null,e.onload),h&&document.head.appendChild(e)}},j.r=a=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},j.nmd=a=>(a.paths=[],a.children||(a.children=[]),a),(()=>{j.S={};var b={},c={};j.I=(d,e)=>{e||(e=[]);var f=c[d];if(f||(f=c[d]={}),!(0<=e.indexOf(f))){if(e.push(f),b[d])return b[d];j.o(j.S,d)||(j.S[d]={});var g=j.S[d],a=(a,b,c,d)=>{var e=g[a]=g[a]||{},f=e[b];f&&(f.loaded||(!d==!f.eager?!("@openmrs/esm-dispensing-app">f.from):!d))||(e[b]={get:c,from:"@openmrs/esm-dispensing-app",eager:!!d})},h=[];return"default"===d&&(a("@openmrs/esm-framework","3.4.1-pre.122",()=>Promise.all([j.e(595),j.e(365)]).then(()=>()=>j(595))),a("carbon-components","10.31.0",()=>Promise.all([j.e(24),j.e(296)]).then(()=>()=>j(5024))),a("carbon-icons","7.0.7",()=>j.e(906).then(()=>()=>j(906))),a("react-i18next","11.18.0",()=>Promise.all([j.e(978),j.e(365)]).then(()=>()=>j(8978))),a("react","16.14.0",()=>j.e(294).then(()=>()=>j(7294)))),b[d]=h.length?Promise.all(h).then(()=>b[d]=1):1}}})(),j.p="",q=a=>{var b=a=>a.split(".").map(a=>+a==a?+a:a),c=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(a),d=c[1]?b(c[1]):[];return c[2]&&(d.length++,d.push.apply(d,b(c[2]))),c[3]&&(d.push([]),d.push.apply(d,b(c[3]))),d},w=(b,c)=>{b=q(b),c=q(c);for(var d=0;;){if(d>=b.length)return d<c.length&&"u"!=(typeof c[d])[0];var f=b[d],g=(typeof f)[0];if(d>=c.length)return"u"==g;var a=c[d],h=(typeof a)[0];if(g!=h)return"o"==g&&"n"==h||"s"==h||"u"==g;if("o"!=g&&"u"!=g&&f!=a)return f<a;d++}},x=a=>{function b(){return g.pop().replace(/^\((.+)\)$/,"$1")}var c=a[0],d="";if(1===a.length)return"*";if(c+.5){d+=0==c?">=":-1==c?"<":1==c?"^":2==c?"~":0<c?"=":"!=";for(var e=1,f=1;f<a.length;f++)e--,d+="u"==(typeof(h=a[f]))[0]?"-":(0<e?".":"")+(e=2,h);return d}var g=[];for(f=1;f<a.length;f++){var h=a[f];g.push(0===h?"not("+b()+")":1===h?"("+b()+" || "+b()+")":2===h?g.pop()+" "+g.pop():x(h))}return b()},y=(b,e)=>{if(0 in b){e=q(e);var g=b[0],i=0>g;i&&(g=-g-1);for(var j=0,k=1,m=!0;;k++,j++){var n,o,v=k<b.length?(typeof b[k])[0]:"";if(j>=e.length||"o"==(o=(typeof(n=e[j]))[0]))return!m||("u"==v?k>g&&!i:""==v!=i);if("u"==o){if(!m||"u"!=v)return!1;}else if(!m)"s"!=v&&"n"!=v&&(m=!1,k--);else if(v==o){if(!(k<=g)){if(i?n>b[k]:n<b[k])return!1;n!=b[k]&&(m=!1)}else if(n!=b[k])return!1;}else if("s"!=v&&"n"!=v){if(i||k<=g)return!1;m=!1,k--}else{if(k<=g||o<v!=i)return!1;m=!1}}}var f=[],d=f.pop.bind(f);for(j=1;j<b.length;j++){var c=b[j];f.push(1==c?d()|d():2==c?d()&d():c?y(c,e):!d())}return!!d()},z=(a,b)=>{var c=a[b];return Object.keys(c).reduce((a,b)=>a&&(c[a].loaded||!w(a,b))?a:b,0)},A=(a,b,c,d)=>"Unsatisfied version "+c+" from "+(c&&a[b][c].from)+" of shared singleton module "+b+" (required "+x(d)+")",B=(a,b,c,d)=>{var e=z(a,c);return y(d,e)||"undefined"!=typeof console&&console.warn&&console.warn(A(a,c,e,d)),C(a[c][e])},C=a=>(a.loaded=1,a.get()),r=(b=>function(c,d,e,f){var g=j.I(c);return g&&g.then?g.then(b.bind(b,c,j.S[c],d,e,f)):b(0,j.S[c],d,e,f)})((a,b,c,d,e)=>b&&j.o(b,c)?B(b,0,c,d):e()),D={},E={9075:()=>r("default","@openmrs/esm-framework",[1,3,14,0,,"pre"],()=>Promise.all([j.e(595),j.e(365)]).then(()=>()=>j(595))),5365:()=>r("default","react",[1,16],()=>j.e(294).then(()=>()=>j(7294))),3397:()=>r("default","react-i18next",[1,11],()=>j.e(978).then(()=>()=>j(8978))),1990:()=>r("default","carbon-components",[1,10],()=>j.e(24).then(()=>()=>j(5024)))},F={181:[1990],299:[9075],365:[5365],397:[3397]},j.f.consumes=(a,b)=>{j.o(F,a)&&F[a].forEach(a=>{if(j.o(D,a))return b.push(D[a]);var c=b=>{D[a]=0,j.m[a]=c=>{delete j.c[a],c.exports=b()}},d=b=>{delete D[a],j.m[a]=()=>{throw delete j.c[a],b}};try{var e=E[a]();e.then?b.push(D[a]=e.then(c).catch(d)):c(e)}catch(a){d(a)}})},(()=>{var b={989:0};j.f.j=(c,d)=>{var e=j.o(b,c)?b[c]:void 0;if(0!==e)if(e)d.push(e[2]);else if(/^3(65|97)$/.test(c))b[c]=0;else{var f=new Promise((a,d)=>e=b[c]=[a,d]);d.push(e[2]=f);var g=j.p+j.u(c),h=new Error;j.l(g,d=>{if(j.o(b,c)&&(0!==(e=b[c])&&(b[c]=void 0),e)){var f=d&&("load"===d.type?"missing":d.type),g=d&&d.target&&d.target.src;h.message="Loading chunk "+c+" failed.\n("+f+": "+g+")",h.name="ChunkLoadError",h.type=f,h.request=g,e[1](h)}},"chunk-"+c,c)}};var a=(c,d)=>{var e,f,[g,a,h]=d,i=0;if(g.some(a=>0!==b[a])){for(e in a)j.o(a,e)&&(j.m[e]=a[e]);h&&h(j)}for(c&&c(d);i<g.length;i++)f=g[i],j.o(b,f)&&b[f]&&b[f][0](),b[f]=0},c=self.webpackChunk_openmrs_esm_dispensing_app=self.webpackChunk_openmrs_esm_dispensing_app||[];c.forEach(a.bind(null,0)),c.push=a.bind(null,c.push.bind(c))})(),j.nc=void 0,j(5356),j(8426)})())}}});
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"entry": false,
|
|
7
7
|
"recorded": false,
|
|
8
8
|
"reason": "reused as split chunk (cache group: defaultVendors)",
|
|
9
|
-
"size":
|
|
9
|
+
"size": 576157,
|
|
10
10
|
"sizes": {
|
|
11
|
-
"javascript":
|
|
11
|
+
"javascript": 576157
|
|
12
12
|
},
|
|
13
13
|
"names": [],
|
|
14
14
|
"idHints": [
|
|
@@ -20,10 +20,8 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"24.js"
|
|
22
22
|
],
|
|
23
|
-
"auxiliaryFiles": [
|
|
24
|
-
|
|
25
|
-
],
|
|
26
|
-
"hash": "e6755aea2678c0a57b7c",
|
|
23
|
+
"auxiliaryFiles": [],
|
|
24
|
+
"hash": "7aca14782a852d2a4237",
|
|
27
25
|
"childrenByOrder": {}
|
|
28
26
|
},
|
|
29
27
|
{
|
|
@@ -31,25 +29,42 @@
|
|
|
31
29
|
"initial": false,
|
|
32
30
|
"entry": false,
|
|
33
31
|
"recorded": false,
|
|
34
|
-
"
|
|
35
|
-
"size": 38955,
|
|
32
|
+
"size": 42515,
|
|
36
33
|
"sizes": {
|
|
37
|
-
"javascript":
|
|
34
|
+
"javascript": 42473,
|
|
35
|
+
"consume-shared": 42
|
|
38
36
|
},
|
|
39
37
|
"names": [],
|
|
40
|
-
"idHints": [
|
|
41
|
-
"vendors"
|
|
42
|
-
],
|
|
38
|
+
"idHints": [],
|
|
43
39
|
"runtime": [
|
|
44
40
|
"@openmrs/esm-dispensing-app"
|
|
45
41
|
],
|
|
46
42
|
"files": [
|
|
47
|
-
"
|
|
43
|
+
"181.js"
|
|
44
|
+
],
|
|
45
|
+
"auxiliaryFiles": [],
|
|
46
|
+
"hash": "c717a773cf5499605748",
|
|
47
|
+
"childrenByOrder": {}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"rendered": true,
|
|
51
|
+
"initial": false,
|
|
52
|
+
"entry": false,
|
|
53
|
+
"recorded": false,
|
|
54
|
+
"size": 8973,
|
|
55
|
+
"sizes": {
|
|
56
|
+
"javascript": 8973
|
|
57
|
+
},
|
|
58
|
+
"names": [],
|
|
59
|
+
"idHints": [],
|
|
60
|
+
"runtime": [
|
|
61
|
+
"@openmrs/esm-dispensing-app"
|
|
48
62
|
],
|
|
49
|
-
"
|
|
50
|
-
"
|
|
63
|
+
"files": [
|
|
64
|
+
"294.js"
|
|
51
65
|
],
|
|
52
|
-
"
|
|
66
|
+
"auxiliaryFiles": [],
|
|
67
|
+
"hash": "327de11f9ecae26eb410",
|
|
53
68
|
"childrenByOrder": {}
|
|
54
69
|
},
|
|
55
70
|
{
|
|
@@ -57,10 +72,9 @@
|
|
|
57
72
|
"initial": false,
|
|
58
73
|
"entry": false,
|
|
59
74
|
"recorded": false,
|
|
60
|
-
"size":
|
|
75
|
+
"size": 10784,
|
|
61
76
|
"sizes": {
|
|
62
|
-
"javascript":
|
|
63
|
-
"consume-shared": 42
|
|
77
|
+
"javascript": 10784
|
|
64
78
|
},
|
|
65
79
|
"names": [],
|
|
66
80
|
"idHints": [],
|
|
@@ -68,12 +82,34 @@
|
|
|
68
82
|
"@openmrs/esm-dispensing-app"
|
|
69
83
|
],
|
|
70
84
|
"files": [
|
|
71
|
-
"
|
|
85
|
+
"296.js"
|
|
72
86
|
],
|
|
73
|
-
"auxiliaryFiles": [
|
|
74
|
-
|
|
87
|
+
"auxiliaryFiles": [],
|
|
88
|
+
"hash": "6fd71e4e1bbc8d5dfcde",
|
|
89
|
+
"childrenByOrder": {}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"rendered": true,
|
|
93
|
+
"initial": false,
|
|
94
|
+
"entry": false,
|
|
95
|
+
"recorded": false,
|
|
96
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
97
|
+
"size": 1050819,
|
|
98
|
+
"sizes": {
|
|
99
|
+
"javascript": 1050819
|
|
100
|
+
},
|
|
101
|
+
"names": [],
|
|
102
|
+
"idHints": [
|
|
103
|
+
"vendors"
|
|
104
|
+
],
|
|
105
|
+
"runtime": [
|
|
106
|
+
"@openmrs/esm-dispensing-app"
|
|
75
107
|
],
|
|
76
|
-
"
|
|
108
|
+
"files": [
|
|
109
|
+
"298.js"
|
|
110
|
+
],
|
|
111
|
+
"auxiliaryFiles": [],
|
|
112
|
+
"hash": "ac55600aa9788ad8ef0d",
|
|
77
113
|
"childrenByOrder": {}
|
|
78
114
|
},
|
|
79
115
|
{
|
|
@@ -81,9 +117,10 @@
|
|
|
81
117
|
"initial": false,
|
|
82
118
|
"entry": false,
|
|
83
119
|
"recorded": false,
|
|
84
|
-
"size":
|
|
120
|
+
"size": 2430,
|
|
85
121
|
"sizes": {
|
|
86
|
-
"javascript":
|
|
122
|
+
"javascript": 2388,
|
|
123
|
+
"consume-shared": 42
|
|
87
124
|
},
|
|
88
125
|
"names": [],
|
|
89
126
|
"idHints": [],
|
|
@@ -91,12 +128,10 @@
|
|
|
91
128
|
"@openmrs/esm-dispensing-app"
|
|
92
129
|
],
|
|
93
130
|
"files": [
|
|
94
|
-
"
|
|
95
|
-
],
|
|
96
|
-
"auxiliaryFiles": [
|
|
97
|
-
"294.js.map"
|
|
131
|
+
"299.js"
|
|
98
132
|
],
|
|
99
|
-
"
|
|
133
|
+
"auxiliaryFiles": [],
|
|
134
|
+
"hash": "60c634683ccc4c9d34ae",
|
|
100
135
|
"childrenByOrder": {}
|
|
101
136
|
},
|
|
102
137
|
{
|
|
@@ -116,7 +151,27 @@
|
|
|
116
151
|
],
|
|
117
152
|
"files": [],
|
|
118
153
|
"auxiliaryFiles": [],
|
|
119
|
-
"hash": "
|
|
154
|
+
"hash": "b7c4c6f3b9ba639c6a4c",
|
|
155
|
+
"childrenByOrder": {}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"rendered": false,
|
|
159
|
+
"initial": false,
|
|
160
|
+
"entry": false,
|
|
161
|
+
"recorded": false,
|
|
162
|
+
"reason": "split chunk (cache group: default)",
|
|
163
|
+
"size": 42,
|
|
164
|
+
"sizes": {
|
|
165
|
+
"consume-shared": 42
|
|
166
|
+
},
|
|
167
|
+
"names": [],
|
|
168
|
+
"idHints": [],
|
|
169
|
+
"runtime": [
|
|
170
|
+
"@openmrs/esm-dispensing-app"
|
|
171
|
+
],
|
|
172
|
+
"files": [],
|
|
173
|
+
"auxiliaryFiles": [],
|
|
174
|
+
"hash": "f202e8e30457d60e9740",
|
|
120
175
|
"childrenByOrder": {}
|
|
121
176
|
},
|
|
122
177
|
{
|
|
@@ -137,7 +192,7 @@
|
|
|
137
192
|
"574.js"
|
|
138
193
|
],
|
|
139
194
|
"auxiliaryFiles": [],
|
|
140
|
-
"hash": "
|
|
195
|
+
"hash": "62ddc0dab66b248b5fdf",
|
|
141
196
|
"childrenByOrder": {}
|
|
142
197
|
},
|
|
143
198
|
{
|
|
@@ -146,9 +201,9 @@
|
|
|
146
201
|
"entry": false,
|
|
147
202
|
"recorded": false,
|
|
148
203
|
"reason": "split chunk (cache group: defaultVendors)",
|
|
149
|
-
"size":
|
|
204
|
+
"size": 808915,
|
|
150
205
|
"sizes": {
|
|
151
|
-
"javascript":
|
|
206
|
+
"javascript": 808915
|
|
152
207
|
},
|
|
153
208
|
"names": [],
|
|
154
209
|
"idHints": [
|
|
@@ -160,10 +215,8 @@
|
|
|
160
215
|
"files": [
|
|
161
216
|
"595.js"
|
|
162
217
|
],
|
|
163
|
-
"auxiliaryFiles": [
|
|
164
|
-
|
|
165
|
-
],
|
|
166
|
-
"hash": "17754d2d38156c1a0b68",
|
|
218
|
+
"auxiliaryFiles": [],
|
|
219
|
+
"hash": "d7ffb9f8e1cd87aa5ae7",
|
|
167
220
|
"childrenByOrder": {}
|
|
168
221
|
},
|
|
169
222
|
{
|
|
@@ -171,10 +224,9 @@
|
|
|
171
224
|
"initial": false,
|
|
172
225
|
"entry": false,
|
|
173
226
|
"recorded": false,
|
|
174
|
-
"size":
|
|
227
|
+
"size": 560,
|
|
175
228
|
"sizes": {
|
|
176
|
-
"javascript":
|
|
177
|
-
"consume-shared": 84
|
|
229
|
+
"javascript": 560
|
|
178
230
|
},
|
|
179
231
|
"names": [],
|
|
180
232
|
"idHints": [],
|
|
@@ -182,12 +234,10 @@
|
|
|
182
234
|
"@openmrs/esm-dispensing-app"
|
|
183
235
|
],
|
|
184
236
|
"files": [
|
|
185
|
-
"
|
|
237
|
+
"781.js"
|
|
186
238
|
],
|
|
187
|
-
"auxiliaryFiles": [
|
|
188
|
-
|
|
189
|
-
],
|
|
190
|
-
"hash": "a798a64d5ce0e064203f",
|
|
239
|
+
"auxiliaryFiles": [],
|
|
240
|
+
"hash": "a2c9b0e35b083b3d8f8d",
|
|
191
241
|
"childrenByOrder": {}
|
|
192
242
|
},
|
|
193
243
|
{
|
|
@@ -195,10 +245,10 @@
|
|
|
195
245
|
"initial": false,
|
|
196
246
|
"entry": false,
|
|
197
247
|
"recorded": false,
|
|
198
|
-
"reason": "split chunk (cache group: defaultVendors)",
|
|
199
|
-
"size":
|
|
248
|
+
"reason": "reused as split chunk (cache group: defaultVendors)",
|
|
249
|
+
"size": 109242,
|
|
200
250
|
"sizes": {
|
|
201
|
-
"javascript":
|
|
251
|
+
"javascript": 109242
|
|
202
252
|
},
|
|
203
253
|
"names": [],
|
|
204
254
|
"idHints": [
|
|
@@ -208,12 +258,10 @@
|
|
|
208
258
|
"@openmrs/esm-dispensing-app"
|
|
209
259
|
],
|
|
210
260
|
"files": [
|
|
211
|
-
"
|
|
212
|
-
],
|
|
213
|
-
"auxiliaryFiles": [
|
|
214
|
-
"680.js.map"
|
|
261
|
+
"906.js"
|
|
215
262
|
],
|
|
216
|
-
"
|
|
263
|
+
"auxiliaryFiles": [],
|
|
264
|
+
"hash": "6e27c32814dd5b1966ba",
|
|
217
265
|
"childrenByOrder": {}
|
|
218
266
|
},
|
|
219
267
|
{
|
|
@@ -222,9 +270,9 @@
|
|
|
222
270
|
"entry": false,
|
|
223
271
|
"recorded": false,
|
|
224
272
|
"reason": "reused as split chunk (cache group: defaultVendors)",
|
|
225
|
-
"size":
|
|
273
|
+
"size": 39074,
|
|
226
274
|
"sizes": {
|
|
227
|
-
"javascript":
|
|
275
|
+
"javascript": 39074
|
|
228
276
|
},
|
|
229
277
|
"names": [],
|
|
230
278
|
"idHints": [
|
|
@@ -234,12 +282,10 @@
|
|
|
234
282
|
"@openmrs/esm-dispensing-app"
|
|
235
283
|
],
|
|
236
284
|
"files": [
|
|
237
|
-
"
|
|
238
|
-
],
|
|
239
|
-
"auxiliaryFiles": [
|
|
240
|
-
"906.js.map"
|
|
285
|
+
"978.js"
|
|
241
286
|
],
|
|
242
|
-
"
|
|
287
|
+
"auxiliaryFiles": [],
|
|
288
|
+
"hash": "7d03a5a0451ebcbdca3c",
|
|
243
289
|
"childrenByOrder": {}
|
|
244
290
|
},
|
|
245
291
|
{
|
|
@@ -247,11 +293,11 @@
|
|
|
247
293
|
"initial": true,
|
|
248
294
|
"entry": true,
|
|
249
295
|
"recorded": false,
|
|
250
|
-
"size":
|
|
296
|
+
"size": 22228,
|
|
251
297
|
"sizes": {
|
|
252
298
|
"javascript": 3409,
|
|
253
299
|
"share-init": 210,
|
|
254
|
-
"runtime":
|
|
300
|
+
"runtime": 18609
|
|
255
301
|
},
|
|
256
302
|
"names": [
|
|
257
303
|
"@openmrs/esm-dispensing-app"
|
|
@@ -263,10 +309,8 @@
|
|
|
263
309
|
"files": [
|
|
264
310
|
"openmrs-esm-dispensing-app.js"
|
|
265
311
|
],
|
|
266
|
-
"auxiliaryFiles": [
|
|
267
|
-
|
|
268
|
-
],
|
|
269
|
-
"hash": "9ef408f19aa02be06aef",
|
|
312
|
+
"auxiliaryFiles": [],
|
|
313
|
+
"hash": "1e437d7c28911638dca0",
|
|
270
314
|
"childrenByOrder": {}
|
|
271
315
|
}
|
|
272
316
|
]
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
System.register("@openmrs/esm-dispensing-app",[],(function(e,r){return{execute:function(){e((()=>{var e,t,n,o,a,i,s,u,l,p,f,d,c,h,m={1858:(e,r,t)=>{(0,t(2722).s)(1)},2722:(e,r,t)=>{const n=t(3905).R;r.s=function(e){if(e||(e=1),!t.y.meta||!t.y.meta.url)throw console.error("__system_context__",t.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");t.p=n(t.y.meta.url,e)}},5356:(e,r,t)=>{t(1858)},3905:(e,r,t)=>{r.R=function(e,r){var t=document.createElement("a");t.href=e;for(var n="/"===t.pathname[0]?t.pathname:"/"+t.pathname,o=0,a=n.length;o!==r&&a>=0;)"/"===n[--a]&&o++;if(o!==r)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+r+") is greater than the number of directories ("+o+") in the URL path "+e);var i=n.slice(0,a+1);return t.protocol+"//"+t.host+i};Number.isInteger},8426:(e,r,t)=>{"use strict";var n={app:()=>t.e(
|
|
2
|
-
//# sourceMappingURL=openmrs-esm-dispensing-app.js.map
|
|
1
|
+
System.register("@openmrs/esm-dispensing-app",[],(function(e,r){return{execute:function(){e((()=>{var e,t,n,o,a,i,s,u,l,p,f,d,c,h,m={1858:(e,r,t)=>{(0,t(2722).s)(1)},2722:(e,r,t)=>{const n=t(3905).R;r.s=function(e){if(e||(e=1),!t.y.meta||!t.y.meta.url)throw console.error("__system_context__",t.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");t.p=n(t.y.meta.url,e)}},5356:(e,r,t)=>{t(1858)},3905:(e,r,t)=>{r.R=function(e,r){var t=document.createElement("a");t.href=e;for(var n="/"===t.pathname[0]?t.pathname:"/"+t.pathname,o=0,a=n.length;o!==r&&a>=0;)"/"===n[--a]&&o++;if(o!==r)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+r+") is greater than the number of directories ("+o+") in the URL path "+e);var i=n.slice(0,a+1);return t.protocol+"//"+t.host+i};Number.isInteger},8426:(e,r,t)=>{"use strict";var n={app:()=>t.e(299).then((()=>()=>t(9299)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},v={};function g(e){var r=v[e];if(void 0!==r)return r.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return m[e].call(t.exports,t,t.exports,g),t.loaded=!0,t.exports}return g.m=m,g.c=v,g.y=r,g.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return g.d(r,{a:r}),r},g.d=(e,r)=>{for(var t in r)g.o(r,t)&&!g.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},g.f={},g.e=e=>Promise.all(Object.keys(g.f).reduce(((r,t)=>(g.f[t](e,r),r)),[])),g.u=e=>e+".js",g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},t="@openmrs/esm-dispensing-app:",g.l=(r,n,o,a)=>{if(e[r])e[r].push(n);else{var i,s;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var p=u[l];if(p.getAttribute("src")==r||p.getAttribute("data-webpack")==t+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,g.nc&&i.setAttribute("nonce",g.nc),i.setAttribute("data-webpack",t+o),i.src=r),e[r]=[n];var f=(t,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),t)return t(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}},g.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{g.S={};var e={},r={};g.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];g.o(g.S,t)||(g.S[t]={});var a=g.S[t],i="@openmrs/esm-dispensing-app",s=(e,r,t,n)=>{var o=a[e]=a[e]||{},s=o[r];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(o[r]={get:t,from:i,eager:!!n})},u=[];return"default"===t&&(s("@openmrs/esm-framework","3.4.1-pre.122",(()=>Promise.all([g.e(595),g.e(365)]).then((()=>()=>g(595))))),s("carbon-components","10.31.0",(()=>Promise.all([g.e(24),g.e(296)]).then((()=>()=>g(5024))))),s("carbon-icons","7.0.7",(()=>g.e(906).then((()=>()=>g(906))))),s("react-i18next","11.18.0",(()=>Promise.all([g.e(978),g.e(365)]).then((()=>()=>g(8978))))),s("react","16.14.0",(()=>g.e(294).then((()=>()=>g(7294)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),g.p="",n=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},o=(e,r)=>{e=n(e),r=n(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var o=e[t],a=(typeof o)[0];if(t>=r.length)return"u"==a;var i=r[t],s=(typeof i)[0];if(a!=s)return"o"==a&&"n"==s||"s"==s||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;t++}},a=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,t+="u"==(typeof(s=e[o]))[0]?"-":(n>0?".":"")+(n=2,s);return t}var i=[];for(o=1;o<e.length;o++){var s=e[o];i.push(0===s?"not("+u()+")":1===s?"("+u()+" || "+u()+")":2===s?i.pop()+" "+i.pop():a(s))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},i=(e,r)=>{if(0 in e){r=n(r);var t=e[0],o=t<0;o&&(t=-t-1);for(var a=0,s=1,u=!0;;s++,a++){var l,p,f=s<e.length?(typeof e[s])[0]:"";if(a>=r.length||"o"==(p=(typeof(l=r[a]))[0]))return!u||("u"==f?s>t&&!o:""==f!=o);if("u"==p){if(!u||"u"!=f)return!1}else if(u)if(f==p)if(s<=t){if(l!=e[s])return!1}else{if(o?l>e[s]:l<e[s])return!1;l!=e[s]&&(u=!1)}else if("s"!=f&&"n"!=f){if(o||s<=t)return!1;u=!1,s--}else{if(s<=t||p<f!=o)return!1;u=!1}else"s"!=f&&"n"!=f&&(u=!1,s--)}}var d=[],c=d.pop.bind(d);for(a=1;a<e.length;a++){var h=e[a];d.push(1==h?c()|c():2==h?c()&c():h?i(h,r):!c())}return!!c()},s=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&o(e,r)?r:e),0)},u=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+a(n)+")",l=(e,r,t,n)=>{var o=s(e,t);return i(n,o)||"undefined"!=typeof console&&console.warn&&console.warn(u(e,t,o,n)),p(e[t][o])},p=e=>(e.loaded=1,e.get()),f=(e=>function(r,t,n,o){var a=g.I(r);return a&&a.then?a.then(e.bind(e,r,g.S[r],t,n,o)):e(0,g.S[r],t,n,o)})(((e,r,t,n,o)=>r&&g.o(r,t)?l(r,0,t,n):o())),d={},c={9075:()=>f("default","@openmrs/esm-framework",[1,3,14,0,,"pre"],(()=>Promise.all([g.e(595),g.e(365)]).then((()=>()=>g(595))))),5365:()=>f("default","react",[1,16],(()=>g.e(294).then((()=>()=>g(7294))))),3397:()=>f("default","react-i18next",[1,11],(()=>g.e(978).then((()=>()=>g(8978))))),1990:()=>f("default","carbon-components",[1,10],(()=>g.e(24).then((()=>()=>g(5024)))))},h={181:[1990],299:[9075],365:[5365],397:[3397]},g.f.consumes=(e,r)=>{g.o(h,e)&&h[e].forEach((e=>{if(g.o(d,e))return r.push(d[e]);var t=r=>{d[e]=0,g.m[e]=t=>{delete g.c[e],t.exports=r()}},n=r=>{delete d[e],g.m[e]=t=>{throw delete g.c[e],r}};try{var o=c[e]();o.then?r.push(d[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={989:0};g.f.j=(r,t)=>{var n=g.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^3(65|97)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=g.p+g.u(r),i=new Error;g.l(a,(t=>{if(g.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,s]=t,u=0;if(a.some((r=>0!==e[r]))){for(n in i)g.o(i,n)&&(g.m[n]=i[n]);s&&s(g)}for(r&&r(t);u<a.length;u++)o=a[u],g.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunk_openmrs_esm_dispensing_app=self.webpackChunk_openmrs_esm_dispensing_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),g.nc=void 0,g(5356),g(8426)})())}}}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-dispensing-app",
|
|
3
|
-
"version": "1.0.0-pre.
|
|
3
|
+
"version": "1.0.0-pre.24",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Medication dispensing application",
|
|
6
6
|
"browser": "dist/openmrs-esm-dispensing-app.js",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@carbon/icons-react": "^10.18.0",
|
|
45
45
|
"carbon-components-react": "^7.25.0",
|
|
46
|
-
"lodash-es": "^4.17.15"
|
|
46
|
+
"lodash-es": "^4.17.15",
|
|
47
|
+
"swr": "^1.3.0"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"@openmrs/esm-framework": "^3.14.0-pre",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"@types/carbon-components-react": "^7.34.0",
|
|
67
68
|
"@types/carbon__icons-react": "^10.31.0",
|
|
68
69
|
"@types/jest": "^26.0.23",
|
|
69
|
-
"@types/react": "^16.
|
|
70
|
+
"@types/react": "^16.14.5",
|
|
70
71
|
"@types/react-dom": "^16.9.14",
|
|
71
72
|
"@types/react-router": "^5.1.14",
|
|
72
73
|
"@types/react-router-dom": "^5.1.7",
|
|
@@ -90,5 +91,8 @@
|
|
|
90
91
|
"react-router-dom": "^5.2.0",
|
|
91
92
|
"rxjs": "^6.5.4",
|
|
92
93
|
"typescript": "^4.3.2"
|
|
94
|
+
},
|
|
95
|
+
"resolutions": {
|
|
96
|
+
"**/@types/react": "^16.14.5"
|
|
93
97
|
}
|
|
94
98
|
}
|
package/src/constants.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ConfigurableLink } from "@openmrs/esm-framework";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import { dispensingBasePath } from "./constants";
|
|
5
|
+
|
|
6
|
+
export default function DispensingLink() {
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
return (
|
|
9
|
+
<ConfigurableLink to={dispensingBasePath}>
|
|
10
|
+
{t("dispensing", "Dispensing")}
|
|
11
|
+
</ConfigurableLink>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { Tile, Button } from "carbon-components-react";
|
|
4
|
+
import ArrowRight16 from "@carbon/icons-react/es/arrow--right/16";
|
|
5
|
+
import styles from "./dispensing-tile.scss";
|
|
6
|
+
|
|
7
|
+
interface DispensingTileProps {
|
|
8
|
+
label: string;
|
|
9
|
+
value: number;
|
|
10
|
+
headerLabel: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const DispensingTile: React.FC<DispensingTileProps> = ({
|
|
15
|
+
label,
|
|
16
|
+
value,
|
|
17
|
+
headerLabel,
|
|
18
|
+
children,
|
|
19
|
+
}) => {
|
|
20
|
+
const { t } = useTranslation();
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Tile className={styles.tileContainer} light={true}>
|
|
24
|
+
<div className={styles.tileHeader}>
|
|
25
|
+
<div className={styles.headerLabelContainer}>
|
|
26
|
+
<label className={styles.headerLabel}>{headerLabel}</label>
|
|
27
|
+
{children}
|
|
28
|
+
</div>
|
|
29
|
+
<Button
|
|
30
|
+
kind="ghost"
|
|
31
|
+
renderIcon={ArrowRight16}
|
|
32
|
+
iconDescription={t("view", "View")}
|
|
33
|
+
>
|
|
34
|
+
{t("view", "View")}
|
|
35
|
+
</Button>
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<label className={styles.totalsLabel}>{label}</label>
|
|
39
|
+
<p className={styles.totalsValue}>{value}</p>
|
|
40
|
+
</div>
|
|
41
|
+
</Tile>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default DispensingTile;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import "~@openmrs/esm-styleguide/src/vars";
|
|
2
|
+
@import "~carbon-components/src/globals/scss/vars";
|
|
3
|
+
@import "~carbon-components/src/globals/scss/mixins";
|
|
4
|
+
|
|
5
|
+
.tileContainer {
|
|
6
|
+
border: 0.0625rem solid $ui-03;
|
|
7
|
+
flex-grow: 1;
|
|
8
|
+
height: 7.875rem;
|
|
9
|
+
padding: 0 $spacing-05;
|
|
10
|
+
margin: $spacing-03 $spacing-03;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tileHeader {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
margin-bottom: $spacing-03;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.headerLabel {
|
|
21
|
+
@include carbon--type-style("productive-heading-01");
|
|
22
|
+
color: $text-02;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.totalsLabel {
|
|
26
|
+
@include carbon--type-style("label-01");
|
|
27
|
+
color: $text-02;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.totalsValue {
|
|
31
|
+
@include carbon--type-style("productive-heading-04");
|
|
32
|
+
color: $ui-05;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.headerLabelContainer {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
height: $spacing-07;
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { DataTableSkeleton } from "carbon-components-react";
|
|
4
|
+
import { useMetrics } from "./dispensing-tiles.resource";
|
|
5
|
+
import DispensingTile from "./dispensing-tile.component";
|
|
6
|
+
import styles from "./dispensing-tiles.scss";
|
|
7
|
+
|
|
8
|
+
const DispensingTiles: React.FC = () => {
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
const { metrics, isError, isLoading } = useMetrics();
|
|
11
|
+
|
|
12
|
+
if (isLoading) {
|
|
13
|
+
return <DataTableSkeleton role="progressbar" />;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
<div className={styles.cardContainer}>
|
|
19
|
+
<DispensingTile
|
|
20
|
+
label={t("orders", "Orders")}
|
|
21
|
+
value={metrics.orders}
|
|
22
|
+
headerLabel={t(
|
|
23
|
+
"prescriptionsToFillToday",
|
|
24
|
+
"Prescriptions to fill today"
|
|
25
|
+
)}
|
|
26
|
+
/>
|
|
27
|
+
<DispensingTile
|
|
28
|
+
label={t("today", "Today")}
|
|
29
|
+
value={metrics.orders_for_home_delivery}
|
|
30
|
+
headerLabel={t("ordersForHomeDelivery", "Orders for home delivery")}
|
|
31
|
+
/>
|
|
32
|
+
<DispensingTile
|
|
33
|
+
label={t("last14Days", "Last 14 days")}
|
|
34
|
+
value={metrics.missed_collections}
|
|
35
|
+
headerLabel={t("missedCollections", "Missed collections")}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default DispensingTiles;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import useSWR from "swr";
|
|
2
|
+
import useSWRImmutable from "swr/immutable";
|
|
3
|
+
import { FetchResponse, openmrsFetch } from "@openmrs/esm-framework";
|
|
4
|
+
|
|
5
|
+
export function useMetrics() {
|
|
6
|
+
const metrics = {
|
|
7
|
+
orders: 43,
|
|
8
|
+
orders_for_home_delivery: 4,
|
|
9
|
+
missed_collections: 12,
|
|
10
|
+
};
|
|
11
|
+
const { data, error } = useSWR<{ data: { results: {} } }, Error>(
|
|
12
|
+
`/ws/rest/v1/queue?`,
|
|
13
|
+
openmrsFetch
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
metrics: metrics,
|
|
18
|
+
isError: error,
|
|
19
|
+
isLoading: !data && !error,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function useServices() {
|
|
24
|
+
const serviceConceptSetUuid = "330c0ec6-0ac7-4b86-9c70-29d76f0ae20a";
|
|
25
|
+
const apiUrl = `/ws/rest/v1/concept/${serviceConceptSetUuid}`;
|
|
26
|
+
const { data } = useSWRImmutable<FetchResponse>(apiUrl, openmrsFetch);
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
services: data
|
|
30
|
+
? data?.data?.setMembers?.map((setMember) => setMember?.display)
|
|
31
|
+
: [],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@import "~@openmrs/esm-styleguide/src/vars";
|
|
2
|
+
@import "~carbon-components/src/globals/scss/vars";
|
|
3
|
+
@import "~carbon-components/src/globals/scss/mixins";
|
|
4
|
+
|
|
5
|
+
.cardContainer {
|
|
6
|
+
background-color: $ui-02 ;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
padding: 0 $spacing-05 $spacing-10 $spacing-03;
|
|
10
|
+
flex-flow: row wrap;
|
|
11
|
+
margin-top: -$spacing-03;
|
|
12
|
+
}
|