Commit e5448f30270992a145fd061fb6f29b0ec72e9ca1

Authored by Kuldeep Arora
1 parent 4c25c98b52
Exists in master

delete fuelvendor UI

app/partials/FuelVendors/FuelVendors.controller.js
1 'use strict'; 1 'use strict';
2 2
3 //Load controller 3 //Load controller
4 angular.module('acufuel') 4 angular.module('acufuel')
5 5
6 .controller('FuelVendorsController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'FuelVendorsService', 'CustomersService', 'ViewFuelVendorService', 'NgTableParams', FuelVendorsController]); 6 .controller('FuelVendorsController', ['$scope', '$rootScope', '$uibModal', '$filter', '$http', 'FuelVendorsService', 'CustomersService', 'ViewFuelVendorService', 'NgTableParams', FuelVendorsController]);
7 7
8 function FuelVendorsController($scope, $rootScope, $uibModal, $filter, $http, FuelVendorsService, CustomersService, ViewFuelVendorService, NgTableParams) { 8 function FuelVendorsController($scope, $rootScope, $uibModal, $filter, $http, FuelVendorsService, CustomersService, ViewFuelVendorService, NgTableParams) {
9 9
10 /*$(document).ready(function() { 10 /*$(document).ready(function() {
11 $scope.showLoader = true; 11 $scope.showLoader = true;
12 $('#example').DataTable(); 12 $('#example').DataTable();
13 $scope.showLoader = false; 13 $scope.showLoader = false;
14 });*/ 14 });*/
15 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')) 15 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId'))
16 $scope.reset = function(){ 16 $scope.reset = function(){
17 $("input").val(""); 17 $("input").val("");
18 $scope.removeMarginValidation(); 18 $scope.removeMarginValidation();
19 } 19 }
20 20
21 $scope.data = {}; 21 $scope.data = {};
22 $scope.data.activate = true; 22 $scope.data.activate = true;
23 $scope.showLoader = false; 23 $scope.showLoader = false;
24 getAllVendor(); 24 getAllVendor();
25 25
26 function getAllVendor(){ 26 function getAllVendor(){
27 $scope.showLoader = true; 27 $scope.showLoader = true;
28 FuelVendorsService.getAllVendor().then(function(result) { 28 FuelVendorsService.getAllVendor().then(function(result) {
29 console.log(result) 29 //console.log(result)
30 $scope.companyList = result; 30 $scope.companyList = result;
31 for (var i = 0; i < $scope.companyList.length; i++) { 31 for (var i = 0; i < $scope.companyList.length; i++) {
32 if ($scope.companyList[i].companyContact != null) { 32 if ($scope.companyList[i].companyContact != null) {
33 if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) { 33 if ($scope.companyList[i].companyContact.contactNumber != null || $scope.companyList[i].companyContact.contactNumber != undefined) {
34 $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber; 34 $scope.companyList[i].newContactNumber = $scope.companyList[i].companyContact.contactNumber;
35 } 35 }
36 } 36 }
37 if ($scope.companyList[i].primaryContact != null) { 37 if ($scope.companyList[i].primaryContact != null) {
38 if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) { 38 if ($scope.companyList[i].primaryContact.firstName != null && $scope.companyList[i].primaryContact.lastName != null) {
39 $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName; 39 $scope.companyList[i].primaryContactName = $scope.companyList[i].primaryContact.firstName + ' ' + $scope.companyList[i].primaryContact.lastName;
40 } 40 }
41 } 41 }
42 if ($scope.companyList[i].margin != null) { 42 if ($scope.companyList[i].margin != null) {
43 if ($scope.companyList[i].margin.marginName != null) { 43 if ($scope.companyList[i].margin.marginName != null) {
44 $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id; 44 $scope.companyList[i].masterMargin = $scope.companyList[i].margin.id;
45 } 45 }
46 } 46 }
47 $scope.companyList[i].source = "Vendor" 47 $scope.companyList[i].source = "Vendor"
48 } 48 }
49 $scope.displayVendorList = new NgTableParams({ 49 $scope.displayVendorList = new NgTableParams({
50 page: 1, 50 page: 1,
51 count: 10, 51 count: 10,
52 }, { 52 }, {
53 data: $scope.companyList 53 data: $scope.companyList
54 }); 54 });
55 $scope.showLoader = false; 55 $scope.showLoader = false;
56 }) 56 })
57 } 57 }
58 58
59 $scope.editMargin = function(vendor){ 59 $scope.editMargin = function(vendor){
60 $scope.showLoader = true; 60 $scope.showLoader = true;
61 var companyMargin = "vendorName=" + vendor.vendorName + "&masterMargin=" + vendor.masterMargin 61 var companyMargin = "vendorName=" + vendor.vendorName + "&masterMargin=" + vendor.masterMargin
62 + "&addressOne=" + vendor.addressOne + "&addressTwo=" + vendor.addressTwo + "&city=" + vendor.city + "&state=" 62 + "&addressOne=" + vendor.addressOne + "&addressTwo=" + vendor.addressTwo + "&city=" + vendor.city + "&state="
63 + vendor.state + "&country=" + vendor.country + "&zipcode=" + vendor.zipcode + "&internalNote=" 63 + vendor.state + "&country=" + vendor.country + "&zipcode=" + vendor.zipcode + "&internalNote="
64 + vendor.internalNote + "&certificateType=" + vendor.certificateType + "&baseTenant=" + vendor.baseTenant 64 + vendor.internalNote + "&certificateType=" + vendor.certificateType + "&baseTenant=" + vendor.baseTenant
65 + "&fuelerlinxvendor=" + vendor.fuelerlinxvendor + "&contractFuelVendor=" + vendor.contractFuelVendor 65 + "&fuelerlinxvendor=" + vendor.fuelerlinxvendor + "&contractFuelVendor=" + vendor.contractFuelVendor
66 + "&activate=" + vendor.activate + "&baseIcao=" + vendor.baseIcao + "&vendorId=" + vendor.id; 66 + "&activate=" + vendor.activate + "&baseIcao=" + vendor.baseIcao + "&vendorId=" + vendor.id;
67 67
68 ViewFuelVendorService.updateContact(companyMargin).then(function(result) { 68 ViewFuelVendorService.updateContact(companyMargin).then(function(result) {
69 if(result != null && result.success){ 69 if(result != null && result.success){
70 $scope.showLoader = false; 70 $scope.showLoader = false;
71 toastr.success(''+result.success+'', { 71 toastr.success(''+result.success+'', {
72 closeButton: true 72 closeButton: true
73 }) 73 })
74 }else{ 74 }else{
75 $scope.showLoader = false; 75 $scope.showLoader = false;
76 toastr.error(''+result.statusText+'', { 76 toastr.error(''+result.statusText+'', {
77 closeButton: true 77 closeButton: true
78 }) 78 })
79 } 79 }
80 }) 80 })
81 } 81 }
82 82
83 // CustomersService.getMargin().then(function(result) { 83 // CustomersService.getMargin().then(function(result) {
84 // $scope.marginList = result; 84 // $scope.marginList = result;
85 // }) 85 // })
86 86
87 CustomersService.getJetMargin($scope.userProfileId).then(function(result) { 87 CustomersService.getJetMargin($scope.userProfileId).then(function(result) {
88 $scope.jetMarginList = result; 88 $scope.jetMarginList = result;
89 }) 89 })
90 90
91 CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { 91 CustomersService.getAvgMargin($scope.userProfileId).then(function(result) {
92 $scope.avgsMarginList = result; 92 $scope.avgsMarginList = result;
93 }) 93 })
94 94
95 $scope.showCompanyError = false; 95 $scope.showCompanyError = false;
96 $scope.showMarginError = false; 96 $scope.showMarginError = false;
97 97
98 $scope.removeValidation = function(){ 98 $scope.removeValidation = function(){
99 $scope.showCompanyError = false; 99 $scope.showCompanyError = false;
100 $('.companyNameInput').removeClass('customErrorInput'); 100 $('.companyNameInput').removeClass('customErrorInput');
101 } 101 }
102 102
103 $scope.removeMarginValidation = function(){ 103 $scope.removeMarginValidation = function(){
104 $scope.showMarginError = false; 104 $scope.showMarginError = false;
105 $('.marginSelectBox').removeClass('customErrorInput'); 105 $('.marginSelectBox').removeClass('customErrorInput');
106 } 106 }
107 107
108 $scope.marginFilterOptions = []; 108 $scope.marginFilterOptions = [];
109 CustomersService.getJetMargin($scope.userProfileId).then(function(result) { 109 CustomersService.getJetMargin($scope.userProfileId).then(function(result) {
110 $scope.jetMarginList = result; 110 $scope.jetMarginList = result;
111 $scope.marginFilterOptions.push({ 111 $scope.marginFilterOptions.push({
112 'id': '', 'title': 'Show All' 112 'id': '', 'title': 'Show All'
113 }); 113 });
114 for (var i = 0; i < result.length; i++) { 114 for (var i = 0; i < result.length; i++) {
115 $scope.marginFilterOptions.push({ 115 $scope.marginFilterOptions.push({
116 'id': result[i].id, 116 'id': result[i].id,
117 'title': result[i].marginName 117 'title': result[i].marginName
118 }) 118 })
119 } 119 }
120 }) 120 })
121 121
122 $scope.addFirstData = function(sel, step){ 122 $scope.addFirstData = function(sel, step){
123 // console.log($scope.data) 123 // console.log($scope.data)
124 if($scope.data.vendorName == undefined){ 124 if($scope.data.vendorName == undefined){
125 $scope.showCompanyError = true; 125 $scope.showCompanyError = true;
126 $('.companyNameInput').addClass('customErrorInput'); 126 $('.companyNameInput').addClass('customErrorInput');
127 }else if($scope.data.masterMargin == undefined){ 127 }else if($scope.data.masterMargin == undefined){
128 $scope.showMarginError = true; 128 $scope.showMarginError = true;
129 $('.marginSelectBox').addClass('customErrorInput'); 129 $('.marginSelectBox').addClass('customErrorInput');
130 }else{ 130 }else{
131 var vendorData = "vendorName=" + $scope.data.vendorName + "&masterMargin=" + $scope.data.masterMargin 131 var vendorData = "vendorName=" + $scope.data.vendorName + "&masterMargin=" + $scope.data.masterMargin
132 + "&addressOne=" + $scope.data.addressOne + "&addressTwo=" + $scope.data.addressTwo + "&city=" + $scope.data.city + "&state=" 132 + "&addressOne=" + $scope.data.addressOne + "&addressTwo=" + $scope.data.addressTwo + "&city=" + $scope.data.city + "&state="
133 + $scope.data.state + "&country=" + $scope.data.country + "&zipcode=" + $scope.data.zipcode + "&internalNote=" 133 + $scope.data.state + "&country=" + $scope.data.country + "&zipcode=" + $scope.data.zipcode + "&internalNote="
134 + $scope.data.internalNote + "&certificateType=" + $scope.data.certificateType + "&baseTenant=" + $scope.data.baseTenant 134 + $scope.data.internalNote + "&certificateType=" + $scope.data.certificateType + "&baseTenant=" + $scope.data.baseTenant
135 + "&fuelerlinxCustomer=" + $scope.data.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.data.contractFuelVendor 135 + "&fuelerlinxCustomer=" + $scope.data.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.data.contractFuelVendor
136 + "&activate=" + $scope.data.activate + "&baseIcao=" + $scope.data.baseIcao; 136 + "&activate=" + $scope.data.activate + "&baseIcao=" + $scope.data.baseIcao;
137 137
138 FuelVendorsService.addVendor($scope.data).then(function(result) { 138 FuelVendorsService.addVendor($scope.data).then(function(result) {
139 $scope.accountId = result; 139 $scope.accountId = result;
140 $('#vendor-modal-3').modal('hide'); 140 $('#vendor-modal-3').modal('hide');
141 getAllVendor(); 141 getAllVendor();
142 }) 142 })
143 } 143 }
144 144
145 } 145 }
146 146
147 $scope.exportVendors = function() { 147 $scope.exportVendors = function() {
148 $scope.showLoader = true; 148 $scope.showLoader = true;
149 var fileName = "vendors.csv"; 149 var fileName = "vendors.csv";
150 var a = document.createElement("a"); 150 var a = document.createElement("a");
151 document.body.appendChild(a); 151 document.body.appendChild(a);
152 FuelVendorsService.exportVendors().then(function(result) { 152 FuelVendorsService.exportVendors().then(function(result) {
153 var file = new Blob([result], {type: 'application/csv'}); 153 var file = new Blob([result], {type: 'application/csv'});
154 var fileURL = URL.createObjectURL(file); 154 var fileURL = URL.createObjectURL(file);
155 a.href = fileURL; 155 a.href = fileURL;
156 a.download = fileName; 156 a.download = fileName;
157 a.click(); 157 a.click();
158 $scope.showLoader = false; 158 $scope.showLoader = false;
159 }) 159 })
160 } 160 }
161 161
162 } 162 }
app/partials/viewFuelVendor/viewFuelVendor.controller.js
1 1
2 'use strict'; 2 'use strict';
3 3
4 //Load controller 4 //Load controller
5 angular.module('acufuel') 5 angular.module('acufuel')
6 6
7 .controller('ViewFuelVendorController', ['$scope','$uibModal', '$stateParams', 'ViewFuelVendorService', 'CustomersService', 'ViewCompanyService', 'updateFuelManagerService', function($scope , $uibModal, $stateParams, ViewFuelVendorService, CustomersService, ViewCompanyService, updateFuelManagerService) { 7 .controller('ViewFuelVendorController', ['$scope','$uibModal', '$stateParams', 'ViewFuelVendorService', 'CustomersService', 'ViewCompanyService', 'updateFuelManagerService','$state', function($scope , $uibModal, $stateParams, ViewFuelVendorService, CustomersService, ViewCompanyService, updateFuelManagerService,$state) {
8 $scope.data = {}; 8 $scope.data = {};
9 $scope.data.priceEmail = true; 9 $scope.data.priceEmail = true;
10 $scope.primayData = {}; 10 $scope.primayData = {};
11 $scope.showLoader = false; 11 $scope.showLoader = false;
12 $scope.showUpdateBtn = false; 12 $scope.showUpdateBtn = false;
13 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId')); 13 $scope.userProfileId = JSON.parse(localStorage.getItem('userProfileId'));
14 14
15 $(document).ready(function() { 15 $(document).ready(function() {
16 $("#reset").click(function() { 16 $("#reset").click(function() {
17 $("input").val(""); 17 $("input").val("");
18 }); 18 });
19 }); 19 });
20 20
21 var vendorId = $stateParams.id; 21 var vendorId = $stateParams.id;
22 $scope.vendorData = {}; 22 $scope.vendorData = {};
23 getVendorDetail(); 23 getVendorDetail();
24 24
25 function getVendorDetail(){ 25 function getVendorDetail(){
26 ViewFuelVendorService.getFuelOrder(vendorId).then(function(result) { 26 ViewFuelVendorService.getFuelOrder(vendorId).then(function(result) {
27 $scope.vendorData = result; 27 $scope.vendorData = result;
28 if(result.margin != null){ 28 if(result.margin != null){
29 $scope.vendorData.masterMargin = result.margin.id; 29 $scope.vendorData.masterMargin = result.margin.id;
30 } 30 }
31 if(result.marginAVGAS != null){ 31 if(result.marginAVGAS != null){
32 $scope.vendorData.avgasMargin = result.marginAVGAS.id; 32 $scope.vendorData.avgasMargin = result.marginAVGAS.id;
33 } 33 }
34 }) 34 })
35 } 35 }
36 36
37 37
38 $scope.changeCompanyStatus = function(){ 38 $scope.changeCompanyStatus = function(){
39 $('#deleteVendor').css('display', 'block'); 39 $('#deleteVendor').css('display', 'block');
40 if($scope.vendorData.activate == true){ 40 if($scope.vendorData.activate == true){
41 $scope.statusMessage = 'Please confirm! Are you sure you want to ACTIVATE this Vendor?' 41 $scope.statusMessage = 'Please confirm! Are you sure you want to ACTIVATE this Vendor?'
42 }else{ 42 }else{
43 $scope.statusMessage = 'Please confirm! Are you sure you want to DEACTIVATE this Vendor?' 43 $scope.statusMessage = 'Please confirm! Are you sure you want to DEACTIVATE this Vendor?'
44 } 44 }
45 } 45 }
46 46
47 $scope.companyStatus = function(){ 47 $scope.companyStatus = function(){
48 var statusData = "status=" + $scope.vendorData.activate; 48 var statusData = "status=" + $scope.vendorData.activate;
49 ViewFuelVendorService.changeStatus(vendorId, statusData).then(function(result) { 49 ViewFuelVendorService.changeStatus(vendorId, statusData).then(function(result) {
50 if(result.success){ 50 if(result.success){
51 $('#deleteVendor').css('display', 'none'); 51 $('#deleteVendor').css('display', 'none');
52 toastr.success(''+result.success+'', { 52 toastr.success(''+result.success+'', {
53 closeButton: true 53 closeButton: true
54 }) 54 })
55 getContactList(); 55 getContactList();
56 } 56 }
57 }) 57 })
58 } 58 }
59 59
60 $scope.cancelStatus = function(){ 60 $scope.cancelStatus = function(){
61 $('#deleteVendor').css('display', 'none'); 61 $('#deleteVendor').css('display', 'none');
62 $scope.vendorData.activate = !$scope.vendorData.activate; 62 $scope.vendorData.activate = !$scope.vendorData.activate;
63 } 63 }
64 64
65 getContactList(); 65 getContactList();
66 function getContactList(){ 66 function getContactList(){
67 ViewFuelVendorService.getContact(vendorId).then(function(result) { 67 ViewFuelVendorService.getContact(vendorId).then(function(result) {
68 $scope.vendorContactList = result; 68 $scope.vendorContactList = result;
69 }) 69 })
70 } 70 }
71 71
72 $scope.contactData = {}; 72 $scope.contactData = {};
73 $scope.contactData.contactList = []; 73 $scope.contactData.contactList = [];
74 $scope.addContact = function(){ 74 $scope.addContact = function(){
75 $scope.data.companyId = vendorId; 75 $scope.data.companyId = vendorId;
76 $scope.contactData.contactList.push($scope.data); 76 $scope.contactData.contactList.push($scope.data);
77 ViewFuelVendorService.addContact($scope.contactData).then(function(result) { 77 ViewFuelVendorService.addContact($scope.contactData).then(function(result) {
78 if(result.status == 200){ 78 if(result.status == 200){
79 $('#contact-modal-3').modal('hide'); 79 $('#contact-modal-3').modal('hide');
80 $scope.primayData.id = result.data; 80 $scope.primayData.id = result.data;
81 $scope.sendPrimaryContact(); 81 $scope.sendPrimaryContact();
82 $scope.contactData.contactList = []; 82 $scope.contactData.contactList = [];
83 $scope.data = {}; 83 $scope.data = {};
84 $scope.data.priceEmail = true;
84 getContactList(); 85 getContactList();
85 }else{ 86 }else{
86 toastr.error(''+result.statusText+'', { 87 toastr.error(''+result.statusText+'', {
87 closeButton: true 88 closeButton: true
88 }) 89 })
89 } 90 }
90 }) 91 })
91 } 92 }
92 93
93 $scope.showNoteData = true; 94 $scope.showNoteData = true;
94 $scope.showCompanyName = true; 95 $scope.showCompanyName = true;
95 $scope.showAddress = true; 96 $scope.showAddress = true;
96 $scope.showNote = function(){ 97 $scope.showNote = function(){
97 $scope.showNoteData = false; 98 $scope.showNoteData = false;
98 $scope.showUpdateBtn = true; 99 $scope.showUpdateBtn = true;
99 } 100 }
100 101
101 $scope.company = function(){ 102 $scope.company = function(){
102 $scope.showCompanyName = false; 103 $scope.showCompanyName = false;
103 $scope.showUpdateBtn = true; 104 $scope.showUpdateBtn = true;
104 } 105 }
105 106
106 $scope.addressChange = function(){ 107 $scope.addressChange = function(){
107 $scope.showAddress = false; 108 $scope.showAddress = false;
108 $scope.showUpdateBtn = true; 109 $scope.showUpdateBtn = true;
109 } 110 }
110 111
111 $scope.editData = function(inputName) { 112 $scope.editData = function(inputName) {
112 console.log($scope.vendorData) 113 //console.log($scope.vendorData)
113 $scope.showLoader = true; 114 $scope.showLoader = true;
114 // if(inputName == 'showNoteData'){ 115 // if(inputName == 'showNoteData'){
115 // $scope.showNoteData = true; 116 // $scope.showNoteData = true;
116 // }else if(inputName == 'showCompanyName'){ 117 // }else if(inputName == 'showCompanyName'){
117 // $scope.showCompanyName = true; 118 // $scope.showCompanyName = true;
118 // }else if(inputName == 'showAddress'){ 119 // }else if(inputName == 'showAddress'){
119 // $scope.showAddress = true; 120 // $scope.showAddress = true;
120 // } 121 // }
121 $scope.showNoteData = true; 122 $scope.showNoteData = true;
122 $scope.showCompanyName = true; 123 $scope.showCompanyName = true;
123 $scope.showAddress = true; 124 $scope.showAddress = true;
124 125
125 var vendorData = "vendorName=" + $scope.vendorData.vendorName + "&masterMargin=" + $scope.vendorData.masterMargin 126 var vendorData = "vendorName=" + $scope.vendorData.vendorName + "&masterMargin=" + $scope.vendorData.masterMargin
126 + "&addressOne=" + $scope.vendorData.addressOne + "&addressTwo=" + $scope.vendorData.addressTwo + "&city=" + $scope.vendorData.city + "&state=" 127 + "&addressOne=" + $scope.vendorData.addressOne + "&addressTwo=" + $scope.vendorData.addressTwo + "&city=" + $scope.vendorData.city + "&state="
127 + $scope.vendorData.state + "&country=" + $scope.vendorData.country + "&zipcode=" + $scope.vendorData.zipcode + "&internalNote=" 128 + $scope.vendorData.state + "&country=" + $scope.vendorData.country + "&zipcode=" + $scope.vendorData.zipcode + "&internalNote="
128 + $scope.vendorData.internalNote + "&certificateType=" + $scope.vendorData.certificateType + "&baseTenant=" + $scope.vendorData.baseTenant 129 + $scope.vendorData.internalNote + "&certificateType=" + $scope.vendorData.certificateType + "&baseTenant=" + $scope.vendorData.baseTenant
129 + "&fuelerlinxCustomer=" + $scope.vendorData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.vendorData.contractFuelVendor 130 + "&fuelerlinxCustomer=" + $scope.vendorData.fuelerlinxCustomer + "&contractFuelVendor=" + $scope.vendorData.contractFuelVendor
130 + "&activate=" + $scope.vendorData.activate + "&baseIcao=" + $scope.vendorData.baseIcao + "&vendorId=" + vendorId; 131 + "&activate=" + $scope.vendorData.activate + "&baseIcao=" + $scope.vendorData.baseIcao + "&vendorId=" + vendorId;
131 132
132 ViewFuelVendorService.updateContact(vendorData).then(function(result) { 133 ViewFuelVendorService.updateContact(vendorData).then(function(result) {
133 if(result != null && result.success){ 134 if(result != null && result.success){
134 toastr.success(''+result.success+'', { 135 toastr.success(''+result.success+'', {
135 closeButton: true 136 closeButton: true
136 }) 137 })
137 $scope.showUpdateBtn = false; 138 $scope.showUpdateBtn = false;
138 }else{ 139 }else{
139 toastr.error(''+result.statusText+'', { 140 toastr.error(''+result.statusText+'', {
140 closeButton: true 141 closeButton: true
141 }) 142 })
142 $scope.showUpdateBtn = true; 143 $scope.showUpdateBtn = true;
143 } 144 }
144 $scope.showLoader = false; 145 $scope.showLoader = false;
145 }) 146 })
146 147
147 } 148 }
148 149
149 $scope.cancelData = function(){ 150 $scope.cancelData = function(){
150 $scope.showNoteData = true; 151 $scope.showNoteData = true;
151 $scope.showCompanyName = true; 152 $scope.showCompanyName = true;
152 $scope.showAddress = true; 153 $scope.showAddress = true;
153 $scope.showUpdateBtn = false; 154 $scope.showUpdateBtn = false;
154 } 155 }
155 156
156 $scope.sendMail = function(){ 157 $scope.sendMail = function(){
157 $('#confirm2').css('display', 'none'); 158 $('#confirm2').css('display', 'none');
158 ViewFuelVendorService.sendMail(vendorId).then(function(result) { 159 ViewFuelVendorService.sendMail(vendorId).then(function(result) {
159 if(result != null && result.success){ 160 if(result != null && result.success){
160 toastr.success(''+result.success+'', { 161 toastr.success(''+result.success+'', {
161 closeButton: true 162 closeButton: true
162 }) 163 })
163 }else{ 164 }else{
164 toastr.error(''+result.statusText+'', { 165 toastr.error(''+result.statusText+'', {
165 closeButton: true 166 closeButton: true
166 }) 167 })
167 } 168 }
168 }) 169 })
169 } 170 }
170 171
171 $scope.openConfirmMail = function(){ 172 $scope.openConfirmMail = function(){
172 $('#confirm2').css('display', 'block'); 173 $('#confirm2').css('display', 'block');
173 } 174 }
174 175
175 176
176 $scope.cancelAndCloseConfirm = function(){ 177 $scope.cancelAndCloseConfirm = function(){
177 $('#confirm2').css('display', 'none'); 178 $('#confirm2').css('display', 'none');
178 } 179 }
179 180
180 $scope.primaryContact = false; 181 $scope.primaryContact = false;
181 $scope.cancelPrimaryContact = function(){ 182 $scope.cancelPrimaryContact = function(){
182 $('#primaryContact').css('display', 'none'); 183 $('#primaryContact').css('display', 'none');
183 $scope.primaryContact = false; 184 $scope.primaryContact = false;
184 } 185 }
185 186
186 $scope.checkPrimaryContact = function(){ 187 $scope.checkPrimaryContact = function(){
187 if($scope.primaryContact == true){ 188 if($scope.primaryContact == true){
188 $scope.primaryContact = true; 189 $scope.primaryContact = true;
189 ViewFuelVendorService.checkPrimaryContact(vendorId).then(function(result) { 190 ViewFuelVendorService.checkPrimaryContact(vendorId).then(function(result) {
190 console.log(result) 191 //console.log(result)
191 if(result.status == 422){ 192 if(result.status == 422){
192 $('#primaryContact').css('display', 'block'); 193 $('#primaryContact').css('display', 'block');
193 } 194 }
194 }) 195 })
195 } 196 }
196 } 197 }
197 198
198 $scope.sendPrimaryContact = function(){ 199 $scope.sendPrimaryContact = function(){
199 $('#primaryContact').css('display', 'none'); 200 $('#primaryContact').css('display', 'none');
200 if($scope.primayData.id != null || $scope.primayData.id != undefined){ 201 if($scope.primayData.id != null || $scope.primayData.id != undefined){
201 var priamryContactData = "vendorContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact; 202 var priamryContactData = "vendorContactId=" + $scope.primayData.id + "&primary=" + $scope.primaryContact;
202 203
203 ViewFuelVendorService.addPrimaryContact(priamryContactData).then(function(result) { 204 ViewFuelVendorService.addPrimaryContact(priamryContactData).then(function(result) {
204 console.log(result) 205 // console.log(result)
205 }) 206 })
206 } 207 }
207 208
208 } 209 }
209 210
210 var newContactName = ""; 211 var newContactName = "";
211 $scope.updateData = "" 212 $scope.updateData = ""
212 $scope.showContact = function(data, value){ 213 $scope.showContact = function(data, value){
213 $('#updateContact').css('display', 'block'); 214 $('#updateContact').css('display', 'block');
214 $scope.updateData = data; 215 $scope.updateData = data;
215 newContactName = value; 216 newContactName = value;
216 console.log($scope.updateData) 217 // console.log($scope.updateData)
217 if($scope.updateData.email == null){ 218 if($scope.updateData.email == null){
218 $scope.updateData.content = data.contactNumber; 219 $scope.updateData.content = data.contactNumber;
219 }else{ 220 }else{
220 $scope.updateData.content = data.email; 221 $scope.updateData.content = data.email;
221 } 222 }
222 } 223 }
223 224
224 $scope.acceptUpdateField = function(){ 225 $scope.acceptUpdateField = function(){
225 console.log($scope.updateData) 226 // console.log($scope.updateData)
226 if($scope.updateData.content == undefined){ 227 if($scope.updateData.content == undefined){
227 toastr.error('Please add some content', { 228 toastr.error('Please add some content', {
228 closeButton: true 229 closeButton: true
229 }) 230 })
230 }else{ 231 }else{
231 if(newContactName == 'phone'){ 232 if(newContactName == 'phone'){
232 var updateCustomData = "vendorId=" + vendorId + "&contactNumber=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id 233 var updateCustomData = "vendorId=" + vendorId + "&contactNumber=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id
233 + "&title=" + $scope.updateData.title; 234 + "&title=" + $scope.updateData.title;
234 }else{ 235 }else{
235 var updateCustomData = "vendorId=" + vendorId + "&email=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id 236 var updateCustomData = "vendorId=" + vendorId + "&email=" + $scope.updateData.content + "&contactId=" + $scope.updateData.id
236 + "&title=" + $scope.updateData.title; 237 + "&title=" + $scope.updateData.title;
237 } 238 }
238 ViewFuelVendorService.updateCustomField(updateCustomData).then(function(result) { 239 ViewFuelVendorService.updateCustomField(updateCustomData).then(function(result) {
239 console.log(result) 240 // console.log(result)
240 if(result != null && result.success){ 241 if(result != null && result.success){
241 $('#updateContact').css('display', 'none'); 242 $('#updateContact').css('display', 'none');
242 getVendorDetail(); 243 getVendorDetail();
243 } 244 }
244 }) 245 })
245 } 246 }
246 } 247 }
247 248
248 $scope.cancelUpdateField = function(){ 249 $scope.cancelUpdateField = function(){
249 $('#updateContact').css('display', 'none'); 250 $('#updateContact').css('display', 'none');
250 } 251 }
251 252
252 $scope.showEditTier2 = function(number){ 253 $scope.showEditTier2 = function(number){
253 console.log(number) 254 // console.log(number)
254 $scope.contactNumber = number; 255 $scope.contactNumber = number;
255 } 256 }
256 257
257 258
258 259
259 var contactName = ''; 260 var contactName = '';
260 $scope.addCustom = function(value){ 261 $scope.addCustom = function(value){
261 console.log(value) 262 // console.log(value)
262 if(value != null){ 263 if(value != null){
263 contactName = value; 264 contactName = value;
264 $('#customField').css('display', 'block'); 265 $('#customField').css('display', 'block');
265 } 266 }
266 $scope.custom = {}; 267 $scope.custom = {};
267 } 268 }
268 269
269 $scope.cancelCustomField = function(){ 270 $scope.cancelCustomField = function(){
270 $('#customField').css('display', 'none'); 271 $('#customField').css('display', 'none');
271 } 272 }
272 273
273 $scope.acceptCustomField = function(){ 274 $scope.acceptCustomField = function(){
274 if($scope.custom.content == undefined){ 275 if($scope.custom.content == undefined){
275 toastr.error('Please add some content', { 276 toastr.error('Please add some content', {
276 closeButton: true 277 closeButton: true
277 }) 278 })
278 }else{ 279 }else{
279 if(contactName == 'phone'){ 280 if(contactName == 'phone'){
280 var customData = "vendorId=" + vendorId + "&contactNumber=" + $scope.custom.content 281 var customData = "vendorId=" + vendorId + "&contactNumber=" + $scope.custom.content
281 + "&title=" + $scope.custom.title; 282 + "&title=" + $scope.custom.title;
282 }else{ 283 }else{
283 var customData = "vendorId=" + vendorId + "&email=" + $scope.custom.content 284 var customData = "vendorId=" + vendorId + "&email=" + $scope.custom.content
284 + "&title=" + $scope.custom.title; 285 + "&title=" + $scope.custom.title;
285 } 286 }
286 ViewFuelVendorService.addCustomField(customData).then(function(result) { 287 ViewFuelVendorService.addCustomField(customData).then(function(result) {
287 console.log(result) 288 // console.log(result)
288 if(result.status == 200){ 289 if(result.status == 200){
289 $('#customField').css('display', 'none'); 290 $('#customField').css('display', 'none');
290 getVendorDetail(); 291 getVendorDetail();
291 } 292 }
292 }) 293 })
293 } 294 }
294 } 295 }
295 296
296 updateFuelManagerService.getFuelPricingNew().then(function(result) { 297 updateFuelManagerService.getFuelPricingNew().then(function(result) {
297 $scope.fuelPricing = result; 298 $scope.fuelPricing = result;
298 for (var i = 0; i<$scope.fuelPricing.length; i++) { 299 for (var i = 0; i<$scope.fuelPricing.length; i++) {
299 if ($scope.fuelPricing[i].fuelPricing.expirationDate != null) { 300 if ($scope.fuelPricing[i].fuelPricing.expirationDate != null) {
300 $scope.fuelPricing[i].fuelPricing.expirationDate = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); 301 $scope.fuelPricing[i].fuelPricing.expirationDate = new Date($scope.fuelPricing[i].fuelPricing.expirationDate);
301 var newTime = new Date($scope.fuelPricing[i].fuelPricing.expirationDate); 302 var newTime = new Date($scope.fuelPricing[i].fuelPricing.expirationDate);
302 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12 303 var dmonth = newTime.getUTCMonth() + 1; //months from 1-12
303 var dday = newTime.getUTCDate(); 304 var dday = newTime.getUTCDate();
304 var dyear = newTime.getUTCFullYear(); 305 var dyear = newTime.getUTCFullYear();
305 $scope.fuelPricing[i].fuelPricing.expirationDate = dmonth+'/'+dday+'/'+dyear; 306 $scope.fuelPricing[i].fuelPricing.expirationDate = dmonth+'/'+dday+'/'+dyear;
306 } 307 }
307 } 308 }
308 }) 309 })
309 310
310 311
311 CustomersService.getJetMargin($scope.userProfileId).then(function(result) { 312 CustomersService.getJetMargin($scope.userProfileId).then(function(result) {
312 $scope.jetMarginList = result; 313 $scope.jetMarginList = result;
313 }) 314 })
314 315
315 CustomersService.getAvgMargin($scope.userProfileId).then(function(result) { 316 CustomersService.getAvgMargin($scope.userProfileId).then(function(result) {
316 $scope.avgsMarginList = result; 317 $scope.avgsMarginList = result;
317 }) 318 })
318 319
319 $scope.changePriceEmail = function(id, index){ 320 $scope.changePriceEmail = function(id, index){
320 event.stopPropagation(); 321 event.stopPropagation();
321 var contactId = id; 322 var contactId = id;
322 var statusData = "status=" + $scope.vendorContactList[index].priceEmail; 323 var statusData = "status=" + $scope.vendorContactList[index].priceEmail;
323 ViewFuelVendorService.changePriceEmail(contactId, statusData).then(function(result) { 324 ViewFuelVendorService.changePriceEmail(contactId, statusData).then(function(result) {
324 if(result.success){ 325 if(result.success){
325 $('#toogleMail').css('display', 'block'); 326 $('#toogleMail').css('display', 'block');
326 if($scope.vendorContactList[index].priceEmail == true){ 327 if($scope.vendorContactList[index].priceEmail == true){
327 $scope.messageText = 'You have enabled price distribution for this contact'; 328 $scope.messageText = 'You have enabled price distribution for this contact';
328 }else{ 329 }else{
329 $scope.messageText = 'You have disabled price distribution for this contact'; 330 $scope.messageText = 'You have disabled price distribution for this contact';
330 } 331 }
331 } 332 }
332 }) 333 })
333 } 334 }
334 335
335 $scope.cancelToogle = function(){ 336 $scope.cancelToogle = function(){
336 $('#toogleMail').css('display', 'none'); 337 $('#toogleMail').css('display', 'none');
337 } 338 }
338 339
339 $scope.updateOmit = function(fuel, omit) { 340 $scope.updateOmit = function(fuel, omit) {
340 $scope.fuelData = {}; 341 $scope.fuelData = {};
341 $scope.fuelData.expirationDate = new Date(fuel.expirationDate); 342 $scope.fuelData.expirationDate = new Date(fuel.expirationDate);
342 $scope.fuelData.id = fuel.id; 343 $scope.fuelData.id = fuel.id;
343 $scope.fuelData.omit = fuel.omit; 344 $scope.fuelData.omit = fuel.omit;
344 $scope.fuelData.papMargin = fuel.papMargin; 345 $scope.fuelData.papMargin = fuel.papMargin;
345 $scope.fuelData.papTotal = fuel.papTotal; 346 $scope.fuelData.papTotal = fuel.papTotal;
346 $scope.fuelData.cost = fuel.cost; 347 $scope.fuelData.cost = fuel.cost;
347 ViewFuelVendorService.omitFuelPricing($scope.fuelData).then(function(result) { 348 ViewFuelVendorService.omitFuelPricing($scope.fuelData).then(function(result) {
348 if(result.success){ 349 if(result.success){
349 toastr.success(''+result.success+'', { 350 toastr.success(''+result.success+'', {
350 closeButton: true 351 closeButton: true
351 }) 352 })
352 }else{ 353 }else{
353 toastr.error(''+result.statusText+'', { 354 toastr.error(''+result.statusText+'', {
354 closeButton: true 355 closeButton: true
355 }) 356 })
356 } 357 }
357 }) 358 })
358 } 359 }
359 360
361 var deleteVendorId = "";
362 $scope.deleteVendor = function(vendorDataid){
363 $('#delete2').css('display', 'block');
364 // console.log("asda",vendorDataid)
365 deleteVendorId = vendorDataid;
366 }
367
368 $scope.deleteVendorData = function(){
369 ViewFuelVendorService.deleteFuelVendor(deleteVendorId).then(function(result) {
370
371 $('#delete2').css('display', 'none');
372 if(result.success){
373 toastr.success(''+result.success+'', {
374 closeButton: true
375
376 })
377 }else{
378 toastr.error(''+result.statusText+'', {
379 closeButton: true
380
381 })
382 }
383 $state.go('app.FuelVendors')
384 })
385 }
386 $scope.cancelDelete = function(){
387 $('#delete2').css('display', 'none');
388 }
389
390
360 }]); 391 }]);
app/partials/viewFuelVendor/viewFuelVendor.html
1 <style> 1 <style>
2 .subnavbar .mainnav > li:nth-child(3) > a{ 2 .subnavbar .mainnav > li:nth-child(3) > a{
3 color: #ff9900; 3 color: #ff9900;
4 } 4 }
5 .widget-content{ 5 .widget-content{
6 padding: 10px !important; 6 padding: 10px !important;
7 } 7 }
8 .widget-content input[type="text"], .widget-content select{ 8 .widget-content input[type="text"], .widget-content select{
9 height: 31px; 9 height: 31px;
10 padding: 0; 10 padding: 0;
11 } 11 }
12 .new-label span{ 12 .new-label span{
13 float: left; 13 float: left;
14 line-height: 31px; 14 line-height: 31px;
15 } 15 }
16 .new-label span:first-child{ 16 .new-label span:first-child{
17 margin-right: 5px; 17 margin-right: 5px;
18 font-weight: bold; 18 font-weight: bold;
19 } 19 }
20 .new-label span:last-child{ 20 .new-label span:last-child{
21 margin-left: 5px; 21 margin-left: 5px;
22 } 22 }
23 .new-label select{ 23 .new-label select{
24 display: -webkit-inline-box; 24 display: -webkit-inline-box;
25 display: inline-box; 25 display: inline-box;
26 float: left; 26 float: left;
27 } 27 }
28 .new-address p{ 28 .new-address p{
29 margin-bottom: 0; 29 margin-bottom: 0;
30 } 30 }
31 .new-add-select{ 31 .new-add-select{
32 padding-left: 15px; 32 padding-left: 15px;
33 margin: 10px 0; 33 margin: 10px 0;
34 } 34 }
35 .new-add-select select{ 35 .new-add-select select{
36 width: 100px; 36 width: 100px;
37 } 37 }
38 .widget{ 38 .widget{
39 -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); 39 -moz-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7);
40 -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); 40 -webkit-box-shadow: 0px 3px 8px rgba(100,100,100, 0.7);
41 box-shadow: 0px 3px 8px rgba(100,100,100, 0.7); 41 box-shadow: 0px 3px 8px rgba(100,100,100, 0.7);
42 } 42 }
43 .optionclass { 43 .optionclass {
44 background: #fff; 44 background: #fff;
45 } 45 }
46 .timess { 46 .timess {
47 float: right !important; 47 float: right !important;
48 margin-top: 10px !important; 48 margin-top: 10px !important;
49 margin-right: 10px !important; 49 margin-right: 10px !important;
50 color: #999 !important; 50 color: #999 !important;
51 cursor: pointer !important; 51 cursor: pointer !important;
52 } 52 }
53 53
54 .button1 { 54 .button1 {
55 display: inline-block; 55 display: inline-block;
56 height: 35px; 56 height: 35px;
57 line-height: 35px; 57 line-height: 35px;
58 padding-right: 15px; 58 padding-right: 15px;
59 padding-left: 50px; 59 padding-left: 50px;
60 position: relative; 60 position: relative;
61 background-color:rgb(41,127,184); 61 background-color:rgb(41,127,184);
62 color:rgb(255,255,255); 62 color:rgb(255,255,255);
63 text-decoration: none; 63 text-decoration: none;
64 text-transform: uppercase; 64 text-transform: uppercase;
65 letter-spacing: 1px; 65 letter-spacing: 1px;
66 margin-bottom: 15px; 66 margin-bottom: 15px;
67 border: 0; 67 border: 0;
68 68
69 69
70 border-radius: 5px; 70 border-radius: 5px;
71 -moz-border-radius: 5px; 71 -moz-border-radius: 5px;
72 -webkit-border-radius: 5px; 72 -webkit-border-radius: 5px;
73 text-shadow:0px 1px 0px rgba(0,0,0,0.5); 73 text-shadow:0px 1px 0px rgba(0,0,0,0.5);
74 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1; 74 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true)";zoom:1;
75 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true); 75 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ff123852,Positive=true);
76 76
77 -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2); 77 -moz-box-shadow:0px 2px 2px rgba(0,0,0,0.2);
78 -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2); 78 -webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.2);
79 box-shadow:0px 2px 2px rgba(0,0,0,0.2); 79 box-shadow:0px 2px 2px rgba(0,0,0,0.2);
80 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)"; 80 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true)";
81 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true); 81 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=2,Color=#33000000,Positive=true);
82 } 82 }
83 83
84 .button1 span { 84 .button1 span {
85 position: absolute; 85 position: absolute;
86 left: 0; 86 left: 0;
87 top: 0; 87 top: 0;
88 width: 35px; 88 width: 35px;
89 background-color:rgba(0,0,0,0.5); 89 background-color:rgba(0,0,0,0.5);
90 90
91 -webkit-border-top-left-radius: 5px; 91 -webkit-border-top-left-radius: 5px;
92 -webkit-border-bottom-left-radius: 5px; 92 -webkit-border-bottom-left-radius: 5px;
93 -moz-border-radius-topleft: 5px; 93 -moz-border-radius-topleft: 5px;
94 -moz-border-radius-bottomleft: 5px; 94 -moz-border-radius-bottomleft: 5px;
95 border-top-left-radius: 5px; 95 border-top-left-radius: 5px;
96 border-bottom-left-radius: 5px; 96 border-bottom-left-radius: 5px;
97 border-right: 1px solid rgba(0,0,0,0.15); 97 border-right: 1px solid rgba(0,0,0,0.15);
98 } 98 }
99 99
100 .button1:hover span, .button1.active span { 100 .button1:hover span, .button1.active span {
101 background-color:rgb(0,102,26); 101 background-color:rgb(0,102,26);
102 border-right: 1px solid rgba(0,0,0,0.3); 102 border-right: 1px solid rgba(0,0,0,0.3);
103 } 103 }
104 104
105 .button1:active { 105 .button1:active {
106 margin-top: 2px; 106 margin-top: 2px;
107 margin-bottom: 13px; 107 margin-bottom: 13px;
108 108
109 -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5); 109 -moz-box-shadow:0px 1px 0px rgba(255,255,255,0.5);
110 -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5); 110 -webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.5);
111 box-shadow:0px 1px 0px rgba(255,255,255,0.5); 111 box-shadow:0px 1px 0px rgba(255,255,255,0.5);
112 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)"; 112 -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true)";
113 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true); 113 filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=0,OffY=1,Color=#ccffffff,Positive=true);
114 } 114 }
115 115
116 .button1.turquoise { 116 .button1.turquoise {
117 background: #449d44; 117 background: #449d44;
118 } 118 }
119 119
120 </style> 120 </style>
121 <div class="myLoader" ng-show="showLoader"> 121 <div class="myLoader" ng-show="showLoader">
122 <img src="../img/hourglass.gif" width="50px;"> 122 <img src="../img/hourglass.gif" width="50px;">
123 </div> 123 </div>
124 124
125 <!--Delete model-->
126 <div class="customConfirmPopBackdrop" id="delete2">
127 <div class="customModalInner" style="max-width: 400px;">
128 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
129 <table>
130 <tr>
131 <td>
132 <img src="img/info.png" style="width: 50px;">
133 </td>
134 <td>
135 <p style="padding: 5px 10px; margin-bottom: 0;">Please confirm! Are you sure you want to DELETE this Fuel Vendor & its related data?</p>
136 </td>
137 </tr>
138 </table>
139 </div>
140 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
141 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="deleteVendorData()">Accept</button>
142 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelDelete()">Cancel</button>
143 </div>
144 </div>
145 </div>
146
147
148
125 <div class="col-xs-12 col-md-12"> 149 <div class="col-xs-12 col-md-12">
126 <div class="row" style="margin-left:0px"> 150 <div class="row" style="margin-left:0px">
127 <div class="col-md-12"> 151 <div class="col-md-12">
128 <div class="widget"> 152 <div class="widget">
129 <div class="widget-header"> 153 <div class="widget-header">
130 <i class="fa fa-building-o" aria-hidden="true"></i> 154 <i class="fa fa-building-o" aria-hidden="true"></i>
131 <h3>{{vendorData.vendorName}} <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVendor(vendorData.id)" aria-hidden="true"></i></h3> 155 <h3>{{vendorData.vendorName}} <i class="fa fa-trash-o deleteTierIcon" ng-click="deleteVendor(vendorData.id)" aria-hidden="true"></i></h3>
132 <i class="fa fa-times timess" ui-sref="app.FuelVendors" aria-hidden="true"></i> 156 <i class="fa fa-times timess" ui-sref="app.FuelVendors" aria-hidden="true"></i>
133 </div> 157 </div>
134 <!-- /widget-header --> 158 <!-- /widget-header -->
135 <div class="widget-content"> 159 <div class="widget-content">
136 <div class="row" style="margin-left:0px"> 160 <div class="row" style="margin-left:0px">
137 <div class="col-md-6"> 161 <div class="col-md-6">
138 <div class="widget"> 162 <div class="widget">
139 <div class="widget-header"> 163 <div class="widget-header">
140 <i class="fa fa-building-o" aria-hidden="true"></i> 164 <i class="fa fa-building-o" aria-hidden="true"></i>
141 <h3>Vendor Details</h3> 165 <h3>Vendor Details</h3>
142 <div class="pull-right" style="margin-top: 5px; margin-right: 10px;"> 166 <div class="pull-right" style="margin-top: 5px; margin-right: 10px;">
143 <toggle ng-model="vendorData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle> 167 <toggle ng-model="vendorData.activate" ng-change="changeCompanyStatus()" size="customToogle" on="Active" off="Inactive"></toggle>
144 </div> 168 </div>
145 </div> 169 </div>
146 <div class="widget-content"> 170 <div class="widget-content">
147 <div class="row" style="margin-left:0px;"> 171 <div class="row" style="margin-left:0px;">
148 <div class="col-md-7" style="padding-left: 0;"> 172 <div class="col-md-7" style="padding-left: 0;">
149 <h4 ng-show="showCompanyName" ng-if="vendorData.vendorName != 'undefined'"> 173 <h4 ng-show="showCompanyName" ng-if="vendorData.vendorName != 'undefined'">
150 <b style="color:#F90;">{{vendorData.vendorName}}</b> &nbsp;<i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i> 174 <b style="color:#F90;">{{vendorData.vendorName}}</b> &nbsp;<i class="fa fa-pencil-square-o" ng-click="company()" style="font-size: 14px;" aria-hidden="true"></i>
151 </h4> 175 </h4>
152 <input type="tel" ng-hide="showCompanyName" ng-model="vendorData.vendorName" class="form-control"> 176 <input type="tel" ng-hide="showCompanyName" ng-model="vendorData.vendorName" class="form-control">
153 </div> 177 </div>
154 </div> 178 </div>
155 <div> 179 <div>
156 <p class="new-label"> 180 <p class="new-label">
157 <span>Master Margin Setting </span> 181 <span>Master Margin Setting </span>
158 <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="vendorData.masterMargin"> 182 <select class="form-control" style="width: 135px;padding: 4px 8px;" ng-change="editData()" ng-model="vendorData.masterMargin">
159 <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option> 183 <option ng-repeat="margin in jetMarginList" value="{{margin.id}}">{{margin.marginName}}</option>
160 </select> 184 </select>
161 <span>&nbsp;${{vendorData.margin.marginValue}}</span> 185 <span>&nbsp;${{vendorData.margin.marginValue}}</span>
162 <div class="clearfix"></div> 186 <div class="clearfix"></div>
163 </p> 187 </p>
164 </div> 188 </div>
165 189
166 </br> 190 </br>
167 <div class="new-address"> 191 <div class="new-address">
168 192
169 <p ng-show="showAddress"><i class="fa fa-map-marker"></i> {{vendorData.addressOne}} {{vendorData.addressTwo}} &nbsp;<i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p> 193 <p ng-show="showAddress"><i class="fa fa-map-marker"></i> {{vendorData.addressOne}} {{vendorData.addressTwo}} &nbsp;<i class="fa fa-pencil-square-o" ng-click="addressChange()" aria-hidden="true"></i> </p>
170 194
171 <div ng-hide="showAddress"> 195 <div ng-hide="showAddress">
172 <label>Address1</label> 196 <label>Address1</label>
173 <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="vendorData.addressOne" class="form-control" /> 197 <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="vendorData.addressOne" class="form-control" />
174 <label>Address2</label> 198 <label>Address2</label>
175 <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="vendorData.addressTwo" class="form-control" /> 199 <input type="tel" style="width: 50%;" ng-hide="showAddress" ng-model="vendorData.addressTwo" class="form-control" />
176 </div> 200 </div>
177 201
178 <p ng-repeat="data in vendorData.vendorCustomContacts" ng-if="data.contactNumber != null"> 202 <p ng-repeat="data in vendorData.vendorCustomContacts" ng-if="data.contactNumber != null">
179 <i class="fa fa-phone" ng-hide="showEditContact"></i> 203 <i class="fa fa-phone" ng-hide="showEditContact"></i>
180 <span ng-hide="showEditContact">{{data.contactNumber}} &nbsp;</span> 204 <span ng-hide="showEditContact">{{data.contactNumber}} &nbsp;</span>
181 <i ng-click="showContact(data, 'phone')" ng-hide="showEditContact" class="fa fa-pencil-square-o" aria-hidden="true"></i> 205 <i ng-click="showContact(data, 'phone')" ng-hide="showEditContact" class="fa fa-pencil-square-o" aria-hidden="true"></i>
182 206
183 </p> 207 </p>
184 <p ng-repeat="data in vendorData.vendorCustomContacts" ng-if="data.email != null"> 208 <p ng-repeat="data in vendorData.vendorCustomContacts" ng-if="data.email != null">
185 <i class="fa fa-envelope" ng-hide="showEditEmail"></i> 209 <i class="fa fa-envelope" ng-hide="showEditEmail"></i>
186 <span ng-hide="showEditEmail">{{data.email}} &nbsp;</span> 210 <span ng-hide="showEditEmail">{{data.email}} &nbsp;</span>
187 <i ng-click="showContact(data, 'email')" ng-hide="showEditEmail" class="fa fa-pencil-square-o" aria-hidden="true"></i> 211 <i ng-click="showContact(data, 'email')" ng-hide="showEditEmail" class="fa fa-pencil-square-o" aria-hidden="true"></i>
188 212
189 </p> 213 </p>
190 </div> 214 </div>
191 <div class="new-add-select"> 215 <div class="new-add-select">
192 <select class="form-control" ng-model="value" ng-click="addCustom(value)" style="background: #ebebeb;padding: 4px 8px;width: 115px;"> 216 <select class="form-control" ng-model="value" ng-click="addCustom(value)" style="background: #ebebeb;padding: 4px 8px;width: 115px;">
193 <option value="" disabled selected>Add Field</option> 217 <option value="" disabled selected>Add Field</option>
194 <option value="phone" class="optionclass">Add Phone</option> 218 <option value="phone" class="optionclass">Add Phone</option>
195 <option value="email" class="optionclass">Add Email</option> 219 <option value="email" class="optionclass">Add Email</option>
196 </select> 220 </select>
197 </div> 221 </div>
198 <div> 222 <div>
199 <p style="margin-bottom: 0;"><b>Company Notes</b> &nbsp;<i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p> 223 <p style="margin-bottom: 0;"><b>Company Notes</b> &nbsp;<i class="fa fa-pencil-square-o" ng-click="showNote()" aria-hidden="true"></i></p>
200 <p ng-show="showNoteData">{{vendorData.internalNote}}</p> 224 <p ng-show="showNoteData">{{vendorData.internalNote}}</p>
201 <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="vendorData.internalNote" rows="4" cols="34"></textarea> 225 <textarea name="message" ng-hide="showNoteData" style="margin-bottom: 6px;" class="form-control" ng-model="vendorData.internalNote" rows="4" cols="34"></textarea>
202 </div> 226 </div>
203 <div class="pull-left"> 227 <div class="pull-left">
204 <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button> 228 <button ng-click="editData()" ng-show="showUpdateBtn" class="btn btn-success">Save</button>
205 <button ng-click="cancelData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button> 229 <button ng-click="cancelData()" ng-show="showUpdateBtn" class="btn btn-default">Cancel</button>
206 </div> 230 </div>
207 <div class="pull-right"> 231 <div class="pull-right">
208 <button type="button" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Vendor Contacts</button> 232 <button type="button" ng-click="sendMail()" class="btn btn-primary">Distribute Price to Vendor Contacts</button>
209 </div> 233 </div>
210 <div class="clearfix"></div> 234 <div class="clearfix"></div>
211 </div> 235 </div>
212 </div> 236 </div>
213 </div> 237 </div>
214 <div class="col-md-6"> 238 <div class="col-md-6">
215 <div class="widget"> 239 <div class="widget">
216 <div class="widget-header"> 240 <div class="widget-header">
217 <i class="fa fa-pencil"></i> 241 <i class="fa fa-pencil"></i>
218 <h3>Price Manager Reference</h3> 242 <h3>Price Manager Reference</h3>
219 </div> 243 </div>
220 <div class="widget-content"> 244 <div class="widget-content">
221 <div class="table-responsive"> 245 <div class="table-responsive">
222 <table class="table table-hover table-striped"> 246 <table class="table table-hover table-striped">
223 <thead> 247 <thead>
224 <tr> 248 <tr>
225 <th>Omit</th> 249 <th>Omit</th>
226 <th>Product</th> 250 <th>Product</th>
227 <th>Cost</th> 251 <th>Cost</th>
228 <th>PAP (Margin)</th> 252 <th>PAP (Margin)</th>
229 <th>PAP (Total)</th> 253 <th>PAP (Total)</th>
230 <th style="color:#F90">Expires</th> 254 <th style="color:#F90">Expires</th>
231 </tr> 255 </tr>
232 </thead> 256 </thead>
233 <tbody> 257 <tbody>
234 <tr ng-repeat="fuel in fuelPricing | filter:{ status: true }"> 258 <tr ng-repeat="fuel in fuelPricing | filter:{ status: true }">
235 <td><input type="checkbox" ng-model="fuel.fuelPricing.omit" ng-change="updateOmit(fuel.fuelPricing, fuel.status)"></td> 259 <td><input type="checkbox" ng-model="fuel.fuelPricing.omit" ng-change="updateOmit(fuel.fuelPricing, fuel.status)"></td>
236 <td>{{fuel.name}}</td> 260 <td>{{fuel.name}}</td>
237 <td>${{fuel.fuelPricing.cost}}</td> 261 <td>${{fuel.fuelPricing.cost}}</td>
238 <td>${{fuel.fuelPricing.papMargin}}</td> 262 <td>${{fuel.fuelPricing.papMargin}}</td>
239 <td style="color:#55AF8B;">${{fuel.fuelPricing.papTotal | number : 4 }}</td> 263 <td style="color:#55AF8B;">${{fuel.fuelPricing.papTotal | number : 4 }}</td>
240 <td style="color:#F90">{{fuel.fuelPricing.expirationDate}}</td> 264 <td style="color:#F90">{{fuel.fuelPricing.expirationDate}}</td>
241 </tr> 265 </tr>
242 </tbody> 266 </tbody>
243 </table> 267 </table>
244 </div> 268 </div>
245 </div> 269 </div>
246 </div> 270 </div>
247 </div> 271 </div>
248 </div> 272 </div>
249 <div class="row" style="margin-left:0px"> 273 <div class="row" style="margin-left:0px">
250 <div class="col-md-6"> 274 <div class="col-md-6">
251 <div class="widget"> 275 <div class="widget">
252 <div class="widget-header"> 276 <div class="widget-header">
253 <i class="fa fa-user"></i> 277 <i class="fa fa-user"></i>
254 <h3>Contact List</h3> 278 <h3>Contact List</h3>
255 <div class="pull-right"> 279 <div class="pull-right">
256 <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp; Add Contact</button> 280 <button type="submit" data-toggle="modal" data-target="#contact-modal-3" class="btn btn-success btn-sm" style="margin-top: 4px; margin-right: 9px;"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp; Add Contact</button>
257 </div> 281 </div>
258 </div> 282 </div>
259 <div class="widget-content" style="padding:0px"> 283 <div class="widget-content" style="padding:0px">
260 <div class="table-responsive"> 284 <div class="table-responsive">
261 <table class="table table-bordered table-hover table-striped"> 285 <table class="table table-bordered table-hover table-striped">
262 <thead> 286 <thead>
263 <tr> 287 <tr>
264 <th>Price Email</th> 288 <th>Price Email</th>
265 <th>First Name</th> 289 <th>First Name</th>
266 <th>Last Name</th> 290 <th>Last Name</th>
267 <th>Title</th> 291 <th>Title</th>
268 </tr> 292 </tr>
269 </thead> 293 </thead>
270 <tbody> 294 <tbody>
271 <tr ng-repeat="contact in vendorContactList" style="cursor: pointer;" ui-sref="app.viewVendorContact({id : contact.id})"> 295 <tr ng-repeat="contact in vendorContactList" style="cursor: pointer;" ui-sref="app.viewVendorContact({id : contact.id})">
272 <td><toggle ng-model="contact.priceEmail" ng-change="changePriceEmail(contact.id, $index)"></toggle></td> 296 <td><toggle ng-model="contact.priceEmail" ng-change="changePriceEmail(contact.id, $index)"></toggle></td>
273 <td>{{contact.firstName}}</td> 297 <td>{{contact.firstName}}</td>
274 <td>{{contact.lastName}}</td> 298 <td>{{contact.lastName}}</td>
275 <td>{{contact.title}}</td> 299 <td>{{contact.title}}</td>
276 </tr> 300 </tr>
277 </tbody> 301 </tbody>
278 </table> 302 </table>
279 </div> 303 </div>
280 </div> 304 </div>
281 </div> 305 </div>
282 </div> 306 </div>
283 307
284 </div> 308 </div>
285 </div> 309 </div>
286 <!-- /widget-content --> 310 <!-- /widget-content -->
287 </div> 311 </div>
288 <!-- /widget --> 312 <!-- /widget -->
289 </div> 313 </div>
290 <!-- /span6 --> 314 <!-- /span6 -->
291 </div> 315 </div>
292 <!-- /widget --> 316 <!-- /widget -->
293 </div> 317 </div>
294 <!-- /container --> 318 <!-- /container -->
295 <form class="modal multi-step" id="contact-modal-3" name="companyForm"> 319 <form class="modal multi-step" id="contact-modal-3" name="companyForm">
296 <div class="modal-dialog modal-lg"> 320 <div class="modal-dialog modal-lg">
297 <div class="modal-content"> 321 <div class="modal-content">
298 <div class="modal-body step-1" data-step="1" style="padding: 0;"> 322 <div class="modal-body step-1" data-step="1" style="padding: 0;">
299 <div> 323 <div>
300 <div class="row" style="margin: 0;"> 324 <div class="row" style="margin: 0;">
301 <div> 325 <div>
302 <div class="widget" style="margin-bottom: 0; box-shadow: none;"> 326 <div class="widget" style="margin-bottom: 0; box-shadow: none;">
303 <div class="widget-header"> 327 <div class="widget-header">
304 <i class="icon-pencil"></i> 328 <i class="icon-pencil"></i>
305 <i class="fa fa-tasks" aria-hidden="true"></i> 329 <i class="fa fa-tasks" aria-hidden="true"></i>
306 <h3>Add a New Contact</h3> 330 <h3>Add a New Contact</h3>
307 <div class="clearfix"></div> 331 <div class="clearfix"></div>
308 </div> 332 </div>
309 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;"> 333 <div class="widget-content" style="padding-left: 0; padding-right: 0; border-bottom: 0;">
310 <div class="col-xs-12"> 334 <div class="col-xs-12">
311 <div class="col-md-6"> 335 <div class="col-md-6">
312 <div class="pull-left" style="width: 110px;"> 336 <div class="pull-left" style="width: 110px;">
313 <label class="new-input-label"><b>First Name</b></label> 337 <label class="new-input-label"><b>First Name</b></label>
314 </div> 338 </div>
315 <div class="pull-left" style="margin-left: 15px;"> 339 <div class="pull-left" style="margin-left: 15px;">
316 <input type="tel" ng-model="data.firstName" class="form-control" placeholder=""> 340 <input type="tel" ng-model="data.firstName" class="form-control" placeholder="">
317 </div> 341 </div>
318 <div class="clearfix"></div> 342 <div class="clearfix"></div>
319 </div> 343 </div>
320 <div class="col-md-6"> 344 <div class="col-md-6">
321 345
322 <div class="pull-left" style="width: 110px;"> 346 <div class="pull-left" style="width: 110px;">
323 <label class="new-input-label"><b>Last Name</b></label> 347 <label class="new-input-label"><b>Last Name</b></label>
324 </div> 348 </div>
325 <div class="pull-left" style="margin-left: 15px;"> 349 <div class="pull-left" style="margin-left: 15px;">
326 <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder=""> 350 <input type="tel" ng-model="data.lastName" class="form-control" id="Address" placeholder="">
327 </div> 351 </div>
328 <div class="clearfix"></div> 352 <div class="clearfix"></div>
329 </div> 353 </div>
330 </div> 354 </div>
331 <div class="clearfix"></div><br> 355 <div class="clearfix"></div><br>
332 <div class="col-xs-12"> 356 <div class="col-xs-12">
333 <div class="col-md-6"> 357 <div class="col-md-6">
334 <div class="pull-left" style="width: 110px;"> 358 <div class="pull-left" style="width: 110px;">
335 <label class="new-input-label"><b>Title</b></label> 359 <label class="new-input-label"><b>Title</b></label>
336 </div> 360 </div>
337 <div class="pull-left" style="margin-left: 15px;"> 361 <div class="pull-left" style="margin-left: 15px;">
338 <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder=""> 362 <input type="tel" ng-model="data.title" class="form-control" id="Address" placeholder="">
339 </div> 363 </div>
340 <div class="clearfix"></div> 364 <div class="clearfix"></div>
341 </div> 365 </div>
342 <div class="col-md-6"> 366 <div class="col-md-6">
343 367
344 <div class="pull-left" style="width: 110px;"> 368 <div class="pull-left" style="width: 110px;">
345 <label class="new-input-label"><b>Email</b></label> 369 <label class="new-input-label"><b>Email</b></label>
346 </div> 370 </div>
347 <div class="pull-left" style="margin-left: 15px;"> 371 <div class="pull-left" style="margin-left: 15px;">
348 <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder=""> 372 <input type="email" ng-model="data.email" class="form-control" id="Address" placeholder="">
349 </div> 373 </div>
350 <div class="clearfix"></div> 374 <div class="clearfix"></div>
351 </div> 375 </div>
352 </div> 376 </div>
353 <div class="clearfix"></div><br> 377 <div class="clearfix"></div><br>
354 <div class="col-xs-12"> 378 <div class="col-xs-12">
355 <div class="col-md-6"> 379 <div class="col-md-6">
356 <div class="pull-left" style="width: 110px;"> 380 <div class="pull-left" style="width: 110px;">
357 <label class="new-input-label"><b>Username</b></label> 381 <label class="new-input-label"><b>Username</b></label>
358 </div> 382 </div>
359 <div class="pull-left" style="margin-left: 15px;"> 383 <div class="pull-left" style="margin-left: 15px;">
360 <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder=""> 384 <input type="tel" ng-model="data.userName" class="form-control" id="Address" placeholder="">
361 </div> 385 </div>
362 <div class="clearfix"></div> 386 <div class="clearfix"></div>
363 </div> 387 </div>
364 <div class="col-md-6"> 388 <div class="col-md-6">
365 389
366 <div class="pull-left" style="width: 110px;"> 390 <div class="pull-left" style="width: 110px;">
367 <label class="new-input-label"><b>Password</b></label> 391 <label class="new-input-label"><b>Password</b></label>
368 </div> 392 </div>
369 <div class="pull-left" style="margin-left: 15px;"> 393 <div class="pull-left" style="margin-left: 15px;">
370 <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder=""> 394 <input type="password" ng-model="data.password" class="form-control" id="Address" placeholder="">
371 </div> 395 </div>
372 <div class="clearfix"></div> 396 <div class="clearfix"></div>
373 </div> 397 </div>
374 </div> 398 </div>
375 <div class="clearfix"></div><br> 399 <div class="clearfix"></div><br>
376 <div class="col-xs-12"> 400 <div class="col-xs-12">
377 <div class="col-md-6"> 401 <div class="col-md-6">
378 <div class="pull-left" style="width: 110px;"> 402 <div class="pull-left" style="width: 110px;">
379 <label class="new-input-label"><b>Work Phone</b></label> 403 <label class="new-input-label"><b>Work Phone</b></label>
380 </div> 404 </div>
381 <div class="pull-left" style="margin-left: 15px;"> 405 <div class="pull-left" style="margin-left: 15px;">
382 <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder=""> 406 <input type="tel" ng-model="data.workPhone" class="form-control" id="Address" placeholder="">
383 </div> 407 </div>
384 <div class="clearfix"></div> 408 <div class="clearfix"></div>
385 </div> 409 </div>
386 <div class="col-md-6"> 410 <div class="col-md-6">
387 411
388 <div class="pull-left" style="width: 110px;"> 412 <div class="pull-left" style="width: 110px;">
389 <label class="new-input-label"><b>Mobile Phone</b></label> 413 <label class="new-input-label"><b>Mobile Phone</b></label>
390 </div> 414 </div>
391 <div class="pull-left" style="margin-left: 15px;"> 415 <div class="pull-left" style="margin-left: 15px;">
392 <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder=""> 416 <input type="tel" ng-model="data.mobilePhone" class="form-control" id="Address" placeholder="">
393 </div> 417 </div>
394 <div class="clearfix"></div> 418 <div class="clearfix"></div>
395 </div> 419 </div>
396 </div> 420 </div>
397 <div class="clearfix"></div><br> 421 <div class="clearfix"></div><br>
398 <div class="col-xs-12"> 422 <div class="col-xs-12">
399 <div class="col-md-12"> 423 <div class="col-md-12">
400 <div class="pull-left" style="width: 110px;"> 424 <div class="pull-left" style="width: 110px;">
401 <label class="new-input-label"><b>Address</b></label> 425 <label class="new-input-label"><b>Address</b></label>
402 </div> 426 </div>
403 <div class="pull-right" style="width: calc(100% - 123px);"> 427 <div class="pull-right" style="width: calc(100% - 123px);">
404 <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder=""> 428 <input type="tel" class="form-control" ng-model="data.address" id="Address" placeholder="">
405 </div> 429 </div>
406 <div class="clearfix"></div> 430 <div class="clearfix"></div>
407 </div> 431 </div>
408 </div> 432 </div>
409 <div class="clearfix"></div> 433 <div class="clearfix"></div>
410 <br/> 434 <br/>
411 <div class="col-xs-12"> 435 <div class="col-xs-12">
412 <div class="col-md-3"> 436 <div class="col-md-3">
413 <div class="pull-left my-toggle-switch"> 437 <div class="pull-left my-toggle-switch">
414 <div style="color: #ff9a01;">Price Email &nbsp &nbsp 438 <div style="color: #ff9a01;">Price Email &nbsp &nbsp
415 <toggle ng-model="data.priceEmail" size="customToogle"> 439 <toggle ng-model="data.priceEmail" size="customToogle">
416 </div> 440 </div>
417 </div> 441 </div>
418 <div class="clearfix"></div> 442 <div class="clearfix"></div>
419 </div> 443 </div>
420 <div class="col-md-3"> 444 <div class="col-md-3">
421 <div class="pull-left my-toggle-switch"> 445 <div class="pull-left my-toggle-switch">
422 <div style="color: #ff9a01;">Primary Contact &nbsp &nbsp 446 <div style="color: #ff9a01;">Primary Contact &nbsp &nbsp
423 <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact"> 447 <input type="checkbox" ng-click="checkPrimaryContact()" ng-model="primaryContact">
424 </div> 448 </div>
425 </div> 449 </div>
426 <div class="clearfix"></div> 450 <div class="clearfix"></div>
427 </div> 451 </div>
428 <div class="col-md-6"> 452 <div class="col-md-6">
429 <div class="pull-left" style="width: 110px;"> 453 <div class="pull-left" style="width: 110px;">
430 <label class="new-input-label"><b>Internal Note</b></label> 454 <label class="new-input-label"><b>Internal Note</b></label>
431 </div> 455 </div>
432 <div class="pull-left" style="width: calc(100% - 110px);"> 456 <div class="pull-left" style="width: calc(100% - 110px);">
433 <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea> 457 <textarea name="message" ng-model="data.note" rows="4" cols="34"></textarea>
434 </div> 458 </div>
435 </div> 459 </div>
436 <div class="clearfix"></div> 460 <div class="clearfix"></div>
437 </div> 461 </div>
438 <div class="clearfix"></div><br> 462 <div class="clearfix"></div><br>
439 </div> 463 </div>
440 </div> 464 </div>
441 <div class="clearfix"></div> 465 <div class="clearfix"></div>
442 </div> 466 </div>
443 </div> 467 </div>
444 </div> 468 </div>
445 </div> 469 </div>
446 <div class="modal-footer" style="border-top: 0;"> 470 <div class="modal-footer" style="border-top: 0;">
447 <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button> 471 <button type="button" class="btn btn-default" id="reset" data-dismiss="modal">Cancel</button>
448 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button> 472 <button type="button" class="btn btn-primary step step-1" data-step="1" ng-click="addContact()">Save</button>
449 </div> 473 </div>
450 </div> 474 </div>
451 </div> 475 </div>
452 </form> 476 </form>
453 <div class="clearfix"></div> 477 <div class="clearfix"></div>
454 478
455 <div class="customConfirmPopBackdrop" id="confirm2"> 479 <div class="customConfirmPopBackdrop" id="confirm2">
456 <div class="customModalInner" style="max-width: 400px;"> 480 <div class="customModalInner" style="max-width: 400px;">
457 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 481 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
458 <table> 482 <table>
459 <tr> 483 <tr>
460 <td> 484 <td>
461 <img src="img/info.png" style="width: 50px;"> 485 <img src="img/info.png" style="width: 50px;">
462 </td> 486 </td>
463 <td> 487 <td>
464 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p> 488 <p style="padding: 5px 10px; margin-bottom: 0;">Are you sure that you want to email pricing to everyone in your contact list?</p>
465 </td> 489 </td>
466 </tr> 490 </tr>
467 </table> 491 </table>
468 </div> 492 </div>
469 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 493 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
470 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button> 494 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="sendMail()">Yes</button>
471 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button> 495 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelAndCloseConfirm()">Cancel</button>
472 </div> 496 </div>
473 </div> 497 </div>
474 </div> 498 </div>
475 499
476 <div class="customConfirmPopBackdrop" id="deleteVendor"> 500 <div class="customConfirmPopBackdrop" id="deleteVendor">
477 <div class="customModalInner" style="max-width: 400px;"> 501 <div class="customModalInner" style="max-width: 400px;">
478 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 502 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
479 <table> 503 <table>
480 <tr> 504 <tr>
481 <td> 505 <td>
482 <img src="img/info.png" style="width: 50px;"> 506 <img src="img/info.png" style="width: 50px;">
483 </td> 507 </td>
484 <td> 508 <td>
485 <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p> 509 <p style="padding: 5px 10px; margin-bottom: 0;">{{statusMessage}}</p>
486 </td> 510 </td>
487 </tr> 511 </tr>
488 </table> 512 </table>
489 </div> 513 </div>
490 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 514 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
491 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="companyStatus()">Accept</button> 515 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="companyStatus()">Accept</button>
492 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelStatus()">Cancel</button> 516 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelStatus()">Cancel</button>
493 </div> 517 </div>
494 </div> 518 </div>
495 </div> 519 </div>
496 520
497 <div class="customConfirmPopBackdrop" id="customField"> 521 <div class="customConfirmPopBackdrop" id="customField">
498 <div class="customModalInner" style="max-width: 400px;"> 522 <div class="customModalInner" style="max-width: 400px;">
499 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 523 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
500 <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> 524 <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div>
501 <div class="col-md-10"> 525 <div class="col-md-10">
502 <form> 526 <form>
503 Title:<br> 527 Title:<br>
504 <input type="text" name="firstname" ng-model="custom.title"><br> 528 <input type="text" name="firstname" ng-model="custom.title"><br>
505 Content:<br> 529 Content:<br>
506 <input type="text" name="lastname" ng-model="custom.content"> 530 <input type="text" name="lastname" ng-model="custom.content">
507 </form> 531 </form>
508 </div> 532 </div>
509 <div class="clearfix"></div> 533 <div class="clearfix"></div>
510 </div> 534 </div>
511 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 535 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
512 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField()">Accept</button> 536 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptCustomField()">Accept</button>
513 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button> 537 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelCustomField()">Cancel</button>
514 </div> 538 </div>
515 </div> 539 </div>
516 </div> 540 </div>
517 541
518 <div class="customConfirmPopBackdrop" id="toogleMail"> 542 <div class="customConfirmPopBackdrop" id="toogleMail">
519 <div class="customModalInner" style="max-width: 400px;"> 543 <div class="customModalInner" style="max-width: 400px;">
520 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 544 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
521 <table> 545 <table>
522 <tr> 546 <tr>
523 <!-- <td> 547 <!-- <td>
524 <img src="" style="width: 50px;"> 548 <img src="" style="width: 50px;">
525 </td> --> 549 </td> -->
526 <td> 550 <td>
527 <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p> 551 <p style="padding: 5px 10px; margin-bottom: 0;text-align: center;">{{messageText}}</p>
528 </td> 552 </td>
529 </tr> 553 </tr>
530 </table> 554 </table>
531 </div> 555 </div>
532 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 556 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
533 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Cancel</button> 557 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelToogle()">Cancel</button>
534 </div> 558 </div>
535 </div> 559 </div>
536 </div> 560 </div>
537 561
538 <div class="customConfirmPopBackdrop" id="updateContact"> 562 <div class="customConfirmPopBackdrop" id="updateContact">
539 <div class="customModalInner" style="max-width: 400px;"> 563 <div class="customModalInner" style="max-width: 400px;">
540 <div class="customModelBody" style="border-radius: 5px 5px 0 0;"> 564 <div class="customModelBody" style="border-radius: 5px 5px 0 0;">
541 <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div> 565 <div class="col-md-2"><img class="src-image" src="img/images.jpg"></div>
542 <div class="col-md-10"> 566 <div class="col-md-10">
543 <form> 567 <form>
544 Title:<br> 568 Title:<br>
545 <input type="text" name="firstname" ng-model="updateData.title"><br> 569 <input type="text" name="firstname" ng-model="updateData.title"><br>
546 Content:<br> 570 Content:<br>
547 <input type="text" name="lastname" ng-model="updateData.content"> 571 <input type="text" name="lastname" ng-model="updateData.content">
548 </form> 572 </form>
549 </div> 573 </div>
550 <div class="clearfix"></div> 574 <div class="clearfix"></div>
551 </div> 575 </div>
552 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;"> 576 <div class="customModelFooter text-right" style="border-radius: 0 0 5px 5px;">
553 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField()">Accept</button> 577 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="acceptUpdateField()">Accept</button>
554 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button> 578 <button class="btn" style="padding: 4px 0; width: 80px;" ng-click="cancelUpdateField()">Cancel</button>
555 </div> 579 </div>
556 </div> 580 </div>
557 </div> 581 </div>
558 582
559 <!-- Le javascript 583 <!-- Le javascript
560 ================================================== --> 584 ================================================== -->
561 <!-- Placed at the end of the document so the pages load faster --> 585 <!-- Placed at the end of the document so the pages load faster -->
562 <!-- <script 586 <!-- <script
563 CKEDITOR.replace( 'editor2', { 587 CKEDITOR.replace( 'editor2', {
564 height: 250, 588 height: 250,
565 extraPlugins: 'divarea' 589 extraPlugins: 'divarea'
566 } ); 590 } );
567 </script> --> 591 </script> -->
568 592
app/partials/viewFuelVendor/viewFuelVendor.service.js
1 (function(){ 1 (function(){
2 'use strict'; 2 'use strict';
3 angular.module('acufuel') 3 angular.module('acufuel')
4 .service('ViewFuelVendorService', ['$q', '$http', 'BASE_URL', ViewFuelVendorService]); 4 .service('ViewFuelVendorService', ['$q', '$http', 'BASE_URL', ViewFuelVendorService]);
5 5
6 function ViewFuelVendorService($q, $http, BASE_URL) { 6 function ViewFuelVendorService($q, $http, BASE_URL) {
7 7
8 this.getFuelOrder = function(id) { 8 this.getFuelOrder = function(id) {
9 9
10 var deferred = $q.defer(); 10 var deferred = $q.defer();
11 $http({ 11 $http({
12 method : 'GET', 12 method : 'GET',
13 url : BASE_URL.url +'/vendor/'+id, 13 url : BASE_URL.url +'/vendor/'+id,
14 headers : {'Content-Type': 'application/json'}, 14 headers : {'Content-Type': 'application/json'},
15 }) 15 })
16 .then(function (result){ 16 .then(function (result){
17 deferred.resolve(result.data); 17 deferred.resolve(result.data);
18 },function (result){ 18 },function (result){
19 deferred.resolve(result.data); 19 deferred.resolve(result.data);
20 }) 20 })
21 return deferred.promise; 21 return deferred.promise;
22 } 22 }
23 23
24 this.getContact = function(id) { 24 this.getContact = function(id) {
25 25
26 var deferred = $q.defer(); 26 var deferred = $q.defer();
27 $http({ 27 $http({
28 method : 'GET', 28 method : 'GET',
29 url : BASE_URL.url +'/vendor/contacts/'+id, 29 url : BASE_URL.url +'/vendor/contacts/'+id,
30 headers : {'Content-Type': 'application/json'}, 30 headers : {'Content-Type': 'application/json'},
31 }) 31 })
32 .then(function (result){ 32 .then(function (result){
33 deferred.resolve(result.data); 33 deferred.resolve(result.data);
34 },function (result){ 34 },function (result){
35 deferred.resolve(result.data); 35 deferred.resolve(result.data);
36 }) 36 })
37 return deferred.promise; 37 return deferred.promise;
38 } 38 }
39 39
40 this.updateCustomField = function(data){ 40 this.updateCustomField = function(data){
41 var deferred = $q.defer(); 41 var deferred = $q.defer();
42 $http({ 42 $http({
43 method : 'PUT', 43 method : 'PUT',
44 url : BASE_URL.url +'/vendor/custom/contacts', 44 url : BASE_URL.url +'/vendor/custom/contacts',
45 data : data, 45 data : data,
46 headers : {'Content-Type': 'application/json'}, 46 headers : {'Content-Type': 'application/json'},
47 }) 47 })
48 .then(function (result){ 48 .then(function (result){
49 deferred.resolve(result.data); 49 deferred.resolve(result.data);
50 },function (result){ 50 },function (result){
51 deferred.resolve(result.data); 51 deferred.resolve(result.data);
52 }) 52 })
53 return deferred.promise; 53 return deferred.promise;
54 } 54 }
55 55
56 this.checkPrimaryContact = function(id){ 56 this.checkPrimaryContact = function(id){
57 var deferred = $q.defer(); 57 var deferred = $q.defer();
58 $http({ 58 $http({
59 method : 'GET', 59 method : 'GET',
60 url : BASE_URL.url +'/vendor/contact/check/primaryContact/'+id, 60 url : BASE_URL.url +'/vendor/contact/check/primaryContact/'+id,
61 headers : {'Content-Type': 'application/json'}, 61 headers : {'Content-Type': 'application/json'},
62 }) 62 })
63 .then(function (result){ 63 .then(function (result){
64 deferred.resolve(result); 64 deferred.resolve(result);
65 },function (result){ 65 },function (result){
66 deferred.resolve(result); 66 deferred.resolve(result);
67 }) 67 })
68 return deferred.promise; 68 return deferred.promise;
69 } 69 }
70 70
71 this.addPrimaryContact = function(data){ 71 this.addPrimaryContact = function(data){
72 var deferred = $q.defer(); 72 var deferred = $q.defer();
73 $http({ 73 $http({
74 method : 'POST', 74 method : 'POST',
75 url : BASE_URL.url +'/vendor/contact/createPrimaryContact', 75 url : BASE_URL.url +'/vendor/contact/createPrimaryContact',
76 data : data, 76 data : data,
77 headers : {'Content-Type': 'application/json'}, 77 headers : {'Content-Type': 'application/json'},
78 }) 78 })
79 .then(function (result){ 79 .then(function (result){
80 deferred.resolve(result.data); 80 deferred.resolve(result.data);
81 },function (result){ 81 },function (result){
82 deferred.resolve(result.data); 82 deferred.resolve(result.data);
83 }) 83 })
84 return deferred.promise; 84 return deferred.promise;
85 } 85 }
86 86
87 this.changeStatus = function(vendorId, data){ 87 this.changeStatus = function(vendorId, data){
88 var deferred = $q.defer(); 88 var deferred = $q.defer();
89 $http({ 89 $http({
90 method : 'PUT', 90 method : 'PUT',
91 url : BASE_URL.url +'/vendor/status/'+vendorId, 91 url : BASE_URL.url +'/vendor/status/'+vendorId,
92 data : data, 92 data : data,
93 headers : {'Content-Type': 'application/json'}, 93 headers : {'Content-Type': 'application/json'},
94 }) 94 })
95 .then(function (result){ 95 .then(function (result){
96 deferred.resolve(result.data); 96 deferred.resolve(result.data);
97 },function (result){ 97 },function (result){
98 deferred.resolve(result.data); 98 deferred.resolve(result.data);
99 }) 99 })
100 return deferred.promise; 100 return deferred.promise;
101 } 101 }
102 102
103 this.addCustomField = function(data){ 103 this.addCustomField = function(data){
104 var deferred = $q.defer(); 104 var deferred = $q.defer();
105 $http({ 105 $http({
106 method : 'POST', 106 method : 'POST',
107 url : BASE_URL.url +'/vendor/custom/contacts', 107 url : BASE_URL.url +'/vendor/custom/contacts',
108 data : data, 108 data : data,
109 headers : {'Content-Type': 'application/json'}, 109 headers : {'Content-Type': 'application/json'},
110 }) 110 })
111 .then(function (result){ 111 .then(function (result){
112 deferred.resolve(result); 112 deferred.resolve(result);
113 },function (result){ 113 },function (result){
114 deferred.resolve(result); 114 deferred.resolve(result);
115 }) 115 })
116 return deferred.promise; 116 return deferred.promise;
117 } 117 }
118 118
119 this.addContact = function(data) { 119 this.addContact = function(data) {
120 120
121 var deferred = $q.defer(); 121 var deferred = $q.defer();
122 $http({ 122 $http({
123 method : 'POST', 123 method : 'POST',
124 url : BASE_URL.url +'/vendor/contact', 124 url : BASE_URL.url +'/vendor/contact',
125 data : data, 125 data : data,
126 headers : {'Content-Type': 'application/json'}, 126 headers : {'Content-Type': 'application/json'},
127 }) 127 })
128 .then(function (result){ 128 .then(function (result){
129 deferred.resolve(result); 129 deferred.resolve(result);
130 },function (result){ 130 },function (result){
131 deferred.resolve(result); 131 deferred.resolve(result);
132 }) 132 })
133 return deferred.promise; 133 return deferred.promise;
134 } 134 }
135 135
136 this.sendMail = function(id) { 136 this.sendMail = function(id) {
137 137
138 var deferred = $q.defer(); 138 var deferred = $q.defer();
139 $http({ 139 $http({
140 method : 'POST', 140 method : 'POST',
141 url : BASE_URL.url +'/vendor/mailPriceToContacts/'+id, 141 url : BASE_URL.url +'/vendor/mailPriceToContacts/'+id,
142 headers : {'Content-Type': 'application/json'}, 142 headers : {'Content-Type': 'application/json'},
143 }) 143 })
144 .then(function (result){ 144 .then(function (result){
145 deferred.resolve(result.data); 145 deferred.resolve(result.data);
146 },function (result){ 146 },function (result){
147 deferred.resolve(result.data); 147 deferred.resolve(result.data);
148 }) 148 })
149 return deferred.promise; 149 return deferred.promise;
150 } 150 }
151 151
152 this.updateContact = function(data) { 152 this.updateContact = function(data) {
153 153
154 var deferred = $q.defer(); 154 var deferred = $q.defer();
155 $http({ 155 $http({
156 method : 'PUT', 156 method : 'PUT',
157 url : BASE_URL.url +'/vendor', 157 url : BASE_URL.url +'/vendor',
158 data : data, 158 data : data,
159 headers : {'Content-Type': 'application/json'}, 159 headers : {'Content-Type': 'application/json'},
160 }) 160 })
161 .then(function (result){ 161 .then(function (result){
162 deferred.resolve(result.data); 162 deferred.resolve(result.data);
163 },function (result){ 163 },function (result){
164 deferred.resolve(result.data); 164 deferred.resolve(result.data);
165 }) 165 })
166 return deferred.promise; 166 return deferred.promise;
167 } 167 }
168 168
169 this.getAircraft = function(id) { 169 this.getAircraft = function(id) {
170 170
171 var deferred = $q.defer(); 171 var deferred = $q.defer();
172 $http({ 172 $http({
173 method : 'GET', 173 method : 'GET',
174 url : BASE_URL.url +'/vendor/aircrafts/'+id, 174 url : BASE_URL.url +'/vendor/aircrafts/'+id,
175 headers : {'Content-Type': 'application/json'}, 175 headers : {'Content-Type': 'application/json'},
176 }) 176 })
177 .then(function (result){ 177 .then(function (result){
178 deferred.resolve(result.data); 178 deferred.resolve(result.data);
179 },function (result){ 179 },function (result){
180 deferred.resolve(result.data); 180 deferred.resolve(result.data);
181 }) 181 })
182 return deferred.promise; 182 return deferred.promise;
183 } 183 }
184 184
185 this.changePriceEmail = function(contactId, data) { 185 this.changePriceEmail = function(contactId, data) {
186 var deferred = $q.defer(); 186 var deferred = $q.defer();
187 $http({ 187 $http({
188 method : 'PUT', 188 method : 'PUT',
189 url : BASE_URL.url +'/vendor/contact/status/'+ contactId, 189 url : BASE_URL.url +'/vendor/contact/status/'+ contactId,
190 data : data, 190 data : data,
191 headers : {'Content-Type': 'application/json'}, 191 headers : {'Content-Type': 'application/json'},
192 }) 192 })
193 .then(function (result){ 193 .then(function (result){
194 deferred.resolve(result.data); 194 deferred.resolve(result.data);
195 },function (result){ 195 },function (result){
196 deferred.resolve(result.data); 196 deferred.resolve(result.data);
197 }) 197 })
198 return deferred.promise; 198 return deferred.promise;
199 } 199 }
200 200
201 this.omitFuelPricing = function(data) { 201 this.omitFuelPricing = function(data) {
202 202
203 var deferred = $q.defer(); 203 var deferred = $q.defer();
204 $http({ 204 $http({
205 method : 'PUT', 205 method : 'PUT',
206 url : BASE_URL.url +'/fuelPricing/omitFuelPricing', 206 url : BASE_URL.url +'/fuelPricing/omitFuelPricing',
207 headers : {'Content-Type': 'application/json'}, 207 headers : {'Content-Type': 'application/json'},
208 data: data 208 data: data
209 }) 209 })
210 .then(function (result){ 210 .then(function (result){
211 deferred.resolve(result.data); 211 deferred.resolve(result.data);
212 },function (result){ 212 },function (result){
213 deferred.resolve(result.data); 213 deferred.resolve(result.data);
214 }) 214 })
215 return deferred.promise; 215 return deferred.promise;
216 } 216 }
217 217
218
219 this.deleteFuelVendor = function(id) {
220
221 var deferred = $q.defer();
222 $http({
223 method : 'DELETE',
224 url : BASE_URL.url +'/vendor/vendorid/'+id,
225 headers : {'Content-Type': 'application/json'},
226 })
227 .then(function (result){
228 deferred.resolve(result.data);
229 },function (result){
230 deferred.resolve(result.data);
231 })
232 return deferred.promise;
233 }
234
235
218 } 236 }
219 237
220 })(); 238 })();