Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Working on inventory
  • Loading branch information
sec11008 committed Dec 9, 2015
1 parent f4bbb41 commit 1a4351b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 5 deletions.
47 changes: 45 additions & 2 deletions TeamDBAwesome/TeamDBAwesome/js/adminController.js
Expand Up @@ -55,7 +55,7 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
//End New Media

//CustomerDemographics
$scope.gridOptions = {
$scope.custInfoGridOptions = {
enableFiltering: true,
columnDefs: [
{field: 'Fname', displayName: 'First Name'},
Expand All @@ -72,7 +72,7 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
]
}

$scope.gridOptions.data = [
$scope.custInfoGridOptions.data = [
{
"Fname": "Test",
"Lname": "Test",
Expand Down Expand Up @@ -103,6 +103,7 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
})
}
$scope.getPlaylists();
$state.go($state.current, {}, { reload: true });
}

$scope.toEdit = function (playlistID) {
Expand All @@ -125,6 +126,7 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
$scope.dropPlaylist(playlistID);
}
$scope.getPlaylists();
$state.go($state.current, {}, { reload: true });
}

$scope.dropPlaylist = function (playlistID) {
Expand All @@ -149,6 +151,47 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
$scope.dropTrack(trackID);
}
}
$scope.dropTrack = function (trackID)
{
$http.get("http://localhost:50031/api/RemoveTrack?PlaylistID=" + $scope.currentPlaylist + "&TrackID=" + trackID)
.success(function (response) {
console.log(response);
})
}

//End Playlist Editor

//Reports
$scope.inventoryGridOptions = {
enableFiltering: true,
columnDefs: [
{ field: 'Title', displayName: 'Track Title' },
{ field: 'Artist' },
{ field: 'Album' },
{ field: 'MediaType', displayName: 'Track Title' },
{ field: 'Genre' },
{ field: 'Composer' },
{ field: 'Milliseconds' },
{ field: 'UnitPrice' },
{ field: 'Bytes' }
]
}

$scope.inventoryGridOptions.data = [
{
"Title": "Test",
"Artist": "Test",
"Album": "Test",
"Address": "Test",
"MediaType": "Test",
"Genre": "Test",
"Composer": "Test",
"Milliseconds": "Test",
"UnitPrice": "Test",
"Bytes": "Test"
}
]

//End Reports

});
2 changes: 1 addition & 1 deletion TeamDBAwesome/TeamDBAwesome/pages/admin-customerinfo.html
Expand Up @@ -11,7 +11,7 @@
different means. This could include any of: First and Last Names, Company Name,
Address/City/State/Country/Postal Code, Phone, Fax, and Email; whatever seems
appropriate. -->
<div id="customerDemograpics" ui-grid="gridOptions" class="grid"></div>
<div id="customerDemograpics" ui-grid="custInfoGridOptions" class="grid"></div>
</div>
</div>
<br><Br><br>
5 changes: 3 additions & 2 deletions TeamDBAwesome/TeamDBAwesome/pages/admin-view.html
@@ -1,5 +1,5 @@
<div ng-controller='adminController'>
<div class="text-center">
<!-- <div class="text-center">
<h1 class=''>Results View here</h1>
</div><br /><br />
o Sales Reporting: There a number of dimensions that can be used singularly or combined.
Expand All @@ -17,5 +17,6 @@
wide range of reports on media by track name, artist, composer, genre, media,
milliseconds, bytes, and/or composer. These can be summary reports by artist name, by
compose, genre, etc. The report needs to work for all combinations. This is utilizing the
media dimension
media dimension-->
<div id="inventory" ui-grid="inventoryGridOptions" class="grid"></div>
</div>

0 comments on commit 1a4351b

Please sign in to comment.