Skip to content

Commit 3a24074

Browse files
authored
Merge pull request #19 from codebar-ag/main
main/production
2 parents 9764872 + f7aa21a commit 3a24074

File tree

8 files changed

+42
-46
lines changed

8 files changed

+42
-46
lines changed

changelog_internal.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,17 @@ const counts = computed(() => page.props.auth.user.current_team?.counts || {});
4343
4444
resources/js/Components/NavigationSidebarLink.vue
4545
resources/js/Components/NavigationSidebarItem.vue
46+
47+
48+
### Hide ProjectsChartCard on Dashboard
49+
50+
Disable Dashboard.ThisWeekOverview.ProjectsChartCard
51+
52+
53+
### Remove Active from Clients & Projects
54+
55+
Remove Active Icon + Label from clients & projects pages.
56+
57+
### Projects.index
58+
- Sort by clients.name asc then projects.name asc
59+
- move clients.name column before projects.name column

resources/js/Components/Common/Client/ClientTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const sortedClients = computed(() => {
2727
<div
2828
data-testid="client_table"
2929
class="grid min-w-full"
30-
style="grid-template-columns: 1fr 150px 200px 80px">
30+
style="grid-template-columns: 1fr 150px 80px">
3131
<ClientTableHeading></ClientTableHeading>
3232
<div
3333
v-if="clients.length === 0"

resources/js/Components/Common/Client/ClientTableHeading.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import TableHeading from '@/Components/Common/TableHeading.vue';
99
Name
1010
</div>
1111
<div class="px-3 py-1.5 text-left font-semibold text-text-primary"></div>
12-
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">Status</div>
1312
<div class="relative py-1.5 pl-3 pr-4 sm:pr-6 lg:pr-8 3xl:pr-12">
1413
<span class="sr-only">Edit</span>
1514
</div>

resources/js/Components/Common/Client/ClientTableRow.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ const showEditModal = ref(false);
5050
class="whitespace-nowrap flex items-center space-x-5 3xl:pl-12 py-4 pr-3 text-sm font-medium text-text-primary pl-4 sm:pl-6 lg:pl-8 3xl:pl-12">
5151
<span class="text-text-secondary"> {{ projectCount }} Projects </span>
5252
</div>
53-
<div
54-
class="whitespace-nowrap px-3 py-4 text-sm text-text-secondary flex space-x-1 items-center font-medium">
55-
<CheckCircleIcon class="w-5"></CheckCircleIcon>
56-
<span>Active</span>
57-
</div>
5853
<div
5954
class="relative whitespace-nowrap flex items-center pl-3 text-right text-sm font-medium sm:pr-0 pr-4 sm:pr-6 lg:pr-8 3xl:pr-12">
6055
<ClientMoreOptionsDropdown

resources/js/Components/Common/Project/ProjectTable.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,25 @@ async function createClient(
3838
const { clients } = storeToRefs(useClientsStore());
3939
4040
const gridTemplate = computed(() => {
41-
return `grid-template-columns: minmax(300px, 1fr) minmax(150px, auto) minmax(140px, auto) minmax(130px, auto) ${props.showBillableRate ? 'minmax(130px, auto)' : ''} minmax(120px, auto) 80px;`;
41+
return `grid-template-columns: minmax(300px, 1fr) minmax(150px, auto) minmax(140px, auto) minmax(130px, auto) ${props.showBillableRate ? 'minmax(130px, auto)' : ''} 80px;`;
4242
});
4343
import { isAllowedToPerformPremiumAction } from '@/utils/billing';
4444
4545
const sortedProjects = computed(() => {
46-
return [...props.projects].sort((a, b) => a.name.localeCompare(b.name));
46+
return [...props.projects].sort((a, b) => {
47+
// Get client names, handling null clients
48+
const clientA = clients.value.find(client => client.id === a.client_id)?.name || '';
49+
const clientB = clients.value.find(client => client.id === b.client_id)?.name || '';
50+
51+
// First sort by client name
52+
const clientComparison = clientA.localeCompare(clientB);
53+
if (clientComparison !== 0) {
54+
return clientComparison;
55+
}
56+
57+
// Then sort by project name
58+
return a.name.localeCompare(b.name);
59+
});
4760
});
4861
</script>
4962

resources/js/Components/Common/Project/ProjectTableHeading.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ defineProps<{
77

88
<template>
99
<TableHeading>
10+
<div class="px-3 py-1.5 text-left font-semibold text-text-primary pl-4 sm:pl-6 lg:pl-8 3xl:pl-12">Client</div>
1011
<div
11-
class="py-1.5 pr-3 text-left font-semibold text-text-primary pl-4 sm:pl-6 lg:pl-8 3xl:pl-12">
12+
class="py-1.5 pr-3 text-left font-semibold text-text-primary">
1213
Name
1314
</div>
14-
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">Client</div>
1515
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">
1616
Total Time
1717
</div>
@@ -23,7 +23,6 @@ defineProps<{
2323
class="px-3 py-1.5 text-left font-semibold text-text-primary">
2424
Billable Rate
2525
</div>
26-
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">Status</div>
2726
<div class="relative py-1.5 pl-3 pr-4 sm:pr-6 lg:pr-8 3xl:pr-12">
2827
<span class="sr-only">Edit</span>
2928
</div>

resources/js/Components/Common/Project/ProjectTableRow.vue

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,16 @@ const showEditProjectModal = ref(false);
7676
:original-project="project"></ProjectEditModal>
7777
<TableRow :href="route('projects.show', { project: project.id })">
7878
<div
79-
class="whitespace-nowrap min-w-0 flex items-center space-x-5 3xl:pl-12 py-4 pr-3 text-sm font-medium text-text-primary pl-4 sm:pl-6 lg:pl-8 3xl:pl-12">
79+
class="whitespace-nowrap min-w-0 px-3 py-4 text-sm text-text-secondary pl-4 sm:pl-6 lg:pl-8 3xl:pl-12">
80+
<div
81+
v-if="project.client_id"
82+
class="overflow-ellipsis overflow-hidden">
83+
{{ client?.name }}
84+
</div>
85+
<div v-else>No client</div>
86+
</div>
87+
<div
88+
class="whitespace-nowrap min-w-0 flex items-center space-x-5 py-4 pr-3 text-sm font-medium text-text-primary">
8089
<div
8190
:style="{
8291
backgroundColor: project.color,
@@ -90,15 +99,6 @@ const showEditProjectModal = ref(false);
9099
{{ projectTasksCount }} Tasks
91100
</span>
92101
</div>
93-
<div
94-
class="whitespace-nowrap min-w-0 px-3 py-4 text-sm text-text-secondary">
95-
<div
96-
v-if="project.client_id"
97-
class="overflow-ellipsis overflow-hidden">
98-
{{ client?.name }}
99-
</div>
100-
<div v-else>No client</div>
101-
</div>
102102
<div class="whitespace-nowrap px-3 py-4 text-sm text-text-secondary">
103103
<div v-if="project.spent_time">
104104
{{
@@ -126,11 +126,6 @@ const showEditProjectModal = ref(false);
126126
class="whitespace-nowrap px-3 py-4 text-sm text-text-secondary">
127127
{{ billableRateInfo }}
128128
</div>
129-
<div
130-
class="whitespace-nowrap px-3 py-4 text-sm text-text-secondary flex space-x-1 items-center font-medium">
131-
<CheckCircleIcon class="w-5"></CheckCircleIcon>
132-
<span>Active</span>
133-
</div>
134129
<div
135130
class="relative whitespace-nowrap flex items-center pl-3 text-right text-sm font-medium pr-4 sm:pr-6 lg:pr-8 3xl:pr-12">
136131
<ProjectMoreOptionsDropdown

resources/js/Components/Dashboard/ThisWeekOverview.vue

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import StatCard from '@/Components/Common/StatCard.vue';
1414
import { ClockIcon } from '@heroicons/vue/20/solid';
1515
import CardTitle from '@/packages/ui/src/CardTitle.vue';
1616
import LinearGradient from 'zrender/lib/graphic/LinearGradient';
17-
import ProjectsChartCard from '@/Components/Dashboard/ProjectsChartCard.vue';
1817
import { formatHumanReadableDuration } from '@/packages/ui/src/utils/time';
1918
import { formatCents } from '@/packages/ui/src/utils/money';
2019
import { getWeekStart } from '@/packages/ui/src/utils/settings';
@@ -67,19 +66,6 @@ const organizationId = computed(() => getCurrentOrganizationId());
6766
6867
const organization = inject<ComputedRef<Organization>>('organization');
6968
70-
// Set up the queries
71-
const { data: weeklyProjectOverview } = useQuery({
72-
queryKey: ['weeklyProjectOverview', organizationId],
73-
queryFn: () => {
74-
return api.weeklyProjectOverview({
75-
params: {
76-
organization: organizationId.value!,
77-
},
78-
});
79-
},
80-
enabled: computed(() => !!organizationId.value),
81-
});
82-
8369
const { data: totalWeeklyTime } = useQuery({
8470
queryKey: ['totalWeeklyTime', organizationId],
8571
queryFn: () => {
@@ -292,11 +278,6 @@ const option = computed(() => {
292278
)
293279
: '--'
294280
" />
295-
<ProjectsChartCard
296-
v-if="weeklyProjectOverview"
297-
:weekly-project-overview="
298-
weeklyProjectOverview
299-
"></ProjectsChartCard>
300281
</div>
301282
</div>
302283
</template>

0 commit comments

Comments
 (0)