Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Jan 3, 2025
1 parent b50ab55 commit 22517d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/common/colors.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const ERROR_COLORS = {
light: '#ba1a1a',
dark: '#ffb4ab',
contrastText: WHITE,
'95': '#ffedea'
}

export const COLORS = {
Expand Down
16 changes: 9 additions & 7 deletions src/components/repos/Matching.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import uniqBy from 'lodash/uniqBy'

import APIService from '../../services/APIService';
import { highlightTexts } from '../../common/utils';
import { WHITE, SURFACE_COLORS } from '../../common/colors';
import { WHITE, SURFACE_COLORS, ERROR_COLORS } from '../../common/colors';

import CloseIconButton from '../common/CloseIconButton';
import SearchResults from '../search/SearchResults';
Expand Down Expand Up @@ -119,7 +119,7 @@ const ALGOS = [
{id: 'llm', label: 'LLM Matching', disabled: true},
]
const DECISION_TABS = ['map', 'candidates', 'search', 'propose']
const UPDATED_COLOR = 'rgba(255, 167, 38, 0.1)'
const UPDATED_COLOR = ERROR_COLORS['95']

const formatMappings = item => {
let same_as_mappings = []
Expand Down Expand Up @@ -431,7 +431,7 @@ const Matching = () => {
variant="head"
sx={{
width: column.width || undefined,
padding: isEditing ? '8px': '0px 8px',
padding: isEditing ? '0 8px': '6px',
backgroundColor: isUpdatedValue ? UPDATED_COLOR : WHITE
}}
>
Expand Down Expand Up @@ -737,7 +737,7 @@ const Matching = () => {
const worksheet = XLSX.utils.json_to_sheet(rows);
const workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, "Dates");
XLSX.writeFile(workbook, "Matched.csv", { compression: true });
XLSX.writeFile(workbook, `${name || 'Matched'}.${moment().format('YYYYMMDDHHmmss')}.csv`, { compression: true });

Check failure on line 740 in src/components/repos/Matching.jsx

View workflow job for this annotation

GitHub Actions / Eslint

You have a misspelled word: Hmmss on String
}

const onCSVRowSelect = csvRow => {
Expand Down Expand Up @@ -939,19 +939,21 @@ const Matching = () => {
variant='fullWidth'
value={selectedRowStatus}
onChange={(event, newValue) => onStateTabChange(newValue)}
sx={{minHeight: '38px', height: '38px'}}
>
<Tab
size='small'
label={`All (${data.length.toLocaleString()})`}
value='all'
sx={{padding: '2px 6px'}}
sx={{padding: '2px 6px', minHeight: '38px', height: '38px', textTransform: 'none'}}
/>
{
ROW_STATES.map(state => {
let count = rowStatuses[state].length
return (
<Tab
size='small'
sx={{padding: '2px 6px !important'}}
sx={{padding: '2px 6px !important', minHeight: '38px', height: '38px', textTransform: 'none'}}
value={state}
key={state}
disabled={count === 0}
Expand Down Expand Up @@ -1066,7 +1068,7 @@ const Matching = () => {
DECISION_TABS.map(_tab => {
return (
<Tab
sx={{padding: '2px 6px !important'}}
sx={{padding: '2px 6px !important', textTransform: 'none'}}
value={_tab}
key={_tab}
label={startCase(_tab)}
Expand Down

0 comments on commit 22517d1

Please sign in to comment.