Skip to content

Commit

Permalink
Merge branch 'main' into feat/VETS-CPC-935_Display_Image_Next_to_Vet_…
Browse files Browse the repository at this point in the history
…Profile_Picture_Based_on_Average_Rating_of_Vet
  • Loading branch information
liu-cal authored Oct 9, 2023
2 parents cabae24 + def27fa commit 8c21336
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 1 deletion.
6 changes: 6 additions & 0 deletions api-gateway/src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@

<script src="scripts/inventory-list/inventory-service.js"></script>


<script src="scripts/pet-type-list/pet-type-list.js"></script>
<script src="scripts/pet-type-list/pet-type-list.controller.js"></script>
<script src="scripts/pet-type-list/pet-type-list.component.js"></script>


</head>

<body id="bg">
Expand Down
2 changes: 1 addition & 1 deletion api-gateway/src/main/resources/static/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const petClinicApp = angular.module('petClinicApp', [
'ui.router', 'layoutNav', 'layoutFooter', 'layoutWelcome', 'ownerList', 'ownerDetails', 'ownerForm', 'ownerRegister', 'petForm'
, 'visits', 'vetList','vetForm','vetDetails', 'visitList', 'billForm', 'billUpdateForm', 'loginForm', 'rolesDetails', 'signupForm',
'billDetails', 'billsByOwnerId', 'billHistory','billsByVetId','inventoryList', 'inventoryForm', 'productForm','inventoryProductList', 'inventoryUpdateForm', 'productUpdateForm'
, 'verification' , 'adminPanel','resetPwdForm','forgotPwdForm']);
, 'verification' , 'adminPanel','resetPwdForm','forgotPwdForm','petTypeList']);



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="nav-link" ui-sref="owners">Owners</a>
<a class="nav-link" ui-sref="ownerDetails({ ownerId: UUID })">Edit Account</a>
<a class="nav-link" ui-sref="petTypes">Pet Types</a>
</div>
</li>
<li class="nav-item">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

angular.module('petTypeList')
.component('petTypeList', {
templateUrl: 'scripts/pet-type-list/pet-type-list.template.html',
controller: 'PetTypeListController'
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

angular.module('petTypeList')
.controller('PetTypeListController', ['$http', '$stateParams', '$scope', '$state', function ($http, $stateParams, $scope, $state) {
var self = this;
self.petTypes = {};
// Initialize as an empty array

$http.get('api/gateway/owners/petTypes').then(function (resp) {
self.petTypes = resp.data;
console.log(self.petTypes);

});
}]);


Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

angular.module('petTypeList', ['ui.router'])
.config(['$stateProvider', function ($stateProvider) {

$stateProvider
.state('petTypes', {
parent: 'app',
url: '/petTypes',
template: '<pet-type-list></pet-type-list>',
controller: 'PetTypeListController',
controllerAs: 'vm'
})
}]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

<style>
h3.titleOwner {
color: #2f2b2b;
text-align: left;
padding-bottom: 20px;
padding-top: 20px;
}

.CurrentOwnersContainer {
margin: 20px;
}

.FilterOwnersLabel {
color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 576px) {
/* Define styles for small screens */
.responsive-text {
font-size: 13px;
}
}

@media (min-width: 577px) and (max-width: 992px) {
/* Define styles for medium screens */
.responsive-text {
font-size: 15px;
}
}

@media (min-width: 993px) {
/* Define styles for large screens and above */
.responsive-text {
font-size: 17px;
}
}

.ownerTable thead tr th {
font-weight: 400;
color: gray;
}

input[type="Text"] {
font-size: 15px;
}
</style>

<div class="CurrentOwnersContainer" ng-app="petTypeList" ng-controller="PetTypeListController">
<h3 class="titleOwner">Current Pet Types</h3>
<table id="owner" class="table table-striped table-responsive ownerTable pb-3">
<thead class="bg-white">
<tr>
<th class="bg-white border">Pet Type ID</th>
<th class="bg-white border">Pet Type Name</th>
<th class="bg-white d-none d-sm-table-cell d-md-table-cell border">Description</th>
</tr>
</thead>
<tbody class="border">
<tr ng-repeat="petType in $ctrl.petTypes">
<td>{{petType.petTypeId }}</td>
<td class="responsive-text">{{ petType.name }}</td>
<td class="d-none d-sm-table-cell d-md-table-cell responsive-text">{{ petType.petTypeDescription }}</td>
</tr>
</tbody>
</table>
</div>

0 comments on commit 8c21336

Please sign in to comment.