]>
Softwares of Agnibho - pdosage.git/blob - src/main.js
1 /**********************************************************************
3 * Description: Pediatric Dose Calculator
4 * Author: Agnibho Mondal
5 * Website: http://code.agnibho.com
6 **********************************************************************
7 Copyright (c) 2016 Agnibho Mondal
9 **********************************************************************
10 This file is part of PDosage.
12 PDosage is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
17 PDosage is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with PDosage. If not, see <http://www.gnu.org/licenses/>.
24 **********************************************************************/
27 import "./assets/logo.png"
30 import "bootstrap/dist/css/bootstrap.css";
31 import "./custom.css";
36 import "bootstrap-validator";
39 import Dosage
from "./Dosage.js";
40 import data
from "./data.json";
43 import Vue
from "vue";
44 import DataInput
from "./DataInput.vue";
45 import QuickView
from "./QuickView.vue";
46 import ListView
from "./ListView.vue";
47 import CalculatorView
from "./CalculatorView.vue";
48 import AboutView
from "./AboutView.vue";
54 "data-input": DataInput
,
55 "quick-view": QuickView
,
56 "list-view": ListView
,
57 "calculator-view": CalculatorView
,
58 "about-view": AboutView
61 patient
: {age
: {y
:30, m
:null, d
:null}, wt
:50},
67 this.favs
=JSON
.parse(localStorage
.getItem("pdosage_favs"));
71 this.favs
=["Paracetamol", "Levosalbutamol", "Domperidone", "Drotaverine", "Ranitidine"];
75 var loc
=JSON
.parse(localStorage
.getItem(STORAGE
));
76 if(loc
.version
>data
.version
){
77 this.dosage
=new Dosage(loc
.dosage
);
80 this.dosage
=new Dosage(data
.dosage
);
81 localStorage
.setItem(STORAGE
, JSON
.stringify(data
));
86 this.dosage
=new Dosage(data
.dosage
);
87 localStorage
.setItem(STORAGE
, JSON
.stringify(data
));
94 import "./routine.js";
97 //#sourceMappingURL=dist/bundle.js.map