Skip to content

Commit

Permalink
step 4. added sorting in users and extension page
Browse files Browse the repository at this point in the history
  • Loading branch information
edospadoni committed Nov 21, 2023
1 parent 85da648 commit cf764d6
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ angular.module('nethvoiceWizardUiApp')
$scope.devicesNotLinkedLimit = $scope.DEVICES_NOT_LINKED_PAGE;

$scope.availableUserFilters = ['all', 'configured', 'unconfigured']
$scope.availableUserFiltersNumbers = ['lname', 'default_extension']
$scope.availableUserFiltersNumbers = ['username', 'display_name', 'default_extension'];

$scope.usersFilter = $scope.availableUserFilters[0]
$scope.usersFilterNumbers = $scope.availableUserFiltersNumbers[0]
Expand Down
2 changes: 2 additions & 0 deletions wizard/app/scripts/controllers/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ angular.module('nethvoiceWizardUiApp')
$scope.onSave = false;
$scope.lockOnList = false;
$scope.availableUsersFilters = ['all', 'configured', 'unconfigured'];
$scope.availableUserFiltersNumbers = ['username', 'display_name', 'default_extension'];
$scope.selectedUsersFilter = $scope.availableUsersFilters[0];
$scope.usersFilterNumbers = $scope.availableUserFiltersNumbers[0];
$scope.view.changeRoute = true;
$scope.usersLimit = 20

Expand Down
4 changes: 3 additions & 1 deletion wizard/app/scripts/i18n/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"Header Report 2": "Provide credentials to the users to access CTI",
"Header Migration Report 1": "Summary table of messages received during migration:",
"Admins": "Admin",
"lname": "Name",
"lname": "Surname",
"username": "Username",
"display_name": "Display name",
"default_extension": "Extension",
"orderBy": "Order",
"profiles": "users profiles",
Expand Down
4 changes: 3 additions & 1 deletion wizard/app/scripts/i18n/locale-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@
"Allow to view and manage queues in real time": "Consente di visualizzare ed amministrare le code in tempo reale",
"Copied": "Copiato",
"orderBy": "Ordina",
"lname": "Nome",
"lname": "Cognome",
"username": "Username",
"display_name": "Display name",
"default_extension": "Interno",
"Copy to clipboard": "Copia elemento",
"Empty search": "Svuota ricerca",
Expand Down
4 changes: 4 additions & 0 deletions wizard/app/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -3682,3 +3682,7 @@ a.black:active {
.card-pf.card-pf-accented {
border-top-color: #6ec664;
}

.adjust-search-button {
height: 33px;
}
4 changes: 2 additions & 2 deletions wizard/app/views/configurations/preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1 class="control-label centered" for="textInput-markup">{{'Users Configuration
</div>
</div>
<div class="form-group">
<button class="btn btn-default btn-lg" type="submit">
<button class="btn btn-default btn-lg adjust-search-button" type="submit">
<span class="fa fa-search"></span>
</button>
</div>
Expand Down Expand Up @@ -541,7 +541,7 @@ <h4 class="modal-title" id="dfSettingsMLabel">{{'Link device' | translate}}</h4>
class="form-control input-lg ng-pristine ng-valid ng-touched"
placeholder=" {{'Search devices' | translate}}...">
</div>
<button class="btn btn-default btn-lg mln-1" type="submit">
<button class="btn btn-default btn-lg mln-1 adjust-search-button" type="submit">
<span class="fa fa-search"></span>
</button>
</div>
Expand Down
10 changes: 7 additions & 3 deletions wizard/app/views/extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ <h1 class="control-label centered" for="textInput-markup">{{'Extensions Configur
<strong>{{error.file.title | translate}}.</strong> {{error.file.content | translate}}
</div>
<div>
<div class="filter-label-user">{{'Filter' | translate}}:</div>
<div class="filter-label-user adjust-filter-user">{{'Filter' | translate}}:</div>
<select title="-" pf-select="{ width: '180px' }" ng-model="selectedUsersFilter" ng-options="uf as uf | translate for uf in availableUsersFilters">
</select>
<div class="filter-label-user-order">
<select title="-" pf-select="{ width: '180px' }" ng-model="usersFilterNumbers" ng-options="uf as uf | translate for uf in availableUserFiltersNumbers"></select>
<i class="fa fa-sort-alpha-asc"></i>
</div>
</div>
<form role="form" class="search-pf has-button adjust-form" id="form-lg-domains-details">
<div class="form-group has-clear">
Expand All @@ -31,7 +35,7 @@ <h1 class="control-label centered" for="textInput-markup">{{'Extensions Configur
</div>
</div>
<div class="form-group">
<button class="btn btn-default btn-lg" type="submit">
<button class="btn btn-default btn-lg adjust-search-button" type="submit">
<span class="fa fa-search"></span>
</button>
</div>
Expand All @@ -45,7 +49,7 @@ <h1 class="control-label centered" for="textInput-markup">{{'Extensions Configur
</div>
<div class="list-group list-view-pf list-view-pf-view adjust-margin-extensions margin-bottom-lg">
<div ng-show="selectedUsersFilter == 'configured' ? user.default_extension !== 'none' : (selectedUsersFilter == 'unconfigured' ? user.default_extension == 'none' : true)"
class="list-group-item" ng-repeat="user in users | customFilterMultiple:'displayname,username,default_extension':searchUsersString | orderBy:'user.username' | limitTo: usersLimit">
class="list-group-item" ng-repeat="user in users | customFilterMultiple:'displayname,username,default_extension':searchUsersString | orderBy:'user.username' | limitTo: usersLimit | orderBy:usersFilterNumbers">
<div class="list-view-pf-actions {{user.alreadyExists ? 'has-error' : ''}}">
<div ng-show="user.isInAction" class="spinner spinner-sm adjust-margin"></div>
<span ng-show="!user.isInAction" popover-placement="top-right" popover-trigger="'mouseenter'" popover-animation="true" uib-popover="{{user.default_extension === 'none' ? 'Not configured' : 'Configured' | translate}}"
Expand Down

0 comments on commit cf764d6

Please sign in to comment.