diff --git a/app/index.html b/app/index.html index ff98ed6..42e9359 100644 --- a/app/index.html +++ b/app/index.html @@ -4,6 +4,11 @@ + + + + + Acufuel @@ -204,5 +209,12 @@ + + + + + + + \ No newline at end of file diff --git a/app/js/app.js b/app/js/app.js index 1a37e11..d4b4894 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -1,7 +1,7 @@ 'use strict'; - angular.module('acufuel', ['ngCookies', 'ngResource', 'ui.router', 'ngAnimate', 'ui.bootstrap', 'xeditable', 'ui.toggle', 'ngTable', 'ui.select2', 'ckeditor', 'ui.calendar', 'ngDragDrop']) + angular.module('acufuel', ['nvd3', 'ngCookies', 'ngResource', 'ui.router', 'ngAnimate', 'ui.bootstrap', 'xeditable', 'ui.toggle', 'ngTable', 'ui.select2', 'ckeditor', 'ui.calendar', 'ngDragDrop']) .config(['$httpProvider', function($httpProvider) { $httpProvider.defaults.withCredentials = true; diff --git a/app/partials/analytics/analytics.controller.js b/app/partials/analytics/analytics.controller.js index 4d6a08a..350c822 100644 --- a/app/partials/analytics/analytics.controller.js +++ b/app/partials/analytics/analytics.controller.js @@ -5,7 +5,169 @@ .controller('analyticsController', ['$scope',function($scope) { - $scope.test = "Testing..."; + $(document).ready(function(){ + $(function () { + + $.getJSON('https://www.highcharts.com/samples/data/jsonp.php?filename=us-population-density.json&callback=?', function (data) { + + // Make codes uppercase to match the map data + $.each(data, function () { + this.code = this.code.toUpperCase(); + }); + + // Instanciate the map + Highcharts.mapChart('container', { + + chart: { + borderWidth: 1 + }, + + title: { + text: 'US population density (/km²)' + }, + + legend: { + layout: 'horizontal', + borderWidth: 0, + backgroundColor: 'rgba(255,255,255,0.85)', + floating: true, + verticalAlign: 'top', + y: 25 + }, + + mapNavigation: { + enabled: true + }, + + colorAxis: { + min: 1, + type: 'logarithmic', + minColor: '#EEEEFF', + maxColor: '#000022', + stops: [ + [0, '#EFEFFF'], + [0.67, '#4444FF'], + [1, '#000022'] + ] + }, + + series: [{ + animation: { + duration: 1000 + }, + data: data, + mapData: Highcharts.maps['countries/us/us-all'], + joinBy: ['postal-code', 'code'], + dataLabels: { + enabled: true, + color: '#FFFFFF', + format: '{point.code}' + }, + name: 'Population density', + tooltip: { + pointFormat: '{point.code}: {point.value}/km²' + } + }] + }); + }); + }); + }) + + $scope.optionsmfs = { + chart: { + type: 'discreteBarChart', + height: 450, + margin : { + top: 20, + right: 20, + bottom: 60, + left: 55, + }, + color: ["#FF7F0E"], + x: function(d){ return d.label; }, + y: function(d){ return d.value; }, + showValues: false, + valueFormat: function(d){ + return d3.format(',.4f')(d); + }, + transitionDuration: 500, + xAxis: { + axisLabel: 'X Axis' + }, + yAxis: { + axisLabel: 'Y Axis', + axisLabelDistance: 30 + } + } + }; + + $scope.datamfs = [{ + key: "Cumulative Return", + values: [ + { "label" : "A" , "value" : 229.765957771107 }, + { "label" : "B" , "value" : 0 }, + { "label" : "C" , "value" : 32.807804682612 }, + { "label" : "D" , "value" : 196.45946739256 }, + { "label" : "E" , "value" : 0.19434030906893 }, + { "label" : "F" , "value" : 98.079782601442 }, + { "label" : "G" , "value" : 13.925743130903 }, + { "label" : "H" , "value" : 5.1387322875705 }, + { "label" : "I" , "value" : 4.1387322875705 }, + { "label" : "J" , "value" : 23.1387322875705 }, + { "label" : "K" , "value" : 233.1387322875705 }, + { "label" : "L" , "value" : 22.1387322875705 }, + ] + }] + + $scope.optionspc = { + chart: { + type: 'pieChart', + height: 500, + minColor: ["#FEDFC3"], + maxColor: ["#FF7F0E"], + x: function(d){return d.key;}, + y: function(d){return d.y;}, + showLabels: false, + segmentShowStroke : false, + animationSteps : 20, + animationEasing : "linear", + animateScale : true, + duration: 500, + labelThreshold: 0.01, + labelSunbeamLayout: true, + legend: { + margin: { + top: 5, + right: 35, + bottom: 5, + left: 0 + } + } + } + }; + + $scope.datapc = [ + { + key: "A", + y: 3 + }, + { + key: "B", + y: 2 + }, + { + key: "C", + y: 3 + }, + { + key: "D", + y: 1 + }, + { + key: "E", + y: 5 + } + ]; }]); diff --git a/app/partials/analytics/analytics.html b/app/partials/analytics/analytics.html index 34fcc44..f6657dc 100644 --- a/app/partials/analytics/analytics.html +++ b/app/partials/analytics/analytics.html @@ -22,11 +22,11 @@
-

Bar Chart

+

Monthly Fuel Sales

-
+
@@ -34,73 +34,20 @@
-
-
-
- -

Regional PAP Pricing

-
- -
-
-
- -
- -
-
-
-
-
- -

Cirque Stats

-
- -
-
-
-
-
-
-
-
-
- -
- -
- -
- -
-
-
- -

Area Chart

-
- -
-
- -
- -
- -
- +
-

Pie Chart

+

Customer Sources

-
+
@@ -108,42 +55,25 @@
-
-
-
- -

Donut Chart

-
- -
-
- -
- -
- -
- -
-
-
+ +
-

Line Chart

+

Regional PAP Pricing

-
- +
- +
- + +
- +
@@ -166,71 +96,5 @@ \ No newline at end of file diff --git a/app/partials/customers/customers.controller.js b/app/partials/customers/customers.controller.js index 8e4f60b..5b41a96 100644 --- a/app/partials/customers/customers.controller.js +++ b/app/partials/customers/customers.controller.js @@ -6,18 +6,19 @@ function customersController($scope, $rootScope, $uibModal, $filter, $http, $state, CustomersService, ViewCompanyService, NgTableParams) { $(document).ready(function() { - $('#example').DataTable(); + // $('#example').DataTable(); }); $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) $scope.reset2 = function(){ $("input").val(""); $scope.removeMarginValidation(); } + $scope.data = {}; $scope.aircraft = {}; $scope.data.activate = true; - $scope.showLoader = false; + $scope.showLoader = true; getAllCompanies(); /*function getAllCompanies(){ @@ -87,6 +88,7 @@ }, { data: $scope.companyList }); + $scope.showLoader = false; }) } @@ -119,8 +121,10 @@ getData(); function getData(){ + $scope.showLoader = true; CustomersService.getAircraftMake().then(function(result) { $scope.aircraftMakeList = result; + $scope.showLoader = false; }) } diff --git a/app/partials/customers/customers.html b/app/partials/customers/customers.html index 8a0e1ea..fbebd0d 100644 --- a/app/partials/customers/customers.html +++ b/app/partials/customers/customers.html @@ -69,6 +69,9 @@ background: #449d44; } +
+ +
diff --git a/app/partials/dashboard/dashboard.controller.js b/app/partials/dashboard/dashboard.controller.js index 2d47f59..6495113 100644 --- a/app/partials/dashboard/dashboard.controller.js +++ b/app/partials/dashboard/dashboard.controller.js @@ -53,6 +53,22 @@ } } } + var str =""+ $scope.newFuelPricing[i].name + if(str.startsWith("J")){ + $scope.newFuelPricing[i].jeta = true; + var str1 = str.substring(0,5) + var str2 = str.substring(6, str.length) + $scope.newFuelPricing[i].name = str1 + $scope.newFuelPricing[i].namejetrest = str2 + + + }else if(str.startsWith("100")){ + $scope.newFuelPricing[i].avgas = true; + var str1 = str.substring(0,5) + var str2 = str.substring(6, str.length) + $scope.newFuelPricing[i].name = str1 + $scope.newFuelPricing[i].nameavgasrest = str2 + } } $scope.showLoader = false; }) diff --git a/app/partials/dashboard/dashboard.html b/app/partials/dashboard/dashboard.html index f1612d7..f7ea43b 100644 --- a/app/partials/dashboard/dashboard.html +++ b/app/partials/dashboard/dashboard.html @@ -140,16 +140,17 @@

Price Manager

- + + + +
-
-

Update Fuel Price Here

+
+

Deployed Fuel Prices

@@ -161,30 +162,29 @@ - + + {{fuelPricing.fuelPricing.cost}} + + {{fuelPricing.fuelPricing.papMargin}} +
- {{fuelPricing.name}} + {{fuelPricing.name}} + {{fuelPricing.namejetrest}} + {{fuelPricing.name}} + {{fuelPricing.nameavgasrest}} - - - - - $ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin}} + $ {{fuelPricing.fuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2 }} - + {{fuelPricing.fuelPricing.expirationDate}}
-
-
- -
-
+
diff --git a/app/partials/updateFuelManager/updateFuelManager.html b/app/partials/updateFuelManager/updateFuelManager.html index 2bd5030..7ba2847 100644 --- a/app/partials/updateFuelManager/updateFuelManager.html +++ b/app/partials/updateFuelManager/updateFuelManager.html @@ -8,7 +8,7 @@
-
+
@@ -33,7 +33,7 @@ - + {{fuelPricing.name}} {{fuelPricing.namejetrest}} @@ -53,7 +53,7 @@ - $ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.futureFuelPricing.papMargin | number : 2}} + $ {{fuelPricing.futureFuelPricing.cost -- fuelPricing.fuelPricing.papMargin | number : 2}} @@ -104,7 +104,7 @@ - +
@@ -204,7 +204,7 @@
-

Update Fuel Price Here

+

Deployed Fuel Prices

@@ -216,7 +216,7 @@ - +
{{fuelPricing.name}} {{fuelPricing.namejetrest}} @@ -238,11 +238,7 @@
-
-
- -
-
+
diff --git a/app/partials/viewCompany/viewCompany.controller.js b/app/partials/viewCompany/viewCompany.controller.js index b167880..1c9be67 100644 --- a/app/partials/viewCompany/viewCompany.controller.js +++ b/app/partials/viewCompany/viewCompany.controller.js @@ -30,6 +30,7 @@ $scope.companyData.masterMargin = ""; getCompanyDetail(); function getCompanyDetail(){ + $scope.showLoader = true; ViewCompanyService.getCompany(companyId).then(function(result) { $scope.companyData = result; if(result.margin != null){ @@ -54,6 +55,7 @@ } $scope.companyStatus = function(){ + $scope.showLoader = true; var statusData = "status=" + $scope.companyData.activate; ViewCompanyService.changeStatus(companyId, statusData).then(function(result) { if(result.success){ @@ -64,6 +66,7 @@ getContactList(); } }) + $scope.showLoader = false; } @@ -107,6 +110,7 @@ $scope.contactData = {}; $scope.contactData.contactList = []; $scope.addContact = function(){ + $scope.showLoader = true; $scope.data.companyId = companyId; $scope.contactData.contactList.push($scope.data); ViewCompanyService.addContact($scope.contactData).then(function(result) { @@ -126,13 +130,16 @@ }) } }) + $scope.showLoader = false; } getData(); function getData(){ + $scope.showLoader = true; CustomersService.getAircraftMake().then(function(result) { $scope.aircraftMakeList = result; }) + $scope.showLoader = false; } $scope.clearAircrafts = function(){ diff --git a/app/partials/viewCompany/viewCompany.html b/app/partials/viewCompany/viewCompany.html index b7d7edb..f499368 100644 --- a/app/partials/viewCompany/viewCompany.html +++ b/app/partials/viewCompany/viewCompany.html @@ -354,7 +354,7 @@ - + {{fuel.name}} ${{fuel.fuelPricing.cost}} diff --git a/app/partials/viewFuelVendor/viewFuelVendor.html b/app/partials/viewFuelVendor/viewFuelVendor.html index 6d351c3..e048977 100644 --- a/app/partials/viewFuelVendor/viewFuelVendor.html +++ b/app/partials/viewFuelVendor/viewFuelVendor.html @@ -231,7 +231,7 @@ - + {{fuel.name}} ${{fuel.fuelPricing.cost}} diff --git a/bower.json b/bower.json index b23d16e..27bbbdd 100644 --- a/bower.json +++ b/bower.json @@ -15,7 +15,7 @@ "tests" ], "dependencies": { - "angular": "^1.6.2", + "angular": "^1.6.4", "angular-animate": "^1.6.2", "angular-route": "^1.6.2", "jquery": "^3.1.1", @@ -37,6 +37,10 @@ "angular-ui-select2": "^0.0.5", "angular-ckeditor": "^1.0.3", "angular-ui-calendar": "^1.0.2", - "angular-dragdrop": "^1.0.13" + "angular-dragdrop": "^1.0.13", + "angular-nvd3": "^1.0.9" + }, + "resolutions": { + "angular": "^1.x" } }