-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/VETS-CPC-935_Display_Image_Next_to_Vet_…
…Profile_Picture_Based_on_Average_Rating_of_Vet
- Loading branch information
Showing
7 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
api-gateway/src/main/resources/static/scripts/pet-type-list/pet-type-list.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
}); |
16 changes: 16 additions & 0 deletions
16
api-gateway/src/main/resources/static/scripts/pet-type-list/pet-type-list.controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|
||
}); | ||
}]); | ||
|
||
|
14 changes: 14 additions & 0 deletions
14
api-gateway/src/main/resources/static/scripts/pet-type-list/pet-type-list.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
}) | ||
}]); |
67 changes: 67 additions & 0 deletions
67
api-gateway/src/main/resources/static/scripts/pet-type-list/pet-type-list.template.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |