-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Styled tooltips for the project badges
- Loading branch information
Showing
3 changed files
with
35 additions
and
32 deletions.
There are no files selected for viewing
42 changes: 21 additions & 21 deletions
42
frontend/src/components/project/project-month-list/closed-list/badges/InboundBadge.tsx
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 |
---|---|---|
@@ -1,45 +1,45 @@ | ||
import React from 'react'; | ||
import { t } from '../../../../utils'; | ||
import { TimesheetBadgeProps } from './TimesheetBadge'; | ||
import {t} from '../../../../utils'; | ||
import {TimesheetBadgeProps} from './TimesheetBadge'; | ||
|
||
import './InboundBadge.scss'; | ||
import {Tooltip} from "../../../../controls/Tooltip"; | ||
|
||
const AllInboundPaidBadge = ( | ||
<span className="badge rounded-pill text-white bg-success"> | ||
<i className="fa fa-inbox fa-1x" /> | ||
<i className="fa fa-inbox fa-1x"/> | ||
{t('projectMonth.list.inboundAllPaid')} | ||
</span> | ||
); | ||
|
||
|
||
/** ProjectMonth closed month Inbound badge */ | ||
export const InboundBadge = ({ pending, totals }: TimesheetBadgeProps) => { | ||
export const InboundBadge = ({pending, totals}: TimesheetBadgeProps) => { | ||
if (!pending) { | ||
return AllInboundPaidBadge; | ||
} | ||
|
||
return ( | ||
<span className="badge rounded-pill bg-warning inbound-badges"> | ||
<i | ||
className="fa fa-inbox fa-1x" | ||
title={totals.inboundNew && `<b>${t('projectMonth.inboundNew')}</b><br>${totals.inboundNew}`} | ||
> | ||
<span>{totals.inboundNewCount}</span> | ||
</i> | ||
<Tooltip title={totals.inboundNew && `<b>${t('projectMonth.inboundNew')}</b><br>${totals.inboundNew}`}> | ||
<i className="fa fa-inbox fa-1x"> | ||
<span>{totals.inboundNewCount}</span> | ||
</i> | ||
</Tooltip> | ||
|
||
<i | ||
className="fa fa-check fa-1x" | ||
title={totals.inboundValidated && `<b>${t('projectMonth.inboundValidated')}</b><br>${totals.inboundValidated}`} | ||
> | ||
<span>{totals.inboundValidatedCount}</span> | ||
</i> | ||
<Tooltip | ||
title={totals.inboundValidated && `<b>${t('projectMonth.inboundValidated')}</b><br>${totals.inboundValidated}`}> | ||
<i className="fa fa-check fa-1x"> | ||
<span>{totals.inboundValidatedCount}</span> | ||
</i> | ||
</Tooltip> | ||
|
||
<i | ||
className="fa fa-coins fa-1x" | ||
title={totals.inboundPaid && `<b>${t('projectMonth.inboundPaid')}</b><br>${totals.inboundPaid}`} | ||
> | ||
<Tooltip | ||
title={totals.inboundPaid && `<b>${t('projectMonth.inboundPaid')}</b><br>${totals.inboundPaid}`}> | ||
<i className="fa fa-coins fa-1x"> | ||
<span>{totals.inboundPaidCount}</span> | ||
</i> | ||
</i> | ||
</Tooltip> | ||
</span> | ||
) | ||
}; |
14 changes: 7 additions & 7 deletions
14
frontend/src/components/project/project-month-list/closed-list/badges/OutboundBadge.tsx
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import React from 'react'; | ||
import { t } from '../../../../utils'; | ||
import { ProjectMonthBadgeTotals } from "../ProjectMonthBadgeTotals"; | ||
import {Tooltip} from "../../../../controls/Tooltip"; | ||
|
||
/** ProjectMonth closed month Outbound badge */ | ||
export const OutboundBadge = ({ totals }: { totals: ProjectMonthBadgeTotals; }) => { | ||
return ( | ||
<span | ||
className="badge rounded-pill bg-warning" | ||
title={`<b>${t('projectMonth.outboundPaid')}</b><br>` + totals.unverified} | ||
> | ||
<i className="fa fa-coins fa-1x" /> | ||
{t('projectMonth.list.verifiedBadge', {verified: totals.verified, total: totals.total})} | ||
</span> | ||
<Tooltip title={`<b>${t('projectMonth.outboundPaid')}</b><br>` + totals.unverified}> | ||
<span className="badge rounded-pill bg-warning"> | ||
<i className="fa fa-coins fa-1x" /> | ||
{t('projectMonth.list.verifiedBadge', {verified: totals.verified, total: totals.total})} | ||
</span> | ||
</Tooltip> | ||
); | ||
}; |
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