refactor(server): change invitation request link to workspace members tab (#11191)
close CLOUD-184
This commit is contained in:
20
packages/backend/server/src/core/utils/workspace.ts
Normal file
20
packages/backend/server/src/core/utils/workspace.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export enum WorkspaceSettingsTab {
|
||||
members = 'workspace:members',
|
||||
}
|
||||
|
||||
type SettingsPathParams = {
|
||||
workspaceId: string;
|
||||
tab: WorkspaceSettingsTab;
|
||||
};
|
||||
|
||||
/**
|
||||
* To generate a workspace settings url path like
|
||||
*
|
||||
* /workspace/{workspaceId}/settings?tab={tab}
|
||||
*/
|
||||
export function generateWorkspaceSettingsPath(params: SettingsPathParams) {
|
||||
const search = new URLSearchParams({
|
||||
tab: params.tab,
|
||||
});
|
||||
return `/workspace/${params.workspaceId}/settings?${search.toString()}`;
|
||||
}
|
||||
Reference in New Issue
Block a user