mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
add table sorting to members, clients and tags table
This commit is contained in:
@@ -345,6 +345,36 @@ export async function createProjectMemberViaApi(
|
||||
return body.data as { id: string; billable_rate: number | null };
|
||||
}
|
||||
|
||||
export async function getMembersViaApi(ctx: TestContext) {
|
||||
const response = await ctx.request.get(
|
||||
`${PLAYWRIGHT_BASE_URL}/api/v1/organizations/${ctx.orgId}/members`
|
||||
);
|
||||
expect(response.status()).toBe(200);
|
||||
const body = await response.json();
|
||||
return body.data as Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
role: string;
|
||||
billable_rate: number | null;
|
||||
is_placeholder: boolean;
|
||||
}>;
|
||||
}
|
||||
|
||||
export async function updateMemberBillableRateViaApi(
|
||||
ctx: TestContext,
|
||||
memberId: string,
|
||||
billableRate: number | null
|
||||
) {
|
||||
const response = await ctx.request.put(
|
||||
`${PLAYWRIGHT_BASE_URL}/api/v1/organizations/${ctx.orgId}/members/${memberId}`,
|
||||
{ data: { billable_rate: billableRate } }
|
||||
);
|
||||
expect(response.status()).toBe(200);
|
||||
const body = await response.json();
|
||||
return body.data;
|
||||
}
|
||||
|
||||
// ──────────────────────────────────────────────────
|
||||
// Composite helpers (matching existing UI helper signatures)
|
||||
// ──────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user