]> Softwares of Agnibho - pdosage.git/blob - src/main.js
914247c4b4bff912dd23c0a4bc8d180f27ed7ff8
[pdosage.git] / src / main.js
1 /**********************************************************************
2 * Title: PDosage
3 * Description: Pediatric Dose Calculator
4 * Author: Agnibho Mondal
5 * Website: http://code.agnibho.com
6 **********************************************************************
7 Copyright (c) 2016 Agnibho Mondal
8 All rights reserved
9 **********************************************************************
10 This file is part of PDosage.
11
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.
16
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.
21
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 **********************************************************************/
25
26 //Icon
27 import "./assets/logo.png"
28
29 //CSS
30 import "bootstrap/dist/css/bootstrap.css";
31 import "./custom.css";
32
33 //JS libs
34 import "jquery";
35 import "bootstrap";
36 import "bootstrap-validator";
37
38 //Backend files
39 import Dosage from "./dosage.js";
40 import data from "./dosage.json";
41
42 //Vue Components
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";
49
50 //Start app
51 var dosage=new Dosage(data);
52 new Vue({
53 el: "#app",
54 components: {
55 "data-input": DataInput,
56 "quick-view": QuickView,
57 "list-view": ListView,
58 "calculator-view": CalculatorView,
59 "about-view": AboutView
60 },
61 data: {
62 patient: {age: {y:null, m:null, d:null}, wt:null},
63 dosage: dosage,
64 favs: "[]"
65 },
66 created:function(){
67 try{
68 this.favs=JSON.parse(localStorage.getItem("pdosage_favs"));
69 }
70 finally{
71 if(this.favs==null){
72 this.favs=["Paracetamol", "Levosalbutamol", "Domperidone", "Drotaverine", "Ranitidine"];
73 }
74 }
75 }
76 });
77
78 //Routine jobs
79 import "./routine.js";
80
81 //Source Map
82 //#sourceMappingURL=dist/bundle.js.map