feat(ratecard): update currency default to USD and align rate columns to the right
This commit is contained in:
@@ -45,4 +45,4 @@ ALTER TABLE projects
|
|||||||
ADD COLUMN rate_card UUID REFERENCES finance_rate_cards(id) ON DELETE SET NULL;
|
ADD COLUMN rate_card UUID REFERENCES finance_rate_cards(id) ON DELETE SET NULL;
|
||||||
|
|
||||||
ALTER TABLE finance_rate_cards
|
ALTER TABLE finance_rate_cards
|
||||||
ADD COLUMN currency TEXT NOT NULL DEFAULT 'LKR';
|
ADD COLUMN currency TEXT NOT NULL DEFAULT 'USD';
|
||||||
|
|||||||
@@ -249,6 +249,7 @@ const RatecardDrawer = ({
|
|||||||
{
|
{
|
||||||
title: `${t('ratePerHourColumn')} (${currency})`,
|
title: `${t('ratePerHourColumn')} (${currency})`,
|
||||||
dataIndex: 'rate',
|
dataIndex: 'rate',
|
||||||
|
align: 'right',
|
||||||
render: (text: number, record: any, index: number) => (
|
render: (text: number, record: any, index: number) => (
|
||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
@@ -258,6 +259,7 @@ const RatecardDrawer = ({
|
|||||||
border: 'none',
|
border: 'none',
|
||||||
boxShadow: 'none',
|
boxShadow: 'none',
|
||||||
padding: 0,
|
padding: 0,
|
||||||
|
textAlign: 'right',
|
||||||
}}
|
}}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const updatedRoles = roles.map((role, idx) =>
|
const updatedRoles = roles.map((role, idx) =>
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ const RatecardTable: React.FC = () => {
|
|||||||
{
|
{
|
||||||
title: `${t('ratePerHourColumn')} (${currency})`,
|
title: `${t('ratePerHourColumn')} (${currency})`,
|
||||||
dataIndex: 'rate',
|
dataIndex: 'rate',
|
||||||
|
align: 'right',
|
||||||
render: (value: number, record: JobRoleType, index: number) => (
|
render: (value: number, record: JobRoleType, index: number) => (
|
||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
@@ -161,6 +162,7 @@ const RatecardTable: React.FC = () => {
|
|||||||
boxShadow: 'none',
|
boxShadow: 'none',
|
||||||
padding: 0,
|
padding: 0,
|
||||||
width: 80,
|
width: 80,
|
||||||
|
textAlign: 'right',
|
||||||
}}
|
}}
|
||||||
onChange={(e) => handleRateChange(e.target.value, index)}
|
onChange={(e) => handleRateChange(e.target.value, index)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user