mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-04 15:11:48 -05:00
158 paginated data list (#180)
* working: rename OrganizationTeamsList to PaginatedDataList * convert org notifications list fully to PaginatedDataList * update NotificationList tests * refactor org access to use PaginatedDataList * update tests for org access refactor; fix pagination & sorting * restore Add Role functionality to Org roles * fix displayed text when list of items is empty * preserve query params when navigating through pagination * fix bugs after RBAC rebase * fix lint errors, fix add org access button
This commit is contained in:
16
src/util/strings.js
Normal file
16
src/util/strings.js
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
export function pluralize (str) {
|
||||
return str[str.length - 1] === 's' ? `${str}es` : `${str}s`;
|
||||
}
|
||||
|
||||
export function getArticle (str) {
|
||||
const first = str[0];
|
||||
if (('aeiou').includes(first)) {
|
||||
return 'an';
|
||||
}
|
||||
return 'a';
|
||||
}
|
||||
|
||||
export function ucFirst (str) {
|
||||
return `${str[0].toUpperCase()}${str.substr(1)}`;
|
||||
}
|
||||
Reference in New Issue
Block a user