[MM-56318] Global warning banners of user limit for admins (#25797)

* get data to store

* inin

* added inside loadme

* useCWSAvailabilityCheck hook improve

* modal airgap

* the bar

* Update announcement_bar_controller.tsx

* Update true_up_review.tsx

* csw

* fixes

* fixed

* more tests

* icon changed

* changes

* Extended tests

* Update index.ts

* redux harrison changes

* Updated copy

* Lint fixes

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: harshil Sharma <harshilsharma63@gmail.com>
Этот коммит содержится в:
M-ZubairAhmed
2024-01-11 14:11:04 +00:00
коммит произвёл GitHub
родитель 539412b353
Коммит 2676caa52f
34 изменённых файлов: 503 добавлений и 72 удалений

Просмотреть файл

@@ -148,6 +148,7 @@ import {
} from '@mattermost/types/data_retention';
import {CompleteOnboardingRequest} from '@mattermost/types/setup';
import {UserThreadList, UserThread, UserThreadWithPost} from '@mattermost/types/threads';
import {UsersLimits} from '@mattermost/types/limits';
import {cleanUrlForLogging} from './errors';
import {buildQueryString} from './helpers';
@@ -488,6 +489,10 @@ export default class Client4 {
return `${this.getBaseRoute()}/limits`;
}
getUsersLimitsRoute() {
return `${this.getLimitsRoute()}/users`;
}
getCSRFFromCookie() {
if (typeof document !== 'undefined' && typeof document.cookie !== 'undefined') {
const cookies = document.cookie.split(';');
@@ -1196,6 +1201,18 @@ export default class Client4 {
);
}
// Limits Routes
getUsersLimits = () => {
return this.doFetchWithResponse<UsersLimits>(
`${this.getUsersLimitsRoute()}`,
{
method: 'get',
},
);
}
// Team Routes
createTeam = (team: Team) => {