mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: add project & timesheet table.
This commit is contained in:
@@ -18,6 +18,7 @@ export const TABLES = {
|
||||
VENDOR_CREDITS: 'vendor_credits',
|
||||
WAREHOUSE_TRANSFERS: 'warehouse_transfers',
|
||||
PROJECTS: 'projects',
|
||||
TIMESHEETS: 'timesheets',
|
||||
};
|
||||
|
||||
export const TABLE_SIZE = {
|
||||
|
||||
@@ -197,6 +197,7 @@ export default function DataTable(props) {
|
||||
DataTable.defaultProps = {
|
||||
pagination: false,
|
||||
hidePaginationNoPages: true,
|
||||
hideTableHeader: false,
|
||||
|
||||
size: null,
|
||||
spinnerProps: { size: 30 },
|
||||
|
||||
@@ -80,24 +80,31 @@ function TableHeaderGroup({ headerGroup }) {
|
||||
export default function TableHeader() {
|
||||
const {
|
||||
table: { headerGroups, page },
|
||||
props: { TableHeaderSkeletonRenderer, headerLoading, progressBarLoading },
|
||||
props: {
|
||||
TableHeaderSkeletonRenderer,
|
||||
headerLoading,
|
||||
progressBarLoading,
|
||||
hideTableHeader,
|
||||
},
|
||||
} = useContext(TableContext);
|
||||
|
||||
if (headerLoading && TableHeaderSkeletonRenderer) {
|
||||
return <TableHeaderSkeletonRenderer />;
|
||||
}
|
||||
return (
|
||||
<ScrollSyncPane>
|
||||
<div className="thead">
|
||||
<div className={'thead-inner'}>
|
||||
{headerGroups.map((headerGroup, index) => (
|
||||
<TableHeaderGroup key={index} headerGroup={headerGroup} />
|
||||
))}
|
||||
<If condition={progressBarLoading}>
|
||||
<MaterialProgressBar />
|
||||
</If>
|
||||
!hideTableHeader && (
|
||||
<ScrollSyncPane>
|
||||
<div className="thead">
|
||||
<div className={'thead-inner'}>
|
||||
{headerGroups.map((headerGroup, index) => (
|
||||
<TableHeaderGroup key={index} headerGroup={headerGroup} />
|
||||
))}
|
||||
<If condition={progressBarLoading}>
|
||||
<MaterialProgressBar />
|
||||
</If>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ScrollSyncPane>
|
||||
</ScrollSyncPane>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -557,6 +557,17 @@ export const SidebarMenu = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: <T id={'New tasks'} />,
|
||||
type: ISidebarMenuItemType.Group,
|
||||
children: [
|
||||
{
|
||||
text: <T id={'projects.label.new_project'} />,
|
||||
type: ISidebarMenuItemType.Dialog,
|
||||
dialogName: 'project-form',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
// ---------------
|
||||
|
||||
@@ -2056,12 +2056,12 @@
|
||||
"projects.dialog.calculator_expenses": "Calculator from tasks & estimated expenses",
|
||||
"projects.dialog.cost_estimate": "Cost Estimate",
|
||||
"projects.label.create": "Create",
|
||||
"projects.label.cost_estimate":" • Estimate {value}",
|
||||
"task.label.new_task": "New Task",
|
||||
"task.label.task_name": "Task Name",
|
||||
"task.label.estimated_hours": "Task Name",
|
||||
"task.label.charge": "Charge",
|
||||
"task.label.estimated_amount": "Estimated Amount",
|
||||
"projects.label.cost_estimate": " • Estimate {value}",
|
||||
"task.dialog.new_task": "New Task",
|
||||
"task.dialog.task_name": "Task Name",
|
||||
"task.dialog.estimated_hours": "Estimate Hours",
|
||||
"task.dialog.charge": "Charge",
|
||||
"task.dialog.estimated_amount": "Estimated Amount",
|
||||
"project.schema.label.contact": "Contact",
|
||||
"project.schema.label.project_name": "Project name",
|
||||
"project.schema.label.deadline": "Deadline",
|
||||
@@ -2072,19 +2072,20 @@
|
||||
"task.schema.label.charge": "Charge",
|
||||
"task.schema.label.amount": "Amount",
|
||||
"projcet_details.action.new_transaction": "New Transaction",
|
||||
"projcet_details.action.log_time": "Log Time",
|
||||
"projcet_details.action.time_entry": "Time",
|
||||
"projcet_details.action.edit_project": "Edit Project",
|
||||
"project_details.label.overview": "Overview",
|
||||
"project_details.label.timesheet": "Timesheet",
|
||||
"project_details.label.purchases": "Purchases",
|
||||
"project_details.label.sales": "Sales",
|
||||
"project_details.label.journals": "Journals",
|
||||
"timesheets.actions.delete_timesheet": "Delete",
|
||||
"timesheets.column.date": "Date",
|
||||
"timesheets.column.task": "Task",
|
||||
"timesheets.column.user": "User",
|
||||
"timesheets.column.time": "Time",
|
||||
"timesheets.column.billing_status": "Billing Status",
|
||||
"time_entry.dialog.label": "New time entry",
|
||||
"time_entry.dialog.label": "New Time Entry",
|
||||
"time_entry.dialog.project": "Project",
|
||||
"time_entry.dialog.task": "Task",
|
||||
"time_entry.dialog.description": "Description",
|
||||
|
||||
@@ -419,11 +419,11 @@ export default {
|
||||
],
|
||||
viewBox: '0 0 24 24',
|
||||
},
|
||||
'duplicate-16': {
|
||||
'duplicate-24': {
|
||||
path: [
|
||||
'M15 0H5c-.55 0-1 .45-1 1v2h2V2h8v7h-1v2h2c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1zm-4 4H1c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-1 10H2V6h8v8z',
|
||||
'M14.15 16.05Q14.525 16.45 15.075 16.45Q15.625 16.45 16.05 16.025Q16.425 15.65 16.425 15.088Q16.425 14.525 16.05 14.125L13.375 11.425V8.275Q13.375 7.725 12.988 7.337Q12.6 6.95 12.025 6.95Q11.45 6.95 11.05 7.35Q10.65 7.75 10.65 8.3V11.975Q10.65 12.275 10.75 12.512Q10.85 12.75 11.075 12.975ZM12 22.875Q9.75 22.875 7.763 22.025Q5.775 21.175 4.3 19.7Q2.825 18.225 1.975 16.238Q1.125 14.25 1.125 12Q1.125 9.725 1.975 7.737Q2.825 5.75 4.3 4.275Q5.775 2.8 7.763 1.962Q9.75 1.125 12 1.125Q14.275 1.125 16.262 1.962Q18.25 2.8 19.725 4.275Q21.2 5.75 22.038 7.737Q22.875 9.725 22.875 12Q22.875 14.275 22.038 16.25Q21.2 18.225 19.725 19.7Q18.25 21.175 16.262 22.025Q14.275 22.875 12 22.875ZM12 12Q12 12 12 12Q12 12 12 12Q12 12 12 12Q12 12 12 12Q12 12 12 12Q12 12 12 12Q12 12 12 12Q12 12 12 12ZM12 20.05Q15.35 20.05 17.7 17.712Q20.05 15.375 20.05 12Q20.05 8.625 17.7 6.287Q15.35 3.95 12 3.95Q8.65 3.95 6.3 6.287Q3.95 8.625 3.95 12Q3.95 15.375 6.3 17.712Q8.65 20.05 12 20.05Z',
|
||||
],
|
||||
viewBox: '0 0 16 16',
|
||||
viewBox: '0 0 24 24',
|
||||
},
|
||||
'caret-down-16': {
|
||||
path: [
|
||||
@@ -540,10 +540,16 @@ export default {
|
||||
],
|
||||
viewBox: '0 0 3 13',
|
||||
},
|
||||
'time-24': {
|
||||
path: [
|
||||
'M0 7c0-3.873 3.127-7 7-7s7 3.127 7 7-3.127 7-7 7a6.99 6.99 0 0 1-7-7zm1.5 0c0 3.043 2.457 5.5 5.5 5.5s5.5-2.457 5.5-5.5S10.043 1.5 7 1.5A5.493 5.493 0 0 0 1.5 7zM6 4h1v3h3v1H6V4z',
|
||||
],
|
||||
viewBox: '0 0 14 14',
|
||||
},
|
||||
'star-18dp': {
|
||||
path: [
|
||||
'M12,17.27L18.18,21l-1.64-7.03L22,9.24l-7.19-0.61L12,2L9.19,8.63L2,9.24l5.46,4.73L5.82,21L12,17.27z',
|
||||
],
|
||||
viewBox: '0 0 24 24',
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user