mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
fix: project task form dialog.
This commit is contained in:
@@ -40,6 +40,9 @@ function ProjectDetailActionsBar({
|
||||
// Handle new transaction button click.
|
||||
const handleNewTransactionBtnClick = ({ path }) => {
|
||||
switch (path) {
|
||||
case 'project_task':
|
||||
openDialog('project-task-form', { projectId });
|
||||
break;
|
||||
case 'invoincing':
|
||||
openDialog('project-invoicing-form');
|
||||
break;
|
||||
|
||||
@@ -36,11 +36,11 @@ export function TaskAccessor(row) {
|
||||
<TaskTitle>{row.name}</TaskTitle>
|
||||
</TaskHeader>
|
||||
<TaskContent>
|
||||
{row.charge_type === 'hourly_rate'
|
||||
{row.charge_type === 'TIME'
|
||||
? intl.get('project_task.rate', {
|
||||
rate: row.rate,
|
||||
})
|
||||
: intl.get(row.charge_type)}
|
||||
: row.charge_type}
|
||||
<TaskDescription>
|
||||
{row.estimate_minutes &&
|
||||
intl.get('project_task.estimate_minutes', {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const projectTranslations = [
|
||||
{ name: intl.get('project_details.new_task'), path: 'project_task' },
|
||||
{ name: intl.get('project_details.new_invoicing'), path: 'invoincing' },
|
||||
{ name: intl.get('project_details.new_expense'), path: 'expense' },
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
|
||||
const defaultInitialValues = {
|
||||
name: '',
|
||||
charge_type: 'fixed_price',
|
||||
charge_type: 'fixed',
|
||||
estimate_minutes: '',
|
||||
cost_estimate: 0,
|
||||
rate: '0.00',
|
||||
|
||||
@@ -60,7 +60,7 @@ function ProjectTaskFormFields({
|
||||
/>
|
||||
<FInputGroup
|
||||
name="rate"
|
||||
disabled={values?.charge_type === 'non_chargeable'}
|
||||
disabled={values?.charge_type === 'non_chargable'}
|
||||
/>
|
||||
</ControlGroup>
|
||||
</FFormGroup>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const taskChargeOptions = [
|
||||
{ name: intl.get('project_task.dialog.hourly_rate'), value: 'hourly_rate' },
|
||||
{ name: intl.get('project_task.dialog.fixed_price'), value: 'fixed_price' },
|
||||
{ name: intl.get('project_task.dialog.non_chargeable'), value: 'non_chargeable' },
|
||||
{ name: intl.get('project_task.dialog.hourly_rate'), value: 'time' },
|
||||
{ name: intl.get('project_task.dialog.fixed_price'), value: 'fixed' },
|
||||
{ name: intl.get('project_task.dialog.non_chargeable'), value: 'non_chargable' },
|
||||
];
|
||||
|
||||
export const expenseChargeOption = [
|
||||
|
||||
@@ -2108,6 +2108,7 @@
|
||||
"project_details.label.purchases": "Purchases",
|
||||
"project_details.label.sales": "Sales",
|
||||
"project_details.label.journals": "Journals",
|
||||
"project_details.new_task": "New Task",
|
||||
"project_details.new_invoicing": "New Invoicing",
|
||||
"project_details.new_expense": "New Expense",
|
||||
"project_details.new_estimated_expense": "New Estimated Expense",
|
||||
@@ -2208,5 +2209,8 @@
|
||||
"project_invoicing.dialog.all_time_entries": "All time entries",
|
||||
"project_invoicing.dialog.all_unbilled_expenses": "All unbilled expenses",
|
||||
"project_invoicing.dialog.all_bills": "All bills",
|
||||
"project_invoicing.dialog.bill_to": "Bill To"
|
||||
"project_invoicing.dialog.bill_to": "Bill To",
|
||||
"project_billable_entries.dialog.label": "Add Project Entries",
|
||||
"project_billable_entries.dialog.filter_by_date": "Filter by Date",
|
||||
"project_billable_entries.dialog.filter_by_type":"Filter by Type"
|
||||
}
|
||||
Reference in New Issue
Block a user