From 26a5ad6e66f35ebfbcd9ca26547bb840cdac38fc Mon Sep 17 00:00:00 2001 From: dzonidoo Date: Thu, 4 Jan 2024 11:31:18 +0100 Subject: [PATCH 1/7] created lable component and changed ussages --- .../components/AgendaItemTimeUpdater.tsx | 3 +- .../agenda/components/CoverageItemStatus.tsx | 3 +- assets/companies/components/EditCompany.tsx | 5 +- .../components/CompanyAdminApp.tsx | 6 +- .../components/CompanyUserListItem.tsx | 15 ++- assets/components/Label.tsx | 27 +++++ assets/search/components/Topic.tsx | 5 +- assets/styles/custom-variables.scss | 3 +- assets/styles/labels.scss | 106 +++++++++--------- assets/ui/components/ArticleEmbargoed.tsx | 5 +- assets/users/components/EditUser.tsx | 5 +- 11 files changed, 105 insertions(+), 78 deletions(-) create mode 100644 assets/components/Label.tsx diff --git a/assets/agenda/components/AgendaItemTimeUpdater.tsx b/assets/agenda/components/AgendaItemTimeUpdater.tsx index 1fd28007a..edd5be40b 100644 --- a/assets/agenda/components/AgendaItemTimeUpdater.tsx +++ b/assets/agenda/components/AgendaItemTimeUpdater.tsx @@ -6,6 +6,7 @@ import classNames from 'classnames'; import {bem} from 'ui/utils'; import {gettext} from 'utils'; +import {Label} from 'components/Label'; class AgendaItemTimeUpdater extends React.Component { static propTypes: any; @@ -108,7 +109,7 @@ class AgendaItemTimeUpdater extends React.Component { return(
-
{this.state.timeText}
+
); } diff --git a/assets/agenda/components/CoverageItemStatus.tsx b/assets/agenda/components/CoverageItemStatus.tsx index 1269a51d7..5a5c015df 100644 --- a/assets/agenda/components/CoverageItemStatus.tsx +++ b/assets/agenda/components/CoverageItemStatus.tsx @@ -14,6 +14,7 @@ import AgendaEdNote from './AgendaEdNote'; import ActionButton from 'components/ActionButton'; import {Tooltip} from 'bootstrap'; +import {Label} from 'components/Label'; function getDeliveryHref(coverage: any) { return get(coverage, 'delivery_href'); @@ -185,7 +186,7 @@ export default class CoverageItemStatus extends React.Component { {isCoverageBeingUpdated(coverage) && (
- {gettext('Update coming')} +
)} diff --git a/assets/companies/components/EditCompany.tsx b/assets/companies/components/EditCompany.tsx index 637f49f00..1989ba07a 100644 --- a/assets/companies/components/EditCompany.tsx +++ b/assets/companies/components/EditCompany.tsx @@ -24,6 +24,7 @@ import CompanyPermissions from './CompanyPermissions'; import EditCompanyAPI from './EditCompanyAPI'; import AuditInformation from 'components/AuditInformation'; import {EditCompanyDetails} from './EditCompanyDetails'; +import {Label} from 'components/Label'; interface IStateProps { company: ICompany; @@ -182,9 +183,7 @@ class EditCompany extends React.Component { {this.props.company.is_approved !== false ? null : (
- +
- {this.props.sectionId === 'users' ? : ''} + {this.props.sectionId === 'users' + &&