Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Created the customer info page
  • Loading branch information
sec11008 committed Dec 5, 2015
1 parent e66b9c5 commit 63e212f
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 27 deletions.
4 changes: 3 additions & 1 deletion TeamDBAwesome/TeamDBAwesome/TeamDBAwesome.csproj
Expand Up @@ -213,16 +213,18 @@
<Content Include="js\services\httpRequestInjector.js" />
<Content Include="js\userController.js" />
<Content Include="pages\admin-customerinfo.html" />
<Content Include="pages\admin-delete-playlist.html" />
<Content Include="pages\admin-home.html" />
<Content Include="pages\admin-mediacenter.html" />
<Content Include="pages\admin-view.html" />
<Content Include="index.html" />
<Content Include="pages\admin-edit-playlist.html" />
<Content Include="pages\new-media.html" />
<Content Include="pages\partial-adminlogin.html" />
<Content Include="pages\partial-home.html" />
<Content Include="pages\partial-login.html" />
<Content Include="pages\partial-register.html" />
<Content Include="pages\playlist-editor.html" />
<Content Include="pages\admin-playlist-manager.html" />
<Content Include="pages\templates\admin-header.html" />
<Content Include="pages\templates\footer.html" />
<Content Include="pages\templates\home-header.html" />
Expand Down
20 changes: 18 additions & 2 deletions TeamDBAwesome/TeamDBAwesome/app.js
Expand Up @@ -111,11 +111,27 @@ app.config(function ($stateProvider, $urlRouterProvider, $httpProvider) {
'footer': { templateUrl: 'pages/templates/footer.html' }
}
})
.state('playlist-editor', {
.state('admin-playlist-manager', {
url: '/playlistmanager',
views: {
'header': { templateUrl: 'pages/templates/admin-header.html' },
'content': { templateUrl: 'pages/admin-playlist-manager.html' },
'footer': { templateUrl: 'pages/templates/footer.html' }
}
})
.state('admin-edit-playlist', {
url: '/playlisteditor',
views: {
'header': { templateUrl: 'pages/templates/admin-header.html' },
'content': { templateUrl: 'pages/playlist-editor.html' },
'content': { templateUrl: 'pages/admin-edit-playlist.html' },
'footer': { templateUrl: 'pages/templates/footer.html' }
}
})
.state('admin-delete-playlist', {
url: '/deleteplaylist',
views: {
'header': { templateUrl: 'pages/templates/admin-header.html' },
'content': { templateUrl: 'pages/admin-delete-playlist.html' },
'footer': { templateUrl: 'pages/templates/footer.html' }
}
})
Expand Down
48 changes: 33 additions & 15 deletions TeamDBAwesome/TeamDBAwesome/js/adminController.js
Expand Up @@ -49,6 +49,39 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
$scope.showMediaOptions = false;
};

$scope.gridOptions = {
enableFiltering: true,
columnDefs: [
{field: 'Fname', displayName: 'First Name'},
{field: 'Lname', displayName: 'Last Name'},
{field: 'Address'},
{field: 'City'},
{field: 'State'},
{field: 'Post'},
{field: 'Country'},
{field: 'Phone'},
{field: 'Fax'},
{field: 'Email'},
{field: 'Company'}
]
}

$scope.gridOptions.data = [
{
"Fname": "Test",
"Lname": "Test",
"Address": "Test",
"City": "Test",
"State": "Test",
"Post": "Test",
"Country": "Test",
"Phone": "Test",
"Fax": "Test",
"Email": "Test",
"Company": "Test"

}
]


$scope.getPlaylists = function () {
Expand All @@ -61,19 +94,4 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
})
}

$scope.playlists = [
{
"playlistId": "1",
"name": "test1"
},
{
"playlistId": "2",
"name": "test2"
},
{
"playlistId": "3",
"name": "test3"
}
];

});
11 changes: 6 additions & 5 deletions TeamDBAwesome/TeamDBAwesome/pages/admin-customerinfo.html
@@ -1,16 +1,17 @@

<div ng-controller="adminController">

<h2 class=''>Customer Info</h2><div>
<h2 class=''>Customer Info</h2>
<div>

<!-- <div id="messages" class="alert alert-info" data-ng-show="messages" data-ng-bind="messages"></div> -->
<!-- Generate a current list of questions w/ toggle disable -->
<!-- <div id="messages" class="alert alert-info" data-ng-show="messages" data-ng-bind="messages"></div>
Generate a current list of questions w/ toggle disable
Review Customer Demographic Screen – this screen should be similar to the edit profile
screen (see Figure 1 again) but it should include the ability to search for a customer by
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.

appropriate. -->
<div id="customerDemograpics" ui-grid="gridOptions" class="grid"></div>
</div>
</div>
<br><Br><br>
8 changes: 8 additions & 0 deletions TeamDBAwesome/TeamDBAwesome/pages/admin-delete-playlist.html
@@ -0,0 +1,8 @@

<head>
<title></title>
<meta charset="utf-8" />
</head>
<div ng-controller="adminController">

</div>
8 changes: 8 additions & 0 deletions TeamDBAwesome/TeamDBAwesome/pages/admin-edit-playlist.html
@@ -0,0 +1,8 @@

<head>
<title></title>
<meta charset="utf-8" />
</head>
<div ng-controller="adminController">

</div>
2 changes: 1 addition & 1 deletion TeamDBAwesome/TeamDBAwesome/pages/admin-mediacenter.html
Expand Up @@ -19,6 +19,6 @@
criteria. <br /><br />-->

<a ui-sref="new-media" class="btn btn-lg btn-primary center-block">Create New Media</a><br/>
<a ui-sref="playlist-editor" class="btn btn-lg btn-primary center-block">Playlist Editor</a>
<a ui-sref="admin-playlist-manager" class="btn btn-lg btn-primary center-block">Playlist Editor</a>
</div>
</div>
Expand Up @@ -3,13 +3,13 @@
<meta charset="utf-8" />
</head>
<div ng-controller="adminController" ng-init="getPlaylists();">
<a ng-click="getPlaylists()">Create New Playlist</a>
<a>Create New Playlist</a>
<table>
<tr ng-repeat="playlist in playlists">
<td>{{ playlist.PlaylistID }}</td>
<td>{{ playlist.Name }}</td>
<td><button>Edit</button></td>
<td><button>Delete</button></td>
<td><a ui-sref="admin-edit-playlist">Edit</a></td>
<td><a ui-sref="admin-delete-playlist">Delete</a></td>
</tr>
</table>
</div>

0 comments on commit 63e212f

Please sign in to comment.