diff --git a/assignments/Mitali Kadu/Expense Manager/.classpath b/assignments/Mitali Kadu/Expense Manager/.classpath new file mode 100644 index 00000000..daee9425 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Expense Manager/.idea/.name b/assignments/Mitali Kadu/Expense Manager/.idea/.name new file mode 100644 index 00000000..ce93c1f3 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.idea/.name @@ -0,0 +1 @@ +Expense Manager \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/.idea/compiler.xml b/assignments/Mitali Kadu/Expense Manager/.idea/compiler.xml new file mode 100644 index 00000000..96cc43ef --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/.idea/copyright/profiles_settings.xml b/assignments/Mitali Kadu/Expense Manager/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/.idea/misc.xml b/assignments/Mitali Kadu/Expense Manager/.idea/misc.xml new file mode 100644 index 00000000..c3405ca7 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.idea/misc.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/.idea/modules.xml b/assignments/Mitali Kadu/Expense Manager/.idea/modules.xml new file mode 100644 index 00000000..99dee4c7 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/.idea/uiDesigner.xml b/assignments/Mitali Kadu/Expense Manager/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/.idea/vcs.xml b/assignments/Mitali Kadu/Expense Manager/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/.idea/workspace.xml b/assignments/Mitali Kadu/Expense Manager/.idea/workspace.xml new file mode 100644 index 00000000..4e014711 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.idea/workspace.xml @@ -0,0 +1,337 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1453447362433 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/.project b/assignments/Mitali Kadu/Expense Manager/.project new file mode 100644 index 00000000..fad355a9 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.project @@ -0,0 +1,36 @@ + + + Expense Manager + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/assignments/Mitali Kadu/Expense Manager/.settings/.jsdtscope b/assignments/Mitali Kadu/Expense Manager/.settings/.jsdtscope new file mode 100644 index 00000000..92e666d7 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.jdt.core.prefs b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.common.component b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..9d37b221 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..b3f07fe4 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/Expense Manager.iml b/assignments/Mitali Kadu/Expense Manager/Expense Manager.iml new file mode 100644 index 00000000..22928023 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/Expense Manager.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/WebContent/META-INF/MANIFEST.MF b/assignments/Mitali Kadu/Expense Manager/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/assignments/Mitali Kadu/Expense Manager/WebContent/app.js b/assignments/Mitali Kadu/Expense Manager/WebContent/app.js new file mode 100644 index 00000000..88ab4003 --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/WebContent/app.js @@ -0,0 +1,143 @@ +var myApp = angular.module('myApp',[]); + +/*myApp.config(['$routeProvider','$locationProvider',function($routeProvider,$locationProvider){ + + $routeProvider. + when('/final', { + templateUrl : 'home.html', + controller : 'mainController' + }) + .when('/report', { + templateUrl : 'report.html', + controller : 'reportController' + }) + + .otherwise({ + redirectTo: '/final' + }); + + +}]); + +*/ +/*myApp.service('incomeService',function(){ + + $scope.expense = 0; + $scope.payment = ""; + + $scope.payments = []; + + +this.incomes = [ + ]; + + + this.expenses = [ + ]; + + + + + +}); +*/ + +myApp.controller('mainController', function($scope){ + $scope.income_table = false; + $scope.expense_table = false; + $scope.enter_income = false; + $scope.enter_expense = false; + $scope.total_income = 0; + $scope.total_expense = 0; + $scope.total_balance = 0; + + + $scope.incomes = [ + ]; + + + $scope.expenses = [ + ]; + + + $scope.temp = new Object(); + $scope.temp = { + amount : "", + date : "", + category : "", + payment : "" + }; + + + + $scope.temp_2 = new Object(); + $scope.temp_2 = { + amount : "", + type : "" + }; + + $scope.add_income = function() + { + if($scope.temp_2.amount != "" && $scope.temp_2.type != "") + { + $scope.enter_income = false; + $scope.total_income = $scope.temp_2.amount + $scope.total_income; + + $scope.incomes.push($scope.temp_2); + console.log($scope.incomes); + $scope.temp_2 = new Object(); + $scope.temp_2 = { + amount : "", + type : "" + }; + } + else + { + $scope.enter_income = true; + return false; + } + + }; + $scope.add_expense = function() + { + + if($scope.temp.amount != "" && $scope.temp.date != "" && $scope.temp.category != "" && $scope.temp.payment != "") + { + $scope.enter_expense = false; + $scope.total_expense = $scope.temp.amount + $scope.total_expense; + $scope.total_balance = $scope.total_income - $scope.total_expense; + + $scope.expenses.push($scope.temp); + /*$scope.temp.date = $filter('date')($scope.temp.date, "dd/MM/yyyy"); + console.log("date" + $scope.temp.date); + */ $scope.temp = new Object(); + $scope.temp = { + amount : "", + date : "", + category : "", + payment : "" + }; + } + else + { + $scope.enter_expense = true; + return false; + } + + }; + $scope.show_income = function(){ + $scope.income_table = true; + $scope.expense_table = false; + }; + + + $scope.show_expense = function(){ + $scope.income_table = false; + $scope.expense_table = true; + }; + + + + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/WebContent/final.css b/assignments/Mitali Kadu/Expense Manager/WebContent/final.css new file mode 100644 index 00000000..2b88f68f --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/WebContent/final.css @@ -0,0 +1,88 @@ +.main { + height: 100vh; + width: 1080px; + margin-left: 10%; +} +#upper { + background-color: #00006c; + height: 84px; + min-height : 83px; + width: 100%; +} + +#lower { + height: 100%; + width: 80%; + background-color: #f4f4f4; + position: absolute; +} + +.heading +{ + font-family: sans-serif; + font-weight: 600; + color: white; + text-align: center; + padding-top : 20px; + font-size: 26px; +} +.block_letters +{ + font-size: 26px; + color: #4E4A4A; + background-color : #bcbcbc; + font-weight: 500; + font-family: Expert-Sans-Light, verdana, arial, helvetica, clean, sans-serif; + margin-top : 10px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +#report +{ + border : 1px solid black; + padding : 5px; +} +#report td +{ + border : 1px solid black; + padding : 5px; +} +#report th +{ + border : 1px solid black; + background-color : #bcbcbc; + text-align : center; + padding : 5px; +} + + +.input_tables td +{ +padding-top : .3em; +padding-left : .5em; +padding-bottom : .3em; +} + +.error_msg +{ +color :red; +font-size : 14px; +padding-bottom : 7px; +} + +.tabs +{ +display : inline-block; +height : 45px; +width : 270px; +margin-left : 60px; +padding-top : 10px; +margin-top : 10px; +text-align : center; +color : black; +border-radius : 10px; +background-color: #bcbcbc; +font-size: 17px; +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Expense Manager/WebContent/final.html b/assignments/Mitali Kadu/Expense Manager/WebContent/final.html new file mode 100644 index 00000000..fedd817d --- /dev/null +++ b/assignments/Mitali Kadu/Expense Manager/WebContent/final.html @@ -0,0 +1,209 @@ + + + Expense Manager + + + + + + + + + + + + + + + + + + + + + +
+
+

Expense Manager

+ +
+ +
+

Total income :

+ +

Total expense :

+ +

Total balance :

+ +
+

Add income

+ + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : * +
Income Type : + * +
+ + +
+
+ + + +
+ +

Add expenses

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + +
Category : + * +
Mode of payment : + * +
Date : + * +
+ + + +
+

Income Table

+ + + + + + + + + + + + + +
Income AmountIncome Source
+ {{income.amount}} + + {{income.type}} +
+
+ + + + +
+

Expense Table

+ + + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of Payment
{{expense.date | date: 'yyyy-MM-dd'}}{{expense.amount}}{{expense.category}}{{expense.payment}}
+
+ + +
+
+ + diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.classpath b/assignments/Mitali Kadu/Session 3/Expense Manager/.classpath new file mode 100644 index 00000000..daee9425 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/.name b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/.name new file mode 100644 index 00000000..ce93c1f3 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/.name @@ -0,0 +1 @@ +Expense Manager \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/compiler.xml b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/compiler.xml new file mode 100644 index 00000000..96cc43ef --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/copyright/profiles_settings.xml b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/misc.xml b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/misc.xml new file mode 100644 index 00000000..c3405ca7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/misc.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/modules.xml b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/modules.xml new file mode 100644 index 00000000..99dee4c7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/uiDesigner.xml b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/vcs.xml b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/workspace.xml b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/workspace.xml new file mode 100644 index 00000000..feb2997d --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.idea/workspace.xml @@ -0,0 +1,362 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1453447362433 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.project b/assignments/Mitali Kadu/Session 3/Expense Manager/.project new file mode 100644 index 00000000..fad355a9 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.project @@ -0,0 +1,36 @@ + + + Expense Manager + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/.jsdtscope b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/.jsdtscope new file mode 100644 index 00000000..92e666d7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.jdt.core.prefs b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.common.component b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..9d37b221 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..b3f07fe4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/Expense Manager.iml b/assignments/Mitali Kadu/Session 3/Expense Manager/Expense Manager.iml new file mode 100644 index 00000000..22928023 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/Expense Manager.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/META-INF/MANIFEST.MF b/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/app.js b/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/app.js new file mode 100644 index 00000000..410a04dc --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/app.js @@ -0,0 +1,208 @@ +var myApp = angular.module('myApp',['ngMessages']); + +/*myApp.config(['$routeProvider','$locationProvider',function($routeProvider,$locationProvider){ + + $routeProvider. + when('/final', { + templateUrl : 'home.html', + controller : 'mainController' + }) + .when('/report', { + templateUrl : 'report.html', + controller : 'reportController' + }) + + .otherwise({ + redirectTo: '/final' + }); + + +}]); + +*/ +/*myApp.service('incomeService',function(){ + + $scope.expense = 0; + $scope.payment = ""; + + $scope.payments = []; + + +this.incomes = [ + ]; + + + this.expenses = [ + ]; + + + + + +}); +*/ + +myApp.controller('mainController', function($scope){ +$scope.submitted = false; + $scope.edit_income = ""; + $scope.edit_expense = ""; + $scope.income_table = false; + $scope.expense_table = false; + $scope.enter_income = false; + $scope.enter_expense = false; + $scope.total_income = 0; + $scope.total_expense = 0; + $scope.total_balance = 0; + + + $scope.incomes = [ + ]; + + + $scope.expenses = [ + ]; + + + $scope.temp = new Object(); + $scope.temp = { + amount : "", + date : "", + category : "", + payment : "" + }; + + + + $scope.temp_2 = new Object(); + $scope.temp_2 = { + amount : "", + type : "" + }; + $scope.calculate_balance = function() + { + } + + $scope.add_income = function() + { + if($scope.temp_2.amount != "" && $scope.temp_2.type != "") + { + $scope.enter_income = false; + $scope.total_income = $scope.temp_2.amount + $scope.total_income; + $scope.total_balance = $scope.total_income - $scope.total_expense; + if($scope.edit_income === "") + { + $scope.incomes.push($scope.temp_2); + + } + else + { + + $scope.total_income = $scope.total_income - $scope.incomes[$scope.edit_income].amount; + + $scope.total_balance = $scope.total_income - $scope.total_expense; + $scope.incomes[$scope.edit_income] = $scope.temp_2; + + } + $scope.temp_2 = new Object(); + $scope.temp_2 = { + amount : "", + type : "" + }; + } + else + { + $scope.enter_income = true; + return false; + } + + $scope.edit_income=""; + + }; + $scope.add_expense = function() + { + + if($scope.temp.amount != "" && $scope.temp.date != "" && $scope.temp.category != "" && $scope.temp.payment != "") + { + $scope.enter_expense = false; + $scope.total_expense = $scope.temp.amount + $scope.total_expense; + $scope.total_balance = $scope.total_income - $scope.total_expense; + if($scope.edit_expense === "") + { + $scope.expenses.push($scope.temp); + + } + else + { + $scope.total_expense = $scope.total_expense - $scope.expenses[$scope.edit_expense].amount; + + $scope.total_balance = $scope.total_income - $scope.total_expense; + + $scope.expenses[$scope.edit_expense]=$scope.temp; + + } + /*$scope.temp.date = $filter('date')($scope.temp.date, "dd/MM/yyyy"); + console.log("date" + $scope.temp.date); + */ $scope.temp = new Object(); + $scope.temp = { + amount : "", + date : "", + category : "", + payment : "" + }; + } + else + { + $scope.enter_expense = true; + return false; + } + + $scope.edit_expense = ""; + + }; + $scope.show_income = function(){ + $scope.income_table = true; + $scope.expense_table = false; + }; + + + $scope.show_expense = function(){ + $scope.income_table = false; + $scope.expense_table = true; + }; + + + $scope.edit_income_form = function (index){ + + $scope.edit_income = index; + $scope.temp_2.amount = $scope.incomes[index].amount; + $scope.temp_2.type = $scope.incomes[index].type; + }; + + $scope.edit_expense_form = function (index){ + + $scope.edit_expense = index; + $scope.temp.amount = $scope.expenses[index].amount; + $scope.temp.category = $scope.expenses[index].category; + $scope.temp.date = $scope.expenses[index].date; + $scope.temp.payment = $scope.expenses[index].payment; + }; + + + $scope.delete_income_form = function(index){ + $scope.total_income = $scope.total_income - $scope.incomes[index].amount; + + $scope.incomes.splice(index,1); + + $scope.total_balance = $scope.total_income - $scope.total_expense; + + }; + + $scope.delete_expense_form = function(index){ + $scope.total_expense = $scope.total_expense - $scope.expenses[index].amount; + + $scope.expenses.splice(index,1); + + $scope.total_balance = $scope.total_income - $scope.total_expense; + + }; +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/final.css b/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/final.css new file mode 100644 index 00000000..48ebbb95 --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/final.css @@ -0,0 +1,91 @@ +.main { + height: 100vh; + width: 1080px; + margin-left: 10%; +} +#upper { + background-color: #00006c; + height: 84px; + min-height : 83px; + width: 100%; +} + +#lower { + height: 100%; + width: 80%; + background-color: #f4f4f4; + position: absolute; +} + +.heading +{ + font-family: sans-serif; + font-weight: 600; + color: white; + text-align: center; + padding-top : 20px; + font-size: 26px; +} +.block_letters +{ + font-size: 26px; + color: #4E4A4A; + background-color : #bcbcbc; + font-weight: 500; + font-family: Expert-Sans-Light, verdana, arial, helvetica, clean, sans-serif; + margin-top : 10px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +#report +{ + border : 1px solid black; + padding : 5px; +} +#report td +{ + border : 1px solid black; + padding : 5px; +} +#report th +{ + border : 1px solid black; + background-color : #bcbcbc; + text-align : center; + padding : 5px; +} + +a{ +display : inline-block; +} + +.input_tables td +{ +padding-top : .3em; +padding-left : .5em; +padding-bottom : .3em; +} + +.error_msg +{ +color :red; +font-size : 14px; +padding-bottom : 7px; +} + +.tabs +{ +display : inline-block; +height : 45px; +width : 270px; +margin-left : 60px; +padding-top : 10px; +margin-top : 10px; +text-align : center; +color : black; +border-radius : 10px; +background-color: #bcbcbc; +font-size: 17px; +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/final.html b/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/final.html new file mode 100644 index 00000000..72e7f49b --- /dev/null +++ b/assignments/Mitali Kadu/Session 3/Expense Manager/WebContent/final.html @@ -0,0 +1,227 @@ + + + Expense Manager + + + + + + + + + + + + + + + + + + + + + + +
+
+

Expense Manager

+ +
+ +
+

Total income :

+ +

Total expense :

+ +

Total balance :

+ +
+

Add income

+ + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + + +
Income Type : + * +
+ + +
+
+ + + +
+ +

Add expenses

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + + + +
Category : + * +
Mode of payment : + * +
Date : + * +
+
+ + + +
+

Income Table

+ + + + + + + + + + + + + + + + + +
Income AmountIncome SourceEditDelete
+ {{income.amount}} + + {{income.type}} +
+
+ + + + +
+

Expense Table

+ + + + + + + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDelete
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}
+
+ + +
+
+ + diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.classpath b/assignments/Mitali Kadu/Session 4/Expense Manager/.classpath new file mode 100644 index 00000000..daee9425 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/.name b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/.name new file mode 100644 index 00000000..ce93c1f3 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/.name @@ -0,0 +1 @@ +Expense Manager \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/compiler.xml b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/compiler.xml new file mode 100644 index 00000000..96cc43ef --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/copyright/profiles_settings.xml b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/misc.xml b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/misc.xml new file mode 100644 index 00000000..6ec7ab0e --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/misc.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/modules.xml b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/modules.xml new file mode 100644 index 00000000..99dee4c7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/uiDesigner.xml b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/vcs.xml b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/workspace.xml b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/workspace.xml new file mode 100644 index 00000000..ccce9d58 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.idea/workspace.xml @@ -0,0 +1,372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1453447362433 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.project b/assignments/Mitali Kadu/Session 4/Expense Manager/.project new file mode 100644 index 00000000..fad355a9 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.project @@ -0,0 +1,36 @@ + + + Expense Manager + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/.jsdtscope b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/.jsdtscope new file mode 100644 index 00000000..92e666d7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.jdt.core.prefs b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.common.component b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..9d37b221 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..b3f07fe4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/Expense Manager.iml b/assignments/Mitali Kadu/Session 4/Expense Manager/Expense Manager.iml new file mode 100644 index 00000000..22928023 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/Expense Manager.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/META-INF/MANIFEST.MF b/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/app.js b/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/app.js new file mode 100644 index 00000000..e0687abd --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/app.js @@ -0,0 +1,270 @@ +var myApp = angular.module('myApp',['ngMessages']); + +/*myApp.config(['$routeProvider','$locationProvider',function($routeProvider,$locationProvider){ + + $routeProvider. + when('/final', { + templateUrl : 'home.html', + controller : 'mainController' + }) + .when('/report', { + templateUrl : 'report.html', + controller : 'reportController' + }) + + .otherwise({ + redirectTo: '/final' + }); + + +}]); + +*/ +myApp.service('incomeService',function(){ + this.total_income = 0; + this.total_expense = 0; + this.total_balance = 0; + this.edit_income = ""; + this.edit_expense = ""; + + this.income_table = false; + this.expense_table = false; + this.enter_income = false; + this.enter_expense = false; + this.edit_income = ""; + this.incomes = [ + ]; + + + this.expenses = [ + ]; + + + this.temp = new Object(); + this.temp = { + amount : "", + date : "", + category : "", + payment : "", + notes : "" + }; + + + + this.temp_2 = new Object(); + this.temp_2 = { + amount : "", + type : "" + }; + + + + + this.add_income = function() + { + if(this.temp_2.amount != "" && this.temp_2.type != "") + { + this.enter_income = false; + this.total_income = this.temp_2.amount + this.total_income; + this.total_balance = this.total_income - this.total_expense; + if(this.edit_income === "") + { + this.incomes.push(this.temp_2); + + } + else + { + + this.total_income = this.total_income - this.incomes[this.edit_income].amount; + + this.total_balance = this.total_income - this.total_expense; + this.incomes[this.edit_income] = this.temp_2; + + } + this.temp_2 = new Object(); + this.temp_2 = { + amount : "", + type : "" + }; + } + else + { + this.enter_income = true; + return false; + } + + this.edit_income=""; + + }; + + this.add_expense = function(){ + + if(this.temp.amount != "" && this.temp.date != "" && this.temp.category != "" && this.temp.payment != "") + { + this.enter_expense = false; + this.total_expense = this.temp.amount + this.total_expense; + this.total_balance = this.total_income - this.total_expense; + if(this.edit_expense === "") + { + this.expenses.push(this.temp); + + } + else + { + this.total_expense = this.total_expense - this.expenses[this.edit_expense].amount; + + this.total_balance = this.total_income - this.total_expense; + + this.expenses[this.edit_expense]=this.temp; + + } + /*$scope.temp.date = $filter('date')($scope.temp.date, "dd/MM/yyyy"); + console.log("date" + $scope.temp.date); + */ this.temp = new Object(); + this.temp = { + amount : "", + date : "", + category : "", + payment : "", + notes : "" + }; + } + else + { + this.enter_expense = true; + return false; + } + + this.edit_expense = ""; + + }; + + +}); + + +myApp.controller('mainController', function($scope,incomeService){ + $scope.edit_income = ""; + $scope.edit_expense = ""; + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + + $scope.temp_2 = new Object(); + $scope.temp_2 = { + amount : "", + type : "" + }; + $scope.temp = new Object(); + $scope.temp = { + amount : "", + date : "", + category : "", + payment : "", + notes : "" + }; + + + + + $scope.incomes = incomeService.incomes; + + + $scope.expenses = incomeService.expenses; + + $scope.temp = incomeService.temp; +/* + $scope.temp = { + amount : "", + date : "", + category : "", + payment : "" + }; + +*/ + + $scope.add_income = function() + { + incomeService.temp_2 = $scope.temp_2; + incomeService.add_income(); + $scope.temp_2 = { + amount : "", + type : "" + }; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + + $scope.add_expense = function() + { + incomeService.temp = $scope.temp; + incomeService.add_expense(); + $scope.temp = { + amount : "", + date : "", + category : "", + payment : "", + notes : "" + }; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + $scope.show_income = function(){ + $scope.income_table = true; + $scope.expense_table = false; + }; + + + $scope.show_expense = function(){ + $scope.income_table = false; + $scope.expense_table = true; + }; + + + $scope.edit_income_form = function (index){ + + $scope.edit_income = index; + incomeService.edit_income = index; + $scope.temp_2.amount = incomeService.incomes[index].amount; + $scope.temp_2.type = incomeService.incomes[index].type; + }; + + $scope.edit_expense_form = function (index){ + + $scope.edit_expense = index; + incomeService.edit_expense = index; + $scope.temp.amount = incomeService.expenses[index].amount; + $scope.temp.category = incomeService.expenses[index].category; + $scope.temp.date = incomeService.expenses[index].date; + $scope.temp.payment = incomeService.expenses[index].payment; + $scope.temp.notes = incomeService.expenses[index].notes; + }; + + + $scope.delete_income_form = function(index){ + $scope.total_income = $scope.total_income - $scope.incomes[index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice(index,1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }; + + $scope.delete_expense_form = function(index){ + $scope.total_expense = $scope.total_expense - $scope.expenses[index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice(index,1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + }; +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/final.css b/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/final.css new file mode 100644 index 00000000..48ebbb95 --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/final.css @@ -0,0 +1,91 @@ +.main { + height: 100vh; + width: 1080px; + margin-left: 10%; +} +#upper { + background-color: #00006c; + height: 84px; + min-height : 83px; + width: 100%; +} + +#lower { + height: 100%; + width: 80%; + background-color: #f4f4f4; + position: absolute; +} + +.heading +{ + font-family: sans-serif; + font-weight: 600; + color: white; + text-align: center; + padding-top : 20px; + font-size: 26px; +} +.block_letters +{ + font-size: 26px; + color: #4E4A4A; + background-color : #bcbcbc; + font-weight: 500; + font-family: Expert-Sans-Light, verdana, arial, helvetica, clean, sans-serif; + margin-top : 10px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +#report +{ + border : 1px solid black; + padding : 5px; +} +#report td +{ + border : 1px solid black; + padding : 5px; +} +#report th +{ + border : 1px solid black; + background-color : #bcbcbc; + text-align : center; + padding : 5px; +} + +a{ +display : inline-block; +} + +.input_tables td +{ +padding-top : .3em; +padding-left : .5em; +padding-bottom : .3em; +} + +.error_msg +{ +color :red; +font-size : 14px; +padding-bottom : 7px; +} + +.tabs +{ +display : inline-block; +height : 45px; +width : 270px; +margin-left : 60px; +padding-top : 10px; +margin-top : 10px; +text-align : center; +color : black; +border-radius : 10px; +background-color: #bcbcbc; +font-size: 17px; +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/final.html b/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/final.html new file mode 100644 index 00000000..646376db --- /dev/null +++ b/assignments/Mitali Kadu/Session 4/Expense Manager/WebContent/final.html @@ -0,0 +1,235 @@ + + + Expense Manager + + + + + + + + + + + + + + + + + + + + + + +
+
+

Expense Manager

+ +
+ +
+

Total income :

+ +

Total expense :

+ +

Total balance :

+ +
+

Add income

+ + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + + +
Income Type : + * +
+ + +
+
+ + + +
+ +

Add expenses

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + + + +
Category : + * +
Mode of payment : + * +
Date : + * +
Notes : +
+
+ + + +
+

Income Table

+ + + + + + + + + + + + + + + + + +
Income AmountIncome SourceEditDelete
+ {{income.amount}} + + {{income.type}} +
+
+ + + + +
+

Expense Table

+ + + + + + + + + + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
+ + +
+
+ + diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.classpath b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.classpath new file mode 100644 index 00000000..daee9425 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/.name b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/.name new file mode 100644 index 00000000..ce93c1f3 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/.name @@ -0,0 +1 @@ +Expense Manager \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/compiler.xml b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/compiler.xml new file mode 100644 index 00000000..96cc43ef --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/copyright/profiles_settings.xml b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/misc.xml b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/misc.xml new file mode 100644 index 00000000..6ec7ab0e --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/misc.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/modules.xml b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/modules.xml new file mode 100644 index 00000000..99dee4c7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/uiDesigner.xml b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/vcs.xml b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/workspace.xml b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/workspace.xml new file mode 100644 index 00000000..4b98faf7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.idea/workspace.xml @@ -0,0 +1,641 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1453447362433 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.project b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.project new file mode 100644 index 00000000..fad355a9 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.project @@ -0,0 +1,36 @@ + + + Expense Manager + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/.jsdtscope b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/.jsdtscope new file mode 100644 index 00000000..92e666d7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.jdt.core.prefs b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.common.component b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..9d37b221 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..b3f07fe4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/Expense Manager.iml b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/Expense Manager.iml new file mode 100644 index 00000000..22928023 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/Expense Manager.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/META-INF/MANIFEST.MF b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/app.js b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/app.js new file mode 100644 index 00000000..c7468508 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/app.js @@ -0,0 +1,214 @@ +var myApp = angular.module('myApp', ['ngRoute', 'ngMessages', 'report', 'income', 'expense']); + +myApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { + + $routeProvider + .when('/final', { + templateUrl: 'home.html', + }) + + .when('/income', { + templateUrl: 'income.html', + controller: 'incomeController' + }) + .when('/expense', { + templateUrl: 'expense.html', + controller: 'expenseController' + }) + + .when('/report', { + templateUrl: 'report.html', + controller: 'reportController' + }) + .otherwise({ + redirectTo: '/final' + }); + + +}]); + + + + +myApp.service('incomeService', function($http) { + this.total_income = 0; + this.total_expense = 0; + this.total_balance = 0; + this.edit_income = ""; + this.edit_expense = ""; + + this.income_table = false; + this.expense_table = false; + this.enter_income = false; + this.enter_expense = false; + this.edit_income = ""; + this.incomes = []; + + + this.expenses = []; + + + this.temp = new Object(); + this.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + + + this.temp_2 = new Object(); + this.temp_2 = { + amount: "", + type: "" + }; + + + + + this.add_income = function() { + + if (this.temp_2.amount != "" && this.temp_2.type != "") { + this.enter_income = false; + this.total_income = this.temp_2.amount + this.total_income; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_income === "") { + this.incomes.push(this.temp_2); + + + } else { + + this.total_income = this.total_income - this.incomes[this.edit_income].amount; + + this.total_balance = this.total_income - this.total_expense; + this.incomes[this.edit_income] = this.temp_2; + + } + this.temp_2 = new Object(); + this.temp_2 = { + amount: "", + type: "" + }; + } else { + this.enter_income = true; + return false; + } + + this.edit_income = ""; + + }; + + this.add_expense = function() { + + if (this.temp.amount != "" && this.temp.date != "" && this.temp.category != "" && this.temp.payment != "") { + this.enter_expense = false; + this.total_expense = this.temp.amount + this.total_expense; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_expense === "") { + this.expenses.push(this.temp); + + } else { + this.total_expense = this.total_expense - this.expenses[this.edit_expense].amount; + + this.total_balance = this.total_income - this.total_expense; + + this.expenses[this.edit_expense] = this.temp; + + } + this.temp = new Object(); + this.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + } else { + this.enter_expense = true; + return false; + } + + this.edit_expense = ""; + + }; + + +}); + +myApp.factory('myService', function($http) { + return { + + getIncome: function() { + return $http.get("http://demo3547198.mockable.io/income"); + } + + }; +}); + +myApp.factory('expenseService', function($http) { + return { + + getExpense: function() { + return $http.get("http://demo3547198.mockable.io/expense"); + } + + }; +}); + + +myApp.controller('mainController', function($scope, incomeService, $http, myService, expenseService) { + + $scope.mainInfo = ""; + $scope.edit_expense = ""; + $scope.total_income = incomeService.total_income; + console.log("from main : " + incomeService.total_income); + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + myService.getIncome().then(function(response) { + incomeService.incomes = response.data; + $scope.incomes = incomeService.incomes; + console.log($scope.incomes[1].amount); + for (i = 0; i < $scope.incomes.length; i++) { + $scope.total_income = $scope.incomes[i].amount + $scope.total_income; + } + incomeService.total_income = $scope.total_income; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + expenseService.getExpense().then(function(response) { + incomeService.expenses = response.data; + + for (i = 0; i < response.data.length; i++) { + + $scope.created_time = new Date(incomeService.expenses[i].date); + incomeService.expenses[i].date = $scope.created_time; + } + + $scope.expenses = incomeService.expenses; + + for (i = 0; i < $scope.expenses.length; i++) { + + $scope.total_expense = $scope.expenses[i].amount + $scope.total_expense; + console.log($scope.total_expense); + + } + incomeService.total_expense = $scope.total_expense; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + + }); + + + }); + + + + + + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/data.json b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/data.json new file mode 100644 index 00000000..2d4113d8 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/data.json @@ -0,0 +1,4 @@ +{ + + "type" : "salary" +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/expense.html b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/expense.html new file mode 100644 index 00000000..ef27ff15 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/expense.html @@ -0,0 +1,87 @@ + +

Total income :

+

Total expense :

+

Total balance :

+

Add expenses

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Category : + + * +
Mode of payment : + + * +
Date : + * +
Notes : +
+
+
+

Expense Table

+ + + + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/expense.js b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/expense.js new file mode 100644 index 00000000..c81114a0 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/expense.js @@ -0,0 +1,133 @@ +var expense = angular.module('expense', ['ngRoute']); + +expense.controller('expenseController', function($scope, expenseService, incomeService, $http) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.temp = new Object(); + $scope.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + + + + $scope.expenses = incomeService.expenses; + + $scope.temp = incomeService.temp; + $scope.show_expense = function() { + $scope.expense_table = true; + }; + + $scope.add_expense = function() { + incomeService.temp = $scope.temp; + console.log("**" + incomeService.temp.date + "**"); + incomeService.add_expense(); + if ($scope.edit_expense === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/expense', + data: $scope.temp + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses.push($scope.message); + incomeService.total_expense = incomeService.total_expense + $scope.message.amount; + $scope.total_expense = incomeService.total_expense; + incomeService.total_balance = incomeService.total_balance - $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + $scope.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.edit_expense_form = function(index) { + + $scope.edit_expense = index; + incomeService.edit_expense = index; + $scope.temp.amount = incomeService.expenses[index].amount; + $scope.temp.category = incomeService.expenses[index].category; + $scope.temp.date = incomeService.expenses[index].date; + $scope.temp.payment = incomeService.expenses[index].payment; + $scope.temp.notes = incomeService.expenses[index].notes; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + + + + + incomeService.total_expense = incomeService.total_expense + $scope.message.amount - incomeService.expenses[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.expenses[0].amount; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses[0] = $scope.message; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + $scope.expenses = incomeService.expenses; + + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + + + $scope.delete_expense_form = function(index) { + + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_expense = $scope.total_expense - $scope.expenses[$scope.message.index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice($scope.message.index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + + $scope.total_expense = $scope.total_expense - $scope.expenses[index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice(index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/final.css b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/final.css new file mode 100644 index 00000000..cc69104d --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/final.css @@ -0,0 +1,95 @@ +.main { + height: 100vh; + width: 1080px; + margin-left: 10%; +} +#upper { + background-color: #00006c; + height: 84px; + min-height: 83px; + width: 100%; +} +#lower { + height: 90%; + width: 80%; + background-color: #f4f4f4; + position: absolute; +} +.heading { + font-family: sans-serif; + font-weight: 600; + color: white; + text-align: center; + padding-top: 20px; + font-size: 26px; +} +.block_letters { + font-size: 26px; + color: #4E4A4A; + background-color: #bcbcbc; + font-weight: 500; + font-family: Expert-Sans-Light, verdana, arial, helvetica, clean, sans-serif; + margin-top: 10px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} +#report { + border: 1px solid black; + padding: 5px; +} +#report td { + border: 1px solid black; + padding: 5px; +} +#report th { + border: 1px solid black; + background-color: #bcbcbc; + text-align: center; + padding: 5px; +} +a { + display: inline-block; +} +.input_tables td { + padding-top: .3em; + padding-left: .5em; + padding-bottom: .3em; +} +.error_msg { + color: red; + font-size: 14px; + padding-bottom: 7px; +} +.navigation { + height: 40px; + width: 160px; + color: #e1e0e0; + background-color: #00006c; +} +.navigation:hover { + background-color: #e1e0e0; + color: #00006c; + /* transition: box-shadow 0.3s; */ +} +#panel { + height: 10%; + width: 100%; + text-align: center; + color: black; + background-color: #00006c; + font-size: 17px; +} +.tabs { + display: inline-block; + height: 45px; + width: 270px; + margin-left: 60px; + padding-top: 10px; + margin-top: 10px; + text-align: center; + color: black; + border-radius: 10px; + background-color: #bcbcbc; + font-size: 17px; +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/final.html b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/final.html new file mode 100644 index 00000000..2a7b9b49 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/final.html @@ -0,0 +1,48 @@ + + + Expense Manager + + + + + + + + + + + + + + + + + + +
+
+

Expense Manager

+
+
+
+ + + +
+
+
+ + +
+
+ + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/home.html b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/home.html new file mode 100644 index 00000000..ee7baa2c --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/home.html @@ -0,0 +1,6 @@ + +

Total income :

+ +

Total expense :

+ +

Total balance :

diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/income.html b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/income.html new file mode 100644 index 00000000..402f99b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/income.html @@ -0,0 +1,61 @@ +

Total income :

+

Total expense :

+

Total balance :

+
+

Add income

+ + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Income Type : + + * +
+ +
+
+
+

Income Table

+ + + + + + + + + + + + + + +
Income AmountIncome SourceEditDelete
+ {{income.amount}} + + {{income.type}} +
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/income.js b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/income.js new file mode 100644 index 00000000..4cc15d7e --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/income.js @@ -0,0 +1,115 @@ +var income = angular.module('income', ['ngRoute', 'myApp']); + + +income.controller('incomeController', function($scope, incomeService, $http, myService) { + $scope.edit_income = ""; + $scope.temp_2 = { + amount: "", + type: "" + }; + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + + $scope.incomes = incomeService.incomes; + + $scope.add_income = function() { + incomeService.temp_2 = $scope.temp_2; + + if ($scope.edit_income === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/income', + data: $scope.temp_2 + }).then(function successCallback(response) { + + $scope.message = response.data; + incomeService.incomes.push($scope.message); + incomeService.total_income = incomeService.total_income + $scope.message.amount; + $scope.total_income = incomeService.total_income; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + incomeService.add_income(); + $scope.temp_2 = { + amount: "", + type: "" + }; + + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.show_income = function() { + $scope.income_table = true; + }; + + + + $scope.edit_income_form = function(index) { + + $scope.edit_income = index; + incomeService.edit_income = index; + $scope.temp_2.amount = incomeService.incomes[index].amount; + $scope.temp_2.type = incomeService.incomes[index].type; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + + incomeService.total_income = incomeService.total_income + $scope.message.amount - incomeService.incomes[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.incomes[0].amount; + + incomeService.incomes[0] = $scope.message; + $scope.total_income = incomeService.total_income; + $scope.total_balance = incomeService.total_balance; + $scope.incomes = incomeService.incomes; + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + $scope.delete_income_form = function(index) { + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_income = $scope.total_income - $scope.incomes[$scope.message.index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice($scope.message.index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + $scope.total_income = $scope.total_income - $scope.incomes[index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice(index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/report.html b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/report.html new file mode 100644 index 00000000..d74df2cd --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/report.html @@ -0,0 +1,68 @@ +

Income Summary

+ + + + + + + + + + + + + + + + + +
Income AmountIncome Source
+ {{total_Salary}} + Salary
+ {{total_Business}} + Business
+ {{total_interest}} + Interest
+

Expense Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AmountCategory
+ {{Rent}} + Rent
+ {{Travel}} + Travel
+ {{Office}} + Office
+ {{Party}} + Party
+ {{Shopping}} + Shopping
+ {{Study}} + Study
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/report.js b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/report.js new file mode 100644 index 00000000..2ffe6ec1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6 (Completed)/Expense Manager/WebContent/report.js @@ -0,0 +1,54 @@ +var report = angular.module('report', ['ngRoute', 'myApp']); + +report.controller('reportController', function($scope, incomeService) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.total_Salary = 0; + $scope.total_Business = 0; + $scope.total_interest = 0; + $scope.Rent = 0; + $scope.Travel = 0; + $scope.Shopping = 0; + $scope.Study = 0; + $scope.Party = 0; + $scope.Office = 0; + $scope.incomes = incomeService.incomes; + $scope.expenses = incomeService.expenses; + for (i = 0; i < $scope.incomes.length; i++) { + $scope.incomes[i].amount = parseInt($scope.incomes[i].amount); + if ($scope.incomes[i].type == "Salary") { + console.log("here"); + $scope.total_Salary = $scope.total_Salary + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "Business") { + $scope.total_Business = $scope.total_Business + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "interest") { + $scope.total_interest = $scope.total_interest + $scope.incomes[i].amount; + } + } + console.log(typeof($scope.incomes[0].amount)); + + + + for (i = 0; i < $scope.expenses.length; i++) { + $scope.expenses[i].amount = parseInt($scope.expenses[i].amount); + if ($scope.expenses[i].category == "Rent") { + console.log("here"); + $scope.Rent = $scope.Rent + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Travel") { + $scope.Travel = $scope.Travel + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Office") { + $scope.Office = $scope.Office + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Shopping") { + $scope.Shopping = $scope.Shopping + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Study") { + $scope.Study = $scope.Study + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Party") { + $scope.Party = $scope.Party + $scope.expenses[i].amount; + } + + + } + + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.classpath b/assignments/Mitali Kadu/Session 6/Expense Manager/.classpath new file mode 100644 index 00000000..daee9425 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/.name b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/.name new file mode 100644 index 00000000..ce93c1f3 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/.name @@ -0,0 +1 @@ +Expense Manager \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/compiler.xml b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/compiler.xml new file mode 100644 index 00000000..96cc43ef --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/copyright/profiles_settings.xml b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/misc.xml b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/misc.xml new file mode 100644 index 00000000..6ec7ab0e --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/misc.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/modules.xml b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/modules.xml new file mode 100644 index 00000000..99dee4c7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/uiDesigner.xml b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/vcs.xml b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/workspace.xml b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/workspace.xml new file mode 100644 index 00000000..5ad1917f --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.idea/workspace.xml @@ -0,0 +1,641 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1453447362433 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.project b/assignments/Mitali Kadu/Session 6/Expense Manager/.project new file mode 100644 index 00000000..fad355a9 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.project @@ -0,0 +1,36 @@ + + + Expense Manager + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/.jsdtscope b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/.jsdtscope new file mode 100644 index 00000000..92e666d7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.jdt.core.prefs b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.common.component b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..9d37b221 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..b3f07fe4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/Expense Manager.iml b/assignments/Mitali Kadu/Session 6/Expense Manager/Expense Manager.iml new file mode 100644 index 00000000..22928023 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/Expense Manager.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/META-INF/MANIFEST.MF b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/app.js b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/app.js new file mode 100644 index 00000000..ed3aeaee --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/app.js @@ -0,0 +1,241 @@ +var myApp = angular.module('myApp',['ngRoute','ngMessages','report','income','expense']); + +myApp.config(['$routeProvider','$locationProvider',function($routeProvider,$locationProvider){ + + $routeProvider + .when('/final', { + templateUrl : 'home.html', + }) + + .when('/income', { + templateUrl : 'income.html', + controller : 'incomeController' + }) + .when('/expense', { + templateUrl : 'expense.html', + controller : 'expenseController' + }) + + .when('/report', { + templateUrl : 'report.html', + controller : 'reportController' + }) + .otherwise({ + redirectTo: '/final' + }); + + +}]); + + + + +myApp.service('incomeService',function($http){ + this.total_income = 0; + this.total_expense = 0; + this.total_balance = 0; + this.edit_income = ""; + this.edit_expense = ""; + + this.income_table = false; + this.expense_table = false; + this.enter_income = false; + this.enter_expense = false; + this.edit_income = ""; + this.incomes = [ + ]; + + + this.expenses = [ + ]; + + + this.temp = new Object(); + this.temp = { + amount : "", + date : "", + category : "", + payment : "", + notes : "" + }; + + + + this.temp_2 = new Object(); + this.temp_2 = { + amount : "", + type : "" + }; + + + + + this.add_income = function() + { + + if(this.temp_2.amount != "" && this.temp_2.type != "") + { + this.enter_income = false; + this.total_income = this.temp_2.amount + this.total_income; + this.total_balance = this.total_income - this.total_expense; + if(this.edit_income === "") + { + this.incomes.push(this.temp_2); + var res = $http.post('http://demo3547198.mockable.io/income', this.temp_2); + res.success(function(data, status, headers, config) { + this.message = data; + }); + res.error(function(data, status, headers, config) { + alert( "failure message: " + JSON.stringify({data: data})); + }); + + + } + else + { + + this.total_income = this.total_income - this.incomes[this.edit_income].amount; + + this.total_balance = this.total_income - this.total_expense; + this.incomes[this.edit_income] = this.temp_2; + + } + this.temp_2 = new Object(); + this.temp_2 = { + amount : "", + type : "" + }; + } + else + { + this.enter_income = true; + return false; + } + + this.edit_income=""; + + }; + + this.add_expense = function(){ + + if(this.temp.amount != "" && this.temp.date != "" && this.temp.category != "" && this.temp.payment != "") + { + this.enter_expense = false; + this.total_expense = this.temp.amount + this.total_expense; + this.total_balance = this.total_income - this.total_expense; + if(this.edit_expense === "") + { + this.expenses.push(this.temp); + + } + else + { + this.total_expense = this.total_expense - this.expenses[this.edit_expense].amount; + + this.total_balance = this.total_income - this.total_expense; + + this.expenses[this.edit_expense]=this.temp; + + } + /*$scope.temp.date = $filter('date')($scope.temp.date, "dd/MM/yyyy"); + console.log("date" + $scope.temp.date); + */ this.temp = new Object(); + this.temp = { + amount : "", + date : "", + category : "", + payment : "", + notes : "" + }; + } + else + { + this.enter_expense = true; + return false; + } + + this.edit_expense = ""; + + }; + + +}); + +myApp.factory('myService', function ($http) { + return { + + getIncome: function () { + return $http.get("http://demo3547198.mockable.io/income"); + } + + }; + }); + +myApp.factory('expenseService', function ($http) { + return { + + getExpense: function () { + return $http.get("http://demo3547198.mockable.io/expense"); + } + + }; + }); + + +myApp.controller('mainController', function($scope,incomeService,$http,myService,expenseService){ + + $scope.mainInfo= ""; + $scope.edit_expense = ""; + $scope.total_income = incomeService.total_income; + console.log("from main : " + incomeService.total_income); + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + myService.getIncome().then(function(response){ +incomeService.incomes = response.data; + $scope.incomes = incomeService.incomes; + console.log($scope.incomes[1].amount); + for(i=0;i<$scope.incomes.length;i++) + { + $scope.total_income = $scope.incomes[i].amount + $scope.total_income; + } + incomeService.total_income = $scope.total_income; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + expenseService.getExpense().then(function(response){ + incomeService.expenses = response.data; + + for(i=0;i +

Total income :

+ +

Total expense :

+ +

Total balance :

+ + + +

Add expenses

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + + + +
Category : + * +
Mode of payment : + * +
Date : + * +
Notes : +
+
+ + +
+

Expense Table

+ + + + + + + + + + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/expense.js b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/expense.js new file mode 100644 index 00000000..9db7a6d1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/expense.js @@ -0,0 +1,72 @@ +var expense = angular.module('expense',['ngRoute']); + +expense.controller('expenseController',function($scope,expenseService,incomeService){ + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.temp = new Object(); + $scope.temp = { + amount : "", + date : "", + category : "", + payment : "", + notes : "" + }; + + + + + $scope.expenses = incomeService.expenses; + + $scope.temp = incomeService.temp; + $scope.show_expense = function(){ + $scope.expense_table = true; + }; + + $scope.add_expense = function() + { + incomeService.temp = $scope.temp; + console.log("**" + incomeService.temp.date + "**"); + incomeService.add_expense(); + $scope.temp = { + amount : "", + date : "", + category : "", + payment : "", + notes : "" + }; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.edit_expense_form = function (index){ + + $scope.edit_expense = index; + incomeService.edit_expense = index; + $scope.temp.amount = incomeService.expenses[index].amount; + $scope.temp.category = incomeService.expenses[index].category; + $scope.temp.date = incomeService.expenses[index].date; + $scope.temp.payment = incomeService.expenses[index].payment; + $scope.temp.notes = incomeService.expenses[index].notes; + }; + + + + $scope.delete_expense_form = function(index){ + $scope.total_expense = $scope.total_expense - $scope.expenses[index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice(index,1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/final.css b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/final.css new file mode 100644 index 00000000..0db3f875 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/final.css @@ -0,0 +1,106 @@ +.main { + height: 100vh; + width: 1080px; + margin-left: 10%; +} +#upper { + background-color: #00006c; + height: 84px; + min-height : 83px; + width: 100%; +} + +#lower { + height: 90%; + width: 80%; + background-color: #f4f4f4; + position: absolute; + +} + +.heading +{ + font-family: sans-serif; + font-weight: 600; + color: white; + text-align: center; + padding-top : 20px; + font-size: 26px; +} +.block_letters +{ + font-size: 26px; + color: #4E4A4A; + background-color : #bcbcbc; + font-weight: 500; + font-family: Expert-Sans-Light, verdana, arial, helvetica, clean, sans-serif; + margin-top : 10px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +#report +{ + border : 1px solid black; + padding : 5px; +} +#report td +{ + border : 1px solid black; + padding : 5px; +} +#report th +{ + border : 1px solid black; + background-color : #bcbcbc; + text-align : center; + padding : 5px; +} + +a{ +display : inline-block; +} + +.input_tables td +{ +padding-top : .3em; +padding-left : .5em; +padding-bottom : .3em; +} + +.error_msg +{ +color :red; +font-size : 14px; +padding-bottom : 7px; +} + +.panel +{ +height : 45px; +width : 270px; +margin-left : 60px; +padding-top : 10px; +margin-top : 10px; +text-align : center; +color : black; +border-radius : 10px; +background-color: #bcbcbc; +font-size: 17px; +} + +.tabs +{ +display : inline-block; +height : 45px; +width : 270px; +margin-left : 60px; +padding-top : 10px; +margin-top : 10px; +text-align : center; +color : black; +border-radius : 10px; +background-color: #bcbcbc; +font-size: 17px; +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/final.html b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/final.html new file mode 100644 index 00000000..0ee01c99 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/final.html @@ -0,0 +1,68 @@ + + + Expense Manager + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Expense Manager

+ +
+
+
+ + + + +
+
+ + +
+ + + + + + + +
+
+ + diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/home.html b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/home.html new file mode 100644 index 00000000..ee7baa2c --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/home.html @@ -0,0 +1,6 @@ + +

Total income :

+ +

Total expense :

+ +

Total balance :

diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/income.html b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/income.html new file mode 100644 index 00000000..4661642f --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/income.html @@ -0,0 +1,81 @@ +

Total income :

+ +

Total expense :

+ +

Total balance :

+ + +
+

Add income

+ + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + + +
Income Type : + * +
+ + +
+
+ + + +
+

Income Table

+ + + + + + + + + + + + + + + + + +
Income AmountIncome SourceEditDelete
+ {{income.amount}} + + {{income.type}} +
+
+ diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/income.js b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/income.js new file mode 100644 index 00000000..cddb1c2f --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/income.js @@ -0,0 +1,65 @@ +var income = angular.module('income',['ngRoute','myApp']); + + +income.controller('incomeController',function($scope,incomeService,$http,myService){ + $scope.edit_income = ""; + $scope.temp_2 = { + amount : "", + type : "" + }; + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + + $scope.incomes = incomeService.incomes; + + $scope.add_income = function() + { + incomeService.temp_2 = $scope.temp_2; + + incomeService.add_income(); + $scope.temp_2 = { + amount : "", + type : "" + }; + + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.show_income = function(){ + $scope.income_table = true; + }; + + + + $scope.edit_income_form = function (index){ + + $scope.edit_income = index; + incomeService.edit_income = index; + $scope.temp_2.amount = incomeService.incomes[index].amount; + $scope.temp_2.type = incomeService.incomes[index].type; + + }; + + $scope.delete_income_form = function(index){ + $scope.total_income = $scope.total_income - $scope.incomes[index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice(index,1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/report.html b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/report.html new file mode 100644 index 00000000..e5b7422a --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/report.html @@ -0,0 +1,76 @@ +

Income Summary

+ + + + + + + + + + + + + + + + + + + +
Income AmountIncome Source
+ {{total_Salary}} + Salary
+ {{total_Business}} + Business
+ {{total_interest}} + Interest
+ + +

Expense Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AmountCategory
+ {{Rent}} + Rent
+ {{Travel}} + Travel
+ {{Office}} + Office
+ {{Party}} + Party
+ {{Shopping}} + Shopping
+ {{Study}} + Study
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/report.js b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/report.js new file mode 100644 index 00000000..deb26821 --- /dev/null +++ b/assignments/Mitali Kadu/Session 6/Expense Manager/WebContent/report.js @@ -0,0 +1,70 @@ +var report = angular.module('report',['ngRoute','myApp']); + +report.controller('reportController',function($scope,incomeService){ + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.total_Salary = 0; + $scope.total_Business = 0; + $scope.total_interest = 0; + $scope.Rent = 0; + $scope.Travel = 0; + $scope.Shopping = 0; + $scope.Study = 0; + $scope.Party = 0; + $scope.Office = 0; + $scope.incomes = incomeService.incomes; + $scope.expenses = incomeService.expenses; + for(i=0;i<$scope.incomes.length;i++) + { + $scope.incomes[i].amount = parseInt($scope.incomes[i].amount); + if($scope.incomes[i].type == "Salary") + {console.log("here"); + $scope.total_Salary = $scope.total_Salary + $scope.incomes[i].amount; + } + else if($scope.incomes[i].type == "Business") + { + $scope.total_Business = $scope.total_Business + $scope.incomes[i].amount; + } + else if($scope.incomes[i].type == "interest") + { + $scope.total_interest = $scope.total_interest + $scope.incomes[i].amount; + } + } + console.log(typeof($scope.incomes[0].amount)); + + + + for(i=0;i<$scope.expenses.length;i++) + { + $scope.expenses[i].amount = parseInt($scope.expenses[i].amount); + if($scope.expenses[i].category == "Rent") + {console.log("here"); + $scope.Rent = $scope.Rent + $scope.expenses[i].amount; + } + else if($scope.expenses[i].category == "Travel") + { + $scope.Travel = $scope.Travel + $scope.expenses[i].amount; + } + else if($scope.expenses[i].category == "Office") + { + $scope.Office = $scope.Office + $scope.expenses[i].amount; + } + else if($scope.expenses[i].category == "Shopping") + { + $scope.Shopping = $scope.Shopping + $scope.expenses[i].amount; + } + else if($scope.expenses[i].category == "Study") + { + $scope.Study = $scope.Study + $scope.expenses[i].amount; + } + else if($scope.expenses[i].category == "Party") + { + $scope.Party = $scope.Party + $scope.expenses[i].amount; + } + + + } + + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.classpath b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.classpath new file mode 100644 index 00000000..daee9425 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/.name b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/.name new file mode 100644 index 00000000..ce93c1f3 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/.name @@ -0,0 +1 @@ +Expense Manager \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/compiler.xml b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/compiler.xml new file mode 100644 index 00000000..96cc43ef --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/copyright/profiles_settings.xml b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/misc.xml b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/misc.xml new file mode 100644 index 00000000..b3e03d16 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/misc.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/modules.xml b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/modules.xml new file mode 100644 index 00000000..99dee4c7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/uiDesigner.xml b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/vcs.xml b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/workspace.xml b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/workspace.xml new file mode 100644 index 00000000..63095d56 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.idea/workspace.xml @@ -0,0 +1,1054 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1453447362433 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.project b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.project new file mode 100644 index 00000000..fad355a9 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.project @@ -0,0 +1,36 @@ + + + Expense Manager + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/.jsdtscope b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/.jsdtscope new file mode 100644 index 00000000..92e666d7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.jdt.core.prefs b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.common.component b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..9d37b221 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..b3f07fe4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/Expense Manager.iml b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/Expense Manager.iml new file mode 100644 index 00000000..22928023 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/Expense Manager.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/META-INF/MANIFEST.MF b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/app.js b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/app.js new file mode 100644 index 00000000..881f16cb --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/app.js @@ -0,0 +1,315 @@ +var myApp = angular.module('myApp', ['ngRoute', 'ngMessages', 'report', 'income', 'expense']); + +myApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { + + $routeProvider + .when('/final', { + templateUrl: 'home.html', + }) + + .when('/income', { + templateUrl: 'income.html', + controller: 'incomeController' + }) + .when('/expense', { + templateUrl: 'expense.html', + controller: 'expenseController' + }) + + .when('/report', { + templateUrl: 'report.html', + controller: 'reportController' + }) + .when('/settings', { + templateUrl: 'settings.html', + controller: 'mainController' + }) + + .otherwise({ + redirectTo: '/final' + }); + + +}]); + + + +myApp.service('incomeService', function($http) { + this.total_income = 0; + this.total_expense = 0; + this.total_balance = 0; + this.edit_income = ""; + this.edit_expense = ""; + + this.income_table = false; + this.expense_table = false; + this.enter_income = false; + this.enter_expense = false; + this.enter_rec_expense = false; + this.edit_rec_expense = ""; + this.edit_income = ""; + this.incomes = []; + this.rec_expenses = []; + this.expenses = []; + + + this.temp = new Object(); + this.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + this.temp_3 = new Object(); + this.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + + + + this.temp_2 = new Object(); + this.temp_2 = { + amount: "", + type: "" + }; + + + + + this.add_income = function() { + + if (this.temp_2.amount != "" && this.temp_2.type != "") { + this.enter_income = false; + this.total_income = this.temp_2.amount + this.total_income; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_income === "") { + this.incomes.push(this.temp_2); + + + } else { + + this.total_income = this.total_income - this.incomes[this.edit_income].amount; + + this.total_balance = this.total_income - this.total_expense; + this.incomes[this.edit_income] = this.temp_2; + + } + this.temp_2 = new Object(); + this.temp_2 = { + amount: "", + type: "" + }; + } else { + this.enter_income = true; + return false; + } + + this.edit_income = ""; + + }; + + this.add_expense = function() { + + if (this.temp.amount != "" && this.temp.date != "" && this.temp.category != "" && this.temp.payment != "") { + this.enter_expense = false; + this.total_expense = this.temp.amount + this.total_expense; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_expense === "") { + this.expenses.push(this.temp); + + } else { + this.total_expense = this.total_expense - this.expenses[this.edit_expense].amount; + + this.total_balance = this.total_income - this.total_expense; + + this.expenses[this.edit_expense] = this.temp; + + } + this.temp = new Object(); + this.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + } else { + this.enter_expense = true; + return false; + } + + this.edit_expense = ""; + + }; + +this.add_rec_expense = function() { + + if (this.temp_3.amount != "" && this.temp_3.date != "" && this.temp_3.category != "" && this.temp_3.payment != "" && this.temp_3.interval != "") { + this.enter_rec_expense = false; + if (this.edit_rec_expense === "") { + this.rec_expenses.push(this.temp_3); + + } else { + this.rec_expenses[this.edit_rec_expense] = this.temp_3; + + } + this.temp_3 = new Object(); + this.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + } else { + this.enter_rec_expense = true; + return false; + } + + this.edit_rec_expense = ""; + + }; + + +}); + +myApp.factory('myService', function($http) { + return { + + getIncome: function() { + return $http.get("http://demo3547198.mockable.io/income"); + } + + }; +}); + +myApp.factory('expenseService', function($http) { + return { + + getExpense: function() { + return $http.get("http://demo3547198.mockable.io/expense"); + } + + }; +}); + + +myApp.controller('mainController', function($scope, incomeService, $http, myService, expenseService) { + + $scope.mainInfo = ""; + $scope.edit_expense = ""; + $scope.edit_rec_expense = ""; + $scope.rec_expenses = []; + $scope.rec_expenses = incomeService.rec_expenses; + $scope.rec_expense_table = false; + $scope.total_income = incomeService.total_income; + console.log("from main : " + incomeService.total_income); + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + $scope.d = new Date(); + $scope.current_date = $scope.d.getDate(); + $scope.current_month = $scope.d.getMonth(); + + + console.log($scope.n); + $scope.interval = ""; + $scope.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + + myService.getIncome().then(function(response) { + incomeService.incomes = response.data; + $scope.incomes = incomeService.incomes; + console.log($scope.incomes[1].amount); + for (i = 0; i < $scope.incomes.length; i++) { + $scope.total_income = $scope.incomes[i].amount + $scope.total_income; + } + incomeService.total_income = $scope.total_income; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + expenseService.getExpense().then(function(response) { + incomeService.expenses = response.data; + + for (i = 0; i < response.data.length; i++) { + + $scope.created_time = new Date(incomeService.expenses[i].date); + incomeService.expenses[i].date = $scope.created_time; + } + + $scope.expenses = incomeService.expenses; + + for (i = 0; i < $scope.expenses.length; i++) { + + $scope.total_expense = $scope.expenses[i].amount + $scope.total_expense; + console.log($scope.total_expense); + + } + incomeService.total_expense = $scope.total_expense; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + + }); + + + }); + + $scope.add_rec_expense = function (){ + $scope.d_2 = new Date($scope.temp_3.date); + $scope.temp_3.only_date = $scope.d_2.getDate(); + $scope.temp_3.only_month = $scope.d_2.getMonth(); + + console.log("here " + $scope.temp_3.only_month); + + incomeService.temp_3 = $scope.temp_3; + incomeService.add_rec_expense(); + $scope.rec_expenses = incomeService.rec_expenses; + + $scope.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + }; + + $scope.show_rec_expense = function() { + $scope.rec_expense_table = true; + }; + + + + }); + + +myApp.directive('expenseNotifications', function() { + return { + /* template: 'Name: {{customer.name}} Address: {{customer.address}}'*/ + restrict : 'E', + templateUrl : 'notifications.html', + + }}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/data.json b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/data.json new file mode 100644 index 00000000..2d4113d8 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/data.json @@ -0,0 +1,4 @@ +{ + + "type" : "salary" +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/expense.html b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/expense.html new file mode 100644 index 00000000..ef27ff15 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/expense.html @@ -0,0 +1,87 @@ + +

Total income :

+

Total expense :

+

Total balance :

+

Add expenses

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Category : + + * +
Mode of payment : + + * +
Date : + * +
Notes : +
+
+
+

Expense Table

+ + + + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/expense.js b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/expense.js new file mode 100644 index 00000000..c81114a0 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/expense.js @@ -0,0 +1,133 @@ +var expense = angular.module('expense', ['ngRoute']); + +expense.controller('expenseController', function($scope, expenseService, incomeService, $http) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.temp = new Object(); + $scope.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + + + + $scope.expenses = incomeService.expenses; + + $scope.temp = incomeService.temp; + $scope.show_expense = function() { + $scope.expense_table = true; + }; + + $scope.add_expense = function() { + incomeService.temp = $scope.temp; + console.log("**" + incomeService.temp.date + "**"); + incomeService.add_expense(); + if ($scope.edit_expense === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/expense', + data: $scope.temp + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses.push($scope.message); + incomeService.total_expense = incomeService.total_expense + $scope.message.amount; + $scope.total_expense = incomeService.total_expense; + incomeService.total_balance = incomeService.total_balance - $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + $scope.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.edit_expense_form = function(index) { + + $scope.edit_expense = index; + incomeService.edit_expense = index; + $scope.temp.amount = incomeService.expenses[index].amount; + $scope.temp.category = incomeService.expenses[index].category; + $scope.temp.date = incomeService.expenses[index].date; + $scope.temp.payment = incomeService.expenses[index].payment; + $scope.temp.notes = incomeService.expenses[index].notes; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + + + + + incomeService.total_expense = incomeService.total_expense + $scope.message.amount - incomeService.expenses[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.expenses[0].amount; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses[0] = $scope.message; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + $scope.expenses = incomeService.expenses; + + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + + + $scope.delete_expense_form = function(index) { + + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_expense = $scope.total_expense - $scope.expenses[$scope.message.index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice($scope.message.index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + + $scope.total_expense = $scope.total_expense - $scope.expenses[index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice(index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/final.css b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/final.css new file mode 100644 index 00000000..149aa000 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/final.css @@ -0,0 +1,102 @@ +.main { + height: 100vh; + width: 1080px; + margin-left: 10%; +} +#upper { + background-color: #00006c; + height: 84px; + min-height: 83px; + width: 100%; +} +#lower { + height: 90%; + width: 80%; + background-color: #f4f4f4; + position: absolute; +} +.heading { + font-family: sans-serif; + font-weight: 600; + color: white; + text-align: center; + padding-top: 20px; + font-size: 26px; +} +.block_letters { + font-size: 26px; + color: #4E4A4A; + background-color: #bcbcbc; + font-weight: 500; + font-family: Expert-Sans-Light, verdana, arial, helvetica, clean, sans-serif; + margin-top: 10px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} +#report { + border: 1px solid black; + padding: 5px; +} +#report td { + border: 1px solid black; + padding: 5px; +} +#report th { + border: 1px solid black; + background-color: #bcbcbc; + text-align: center; + padding: 5px; +} +a { + display: inline-block; +} +.input_tables td { + padding-top: .3em; + padding-left: .5em; + padding-bottom: .3em; +} +.error_msg { + color: red; + font-size: 14px; + padding-bottom: 7px; +} +.navigation { + height: 40px; + width: 160px; + color: #e1e0e0; + background-color: #00006c; +} +.navigation:hover { + background-color: #e1e0e0; + color: #00006c; + /* transition: box-shadow 0.3s; */ +} +#panel { + height: 10%; + width: 100%; + text-align: center; + color: black; + background-color: #00006c; + font-size: 17px; +} +.tabs { + display: inline-block; + height: 45px; + width: 270px; + margin-left: 60px; + padding-top: 10px; + margin-top: 10px; + text-align: center; + color: black; + border-radius: 10px; + background-color: #bcbcbc; + font-size: 17px; +} + +.notification +{ +height : 500px; +width : 500px; +background-color : white; +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/final.html b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/final.html new file mode 100644 index 00000000..f6bcc419 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/final.html @@ -0,0 +1,51 @@ + + + Expense Manager + + + + + + + + + + + + + + + + + + +
+
+

Expense Manager

+
+
+
+ + + + + +
+
+ +
+ + +
+
+ + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/home.html b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/home.html new file mode 100644 index 00000000..0b7a0918 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/home.html @@ -0,0 +1,10 @@ + +

Total income :

+ +

Total expense :

+ +

Total balance :

+ + +

Upcoming Expenses

+ diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/income.html b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/income.html new file mode 100644 index 00000000..402f99b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/income.html @@ -0,0 +1,61 @@ +

Total income :

+

Total expense :

+

Total balance :

+
+

Add income

+ + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Income Type : + + * +
+ +
+
+
+

Income Table

+ + + + + + + + + + + + + + +
Income AmountIncome SourceEditDelete
+ {{income.amount}} + + {{income.type}} +
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/income.js b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/income.js new file mode 100644 index 00000000..4cc15d7e --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/income.js @@ -0,0 +1,115 @@ +var income = angular.module('income', ['ngRoute', 'myApp']); + + +income.controller('incomeController', function($scope, incomeService, $http, myService) { + $scope.edit_income = ""; + $scope.temp_2 = { + amount: "", + type: "" + }; + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + + $scope.incomes = incomeService.incomes; + + $scope.add_income = function() { + incomeService.temp_2 = $scope.temp_2; + + if ($scope.edit_income === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/income', + data: $scope.temp_2 + }).then(function successCallback(response) { + + $scope.message = response.data; + incomeService.incomes.push($scope.message); + incomeService.total_income = incomeService.total_income + $scope.message.amount; + $scope.total_income = incomeService.total_income; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + incomeService.add_income(); + $scope.temp_2 = { + amount: "", + type: "" + }; + + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.show_income = function() { + $scope.income_table = true; + }; + + + + $scope.edit_income_form = function(index) { + + $scope.edit_income = index; + incomeService.edit_income = index; + $scope.temp_2.amount = incomeService.incomes[index].amount; + $scope.temp_2.type = incomeService.incomes[index].type; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + + incomeService.total_income = incomeService.total_income + $scope.message.amount - incomeService.incomes[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.incomes[0].amount; + + incomeService.incomes[0] = $scope.message; + $scope.total_income = incomeService.total_income; + $scope.total_balance = incomeService.total_balance; + $scope.incomes = incomeService.incomes; + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + $scope.delete_income_form = function(index) { + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_income = $scope.total_income - $scope.incomes[$scope.message.index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice($scope.message.index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + $scope.total_income = $scope.total_income - $scope.incomes[index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice(index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/notifications.html b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/notifications.html new file mode 100644 index 00000000..4658efea --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/notifications.html @@ -0,0 +1,26 @@ +
+ + + + + + + + + + + + + + + + + + + + + + +
AmountCategoryMode of PaymentNotesInterval
{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}{{expense.interval}}
{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}{{expense.interval}}
+
+ \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/report.html b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/report.html new file mode 100644 index 00000000..d74df2cd --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/report.html @@ -0,0 +1,68 @@ +

Income Summary

+ + + + + + + + + + + + + + + + + +
Income AmountIncome Source
+ {{total_Salary}} + Salary
+ {{total_Business}} + Business
+ {{total_interest}} + Interest
+

Expense Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AmountCategory
+ {{Rent}} + Rent
+ {{Travel}} + Travel
+ {{Office}} + Office
+ {{Party}} + Party
+ {{Shopping}} + Shopping
+ {{Study}} + Study
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/report.js b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/report.js new file mode 100644 index 00000000..2ffe6ec1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/report.js @@ -0,0 +1,54 @@ +var report = angular.module('report', ['ngRoute', 'myApp']); + +report.controller('reportController', function($scope, incomeService) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.total_Salary = 0; + $scope.total_Business = 0; + $scope.total_interest = 0; + $scope.Rent = 0; + $scope.Travel = 0; + $scope.Shopping = 0; + $scope.Study = 0; + $scope.Party = 0; + $scope.Office = 0; + $scope.incomes = incomeService.incomes; + $scope.expenses = incomeService.expenses; + for (i = 0; i < $scope.incomes.length; i++) { + $scope.incomes[i].amount = parseInt($scope.incomes[i].amount); + if ($scope.incomes[i].type == "Salary") { + console.log("here"); + $scope.total_Salary = $scope.total_Salary + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "Business") { + $scope.total_Business = $scope.total_Business + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "interest") { + $scope.total_interest = $scope.total_interest + $scope.incomes[i].amount; + } + } + console.log(typeof($scope.incomes[0].amount)); + + + + for (i = 0; i < $scope.expenses.length; i++) { + $scope.expenses[i].amount = parseInt($scope.expenses[i].amount); + if ($scope.expenses[i].category == "Rent") { + console.log("here"); + $scope.Rent = $scope.Rent + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Travel") { + $scope.Travel = $scope.Travel + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Office") { + $scope.Office = $scope.Office + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Shopping") { + $scope.Shopping = $scope.Shopping + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Study") { + $scope.Study = $scope.Study + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Party") { + $scope.Party = $scope.Party + $scope.expenses[i].amount; + } + + + } + + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/settings.html b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/settings.html new file mode 100644 index 00000000..c49edcb2 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/settings.html @@ -0,0 +1,95 @@ +

Add Recurring Expenses

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Category : + + * +
Interval : + + * +
Mode of payment : + + * +
Date : + * +
Notes : +
+
+
+

Recurring Expense Table

+ + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
+ diff --git a/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/settings/settings.js b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/settings/settings.js new file mode 100644 index 00000000..f21fbd33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (1)/Expense Manager/WebContent/settings/settings.js @@ -0,0 +1,6 @@ +var settings = angular.module('settings', ['ngRoute']); + +settings.controller('settingsController', function($scope, expenseService, incomeService) { + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.classpath b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.classpath new file mode 100644 index 00000000..daee9425 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/.name b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/.name new file mode 100644 index 00000000..ce93c1f3 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/.name @@ -0,0 +1 @@ +Expense Manager \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/compiler.xml b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/compiler.xml new file mode 100644 index 00000000..96cc43ef --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/copyright/profiles_settings.xml b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/misc.xml b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/misc.xml new file mode 100644 index 00000000..b3e03d16 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/misc.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/modules.xml b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/modules.xml new file mode 100644 index 00000000..99dee4c7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/uiDesigner.xml b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/vcs.xml b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/workspace.xml b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/workspace.xml new file mode 100644 index 00000000..17a2a516 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.idea/workspace.xml @@ -0,0 +1,1044 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1453447362433 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.project b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.project new file mode 100644 index 00000000..fad355a9 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.project @@ -0,0 +1,36 @@ + + + Expense Manager + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/.jsdtscope b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/.jsdtscope new file mode 100644 index 00000000..92e666d7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.jdt.core.prefs b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.common.component b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..9d37b221 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..b3f07fe4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/Expense Manager.iml b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/Expense Manager.iml new file mode 100644 index 00000000..22928023 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/Expense Manager.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/META-INF/MANIFEST.MF b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/app.js b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/app.js new file mode 100644 index 00000000..4669cb96 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/app.js @@ -0,0 +1,316 @@ +var myApp = angular.module('myApp', ['ngRoute', 'ngMessages', 'report', 'income', 'expense']); + +myApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { + + $routeProvider + .when('/final', { + templateUrl: 'home.html', + }) + + .when('/income', { + templateUrl: 'income.html', + controller: 'incomeController' + }) + .when('/expense', { + templateUrl: 'expense.html', + controller: 'expenseController' + }) + + .when('/report', { + templateUrl: 'report.html', + controller: 'reportController' + }) + .when('/settings', { + templateUrl: 'settings.html', + controller: 'mainController' + }) + + .otherwise({ + redirectTo: '/final' + }); + + +}]); + + + +myApp.service('incomeService', function($http) { + this.total_income = 0; + this.total_expense = 0; + this.total_balance = 0; + this.edit_income = ""; + this.edit_expense = ""; + + this.income_table = false; + this.expense_table = false; + this.enter_income = false; + this.enter_expense = false; + this.enter_rec_expense = false; + this.edit_rec_expense = ""; + this.edit_income = ""; + this.incomes = []; + this.rec_expenses = []; + this.expenses = []; + + + this.temp = new Object(); + this.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + this.temp_3 = new Object(); + this.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + + + + this.temp_2 = new Object(); + this.temp_2 = { + amount: "", + type: "" + }; + + + + + this.add_income = function() { + + if (this.temp_2.amount != "" && this.temp_2.type != "") { + this.enter_income = false; + this.total_income = this.temp_2.amount + this.total_income; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_income === "") { + this.incomes.push(this.temp_2); + + + } else { + + this.total_income = this.total_income - this.incomes[this.edit_income].amount; + + this.total_balance = this.total_income - this.total_expense; + this.incomes[this.edit_income] = this.temp_2; + + } + this.temp_2 = new Object(); + this.temp_2 = { + amount: "", + type: "" + }; + } else { + this.enter_income = true; + return false; + } + + this.edit_income = ""; + + }; + + this.add_expense = function() { + + if (this.temp.amount != "" && this.temp.date != "" && this.temp.category != "" && this.temp.payment != "") { + this.enter_expense = false; + this.total_expense = this.temp.amount + this.total_expense; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_expense === "") { + this.expenses.push(this.temp); + + } else { + this.total_expense = this.total_expense - this.expenses[this.edit_expense].amount; + + this.total_balance = this.total_income - this.total_expense; + + this.expenses[this.edit_expense] = this.temp; + + } + this.temp = new Object(); + this.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + } else { + this.enter_expense = true; + return false; + } + + this.edit_expense = ""; + + }; + +this.add_rec_expense = function() { + + if (this.temp_3.amount != "" && this.temp_3.date != "" && this.temp_3.category != "" && this.temp_3.payment != "" && this.temp_3.interval != "") { + this.enter_rec_expense = false; + if (this.edit_rec_expense === "") { + this.rec_expenses.push(this.temp_3); + + } else { + this.rec_expenses[this.edit_rec_expense] = this.temp_3; + + } + this.temp_3 = new Object(); + this.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + } else { + this.enter_rec_expense = true; + return false; + } + + this.edit_rec_expense = ""; + + }; + + +}); + +myApp.factory('myService', function($http) { + return { + + getIncome: function() { + return $http.get("http://demo3547198.mockable.io/income"); + } + + }; +}); + +myApp.factory('expenseService', function($http) { + return { + + getExpense: function() { + return $http.get("http://demo3547198.mockable.io/expense"); + } + + }; +}); + + +myApp.controller('mainController', function($scope, incomeService, $http, myService, expenseService) { + + $scope.mainInfo = ""; + $scope.edit_expense = ""; + $scope.edit_rec_expense = ""; + $scope.rec_expenses = []; + $scope.rec_expenses = incomeService.rec_expenses; + $scope.rec_expense_table = false; + $scope.total_income = incomeService.total_income; + console.log("from main : " + incomeService.total_income); + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + $scope.d = new Date(); + $scope.current_date = $scope.d.getDate(); + $scope.current_month = $scope.d.getMonth(); + + + console.log($scope.n); + $scope.interval = ""; + $scope.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + + myService.getIncome().then(function(response) { + incomeService.incomes = response.data; + $scope.incomes = incomeService.incomes; + console.log($scope.incomes[1].amount); + for (i = 0; i < $scope.incomes.length; i++) { + $scope.total_income = $scope.incomes[i].amount + $scope.total_income; + } + incomeService.total_income = $scope.total_income; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + expenseService.getExpense().then(function(response) { + incomeService.expenses = response.data; + + for (i = 0; i < response.data.length; i++) { + + $scope.created_time = new Date(incomeService.expenses[i].date); + incomeService.expenses[i].date = $scope.created_time; + } + + $scope.expenses = incomeService.expenses; + + for (i = 0; i < $scope.expenses.length; i++) { + + $scope.total_expense = $scope.expenses[i].amount + $scope.total_expense; + console.log($scope.total_expense); + + } + incomeService.total_expense = $scope.total_expense; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + + }); + + + }); + + $scope.add_rec_expense = function (){ + $scope.d_2 = new Date($scope.temp_3.date); + $scope.temp_3.only_date = $scope.d_2.getDate(); + $scope.temp_3.only_month = $scope.d_2.getMonth(); + incomeService.temp_3 = $scope.temp_3; + incomeService.add_rec_expense(); + $scope.rec_expenses = incomeService.rec_expenses; + + $scope.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + }; + + $scope.show_rec_expense = function() { + $scope.rec_expense_table = true; + }; + + + + }); + + +myApp.directive('expenseNotifications', function() { + return { + restrict : 'E', + templateUrl : 'notifications.html', + link: function(scope) { + + scope.delClick = function(index) { + scope.rec_expenses.splice(index,1); + } +} + }}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/data.json b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/data.json new file mode 100644 index 00000000..2d4113d8 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/data.json @@ -0,0 +1,4 @@ +{ + + "type" : "salary" +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/expense.html b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/expense.html new file mode 100644 index 00000000..ef27ff15 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/expense.html @@ -0,0 +1,87 @@ + +

Total income :

+

Total expense :

+

Total balance :

+

Add expenses

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Category : + + * +
Mode of payment : + + * +
Date : + * +
Notes : +
+
+
+

Expense Table

+ + + + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/expense.js b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/expense.js new file mode 100644 index 00000000..c81114a0 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/expense.js @@ -0,0 +1,133 @@ +var expense = angular.module('expense', ['ngRoute']); + +expense.controller('expenseController', function($scope, expenseService, incomeService, $http) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.temp = new Object(); + $scope.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + + + + $scope.expenses = incomeService.expenses; + + $scope.temp = incomeService.temp; + $scope.show_expense = function() { + $scope.expense_table = true; + }; + + $scope.add_expense = function() { + incomeService.temp = $scope.temp; + console.log("**" + incomeService.temp.date + "**"); + incomeService.add_expense(); + if ($scope.edit_expense === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/expense', + data: $scope.temp + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses.push($scope.message); + incomeService.total_expense = incomeService.total_expense + $scope.message.amount; + $scope.total_expense = incomeService.total_expense; + incomeService.total_balance = incomeService.total_balance - $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + $scope.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.edit_expense_form = function(index) { + + $scope.edit_expense = index; + incomeService.edit_expense = index; + $scope.temp.amount = incomeService.expenses[index].amount; + $scope.temp.category = incomeService.expenses[index].category; + $scope.temp.date = incomeService.expenses[index].date; + $scope.temp.payment = incomeService.expenses[index].payment; + $scope.temp.notes = incomeService.expenses[index].notes; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + + + + + incomeService.total_expense = incomeService.total_expense + $scope.message.amount - incomeService.expenses[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.expenses[0].amount; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses[0] = $scope.message; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + $scope.expenses = incomeService.expenses; + + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + + + $scope.delete_expense_form = function(index) { + + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_expense = $scope.total_expense - $scope.expenses[$scope.message.index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice($scope.message.index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + + $scope.total_expense = $scope.total_expense - $scope.expenses[index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice(index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/final.css b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/final.css new file mode 100644 index 00000000..42b42950 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/final.css @@ -0,0 +1,119 @@ +.main { + height: 100vh; + width: 1080px; + margin-left: 10%; +} +#upper { + background-color: #00006c; + height: 84px; + min-height: 83px; + width: 100%; +} +#lower { + height: 90%; + width: 80%; + background-color: #f4f4f4; + position: absolute; +} +.heading { + font-family: sans-serif; + font-weight: 600; + color: white; + text-align: center; + padding-top: 20px; + font-size: 26px; +} +.block_letters { + font-size: 26px; + color: #4E4A4A; + background-color: #bcbcbc; + font-weight: 500; + font-family: Expert-Sans-Light, verdana, arial, helvetica, clean, sans-serif; + margin-top: 10px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} +#report { + border: 1px solid black; + padding: 5px; +} +#report td { + border: 1px solid black; + padding: 5px; +} +#report th { + border: 1px solid black; + background-color: #bcbcbc; + text-align: center; + padding: 5px; +} +a { + display: inline-block; +} +.input_tables td { + padding-top: .3em; + padding-left: .5em; + padding-bottom: .3em; +} +.error_msg { + color: red; + font-size: 14px; + padding-bottom: 7px; +} +.navigation { + height: 40px; + width: 160px; + color: #e1e0e0; + background-color: #00006c; +} +.navigation:hover { + background-color: #e1e0e0; + color: #00006c; + /* transition: box-shadow 0.3s; */ +} +#panel { + height: 10%; + width: 100%; + text-align: center; + color: black; + background-color: #00006c; + font-size: 17px; +} +.tabs { + display: inline-block; + height: 45px; + width: 270px; + margin-left: 60px; + padding-top: 10px; + margin-top: 10px; + text-align: center; + color: black; + border-radius: 10px; + background-color: #bcbcbc; + font-size: 17px; +} + +.notification +{ +height : 500px; +width : 500px; +background-color : white; +} + +.card +{ + height : 180px; + width : 160px; + text-align : center; + background-color : #979aa7; + border : solid #6a6b6f 1px; + display : inline-block; + margin-left :10px; + +} + +.card p +{ +background-color : #b6bac9; +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/final.html b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/final.html new file mode 100644 index 00000000..b43e2f8c --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/final.html @@ -0,0 +1,50 @@ + + + Expense Manager + + + + + + + + + + + + + + + + + + +
+
+

Expense Manager

+
+
+
+ + + + + +
+
+ +
+ +
+
+ + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/home.html b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/home.html new file mode 100644 index 00000000..058ebbc1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/home.html @@ -0,0 +1,10 @@ + +

Total income :

+ +

Total expense :

+ +

Total balance :

+ + +

Upcoming Expenses

+ diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/income.html b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/income.html new file mode 100644 index 00000000..402f99b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/income.html @@ -0,0 +1,61 @@ +

Total income :

+

Total expense :

+

Total balance :

+
+

Add income

+ + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Income Type : + + * +
+ +
+
+
+

Income Table

+ + + + + + + + + + + + + + +
Income AmountIncome SourceEditDelete
+ {{income.amount}} + + {{income.type}} +
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/income.js b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/income.js new file mode 100644 index 00000000..4cc15d7e --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/income.js @@ -0,0 +1,115 @@ +var income = angular.module('income', ['ngRoute', 'myApp']); + + +income.controller('incomeController', function($scope, incomeService, $http, myService) { + $scope.edit_income = ""; + $scope.temp_2 = { + amount: "", + type: "" + }; + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + + $scope.incomes = incomeService.incomes; + + $scope.add_income = function() { + incomeService.temp_2 = $scope.temp_2; + + if ($scope.edit_income === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/income', + data: $scope.temp_2 + }).then(function successCallback(response) { + + $scope.message = response.data; + incomeService.incomes.push($scope.message); + incomeService.total_income = incomeService.total_income + $scope.message.amount; + $scope.total_income = incomeService.total_income; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + incomeService.add_income(); + $scope.temp_2 = { + amount: "", + type: "" + }; + + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.show_income = function() { + $scope.income_table = true; + }; + + + + $scope.edit_income_form = function(index) { + + $scope.edit_income = index; + incomeService.edit_income = index; + $scope.temp_2.amount = incomeService.incomes[index].amount; + $scope.temp_2.type = incomeService.incomes[index].type; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + + incomeService.total_income = incomeService.total_income + $scope.message.amount - incomeService.incomes[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.incomes[0].amount; + + incomeService.incomes[0] = $scope.message; + $scope.total_income = incomeService.total_income; + $scope.total_balance = incomeService.total_balance; + $scope.incomes = incomeService.incomes; + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + $scope.delete_income_form = function(index) { + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_income = $scope.total_income - $scope.incomes[$scope.message.index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice($scope.message.index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + $scope.total_income = $scope.total_income - $scope.incomes[index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice(index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/notifications.html b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/notifications.html new file mode 100644 index 00000000..c08be984 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/notifications.html @@ -0,0 +1,22 @@ +
+ +
+

Amount : {{expense.amount}}

+

Category : {{expense.category}}

+

Payment : {{expense.payment}}

+

Notes : {{expense.notes}}

+

Interval : {{expense.interval}}

+ + +
+
+

Amount : {{expense.amount}}

+

Category : {{expense.category}}

+

Payment : {{expense.payment}}

+

Notes : {{expense.notes}}

+

Interval : {{expense.interval}}

+ + +
+
+ \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/report.html b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/report.html new file mode 100644 index 00000000..d74df2cd --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/report.html @@ -0,0 +1,68 @@ +

Income Summary

+ + + + + + + + + + + + + + + + + +
Income AmountIncome Source
+ {{total_Salary}} + Salary
+ {{total_Business}} + Business
+ {{total_interest}} + Interest
+

Expense Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AmountCategory
+ {{Rent}} + Rent
+ {{Travel}} + Travel
+ {{Office}} + Office
+ {{Party}} + Party
+ {{Shopping}} + Shopping
+ {{Study}} + Study
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/report.js b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/report.js new file mode 100644 index 00000000..2ffe6ec1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/report.js @@ -0,0 +1,54 @@ +var report = angular.module('report', ['ngRoute', 'myApp']); + +report.controller('reportController', function($scope, incomeService) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.total_Salary = 0; + $scope.total_Business = 0; + $scope.total_interest = 0; + $scope.Rent = 0; + $scope.Travel = 0; + $scope.Shopping = 0; + $scope.Study = 0; + $scope.Party = 0; + $scope.Office = 0; + $scope.incomes = incomeService.incomes; + $scope.expenses = incomeService.expenses; + for (i = 0; i < $scope.incomes.length; i++) { + $scope.incomes[i].amount = parseInt($scope.incomes[i].amount); + if ($scope.incomes[i].type == "Salary") { + console.log("here"); + $scope.total_Salary = $scope.total_Salary + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "Business") { + $scope.total_Business = $scope.total_Business + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "interest") { + $scope.total_interest = $scope.total_interest + $scope.incomes[i].amount; + } + } + console.log(typeof($scope.incomes[0].amount)); + + + + for (i = 0; i < $scope.expenses.length; i++) { + $scope.expenses[i].amount = parseInt($scope.expenses[i].amount); + if ($scope.expenses[i].category == "Rent") { + console.log("here"); + $scope.Rent = $scope.Rent + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Travel") { + $scope.Travel = $scope.Travel + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Office") { + $scope.Office = $scope.Office + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Shopping") { + $scope.Shopping = $scope.Shopping + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Study") { + $scope.Study = $scope.Study + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Party") { + $scope.Party = $scope.Party + $scope.expenses[i].amount; + } + + + } + + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/settings.html b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/settings.html new file mode 100644 index 00000000..c49edcb2 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/settings.html @@ -0,0 +1,95 @@ +

Add Recurring Expenses

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Category : + + * +
Interval : + + * +
Mode of payment : + + * +
Date : + * +
Notes : +
+
+
+

Recurring Expense Table

+ + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
+ diff --git a/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/settings/settings.js b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/settings/settings.js new file mode 100644 index 00000000..f21fbd33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8 (2)/Expense Manager/WebContent/settings/settings.js @@ -0,0 +1,6 @@ +var settings = angular.module('settings', ['ngRoute']); + +settings.controller('settingsController', function($scope, expenseService, incomeService) { + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.classpath b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.classpath new file mode 100644 index 00000000..daee9425 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/.name b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/.name new file mode 100644 index 00000000..ce93c1f3 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/.name @@ -0,0 +1 @@ +Expense Manager \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/compiler.xml b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/compiler.xml new file mode 100644 index 00000000..96cc43ef --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/copyright/profiles_settings.xml b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/misc.xml b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/misc.xml new file mode 100644 index 00000000..b3e03d16 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/misc.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/modules.xml b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/modules.xml new file mode 100644 index 00000000..99dee4c7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/uiDesigner.xml b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/vcs.xml b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/workspace.xml b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/workspace.xml new file mode 100644 index 00000000..295529a8 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.idea/workspace.xml @@ -0,0 +1,1075 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1453447362433 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.project b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.project new file mode 100644 index 00000000..fad355a9 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.project @@ -0,0 +1,36 @@ + + + Expense Manager + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/.jsdtscope b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/.jsdtscope new file mode 100644 index 00000000..92e666d7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.jdt.core.prefs b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.common.component b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..9d37b221 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..b3f07fe4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/Expense Manager.iml b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/Expense Manager.iml new file mode 100644 index 00000000..22928023 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/Expense Manager.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/META-INF/MANIFEST.MF b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/app.js b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/app.js new file mode 100644 index 00000000..a70fd71e --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/app.js @@ -0,0 +1,333 @@ +var myApp = angular.module('myApp', ['ngRoute', 'ngMessages', 'report', 'income', 'expense']); + +myApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { + + $routeProvider + .when('/final', { + templateUrl: '../views/home.html', + }) + + .when('/income', { + templateUrl: '../views/income.html', + controller: 'incomeController' + }) + .when('/expense', { + templateUrl: '../views/expense.html', + controller: 'expenseController' + }) + + .when('/report', { + templateUrl: '../views/report.html', + controller: 'reportController' + }) + .when('/settings', { + templateUrl: '../views/settings.html', + controller: 'mainController' + }) + + .otherwise({ + redirectTo: '/final' + }); + + +}]); + + + +myApp.service('incomeService', function($http) { + this.total_income = 0; + this.total_expense = 0; + this.total_balance = 0; + this.edit_income = ""; + this.edit_expense = ""; + + this.income_table = false; + this.expense_table = false; + this.enter_income = false; + this.enter_expense = false; + this.enter_rec_expense = false; + this.edit_rec_expense = ""; + this.edit_income = ""; + this.incomes = []; + this.rec_expenses = []; + this.expenses = []; + + + this.temp = new Object(); + this.temp = { + payer : "", + payee : "", + + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + this.temp_3 = new Object(); + this.temp_3 = { + payer : "", + payee : "", + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + + + + this.temp_2 = new Object(); + this.temp_2 = { + payer : "", + payee : "", + amount: "", + type: "" + }; + + + + + this.add_income = function() { + + if (this.temp_2.payer != "" && this.temp_2.payee != "" && this.temp_2.amount != "" && this.temp_2.type != "") { + this.enter_income = false; + this.total_income = this.temp_2.amount + this.total_income; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_income === "") { + this.incomes.push(this.temp_2); + + + } else { + + this.total_income = this.total_income - this.incomes[this.edit_income].amount; + + this.total_balance = this.total_income - this.total_expense; + this.incomes[this.edit_income] = this.temp_2; + + } + this.temp_2 = new Object(); + this.temp_2 = { + payer : "", + payee : "", + amount: "", + type: "" + }; + } else { + this.enter_income = true; + return false; + } + + this.edit_income = ""; + + }; + + this.add_expense = function() { + + if (this.temp.payer != "" && this.temp.payee != "" && this.temp.amount != "" && this.temp.date != "" && this.temp.category != "" && this.temp.payment != "") { + this.enter_expense = false; + this.total_expense = this.temp.amount + this.total_expense; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_expense === "") { + this.expenses.push(this.temp); + + } else { + this.total_expense = this.total_expense - this.expenses[this.edit_expense].amount; + + this.total_balance = this.total_income - this.total_expense; + + this.expenses[this.edit_expense] = this.temp; + + } + this.temp = new Object(); + this.temp = { + payer : "", + payee : "", + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + } else { + this.enter_expense = true; + return false; + } + + this.edit_expense = ""; + + }; + +this.add_rec_expense = function() { + + if (this.temp_3.payer != "" && this.temp_3.payee != "" && this.temp_3.amount != "" && this.temp_3.date != "" && this.temp_3.category != "" && this.temp_3.payment != "" && this.temp_3.interval != "") { + this.enter_rec_expense = false; + if (this.edit_rec_expense === "") { + this.rec_expenses.push(this.temp_3); + + } else { + this.rec_expenses[this.edit_rec_expense] = this.temp_3; + + } + this.temp_3 = new Object(); + this.temp_3 = { + payer : "", + payee : "", + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + } else { + this.enter_rec_expense = true; + return false; + } + + this.edit_rec_expense = ""; + + }; + + +}); + +myApp.factory('myService', function($http) { + return { + + getIncome: function() { + return $http.get("http://demo3547198.mockable.io/income"); + } + + }; +}); + +myApp.factory('expenseService', function($http) { + return { + + getExpense: function() { + return $http.get("http://demo3547198.mockable.io/expense"); + } + + }; +}); + + +myApp.controller('mainController', function($scope, incomeService, $http, myService, expenseService) { + + $scope.mainInfo = ""; + $scope.edit_expense = ""; + $scope.edit_rec_expense = ""; + $scope.rec_expenses = []; + $scope.rec_expenses = incomeService.rec_expenses; + $scope.rec_expense_table = false; + $scope.total_income = incomeService.total_income; + console.log("from main : " + incomeService.total_income); + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + $scope.d = new Date(); + $scope.current_date = $scope.d.getDate(); + $scope.current_month = $scope.d.getMonth(); + + + console.log($scope.n); + $scope.interval = ""; + $scope.temp_3 = { + payer : "", + payee : "", + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + + myService.getIncome().then(function(response) { + incomeService.incomes = response.data; + $scope.incomes = incomeService.incomes; + console.log($scope.incomes[1].amount); + for (i = 0; i < $scope.incomes.length; i++) { + $scope.total_income = $scope.incomes[i].amount + $scope.total_income; + } + incomeService.total_income = $scope.total_income; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + expenseService.getExpense().then(function(response) { + incomeService.expenses = response.data; + + for (i = 0; i < response.data.length; i++) { + + $scope.created_time = new Date(incomeService.expenses[i].date); + incomeService.expenses[i].date = $scope.created_time; + } + + $scope.expenses = incomeService.expenses; + + for (i = 0; i < $scope.expenses.length; i++) { + + $scope.total_expense = $scope.expenses[i].amount + $scope.total_expense; + console.log($scope.total_expense); + + } + incomeService.total_expense = $scope.total_expense; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + + }); + + + }); + + $scope.add_rec_expense = function (){ + $scope.d_2 = new Date($scope.temp_3.date); + $scope.temp_3.only_date = $scope.d_2.getDate(); + $scope.temp_3.only_month = $scope.d_2.getMonth(); + incomeService.temp_3 = $scope.temp_3; + incomeService.add_rec_expense(); + $scope.rec_expenses = incomeService.rec_expenses; + + $scope.temp_3 = { + payer : "", + payee : "", + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + }; + + $scope.show_rec_expense = function() { + $scope.rec_expense_table = true; + }; + + + + }); + + +myApp.directive('expenseNotifications', function() { + return { + restrict : 'E', + templateUrl : 'notifications.html', + link: function(scope) { + + scope.delClick = function(index) { + scope.rec_expenses.splice(index,1); + } +} + }}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/data.json b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/data.json new file mode 100644 index 00000000..2d4113d8 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/data.json @@ -0,0 +1,4 @@ +{ + + "type" : "salary" +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/expense.js b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/expense.js new file mode 100644 index 00000000..f35d80f8 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/expense.js @@ -0,0 +1,137 @@ +var expense = angular.module('expense', ['ngRoute']); + +expense.controller('expenseController', function($scope, expenseService, incomeService, $http) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.temp = new Object(); + $scope.temp = { + payer : "", + payee : "", + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + + + + $scope.expenses = incomeService.expenses; + + $scope.temp = incomeService.temp; + $scope.show_expense = function() { + $scope.expense_table = true; + }; + + $scope.add_expense = function() { + incomeService.temp = $scope.temp; + console.log("**" + incomeService.temp.date + "**"); + incomeService.add_expense(); + if ($scope.edit_expense === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/expense', + data: $scope.temp + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses.push($scope.message); + incomeService.total_expense = incomeService.total_expense + $scope.message.amount; + $scope.total_expense = incomeService.total_expense; + incomeService.total_balance = incomeService.total_balance - $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + $scope.temp = { + payer : "", + payee : "", + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.edit_expense_form = function(index) { + + $scope.edit_expense = index; + incomeService.edit_expense = index; + $scope.temp.amount = incomeService.expenses[index].amount; + $scope.temp.category = incomeService.expenses[index].category; + $scope.temp.date = incomeService.expenses[index].date; + $scope.temp.payment = incomeService.expenses[index].payment; + $scope.temp.notes = incomeService.expenses[index].notes; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + + + + + incomeService.total_expense = incomeService.total_expense + $scope.message.amount - incomeService.expenses[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.expenses[0].amount; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses[0] = $scope.message; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + $scope.expenses = incomeService.expenses; + + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + + + $scope.delete_expense_form = function(index) { + + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_expense = $scope.total_expense - $scope.expenses[$scope.message.index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice($scope.message.index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + + $scope.total_expense = $scope.total_expense - $scope.expenses[index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice(index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/income.js b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/income.js new file mode 100644 index 00000000..8883a2d5 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/income.js @@ -0,0 +1,119 @@ +var income = angular.module('income', ['ngRoute', 'myApp']); + + +income.controller('incomeController', function($scope, incomeService, $http, myService) { + $scope.edit_income = ""; + $scope.temp_2 = { + payer : "", + payee : "", + amount: "", + type: "" + }; + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + + $scope.incomes = incomeService.incomes; + + $scope.add_income = function() { + incomeService.temp_2 = $scope.temp_2; + + if ($scope.edit_income === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/income', + data: $scope.temp_2 + }).then(function successCallback(response) { + + $scope.message = response.data; + incomeService.incomes.push($scope.message); + incomeService.total_income = incomeService.total_income + $scope.message.amount; + $scope.total_income = incomeService.total_income; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + incomeService.add_income(); + $scope.temp_2 = { + payer : "", + payee : "", + amount: "", + type: "" + }; + + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.show_income = function() { + $scope.income_table = true; + }; + + + + $scope.edit_income_form = function(index) { + + $scope.edit_income = index; + incomeService.edit_income = index; + $scope.temp_2.amount = incomeService.incomes[index].amount; + $scope.temp_2.type = incomeService.incomes[index].type; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + + incomeService.total_income = incomeService.total_income + $scope.message.amount - incomeService.incomes[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.incomes[0].amount; + + incomeService.incomes[0] = $scope.message; + $scope.total_income = incomeService.total_income; + $scope.total_balance = incomeService.total_balance; + $scope.incomes = incomeService.incomes; + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + $scope.delete_income_form = function(index) { + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_income = $scope.total_income - $scope.incomes[$scope.message.index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice($scope.message.index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + $scope.total_income = $scope.total_income - $scope.incomes[index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice(index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/report.js b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/report.js new file mode 100644 index 00000000..a88951b5 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/scripts/controllers/report.js @@ -0,0 +1,71 @@ +var report = angular.module('report', ['ngRoute', 'myApp']); + +report.controller('reportController', function($scope, incomeService) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.total_Salary = 0; + $scope.total_Business = 0; + $scope.total_interest = 0; + $scope.Rent = 0; + $scope.Travel = 0; + $scope.Shopping = 0; + $scope.Study = 0; + $scope.Party = 0; + $scope.Office = 0; + $scope.incomes = incomeService.incomes; + $scope.expenses = incomeService.expenses; + for (i = 0; i < $scope.incomes.length; i++) { + $scope.incomes[i].amount = parseInt($scope.incomes[i].amount); + if ($scope.incomes[i].type == "Salary") { + console.log("here"); + $scope.total_Salary = $scope.total_Salary + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "Business") { + $scope.total_Business = $scope.total_Business + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "interest") { + $scope.total_interest = $scope.total_interest + $scope.incomes[i].amount; + } + } + console.log(typeof($scope.incomes[0].amount)); + + + + for (i = 0; i < $scope.expenses.length; i++) { + $scope.expenses[i].amount = parseInt($scope.expenses[i].amount); + + /*if ($scope.expenses[i].category == "Rent") { + console.log("here"); + $scope.Rent = $scope.Rent + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Travel") { + $scope.Travel = $scope.Travel + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Office") { + $scope.Office = $scope.Office + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Shopping") { + $scope.Shopping = $scope.Shopping + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Study") { + $scope.Study = $scope.Study + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Party") { + $scope.Party = $scope.Party + $scope.expenses[i].amount; + }*/ + + switch($scope.expenses[i].category) + { + case "Rent" : $scope.Rent = $scope.Rent + $scope.expenses[i].amount; + break; + case "Travel" : $scope.Travel = $scope.Travel + $scope.expenses[i].amount; + break; + case "Office" : $scope.Office = $scope.Office + $scope.expenses[i].amount; + break; + case "Shopping" : $scope.Shopping = $scope.Shopping + $scope.expenses[i].amount; + break; + case "Study" : $scope.Study = $scope.Study + $scope.expenses[i].amount; + break; + case "Party" : $scope.Party = $scope.Party + $scope.expenses[i].amount; + break; + } + + + } + + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/settings/settings.js b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/settings/settings.js new file mode 100644 index 00000000..f21fbd33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/settings/settings.js @@ -0,0 +1,6 @@ +var settings = angular.module('settings', ['ngRoute']); + +settings.controller('settingsController', function($scope, expenseService, incomeService) { + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/styles/final.css b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/styles/final.css new file mode 100644 index 00000000..42b42950 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/styles/final.css @@ -0,0 +1,119 @@ +.main { + height: 100vh; + width: 1080px; + margin-left: 10%; +} +#upper { + background-color: #00006c; + height: 84px; + min-height: 83px; + width: 100%; +} +#lower { + height: 90%; + width: 80%; + background-color: #f4f4f4; + position: absolute; +} +.heading { + font-family: sans-serif; + font-weight: 600; + color: white; + text-align: center; + padding-top: 20px; + font-size: 26px; +} +.block_letters { + font-size: 26px; + color: #4E4A4A; + background-color: #bcbcbc; + font-weight: 500; + font-family: Expert-Sans-Light, verdana, arial, helvetica, clean, sans-serif; + margin-top: 10px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} +#report { + border: 1px solid black; + padding: 5px; +} +#report td { + border: 1px solid black; + padding: 5px; +} +#report th { + border: 1px solid black; + background-color: #bcbcbc; + text-align: center; + padding: 5px; +} +a { + display: inline-block; +} +.input_tables td { + padding-top: .3em; + padding-left: .5em; + padding-bottom: .3em; +} +.error_msg { + color: red; + font-size: 14px; + padding-bottom: 7px; +} +.navigation { + height: 40px; + width: 160px; + color: #e1e0e0; + background-color: #00006c; +} +.navigation:hover { + background-color: #e1e0e0; + color: #00006c; + /* transition: box-shadow 0.3s; */ +} +#panel { + height: 10%; + width: 100%; + text-align: center; + color: black; + background-color: #00006c; + font-size: 17px; +} +.tabs { + display: inline-block; + height: 45px; + width: 270px; + margin-left: 60px; + padding-top: 10px; + margin-top: 10px; + text-align: center; + color: black; + border-radius: 10px; + background-color: #bcbcbc; + font-size: 17px; +} + +.notification +{ +height : 500px; +width : 500px; +background-color : white; +} + +.card +{ + height : 180px; + width : 160px; + text-align : center; + background-color : #979aa7; + border : solid #6a6b6f 1px; + display : inline-block; + margin-left :10px; + +} + +.card p +{ +background-color : #b6bac9; +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/expense.html b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/expense.html new file mode 100644 index 00000000..5ac326c0 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/expense.html @@ -0,0 +1,101 @@ + +

Total income :

+

Total expense :

+

Total balance :

+

Add expenses

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Payer
Payee
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Category : + + * +
Mode of payment : + + * +
Date : + * +
Notes : +
+
+
+

Expense Table

+ + + + + + + + + + + + + + + + + + + + + + + +
DatePayerPayeeAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.payer}}{{expense.payee}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/final.html b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/final.html new file mode 100644 index 00000000..547157cb --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/final.html @@ -0,0 +1,50 @@ + + + Expense Manager + + + + + + + + + + + + + + + + + + +
+
+

Expense Manager

+
+
+
+ + + + + +
+
+ +
+ +
+
+ + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/home.html b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/home.html new file mode 100644 index 00000000..058ebbc1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/home.html @@ -0,0 +1,10 @@ + +

Total income :

+ +

Total expense :

+ +

Total balance :

+ + +

Upcoming Expenses

+ diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/income.html b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/income.html new file mode 100644 index 00000000..76fcb69b --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/income.html @@ -0,0 +1,77 @@ +

Total income :

+

Total expense :

+

Total balance :

+
+

Add income

+ + + + + + + + + + + + + + + + + + + + + + + +
Payer
Payee
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Income Type : + + * +
+ +
+
+
+

Income Table

+ + + + + + + + + + + + + + + + + +
PayerPayeeIncome AmountIncome SourceEditDelete
+ {{income.payer}} + + {{income.payee}} + + {{income.amount}} + + {{income.type}} +
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/notifications.html b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/notifications.html new file mode 100644 index 00000000..d554af16 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/notifications.html @@ -0,0 +1,26 @@ +
+ +
+

Payer : {{expense.payer}}

+

Payer : {{expense.payee}}

+

Amount : {{expense.amount}}

+

Category : {{expense.category}}

+

Payment : {{expense.payment}}

+

Notes : {{expense.notes}}

+

Interval : {{expense.interval}}

+ + +
+
+

Payer : {{expense.payer}}

+

Payer : {{expense.payee}}

+

Amount : {{expense.amount}}

+

Category : {{expense.category}}

+

Payment : {{expense.payment}}

+

Notes : {{expense.notes}}

+

Interval : {{expense.interval}}

+ + +
+
+ \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/report.html b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/report.html new file mode 100644 index 00000000..d74df2cd --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/report.html @@ -0,0 +1,68 @@ +

Income Summary

+ + + + + + + + + + + + + + + + + +
Income AmountIncome Source
+ {{total_Salary}} + Salary
+ {{total_Business}} + Business
+ {{total_interest}} + Interest
+

Expense Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AmountCategory
+ {{Rent}} + Rent
+ {{Travel}} + Travel
+ {{Office}} + Office
+ {{Party}} + Party
+ {{Shopping}} + Shopping
+ {{Study}} + Study
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/settings.html b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/settings.html new file mode 100644 index 00000000..c49edcb2 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8(3)/Expense Manager/WebContent/views/settings.html @@ -0,0 +1,95 @@ +

Add Recurring Expenses

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Category : + + * +
Interval : + + * +
Mode of payment : + + * +
Date : + * +
Notes : +
+
+
+

Recurring Expense Table

+ + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
+ diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.classpath b/assignments/Mitali Kadu/Session 8/Expense Manager/.classpath new file mode 100644 index 00000000..daee9425 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/.name b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/.name new file mode 100644 index 00000000..ce93c1f3 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/.name @@ -0,0 +1 @@ +Expense Manager \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/compiler.xml b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/compiler.xml new file mode 100644 index 00000000..96cc43ef --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/copyright/profiles_settings.xml b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/misc.xml b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/misc.xml new file mode 100644 index 00000000..b3e03d16 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/misc.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/modules.xml b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/modules.xml new file mode 100644 index 00000000..99dee4c7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/uiDesigner.xml b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/vcs.xml b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/workspace.xml b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/workspace.xml new file mode 100644 index 00000000..61028322 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.idea/workspace.xml @@ -0,0 +1,1028 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1453447362433 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.project b/assignments/Mitali Kadu/Session 8/Expense Manager/.project new file mode 100644 index 00000000..fad355a9 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.project @@ -0,0 +1,36 @@ + + + Expense Manager + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/.jsdtscope b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/.jsdtscope new file mode 100644 index 00000000..92e666d7 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.jdt.core.prefs b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.common.component b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..9d37b221 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..b3f07fe4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/Expense Manager.iml b/assignments/Mitali Kadu/Session 8/Expense Manager/Expense Manager.iml new file mode 100644 index 00000000..22928023 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/Expense Manager.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/META-INF/MANIFEST.MF b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/app.js b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/app.js new file mode 100644 index 00000000..881f16cb --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/app.js @@ -0,0 +1,315 @@ +var myApp = angular.module('myApp', ['ngRoute', 'ngMessages', 'report', 'income', 'expense']); + +myApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { + + $routeProvider + .when('/final', { + templateUrl: 'home.html', + }) + + .when('/income', { + templateUrl: 'income.html', + controller: 'incomeController' + }) + .when('/expense', { + templateUrl: 'expense.html', + controller: 'expenseController' + }) + + .when('/report', { + templateUrl: 'report.html', + controller: 'reportController' + }) + .when('/settings', { + templateUrl: 'settings.html', + controller: 'mainController' + }) + + .otherwise({ + redirectTo: '/final' + }); + + +}]); + + + +myApp.service('incomeService', function($http) { + this.total_income = 0; + this.total_expense = 0; + this.total_balance = 0; + this.edit_income = ""; + this.edit_expense = ""; + + this.income_table = false; + this.expense_table = false; + this.enter_income = false; + this.enter_expense = false; + this.enter_rec_expense = false; + this.edit_rec_expense = ""; + this.edit_income = ""; + this.incomes = []; + this.rec_expenses = []; + this.expenses = []; + + + this.temp = new Object(); + this.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + this.temp_3 = new Object(); + this.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + + + + this.temp_2 = new Object(); + this.temp_2 = { + amount: "", + type: "" + }; + + + + + this.add_income = function() { + + if (this.temp_2.amount != "" && this.temp_2.type != "") { + this.enter_income = false; + this.total_income = this.temp_2.amount + this.total_income; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_income === "") { + this.incomes.push(this.temp_2); + + + } else { + + this.total_income = this.total_income - this.incomes[this.edit_income].amount; + + this.total_balance = this.total_income - this.total_expense; + this.incomes[this.edit_income] = this.temp_2; + + } + this.temp_2 = new Object(); + this.temp_2 = { + amount: "", + type: "" + }; + } else { + this.enter_income = true; + return false; + } + + this.edit_income = ""; + + }; + + this.add_expense = function() { + + if (this.temp.amount != "" && this.temp.date != "" && this.temp.category != "" && this.temp.payment != "") { + this.enter_expense = false; + this.total_expense = this.temp.amount + this.total_expense; + this.total_balance = this.total_income - this.total_expense; + if (this.edit_expense === "") { + this.expenses.push(this.temp); + + } else { + this.total_expense = this.total_expense - this.expenses[this.edit_expense].amount; + + this.total_balance = this.total_income - this.total_expense; + + this.expenses[this.edit_expense] = this.temp; + + } + this.temp = new Object(); + this.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + } else { + this.enter_expense = true; + return false; + } + + this.edit_expense = ""; + + }; + +this.add_rec_expense = function() { + + if (this.temp_3.amount != "" && this.temp_3.date != "" && this.temp_3.category != "" && this.temp_3.payment != "" && this.temp_3.interval != "") { + this.enter_rec_expense = false; + if (this.edit_rec_expense === "") { + this.rec_expenses.push(this.temp_3); + + } else { + this.rec_expenses[this.edit_rec_expense] = this.temp_3; + + } + this.temp_3 = new Object(); + this.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + } else { + this.enter_rec_expense = true; + return false; + } + + this.edit_rec_expense = ""; + + }; + + +}); + +myApp.factory('myService', function($http) { + return { + + getIncome: function() { + return $http.get("http://demo3547198.mockable.io/income"); + } + + }; +}); + +myApp.factory('expenseService', function($http) { + return { + + getExpense: function() { + return $http.get("http://demo3547198.mockable.io/expense"); + } + + }; +}); + + +myApp.controller('mainController', function($scope, incomeService, $http, myService, expenseService) { + + $scope.mainInfo = ""; + $scope.edit_expense = ""; + $scope.edit_rec_expense = ""; + $scope.rec_expenses = []; + $scope.rec_expenses = incomeService.rec_expenses; + $scope.rec_expense_table = false; + $scope.total_income = incomeService.total_income; + console.log("from main : " + incomeService.total_income); + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + $scope.d = new Date(); + $scope.current_date = $scope.d.getDate(); + $scope.current_month = $scope.d.getMonth(); + + + console.log($scope.n); + $scope.interval = ""; + $scope.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + + myService.getIncome().then(function(response) { + incomeService.incomes = response.data; + $scope.incomes = incomeService.incomes; + console.log($scope.incomes[1].amount); + for (i = 0; i < $scope.incomes.length; i++) { + $scope.total_income = $scope.incomes[i].amount + $scope.total_income; + } + incomeService.total_income = $scope.total_income; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + expenseService.getExpense().then(function(response) { + incomeService.expenses = response.data; + + for (i = 0; i < response.data.length; i++) { + + $scope.created_time = new Date(incomeService.expenses[i].date); + incomeService.expenses[i].date = $scope.created_time; + } + + $scope.expenses = incomeService.expenses; + + for (i = 0; i < $scope.expenses.length; i++) { + + $scope.total_expense = $scope.expenses[i].amount + $scope.total_expense; + console.log($scope.total_expense); + + } + incomeService.total_expense = $scope.total_expense; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + + }); + + + }); + + $scope.add_rec_expense = function (){ + $scope.d_2 = new Date($scope.temp_3.date); + $scope.temp_3.only_date = $scope.d_2.getDate(); + $scope.temp_3.only_month = $scope.d_2.getMonth(); + + console.log("here " + $scope.temp_3.only_month); + + incomeService.temp_3 = $scope.temp_3; + incomeService.add_rec_expense(); + $scope.rec_expenses = incomeService.rec_expenses; + + $scope.temp_3 = { + amount: "", + date: "", + category: "", + interval : "", + only_date : "", + only_month : "", + payment: "", + notes: "" + }; + }; + + $scope.show_rec_expense = function() { + $scope.rec_expense_table = true; + }; + + + + }); + + +myApp.directive('expenseNotifications', function() { + return { + /* template: 'Name: {{customer.name}} Address: {{customer.address}}'*/ + restrict : 'E', + templateUrl : 'notifications.html', + + }}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/data.json b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/data.json new file mode 100644 index 00000000..2d4113d8 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/data.json @@ -0,0 +1,4 @@ +{ + + "type" : "salary" +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/expense.html b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/expense.html new file mode 100644 index 00000000..ef27ff15 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/expense.html @@ -0,0 +1,87 @@ + +

Total income :

+

Total expense :

+

Total balance :

+

Add expenses

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Category : + + * +
Mode of payment : + + * +
Date : + * +
Notes : +
+
+
+

Expense Table

+ + + + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/expense.js b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/expense.js new file mode 100644 index 00000000..c81114a0 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/expense.js @@ -0,0 +1,133 @@ +var expense = angular.module('expense', ['ngRoute']); + +expense.controller('expenseController', function($scope, expenseService, incomeService, $http) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.temp = new Object(); + $scope.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + + + + + $scope.expenses = incomeService.expenses; + + $scope.temp = incomeService.temp; + $scope.show_expense = function() { + $scope.expense_table = true; + }; + + $scope.add_expense = function() { + incomeService.temp = $scope.temp; + console.log("**" + incomeService.temp.date + "**"); + incomeService.add_expense(); + if ($scope.edit_expense === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/expense', + data: $scope.temp + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses.push($scope.message); + incomeService.total_expense = incomeService.total_expense + $scope.message.amount; + $scope.total_expense = incomeService.total_expense; + incomeService.total_balance = incomeService.total_balance - $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + $scope.temp = { + amount: "", + date: "", + category: "", + payment: "", + notes: "" + }; + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.edit_expense_form = function(index) { + + $scope.edit_expense = index; + incomeService.edit_expense = index; + $scope.temp.amount = incomeService.expenses[index].amount; + $scope.temp.category = incomeService.expenses[index].category; + $scope.temp.date = incomeService.expenses[index].date; + $scope.temp.payment = incomeService.expenses[index].payment; + $scope.temp.notes = incomeService.expenses[index].notes; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + + + + + incomeService.total_expense = incomeService.total_expense + $scope.message.amount - incomeService.expenses[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.expenses[0].amount; + $scope.created_time = new Date($scope.message.date); + $scope.message.date = $scope.created_time; + + incomeService.expenses[0] = $scope.message; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + $scope.expenses = incomeService.expenses; + + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + + + $scope.delete_expense_form = function(index) { + + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/expense', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_expense = $scope.total_expense - $scope.expenses[$scope.message.index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice($scope.message.index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + + $scope.total_expense = $scope.total_expense - $scope.expenses[index].amount; + incomeService.total_expense = $scope.total_expense; + $scope.expenses.splice(index, 1); + incomeService.expenses = $scope.expenses; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/final.css b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/final.css new file mode 100644 index 00000000..149aa000 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/final.css @@ -0,0 +1,102 @@ +.main { + height: 100vh; + width: 1080px; + margin-left: 10%; +} +#upper { + background-color: #00006c; + height: 84px; + min-height: 83px; + width: 100%; +} +#lower { + height: 90%; + width: 80%; + background-color: #f4f4f4; + position: absolute; +} +.heading { + font-family: sans-serif; + font-weight: 600; + color: white; + text-align: center; + padding-top: 20px; + font-size: 26px; +} +.block_letters { + font-size: 26px; + color: #4E4A4A; + background-color: #bcbcbc; + font-weight: 500; + font-family: Expert-Sans-Light, verdana, arial, helvetica, clean, sans-serif; + margin-top: 10px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} +#report { + border: 1px solid black; + padding: 5px; +} +#report td { + border: 1px solid black; + padding: 5px; +} +#report th { + border: 1px solid black; + background-color: #bcbcbc; + text-align: center; + padding: 5px; +} +a { + display: inline-block; +} +.input_tables td { + padding-top: .3em; + padding-left: .5em; + padding-bottom: .3em; +} +.error_msg { + color: red; + font-size: 14px; + padding-bottom: 7px; +} +.navigation { + height: 40px; + width: 160px; + color: #e1e0e0; + background-color: #00006c; +} +.navigation:hover { + background-color: #e1e0e0; + color: #00006c; + /* transition: box-shadow 0.3s; */ +} +#panel { + height: 10%; + width: 100%; + text-align: center; + color: black; + background-color: #00006c; + font-size: 17px; +} +.tabs { + display: inline-block; + height: 45px; + width: 270px; + margin-left: 60px; + padding-top: 10px; + margin-top: 10px; + text-align: center; + color: black; + border-radius: 10px; + background-color: #bcbcbc; + font-size: 17px; +} + +.notification +{ +height : 500px; +width : 500px; +background-color : white; +} \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/final.html b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/final.html new file mode 100644 index 00000000..f6bcc419 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/final.html @@ -0,0 +1,51 @@ + + + Expense Manager + + + + + + + + + + + + + + + + + + +
+
+

Expense Manager

+
+
+
+ + + + + +
+
+ +
+ + +
+
+ + \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/home.html b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/home.html new file mode 100644 index 00000000..0b7a0918 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/home.html @@ -0,0 +1,10 @@ + +

Total income :

+ +

Total expense :

+ +

Total balance :

+ + +

Upcoming Expenses

+ diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/income.html b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/income.html new file mode 100644 index 00000000..402f99b6 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/income.html @@ -0,0 +1,61 @@ +

Total income :

+

Total expense :

+

Total balance :

+
+

Add income

+ + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Income Type : + + * +
+ +
+
+
+

Income Table

+ + + + + + + + + + + + + + +
Income AmountIncome SourceEditDelete
+ {{income.amount}} + + {{income.type}} +
+
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/income.js b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/income.js new file mode 100644 index 00000000..4cc15d7e --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/income.js @@ -0,0 +1,115 @@ +var income = angular.module('income', ['ngRoute', 'myApp']); + + +income.controller('incomeController', function($scope, incomeService, $http, myService) { + $scope.edit_income = ""; + $scope.temp_2 = { + amount: "", + type: "" + }; + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.enter_income = incomeService.enter_income; + $scope.enter_expense = incomeService.enter_expense; + + $scope.incomes = incomeService.incomes; + + $scope.add_income = function() { + incomeService.temp_2 = $scope.temp_2; + + if ($scope.edit_income === "") { + $http({ + method: 'POST', + url: 'http://demo3547198.mockable.io/income', + data: $scope.temp_2 + }).then(function successCallback(response) { + + $scope.message = response.data; + incomeService.incomes.push($scope.message); + incomeService.total_income = incomeService.total_income + $scope.message.amount; + $scope.total_income = incomeService.total_income; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount; + $scope.total_balance = incomeService.total_balance; + }, function errorCallback(response) { + alert("failure message"); + }) + + } + incomeService.add_income(); + $scope.temp_2 = { + amount: "", + type: "" + }; + + + $scope.total_income = incomeService.total_income; + $scope.total_expense = incomeService.total_expense; + $scope.total_balance = incomeService.total_balance; + + + }; + + $scope.show_income = function() { + $scope.income_table = true; + }; + + + + $scope.edit_income_form = function(index) { + + $scope.edit_income = index; + incomeService.edit_income = index; + $scope.temp_2.amount = incomeService.incomes[index].amount; + $scope.temp_2.type = incomeService.incomes[index].type; + $http({ + method: 'PUT', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + + incomeService.total_income = incomeService.total_income + $scope.message.amount - incomeService.incomes[0].amount; + incomeService.total_balance = incomeService.total_balance + $scope.message.amount - incomeService.incomes[0].amount; + + incomeService.incomes[0] = $scope.message; + $scope.total_income = incomeService.total_income; + $scope.total_balance = incomeService.total_balance; + $scope.incomes = incomeService.incomes; + + }, function errorCallback(response) { + alert("failure message"); + }) + + }; + + $scope.delete_income_form = function(index) { + $http({ + method: 'DELETE', + url: 'http://demo3547198.mockable.io/income', + }).then(function successCallback(response) { + $scope.message = response.data; + $scope.total_income = $scope.total_income - $scope.incomes[$scope.message.index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice($scope.message.index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }, function errorCallback(response) { + alert("failure message"); + }) + + $scope.total_income = $scope.total_income - $scope.incomes[index].amount; + incomeService.total_income = $scope.total_income; + $scope.incomes.splice(index, 1); + incomeService.incomes = $scope.incomes; + $scope.total_balance = $scope.total_income - $scope.total_expense; + incomeService.total_balance = $scope.total_balance; + + }; + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/notifications.html b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/notifications.html new file mode 100644 index 00000000..4658efea --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/notifications.html @@ -0,0 +1,26 @@ +
+ + + + + + + + + + + + + + + + + + + + + + +
AmountCategoryMode of PaymentNotesInterval
{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}{{expense.interval}}
{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}{{expense.interval}}
+
+ \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/report.html b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/report.html new file mode 100644 index 00000000..d74df2cd --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/report.html @@ -0,0 +1,68 @@ +

Income Summary

+ + + + + + + + + + + + + + + + + +
Income AmountIncome Source
+ {{total_Salary}} + Salary
+ {{total_Business}} + Business
+ {{total_interest}} + Interest
+

Expense Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AmountCategory
+ {{Rent}} + Rent
+ {{Travel}} + Travel
+ {{Office}} + Office
+ {{Party}} + Party
+ {{Shopping}} + Shopping
+ {{Study}} + Study
\ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/report.js b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/report.js new file mode 100644 index 00000000..2ffe6ec1 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/report.js @@ -0,0 +1,54 @@ +var report = angular.module('report', ['ngRoute', 'myApp']); + +report.controller('reportController', function($scope, incomeService) { + $scope.income_table = incomeService.income_table; + $scope.expense_table = incomeService.expense_table; + $scope.total_Salary = 0; + $scope.total_Business = 0; + $scope.total_interest = 0; + $scope.Rent = 0; + $scope.Travel = 0; + $scope.Shopping = 0; + $scope.Study = 0; + $scope.Party = 0; + $scope.Office = 0; + $scope.incomes = incomeService.incomes; + $scope.expenses = incomeService.expenses; + for (i = 0; i < $scope.incomes.length; i++) { + $scope.incomes[i].amount = parseInt($scope.incomes[i].amount); + if ($scope.incomes[i].type == "Salary") { + console.log("here"); + $scope.total_Salary = $scope.total_Salary + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "Business") { + $scope.total_Business = $scope.total_Business + $scope.incomes[i].amount; + } else if ($scope.incomes[i].type == "interest") { + $scope.total_interest = $scope.total_interest + $scope.incomes[i].amount; + } + } + console.log(typeof($scope.incomes[0].amount)); + + + + for (i = 0; i < $scope.expenses.length; i++) { + $scope.expenses[i].amount = parseInt($scope.expenses[i].amount); + if ($scope.expenses[i].category == "Rent") { + console.log("here"); + $scope.Rent = $scope.Rent + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Travel") { + $scope.Travel = $scope.Travel + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Office") { + $scope.Office = $scope.Office + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Shopping") { + $scope.Shopping = $scope.Shopping + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Study") { + $scope.Study = $scope.Study + $scope.expenses[i].amount; + } else if ($scope.expenses[i].category == "Party") { + $scope.Party = $scope.Party + $scope.expenses[i].amount; + } + + + } + + + +}); \ No newline at end of file diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/settings.html b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/settings.html new file mode 100644 index 00000000..d578900e --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/settings.html @@ -0,0 +1,97 @@ +

Add Recurring Expenses

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enter the amount : + * + + Enter only positive numbers upto 2 decimals + +
Category : + + * +
Interval : + + * +
Mode of payment : + + * +
Date : + * +
Notes : +
+
+
+

Recurring Expense Table

+ + + + + + + + + + + + + + + + + + + +
DateAmountCategoryMode of PaymentEditDeleteNotes
{{expense.date | date: 'yyyy-MM-dd (HH:mm)'}}{{expense.amount}}{{expense.category}}{{expense.payment}}{{expense.notes}}
+
+ diff --git a/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/settings/settings.js b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/settings/settings.js new file mode 100644 index 00000000..f21fbd33 --- /dev/null +++ b/assignments/Mitali Kadu/Session 8/Expense Manager/WebContent/settings/settings.js @@ -0,0 +1,6 @@ +var settings = angular.module('settings', ['ngRoute']); + +settings.controller('settingsController', function($scope, expenseService, incomeService) { + + +}); \ No newline at end of file