Skip to content

feat: add quiet hours settings page #9676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
🧹 one more time
  • Loading branch information
aslilac committed Sep 14, 2023
commit a6abf2ec0dd9a78148e5259cc6698465c93edb33
6 changes: 1 addition & 5 deletions site/src/api/queries/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import {
type UserQuietHoursScheduleResponse,
type UpdateUserQuietHoursScheduleRequest,
} from "api/typesGenerated";
import {
type QueryClient,
type QueryOptions,
type MutationOptions,
} from "@tanstack/react-query";
import { type QueryClient, type QueryOptions } from "@tanstack/react-query";

export const userQuietHoursScheduleKey = (userId: string) => [
"settings",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ const fillForm = async ({
await user.click(option);
};

const readCronExpression = () => {
return;
};

const submitForm = async () => {
fireEvent.click(screen.getByText("Update schedule"));
};
Expand Down
1 change: 0 additions & 1 deletion site/src/utils/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ export const getMaxDeadlineChange = (
): number => Math.abs(deadline.diff(extremeDeadline, "hours"));

export const timeToCron = (time: string, tz?: string) => {
if (!time) throw new Error("fuck");
const [HH, mm] = time.split(":");
let prefix = "";
if (tz) {
Expand Down