@@ -32,7 +32,6 @@ import DateRangePicker from '@/packages/ui/src/Input/DateRangePicker.vue';
3232import ReportingExportModal from ' @/Components/Common/Reporting/ReportingExportModal.vue' ;
3333import ReportSaveButton from ' @/Components/Common/Report/ReportSaveButton.vue' ;
3434import TagDropdown from ' @/packages/ui/src/Tag/TagDropdown.vue' ;
35- import ReportingPieChart from ' @/Components/Common/Reporting/ReportingPieChart.vue' ;
3635
3736import { computed , type ComputedRef , inject , onMounted , ref , watch } from ' vue' ;
3837import { type GroupingOption , useReportingStore } from ' @/utils/useReporting' ;
@@ -433,9 +432,9 @@ const tableData = computed(() => {
433432 </div >
434433 </MainContainer >
435434 <MainContainer >
436- <div class =" sm:grid grid-cols-4 pt-6 items-start" >
435+ <div class =" pt-6 items-start" >
437436 <div
438- class =" col-span-3 bg-card-background rounded-lg border border-card-border pt-3" >
437+ class =" bg-card-background rounded-lg border border-card-border pt-3" >
439438 <div
440439 class =" text-sm flex text-text-primary items-center space-x-3 font-medium px-6 border-b border-card-background-separator pb-3" >
441440 <span >Group by</span >
@@ -455,33 +454,28 @@ const tableData = computed(() => {
455454 updateTableReporting
456455 " ></ReportingGroupBySelect >
457456 </div >
458- <div
459- class =" grid items-center"
460- style =" grid-template-columns : 1fr 100px 150px " >
461- <div
462- class =" contents [& >*]:border-card-background-separator [& >*]:border-b [& >*]:bg-tertiary [& >*]:pb-1.5 [& >*]:pt-1 text-text-secondary text-sm" >
463- <div class =" pl-6" >Name</div >
464- <div class =" text-right" >Duration</div >
465- <div class =" text-right pr-6" >Cost</div >
466- </div >
457+ <div class =" px-6 pt-6 pb-3" >
467458 <template
468- v-if ="
469- aggregatedTableTimeEntries ?.grouped_data &&
470- aggregatedTableTimeEntries .grouped_data ?.length > 0
471- " >
459+ v-for =" reportingRowEntry in aggregatedTableTimeEntries ?.grouped_data "
460+ :key =" reportingRowEntry .key " >
472461 <ReportingRow
473- v-for =" entry in tableData"
474- :key =" entry.description ?? 'none'"
475- :currency =" getOrganizationCurrencyString()"
476- :type =" aggregatedTableTimeEntries.grouped_type"
477- :entry =" entry" ></ReportingRow >
478- <div
479- class =" contents [& >*]:transition text-text-tertiary [& >*]:h-[50px]" >
480- <div class =" flex items-center pl-6 font-medium" >
481- <span >Total</span >
482- </div >
483- <div
484- class =" justify-end flex items-center font-medium" >
462+ :reporting-row-entry =" reportingRowEntry"
463+ :grouped-type ="
464+ aggregatedTableTimeEntries?.grouped_type
465+ "
466+ :show-seconds =" showSeconds"
467+ :group =" group"
468+ :sub-group =" subGroup" ></ReportingRow >
469+ </template >
470+ <div
471+ v-if ="
472+ aggregatedTableTimeEntries &&
473+ aggregatedTableTimeEntries.grouped_data.length > 0
474+ "
475+ class =" border-t border-background-separator pt-3 mt-6 text-sm space-y-2" >
476+ <div class =" justify-between items-center flex" >
477+ <div class =" font-medium" >Total</div >
478+ <div class =" font-medium" >
485479 {{
486480 formatHumanReadableDuration(
487481 aggregatedTableTimeEntries.seconds,
@@ -490,36 +484,37 @@ const tableData = computed(() => {
490484 )
491485 }}
492486 </div >
493- <div
494- class =" justify-end pr-6 flex items-center font-medium" >
487+ </div >
488+ <div
489+ v-if ="
490+ aggregatedTableTimeEntries.cost !== null &&
491+ showBillableRate
492+ "
493+ class =" justify-between items-center flex" >
494+ <div class =" font-medium" >Total Billable</div >
495+ <div class =" justify-end pr-6 flex items-center font-medium" >
495496 {{
496- aggregatedTableTimeEntries.cost
497- ? formatCents(
498- aggregatedTableTimeEntries.cost,
499- getOrganizationCurrencyString(),
500- organization?.currency_format,
501- organization?.currency_symbol,
502- organization?.number_format
503- )
504- : '--'
497+ formatCents(
498+ aggregatedTableTimeEntries.cost,
499+ getOrganizationCurrencyString(),
500+ organization?.currency_format,
501+ organization?.currency_symbol,
502+ organization?.number_format
503+ )
505504 }}
506505 </div >
507506 </div >
508507 </template >
509508 <div
510509 v-else
511- class =" chart flex flex-col items-center justify-center py-12 col-span-3 " >
510+ class="chart flex flex-col items-center justify-center py-12">
512511 <p class="text-lg text-text-primary font-medium">
513512 No time entries found
514513 </p>
515514 <p>Try to change the filters and time range</p>
516515 </div >
517516 </div >
518517 </div >
519- <div class =" px-2 lg:px-4" >
520- <ReportingPieChart
521- :data =" groupedPieChartData" ></ReportingPieChart >
522- </div >
523518 </div >
524519 </MainContainer>
525520</template>
0 commit comments