Fix(Ratecard): translate locate update

This commit is contained in:
shancds
2025-05-23 17:09:16 +05:30
parent 659ede7fb5
commit 21a4131faa
4 changed files with 15 additions and 6 deletions

View File

@@ -26,6 +26,10 @@
"jobTitleColumn": "Job Title", "jobTitleColumn": "Job Title",
"ratePerHourColumn": "Rate per hour", "ratePerHourColumn": "Rate per hour",
"ratecardPluralText": "Rate Cards", "ratecardPluralText": "Rate Cards",
"labourHoursColumn": "Labour Hours" "labourHoursColumn": "Labour Hours",
"actions": "Actions",
"selectJobTitle": "Select Job Title",
"ratecardsPluralText": "Rate Card Templates"
} }

View File

@@ -19,6 +19,7 @@
"currency": "Currency", "currency": "Currency",
"actionsColumn": "Actions", "actionsColumn": "Actions",
"addAllButton": "Add All", "addAllButton": "Add All",
"removeAllButton": "Remove All" "removeAllButton": "Remove All",
"selectJobTitle": "Select job title"
} }

View File

@@ -220,6 +220,9 @@ const RatecardDrawer = ({
setAddingRowIndex(null); setAddingRowIndex(null);
}} }}
onBlur={() => { onBlur={() => {
if (roles[index].job_title_id === ""){
handleDeleteRole(index);
}
setEditingRowIndex(null); setEditingRowIndex(null);
setAddingRowIndex(null); setAddingRowIndex(null);
}} }}
@@ -241,7 +244,7 @@ const RatecardDrawer = ({
return ( return (
<span <span
style={{ cursor: 'pointer' }} style={{ cursor: 'pointer' }}
onClick={() => setEditingRowIndex(index)} // onClick={() => setEditingRowIndex(index)}
> >
{record.jobtitle} {record.jobtitle}
</span> </span>

View File

@@ -255,6 +255,7 @@ const RatecardTable: React.FC = () => {
{ {
title: t('actions'), title: t('actions'),
key: 'actions', key: 'actions',
align: 'center',
render: (_: any, record: JobRoleType, index: number) => ( render: (_: any, record: JobRoleType, index: number) => (
<Popconfirm <Popconfirm
title={t('deleteConfirm')} title={t('deleteConfirm')}
@@ -288,18 +289,18 @@ const RatecardTable: React.FC = () => {
pagination={false} pagination={false}
loading={isLoading || isLoadingMembers} loading={isLoading || isLoadingMembers}
footer={() => ( footer={() => (
<Flex gap={8}> <Flex gap={0}>
<Button type="dashed" onClick={handleAddRole} style={{ width: 'fit-content' }}> <Button type="dashed" onClick={handleAddRole} style={{ width: 'fit-content' }}>
{t('addRoleButton')} {t('addRoleButton')}
</Button> </Button>
<Button {/* <Button
type="primary" type="primary"
icon={<SaveOutlined />} icon={<SaveOutlined />}
onClick={handleSaveAll} onClick={handleSaveAll}
disabled={roles.length === 0} disabled={roles.length === 0}
> >
{t('saveButton') || 'Save'} {t('saveButton') || 'Save'}
</Button> </Button> */}
</Flex> </Flex>
)} )}
/> />