Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
278 changes: 278 additions & 0 deletions src/assets/empty-monitoring.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/chevron-up-stroke.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 128 additions & 0 deletions src/common/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,14 @@ export interface paths {
get: operations["get-users-me-watched-plans"];
parameters: {};
};
"/users/me/watched/campaigns": {
/**
* Get all users watched campaigns.
* Each returned item has isLast=1 when the user is the last watcher of that specific item.
*/
get: operations["get-users-me-watched-campaigns"];
parameters: {};
};
"/users/roles": {
get: operations["get-users-roles"];
parameters: {};
Expand Down Expand Up @@ -639,6 +647,16 @@ export interface paths {
};
};
};
"/campaigns/{cid}/watchers": {
/** Returns all the watcher added to a campaign. It always returns at least one item. */
get: operations["get-campaigns-cid-watchers"];
post: operations["post-campaigns-cid-watchers"];
parameters: {
path: {
cid: string;
};
};
};
"/workspaces/{wid}/templates": {
get: operations["get-workspaces-templates"];
post: operations["post-workspaces-wid-templates"];
Expand Down Expand Up @@ -682,6 +700,15 @@ export interface paths {
};
};
};
"/campaigns/{cid}/watchers/{profile_id}": {
delete: operations["delete-campaigns-cid-watchers-profile_id"];
parameters: {
path: {
profile_id: string;
cid: string;
};
};
};
}

