Skip to content

Commit a8992c0

Browse files
authored
Merge pull request #20 from codebar-ag/main
wip
2 parents 3a24074 + 0e8d2d0 commit a8992c0

File tree

7 files changed

+208
-35
lines changed

7 files changed

+208
-35
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

changelog_internal.md

Lines changed: 204 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@
1212
'host' => env('DB_WRITE_HOST', env('DB_HOST')),
1313
],
1414
// 'host' => env('DB_HOST', '127.0.0.1'),
15-
`
1615
```
1716

1817
### Early Returned Clients & Project Delete API Endpoint
1918

2019
With this response, the request always returns successfully, but the projects and clients are not being deleted.
2120

22-
2321
### Add Sidebar Counts via Middleware
2422

2523
```php
@@ -44,16 +42,214 @@ const counts = computed(() => page.props.auth.user.current_team?.counts || {});
4442
resources/js/Components/NavigationSidebarLink.vue
4543
resources/js/Components/NavigationSidebarItem.vue
4644
47-
4845
### Hide ProjectsChartCard on Dashboard
4946
5047
Disable Dashboard.ThisWeekOverview.ProjectsChartCard
5148
49+
**File:** `resources/js/Components/Dashboard/ThisWeekOverview.vue`
50+
51+
**Removed import:**
52+
```js
53+
- import ProjectsChartCard from '@/Components/Dashboard/ProjectsChartCard.vue';
54+
```
55+
56+
**Removed API query:**
57+
```js
58+
- const { data: weeklyProjectOverview } = useQuery({
59+
- queryKey: ['weeklyProjectOverview', organizationId],
60+
- queryFn: () => {
61+
- return api.weeklyProjectOverview({
62+
- params: {
63+
- organization: organizationId.value!,
64+
- },
65+
- });
66+
- },
67+
- enabled: computed(() => !!organizationId.value),
68+
- });
69+
```
70+
71+
**Removed component from template:**
72+
```vue
73+
- <ProjectsChartCard
74+
- v-if="weeklyProjectOverview"
75+
- :weekly-project-overview="
76+
- weeklyProjectOverview
77+
- "></ProjectsChartCard>
78+
```
79+
80+
### Remove Redundant Status Columns from Clients & Projects Tables
81+
82+
The status columns were always showing "Active" even for archived items, which was confusing since tabs already handle Active/Archived filtering.
83+
84+
#### Projects Table Changes
85+
86+
**File:** `resources/js/Components/Common/Project/ProjectTableHeading.vue`
87+
- **Removed:** Status column header
88+
```vue
89+
- <div class="px-3 py-1.5 text-left font-semibold text-text-primary">Status</div>
90+
```
91+
92+
**File:** `resources/js/Components/Common/Project/ProjectTableRow.vue`
93+
- **Removed:** Hardcoded "Active" status column
94+
```vue
95+
- <div class="whitespace-nowrap px-3 py-4 text-sm text-text-secondary flex space-x-1 items-center font-medium">
96+
- <CheckCircleIcon class="w-5"></CheckCircleIcon>
97+
- <span>Active</span>
98+
- </div>
99+
```
100+
101+
**File:** `resources/js/Components/Common/Project/ProjectTable.vue`
102+
- **Updated:** Grid template to remove one column (minmax(120px, auto))
103+
```js
104+
- 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;`;
105+
+ return `grid-template-columns: minmax(300px, 1fr) minmax(150px, auto) minmax(140px, auto) minmax(130px, auto) ${props.showBillableRate ? 'minmax(130px, auto)' : ''} 80px;`;
106+
```
107+
108+
#### Clients Table Changes
52109
53-
### Remove Active from Clients & Projects
110+
**File:** `resources/js/Components/Common/Client/ClientTableHeading.vue`
111+
- **Removed:** Status column header
112+
```vue
113+
- <div class="px-3 py-1.5 text-left font-semibold text-text-primary">Status</div>
114+
```
54115
55-
Remove Active Icon + Label from clients & projects pages.
116+
**File:** `resources/js/Components/Common/Client/ClientTableRow.vue`
117+
- **Removed:** Hardcoded "Active" status column
118+
```vue
119+
- <div class="whitespace-nowrap px-3 py-4 text-sm text-text-secondary flex space-x-1 items-center font-medium">
120+
- <CheckCircleIcon class="w-5"></CheckCircleIcon>
121+
- <span>Active</span>
122+
- </div>
123+
```
56124
57-
### Projects.index
58-
- Sort by clients.name asc then projects.name asc
59-
- move clients.name column before projects.name column
125+
**File:** `resources/js/Components/Common/Client/ClientTable.vue`
126+
- **Updated:** Grid template from 4 columns to 3 columns
127+
```vue
128+
- style="grid-template-columns: 1fr 150px 200px 80px"
129+
+ style="grid-template-columns: 1fr 150px 80px"
130+
```
131+
132+
### Projects Page Improvements
133+
134+
Fixed sorting order and column layout on projects index page.
135+
136+
#### Updated Sorting Logic
137+
138+
**File:** `resources/js/Components/Common/Project/ProjectTable.vue`
139+
- **Changed:** Sort by client name (ascending) first, then project name (ascending)
140+
- **Previous:** Only sorted by project name
141+
```js
142+
- const sortedProjects = computed(() => {
143+
- return [...props.projects].sort((a, b) => a.name.localeCompare(b.name));
144+
- });
145+
146+
+ const sortedProjects = computed(() => {
147+
+ return [...props.projects].sort((a, b) => {
148+
+ // Get client names, handling null clients
149+
+ const clientA = clients.value.find(client => client.id === a.client_id)?.name || '';
150+
+ const clientB = clients.value.find(client => client.id === b.client_id)?.name || '';
151+
152+
+ // First sort by client name
153+
+ const clientComparison = clientA.localeCompare(clientB);
154+
+ if (clientComparison !== 0) {
155+
+ return clientComparison;
156+
+ }
157+
158+
+ // Then sort by project name
159+
+ return a.name.localeCompare(b.name);
160+
+ });
161+
+ });
162+
```
163+
164+
#### Moved Client Column Before Project Name
165+
166+
**File:** `resources/js/Components/Common/Project/ProjectTableHeading.vue`
167+
- **Column order changed from:** Name → Client → Total Time → Progress → Billable Rate → Edit
168+
- **Column order changed to:** Client → Name → Total Time → Progress → Billable Rate → Edit
169+
170+
```vue
171+
<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>
172+
<div
173+
class="py-1.5 pr-3 text-left font-semibold text-text-primary">
174+
Name
175+
</div>
176+
```
177+
178+
**File:** `resources/js/Components/Common/Project/ProjectTableRow.vue`
179+
- **Moved client data column to first position**
180+
```vue
181+
<div 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">
182+
<div v-if="project.client_id" class="overflow-ellipsis overflow-hidden">
183+
{{ client?.name }}
184+
</div>
185+
<div v-else>No client</div>
186+
</div>
187+
<div
188+
class="whitespace-nowrap min-w-0 flex items-center space-x-5 py-4 pr-3 text-sm font-medium text-text-primary">
189+
<!-- project name content -->
190+
</div>
191+
```
192+
193+
### Fix Projects Table Column Widths
194+
195+
Fixed layout issue where Client column was too wide after column reordering.
196+
197+
**File:** `resources/js/Components/Common/Project/ProjectTable.vue`
198+
- **Fixed:** Grid template to make Client column smaller and Name column flexible
199+
```js
200+
- return `grid-template-columns: minmax(300px, 1fr) minmax(150px, auto) minmax(140px, auto) minmax(130px, auto) ${props.showBillableRate ? 'minmax(130px, auto)' : ''} 80px;`;
201+
+ return `grid-template-columns: minmax(150px, auto) minmax(300px, 1fr) minmax(140px, auto) minmax(130px, auto) ${props.showBillableRate ? 'minmax(130px, auto)' : ''} 80px;`;
202+
```
203+
204+
**Result:** Client column now has `minmax(150px, auto)` and Name column gets the flexible `minmax(300px, 1fr)` width.
205+
206+
### Fix Clients Table Missing Header
207+
208+
Added missing "Projects" header to the second column in clients table.
209+
210+
**File:** `resources/js/Components/Common/Client/ClientTableHeading.vue`
211+
- **Added:** "Projects" header text to previously empty column
212+
```vue
213+
- <div class="px-3 py-1.5 text-left font-semibold text-text-primary"></div>
214+
+ <div class="px-3 py-1.5 text-left font-semibold text-text-primary">Projects</div>
215+
```
216+
217+
### Remove Status Column from Members Table
218+
219+
Removed redundant status column from members table to maintain consistency with projects and clients tables.
220+
221+
**File:** `resources/js/Components/Common/Member/MemberTableHeading.vue`
222+
- **Removed:** Status column header
223+
```vue
224+
- <div class="px-3 py-1.5 text-left font-semibold text-text-primary">Status</div>
225+
```
226+
227+
**File:** `resources/js/Components/Common/Member/MemberTableRow.vue`
228+
- **Removed:** Status column showing Active/Inactive based on placeholder status
229+
```vue
230+
- <div class="whitespace-nowrap px-3 py-4 text-sm text-text-secondary flex space-x-1 items-center font-medium">
231+
- <CheckCircleIcon v-if="member.is_placeholder === false" class="w-5"></CheckCircleIcon>
232+
- <span v-if="member.is_placeholder === false">Active</span>
233+
- <UserCircleIcon v-if="member.is_placeholder === true" class="w-5"></UserCircleIcon>
234+
- <span v-if="member.is_placeholder === true">Inactive</span>
235+
- </div>
236+
```
237+
238+
**File:** `resources/js/Components/Common/Member/MemberTable.vue`
239+
- **Updated:** Grid template from 6 columns to 5 columns
240+
```vue
241+
- style="grid-template-columns: 1fr 1fr 180px 180px 150px 130px"
242+
+ style="grid-template-columns: 1fr 1fr 180px 180px 130px"
243+
```
244+
245+
**Result:** Members table now shows: Name → Email → Role → Billable Rate → Edit
246+
247+
### Remove Pull Request Template
248+
249+
**File:** `.github/PULL_REQUEST_TEMPLATE.md`
250+
- **Action:** Completely removed file
251+
- **Reason:** Template was blocking contributions with early-stage project notice
252+
253+
**Original content removed:**
254+
```markdown
255+
```

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ import TableHeading from '@/Components/Common/TableHeading.vue';
44