export interface components {
Expand Down Expand Up @@ -3921,6 +3948,35 @@ export interface operations {
500: components["responses"]["Error"];
};
};
/**
* Get all users watched campaigns.
* Each returned item has isLast=1 when the user is the last watcher of that specific item.
*/
"get-users-me-watched-campaigns": {
parameters: {};
responses: {
200: {
content: {
"application/json": {
items: {
id?: number;
name?: string;
project?: {
name?: string;
id?: number;
};
isLast?: boolean;
}[];
allItems: number;
};
};
};
400: components["responses"]["Error"];
403: components["responses"]["Error"];
404: components["responses"]["Error"];
500: components["responses"]["Error"];
};
};
"get-users-roles": {
parameters: {};
responses: {
Expand Down Expand Up @@ -4525,6 +4581,57 @@ export interface operations {
};
};
};
/** Returns all the watcher added to a campaign. It always returns at least one item. */
"get-campaigns-cid-watchers": {
parameters: {
path: {
cid: string;
};
};
responses: {
/** OK */
200: {
content: {
"application/json": {
items: {
id: number;
name: string;
surname: string;
email: string;
image?: string;
isInternal: boolean;
}[];
};
};
};
403: components["responses"]["Error"];
404: components["responses"]["Error"];
500: components["responses"]["Error"];
};
};
"post-campaigns-cid-watchers": {
parameters: {
path: {
cid: string;
};
};
responses: {
/** OK */
200: unknown;
403: components["responses"]["Error"];
404: components["responses"]["Error"];
500: components["responses"]["Error"];
};
requestBody: {
content: {
"application/json": {
users: {
id: number;
}[];
};
};
};
};
"get-workspaces-templates": {
parameters: {
path: {
Expand Down Expand Up @@ -4747,6 +4854,27 @@ export interface operations {
403: components["responses"]["Error"];
};
};
"delete-campaigns-cid-watchers-profile_id": {
parameters: {
path: {
profile_id: string;
cid: string;
};
};
responses: {
/** OK */
200: {
content: {
"application/json": {
success?: boolean;
};
};
};
400: components["responses"]["Error"];
403: components["responses"]["Error"];
500: components["responses"]["Error"];
};
};
}

export interface external {}
78 changes: 78 additions & 0 deletions src/features/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,12 @@ const injectedRtkApi = api.injectEndpoints({
>({
query: () => ({ url: `/users/me/watched/plans` }),
}),
getUsersMeWatchedCampaigns: build.query<
GetUsersMeWatchedCampaignsApiResponse,
GetUsersMeWatchedCampaignsApiArg
>({
query: () => ({ url: `/users/me/watched/campaigns` }),
}),
getUsersRoles: build.query<GetUsersRolesApiResponse, GetUsersRolesApiArg>({
query: () => ({ url: `/users/roles` }),
}),
Expand Down Expand Up @@ -818,6 +824,22 @@ const injectedRtkApi = api.injectEndpoints({
body: queryArg.body,
}),
}),
getCampaignsByCidWatchers: build.query<
GetCampaignsByCidWatchersApiResponse,
GetCampaignsByCidWatchersApiArg
>({
query: (queryArg) => ({ url: `/campaigns/${queryArg.cid}/watchers` }),
}),
postCampaignsByCidWatchers: build.mutation<
PostCampaignsByCidWatchersApiResponse,
PostCampaignsByCidWatchersApiArg
>({
query: (queryArg) => ({
url: `/campaigns/${queryArg.cid}/watchers`,
method: 'POST',
body: queryArg.body,
}),
}),
getWorkspacesByWidTemplates: build.query<
GetWorkspacesByWidTemplatesApiResponse,
GetWorkspacesByWidTemplatesApiArg
Expand Down Expand Up @@ -903,6 +925,15 @@ const injectedRtkApi = api.injectEndpoints({
method: 'DELETE',
}),
}),
deleteCampaignsByCidWatchersAndProfileId: build.mutation<
DeleteCampaignsByCidWatchersAndProfileIdApiResponse,
DeleteCampaignsByCidWatchersAndProfileIdApiArg
>({
query: (queryArg) => ({
url: `/campaigns/${queryArg.cid}/watchers/${queryArg.profileId}`,
method: 'DELETE',
}),
}),
}),
overrideExisting: false,
});
Expand Down Expand Up @@ -1835,6 +1866,19 @@ export type GetUsersMeWatchedPlansApiResponse = /** status 200 */ {
allItems: number;
};
export type GetUsersMeWatchedPlansApiArg = void;
export type GetUsersMeWatchedCampaignsApiResponse = /** status 200 */ {
items: {
id?: number;
name?: string;
project?: {
name?: string;
id?: number;
};
isLast?: boolean;
}[];
allItems: number;
};
export type GetUsersMeWatchedCampaignsApiArg = void;
export type GetUsersRolesApiResponse = /** status 200 OK */ {
id: number;
name: string;
Expand Down Expand Up @@ -2093,6 +2137,28 @@ export type PutPlansByPidWatchersApiArg = {
}[];
};
};
export type GetCampaignsByCidWatchersApiResponse = /** status 200 OK */ {
items: {
id: number;
name: string;
surname: string;
email: string;
image?: string;
isInternal: boolean;
}[];
};
export type GetCampaignsByCidWatchersApiArg = {
cid: string;
};
export type PostCampaignsByCidWatchersApiResponse = /** status 200 OK */ void;
export type PostCampaignsByCidWatchersApiArg = {
cid: string;
body: {
users: {
id: number;
}[];
};
};
export type GetWorkspacesByWidTemplatesApiResponse = /** status 200 OK */ {
items: CpReqTemplate[];
} & PaginationData;
Expand Down Expand Up @@ -2200,6 +2266,14 @@ export type DeletePlansByPidWatchersAndProfileIdApiArg = {
pid: string;
profileId: string;
};
export type DeleteCampaignsByCidWatchersAndProfileIdApiResponse =
/** status 200 OK */ {
success?: boolean;
};
export type DeleteCampaignsByCidWatchersAndProfileIdApiArg = {
profileId: string;
cid: string;
};
export type Error = {
code: number;
error: boolean;
Expand Down Expand Up @@ -3128,6 +3202,7 @@ export const {
useGetUsersMePreferencesQuery,
usePutUsersMePreferencesBySlugMutation,
useGetUsersMeWatchedPlansQuery,
useGetUsersMeWatchedCampaignsQuery,
useGetUsersRolesQuery,
useGetVideosByVidQuery,
useGetVideosByVidObservationsQuery,
Expand All @@ -3150,6 +3225,8 @@ export const {
useGetPlansByPidWatchersQuery,
usePostPlansByPidWatchersMutation,
usePutPlansByPidWatchersMutation,
useGetCampaignsByCidWatchersQuery,
usePostCampaignsByCidWatchersMutation,
useGetWorkspacesByWidTemplatesQuery,
usePostWorkspacesByWidTemplatesMutation,
useDeleteWorkspacesByWidTemplatesAndTidMutation,
Expand All @@ -3158,4 +3235,5 @@ export const {
useGetWorkspacesByWidUsersQuery,
usePostWorkspacesByWidUsersMutation,
useDeletePlansByPidWatchersAndProfileIdMutation,
useDeleteCampaignsByCidWatchersAndProfileIdMutation,
} = injectedRtkApi;
25 changes: 13 additions & 12 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1233,15 +1233,6 @@
"__PROFILE_MODAL_GO_TO_PROFILE": "Edit profile",
"__PROFILE_MODAL_LANGUAGES_TITLE": "Change Language",
"__PROFILE_MODAL_LOGOUT_TITLE": "Log Out",
"__PROFILE_MODAL_NOTIFICATIONS_INTRO": "Manage the notifications we send you by email.",
"__PROFILE_MODAL_NOTIFICATIONS_OUTRO_P_1": " ",
"__PROFILE_MODAL_NOTIFICATIONS_OUTRO_P_2": "Enable to receive all updates: comments, mentions, quotes on the platform, confirmations, activity timelines, and invitations.",
"__PROFILE_MODAL_NOTIFICATIONS_OUTRO_P_3": "Disable to receive only essentials: mentions, quotes on the platform, activity confirmations, and invitations.",
"__PROFILE_MODAL_NOTIFICATIONS_TITLE": "Notifications settings",
"__PROFILE_MODAL_NOTIFICATIONS_TOGGLE_OFF": "No",
"__PROFILE_MODAL_NOTIFICATIONS_TOGGLE_ON": "Yes",
"__PROFILE_MODAL_NOTIFICATIONS_TOGGLE_TITLE": "Allow notifications",
"__PROFILE_MODAL_NOTIFICATIONS_UPDATED": "Changes saved",
"__PROFILE_MODAL_PRIVACY_ITEM_LABEL": "Privacy settings",
"__PROFILE_PAGE_COMPANY_SIZE_REQUIRED_ERROR": "Company size is required",
"__PROFILE_PAGE_CONFIRM_PASSWORD_MUST_MATCH_NEW_PASSWORD": "The confirmation password must match the new password",
Expand All @@ -1255,21 +1246,29 @@
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_ALERT_ITEM_2": "When a payment is confirmed",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_ALERT_ITEM_3": "When an activity is scheduled",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_ALERT_ITEM_4": "When an activity is completed",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_ALERT_ITEM_5": "When you’re mentioned in a comment",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_ALERT_TITLE": "You’ll always receive:",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_CHECKBOX_HINT": "From execution to completion, including comments in threads you participate in",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_CHECKBOX_HINT": "From execution to completion",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_CHECKBOX_LABEL": "Activity progress",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_UPDATES_FORM_LABEL": "Receive updates for:",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_UPDATES_HINT": "Choose which progress notifications you’d like to receive by email for the activities you follow",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_UPDATES_LABEL": "Activity updates",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_PROGRESS_UPDATES_TAG": "Recommended to keep enabled",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_SETUP_CHECKBOX_HINT": "From configuration through planning",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_ACTIVITY_SETUP_CHECKBOX_LABEL": "Activity setup",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_COMMENTS_PROGRESS_UPDATES_ALERT_TITLE": "You’ll always receive:",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_COMMENTS_PROGRESS_UPDATES_HINT": "Choose which notifications about comments and conversations you’d like to receive by email.",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_COMMENTS_PROGRESS_UPDATES_ITEM_1": "When you’re mentioned in a comment",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_COMMENTS_PROGRESS_UPDATES_ITEM_2": "When a teammate adds you as a follower in an activity",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_COMMENTS_PROGRESS_UPDATES_LABEL": "Communication updates",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_COMMENTS_PROGRESS_UPDATESCHECKBOX_LABEL": "Conversations you’ve participated in",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_DESCRIPTION": "Manage which email updates you want to receive",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_BUTTON_TEXT": "Unfollow",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_EMPTY_STATE_HINT": "Follow an activity to stay updated on its setup and progress",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_EMPTY_STATE_LABEL": "You’re not following any activities",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_HINT": "You’ll receive updates for activities only for these activities",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_HINT_TEXT": "Your changes are saved automatically",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_LABEL": "Activities you’re following",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_PROGRESS_DESCRIPTION": "Activity progress ",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_SETUP_DESCRIPTION": "Activity setup ",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_FOLLOW_ACTIVITIES_TAG": "tot.",
"__PROFILE_PAGE_NOTIFICATIONS_CARD_LABEL": "Notification settings",
Expand Down Expand Up @@ -1567,5 +1566,7 @@
"UX_SHORTCUT_MODAL_TITLE": "Keyboard Shortcuts",
"UX_SHORTCUT_MUTE": "Mute",
"UX_SHORTCUT_PLAY_PAUSE": "Play/Pause",
"UX_SHORTCUT_REWIND": "Rewind"
"UX_SHORTCUT_REWIND": "Rewind",
"View Less": "",
"View More": ""
}
Loading
Loading