55
<template>
66
<TableHeading>
7-
<div
8-
class="py-1.5 pr-3 text-left font-semibold text-text-primary pl-4 sm:pl-6 lg:pl-8 3xl:pl-12">
9-
Name
10-
</div>
11-
<div class="px-3 py-1.5 text-left font-semibold text-text-primary"></div>
7+
<div class="py-1.5 pr-3 text-left font-semibold text-text-primary pl-4 sm:pl-6 lg:pl-8 3xl:pl-12">Name</div>
8+
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">Projects</div>
129
<div class="relative py-1.5 pl-3 pr-4 sm:pr-6 lg:pr-8 3xl:pr-12">
1310
<span class="sr-only">Edit</span>
1411
</div>

resources/js/Components/Common/Member/MemberTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ onMounted(async () => {
1818
<div
1919
data-testid="client_table"
2020
class="grid min-w-full"
21-
style="grid-template-columns: 1fr 1fr 180px 180px 150px 130px">
21+
style="grid-template-columns: 1fr 1fr 180px 180px 130px">
2222
<MemberTableHeading></MemberTableHeading>
2323
<template v-for="member in members" :key="member.id">
2424
<MemberTableRow :member="member"></MemberTableRow>

resources/js/Components/Common/Member/MemberTableHeading.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import TableHeading from '@/Components/Common/TableHeading.vue';
1313
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">
1414
Billable Rate
1515
</div>
16-
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">Status</div>
1716
<div
1817
class="relative py-1.5 pl-3 pr-4 sm:pr-6 lg:pr-8 3xl:pr-12 bg-row-heading-background">
1918
<span class="sr-only">Edit</span>

resources/js/Components/Common/Member/MemberTableRow.vue

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,6 @@ const userHasValidMailAddress = computed(() => {
8484
: '--'
8585
}}
8686
</div>
87-
<div
88-
class="whitespace-nowrap px-3 py-4 text-sm text-text-secondary flex space-x-1 items-center font-medium">
89-
<CheckCircleIcon
90-
v-if="member.is_placeholder === false"
91-
class="w-5"></CheckCircleIcon>
92-
<span v-if="member.is_placeholder === false">Active</span>
93-
<UserCircleIcon
94-
v-if="member.is_placeholder === true"
95-
class="w-5"></UserCircleIcon>
96-
<span v-if="member.is_placeholder === true">Inactive</span>
97-
</div>
9887
<div
9988
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">
10089
<SecondaryButton

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ 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)' : ''} 80px;`;
41+
return `grid-template-columns: minmax(150px, auto) minmax(300px, 1fr) minmax(140px, auto) minmax(130px, auto) ${props.showBillableRate ? 'minmax(130px, auto)' : ''} 80px;`;
4242
});
4343
import { isAllowedToPerformPremiumAction } from '@/utils/billing';
4444

0 commit comments

Comments
 (0)